b9082cd2b8f5d2bec4d817e5ded836c7dc07de97
[hcoop/debian/courier-authlib.git] / aclocal.m4
1 # generated automatically by aclocal 1.13.4 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2013 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 # Portability macros for glibc argz. -*- Autoconf -*-
24 #
25 # Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
26 # Written by Gary V. Vaughan <gary@gnu.org>
27 #
28 # This file is free software; the Free Software Foundation gives
29 # unlimited permission to copy and/or distribute it, with or without
30 # modifications, as long as this notice is preserved.
31
32 # serial 5 argz.m4
33
34 AC_DEFUN([gl_FUNC_ARGZ],
35 [gl_PREREQ_ARGZ
36
37 AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
38
39 AC_CHECK_TYPES([error_t],
40 [],
41 [AC_DEFINE([error_t], [int],
42 [Define to a type to use for `error_t' if it is not otherwise available.])
43 AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
44 does not typedef error_t.])],
45 [#if defined(HAVE_ARGZ_H)
46 # include <argz.h>
47 #endif])
48
49 ARGZ_H=
50 AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \
51 argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
52
53 dnl if have system argz functions, allow forced use of
54 dnl libltdl-supplied implementation (and default to do so
55 dnl on "known bad" systems). Could use a runtime check, but
56 dnl (a) detecting malloc issues is notoriously unreliable
57 dnl (b) only known system that declares argz functions,
58 dnl provides them, yet they are broken, is cygwin
59 dnl releases prior to 16-Mar-2007 (1.5.24 and earlier)
60 dnl So, it's more straightforward simply to special case
61 dnl this for known bad systems.
62 AS_IF([test -z "$ARGZ_H"],
63 [AC_CACHE_CHECK(
64 [if argz actually works],
65 [lt_cv_sys_argz_works],
66 [[case $host_os in #(
67 *cygwin*)
68 lt_cv_sys_argz_works=no
69 if test "$cross_compiling" != no; then
70 lt_cv_sys_argz_works="guessing no"
71 else
72 lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
73 save_IFS=$IFS
74 IFS=-.
75 set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
76 IFS=$save_IFS
77 lt_os_major=${2-0}
78 lt_os_minor=${3-0}
79 lt_os_micro=${4-0}
80 if test "$lt_os_major" -gt 1 \
81 || { test "$lt_os_major" -eq 1 \
82 && { test "$lt_os_minor" -gt 5 \
83 || { test "$lt_os_minor" -eq 5 \
84 && test "$lt_os_micro" -gt 24; }; }; }; then
85 lt_cv_sys_argz_works=yes
86 fi
87 fi
88 ;; #(
89 *) lt_cv_sys_argz_works=yes ;;
90 esac]])
91 AS_IF([test "$lt_cv_sys_argz_works" = yes],
92 [AC_DEFINE([HAVE_WORKING_ARGZ], 1,
93 [This value is set to 1 to indicate that the system argz facility works])],
94 [ARGZ_H=argz.h
95 AC_LIBOBJ([argz])])])
96
97 AC_SUBST([ARGZ_H])
98 ])
99
100 # Prerequisites of lib/argz.c.
101 AC_DEFUN([gl_PREREQ_ARGZ], [:])
102
103 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
104 #
105 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
106 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
107 # Foundation, Inc.
108 # Written by Gordon Matzigkeit, 1996
109 #
110 # This file is free software; the Free Software Foundation gives
111 # unlimited permission to copy and/or distribute it, with or without
112 # modifications, as long as this notice is preserved.
113
114 m4_define([_LT_COPYING], [dnl
115 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
116 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
117 # Foundation, Inc.
118 # Written by Gordon Matzigkeit, 1996
119 #
120 # This file is part of GNU Libtool.
121 #
122 # GNU Libtool is free software; you can redistribute it and/or
123 # modify it under the terms of the GNU General Public License as
124 # published by the Free Software Foundation; either version 2 of
125 # the License, or (at your option) any later version.
126 #
127 # As a special exception to the GNU General Public License,
128 # if you distribute this file as part of a program or library that
129 # is built using GNU Libtool, you may include this file under the
130 # same distribution terms that you use for the rest of that program.
131 #
132 # GNU Libtool is distributed in the hope that it will be useful,
133 # but WITHOUT ANY WARRANTY; without even the implied warranty of
134 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
135 # GNU General Public License for more details.
136 #
137 # You should have received a copy of the GNU General Public License
138 # along with GNU Libtool; see the file COPYING. If not, a copy
139 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
140 # obtained by writing to the Free Software Foundation, Inc.,
141 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
142 ])
143
144 # serial 57 LT_INIT
145
146
147 # LT_PREREQ(VERSION)
148 # ------------------
149 # Complain and exit if this libtool version is less that VERSION.
150 m4_defun([LT_PREREQ],
151 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
152 [m4_default([$3],
153 [m4_fatal([Libtool version $1 or higher is required],
154 63)])],
155 [$2])])
156
157
158 # _LT_CHECK_BUILDDIR
159 # ------------------
160 # Complain if the absolute build directory name contains unusual characters
161 m4_defun([_LT_CHECK_BUILDDIR],
162 [case `pwd` in
163 *\ * | *\ *)
164 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
165 esac
166 ])
167
168
169 # LT_INIT([OPTIONS])
170 # ------------------
171 AC_DEFUN([LT_INIT],
172 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
173 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
174 AC_BEFORE([$0], [LT_LANG])dnl
175 AC_BEFORE([$0], [LT_OUTPUT])dnl
176 AC_BEFORE([$0], [LTDL_INIT])dnl
177 m4_require([_LT_CHECK_BUILDDIR])dnl
178
179 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
180 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
181 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
182 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
183 dnl unless we require an AC_DEFUNed macro:
184 AC_REQUIRE([LTOPTIONS_VERSION])dnl
185 AC_REQUIRE([LTSUGAR_VERSION])dnl
186 AC_REQUIRE([LTVERSION_VERSION])dnl
187 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
188 m4_require([_LT_PROG_LTMAIN])dnl
189
190 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
191
192 dnl Parse OPTIONS
193 _LT_SET_OPTIONS([$0], [$1])
194
195 # This can be used to rebuild libtool when needed
196 LIBTOOL_DEPS="$ltmain"
197
198 # Always use our own libtool.
199 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
200 AC_SUBST(LIBTOOL)dnl
201
202 _LT_SETUP
203
204 # Only expand once:
205 m4_define([LT_INIT])
206 ])# LT_INIT
207
208 # Old names:
209 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
210 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
211 dnl aclocal-1.4 backwards compatibility:
212 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
213 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
214
215
216 # _LT_CC_BASENAME(CC)
217 # -------------------
218 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
219 m4_defun([_LT_CC_BASENAME],
220 [for cc_temp in $1""; do
221 case $cc_temp in
222 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
223 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
224 \-*) ;;
225 *) break;;
226 esac
227 done
228 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
229 ])
230
231
232 # _LT_FILEUTILS_DEFAULTS
233 # ----------------------
234 # It is okay to use these file commands and assume they have been set
235 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
236 m4_defun([_LT_FILEUTILS_DEFAULTS],
237 [: ${CP="cp -f"}
238 : ${MV="mv -f"}
239 : ${RM="rm -f"}
240 ])# _LT_FILEUTILS_DEFAULTS
241
242
243 # _LT_SETUP
244 # ---------
245 m4_defun([_LT_SETUP],
246 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
247 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
248 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
249 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
250
251 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
252 dnl
253 _LT_DECL([], [host_alias], [0], [The host system])dnl
254 _LT_DECL([], [host], [0])dnl
255 _LT_DECL([], [host_os], [0])dnl
256 dnl
257 _LT_DECL([], [build_alias], [0], [The build system])dnl
258 _LT_DECL([], [build], [0])dnl
259 _LT_DECL([], [build_os], [0])dnl
260 dnl
261 AC_REQUIRE([AC_PROG_CC])dnl
262 AC_REQUIRE([LT_PATH_LD])dnl
263 AC_REQUIRE([LT_PATH_NM])dnl
264 dnl
265 AC_REQUIRE([AC_PROG_LN_S])dnl
266 test -z "$LN_S" && LN_S="ln -s"
267 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
268 dnl
269 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
270 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
271 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
272 dnl
273 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
274 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
275 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
276 m4_require([_LT_CMD_RELOAD])dnl
277 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
278 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
279 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
280 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
281 m4_require([_LT_WITH_SYSROOT])dnl
282
283 _LT_CONFIG_LIBTOOL_INIT([
284 # See if we are running on zsh, and set the options which allow our
285 # commands through without removal of \ escapes INIT.
286 if test -n "\${ZSH_VERSION+set}" ; then
287 setopt NO_GLOB_SUBST
288 fi
289 ])
290 if test -n "${ZSH_VERSION+set}" ; then
291 setopt NO_GLOB_SUBST
292 fi
293
294 _LT_CHECK_OBJDIR
295
296 m4_require([_LT_TAG_COMPILER])dnl
297
298 case $host_os in
299 aix3*)
300 # AIX sometimes has problems with the GCC collect2 program. For some
301 # reason, if we set the COLLECT_NAMES environment variable, the problems
302 # vanish in a puff of smoke.
303 if test "X${COLLECT_NAMES+set}" != Xset; then
304 COLLECT_NAMES=
305 export COLLECT_NAMES
306 fi
307 ;;
308 esac
309
310 # Global variables:
311 ofile=libtool
312 can_build_shared=yes
313
314 # All known linkers require a `.a' archive for static linking (except MSVC,
315 # which needs '.lib').
316 libext=a
317
318 with_gnu_ld="$lt_cv_prog_gnu_ld"
319
320 old_CC="$CC"
321 old_CFLAGS="$CFLAGS"
322
323 # Set sane defaults for various variables
324 test -z "$CC" && CC=cc
325 test -z "$LTCC" && LTCC=$CC
326 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
327 test -z "$LD" && LD=ld
328 test -z "$ac_objext" && ac_objext=o
329
330 _LT_CC_BASENAME([$compiler])
331
332 # Only perform the check for file, if the check method requires it
333 test -z "$MAGIC_CMD" && MAGIC_CMD=file
334 case $deplibs_check_method in
335 file_magic*)
336 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
337 _LT_PATH_MAGIC
338 fi
339 ;;
340 esac
341
342 # Use C for the default configuration in the libtool script
343 LT_SUPPORTED_TAG([CC])
344 _LT_LANG_C_CONFIG
345 _LT_LANG_DEFAULT_CONFIG
346 _LT_CONFIG_COMMANDS
347 ])# _LT_SETUP
348
349
350 # _LT_PREPARE_SED_QUOTE_VARS
351 # --------------------------
352 # Define a few sed substitution that help us do robust quoting.
353 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
354 [# Backslashify metacharacters that are still active within
355 # double-quoted strings.
356 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
357
358 # Same as above, but do not quote variable references.
359 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
360
361 # Sed substitution to delay expansion of an escaped shell variable in a
362 # double_quote_subst'ed string.
363 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
364
365 # Sed substitution to delay expansion of an escaped single quote.
366 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
367
368 # Sed substitution to avoid accidental globbing in evaled expressions
369 no_glob_subst='s/\*/\\\*/g'
370 ])
371
372 # _LT_PROG_LTMAIN
373 # ---------------
374 # Note that this code is called both from `configure', and `config.status'
375 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
376 # `config.status' has no value for ac_aux_dir unless we are using Automake,
377 # so we pass a copy along to make sure it has a sensible value anyway.
378 m4_defun([_LT_PROG_LTMAIN],
379 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
380 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
381 ltmain="$ac_aux_dir/ltmain.sh"
382 ])# _LT_PROG_LTMAIN
383
384
385
386 # So that we can recreate a full libtool script including additional
387 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
388 # in macros and then make a single call at the end using the `libtool'
389 # label.
390
391
392 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
393 # ----------------------------------------
394 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
395 m4_define([_LT_CONFIG_LIBTOOL_INIT],
396 [m4_ifval([$1],
397 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
398 [$1
399 ])])])
400
401 # Initialize.
402 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
403
404
405 # _LT_CONFIG_LIBTOOL([COMMANDS])
406 # ------------------------------
407 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
408 m4_define([_LT_CONFIG_LIBTOOL],
409 [m4_ifval([$1],
410 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
411 [$1
412 ])])])
413
414 # Initialize.
415 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
416
417
418 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
419 # -----------------------------------------------------
420 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
421 [_LT_CONFIG_LIBTOOL([$1])
422 _LT_CONFIG_LIBTOOL_INIT([$2])
423 ])
424
425
426 # _LT_FORMAT_COMMENT([COMMENT])
427 # -----------------------------
428 # Add leading comment marks to the start of each line, and a trailing
429 # full-stop to the whole comment if one is not present already.
430 m4_define([_LT_FORMAT_COMMENT],
431 [m4_ifval([$1], [
432 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
433 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
434 )])
435
436
437
438
439
440 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
441 # -------------------------------------------------------------------
442 # CONFIGNAME is the name given to the value in the libtool script.
443 # VARNAME is the (base) name used in the configure script.
444 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
445 # VARNAME. Any other value will be used directly.
446 m4_define([_LT_DECL],
447 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
448 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
449 [m4_ifval([$1], [$1], [$2])])
450 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
451 m4_ifval([$4],
452 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
453 lt_dict_add_subkey([lt_decl_dict], [$2],
454 [tagged?], [m4_ifval([$5], [yes], [no])])])
455 ])
456
457
458 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
459 # --------------------------------------------------------
460 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
461
462
463 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
464 # ------------------------------------------------
465 m4_define([lt_decl_tag_varnames],
466 [_lt_decl_filter([tagged?], [yes], $@)])
467
468
469 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
470 # ---------------------------------------------------------
471 m4_define([_lt_decl_filter],
472 [m4_case([$#],
473 [0], [m4_fatal([$0: too few arguments: $#])],
474 [1], [m4_fatal([$0: too few arguments: $#: $1])],
475 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
476 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
477 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
478 ])
479
480
481 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
482 # --------------------------------------------------
483 m4_define([lt_decl_quote_varnames],
484 [_lt_decl_filter([value], [1], $@)])
485
486
487 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
488 # ---------------------------------------------------
489 m4_define([lt_decl_dquote_varnames],
490 [_lt_decl_filter([value], [2], $@)])
491
492
493 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
494 # ---------------------------------------------------
495 m4_define([lt_decl_varnames_tagged],
496 [m4_assert([$# <= 2])dnl
497 _$0(m4_quote(m4_default([$1], [[, ]])),
498 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
499 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
500 m4_define([_lt_decl_varnames_tagged],
501 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
502
503
504 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
505 # ------------------------------------------------
506 m4_define([lt_decl_all_varnames],
507 [_$0(m4_quote(m4_default([$1], [[, ]])),
508 m4_if([$2], [],
509 m4_quote(lt_decl_varnames),
510 m4_quote(m4_shift($@))))[]dnl
511 ])
512 m4_define([_lt_decl_all_varnames],
513 [lt_join($@, lt_decl_varnames_tagged([$1],
514 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
515 ])
516
517
518 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
519 # ------------------------------------
520 # Quote a variable value, and forward it to `config.status' so that its
521 # declaration there will have the same value as in `configure'. VARNAME
522 # must have a single quote delimited value for this to work.
523 m4_define([_LT_CONFIG_STATUS_DECLARE],
524 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
525
526
527 # _LT_CONFIG_STATUS_DECLARATIONS
528 # ------------------------------
529 # We delimit libtool config variables with single quotes, so when
530 # we write them to config.status, we have to be sure to quote all
531 # embedded single quotes properly. In configure, this macro expands
532 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
533 #
534 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
535 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
536 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
537 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
538
539
540 # _LT_LIBTOOL_TAGS
541 # ----------------
542 # Output comment and list of tags supported by the script
543 m4_defun([_LT_LIBTOOL_TAGS],
544 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
545 available_tags="_LT_TAGS"dnl
546 ])
547
548
549 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
550 # -----------------------------------
551 # Extract the dictionary values for VARNAME (optionally with TAG) and
552 # expand to a commented shell variable setting:
553 #
554 # # Some comment about what VAR is for.
555 # visible_name=$lt_internal_name
556 m4_define([_LT_LIBTOOL_DECLARE],
557 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
558 [description])))[]dnl
559 m4_pushdef([_libtool_name],
560 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
561 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
562 [0], [_libtool_name=[$]$1],
563 [1], [_libtool_name=$lt_[]$1],
564 [2], [_libtool_name=$lt_[]$1],
565 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
566 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
567 ])
568
569
570 # _LT_LIBTOOL_CONFIG_VARS
571 # -----------------------
572 # Produce commented declarations of non-tagged libtool config variables
573 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
574 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
575 # section) are produced by _LT_LIBTOOL_TAG_VARS.
576 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
577 [m4_foreach([_lt_var],
578 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
579 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
580
581
582 # _LT_LIBTOOL_TAG_VARS(TAG)
583 # -------------------------
584 m4_define([_LT_LIBTOOL_TAG_VARS],
585 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
586 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
587
588
589 # _LT_TAGVAR(VARNAME, [TAGNAME])
590 # ------------------------------
591 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
592
593
594 # _LT_CONFIG_COMMANDS
595 # -------------------
596 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
597 # variables for single and double quote escaping we saved from calls
598 # to _LT_DECL, we can put quote escaped variables declarations
599 # into `config.status', and then the shell code to quote escape them in
600 # for loops in `config.status'. Finally, any additional code accumulated
601 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
602 m4_defun([_LT_CONFIG_COMMANDS],
603 [AC_PROVIDE_IFELSE([LT_OUTPUT],
604 dnl If the libtool generation code has been placed in $CONFIG_LT,
605 dnl instead of duplicating it all over again into config.status,
606 dnl then we will have config.status run $CONFIG_LT later, so it
607 dnl needs to know what name is stored there:
608 [AC_CONFIG_COMMANDS([libtool],
609 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
610 dnl If the libtool generation code is destined for config.status,
611 dnl expand the accumulated commands and init code now:
612 [AC_CONFIG_COMMANDS([libtool],
613 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
614 ])#_LT_CONFIG_COMMANDS
615
616
617 # Initialize.
618 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
619 [
620
621 # The HP-UX ksh and POSIX shell print the target directory to stdout
622 # if CDPATH is set.
623 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
624
625 sed_quote_subst='$sed_quote_subst'
626 double_quote_subst='$double_quote_subst'
627 delay_variable_subst='$delay_variable_subst'
628 _LT_CONFIG_STATUS_DECLARATIONS
629 LTCC='$LTCC'
630 LTCFLAGS='$LTCFLAGS'
631 compiler='$compiler_DEFAULT'
632
633 # A function that is used when there is no print builtin or printf.
634 func_fallback_echo ()
635 {
636 eval 'cat <<_LTECHO_EOF
637 \$[]1
638 _LTECHO_EOF'
639 }
640
641 # Quote evaled strings.
642 for var in lt_decl_all_varnames([[ \
643 ]], lt_decl_quote_varnames); do
644 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
645 *[[\\\\\\\`\\"\\\$]]*)
646 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
647 ;;
648 *)
649 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
650 ;;
651 esac
652 done
653
654 # Double-quote double-evaled strings.
655 for var in lt_decl_all_varnames([[ \
656 ]], lt_decl_dquote_varnames); do
657 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
658 *[[\\\\\\\`\\"\\\$]]*)
659 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
660 ;;
661 *)
662 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
663 ;;
664 esac
665 done
666
667 _LT_OUTPUT_LIBTOOL_INIT
668 ])
669
670 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
671 # ------------------------------------
672 # Generate a child script FILE with all initialization necessary to
673 # reuse the environment learned by the parent script, and make the
674 # file executable. If COMMENT is supplied, it is inserted after the
675 # `#!' sequence but before initialization text begins. After this
676 # macro, additional text can be appended to FILE to form the body of
677 # the child script. The macro ends with non-zero status if the
678 # file could not be fully written (such as if the disk is full).
679 m4_ifdef([AS_INIT_GENERATED],
680 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
681 [m4_defun([_LT_GENERATED_FILE_INIT],
682 [m4_require([AS_PREPARE])]dnl
683 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
684 [lt_write_fail=0
685 cat >$1 <<_ASEOF || lt_write_fail=1
686 #! $SHELL
687 # Generated by $as_me.
688 $2
689 SHELL=\${CONFIG_SHELL-$SHELL}
690 export SHELL
691 _ASEOF
692 cat >>$1 <<\_ASEOF || lt_write_fail=1
693 AS_SHELL_SANITIZE
694 _AS_PREPARE
695 exec AS_MESSAGE_FD>&1
696 _ASEOF
697 test $lt_write_fail = 0 && chmod +x $1[]dnl
698 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
699
700 # LT_OUTPUT
701 # ---------
702 # This macro allows early generation of the libtool script (before
703 # AC_OUTPUT is called), incase it is used in configure for compilation
704 # tests.
705 AC_DEFUN([LT_OUTPUT],
706 [: ${CONFIG_LT=./config.lt}
707 AC_MSG_NOTICE([creating $CONFIG_LT])
708 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
709 [# Run this file to recreate a libtool stub with the current configuration.])
710
711 cat >>"$CONFIG_LT" <<\_LTEOF
712 lt_cl_silent=false
713 exec AS_MESSAGE_LOG_FD>>config.log
714 {
715 echo
716 AS_BOX([Running $as_me.])
717 } >&AS_MESSAGE_LOG_FD
718
719 lt_cl_help="\
720 \`$as_me' creates a local libtool stub from the current configuration,
721 for use in further configure time tests before the real libtool is
722 generated.
723
724 Usage: $[0] [[OPTIONS]]
725
726 -h, --help print this help, then exit
727 -V, --version print version number, then exit
728 -q, --quiet do not print progress messages
729 -d, --debug don't remove temporary files
730
731 Report bugs to <bug-libtool@gnu.org>."
732
733 lt_cl_version="\
734 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
735 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
736 configured by $[0], generated by m4_PACKAGE_STRING.
737
738 Copyright (C) 2011 Free Software Foundation, Inc.
739 This config.lt script is free software; the Free Software Foundation
740 gives unlimited permision to copy, distribute and modify it."
741
742 while test $[#] != 0
743 do
744 case $[1] in
745 --version | --v* | -V )
746 echo "$lt_cl_version"; exit 0 ;;
747 --help | --h* | -h )
748 echo "$lt_cl_help"; exit 0 ;;
749 --debug | --d* | -d )
750 debug=: ;;
751 --quiet | --q* | --silent | --s* | -q )
752 lt_cl_silent=: ;;
753
754 -*) AC_MSG_ERROR([unrecognized option: $[1]
755 Try \`$[0] --help' for more information.]) ;;
756
757 *) AC_MSG_ERROR([unrecognized argument: $[1]
758 Try \`$[0] --help' for more information.]) ;;
759 esac
760 shift
761 done
762
763 if $lt_cl_silent; then
764 exec AS_MESSAGE_FD>/dev/null
765 fi
766 _LTEOF
767
768 cat >>"$CONFIG_LT" <<_LTEOF
769 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
770 _LTEOF
771
772 cat >>"$CONFIG_LT" <<\_LTEOF
773 AC_MSG_NOTICE([creating $ofile])
774 _LT_OUTPUT_LIBTOOL_COMMANDS
775 AS_EXIT(0)
776 _LTEOF
777 chmod +x "$CONFIG_LT"
778
779 # configure is writing to config.log, but config.lt does its own redirection,
780 # appending to config.log, which fails on DOS, as config.log is still kept
781 # open by configure. Here we exec the FD to /dev/null, effectively closing
782 # config.log, so it can be properly (re)opened and appended to by config.lt.
783 lt_cl_success=:
784 test "$silent" = yes &&
785 lt_config_lt_args="$lt_config_lt_args --quiet"
786 exec AS_MESSAGE_LOG_FD>/dev/null
787 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
788 exec AS_MESSAGE_LOG_FD>>config.log
789 $lt_cl_success || AS_EXIT(1)
790 ])# LT_OUTPUT
791
792
793 # _LT_CONFIG(TAG)
794 # ---------------
795 # If TAG is the built-in tag, create an initial libtool script with a
796 # default configuration from the untagged config vars. Otherwise add code
797 # to config.status for appending the configuration named by TAG from the
798 # matching tagged config vars.
799 m4_defun([_LT_CONFIG],
800 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
801 _LT_CONFIG_SAVE_COMMANDS([
802 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
803 m4_if(_LT_TAG, [C], [
804 # See if we are running on zsh, and set the options which allow our
805 # commands through without removal of \ escapes.
806 if test -n "${ZSH_VERSION+set}" ; then
807 setopt NO_GLOB_SUBST
808 fi
809
810 cfgfile="${ofile}T"
811 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
812 $RM "$cfgfile"
813
814 cat <<_LT_EOF >> "$cfgfile"
815 #! $SHELL
816
817 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
818 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
819 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
820 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
821 #
822 _LT_COPYING
823 _LT_LIBTOOL_TAGS
824
825 # ### BEGIN LIBTOOL CONFIG
826 _LT_LIBTOOL_CONFIG_VARS
827 _LT_LIBTOOL_TAG_VARS
828 # ### END LIBTOOL CONFIG
829
830 _LT_EOF
831
832 case $host_os in
833 aix3*)
834 cat <<\_LT_EOF >> "$cfgfile"
835 # AIX sometimes has problems with the GCC collect2 program. For some
836 # reason, if we set the COLLECT_NAMES environment variable, the problems
837 # vanish in a puff of smoke.
838 if test "X${COLLECT_NAMES+set}" != Xset; then
839 COLLECT_NAMES=
840 export COLLECT_NAMES
841 fi
842 _LT_EOF
843 ;;
844 esac
845
846 _LT_PROG_LTMAIN
847
848 # We use sed instead of cat because bash on DJGPP gets confused if
849 # if finds mixed CR/LF and LF-only lines. Since sed operates in
850 # text mode, it properly converts lines to CR/LF. This bash problem
851 # is reportedly fixed, but why not run on old versions too?
852 sed '$q' "$ltmain" >> "$cfgfile" \
853 || (rm -f "$cfgfile"; exit 1)
854
855 _LT_PROG_REPLACE_SHELLFNS
856
857 mv -f "$cfgfile" "$ofile" ||
858 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
859 chmod +x "$ofile"
860 ],
861 [cat <<_LT_EOF >> "$ofile"
862
863 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
864 dnl in a comment (ie after a #).
865 # ### BEGIN LIBTOOL TAG CONFIG: $1
866 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
867 # ### END LIBTOOL TAG CONFIG: $1
868 _LT_EOF
869 ])dnl /m4_if
870 ],
871 [m4_if([$1], [], [
872 PACKAGE='$PACKAGE'
873 VERSION='$VERSION'
874 TIMESTAMP='$TIMESTAMP'
875 RM='$RM'
876 ofile='$ofile'], [])
877 ])dnl /_LT_CONFIG_SAVE_COMMANDS
878 ])# _LT_CONFIG
879
880
881 # LT_SUPPORTED_TAG(TAG)
882 # ---------------------
883 # Trace this macro to discover what tags are supported by the libtool
884 # --tag option, using:
885 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
886 AC_DEFUN([LT_SUPPORTED_TAG], [])
887
888
889 # C support is built-in for now
890 m4_define([_LT_LANG_C_enabled], [])
891 m4_define([_LT_TAGS], [])
892
893
894 # LT_LANG(LANG)
895 # -------------
896 # Enable libtool support for the given language if not already enabled.
897 AC_DEFUN([LT_LANG],
898 [AC_BEFORE([$0], [LT_OUTPUT])dnl
899 m4_case([$1],
900 [C], [_LT_LANG(C)],
901 [C++], [_LT_LANG(CXX)],
902 [Go], [_LT_LANG(GO)],
903 [Java], [_LT_LANG(GCJ)],
904 [Fortran 77], [_LT_LANG(F77)],
905 [Fortran], [_LT_LANG(FC)],
906 [Windows Resource], [_LT_LANG(RC)],
907 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
908 [_LT_LANG($1)],
909 [m4_fatal([$0: unsupported language: "$1"])])])dnl
910 ])# LT_LANG
911
912
913 # _LT_LANG(LANGNAME)
914 # ------------------
915 m4_defun([_LT_LANG],
916 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
917 [LT_SUPPORTED_TAG([$1])dnl
918 m4_append([_LT_TAGS], [$1 ])dnl
919 m4_define([_LT_LANG_]$1[_enabled], [])dnl
920 _LT_LANG_$1_CONFIG($1)])dnl
921 ])# _LT_LANG
922
923
924 m4_ifndef([AC_PROG_GO], [
925 # NOTE: This macro has been submitted for inclusion into #
926 # GNU Autoconf as AC_PROG_GO. When it is available in #
927 # a released version of Autoconf we should remove this #
928 # macro and use it instead. #
929 m4_defun([AC_PROG_GO],
930 [AC_LANG_PUSH(Go)dnl
931 AC_ARG_VAR([GOC], [Go compiler command])dnl
932 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
933 _AC_ARG_VAR_LDFLAGS()dnl
934 AC_CHECK_TOOL(GOC, gccgo)
935 if test -z "$GOC"; then
936 if test -n "$ac_tool_prefix"; then
937 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
938 fi
939 fi
940 if test -z "$GOC"; then
941 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
942 fi
943 ])#m4_defun
944 ])#m4_ifndef
945
946
947 # _LT_LANG_DEFAULT_CONFIG
948 # -----------------------
949 m4_defun([_LT_LANG_DEFAULT_CONFIG],
950 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
951 [LT_LANG(CXX)],
952 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
953
954 AC_PROVIDE_IFELSE([AC_PROG_F77],
955 [LT_LANG(F77)],
956 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
957
958 AC_PROVIDE_IFELSE([AC_PROG_FC],
959 [LT_LANG(FC)],
960 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
961
962 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
963 dnl pulling things in needlessly.
964 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
965 [LT_LANG(GCJ)],
966 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
967 [LT_LANG(GCJ)],
968 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
969 [LT_LANG(GCJ)],
970 [m4_ifdef([AC_PROG_GCJ],
971 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
972 m4_ifdef([A][M_PROG_GCJ],
973 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
974 m4_ifdef([LT_PROG_GCJ],
975 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
976
977 AC_PROVIDE_IFELSE([AC_PROG_GO],
978 [LT_LANG(GO)],
979 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
980
981 AC_PROVIDE_IFELSE([LT_PROG_RC],
982 [LT_LANG(RC)],
983 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
984 ])# _LT_LANG_DEFAULT_CONFIG
985
986 # Obsolete macros:
987 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
988 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
989 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
990 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
991 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
992 dnl aclocal-1.4 backwards compatibility:
993 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
994 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
995 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
996 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
997 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
998
999
1000 # _LT_TAG_COMPILER
1001 # ----------------
1002 m4_defun([_LT_TAG_COMPILER],
1003 [AC_REQUIRE([AC_PROG_CC])dnl
1004
1005 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1006 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1007 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1008 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1009
1010 # If no C compiler was specified, use CC.
1011 LTCC=${LTCC-"$CC"}
1012
1013 # If no C compiler flags were specified, use CFLAGS.
1014 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1015
1016 # Allow CC to be a program name with arguments.
1017 compiler=$CC
1018 ])# _LT_TAG_COMPILER
1019
1020
1021 # _LT_COMPILER_BOILERPLATE
1022 # ------------------------
1023 # Check for compiler boilerplate output or warnings with
1024 # the simple compiler test code.
1025 m4_defun([_LT_COMPILER_BOILERPLATE],
1026 [m4_require([_LT_DECL_SED])dnl
1027 ac_outfile=conftest.$ac_objext
1028 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1029 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1030 _lt_compiler_boilerplate=`cat conftest.err`
1031 $RM conftest*
1032 ])# _LT_COMPILER_BOILERPLATE
1033
1034
1035 # _LT_LINKER_BOILERPLATE
1036 # ----------------------
1037 # Check for linker boilerplate output or warnings with
1038 # the simple link test code.
1039 m4_defun([_LT_LINKER_BOILERPLATE],
1040 [m4_require([_LT_DECL_SED])dnl
1041 ac_outfile=conftest.$ac_objext
1042 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1043 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1044 _lt_linker_boilerplate=`cat conftest.err`
1045 $RM -r conftest*
1046 ])# _LT_LINKER_BOILERPLATE
1047
1048 # _LT_REQUIRED_DARWIN_CHECKS
1049 # -------------------------
1050 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1051 case $host_os in
1052 rhapsody* | darwin*)
1053 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1054 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1055 AC_CHECK_TOOL([LIPO], [lipo], [:])
1056 AC_CHECK_TOOL([OTOOL], [otool], [:])
1057 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1058 _LT_DECL([], [DSYMUTIL], [1],
1059 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1060 _LT_DECL([], [NMEDIT], [1],
1061 [Tool to change global to local symbols on Mac OS X])
1062 _LT_DECL([], [LIPO], [1],
1063 [Tool to manipulate fat objects and archives on Mac OS X])
1064 _LT_DECL([], [OTOOL], [1],
1065 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1066 _LT_DECL([], [OTOOL64], [1],
1067 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1068
1069 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1070 [lt_cv_apple_cc_single_mod=no
1071 if test -z "${LT_MULTI_MODULE}"; then
1072 # By default we will add the -single_module flag. You can override
1073 # by either setting the environment variable LT_MULTI_MODULE
1074 # non-empty at configure time, or by adding -multi_module to the
1075 # link flags.
1076 rm -rf libconftest.dylib*
1077 echo "int foo(void){return 1;}" > conftest.c
1078 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1079 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1080 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1081 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1082 _lt_result=$?
1083 # If there is a non-empty error log, and "single_module"
1084 # appears in it, assume the flag caused a linker warning
1085 if test -s conftest.err && $GREP single_module conftest.err; then
1086 cat conftest.err >&AS_MESSAGE_LOG_FD
1087 # Otherwise, if the output was created with a 0 exit code from
1088 # the compiler, it worked.
1089 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
1090 lt_cv_apple_cc_single_mod=yes
1091 else
1092 cat conftest.err >&AS_MESSAGE_LOG_FD
1093 fi
1094 rm -rf libconftest.dylib*
1095 rm -f conftest.*
1096 fi])
1097
1098 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1099 [lt_cv_ld_exported_symbols_list],
1100 [lt_cv_ld_exported_symbols_list=no
1101 save_LDFLAGS=$LDFLAGS
1102 echo "_main" > conftest.sym
1103 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1104 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1105 [lt_cv_ld_exported_symbols_list=yes],
1106 [lt_cv_ld_exported_symbols_list=no])
1107 LDFLAGS="$save_LDFLAGS"
1108 ])
1109
1110 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1111 [lt_cv_ld_force_load=no
1112 cat > conftest.c << _LT_EOF
1113 int forced_loaded() { return 2;}
1114 _LT_EOF
1115 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1116 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1117 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1118 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1119 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1120 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1121 cat > conftest.c << _LT_EOF
1122 int main() { return 0;}
1123 _LT_EOF
1124 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1125 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1126 _lt_result=$?
1127 if test -s conftest.err && $GREP force_load conftest.err; then
1128 cat conftest.err >&AS_MESSAGE_LOG_FD
1129 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1130 lt_cv_ld_force_load=yes
1131 else
1132 cat conftest.err >&AS_MESSAGE_LOG_FD
1133 fi
1134 rm -f conftest.err libconftest.a conftest conftest.c
1135 rm -rf conftest.dSYM
1136 ])
1137 case $host_os in
1138 rhapsody* | darwin1.[[012]])
1139 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1140 darwin1.*)
1141 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1142 darwin*) # darwin 5.x on
1143 # if running on 10.5 or later, the deployment target defaults
1144 # to the OS version, if on x86, and 10.4, the deployment
1145 # target defaults to 10.4. Don't you love it?
1146 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1147 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1148 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1149 10.[[012]]*)
1150 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1151 10.*)
1152 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1153 esac
1154 ;;
1155 esac
1156 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1157 _lt_dar_single_mod='$single_module'
1158 fi
1159 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1160 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1161 else
1162 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1163 fi
1164 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1165 _lt_dsymutil='~$DSYMUTIL $lib || :'
1166 else
1167 _lt_dsymutil=
1168 fi
1169 ;;
1170 esac
1171 ])
1172
1173
1174 # _LT_DARWIN_LINKER_FEATURES([TAG])
1175 # ---------------------------------
1176 # Checks for linker and compiler features on darwin
1177 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1178 [
1179 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1180 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1181 _LT_TAGVAR(hardcode_direct, $1)=no
1182 _LT_TAGVAR(hardcode_automatic, $1)=yes
1183 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1184 if test "$lt_cv_ld_force_load" = "yes"; then
1185 _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\"`'
1186 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1187 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1188 else
1189 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1190 fi
1191 _LT_TAGVAR(link_all_deplibs, $1)=yes
1192 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1193 case $cc_basename in
1194 ifort*) _lt_dar_can_shared=yes ;;
1195 *) _lt_dar_can_shared=$GCC ;;
1196 esac
1197 if test "$_lt_dar_can_shared" = "yes"; then
1198 output_verbose_link_cmd=func_echo_all
1199 _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}"
1200 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1201 _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}"
1202 _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}"
1203 m4_if([$1], [CXX],
1204 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1205 _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}"
1206 _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}"
1207 fi
1208 ],[])
1209 else
1210 _LT_TAGVAR(ld_shlibs, $1)=no
1211 fi
1212 ])
1213
1214 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1215 # ----------------------------------
1216 # Links a minimal program and checks the executable
1217 # for the system default hardcoded library path. In most cases,
1218 # this is /usr/lib:/lib, but when the MPI compilers are used
1219 # the location of the communication and MPI libs are included too.
1220 # If we don't find anything, use the default library path according
1221 # to the aix ld manual.
1222 # Store the results from the different compilers for each TAGNAME.
1223 # Allow to override them for all tags through lt_cv_aix_libpath.
1224 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1225 [m4_require([_LT_DECL_SED])dnl
1226 if test "${lt_cv_aix_libpath+set}" = set; then
1227 aix_libpath=$lt_cv_aix_libpath
1228 else
1229 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1230 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1231 lt_aix_libpath_sed='[
1232 /Import File Strings/,/^$/ {
1233 /^0/ {
1234 s/^0 *\([^ ]*\) *$/\1/
1235 p
1236 }
1237 }]'
1238 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1239 # Check for a 64-bit object if we didn't find anything.
1240 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1241 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1242 fi],[])
1243 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1244 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1245 fi
1246 ])
1247 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1248 fi
1249 ])# _LT_SYS_MODULE_PATH_AIX
1250
1251
1252 # _LT_SHELL_INIT(ARG)
1253 # -------------------
1254 m4_define([_LT_SHELL_INIT],
1255 [m4_divert_text([M4SH-INIT], [$1
1256 ])])# _LT_SHELL_INIT
1257
1258
1259
1260 # _LT_PROG_ECHO_BACKSLASH
1261 # -----------------------
1262 # Find how we can fake an echo command that does not interpret backslash.
1263 # In particular, with Autoconf 2.60 or later we add some code to the start
1264 # of the generated configure script which will find a shell with a builtin
1265 # printf (which we can use as an echo command).
1266 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1267 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1268 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1269 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1270
1271 AC_MSG_CHECKING([how to print strings])
1272 # Test print first, because it will be a builtin if present.
1273 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1274 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1275 ECHO='print -r --'
1276 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1277 ECHO='printf %s\n'
1278 else
1279 # Use this function as a fallback that always works.
1280 func_fallback_echo ()
1281 {
1282 eval 'cat <<_LTECHO_EOF
1283 $[]1
1284 _LTECHO_EOF'
1285 }
1286 ECHO='func_fallback_echo'
1287 fi
1288
1289 # func_echo_all arg...
1290 # Invoke $ECHO with all args, space-separated.
1291 func_echo_all ()
1292 {
1293 $ECHO "$*"
1294 }
1295
1296 case "$ECHO" in
1297 printf*) AC_MSG_RESULT([printf]) ;;
1298 print*) AC_MSG_RESULT([print -r]) ;;
1299 *) AC_MSG_RESULT([cat]) ;;
1300 esac
1301
1302 m4_ifdef([_AS_DETECT_SUGGESTED],
1303 [_AS_DETECT_SUGGESTED([
1304 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1305 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1306 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1307 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1308 PATH=/empty FPATH=/empty; export PATH FPATH
1309 test "X`printf %s $ECHO`" = "X$ECHO" \
1310 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1311
1312 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1313 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1314 ])# _LT_PROG_ECHO_BACKSLASH
1315
1316
1317 # _LT_WITH_SYSROOT
1318 # ----------------
1319 AC_DEFUN([_LT_WITH_SYSROOT],
1320 [AC_MSG_CHECKING([for sysroot])
1321 AC_ARG_WITH([sysroot],
1322 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
1323 (or the compiler's sysroot if not specified).],
1324 [], [with_sysroot=no])
1325
1326 dnl lt_sysroot will always be passed unquoted. We quote it here
1327 dnl in case the user passed a directory name.
1328 lt_sysroot=
1329 case ${with_sysroot} in #(
1330 yes)
1331 if test "$GCC" = yes; then
1332 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1333 fi
1334 ;; #(
1335 /*)
1336 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1337 ;; #(
1338 no|'')
1339 ;; #(
1340 *)
1341 AC_MSG_RESULT([${with_sysroot}])
1342 AC_MSG_ERROR([The sysroot must be an absolute path.])
1343 ;;
1344 esac
1345
1346 AC_MSG_RESULT([${lt_sysroot:-no}])
1347 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1348 [dependent libraries, and in which our libraries should be installed.])])
1349
1350 # _LT_ENABLE_LOCK
1351 # ---------------
1352 m4_defun([_LT_ENABLE_LOCK],
1353 [AC_ARG_ENABLE([libtool-lock],
1354 [AS_HELP_STRING([--disable-libtool-lock],
1355 [avoid locking (might break parallel builds)])])
1356 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1357
1358 # Some flags need to be propagated to the compiler or linker for good
1359 # libtool support.
1360 case $host in
1361 ia64-*-hpux*)
1362 # Find out which ABI we are using.
1363 echo 'int i;' > conftest.$ac_ext
1364 if AC_TRY_EVAL(ac_compile); then
1365 case `/usr/bin/file conftest.$ac_objext` in
1366 *ELF-32*)
1367 HPUX_IA64_MODE="32"
1368 ;;
1369 *ELF-64*)
1370 HPUX_IA64_MODE="64"
1371 ;;
1372 esac
1373 fi
1374 rm -rf conftest*
1375 ;;
1376 *-*-irix6*)
1377 # Find out which ABI we are using.
1378 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1379 if AC_TRY_EVAL(ac_compile); then
1380 if test "$lt_cv_prog_gnu_ld" = yes; then
1381 case `/usr/bin/file conftest.$ac_objext` in
1382 *32-bit*)
1383 LD="${LD-ld} -melf32bsmip"
1384 ;;
1385 *N32*)
1386 LD="${LD-ld} -melf32bmipn32"
1387 ;;
1388 *64-bit*)
1389 LD="${LD-ld} -melf64bmip"
1390 ;;
1391 esac
1392 else
1393 case `/usr/bin/file conftest.$ac_objext` in
1394 *32-bit*)
1395 LD="${LD-ld} -32"
1396 ;;
1397 *N32*)
1398 LD="${LD-ld} -n32"
1399 ;;
1400 *64-bit*)
1401 LD="${LD-ld} -64"
1402 ;;
1403 esac
1404 fi
1405 fi
1406 rm -rf conftest*
1407 ;;
1408
1409 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1410 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1411 # Find out which ABI we are using.
1412 echo 'int i;' > conftest.$ac_ext
1413 if AC_TRY_EVAL(ac_compile); then
1414 case `/usr/bin/file conftest.o` in
1415 *32-bit*)
1416 case $host in
1417 x86_64-*kfreebsd*-gnu)
1418 LD="${LD-ld} -m elf_i386_fbsd"
1419 ;;
1420 x86_64-*linux*)
1421 LD="${LD-ld} -m elf_i386"
1422 ;;
1423 powerpcle-*linux*)
1424 LD="${LD-ld} -m elf32lppclinux"
1425 ;;
1426 powerpc-*linux*)
1427 LD="${LD-ld} -m elf32ppclinux"
1428 ;;
1429 s390x-*linux*)
1430 LD="${LD-ld} -m elf_s390"
1431 ;;
1432 sparc64-*linux*)
1433 LD="${LD-ld} -m elf32_sparc"
1434 ;;
1435 esac
1436 ;;
1437 *64-bit*)
1438 case $host in
1439 x86_64-*kfreebsd*-gnu)
1440 LD="${LD-ld} -m elf_x86_64_fbsd"
1441 ;;
1442 x86_64-*linux*)
1443 LD="${LD-ld} -m elf_x86_64"
1444 ;;
1445 powerpcle-*linux*)
1446 LD="${LD-ld} -m elf64lppc"
1447 ;;
1448 powerpc-*linux*)
1449 LD="${LD-ld} -m elf64ppc"
1450 ;;
1451 s390*-*linux*|s390*-*tpf*)
1452 LD="${LD-ld} -m elf64_s390"
1453 ;;
1454 sparc*-*linux*)
1455 LD="${LD-ld} -m elf64_sparc"
1456 ;;
1457 esac
1458 ;;
1459 esac
1460 fi
1461 rm -rf conftest*
1462 ;;
1463
1464 *-*-sco3.2v5*)
1465 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1466 SAVE_CFLAGS="$CFLAGS"
1467 CFLAGS="$CFLAGS -belf"
1468 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1469 [AC_LANG_PUSH(C)
1470 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1471 AC_LANG_POP])
1472 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1473 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1474 CFLAGS="$SAVE_CFLAGS"
1475 fi
1476 ;;
1477 *-*solaris*)
1478 # Find out which ABI we are using.
1479 echo 'int i;' > conftest.$ac_ext
1480 if AC_TRY_EVAL(ac_compile); then
1481 case `/usr/bin/file conftest.o` in
1482 *64-bit*)
1483 case $lt_cv_prog_gnu_ld in
1484 yes*)
1485 case $host in
1486 i?86-*-solaris*)
1487 LD="${LD-ld} -m elf_x86_64"
1488 ;;
1489 sparc*-*-solaris*)
1490 LD="${LD-ld} -m elf64_sparc"
1491 ;;
1492 esac
1493 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1494 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1495 LD="${LD-ld}_sol2"
1496 fi
1497 ;;
1498 *)
1499 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1500 LD="${LD-ld} -64"
1501 fi
1502 ;;
1503 esac
1504 ;;
1505 esac
1506 fi
1507 rm -rf conftest*
1508 ;;
1509 esac
1510
1511 need_locks="$enable_libtool_lock"
1512 ])# _LT_ENABLE_LOCK
1513
1514
1515 # _LT_PROG_AR
1516 # -----------
1517 m4_defun([_LT_PROG_AR],
1518 [AC_CHECK_TOOLS(AR, [ar], false)
1519 : ${AR=ar}
1520 : ${AR_FLAGS=cru}
1521 _LT_DECL([], [AR], [1], [The archiver])
1522 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1523
1524 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1525 [lt_cv_ar_at_file=no
1526 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1527 [echo conftest.$ac_objext > conftest.lst
1528 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1529 AC_TRY_EVAL([lt_ar_try])
1530 if test "$ac_status" -eq 0; then
1531 # Ensure the archiver fails upon bogus file names.
1532 rm -f conftest.$ac_objext libconftest.a
1533 AC_TRY_EVAL([lt_ar_try])
1534 if test "$ac_status" -ne 0; then
1535 lt_cv_ar_at_file=@
1536 fi
1537 fi
1538 rm -f conftest.* libconftest.a
1539 ])
1540 ])
1541
1542 if test "x$lt_cv_ar_at_file" = xno; then
1543 archiver_list_spec=
1544 else
1545 archiver_list_spec=$lt_cv_ar_at_file
1546 fi
1547 _LT_DECL([], [archiver_list_spec], [1],
1548 [How to feed a file listing to the archiver])
1549 ])# _LT_PROG_AR
1550
1551
1552 # _LT_CMD_OLD_ARCHIVE
1553 # -------------------
1554 m4_defun([_LT_CMD_OLD_ARCHIVE],
1555 [_LT_PROG_AR
1556
1557 AC_CHECK_TOOL(STRIP, strip, :)
1558 test -z "$STRIP" && STRIP=:
1559 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1560
1561 AC_CHECK_TOOL(RANLIB, ranlib, :)
1562 test -z "$RANLIB" && RANLIB=:
1563 _LT_DECL([], [RANLIB], [1],
1564 [Commands used to install an old-style archive])
1565
1566 # Determine commands to create old-style static archives.
1567 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1568 old_postinstall_cmds='chmod 644 $oldlib'
1569 old_postuninstall_cmds=
1570
1571 if test -n "$RANLIB"; then
1572 case $host_os in
1573 openbsd*)
1574 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1575 ;;
1576 *)
1577 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1578 ;;
1579 esac
1580 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1581 fi
1582
1583 case $host_os in
1584 darwin*)
1585 lock_old_archive_extraction=yes ;;
1586 *)
1587 lock_old_archive_extraction=no ;;
1588 esac
1589 _LT_DECL([], [old_postinstall_cmds], [2])
1590 _LT_DECL([], [old_postuninstall_cmds], [2])
1591 _LT_TAGDECL([], [old_archive_cmds], [2],
1592 [Commands used to build an old-style archive])
1593 _LT_DECL([], [lock_old_archive_extraction], [0],
1594 [Whether to use a lock for old archive extraction])
1595 ])# _LT_CMD_OLD_ARCHIVE
1596
1597
1598 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1599 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1600 # ----------------------------------------------------------------
1601 # Check whether the given compiler option works
1602 AC_DEFUN([_LT_COMPILER_OPTION],
1603 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1604 m4_require([_LT_DECL_SED])dnl
1605 AC_CACHE_CHECK([$1], [$2],
1606 [$2=no
1607 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1608 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1609 lt_compiler_flag="$3"
1610 # Insert the option either (1) after the last *FLAGS variable, or
1611 # (2) before a word containing "conftest.", or (3) at the end.
1612 # Note that $ac_compile itself does not contain backslashes and begins
1613 # with a dollar sign (not a hyphen), so the echo should work correctly.
1614 # The option is referenced via a variable to avoid confusing sed.
1615 lt_compile=`echo "$ac_compile" | $SED \
1616 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1617 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1618 -e 's:$: $lt_compiler_flag:'`
1619 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1620 (eval "$lt_compile" 2>conftest.err)
1621 ac_status=$?
1622 cat conftest.err >&AS_MESSAGE_LOG_FD
1623 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1624 if (exit $ac_status) && test -s "$ac_outfile"; then
1625 # The compiler can only warn and ignore the option if not recognized
1626 # So say no if there are warnings other than the usual output.
1627 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1628 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1629 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1630 $2=yes
1631 fi
1632 fi
1633 $RM conftest*
1634 ])
1635
1636 if test x"[$]$2" = xyes; then
1637 m4_if([$5], , :, [$5])
1638 else
1639 m4_if([$6], , :, [$6])
1640 fi
1641 ])# _LT_COMPILER_OPTION
1642
1643 # Old name:
1644 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1645 dnl aclocal-1.4 backwards compatibility:
1646 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1647
1648
1649 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1650 # [ACTION-SUCCESS], [ACTION-FAILURE])
1651 # ----------------------------------------------------
1652 # Check whether the given linker option works
1653 AC_DEFUN([_LT_LINKER_OPTION],
1654 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1655 m4_require([_LT_DECL_SED])dnl
1656 AC_CACHE_CHECK([$1], [$2],
1657 [$2=no
1658 save_LDFLAGS="$LDFLAGS"
1659 LDFLAGS="$LDFLAGS $3"
1660 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1661 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1662 # The linker can only warn and ignore the option if not recognized
1663 # So say no if there are warnings
1664 if test -s conftest.err; then
1665 # Append any errors to the config.log.
1666 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1667 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1668 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1669 if diff conftest.exp conftest.er2 >/dev/null; then
1670 $2=yes
1671 fi
1672 else
1673 $2=yes
1674 fi
1675 fi
1676 $RM -r conftest*
1677 LDFLAGS="$save_LDFLAGS"
1678 ])
1679
1680 if test x"[$]$2" = xyes; then
1681 m4_if([$4], , :, [$4])
1682 else
1683 m4_if([$5], , :, [$5])
1684 fi
1685 ])# _LT_LINKER_OPTION
1686
1687 # Old name:
1688 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1689 dnl aclocal-1.4 backwards compatibility:
1690 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1691
1692
1693 # LT_CMD_MAX_LEN
1694 #---------------
1695 AC_DEFUN([LT_CMD_MAX_LEN],
1696 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1697 # find the maximum length of command line arguments
1698 AC_MSG_CHECKING([the maximum length of command line arguments])
1699 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1700 i=0
1701 teststring="ABCD"
1702
1703 case $build_os in
1704 msdosdjgpp*)
1705 # On DJGPP, this test can blow up pretty badly due to problems in libc
1706 # (any single argument exceeding 2000 bytes causes a buffer overrun
1707 # during glob expansion). Even if it were fixed, the result of this
1708 # check would be larger than it should be.
1709 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1710 ;;
1711
1712 gnu*)
1713 # Under GNU Hurd, this test is not required because there is
1714 # no limit to the length of command line arguments.
1715 # Libtool will interpret -1 as no limit whatsoever
1716 lt_cv_sys_max_cmd_len=-1;
1717 ;;
1718
1719 cygwin* | mingw* | cegcc*)
1720 # On Win9x/ME, this test blows up -- it succeeds, but takes
1721 # about 5 minutes as the teststring grows exponentially.
1722 # Worse, since 9x/ME are not pre-emptively multitasking,
1723 # you end up with a "frozen" computer, even though with patience
1724 # the test eventually succeeds (with a max line length of 256k).
1725 # Instead, let's just punt: use the minimum linelength reported by
1726 # all of the supported platforms: 8192 (on NT/2K/XP).
1727 lt_cv_sys_max_cmd_len=8192;
1728 ;;
1729
1730 mint*)
1731 # On MiNT this can take a long time and run out of memory.
1732 lt_cv_sys_max_cmd_len=8192;
1733 ;;
1734
1735 amigaos*)
1736 # On AmigaOS with pdksh, this test takes hours, literally.
1737 # So we just punt and use a minimum line length of 8192.
1738 lt_cv_sys_max_cmd_len=8192;
1739 ;;
1740
1741 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1742 # This has been around since 386BSD, at least. Likely further.
1743 if test -x /sbin/sysctl; then
1744 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1745 elif test -x /usr/sbin/sysctl; then
1746 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1747 else
1748 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1749 fi
1750 # And add a safety zone
1751 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1752 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1753 ;;
1754
1755 interix*)
1756 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1757 lt_cv_sys_max_cmd_len=196608
1758 ;;
1759
1760 os2*)
1761 # The test takes a long time on OS/2.
1762 lt_cv_sys_max_cmd_len=8192
1763 ;;
1764
1765 osf*)
1766 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1767 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1768 # nice to cause kernel panics so lets avoid the loop below.
1769 # First set a reasonable default.
1770 lt_cv_sys_max_cmd_len=16384
1771 #
1772 if test -x /sbin/sysconfig; then
1773 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1774 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1775 esac
1776 fi
1777 ;;
1778 sco3.2v5*)
1779 lt_cv_sys_max_cmd_len=102400
1780 ;;
1781 sysv5* | sco5v6* | sysv4.2uw2*)
1782 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1783 if test -n "$kargmax"; then
1784 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1785 else
1786 lt_cv_sys_max_cmd_len=32768
1787 fi
1788 ;;
1789 *)
1790 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1791 if test -n "$lt_cv_sys_max_cmd_len"; then
1792 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1793 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1794 else
1795 # Make teststring a little bigger before we do anything with it.
1796 # a 1K string should be a reasonable start.
1797 for i in 1 2 3 4 5 6 7 8 ; do
1798 teststring=$teststring$teststring
1799 done
1800 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1801 # If test is not a shell built-in, we'll probably end up computing a
1802 # maximum length that is only half of the actual maximum length, but
1803 # we can't tell.
1804 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1805 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1806 test $i != 17 # 1/2 MB should be enough
1807 do
1808 i=`expr $i + 1`
1809 teststring=$teststring$teststring
1810 done
1811 # Only check the string length outside the loop.
1812 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1813 teststring=
1814 # Add a significant safety factor because C++ compilers can tack on
1815 # massive amounts of additional arguments before passing them to the
1816 # linker. It appears as though 1/2 is a usable value.
1817 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1818 fi
1819 ;;
1820 esac
1821 ])
1822 if test -n $lt_cv_sys_max_cmd_len ; then
1823 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1824 else
1825 AC_MSG_RESULT(none)
1826 fi
1827 max_cmd_len=$lt_cv_sys_max_cmd_len
1828 _LT_DECL([], [max_cmd_len], [0],
1829 [What is the maximum length of a command?])
1830 ])# LT_CMD_MAX_LEN
1831
1832 # Old name:
1833 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1834 dnl aclocal-1.4 backwards compatibility:
1835 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1836
1837
1838 # _LT_HEADER_DLFCN
1839 # ----------------
1840 m4_defun([_LT_HEADER_DLFCN],
1841 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1842 ])# _LT_HEADER_DLFCN
1843
1844
1845 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1846 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1847 # ----------------------------------------------------------------
1848 m4_defun([_LT_TRY_DLOPEN_SELF],
1849 [m4_require([_LT_HEADER_DLFCN])dnl
1850 if test "$cross_compiling" = yes; then :
1851 [$4]
1852 else
1853 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1854 lt_status=$lt_dlunknown
1855 cat > conftest.$ac_ext <<_LT_EOF
1856 [#line $LINENO "configure"
1857 #include "confdefs.h"
1858
1859 #if HAVE_DLFCN_H
1860 #include <dlfcn.h>
1861 #endif
1862
1863 #include <stdio.h>
1864
1865 #ifdef RTLD_GLOBAL
1866 # define LT_DLGLOBAL RTLD_GLOBAL
1867 #else
1868 # ifdef DL_GLOBAL
1869 # define LT_DLGLOBAL DL_GLOBAL
1870 # else
1871 # define LT_DLGLOBAL 0
1872 # endif
1873 #endif
1874
1875 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1876 find out it does not work in some platform. */
1877 #ifndef LT_DLLAZY_OR_NOW
1878 # ifdef RTLD_LAZY
1879 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1880 # else
1881 # ifdef DL_LAZY
1882 # define LT_DLLAZY_OR_NOW DL_LAZY
1883 # else
1884 # ifdef RTLD_NOW
1885 # define LT_DLLAZY_OR_NOW RTLD_NOW
1886 # else
1887 # ifdef DL_NOW
1888 # define LT_DLLAZY_OR_NOW DL_NOW
1889 # else
1890 # define LT_DLLAZY_OR_NOW 0
1891 # endif
1892 # endif
1893 # endif
1894 # endif
1895 #endif
1896
1897 /* When -fvisbility=hidden is used, assume the code has been annotated
1898 correspondingly for the symbols needed. */
1899 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1900 int fnord () __attribute__((visibility("default")));
1901 #endif
1902
1903 int fnord () { return 42; }
1904 int main ()
1905 {
1906 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1907 int status = $lt_dlunknown;
1908
1909 if (self)
1910 {
1911 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1912 else
1913 {
1914 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1915 else puts (dlerror ());
1916 }
1917 /* dlclose (self); */
1918 }
1919 else
1920 puts (dlerror ());
1921
1922 return status;
1923 }]
1924 _LT_EOF
1925 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1926 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1927 lt_status=$?
1928 case x$lt_status in
1929 x$lt_dlno_uscore) $1 ;;
1930 x$lt_dlneed_uscore) $2 ;;
1931 x$lt_dlunknown|x*) $3 ;;
1932 esac
1933 else :
1934 # compilation failed
1935 $3
1936 fi
1937 fi
1938 rm -fr conftest*
1939 ])# _LT_TRY_DLOPEN_SELF
1940
1941
1942 # LT_SYS_DLOPEN_SELF
1943 # ------------------
1944 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1945 [m4_require([_LT_HEADER_DLFCN])dnl
1946 if test "x$enable_dlopen" != xyes; then
1947 enable_dlopen=unknown
1948 enable_dlopen_self=unknown
1949 enable_dlopen_self_static=unknown
1950 else
1951 lt_cv_dlopen=no
1952 lt_cv_dlopen_libs=
1953
1954 case $host_os in
1955 beos*)
1956 lt_cv_dlopen="load_add_on"
1957 lt_cv_dlopen_libs=
1958 lt_cv_dlopen_self=yes
1959 ;;
1960
1961 mingw* | pw32* | cegcc*)
1962 lt_cv_dlopen="LoadLibrary"
1963 lt_cv_dlopen_libs=
1964 ;;
1965
1966 cygwin*)
1967 lt_cv_dlopen="dlopen"
1968 lt_cv_dlopen_libs=
1969 ;;
1970
1971 darwin*)
1972 # if libdl is installed we need to link against it
1973 AC_CHECK_LIB([dl], [dlopen],
1974 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1975 lt_cv_dlopen="dyld"
1976 lt_cv_dlopen_libs=
1977 lt_cv_dlopen_self=yes
1978 ])
1979 ;;
1980
1981 *)
1982 AC_CHECK_FUNC([shl_load],
1983 [lt_cv_dlopen="shl_load"],
1984 [AC_CHECK_LIB([dld], [shl_load],
1985 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1986 [AC_CHECK_FUNC([dlopen],
1987 [lt_cv_dlopen="dlopen"],
1988 [AC_CHECK_LIB([dl], [dlopen],
1989 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1990 [AC_CHECK_LIB([svld], [dlopen],
1991 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1992 [AC_CHECK_LIB([dld], [dld_link],
1993 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1994 ])
1995 ])
1996 ])
1997 ])
1998 ])
1999 ;;
2000 esac
2001
2002 if test "x$lt_cv_dlopen" != xno; then
2003 enable_dlopen=yes
2004 else
2005 enable_dlopen=no
2006 fi
2007
2008 case $lt_cv_dlopen in
2009 dlopen)
2010 save_CPPFLAGS="$CPPFLAGS"
2011 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2012
2013 save_LDFLAGS="$LDFLAGS"
2014 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2015
2016 save_LIBS="$LIBS"
2017 LIBS="$lt_cv_dlopen_libs $LIBS"
2018
2019 AC_CACHE_CHECK([whether a program can dlopen itself],
2020 lt_cv_dlopen_self, [dnl
2021 _LT_TRY_DLOPEN_SELF(
2022 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2023 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2024 ])
2025
2026 if test "x$lt_cv_dlopen_self" = xyes; then
2027 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2028 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2029 lt_cv_dlopen_self_static, [dnl
2030 _LT_TRY_DLOPEN_SELF(
2031 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2032 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2033 ])
2034 fi
2035
2036 CPPFLAGS="$save_CPPFLAGS"
2037 LDFLAGS="$save_LDFLAGS"
2038 LIBS="$save_LIBS"
2039 ;;
2040 esac
2041
2042 case $lt_cv_dlopen_self in
2043 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2044 *) enable_dlopen_self=unknown ;;
2045 esac
2046
2047 case $lt_cv_dlopen_self_static in
2048 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2049 *) enable_dlopen_self_static=unknown ;;
2050 esac
2051 fi
2052 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2053 [Whether dlopen is supported])
2054 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2055 [Whether dlopen of programs is supported])
2056 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2057 [Whether dlopen of statically linked programs is supported])
2058 ])# LT_SYS_DLOPEN_SELF
2059
2060 # Old name:
2061 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2062 dnl aclocal-1.4 backwards compatibility:
2063 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2064
2065
2066 # _LT_COMPILER_C_O([TAGNAME])
2067 # ---------------------------
2068 # Check to see if options -c and -o are simultaneously supported by compiler.
2069 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2070 m4_defun([_LT_COMPILER_C_O],
2071 [m4_require([_LT_DECL_SED])dnl
2072 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2073 m4_require([_LT_TAG_COMPILER])dnl
2074 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2075 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2076 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2077 $RM -r conftest 2>/dev/null
2078 mkdir conftest
2079 cd conftest
2080 mkdir out
2081 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2082
2083 lt_compiler_flag="-o out/conftest2.$ac_objext"
2084 # Insert the option either (1) after the last *FLAGS variable, or
2085 # (2) before a word containing "conftest.", or (3) at the end.
2086 # Note that $ac_compile itself does not contain backslashes and begins
2087 # with a dollar sign (not a hyphen), so the echo should work correctly.
2088 lt_compile=`echo "$ac_compile" | $SED \
2089 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2090 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2091 -e 's:$: $lt_compiler_flag:'`
2092 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2093 (eval "$lt_compile" 2>out/conftest.err)
2094 ac_status=$?
2095 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2096 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2097 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2098 then
2099 # The compiler can only warn and ignore the option if not recognized
2100 # So say no if there are warnings
2101 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2102 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2103 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2104 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2105 fi
2106 fi
2107 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2108 $RM conftest*
2109 # SGI C++ compiler will create directory out/ii_files/ for
2110 # template instantiation
2111 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2112 $RM out/* && rmdir out
2113 cd ..
2114 $RM -r conftest
2115 $RM conftest*
2116 ])
2117 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2118 [Does compiler simultaneously support -c and -o options?])
2119 ])# _LT_COMPILER_C_O
2120
2121
2122 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2123 # ----------------------------------
2124 # Check to see if we can do hard links to lock some files if needed
2125 m4_defun([_LT_COMPILER_FILE_LOCKS],
2126 [m4_require([_LT_ENABLE_LOCK])dnl
2127 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2128 _LT_COMPILER_C_O([$1])
2129
2130 hard_links="nottested"
2131 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2132 # do not overwrite the value of need_locks provided by the user
2133 AC_MSG_CHECKING([if we can lock with hard links])
2134 hard_links=yes
2135 $RM conftest*
2136 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2137 touch conftest.a
2138 ln conftest.a conftest.b 2>&5 || hard_links=no
2139 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2140 AC_MSG_RESULT([$hard_links])
2141 if test "$hard_links" = no; then
2142 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2143 need_locks=warn
2144 fi
2145 else
2146 need_locks=no
2147 fi
2148 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2149 ])# _LT_COMPILER_FILE_LOCKS
2150
2151
2152 # _LT_CHECK_OBJDIR
2153 # ----------------
2154 m4_defun([_LT_CHECK_OBJDIR],
2155 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2156 [rm -f .libs 2>/dev/null
2157 mkdir .libs 2>/dev/null
2158 if test -d .libs; then
2159 lt_cv_objdir=.libs
2160 else
2161 # MS-DOS does not allow filenames that begin with a dot.
2162 lt_cv_objdir=_libs
2163 fi
2164 rmdir .libs 2>/dev/null])
2165 objdir=$lt_cv_objdir
2166 _LT_DECL([], [objdir], [0],
2167 [The name of the directory that contains temporary libtool files])dnl
2168 m4_pattern_allow([LT_OBJDIR])dnl
2169 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2170 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2171 ])# _LT_CHECK_OBJDIR
2172
2173
2174 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2175 # --------------------------------------
2176 # Check hardcoding attributes.
2177 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2178 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2179 _LT_TAGVAR(hardcode_action, $1)=
2180 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2181 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2182 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2183
2184 # We can hardcode non-existent directories.
2185 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2186 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2187 # have to relink, otherwise we might link with an installed library
2188 # when we should be linking with a yet-to-be-installed one
2189 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2190 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2191 # Linking always hardcodes the temporary library directory.
2192 _LT_TAGVAR(hardcode_action, $1)=relink
2193 else
2194 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2195 _LT_TAGVAR(hardcode_action, $1)=immediate
2196 fi
2197 else
2198 # We cannot hardcode anything, or else we can only hardcode existing
2199 # directories.
2200 _LT_TAGVAR(hardcode_action, $1)=unsupported
2201 fi
2202 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2203
2204 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2205 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2206 # Fast installation is not supported
2207 enable_fast_install=no
2208 elif test "$shlibpath_overrides_runpath" = yes ||
2209 test "$enable_shared" = no; then
2210 # Fast installation is not necessary
2211 enable_fast_install=needless
2212 fi
2213 _LT_TAGDECL([], [hardcode_action], [0],
2214 [How to hardcode a shared library path into an executable])
2215 ])# _LT_LINKER_HARDCODE_LIBPATH
2216
2217
2218 # _LT_CMD_STRIPLIB
2219 # ----------------
2220 m4_defun([_LT_CMD_STRIPLIB],
2221 [m4_require([_LT_DECL_EGREP])
2222 striplib=
2223 old_striplib=
2224 AC_MSG_CHECKING([whether stripping libraries is possible])
2225 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2226 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2227 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2228 AC_MSG_RESULT([yes])
2229 else
2230 # FIXME - insert some real tests, host_os isn't really good enough
2231 case $host_os in
2232 darwin*)
2233 if test -n "$STRIP" ; then
2234 striplib="$STRIP -x"
2235 old_striplib="$STRIP -S"
2236 AC_MSG_RESULT([yes])
2237 else
2238 AC_MSG_RESULT([no])
2239 fi
2240 ;;
2241 *)
2242 AC_MSG_RESULT([no])
2243 ;;
2244 esac
2245 fi
2246 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2247 _LT_DECL([], [striplib], [1])
2248 ])# _LT_CMD_STRIPLIB
2249
2250
2251 # _LT_SYS_DYNAMIC_LINKER([TAG])
2252 # -----------------------------
2253 # PORTME Fill in your ld.so characteristics
2254 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2255 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2256 m4_require([_LT_DECL_EGREP])dnl
2257 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2258 m4_require([_LT_DECL_OBJDUMP])dnl
2259 m4_require([_LT_DECL_SED])dnl
2260 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2261 AC_MSG_CHECKING([dynamic linker characteristics])
2262 m4_if([$1],
2263 [], [
2264 if test "$GCC" = yes; then
2265 case $host_os in
2266 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2267 *) lt_awk_arg="/^libraries:/" ;;
2268 esac
2269 case $host_os in
2270 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2271 *) lt_sed_strip_eq="s,=/,/,g" ;;
2272 esac
2273 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2274 case $lt_search_path_spec in
2275 *\;*)
2276 # if the path contains ";" then we assume it to be the separator
2277 # otherwise default to the standard path separator (i.e. ":") - it is
2278 # assumed that no part of a normal pathname contains ";" but that should
2279 # okay in the real world where ";" in dirpaths is itself problematic.
2280 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2281 ;;
2282 *)
2283 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2284 ;;
2285 esac
2286 # Ok, now we have the path, separated by spaces, we can step through it
2287 # and add multilib dir if necessary.
2288 lt_tmp_lt_search_path_spec=
2289 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2290 for lt_sys_path in $lt_search_path_spec; do
2291 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2292 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2293 else
2294 test -d "$lt_sys_path" && \
2295 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2296 fi
2297 done
2298 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2299 BEGIN {RS=" "; FS="/|\n";} {
2300 lt_foo="";
2301 lt_count=0;
2302 for (lt_i = NF; lt_i > 0; lt_i--) {
2303 if ($lt_i != "" && $lt_i != ".") {
2304 if ($lt_i == "..") {
2305 lt_count++;
2306 } else {
2307 if (lt_count == 0) {
2308 lt_foo="/" $lt_i lt_foo;
2309 } else {
2310 lt_count--;
2311 }
2312 }
2313 }
2314 }
2315 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2316 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2317 }'`
2318 # AWK program above erroneously prepends '/' to C:/dos/paths
2319 # for these hosts.
2320 case $host_os in
2321 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2322 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2323 esac
2324 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2325 else
2326 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2327 fi])
2328 library_names_spec=
2329 libname_spec='lib$name'
2330 soname_spec=
2331 shrext_cmds=".so"
2332 postinstall_cmds=
2333 postuninstall_cmds=
2334 finish_cmds=
2335 finish_eval=
2336 shlibpath_var=
2337 shlibpath_overrides_runpath=unknown
2338 version_type=none
2339 dynamic_linker="$host_os ld.so"
2340 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2341 need_lib_prefix=unknown
2342 hardcode_into_libs=no
2343
2344 # when you set need_version to no, make sure it does not cause -set_version
2345 # flags to be left without arguments
2346 need_version=unknown
2347
2348 case $host_os in
2349 aix3*)
2350 version_type=linux # correct to gnu/linux during the next big refactor
2351 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2352 shlibpath_var=LIBPATH
2353
2354 # AIX 3 has no versioning support, so we append a major version to the name.
2355 soname_spec='${libname}${release}${shared_ext}$major'
2356 ;;
2357
2358 aix[[4-9]]*)
2359 version_type=linux # correct to gnu/linux during the next big refactor
2360 need_lib_prefix=no
2361 need_version=no
2362 hardcode_into_libs=yes
2363 if test "$host_cpu" = ia64; then
2364 # AIX 5 supports IA64
2365 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2366 shlibpath_var=LD_LIBRARY_PATH
2367 else
2368 # With GCC up to 2.95.x, collect2 would create an import file
2369 # for dependence libraries. The import file would start with
2370 # the line `#! .'. This would cause the generated library to
2371 # depend on `.', always an invalid library. This was fixed in
2372 # development snapshots of GCC prior to 3.0.
2373 case $host_os in
2374 aix4 | aix4.[[01]] | aix4.[[01]].*)
2375 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2376 echo ' yes '
2377 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2378 :
2379 else
2380 can_build_shared=no
2381 fi
2382 ;;
2383 esac
2384 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2385 # soname into executable. Probably we can add versioning support to
2386 # collect2, so additional links can be useful in future.
2387 if test "$aix_use_runtimelinking" = yes; then
2388 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2389 # instead of lib<name>.a to let people know that these are not
2390 # typical AIX shared libraries.
2391 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2392 else
2393 # We preserve .a as extension for shared libraries through AIX4.2
2394 # and later when we are not doing run time linking.
2395 library_names_spec='${libname}${release}.a $libname.a'
2396 soname_spec='${libname}${release}${shared_ext}$major'
2397 fi
2398 shlibpath_var=LIBPATH
2399 fi
2400 ;;
2401
2402 amigaos*)
2403 case $host_cpu in
2404 powerpc)
2405 # Since July 2007 AmigaOS4 officially supports .so libraries.
2406 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2407 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2408 ;;
2409 m68k)
2410 library_names_spec='$libname.ixlibrary $libname.a'
2411 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2412 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2413 ;;
2414 esac
2415 ;;
2416
2417 beos*)
2418 library_names_spec='${libname}${shared_ext}'
2419 dynamic_linker="$host_os ld.so"
2420 shlibpath_var=LIBRARY_PATH
2421 ;;
2422
2423 bsdi[[45]]*)
2424 version_type=linux # correct to gnu/linux during the next big refactor
2425 need_version=no
2426 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2427 soname_spec='${libname}${release}${shared_ext}$major'
2428 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2429 shlibpath_var=LD_LIBRARY_PATH
2430 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2431 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2432 # the default ld.so.conf also contains /usr/contrib/lib and
2433 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2434 # libtool to hard-code these into programs
2435 ;;
2436
2437 cygwin* | mingw* | pw32* | cegcc*)
2438 version_type=windows
2439 shrext_cmds=".dll"
2440 need_version=no
2441 need_lib_prefix=no
2442
2443 case $GCC,$cc_basename in
2444 yes,*)
2445 # gcc
2446 library_names_spec='$libname.dll.a'
2447 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2448 postinstall_cmds='base_file=`basename \${file}`~
2449 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2450 dldir=$destdir/`dirname \$dlpath`~
2451 test -d \$dldir || mkdir -p \$dldir~
2452 $install_prog $dir/$dlname \$dldir/$dlname~
2453 chmod a+x \$dldir/$dlname~
2454 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2455 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2456 fi'
2457 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2458 dlpath=$dir/\$dldll~
2459 $RM \$dlpath'
2460 shlibpath_overrides_runpath=yes
2461
2462 case $host_os in
2463 cygwin*)
2464 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2465 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2466 m4_if([$1], [],[
2467 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2468 ;;
2469 mingw* | cegcc*)
2470 # MinGW DLLs use traditional 'lib' prefix
2471 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2472 ;;
2473 pw32*)
2474 # pw32 DLLs use 'pw' prefix rather than 'lib'
2475 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2476 ;;
2477 esac
2478 dynamic_linker='Win32 ld.exe'
2479 ;;
2480
2481 *,cl*)
2482 # Native MSVC
2483 libname_spec='$name'
2484 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2485 library_names_spec='${libname}.dll.lib'
2486
2487 case $build_os in
2488 mingw*)
2489 sys_lib_search_path_spec=
2490 lt_save_ifs=$IFS
2491 IFS=';'
2492 for lt_path in $LIB
2493 do
2494 IFS=$lt_save_ifs
2495 # Let DOS variable expansion print the short 8.3 style file name.
2496 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2497 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2498 done
2499 IFS=$lt_save_ifs
2500 # Convert to MSYS style.
2501 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2502 ;;
2503 cygwin*)
2504 # Convert to unix form, then to dos form, then back to unix form
2505 # but this time dos style (no spaces!) so that the unix form looks
2506 # like /cygdrive/c/PROGRA~1:/cygdr...
2507 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2508 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2509 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2510 ;;
2511 *)
2512 sys_lib_search_path_spec="$LIB"
2513 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2514 # It is most probably a Windows format PATH.
2515 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2516 else
2517 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2518 fi
2519 # FIXME: find the short name or the path components, as spaces are
2520 # common. (e.g. "Program Files" -> "PROGRA~1")
2521 ;;
2522 esac
2523
2524 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2525 postinstall_cmds='base_file=`basename \${file}`~
2526 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2527 dldir=$destdir/`dirname \$dlpath`~
2528 test -d \$dldir || mkdir -p \$dldir~
2529 $install_prog $dir/$dlname \$dldir/$dlname'
2530 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2531 dlpath=$dir/\$dldll~
2532 $RM \$dlpath'
2533 shlibpath_overrides_runpath=yes
2534 dynamic_linker='Win32 link.exe'
2535 ;;
2536
2537 *)
2538 # Assume MSVC wrapper
2539 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2540 dynamic_linker='Win32 ld.exe'
2541 ;;
2542 esac
2543 # FIXME: first we should search . and the directory the executable is in
2544 shlibpath_var=PATH
2545 ;;
2546
2547 darwin* | rhapsody*)
2548 dynamic_linker="$host_os dyld"
2549 version_type=darwin
2550 need_lib_prefix=no
2551 need_version=no
2552 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2553 soname_spec='${libname}${release}${major}$shared_ext'
2554 shlibpath_overrides_runpath=yes
2555 shlibpath_var=DYLD_LIBRARY_PATH
2556 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2557 m4_if([$1], [],[
2558 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2559 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2560 ;;
2561
2562 dgux*)
2563 version_type=linux # correct to gnu/linux during the next big refactor
2564 need_lib_prefix=no
2565 need_version=no
2566 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2567 soname_spec='${libname}${release}${shared_ext}$major'
2568 shlibpath_var=LD_LIBRARY_PATH
2569 ;;
2570
2571 freebsd* | dragonfly*)
2572 # DragonFly does not have aout. When/if they implement a new
2573 # versioning mechanism, adjust this.
2574 if test -x /usr/bin/objformat; then
2575 objformat=`/usr/bin/objformat`
2576 else
2577 case $host_os in
2578 freebsd[[23]].*) objformat=aout ;;
2579 *) objformat=elf ;;
2580 esac
2581 fi
2582 version_type=freebsd-$objformat
2583 case $version_type in
2584 freebsd-elf*)
2585 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2586 need_version=no
2587 need_lib_prefix=no
2588 ;;
2589 freebsd-*)
2590 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2591 need_version=yes
2592 ;;
2593 esac
2594 shlibpath_var=LD_LIBRARY_PATH
2595 case $host_os in
2596 freebsd2.*)
2597 shlibpath_overrides_runpath=yes
2598 ;;
2599 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2600 shlibpath_overrides_runpath=yes
2601 hardcode_into_libs=yes
2602 ;;
2603 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2604 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2605 shlibpath_overrides_runpath=no
2606 hardcode_into_libs=yes
2607 ;;
2608 *) # from 4.6 on, and DragonFly
2609 shlibpath_overrides_runpath=yes
2610 hardcode_into_libs=yes
2611 ;;
2612 esac
2613 ;;
2614
2615 gnu*)
2616 version_type=linux # correct to gnu/linux during the next big refactor
2617 need_lib_prefix=no
2618 need_version=no
2619 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2620 soname_spec='${libname}${release}${shared_ext}$major'
2621 shlibpath_var=LD_LIBRARY_PATH
2622 shlibpath_overrides_runpath=no
2623 hardcode_into_libs=yes
2624 ;;
2625
2626 haiku*)
2627 version_type=linux # correct to gnu/linux during the next big refactor
2628 need_lib_prefix=no
2629 need_version=no
2630 dynamic_linker="$host_os runtime_loader"
2631 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2632 soname_spec='${libname}${release}${shared_ext}$major'
2633 shlibpath_var=LIBRARY_PATH
2634 shlibpath_overrides_runpath=yes
2635 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2636 hardcode_into_libs=yes
2637 ;;
2638
2639 hpux9* | hpux10* | hpux11*)
2640 # Give a soname corresponding to the major version so that dld.sl refuses to
2641 # link against other versions.
2642 version_type=sunos
2643 need_lib_prefix=no
2644 need_version=no
2645 case $host_cpu in
2646 ia64*)
2647 shrext_cmds='.so'
2648 hardcode_into_libs=yes
2649 dynamic_linker="$host_os dld.so"
2650 shlibpath_var=LD_LIBRARY_PATH
2651 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2652 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2653 soname_spec='${libname}${release}${shared_ext}$major'
2654 if test "X$HPUX_IA64_MODE" = X32; then
2655 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2656 else
2657 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2658 fi
2659 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2660 ;;
2661 hppa*64*)
2662 shrext_cmds='.sl'
2663 hardcode_into_libs=yes
2664 dynamic_linker="$host_os dld.sl"
2665 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2666 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2667 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2668 soname_spec='${libname}${release}${shared_ext}$major'
2669 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2670 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2671 ;;
2672 *)
2673 shrext_cmds='.sl'
2674 dynamic_linker="$host_os dld.sl"
2675 shlibpath_var=SHLIB_PATH
2676 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2677 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2678 soname_spec='${libname}${release}${shared_ext}$major'
2679 ;;
2680 esac
2681 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2682 postinstall_cmds='chmod 555 $lib'
2683 # or fails outright, so override atomically:
2684 install_override_mode=555
2685 ;;
2686
2687 interix[[3-9]]*)
2688 version_type=linux # correct to gnu/linux during the next big refactor
2689 need_lib_prefix=no
2690 need_version=no
2691 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2692 soname_spec='${libname}${release}${shared_ext}$major'
2693 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2694 shlibpath_var=LD_LIBRARY_PATH
2695 shlibpath_overrides_runpath=no
2696 hardcode_into_libs=yes
2697 ;;
2698
2699 irix5* | irix6* | nonstopux*)
2700 case $host_os in
2701 nonstopux*) version_type=nonstopux ;;
2702 *)
2703 if test "$lt_cv_prog_gnu_ld" = yes; then
2704 version_type=linux # correct to gnu/linux during the next big refactor
2705 else
2706 version_type=irix
2707 fi ;;
2708 esac
2709 need_lib_prefix=no
2710 need_version=no
2711 soname_spec='${libname}${release}${shared_ext}$major'
2712 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2713 case $host_os in
2714 irix5* | nonstopux*)
2715 libsuff= shlibsuff=
2716 ;;
2717 *)
2718 case $LD in # libtool.m4 will add one of these switches to LD
2719 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2720 libsuff= shlibsuff= libmagic=32-bit;;
2721 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2722 libsuff=32 shlibsuff=N32 libmagic=N32;;
2723 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2724 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2725 *) libsuff= shlibsuff= libmagic=never-match;;
2726 esac
2727 ;;
2728 esac
2729 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2730 shlibpath_overrides_runpath=no
2731 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2732 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2733 hardcode_into_libs=yes
2734 ;;
2735
2736 # No shared lib support for Linux oldld, aout, or coff.
2737 linux*oldld* | linux*aout* | linux*coff*)
2738 dynamic_linker=no
2739 ;;
2740
2741 # This must be glibc/ELF.
2742 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2743 version_type=linux # correct to gnu/linux during the next big refactor
2744 need_lib_prefix=no
2745 need_version=no
2746 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2747 soname_spec='${libname}${release}${shared_ext}$major'
2748 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2749 shlibpath_var=LD_LIBRARY_PATH
2750 shlibpath_overrides_runpath=no
2751
2752 # Some binutils ld are patched to set DT_RUNPATH
2753 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2754 [lt_cv_shlibpath_overrides_runpath=no
2755 save_LDFLAGS=$LDFLAGS
2756 save_libdir=$libdir
2757 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2758 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2759 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2760 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2761 [lt_cv_shlibpath_overrides_runpath=yes])])
2762 LDFLAGS=$save_LDFLAGS
2763 libdir=$save_libdir
2764 ])
2765 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2766
2767 # This implies no fast_install, which is unacceptable.
2768 # Some rework will be needed to allow for fast_install
2769 # before this can be enabled.
2770 hardcode_into_libs=yes
2771
2772 # Add ABI-specific directories to the system library path.
2773 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
2774
2775 # Append ld.so.conf contents to the search path
2776 if test -f /etc/ld.so.conf; then
2777 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' ' '`
2778 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
2779
2780 fi
2781
2782 # We used to test for /lib/ld.so.1 and disable shared libraries on
2783 # powerpc, because MkLinux only supported shared libraries with the
2784 # GNU dynamic linker. Since this was broken with cross compilers,
2785 # most powerpc-linux boxes support dynamic linking these days and
2786 # people can always --disable-shared, the test was removed, and we
2787 # assume the GNU/Linux dynamic linker is in use.
2788 dynamic_linker='GNU/Linux ld.so'
2789 ;;
2790
2791 netbsd*)
2792 version_type=sunos
2793 need_lib_prefix=no
2794 need_version=no
2795 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2796 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2797 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2798 dynamic_linker='NetBSD (a.out) ld.so'
2799 else
2800 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2801 soname_spec='${libname}${release}${shared_ext}$major'
2802 dynamic_linker='NetBSD ld.elf_so'
2803 fi
2804 shlibpath_var=LD_LIBRARY_PATH
2805 shlibpath_overrides_runpath=yes
2806 hardcode_into_libs=yes
2807 ;;
2808
2809 newsos6)
2810 version_type=linux # correct to gnu/linux during the next big refactor
2811 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2812 shlibpath_var=LD_LIBRARY_PATH
2813 shlibpath_overrides_runpath=yes
2814 ;;
2815
2816 *nto* | *qnx*)
2817 version_type=qnx
2818 need_lib_prefix=no
2819 need_version=no
2820 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2821 soname_spec='${libname}${release}${shared_ext}$major'
2822 shlibpath_var=LD_LIBRARY_PATH
2823 shlibpath_overrides_runpath=no
2824 hardcode_into_libs=yes
2825 dynamic_linker='ldqnx.so'
2826 ;;
2827
2828 openbsd*)
2829 version_type=sunos
2830 sys_lib_dlsearch_path_spec="/usr/lib"
2831 need_lib_prefix=no
2832 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2833 case $host_os in
2834 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2835 *) need_version=no ;;
2836 esac
2837 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2838 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2839 shlibpath_var=LD_LIBRARY_PATH
2840 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2841 case $host_os in
2842 openbsd2.[[89]] | openbsd2.[[89]].*)
2843 shlibpath_overrides_runpath=no
2844 ;;
2845 *)
2846 shlibpath_overrides_runpath=yes
2847 ;;
2848 esac
2849 else
2850 shlibpath_overrides_runpath=yes
2851 fi
2852 ;;
2853
2854 os2*)
2855 libname_spec='$name'
2856 shrext_cmds=".dll"
2857 need_lib_prefix=no
2858 library_names_spec='$libname${shared_ext} $libname.a'
2859 dynamic_linker='OS/2 ld.exe'
2860 shlibpath_var=LIBPATH
2861 ;;
2862
2863 osf3* | osf4* | osf5*)
2864 version_type=osf
2865 need_lib_prefix=no
2866 need_version=no
2867 soname_spec='${libname}${release}${shared_ext}$major'
2868 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2869 shlibpath_var=LD_LIBRARY_PATH
2870 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2871 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2872 ;;
2873
2874 rdos*)
2875 dynamic_linker=no
2876 ;;
2877
2878 solaris*)
2879 version_type=linux # correct to gnu/linux during the next big refactor
2880 need_lib_prefix=no
2881 need_version=no
2882 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2883 soname_spec='${libname}${release}${shared_ext}$major'
2884 shlibpath_var=LD_LIBRARY_PATH
2885 shlibpath_overrides_runpath=yes
2886 hardcode_into_libs=yes
2887 # ldd complains unless libraries are executable
2888 postinstall_cmds='chmod +x $lib'
2889 ;;
2890
2891 sunos4*)
2892 version_type=sunos
2893 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2894 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2895 shlibpath_var=LD_LIBRARY_PATH
2896 shlibpath_overrides_runpath=yes
2897 if test "$with_gnu_ld" = yes; then
2898 need_lib_prefix=no
2899 fi
2900 need_version=yes
2901 ;;
2902
2903 sysv4 | sysv4.3*)
2904 version_type=linux # correct to gnu/linux during the next big refactor
2905 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2906 soname_spec='${libname}${release}${shared_ext}$major'
2907 shlibpath_var=LD_LIBRARY_PATH
2908 case $host_vendor in
2909 sni)
2910 shlibpath_overrides_runpath=no
2911 need_lib_prefix=no
2912 runpath_var=LD_RUN_PATH
2913 ;;
2914 siemens)
2915 need_lib_prefix=no
2916 ;;
2917 motorola)
2918 need_lib_prefix=no
2919 need_version=no
2920 shlibpath_overrides_runpath=no
2921 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2922 ;;
2923 esac
2924 ;;
2925
2926 sysv4*MP*)
2927 if test -d /usr/nec ;then
2928 version_type=linux # correct to gnu/linux during the next big refactor
2929 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2930 soname_spec='$libname${shared_ext}.$major'
2931 shlibpath_var=LD_LIBRARY_PATH
2932 fi
2933 ;;
2934
2935 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2936 version_type=freebsd-elf
2937 need_lib_prefix=no
2938 need_version=no
2939 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2940 soname_spec='${libname}${release}${shared_ext}$major'
2941 shlibpath_var=LD_LIBRARY_PATH
2942 shlibpath_overrides_runpath=yes
2943 hardcode_into_libs=yes
2944 if test "$with_gnu_ld" = yes; then
2945 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2946 else
2947 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2948 case $host_os in
2949 sco3.2v5*)
2950 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2951 ;;
2952 esac
2953 fi
2954 sys_lib_dlsearch_path_spec='/usr/lib'
2955 ;;
2956
2957 tpf*)
2958 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2959 version_type=linux # correct to gnu/linux during the next big refactor
2960 need_lib_prefix=no
2961 need_version=no
2962 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2963 shlibpath_var=LD_LIBRARY_PATH
2964 shlibpath_overrides_runpath=no
2965 hardcode_into_libs=yes
2966 ;;
2967
2968 uts4*)
2969 version_type=linux # correct to gnu/linux during the next big refactor
2970 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2971 soname_spec='${libname}${release}${shared_ext}$major'
2972 shlibpath_var=LD_LIBRARY_PATH
2973 ;;
2974
2975 *)
2976 dynamic_linker=no
2977 ;;
2978 esac
2979 AC_MSG_RESULT([$dynamic_linker])
2980 test "$dynamic_linker" = no && can_build_shared=no
2981
2982 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2983 if test "$GCC" = yes; then
2984 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2985 fi
2986
2987 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2988 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2989 fi
2990 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2991 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2992 fi
2993
2994 _LT_DECL([], [variables_saved_for_relink], [1],
2995 [Variables whose values should be saved in libtool wrapper scripts and
2996 restored at link time])
2997 _LT_DECL([], [need_lib_prefix], [0],
2998 [Do we need the "lib" prefix for modules?])
2999 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3000 _LT_DECL([], [version_type], [0], [Library versioning type])
3001 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3002 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3003 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3004 [Is shlibpath searched before the hard-coded library search path?])
3005 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3006 _LT_DECL([], [library_names_spec], [1],
3007 [[List of archive names. First name is the real one, the rest are links.
3008 The last name is the one that the linker finds with -lNAME]])
3009 _LT_DECL([], [soname_spec], [1],
3010 [[The coded name of the library, if different from the real name]])
3011 _LT_DECL([], [install_override_mode], [1],
3012 [Permission mode override for installation of shared libraries])
3013 _LT_DECL([], [postinstall_cmds], [2],
3014 [Command to use after installation of a shared archive])
3015 _LT_DECL([], [postuninstall_cmds], [2],
3016 [Command to use after uninstallation of a shared archive])
3017 _LT_DECL([], [finish_cmds], [2],
3018 [Commands used to finish a libtool library installation in a directory])
3019 _LT_DECL([], [finish_eval], [1],
3020 [[As "finish_cmds", except a single script fragment to be evaled but
3021 not shown]])
3022 _LT_DECL([], [hardcode_into_libs], [0],
3023 [Whether we should hardcode library paths into libraries])
3024 _LT_DECL([], [sys_lib_search_path_spec], [2],
3025 [Compile-time system search path for libraries])
3026 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3027 [Run-time system search path for libraries])
3028 ])# _LT_SYS_DYNAMIC_LINKER
3029
3030
3031 # _LT_PATH_TOOL_PREFIX(TOOL)
3032 # --------------------------
3033 # find a file program which can recognize shared library
3034 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3035 [m4_require([_LT_DECL_EGREP])dnl
3036 AC_MSG_CHECKING([for $1])
3037 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3038 [case $MAGIC_CMD in
3039 [[\\/*] | ?:[\\/]*])
3040 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3041 ;;
3042 *)
3043 lt_save_MAGIC_CMD="$MAGIC_CMD"
3044 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3045 dnl $ac_dummy forces splitting on constant user-supplied paths.
3046 dnl POSIX.2 word splitting is done only on the output of word expansions,
3047 dnl not every word. This closes a longstanding sh security hole.
3048 ac_dummy="m4_if([$2], , $PATH, [$2])"
3049 for ac_dir in $ac_dummy; do
3050 IFS="$lt_save_ifs"
3051 test -z "$ac_dir" && ac_dir=.
3052 if test -f $ac_dir/$1; then
3053 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3054 if test -n "$file_magic_test_file"; then
3055 case $deplibs_check_method in
3056 "file_magic "*)
3057 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3058 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3059 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3060 $EGREP "$file_magic_regex" > /dev/null; then
3061 :
3062 else
3063 cat <<_LT_EOF 1>&2
3064
3065 *** Warning: the command libtool uses to detect shared libraries,
3066 *** $file_magic_cmd, produces output that libtool cannot recognize.
3067 *** The result is that libtool may fail to recognize shared libraries
3068 *** as such. This will affect the creation of libtool libraries that
3069 *** depend on shared libraries, but programs linked with such libtool
3070 *** libraries will work regardless of this problem. Nevertheless, you
3071 *** may want to report the problem to your system manager and/or to
3072 *** bug-libtool@gnu.org
3073
3074 _LT_EOF
3075 fi ;;
3076 esac
3077 fi
3078 break
3079 fi
3080 done
3081 IFS="$lt_save_ifs"
3082 MAGIC_CMD="$lt_save_MAGIC_CMD"
3083 ;;
3084 esac])
3085 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3086 if test -n "$MAGIC_CMD"; then
3087 AC_MSG_RESULT($MAGIC_CMD)
3088 else
3089 AC_MSG_RESULT(no)
3090 fi
3091 _LT_DECL([], [MAGIC_CMD], [0],
3092 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3093 ])# _LT_PATH_TOOL_PREFIX
3094
3095 # Old name:
3096 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3097 dnl aclocal-1.4 backwards compatibility:
3098 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3099
3100
3101 # _LT_PATH_MAGIC
3102 # --------------
3103 # find a file program which can recognize a shared library
3104 m4_defun([_LT_PATH_MAGIC],
3105 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3106 if test -z "$lt_cv_path_MAGIC_CMD"; then
3107 if test -n "$ac_tool_prefix"; then
3108 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3109 else
3110 MAGIC_CMD=:
3111 fi
3112 fi
3113 ])# _LT_PATH_MAGIC
3114
3115
3116 # LT_PATH_LD
3117 # ----------
3118 # find the pathname to the GNU or non-GNU linker
3119 AC_DEFUN([LT_PATH_LD],
3120 [AC_REQUIRE([AC_PROG_CC])dnl
3121 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3122 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3123 m4_require([_LT_DECL_SED])dnl
3124 m4_require([_LT_DECL_EGREP])dnl
3125 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3126
3127 AC_ARG_WITH([gnu-ld],
3128 [AS_HELP_STRING([--with-gnu-ld],
3129 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3130 [test "$withval" = no || with_gnu_ld=yes],
3131 [with_gnu_ld=no])dnl
3132
3133 ac_prog=ld
3134 if test "$GCC" = yes; then
3135 # Check if gcc -print-prog-name=ld gives a path.
3136 AC_MSG_CHECKING([for ld used by $CC])
3137 case $host in
3138 *-*-mingw*)
3139 # gcc leaves a trailing carriage return which upsets mingw
3140 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3141 *)
3142 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3143 esac
3144 case $ac_prog in
3145 # Accept absolute paths.
3146 [[\\/]]* | ?:[[\\/]]*)
3147 re_direlt='/[[^/]][[^/]]*/\.\./'
3148 # Canonicalize the pathname of ld
3149 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3150 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3151 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3152 done
3153 test -z "$LD" && LD="$ac_prog"
3154 ;;
3155 "")
3156 # If it fails, then pretend we aren't using GCC.
3157 ac_prog=ld
3158 ;;
3159 *)
3160 # If it is relative, then search for the first ld in PATH.
3161 with_gnu_ld=unknown
3162 ;;
3163 esac
3164 elif test "$with_gnu_ld" = yes; then
3165 AC_MSG_CHECKING([for GNU ld])
3166 else
3167 AC_MSG_CHECKING([for non-GNU ld])
3168 fi
3169 AC_CACHE_VAL(lt_cv_path_LD,
3170 [if test -z "$LD"; then
3171 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3172 for ac_dir in $PATH; do
3173 IFS="$lt_save_ifs"
3174 test -z "$ac_dir" && ac_dir=.
3175 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3176 lt_cv_path_LD="$ac_dir/$ac_prog"
3177 # Check to see if the program is GNU ld. I'd rather use --version,
3178 # but apparently some variants of GNU ld only accept -v.
3179 # Break only if it was the GNU/non-GNU ld that we prefer.
3180 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3181 *GNU* | *'with BFD'*)
3182 test "$with_gnu_ld" != no && break
3183 ;;
3184 *)
3185 test "$with_gnu_ld" != yes && break
3186 ;;
3187 esac
3188 fi
3189 done
3190 IFS="$lt_save_ifs"
3191 else
3192 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3193 fi])
3194 LD="$lt_cv_path_LD"
3195 if test -n "$LD"; then
3196 AC_MSG_RESULT($LD)
3197 else
3198 AC_MSG_RESULT(no)
3199 fi
3200 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3201 _LT_PATH_LD_GNU
3202 AC_SUBST([LD])
3203
3204 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3205 ])# LT_PATH_LD
3206
3207 # Old names:
3208 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3209 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3210 dnl aclocal-1.4 backwards compatibility:
3211 dnl AC_DEFUN([AM_PROG_LD], [])
3212 dnl AC_DEFUN([AC_PROG_LD], [])
3213
3214
3215 # _LT_PATH_LD_GNU
3216 #- --------------
3217 m4_defun([_LT_PATH_LD_GNU],
3218 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3219 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3220 case `$LD -v 2>&1 </dev/null` in
3221 *GNU* | *'with BFD'*)
3222 lt_cv_prog_gnu_ld=yes
3223 ;;
3224 *)
3225 lt_cv_prog_gnu_ld=no
3226 ;;
3227 esac])
3228 with_gnu_ld=$lt_cv_prog_gnu_ld
3229 ])# _LT_PATH_LD_GNU
3230
3231
3232 # _LT_CMD_RELOAD
3233 # --------------
3234 # find reload flag for linker
3235 # -- PORTME Some linkers may need a different reload flag.
3236 m4_defun([_LT_CMD_RELOAD],
3237 [AC_CACHE_CHECK([for $LD option to reload object files],
3238 lt_cv_ld_reload_flag,
3239 [lt_cv_ld_reload_flag='-r'])
3240 reload_flag=$lt_cv_ld_reload_flag
3241 case $reload_flag in
3242 "" | " "*) ;;
3243 *) reload_flag=" $reload_flag" ;;
3244 esac
3245 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3246 case $host_os in
3247 cygwin* | mingw* | pw32* | cegcc*)
3248 if test "$GCC" != yes; then
3249 reload_cmds=false
3250 fi
3251 ;;
3252 darwin*)
3253 if test "$GCC" = yes; then
3254 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3255 else
3256 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3257 fi
3258 ;;
3259 esac
3260 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3261 _LT_TAGDECL([], [reload_cmds], [2])dnl
3262 ])# _LT_CMD_RELOAD
3263
3264
3265 # _LT_CHECK_MAGIC_METHOD
3266 # ----------------------
3267 # how to check for library dependencies
3268 # -- PORTME fill in with the dynamic library characteristics
3269 m4_defun([_LT_CHECK_MAGIC_METHOD],
3270 [m4_require([_LT_DECL_EGREP])
3271 m4_require([_LT_DECL_OBJDUMP])
3272 AC_CACHE_CHECK([how to recognize dependent libraries],
3273 lt_cv_deplibs_check_method,
3274 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3275 lt_cv_file_magic_test_file=
3276 lt_cv_deplibs_check_method='unknown'
3277 # Need to set the preceding variable on all platforms that support
3278 # interlibrary dependencies.
3279 # 'none' -- dependencies not supported.
3280 # `unknown' -- same as none, but documents that we really don't know.
3281 # 'pass_all' -- all dependencies passed with no checks.
3282 # 'test_compile' -- check by making test program.
3283 # 'file_magic [[regex]]' -- check by looking for files in library path
3284 # which responds to the $file_magic_cmd with a given extended regex.
3285 # If you have `file' or equivalent on your system and you're not sure
3286 # whether `pass_all' will *always* work, you probably want this one.
3287
3288 case $host_os in
3289 aix[[4-9]]*)
3290 lt_cv_deplibs_check_method=pass_all
3291 ;;
3292
3293 beos*)
3294 lt_cv_deplibs_check_method=pass_all
3295 ;;
3296
3297 bsdi[[45]]*)
3298 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3299 lt_cv_file_magic_cmd='/usr/bin/file -L'
3300 lt_cv_file_magic_test_file=/shlib/libc.so
3301 ;;
3302
3303 cygwin*)
3304 # func_win32_libid is a shell function defined in ltmain.sh
3305 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3306 lt_cv_file_magic_cmd='func_win32_libid'
3307 ;;
3308
3309 mingw* | pw32*)
3310 # Base MSYS/MinGW do not provide the 'file' command needed by
3311 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3312 # unless we find 'file', for example because we are cross-compiling.
3313 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3314 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3315 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3316 lt_cv_file_magic_cmd='func_win32_libid'
3317 else
3318 # Keep this pattern in sync with the one in func_win32_libid.
3319 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3320 lt_cv_file_magic_cmd='$OBJDUMP -f'
3321 fi
3322 ;;
3323
3324 cegcc*)
3325 # use the weaker test based on 'objdump'. See mingw*.
3326 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3327 lt_cv_file_magic_cmd='$OBJDUMP -f'
3328 ;;
3329
3330 darwin* | rhapsody*)
3331 lt_cv_deplibs_check_method=pass_all
3332 ;;
3333
3334 freebsd* | dragonfly*)
3335 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3336 case $host_cpu in
3337 i*86 )
3338 # Not sure whether the presence of OpenBSD here was a mistake.
3339 # Let's accept both of them until this is cleared up.
3340 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3341 lt_cv_file_magic_cmd=/usr/bin/file
3342 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3343 ;;
3344 esac
3345 else
3346 lt_cv_deplibs_check_method=pass_all
3347 fi
3348 ;;
3349
3350 gnu*)
3351 lt_cv_deplibs_check_method=pass_all
3352 ;;
3353
3354 haiku*)
3355 lt_cv_deplibs_check_method=pass_all
3356 ;;
3357
3358 hpux10.20* | hpux11*)
3359 lt_cv_file_magic_cmd=/usr/bin/file
3360 case $host_cpu in
3361 ia64*)
3362 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3363 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3364 ;;
3365 hppa*64*)
3366 [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]']
3367 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3368 ;;
3369 *)
3370 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3371 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3372 ;;
3373 esac
3374 ;;
3375
3376 interix[[3-9]]*)
3377 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3378 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3379 ;;
3380
3381 irix5* | irix6* | nonstopux*)
3382 case $LD in
3383 *-32|*"-32 ") libmagic=32-bit;;
3384 *-n32|*"-n32 ") libmagic=N32;;
3385 *-64|*"-64 ") libmagic=64-bit;;
3386 *) libmagic=never-match;;
3387 esac
3388 lt_cv_deplibs_check_method=pass_all
3389 ;;
3390
3391 # This must be glibc/ELF.
3392 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3393 lt_cv_deplibs_check_method=pass_all
3394 ;;
3395
3396 netbsd*)
3397 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3398 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3399 else
3400 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3401 fi
3402 ;;
3403
3404 newos6*)
3405 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3406 lt_cv_file_magic_cmd=/usr/bin/file
3407 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3408 ;;
3409
3410 *nto* | *qnx*)
3411 lt_cv_deplibs_check_method=pass_all
3412 ;;
3413
3414 openbsd*)
3415 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3416 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3417 else
3418 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3419 fi
3420 ;;
3421
3422 osf3* | osf4* | osf5*)
3423 lt_cv_deplibs_check_method=pass_all
3424 ;;
3425
3426 rdos*)
3427 lt_cv_deplibs_check_method=pass_all
3428 ;;
3429
3430 solaris*)
3431 lt_cv_deplibs_check_method=pass_all
3432 ;;
3433
3434 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3435 lt_cv_deplibs_check_method=pass_all
3436 ;;
3437
3438 sysv4 | sysv4.3*)
3439 case $host_vendor in
3440 motorola)
3441 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]]'
3442 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3443 ;;
3444 ncr)
3445 lt_cv_deplibs_check_method=pass_all
3446 ;;
3447 sequent)
3448 lt_cv_file_magic_cmd='/bin/file'
3449 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3450 ;;
3451 sni)
3452 lt_cv_file_magic_cmd='/bin/file'
3453 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3454 lt_cv_file_magic_test_file=/lib/libc.so
3455 ;;
3456 siemens)
3457 lt_cv_deplibs_check_method=pass_all
3458 ;;
3459 pc)
3460 lt_cv_deplibs_check_method=pass_all
3461 ;;
3462 esac
3463 ;;
3464
3465 tpf*)
3466 lt_cv_deplibs_check_method=pass_all
3467 ;;
3468 esac
3469 ])
3470
3471 file_magic_glob=
3472 want_nocaseglob=no
3473 if test "$build" = "$host"; then
3474 case $host_os in
3475 mingw* | pw32*)
3476 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3477 want_nocaseglob=yes
3478 else
3479 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3480 fi
3481 ;;
3482 esac
3483 fi
3484
3485 file_magic_cmd=$lt_cv_file_magic_cmd
3486 deplibs_check_method=$lt_cv_deplibs_check_method
3487 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3488
3489 _LT_DECL([], [deplibs_check_method], [1],
3490 [Method to check whether dependent libraries are shared objects])
3491 _LT_DECL([], [file_magic_cmd], [1],
3492 [Command to use when deplibs_check_method = "file_magic"])
3493 _LT_DECL([], [file_magic_glob], [1],
3494 [How to find potential files when deplibs_check_method = "file_magic"])
3495 _LT_DECL([], [want_nocaseglob], [1],
3496 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3497 ])# _LT_CHECK_MAGIC_METHOD
3498
3499
3500 # LT_PATH_NM
3501 # ----------
3502 # find the pathname to a BSD- or MS-compatible name lister
3503 AC_DEFUN([LT_PATH_NM],
3504 [AC_REQUIRE([AC_PROG_CC])dnl
3505 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3506 [if test -n "$NM"; then
3507 # Let the user override the test.
3508 lt_cv_path_NM="$NM"
3509 else
3510 lt_nm_to_check="${ac_tool_prefix}nm"
3511 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3512 lt_nm_to_check="$lt_nm_to_check nm"
3513 fi
3514 for lt_tmp_nm in $lt_nm_to_check; do
3515 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3516 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3517 IFS="$lt_save_ifs"
3518 test -z "$ac_dir" && ac_dir=.
3519 tmp_nm="$ac_dir/$lt_tmp_nm"
3520 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3521 # Check to see if the nm accepts a BSD-compat flag.
3522 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3523 # nm: unknown option "B" ignored
3524 # Tru64's nm complains that /dev/null is an invalid object file
3525 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3526 */dev/null* | *'Invalid file or object type'*)
3527 lt_cv_path_NM="$tmp_nm -B"
3528 break
3529 ;;
3530 *)
3531 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3532 */dev/null*)
3533 lt_cv_path_NM="$tmp_nm -p"
3534 break
3535 ;;
3536 *)
3537 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3538 continue # so that we can try to find one that supports BSD flags
3539 ;;
3540 esac
3541 ;;
3542 esac
3543 fi
3544 done
3545 IFS="$lt_save_ifs"
3546 done
3547 : ${lt_cv_path_NM=no}
3548 fi])
3549 if test "$lt_cv_path_NM" != "no"; then
3550 NM="$lt_cv_path_NM"
3551 else
3552 # Didn't find any BSD compatible name lister, look for dumpbin.
3553 if test -n "$DUMPBIN"; then :
3554 # Let the user override the test.
3555 else
3556 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3557 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3558 *COFF*)
3559 DUMPBIN="$DUMPBIN -symbols"
3560 ;;
3561 *)
3562 DUMPBIN=:
3563 ;;
3564 esac
3565 fi
3566 AC_SUBST([DUMPBIN])
3567 if test "$DUMPBIN" != ":"; then
3568 NM="$DUMPBIN"
3569 fi
3570 fi
3571 test -z "$NM" && NM=nm
3572 AC_SUBST([NM])
3573 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3574
3575 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3576 [lt_cv_nm_interface="BSD nm"
3577 echo "int some_variable = 0;" > conftest.$ac_ext
3578 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3579 (eval "$ac_compile" 2>conftest.err)
3580 cat conftest.err >&AS_MESSAGE_LOG_FD
3581 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3582 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3583 cat conftest.err >&AS_MESSAGE_LOG_FD
3584 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3585 cat conftest.out >&AS_MESSAGE_LOG_FD
3586 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3587 lt_cv_nm_interface="MS dumpbin"
3588 fi
3589 rm -f conftest*])
3590 ])# LT_PATH_NM
3591
3592 # Old names:
3593 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3594 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3595 dnl aclocal-1.4 backwards compatibility:
3596 dnl AC_DEFUN([AM_PROG_NM], [])
3597 dnl AC_DEFUN([AC_PROG_NM], [])
3598
3599 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3600 # --------------------------------
3601 # how to determine the name of the shared library
3602 # associated with a specific link library.
3603 # -- PORTME fill in with the dynamic library characteristics
3604 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3605 [m4_require([_LT_DECL_EGREP])
3606 m4_require([_LT_DECL_OBJDUMP])
3607 m4_require([_LT_DECL_DLLTOOL])
3608 AC_CACHE_CHECK([how to associate runtime and link libraries],
3609 lt_cv_sharedlib_from_linklib_cmd,
3610 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3611
3612 case $host_os in
3613 cygwin* | mingw* | pw32* | cegcc*)
3614 # two different shell functions defined in ltmain.sh
3615 # decide which to use based on capabilities of $DLLTOOL
3616 case `$DLLTOOL --help 2>&1` in
3617 *--identify-strict*)
3618 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3619 ;;
3620 *)
3621 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3622 ;;
3623 esac
3624 ;;
3625 *)
3626 # fallback: assume linklib IS sharedlib
3627 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3628 ;;
3629 esac
3630 ])
3631 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3632 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3633
3634 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3635 [Command to associate shared and link libraries])
3636 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3637
3638
3639 # _LT_PATH_MANIFEST_TOOL
3640 # ----------------------
3641 # locate the manifest tool
3642 m4_defun([_LT_PATH_MANIFEST_TOOL],
3643 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3644 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3645 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3646 [lt_cv_path_mainfest_tool=no
3647 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3648 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3649 cat conftest.err >&AS_MESSAGE_LOG_FD
3650 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3651 lt_cv_path_mainfest_tool=yes
3652 fi
3653 rm -f conftest*])
3654 if test "x$lt_cv_path_mainfest_tool" != xyes; then
3655 MANIFEST_TOOL=:
3656 fi
3657 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3658 ])# _LT_PATH_MANIFEST_TOOL
3659
3660
3661 # LT_LIB_M
3662 # --------
3663 # check for math library
3664 AC_DEFUN([LT_LIB_M],
3665 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3666 LIBM=
3667 case $host in
3668 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3669 # These system don't have libm, or don't need it
3670 ;;
3671 *-ncr-sysv4.3*)
3672 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3673 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3674 ;;
3675 *)
3676 AC_CHECK_LIB(m, cos, LIBM="-lm")
3677 ;;
3678 esac
3679 AC_SUBST([LIBM])
3680 ])# LT_LIB_M
3681
3682 # Old name:
3683 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3684 dnl aclocal-1.4 backwards compatibility:
3685 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3686
3687
3688 # _LT_COMPILER_NO_RTTI([TAGNAME])
3689 # -------------------------------
3690 m4_defun([_LT_COMPILER_NO_RTTI],
3691 [m4_require([_LT_TAG_COMPILER])dnl
3692
3693 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3694
3695 if test "$GCC" = yes; then
3696 case $cc_basename in
3697 nvcc*)
3698 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3699 *)
3700 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3701 esac
3702
3703 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3704 lt_cv_prog_compiler_rtti_exceptions,
3705 [-fno-rtti -fno-exceptions], [],
3706 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3707 fi
3708 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3709 [Compiler flag to turn off builtin functions])
3710 ])# _LT_COMPILER_NO_RTTI
3711
3712
3713 # _LT_CMD_GLOBAL_SYMBOLS
3714 # ----------------------
3715 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3716 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3717 AC_REQUIRE([AC_PROG_CC])dnl
3718 AC_REQUIRE([AC_PROG_AWK])dnl
3719 AC_REQUIRE([LT_PATH_NM])dnl
3720 AC_REQUIRE([LT_PATH_LD])dnl
3721 m4_require([_LT_DECL_SED])dnl
3722 m4_require([_LT_DECL_EGREP])dnl
3723 m4_require([_LT_TAG_COMPILER])dnl
3724
3725 # Check for command to grab the raw symbol name followed by C symbol from nm.
3726 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3727 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3728 [
3729 # These are sane defaults that work on at least a few old systems.
3730 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3731
3732 # Character class describing NM global symbol codes.
3733 symcode='[[BCDEGRST]]'
3734
3735 # Regexp to match symbols that can be accessed directly from C.
3736 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3737
3738 # Define system-specific variables.
3739 case $host_os in
3740 aix*)
3741 symcode='[[BCDT]]'
3742 ;;
3743 cygwin* | mingw* | pw32* | cegcc*)
3744 symcode='[[ABCDGISTW]]'
3745 ;;
3746 hpux*)
3747 if test "$host_cpu" = ia64; then
3748 symcode='[[ABCDEGRST]]'
3749 fi
3750 ;;
3751 irix* | nonstopux*)
3752 symcode='[[BCDEGRST]]'
3753 ;;
3754 osf*)
3755 symcode='[[BCDEGQRST]]'
3756 ;;
3757 solaris*)
3758 symcode='[[BDRT]]'
3759 ;;
3760 sco3.2v5*)
3761 symcode='[[DT]]'
3762 ;;
3763 sysv4.2uw2*)
3764 symcode='[[DT]]'
3765 ;;
3766 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3767 symcode='[[ABDT]]'
3768 ;;
3769 sysv4)
3770 symcode='[[DFNSTU]]'
3771 ;;
3772 esac
3773
3774 # If we're using GNU nm, then use its standard symbol codes.
3775 case `$NM -V 2>&1` in
3776 *GNU* | *'with BFD'*)
3777 symcode='[[ABCDGIRSTW]]' ;;
3778 esac
3779
3780 # Transform an extracted symbol line into a proper C declaration.
3781 # Some systems (esp. on ia64) link data and code symbols differently,
3782 # so use this general approach.
3783 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3784
3785 # Transform an extracted symbol line into symbol name and symbol address
3786 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3787 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3788
3789 # Handle CRLF in mingw tool chain
3790 opt_cr=
3791 case $build_os in
3792 mingw*)
3793 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3794 ;;
3795 esac
3796
3797 # Try without a prefix underscore, then with it.
3798 for ac_symprfx in "" "_"; do
3799
3800 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3801 symxfrm="\\1 $ac_symprfx\\2 \\2"
3802
3803 # Write the raw and C identifiers.
3804 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3805 # Fake it for dumpbin and say T for any non-static function
3806 # and D for any global variable.
3807 # Also find C++ and __fastcall symbols from MSVC++,
3808 # which start with @ or ?.
3809 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3810 " {last_section=section; section=\$ 3};"\
3811 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
3812 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3813 " \$ 0!~/External *\|/{next};"\
3814 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3815 " {if(hide[section]) next};"\
3816 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3817 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3818 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3819 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3820 " ' prfx=^$ac_symprfx]"
3821 else
3822 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3823 fi
3824 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3825
3826 # Check to see that the pipe works correctly.
3827 pipe_works=no
3828
3829 rm -f conftest*
3830 cat > conftest.$ac_ext <<_LT_EOF
3831 #ifdef __cplusplus
3832 extern "C" {
3833 #endif
3834 char nm_test_var;
3835 void nm_test_func(void);
3836 void nm_test_func(void){}
3837 #ifdef __cplusplus
3838 }
3839 #endif
3840 int main(){nm_test_var='a';nm_test_func();return(0);}
3841 _LT_EOF
3842
3843 if AC_TRY_EVAL(ac_compile); then
3844 # Now try to grab the symbols.
3845 nlist=conftest.nm
3846 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3847 # Try sorting and uniquifying the output.
3848 if sort "$nlist" | uniq > "$nlist"T; then
3849 mv -f "$nlist"T "$nlist"
3850 else
3851 rm -f "$nlist"T
3852 fi
3853
3854 # Make sure that we snagged all the symbols we need.
3855 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3856 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3857 cat <<_LT_EOF > conftest.$ac_ext
3858 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3859 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3860 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3861 relocations are performed -- see ld's documentation on pseudo-relocs. */
3862 # define LT@&t@_DLSYM_CONST
3863 #elif defined(__osf__)
3864 /* This system does not cope well with relocations in const data. */
3865 # define LT@&t@_DLSYM_CONST
3866 #else
3867 # define LT@&t@_DLSYM_CONST const
3868 #endif
3869
3870 #ifdef __cplusplus
3871 extern "C" {
3872 #endif
3873
3874 _LT_EOF
3875 # Now generate the symbol file.
3876 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3877
3878 cat <<_LT_EOF >> conftest.$ac_ext
3879
3880 /* The mapping between symbol names and symbols. */
3881 LT@&t@_DLSYM_CONST struct {
3882 const char *name;
3883 void *address;
3884 }
3885 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3886 {
3887 { "@PROGRAM@", (void *) 0 },
3888 _LT_EOF
3889 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3890 cat <<\_LT_EOF >> conftest.$ac_ext
3891 {0, (void *) 0}
3892 };
3893
3894 /* This works around a problem in FreeBSD linker */
3895 #ifdef FREEBSD_WORKAROUND
3896 static const void *lt_preloaded_setup() {
3897 return lt__PROGRAM__LTX_preloaded_symbols;
3898 }
3899 #endif
3900
3901 #ifdef __cplusplus
3902 }
3903 #endif
3904 _LT_EOF
3905 # Now try linking the two files.
3906 mv conftest.$ac_objext conftstm.$ac_objext
3907 lt_globsym_save_LIBS=$LIBS
3908 lt_globsym_save_CFLAGS=$CFLAGS
3909 LIBS="conftstm.$ac_objext"
3910 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3911 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3912 pipe_works=yes
3913 fi
3914 LIBS=$lt_globsym_save_LIBS
3915 CFLAGS=$lt_globsym_save_CFLAGS
3916 else
3917 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3918 fi
3919 else
3920 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3921 fi
3922 else
3923 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3924 fi
3925 else
3926 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3927 cat conftest.$ac_ext >&5
3928 fi
3929 rm -rf conftest* conftst*
3930
3931 # Do not use the global_symbol_pipe unless it works.
3932 if test "$pipe_works" = yes; then
3933 break
3934 else
3935 lt_cv_sys_global_symbol_pipe=
3936 fi
3937 done
3938 ])
3939 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3940 lt_cv_sys_global_symbol_to_cdecl=
3941 fi
3942 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3943 AC_MSG_RESULT(failed)
3944 else
3945 AC_MSG_RESULT(ok)
3946 fi
3947
3948 # Response file support.
3949 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3950 nm_file_list_spec='@'
3951 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3952 nm_file_list_spec='@'
3953 fi
3954
3955 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3956 [Take the output of nm and produce a listing of raw symbols and C names])
3957 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3958 [Transform the output of nm in a proper C declaration])
3959 _LT_DECL([global_symbol_to_c_name_address],
3960 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3961 [Transform the output of nm in a C name address pair])
3962 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3963 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3964 [Transform the output of nm in a C name address pair when lib prefix is needed])
3965 _LT_DECL([], [nm_file_list_spec], [1],
3966 [Specify filename containing input files for $NM])
3967 ]) # _LT_CMD_GLOBAL_SYMBOLS
3968
3969
3970 # _LT_COMPILER_PIC([TAGNAME])
3971 # ---------------------------
3972 m4_defun([_LT_COMPILER_PIC],
3973 [m4_require([_LT_TAG_COMPILER])dnl
3974 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3975 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3976 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3977
3978 m4_if([$1], [CXX], [
3979 # C++ specific cases for pic, static, wl, etc.
3980 if test "$GXX" = yes; then
3981 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3982 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3983
3984 case $host_os in
3985 aix*)
3986 # All AIX code is PIC.
3987 if test "$host_cpu" = ia64; then
3988 # AIX 5 now supports IA64 processor
3989 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3990 fi
3991 ;;
3992
3993 amigaos*)
3994 case $host_cpu in
3995 powerpc)
3996 # see comment about AmigaOS4 .so support
3997 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3998 ;;
3999 m68k)
4000 # FIXME: we need at least 68020 code to build shared libraries, but
4001 # adding the `-m68020' flag to GCC prevents building anything better,
4002 # like `-m68040'.
4003 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4004 ;;
4005 esac
4006 ;;
4007
4008 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4009 # PIC is the default for these OSes.
4010 ;;
4011 mingw* | cygwin* | os2* | pw32* | cegcc*)
4012 # This hack is so that the source file can tell whether it is being
4013 # built for inclusion in a dll (and should export symbols for example).
4014 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4015 # (--disable-auto-import) libraries
4016 m4_if([$1], [GCJ], [],
4017 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4018 ;;
4019 darwin* | rhapsody*)
4020 # PIC is the default on this platform
4021 # Common symbols not allowed in MH_DYLIB files
4022 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4023 ;;
4024 *djgpp*)
4025 # DJGPP does not support shared libraries at all
4026 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4027 ;;
4028 haiku*)
4029 # PIC is the default for Haiku.
4030 # The "-static" flag exists, but is broken.
4031 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4032 ;;
4033 interix[[3-9]]*)
4034 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4035 # Instead, we relocate shared libraries at runtime.
4036 ;;
4037 sysv4*MP*)
4038 if test -d /usr/nec; then
4039 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4040 fi
4041 ;;
4042 hpux*)
4043 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4044 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4045 # sets the default TLS model and affects inlining.
4046 case $host_cpu in
4047 hppa*64*)
4048 ;;
4049 *)
4050 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4051 ;;
4052 esac
4053 ;;
4054 *qnx* | *nto*)
4055 # QNX uses GNU C++, but need to define -shared option too, otherwise
4056 # it will coredump.
4057 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4058 ;;
4059 *)
4060 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4061 ;;
4062 esac
4063 else
4064 case $host_os in
4065 aix[[4-9]]*)
4066 # All AIX code is PIC.
4067 if test "$host_cpu" = ia64; then
4068 # AIX 5 now supports IA64 processor
4069 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4070 else
4071 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4072 fi
4073 ;;
4074 chorus*)
4075 case $cc_basename in
4076 cxch68*)
4077 # Green Hills C++ Compiler
4078 # _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"
4079 ;;
4080 esac
4081 ;;
4082 mingw* | cygwin* | os2* | pw32* | cegcc*)
4083 # This hack is so that the source file can tell whether it is being
4084 # built for inclusion in a dll (and should export symbols for example).
4085 m4_if([$1], [GCJ], [],
4086 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4087 ;;
4088 dgux*)
4089 case $cc_basename in
4090 ec++*)
4091 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4092 ;;
4093 ghcx*)
4094 # Green Hills C++ Compiler
4095 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4096 ;;
4097 *)
4098 ;;
4099 esac
4100 ;;
4101 freebsd* | dragonfly*)
4102 # FreeBSD uses GNU C++
4103 ;;
4104 hpux9* | hpux10* | hpux11*)
4105 case $cc_basename in
4106 CC*)
4107 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4108 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4109 if test "$host_cpu" != ia64; then
4110 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4111 fi
4112 ;;
4113 aCC*)
4114 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4115 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4116 case $host_cpu in
4117 hppa*64*|ia64*)
4118 # +Z the default
4119 ;;
4120 *)
4121 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4122 ;;
4123 esac
4124 ;;
4125 *)
4126 ;;
4127 esac
4128 ;;
4129 interix*)
4130 # This is c89, which is MS Visual C++ (no shared libs)
4131 # Anyone wants to do a port?
4132 ;;
4133 irix5* | irix6* | nonstopux*)
4134 case $cc_basename in
4135 CC*)
4136 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4137 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4138 # CC pic flag -KPIC is the default.
4139 ;;
4140 *)
4141 ;;
4142 esac
4143 ;;
4144 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4145 case $cc_basename in
4146 KCC*)
4147 # KAI C++ Compiler
4148 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4149 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4150 ;;
4151 ecpc* )
4152 # old Intel C++ for x86_64 which still supported -KPIC.
4153 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4154 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4155 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4156 ;;
4157 icpc* )
4158 # Intel C++, used to be incompatible with GCC.
4159 # ICC 10 doesn't accept -KPIC any more.
4160 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4161 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4162 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4163 ;;
4164 pgCC* | pgcpp*)
4165 # Portland Group C++ compiler
4166 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4167 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4168 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4169 ;;
4170 cxx*)
4171 # Compaq C++
4172 # Make sure the PIC flag is empty. It appears that all Alpha
4173 # Linux and Compaq Tru64 Unix objects are PIC.
4174 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4175 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4176 ;;
4177 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4178 # IBM XL 8.0, 9.0 on PPC and BlueGene
4179 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4180 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4181 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4182 ;;
4183 *)
4184 case `$CC -V 2>&1 | sed 5q` in
4185 *Sun\ C*)
4186 # Sun C++ 5.9
4187 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4188 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4189 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4190 ;;
4191 esac
4192 ;;
4193 esac
4194 ;;
4195 lynxos*)
4196 ;;
4197 m88k*)
4198 ;;
4199 mvs*)
4200 case $cc_basename in
4201 cxx*)
4202 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4203 ;;
4204 *)
4205 ;;
4206 esac
4207 ;;
4208 netbsd*)
4209 ;;
4210 *qnx* | *nto*)
4211 # QNX uses GNU C++, but need to define -shared option too, otherwise
4212 # it will coredump.
4213 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4214 ;;
4215 osf3* | osf4* | osf5*)
4216 case $cc_basename in
4217 KCC*)
4218 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4219 ;;
4220 RCC*)
4221 # Rational C++ 2.4.1
4222 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4223 ;;
4224 cxx*)
4225 # Digital/Compaq C++
4226 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4227 # Make sure the PIC flag is empty. It appears that all Alpha
4228 # Linux and Compaq Tru64 Unix objects are PIC.
4229 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4230 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4231 ;;
4232 *)
4233 ;;
4234 esac
4235 ;;
4236 psos*)
4237 ;;
4238 solaris*)
4239 case $cc_basename in
4240 CC* | sunCC*)
4241 # Sun C++ 4.2, 5.x and Centerline C++
4242 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4243 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4244 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4245 ;;
4246 gcx*)
4247 # Green Hills C++ Compiler
4248 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4249 ;;
4250 *)
4251 ;;
4252 esac
4253 ;;
4254 sunos4*)
4255 case $cc_basename in
4256 CC*)
4257 # Sun C++ 4.x
4258 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4259 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4260 ;;
4261 lcc*)
4262 # Lucid
4263 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4264 ;;
4265 *)
4266 ;;
4267 esac
4268 ;;
4269 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4270 case $cc_basename in
4271 CC*)
4272 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4273 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4274 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4275 ;;
4276 esac
4277 ;;
4278 tandem*)
4279 case $cc_basename in
4280 NCC*)
4281 # NonStop-UX NCC 3.20
4282 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4283 ;;
4284 *)
4285 ;;
4286 esac
4287 ;;
4288 vxworks*)
4289 ;;
4290 *)
4291 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4292 ;;
4293 esac
4294 fi
4295 ],
4296 [
4297 if test "$GCC" = yes; then
4298 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4299 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4300
4301 case $host_os in
4302 aix*)
4303 # All AIX code is PIC.
4304 if test "$host_cpu" = ia64; then
4305 # AIX 5 now supports IA64 processor
4306 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4307 fi
4308 ;;
4309
4310 amigaos*)
4311 case $host_cpu in
4312 powerpc)
4313 # see comment about AmigaOS4 .so support
4314 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4315 ;;
4316 m68k)
4317 # FIXME: we need at least 68020 code to build shared libraries, but
4318 # adding the `-m68020' flag to GCC prevents building anything better,
4319 # like `-m68040'.
4320 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4321 ;;
4322 esac
4323 ;;
4324
4325 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4326 # PIC is the default for these OSes.
4327 ;;
4328
4329 mingw* | cygwin* | pw32* | os2* | cegcc*)
4330 # This hack is so that the source file can tell whether it is being
4331 # built for inclusion in a dll (and should export symbols for example).
4332 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4333 # (--disable-auto-import) libraries
4334 m4_if([$1], [GCJ], [],
4335 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4336 ;;
4337
4338 darwin* | rhapsody*)
4339 # PIC is the default on this platform
4340 # Common symbols not allowed in MH_DYLIB files
4341 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4342 ;;
4343
4344 haiku*)
4345 # PIC is the default for Haiku.
4346 # The "-static" flag exists, but is broken.
4347 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4348 ;;
4349
4350 hpux*)
4351 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4352 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4353 # sets the default TLS model and affects inlining.
4354 case $host_cpu in
4355 hppa*64*)
4356 # +Z the default
4357 ;;
4358 *)
4359 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4360 ;;
4361 esac
4362 ;;
4363
4364 interix[[3-9]]*)
4365 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4366 # Instead, we relocate shared libraries at runtime.
4367 ;;
4368
4369 msdosdjgpp*)
4370 # Just because we use GCC doesn't mean we suddenly get shared libraries
4371 # on systems that don't support them.
4372 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4373 enable_shared=no
4374 ;;
4375
4376 *nto* | *qnx*)
4377 # QNX uses GNU C++, but need to define -shared option too, otherwise
4378 # it will coredump.
4379 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4380 ;;
4381
4382 sysv4*MP*)
4383 if test -d /usr/nec; then
4384 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4385 fi
4386 ;;
4387
4388 *)
4389 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4390 ;;
4391 esac
4392
4393 case $cc_basename in
4394 nvcc*) # Cuda Compiler Driver 2.2
4395 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4396 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4397 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4398 fi
4399 ;;
4400 esac
4401 else
4402 # PORTME Check for flag to pass linker flags through the system compiler.
4403 case $host_os in
4404 aix*)
4405 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4406 if test "$host_cpu" = ia64; then
4407 # AIX 5 now supports IA64 processor
4408 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4409 else
4410 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4411 fi
4412 ;;
4413
4414 mingw* | cygwin* | pw32* | os2* | cegcc*)
4415 # This hack is so that the source file can tell whether it is being
4416 # built for inclusion in a dll (and should export symbols for example).
4417 m4_if([$1], [GCJ], [],
4418 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4419 ;;
4420
4421 hpux9* | hpux10* | hpux11*)
4422 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4423 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4424 # not for PA HP-UX.
4425 case $host_cpu in
4426 hppa*64*|ia64*)
4427 # +Z the default
4428 ;;
4429 *)
4430 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4431 ;;
4432 esac
4433 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4434 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4435 ;;
4436
4437 irix5* | irix6* | nonstopux*)
4438 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4439 # PIC (with -KPIC) is the default.
4440 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4441 ;;
4442
4443 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4444 case $cc_basename in
4445 # old Intel for x86_64 which still supported -KPIC.
4446 ecc*)
4447 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4448 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4449 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4450 ;;
4451 # icc used to be incompatible with GCC.
4452 # ICC 10 doesn't accept -KPIC any more.
4453 icc* | ifort*)
4454 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4455 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4456 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4457 ;;
4458 # Lahey Fortran 8.1.
4459 lf95*)
4460 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4461 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4462 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4463 ;;
4464 nagfor*)
4465 # NAG Fortran compiler
4466 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4467 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4468 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4469 ;;
4470 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4471 # Portland Group compilers (*not* the Pentium gcc compiler,
4472 # which looks to be a dead project)
4473 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4474 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4475 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4476 ;;
4477 ccc*)
4478 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4479 # All Alpha code is PIC.
4480 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4481 ;;
4482 xl* | bgxl* | bgf* | mpixl*)
4483 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4484 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4485 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4486 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4487 ;;
4488 *)
4489 case `$CC -V 2>&1 | sed 5q` in
4490 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4491 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4492 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4493 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4494 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4495 ;;
4496 *Sun\ F* | *Sun*Fortran*)
4497 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4498 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4499 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4500 ;;
4501 *Sun\ C*)
4502 # Sun C 5.9
4503 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4504 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4505 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4506 ;;
4507 *Intel*\ [[CF]]*Compiler*)
4508 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4509 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4510 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4511 ;;
4512 *Portland\ Group*)
4513 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4514 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4515 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4516 ;;
4517 esac
4518 ;;
4519 esac
4520 ;;
4521
4522 newsos6)
4523 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4524 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4525 ;;
4526
4527 *nto* | *qnx*)
4528 # QNX uses GNU C++, but need to define -shared option too, otherwise
4529 # it will coredump.
4530 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4531 ;;
4532
4533 osf3* | osf4* | osf5*)
4534 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4535 # All OSF/1 code is PIC.
4536 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4537 ;;
4538
4539 rdos*)
4540 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4541 ;;
4542
4543 solaris*)
4544 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4545 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4546 case $cc_basename in
4547 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4548 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4549 *)
4550 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4551 esac
4552 ;;
4553
4554 sunos4*)
4555 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4556 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4557 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4558 ;;
4559
4560 sysv4 | sysv4.2uw2* | sysv4.3*)
4561 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4562 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4563 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4564 ;;
4565
4566 sysv4*MP*)
4567 if test -d /usr/nec ;then
4568 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4569 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4570 fi
4571 ;;
4572
4573 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4574 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4575 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4576 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4577 ;;
4578
4579 unicos*)
4580 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4581 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4582 ;;
4583
4584 uts4*)
4585 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4586 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4587 ;;
4588
4589 *)
4590 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4591 ;;
4592 esac
4593 fi
4594 ])
4595 case $host_os in
4596 # For platforms which do not support PIC, -DPIC is meaningless:
4597 *djgpp*)
4598 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4599 ;;
4600 *)
4601 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4602 ;;
4603 esac
4604
4605 AC_CACHE_CHECK([for $compiler option to produce PIC],
4606 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4607 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4608 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4609
4610 #
4611 # Check to make sure the PIC flag actually works.
4612 #
4613 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4614 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4615 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4616 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4617 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4618 "" | " "*) ;;
4619 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4620 esac],
4621 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4622 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4623 fi
4624 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4625 [Additional compiler flags for building library objects])
4626
4627 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4628 [How to pass a linker flag through the compiler])
4629 #
4630 # Check to make sure the static flag actually works.
4631 #
4632 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4633 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4634 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4635 $lt_tmp_static_flag,
4636 [],
4637 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4638 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4639 [Compiler flag to prevent dynamic linking])
4640 ])# _LT_COMPILER_PIC
4641
4642
4643 # _LT_LINKER_SHLIBS([TAGNAME])
4644 # ----------------------------
4645 # See if the linker supports building shared libraries.
4646 m4_defun([_LT_LINKER_SHLIBS],
4647 [AC_REQUIRE([LT_PATH_LD])dnl
4648 AC_REQUIRE([LT_PATH_NM])dnl
4649 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4650 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4651 m4_require([_LT_DECL_EGREP])dnl
4652 m4_require([_LT_DECL_SED])dnl
4653 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4654 m4_require([_LT_TAG_COMPILER])dnl
4655 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4656 m4_if([$1], [CXX], [
4657 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4658 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4659 case $host_os in
4660 aix[[4-9]]*)
4661 # If we're using GNU nm, then we don't want the "-C" option.
4662 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4663 # Also, AIX nm treats weak defined symbols like other global defined
4664 # symbols, whereas GNU nm marks them as "W".
4665 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4666 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4667 else
4668 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4669 fi
4670 ;;
4671 pw32*)
4672 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4673 ;;
4674 cygwin* | mingw* | cegcc*)
4675 case $cc_basename in
4676 cl*)
4677 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4678 ;;
4679 *)
4680 _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'
4681 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4682 ;;
4683 esac
4684 ;;
4685 *)
4686 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4687 ;;
4688 esac
4689 ], [
4690 runpath_var=
4691 _LT_TAGVAR(allow_undefined_flag, $1)=
4692 _LT_TAGVAR(always_export_symbols, $1)=no
4693 _LT_TAGVAR(archive_cmds, $1)=
4694 _LT_TAGVAR(archive_expsym_cmds, $1)=
4695 _LT_TAGVAR(compiler_needs_object, $1)=no
4696 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4697 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4698 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4699 _LT_TAGVAR(hardcode_automatic, $1)=no
4700 _LT_TAGVAR(hardcode_direct, $1)=no
4701 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4702 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4703 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4704 _LT_TAGVAR(hardcode_minus_L, $1)=no
4705 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4706 _LT_TAGVAR(inherit_rpath, $1)=no
4707 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4708 _LT_TAGVAR(module_cmds, $1)=
4709 _LT_TAGVAR(module_expsym_cmds, $1)=
4710 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4711 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4712 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4713 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4714 # include_expsyms should be a list of space-separated symbols to be *always*
4715 # included in the symbol list
4716 _LT_TAGVAR(include_expsyms, $1)=
4717 # exclude_expsyms can be an extended regexp of symbols to exclude
4718 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4719 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4720 # as well as any symbol that contains `d'.
4721 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4722 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4723 # platforms (ab)use it in PIC code, but their linkers get confused if
4724 # the symbol is explicitly referenced. Since portable code cannot
4725 # rely on this symbol name, it's probably fine to never include it in
4726 # preloaded symbol tables.
4727 # Exclude shared library initialization/finalization symbols.
4728 dnl Note also adjust exclude_expsyms for C++ above.
4729 extract_expsyms_cmds=
4730
4731 case $host_os in
4732 cygwin* | mingw* | pw32* | cegcc*)
4733 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4734 # When not using gcc, we currently assume that we are using
4735 # Microsoft Visual C++.
4736 if test "$GCC" != yes; then
4737 with_gnu_ld=no
4738 fi
4739 ;;
4740 interix*)
4741 # we just hope/assume this is gcc and not c89 (= MSVC++)
4742 with_gnu_ld=yes
4743 ;;
4744 openbsd*)
4745 with_gnu_ld=no
4746 ;;
4747 esac
4748
4749 _LT_TAGVAR(ld_shlibs, $1)=yes
4750
4751 # On some targets, GNU ld is compatible enough with the native linker
4752 # that we're better off using the native interface for both.
4753 lt_use_gnu_ld_interface=no
4754 if test "$with_gnu_ld" = yes; then
4755 case $host_os in
4756 aix*)
4757 # The AIX port of GNU ld has always aspired to compatibility
4758 # with the native linker. However, as the warning in the GNU ld
4759 # block says, versions before 2.19.5* couldn't really create working
4760 # shared libraries, regardless of the interface used.
4761 case `$LD -v 2>&1` in
4762 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4763 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4764 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4765 *)
4766 lt_use_gnu_ld_interface=yes
4767 ;;
4768 esac
4769 ;;
4770 *)
4771 lt_use_gnu_ld_interface=yes
4772 ;;
4773 esac
4774 fi
4775
4776 if test "$lt_use_gnu_ld_interface" = yes; then
4777 # If archive_cmds runs LD, not CC, wlarc should be empty
4778 wlarc='${wl}'
4779
4780 # Set some defaults for GNU ld with shared library support. These
4781 # are reset later if shared libraries are not supported. Putting them
4782 # here allows them to be overridden if necessary.
4783 runpath_var=LD_RUN_PATH
4784 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4785 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4786 # ancient GNU ld didn't support --whole-archive et. al.
4787 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4788 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4789 else
4790 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4791 fi
4792 supports_anon_versioning=no
4793 case `$LD -v 2>&1` in
4794 *GNU\ gold*) supports_anon_versioning=yes ;;
4795 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4796 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4797 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4798 *\ 2.11.*) ;; # other 2.11 versions
4799 *) supports_anon_versioning=yes ;;
4800 esac
4801
4802 # See if GNU ld supports shared libraries.
4803 case $host_os in
4804 aix[[3-9]]*)
4805 # On AIX/PPC, the GNU linker is very broken
4806 if test "$host_cpu" != ia64; then
4807 _LT_TAGVAR(ld_shlibs, $1)=no
4808 cat <<_LT_EOF 1>&2
4809
4810 *** Warning: the GNU linker, at least up to release 2.19, is reported
4811 *** to be unable to reliably create shared libraries on AIX.
4812 *** Therefore, libtool is disabling shared libraries support. If you
4813 *** really care for shared libraries, you may want to install binutils
4814 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4815 *** You will then need to restart the configuration process.
4816
4817 _LT_EOF
4818 fi
4819 ;;
4820
4821 amigaos*)
4822 case $host_cpu in
4823 powerpc)
4824 # see comment about AmigaOS4 .so support
4825 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4826 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4827 ;;
4828 m68k)
4829 _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)'
4830 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4831 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4832 ;;
4833 esac
4834 ;;
4835
4836 beos*)
4837 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4838 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4839 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4840 # support --undefined. This deserves some investigation. FIXME
4841 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4842 else
4843 _LT_TAGVAR(ld_shlibs, $1)=no
4844 fi
4845 ;;
4846
4847 cygwin* | mingw* | pw32* | cegcc*)
4848 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4849 # as there is no search path for DLLs.
4850 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4851 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4852 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4853 _LT_TAGVAR(always_export_symbols, $1)=no
4854 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4855 _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'
4856 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4857
4858 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4859 _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'
4860 # If the export-symbols file already is a .def file (1st line
4861 # is EXPORTS), use it as is; otherwise, prepend...
4862 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4863 cp $export_symbols $output_objdir/$soname.def;
4864 else
4865 echo EXPORTS > $output_objdir/$soname.def;
4866 cat $export_symbols >> $output_objdir/$soname.def;
4867 fi~
4868 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4869 else
4870 _LT_TAGVAR(ld_shlibs, $1)=no
4871 fi
4872 ;;
4873
4874 haiku*)
4875 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4876 _LT_TAGVAR(link_all_deplibs, $1)=yes
4877 ;;
4878
4879 interix[[3-9]]*)
4880 _LT_TAGVAR(hardcode_direct, $1)=no
4881 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4882 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4883 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4884 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4885 # Instead, shared libraries are loaded at an image base (0x10000000 by
4886 # default) and relocated if they conflict, which is a slow very memory
4887 # consuming and fragmenting process. To avoid this, we pick a random,
4888 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4889 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4890 _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'
4891 _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'
4892 ;;
4893
4894 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4895 tmp_diet=no
4896 if test "$host_os" = linux-dietlibc; then
4897 case $cc_basename in
4898 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4899 esac
4900 fi
4901 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4902 && test "$tmp_diet" = no
4903 then
4904 tmp_addflag=' $pic_flag'
4905 tmp_sharedflag='-shared'
4906 case $cc_basename,$host_cpu in
4907 pgcc*) # Portland Group C compiler
4908 _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'
4909 tmp_addflag=' $pic_flag'
4910 ;;
4911 pgf77* | pgf90* | pgf95* | pgfortran*)
4912 # Portland Group f77 and f90 compilers
4913 _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'
4914 tmp_addflag=' $pic_flag -Mnomain' ;;
4915 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4916 tmp_addflag=' -i_dynamic' ;;
4917 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4918 tmp_addflag=' -i_dynamic -nofor_main' ;;
4919 ifc* | ifort*) # Intel Fortran compiler
4920 tmp_addflag=' -nofor_main' ;;
4921 lf95*) # Lahey Fortran 8.1
4922 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4923 tmp_sharedflag='--shared' ;;
4924 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4925 tmp_sharedflag='-qmkshrobj'
4926 tmp_addflag= ;;
4927 nvcc*) # Cuda Compiler Driver 2.2
4928 _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'
4929 _LT_TAGVAR(compiler_needs_object, $1)=yes
4930 ;;
4931 esac
4932 case `$CC -V 2>&1 | sed 5q` in
4933 *Sun\ C*) # Sun C 5.9
4934 _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'
4935 _LT_TAGVAR(compiler_needs_object, $1)=yes
4936 tmp_sharedflag='-G' ;;
4937 *Sun\ F*) # Sun Fortran 8.3
4938 tmp_sharedflag='-G' ;;
4939 esac
4940 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4941
4942 if test "x$supports_anon_versioning" = xyes; then
4943 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4944 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4945 echo "local: *; };" >> $output_objdir/$libname.ver~
4946 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4947 fi
4948
4949 case $cc_basename in
4950 xlf* | bgf* | bgxlf* | mpixlf*)
4951 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4952 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4953 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4954 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4955 if test "x$supports_anon_versioning" = xyes; then
4956 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4957 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4958 echo "local: *; };" >> $output_objdir/$libname.ver~
4959 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4960 fi
4961 ;;
4962 esac
4963 else
4964 _LT_TAGVAR(ld_shlibs, $1)=no
4965 fi
4966 ;;
4967
4968 netbsd*)
4969 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4970 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4971 wlarc=
4972 else
4973 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4974 _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'
4975 fi
4976 ;;
4977
4978 solaris*)
4979 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4980 _LT_TAGVAR(ld_shlibs, $1)=no
4981 cat <<_LT_EOF 1>&2
4982
4983 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4984 *** create shared libraries on Solaris systems. Therefore, libtool
4985 *** is disabling shared libraries support. We urge you to upgrade GNU
4986 *** binutils to release 2.9.1 or newer. Another option is to modify
4987 *** your PATH or compiler configuration so that the native linker is
4988 *** used, and then restart.
4989
4990 _LT_EOF
4991 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4992 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4993 _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'
4994 else
4995 _LT_TAGVAR(ld_shlibs, $1)=no
4996 fi
4997 ;;
4998
4999 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5000 case `$LD -v 2>&1` in
5001 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5002 _LT_TAGVAR(ld_shlibs, $1)=no
5003 cat <<_LT_EOF 1>&2
5004
5005 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5006 *** reliably create shared libraries on SCO systems. Therefore, libtool
5007 *** is disabling shared libraries support. We urge you to upgrade GNU
5008 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5009 *** your PATH or compiler configuration so that the native linker is
5010 *** used, and then restart.
5011
5012 _LT_EOF
5013 ;;
5014 *)
5015 # For security reasons, it is highly recommended that you always
5016 # use absolute paths for naming shared libraries, and exclude the
5017 # DT_RUNPATH tag from executables and libraries. But doing so
5018 # requires that you compile everything twice, which is a pain.
5019 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5020 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5021 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5022 _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'
5023 else
5024 _LT_TAGVAR(ld_shlibs, $1)=no
5025 fi
5026 ;;
5027 esac
5028 ;;
5029
5030 sunos4*)
5031 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5032 wlarc=
5033 _LT_TAGVAR(hardcode_direct, $1)=yes
5034 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5035 ;;
5036
5037 *)
5038 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5039 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5040 _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'
5041 else
5042 _LT_TAGVAR(ld_shlibs, $1)=no
5043 fi
5044 ;;
5045 esac
5046
5047 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5048 runpath_var=
5049 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5050 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5051 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5052 fi
5053 else
5054 # PORTME fill in a description of your system's linker (not GNU ld)
5055 case $host_os in
5056 aix3*)
5057 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5058 _LT_TAGVAR(always_export_symbols, $1)=yes
5059 _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'
5060 # Note: this linker hardcodes the directories in LIBPATH if there
5061 # are no directories specified by -L.
5062 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5063 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5064 # Neither direct hardcoding nor static linking is supported with a
5065 # broken collect2.
5066 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5067 fi
5068 ;;
5069
5070 aix[[4-9]]*)
5071 if test "$host_cpu" = ia64; then
5072 # On IA64, the linker does run time linking by default, so we don't
5073 # have to do anything special.
5074 aix_use_runtimelinking=no
5075 exp_sym_flag='-Bexport'
5076 no_entry_flag=""
5077 else
5078 # If we're using GNU nm, then we don't want the "-C" option.
5079 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5080 # Also, AIX nm treats weak defined symbols like other global
5081 # defined symbols, whereas GNU nm marks them as "W".
5082 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5083 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5084 else
5085 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5086 fi
5087 aix_use_runtimelinking=no
5088
5089 # Test if we are trying to use run time linking or normal
5090 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5091 # need to do runtime linking.
5092 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5093 for ld_flag in $LDFLAGS; do
5094 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5095 aix_use_runtimelinking=yes
5096 break
5097 fi
5098 done
5099 ;;
5100 esac
5101
5102 exp_sym_flag='-bexport'
5103 no_entry_flag='-bnoentry'
5104 fi
5105
5106 # When large executables or shared objects are built, AIX ld can
5107 # have problems creating the table of contents. If linking a library
5108 # or program results in "error TOC overflow" add -mminimal-toc to
5109 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5110 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5111
5112 _LT_TAGVAR(archive_cmds, $1)=''
5113 _LT_TAGVAR(hardcode_direct, $1)=yes
5114 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5115 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5116 _LT_TAGVAR(link_all_deplibs, $1)=yes
5117 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5118
5119 if test "$GCC" = yes; then
5120 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5121 # We only want to do this on AIX 4.2 and lower, the check
5122 # below for broken collect2 doesn't work under 4.3+
5123 collect2name=`${CC} -print-prog-name=collect2`
5124 if test -f "$collect2name" &&
5125 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5126 then
5127 # We have reworked collect2
5128 :
5129 else
5130 # We have old collect2
5131 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5132 # It fails to find uninstalled libraries when the uninstalled
5133 # path is not listed in the libpath. Setting hardcode_minus_L
5134 # to unsupported forces relinking
5135 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5136 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5137 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5138 fi
5139 ;;
5140 esac
5141 shared_flag='-shared'
5142 if test "$aix_use_runtimelinking" = yes; then
5143 shared_flag="$shared_flag "'${wl}-G'
5144 fi
5145 else
5146 # not using gcc
5147 if test "$host_cpu" = ia64; then
5148 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5149 # chokes on -Wl,-G. The following line is correct:
5150 shared_flag='-G'
5151 else
5152 if test "$aix_use_runtimelinking" = yes; then
5153 shared_flag='${wl}-G'
5154 else
5155 shared_flag='${wl}-bM:SRE'
5156 fi
5157 fi
5158 fi
5159
5160 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5161 # It seems that -bexpall does not export symbols beginning with
5162 # underscore (_), so it is better to generate a list of symbols to export.
5163 _LT_TAGVAR(always_export_symbols, $1)=yes
5164 if test "$aix_use_runtimelinking" = yes; then
5165 # Warning - without using the other runtime loading flags (-brtl),
5166 # -berok will link without error, but may produce a broken library.
5167 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5168 # Determine the default libpath from the value encoded in an
5169 # empty executable.
5170 _LT_SYS_MODULE_PATH_AIX([$1])
5171 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5172 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5173 else
5174 if test "$host_cpu" = ia64; then
5175 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5176 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5177 _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"
5178 else
5179 # Determine the default libpath from the value encoded in an
5180 # empty executable.
5181 _LT_SYS_MODULE_PATH_AIX([$1])
5182 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5183 # Warning - without using the other run time loading flags,
5184 # -berok will link without error, but may produce a broken library.
5185 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5186 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5187 if test "$with_gnu_ld" = yes; then
5188 # We only use this code for GNU lds that support --whole-archive.
5189 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5190 else
5191 # Exported symbols can be pulled into shared objects from archives
5192 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5193 fi
5194 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5195 # This is similar to how AIX traditionally builds its shared libraries.
5196 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5197 fi
5198 fi
5199 ;;
5200
5201 amigaos*)
5202 case $host_cpu in
5203 powerpc)
5204 # see comment about AmigaOS4 .so support
5205 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5206 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5207 ;;
5208 m68k)
5209 _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)'
5210 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5211 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5212 ;;
5213 esac
5214 ;;
5215
5216 bsdi[[45]]*)
5217 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5218 ;;
5219
5220 cygwin* | mingw* | pw32* | cegcc*)
5221 # When not using gcc, we currently assume that we are using
5222 # Microsoft Visual C++.
5223 # hardcode_libdir_flag_spec is actually meaningless, as there is
5224 # no search path for DLLs.
5225 case $cc_basename in
5226 cl*)
5227 # Native MSVC
5228 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5229 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5230 _LT_TAGVAR(always_export_symbols, $1)=yes
5231 _LT_TAGVAR(file_list_spec, $1)='@'
5232 # Tell ltmain to make .lib files, not .a files.
5233 libext=lib
5234 # Tell ltmain to make .dll files, not .so files.
5235 shrext_cmds=".dll"
5236 # FIXME: Setting linknames here is a bad hack.
5237 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5238 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5239 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5240 else
5241 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5242 fi~
5243 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5244 linknames='
5245 # The linker will not automatically build a static lib if we build a DLL.
5246 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5247 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5248 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5249 _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'
5250 # Don't use ranlib
5251 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5252 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5253 lt_tool_outputfile="@TOOL_OUTPUT@"~
5254 case $lt_outputfile in
5255 *.exe|*.EXE) ;;
5256 *)
5257 lt_outputfile="$lt_outputfile.exe"
5258 lt_tool_outputfile="$lt_tool_outputfile.exe"
5259 ;;
5260 esac~
5261 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5262 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5263 $RM "$lt_outputfile.manifest";
5264 fi'
5265 ;;
5266 *)
5267 # Assume MSVC wrapper
5268 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5269 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5270 # Tell ltmain to make .lib files, not .a files.
5271 libext=lib
5272 # Tell ltmain to make .dll files, not .so files.
5273 shrext_cmds=".dll"
5274 # FIXME: Setting linknames here is a bad hack.
5275 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5276 # The linker will automatically build a .lib file if we build a DLL.
5277 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5278 # FIXME: Should let the user specify the lib program.
5279 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5280 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5281 ;;
5282 esac
5283 ;;
5284
5285 darwin* | rhapsody*)
5286 _LT_DARWIN_LINKER_FEATURES($1)
5287 ;;
5288
5289 dgux*)
5290 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5291 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5292 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5293 ;;
5294
5295 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5296 # support. Future versions do this automatically, but an explicit c++rt0.o
5297 # does not break anything, and helps significantly (at the cost of a little
5298 # extra space).
5299 freebsd2.2*)
5300 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5301 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5302 _LT_TAGVAR(hardcode_direct, $1)=yes
5303 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5304 ;;
5305
5306 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5307 freebsd2.*)
5308 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5309 _LT_TAGVAR(hardcode_direct, $1)=yes
5310 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5311 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5312 ;;
5313
5314 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5315 freebsd* | dragonfly*)
5316 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5317 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5318 _LT_TAGVAR(hardcode_direct, $1)=yes
5319 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5320 ;;
5321
5322 hpux9*)
5323 if test "$GCC" = yes; then
5324 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5325 else
5326 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5327 fi
5328 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5329 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5330 _LT_TAGVAR(hardcode_direct, $1)=yes
5331
5332 # hardcode_minus_L: Not really in the search PATH,
5333 # but as the default location of the library.
5334 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5335 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5336 ;;
5337
5338 hpux10*)
5339 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5340 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5341 else
5342 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5343 fi
5344 if test "$with_gnu_ld" = no; then
5345 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5346 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5347 _LT_TAGVAR(hardcode_direct, $1)=yes
5348 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5349 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5350 # hardcode_minus_L: Not really in the search PATH,
5351 # but as the default location of the library.
5352 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5353 fi
5354 ;;
5355
5356 hpux11*)
5357 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5358 case $host_cpu in
5359 hppa*64*)
5360 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5361 ;;
5362 ia64*)
5363 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5364 ;;
5365 *)
5366 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5367 ;;
5368 esac
5369 else
5370 case $host_cpu in
5371 hppa*64*)
5372 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5373 ;;
5374 ia64*)
5375 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5376 ;;
5377 *)
5378 m4_if($1, [], [
5379 # Older versions of the 11.00 compiler do not understand -b yet
5380 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5381 _LT_LINKER_OPTION([if $CC understands -b],
5382 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5383 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5384 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5385 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5386 ;;
5387 esac
5388 fi
5389 if test "$with_gnu_ld" = no; then
5390 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5391 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5392
5393 case $host_cpu in
5394 hppa*64*|ia64*)
5395 _LT_TAGVAR(hardcode_direct, $1)=no
5396 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5397 ;;
5398 *)
5399 _LT_TAGVAR(hardcode_direct, $1)=yes
5400 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5401 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5402
5403 # hardcode_minus_L: Not really in the search PATH,
5404 # but as the default location of the library.
5405 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5406 ;;
5407 esac
5408 fi
5409 ;;
5410
5411 irix5* | irix6* | nonstopux*)
5412 if test "$GCC" = yes; then
5413 _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'
5414 # Try to use the -exported_symbol ld option, if it does not
5415 # work, assume that -exports_file does not work either and
5416 # implicitly export all symbols.
5417 # This should be the same for all languages, so no per-tag cache variable.
5418 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5419 [lt_cv_irix_exported_symbol],
5420 [save_LDFLAGS="$LDFLAGS"
5421 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5422 AC_LINK_IFELSE(
5423 [AC_LANG_SOURCE(
5424 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5425 [C++], [[int foo (void) { return 0; }]],
5426 [Fortran 77], [[
5427 subroutine foo
5428 end]],
5429 [Fortran], [[
5430 subroutine foo
5431 end]])])],
5432 [lt_cv_irix_exported_symbol=yes],
5433 [lt_cv_irix_exported_symbol=no])
5434 LDFLAGS="$save_LDFLAGS"])
5435 if test "$lt_cv_irix_exported_symbol" = yes; then
5436 _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'
5437 fi
5438 else
5439 _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'
5440 _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'
5441 fi
5442 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5443 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5444 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5445 _LT_TAGVAR(inherit_rpath, $1)=yes
5446 _LT_TAGVAR(link_all_deplibs, $1)=yes
5447 ;;
5448
5449 netbsd*)
5450 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5451 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5452 else
5453 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5454 fi
5455 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5456 _LT_TAGVAR(hardcode_direct, $1)=yes
5457 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5458 ;;
5459
5460 newsos6)
5461 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5462 _LT_TAGVAR(hardcode_direct, $1)=yes
5463 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5464 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5465 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5466 ;;
5467
5468 *nto* | *qnx*)
5469 ;;
5470
5471 openbsd*)
5472 if test -f /usr/libexec/ld.so; then
5473 _LT_TAGVAR(hardcode_direct, $1)=yes
5474 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5475 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5476 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5477 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5478 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5479 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5480 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5481 else
5482 case $host_os in
5483 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5484 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5485 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5486 ;;
5487 *)
5488 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5489 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5490 ;;
5491 esac
5492 fi
5493 else
5494 _LT_TAGVAR(ld_shlibs, $1)=no
5495 fi
5496 ;;
5497
5498 os2*)
5499 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5500 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5501 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5502 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5503 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5504 ;;
5505
5506 osf3*)
5507 if test "$GCC" = yes; then
5508 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5509 _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'
5510 else
5511 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5512 _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'
5513 fi
5514 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5515 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5516 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5517 ;;
5518
5519 osf4* | osf5*) # as osf3* with the addition of -msym flag
5520 if test "$GCC" = yes; then
5521 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5522 _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'
5523 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5524 else
5525 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5526 _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'
5527 _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~
5528 $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'
5529
5530 # Both c and cxx compiler support -rpath directly
5531 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5532 fi
5533 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5534 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5535 ;;
5536
5537 solaris*)
5538 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5539 if test "$GCC" = yes; then
5540 wlarc='${wl}'
5541 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5542 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5543 $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'
5544 else
5545 case `$CC -V 2>&1` in
5546 *"Compilers 5.0"*)
5547 wlarc=''
5548 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5549 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5550 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5551 ;;
5552 *)
5553 wlarc='${wl}'
5554 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5555 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5556 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5557 ;;
5558 esac
5559 fi
5560 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5561 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5562 case $host_os in
5563 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5564 *)
5565 # The compiler driver will combine and reorder linker options,
5566 # but understands `-z linker_flag'. GCC discards it without `$wl',
5567 # but is careful enough not to reorder.
5568 # Supported since Solaris 2.6 (maybe 2.5.1?)
5569 if test "$GCC" = yes; then
5570 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5571 else
5572 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5573 fi
5574 ;;
5575 esac
5576 _LT_TAGVAR(link_all_deplibs, $1)=yes
5577 ;;
5578
5579 sunos4*)
5580 if test "x$host_vendor" = xsequent; then
5581 # Use $CC to link under sequent, because it throws in some extra .o
5582 # files that make .init and .fini sections work.
5583 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5584 else
5585 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5586 fi
5587 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5588 _LT_TAGVAR(hardcode_direct, $1)=yes
5589 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5590 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5591 ;;
5592
5593 sysv4)
5594 case $host_vendor in
5595 sni)
5596 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5597 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5598 ;;
5599 siemens)
5600 ## LD is ld it makes a PLAMLIB
5601 ## CC just makes a GrossModule.
5602 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5603 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5604 _LT_TAGVAR(hardcode_direct, $1)=no
5605 ;;
5606 motorola)
5607 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5608 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5609 ;;
5610 esac
5611 runpath_var='LD_RUN_PATH'
5612 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5613 ;;
5614
5615 sysv4.3*)
5616 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5617 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5618 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5619 ;;
5620
5621 sysv4*MP*)
5622 if test -d /usr/nec; then
5623 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5624 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5625 runpath_var=LD_RUN_PATH
5626 hardcode_runpath_var=yes
5627 _LT_TAGVAR(ld_shlibs, $1)=yes
5628 fi
5629 ;;
5630
5631 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5632 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5633 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5634 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5635 runpath_var='LD_RUN_PATH'
5636
5637 if test "$GCC" = yes; then
5638 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5639 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5640 else
5641 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5642 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5643 fi
5644 ;;
5645
5646 sysv5* | sco3.2v5* | sco5v6*)
5647 # Note: We can NOT use -z defs as we might desire, because we do not
5648 # link with -lc, and that would cause any symbols used from libc to
5649 # always be unresolved, which means just about no library would
5650 # ever link correctly. If we're not using GNU ld we use -z text
5651 # though, which does catch some bad symbols but isn't as heavy-handed
5652 # as -z defs.
5653 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5654 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5655 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5656 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5657 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5658 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5659 _LT_TAGVAR(link_all_deplibs, $1)=yes
5660 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5661 runpath_var='LD_RUN_PATH'
5662
5663 if test "$GCC" = yes; then
5664 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5665 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5666 else
5667 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5668 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5669 fi
5670 ;;
5671
5672 uts4*)
5673 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5674 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5675 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5676 ;;
5677
5678 *)
5679 _LT_TAGVAR(ld_shlibs, $1)=no
5680 ;;
5681 esac
5682
5683 if test x$host_vendor = xsni; then
5684 case $host in
5685 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5686 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5687 ;;
5688 esac
5689 fi
5690 fi
5691 ])
5692 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5693 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5694
5695 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5696
5697 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5698 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5699 _LT_DECL([], [extract_expsyms_cmds], [2],
5700 [The commands to extract the exported symbol list from a shared archive])
5701
5702 #
5703 # Do we need to explicitly link libc?
5704 #
5705 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5706 x|xyes)
5707 # Assume -lc should be added
5708 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5709
5710 if test "$enable_shared" = yes && test "$GCC" = yes; then
5711 case $_LT_TAGVAR(archive_cmds, $1) in
5712 *'~'*)
5713 # FIXME: we may have to deal with multi-command sequences.
5714 ;;
5715 '$CC '*)
5716 # Test whether the compiler implicitly links with -lc since on some
5717 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5718 # to ld, don't add -lc before -lgcc.
5719 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5720 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5721 [$RM conftest*
5722 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5723
5724 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5725 soname=conftest
5726 lib=conftest
5727 libobjs=conftest.$ac_objext
5728 deplibs=
5729 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5730 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5731 compiler_flags=-v
5732 linker_flags=-v
5733 verstring=
5734 output_objdir=.
5735 libname=conftest
5736 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5737 _LT_TAGVAR(allow_undefined_flag, $1)=
5738 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5739 then
5740 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5741 else
5742 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5743 fi
5744 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5745 else
5746 cat conftest.err 1>&5
5747 fi
5748 $RM conftest*
5749 ])
5750 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5751 ;;
5752 esac
5753 fi
5754 ;;
5755 esac
5756
5757 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5758 [Whether or not to add -lc for building shared libraries])
5759 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5760 [enable_shared_with_static_runtimes], [0],
5761 [Whether or not to disallow shared libs when runtime libs are static])
5762 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5763 [Compiler flag to allow reflexive dlopens])
5764 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5765 [Compiler flag to generate shared objects directly from archives])
5766 _LT_TAGDECL([], [compiler_needs_object], [1],
5767 [Whether the compiler copes with passing no objects directly])
5768 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5769 [Create an old-style archive from a shared archive])
5770 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5771 [Create a temporary old-style archive to link instead of a shared archive])
5772 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5773 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5774 _LT_TAGDECL([], [module_cmds], [2],
5775 [Commands used to build a loadable module if different from building
5776 a shared archive.])
5777 _LT_TAGDECL([], [module_expsym_cmds], [2])
5778 _LT_TAGDECL([], [with_gnu_ld], [1],
5779 [Whether we are building with GNU ld or not])
5780 _LT_TAGDECL([], [allow_undefined_flag], [1],
5781 [Flag that allows shared libraries with undefined symbols to be built])
5782 _LT_TAGDECL([], [no_undefined_flag], [1],
5783 [Flag that enforces no undefined symbols])
5784 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5785 [Flag to hardcode $libdir into a binary during linking.
5786 This must work even if $libdir does not exist])
5787 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5788 [Whether we need a single "-rpath" flag with a separated argument])
5789 _LT_TAGDECL([], [hardcode_direct], [0],
5790 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5791 DIR into the resulting binary])
5792 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5793 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5794 DIR into the resulting binary and the resulting library dependency is
5795 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5796 library is relocated])
5797 _LT_TAGDECL([], [hardcode_minus_L], [0],
5798 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5799 into the resulting binary])
5800 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5801 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5802 into the resulting binary])
5803 _LT_TAGDECL([], [hardcode_automatic], [0],
5804 [Set to "yes" if building a shared library automatically hardcodes DIR
5805 into the library and all subsequent libraries and executables linked
5806 against it])
5807 _LT_TAGDECL([], [inherit_rpath], [0],
5808 [Set to yes if linker adds runtime paths of dependent libraries
5809 to runtime path list])
5810 _LT_TAGDECL([], [link_all_deplibs], [0],
5811 [Whether libtool must link a program against all its dependency libraries])
5812 _LT_TAGDECL([], [always_export_symbols], [0],
5813 [Set to "yes" if exported symbols are required])
5814 _LT_TAGDECL([], [export_symbols_cmds], [2],
5815 [The commands to list exported symbols])
5816 _LT_TAGDECL([], [exclude_expsyms], [1],
5817 [Symbols that should not be listed in the preloaded symbols])
5818 _LT_TAGDECL([], [include_expsyms], [1],
5819 [Symbols that must always be exported])
5820 _LT_TAGDECL([], [prelink_cmds], [2],
5821 [Commands necessary for linking programs (against libraries) with templates])
5822 _LT_TAGDECL([], [postlink_cmds], [2],
5823 [Commands necessary for finishing linking programs])
5824 _LT_TAGDECL([], [file_list_spec], [1],
5825 [Specify filename containing input files])
5826 dnl FIXME: Not yet implemented
5827 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5828 dnl [Compiler flag to generate thread safe objects])
5829 ])# _LT_LINKER_SHLIBS
5830
5831
5832 # _LT_LANG_C_CONFIG([TAG])
5833 # ------------------------
5834 # Ensure that the configuration variables for a C compiler are suitably
5835 # defined. These variables are subsequently used by _LT_CONFIG to write
5836 # the compiler configuration to `libtool'.
5837 m4_defun([_LT_LANG_C_CONFIG],
5838 [m4_require([_LT_DECL_EGREP])dnl
5839 lt_save_CC="$CC"
5840 AC_LANG_PUSH(C)
5841
5842 # Source file extension for C test sources.
5843 ac_ext=c
5844
5845 # Object file extension for compiled C test sources.
5846 objext=o
5847 _LT_TAGVAR(objext, $1)=$objext
5848
5849 # Code to be used in simple compile tests
5850 lt_simple_compile_test_code="int some_variable = 0;"
5851
5852 # Code to be used in simple link tests
5853 lt_simple_link_test_code='int main(){return(0);}'
5854
5855 _LT_TAG_COMPILER
5856 # Save the default compiler, since it gets overwritten when the other
5857 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5858 compiler_DEFAULT=$CC
5859
5860 # save warnings/boilerplate of simple test code
5861 _LT_COMPILER_BOILERPLATE
5862 _LT_LINKER_BOILERPLATE
5863
5864 if test -n "$compiler"; then
5865 _LT_COMPILER_NO_RTTI($1)
5866 _LT_COMPILER_PIC($1)
5867 _LT_COMPILER_C_O($1)
5868 _LT_COMPILER_FILE_LOCKS($1)
5869 _LT_LINKER_SHLIBS($1)
5870 _LT_SYS_DYNAMIC_LINKER($1)
5871 _LT_LINKER_HARDCODE_LIBPATH($1)
5872 LT_SYS_DLOPEN_SELF
5873 _LT_CMD_STRIPLIB
5874
5875 # Report which library types will actually be built
5876 AC_MSG_CHECKING([if libtool supports shared libraries])
5877 AC_MSG_RESULT([$can_build_shared])
5878
5879 AC_MSG_CHECKING([whether to build shared libraries])
5880 test "$can_build_shared" = "no" && enable_shared=no
5881
5882 # On AIX, shared libraries and static libraries use the same namespace, and
5883 # are all built from PIC.
5884 case $host_os in
5885 aix3*)
5886 test "$enable_shared" = yes && enable_static=no
5887 if test -n "$RANLIB"; then
5888 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5889 postinstall_cmds='$RANLIB $lib'
5890 fi
5891 ;;
5892
5893 aix[[4-9]]*)
5894 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5895 test "$enable_shared" = yes && enable_static=no
5896 fi
5897 ;;
5898 esac
5899 AC_MSG_RESULT([$enable_shared])
5900
5901 AC_MSG_CHECKING([whether to build static libraries])
5902 # Make sure either enable_shared or enable_static is yes.
5903 test "$enable_shared" = yes || enable_static=yes
5904 AC_MSG_RESULT([$enable_static])
5905
5906 _LT_CONFIG($1)
5907 fi
5908 AC_LANG_POP
5909 CC="$lt_save_CC"
5910 ])# _LT_LANG_C_CONFIG
5911
5912
5913 # _LT_LANG_CXX_CONFIG([TAG])
5914 # --------------------------
5915 # Ensure that the configuration variables for a C++ compiler are suitably
5916 # defined. These variables are subsequently used by _LT_CONFIG to write
5917 # the compiler configuration to `libtool'.
5918 m4_defun([_LT_LANG_CXX_CONFIG],
5919 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5920 m4_require([_LT_DECL_EGREP])dnl
5921 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5922 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5923 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5924 (test "X$CXX" != "Xg++"))) ; then
5925 AC_PROG_CXXCPP
5926 else
5927 _lt_caught_CXX_error=yes
5928 fi
5929
5930 AC_LANG_PUSH(C++)
5931 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5932 _LT_TAGVAR(allow_undefined_flag, $1)=
5933 _LT_TAGVAR(always_export_symbols, $1)=no
5934 _LT_TAGVAR(archive_expsym_cmds, $1)=
5935 _LT_TAGVAR(compiler_needs_object, $1)=no
5936 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5937 _LT_TAGVAR(hardcode_direct, $1)=no
5938 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5939 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5940 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5941 _LT_TAGVAR(hardcode_minus_L, $1)=no
5942 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5943 _LT_TAGVAR(hardcode_automatic, $1)=no
5944 _LT_TAGVAR(inherit_rpath, $1)=no
5945 _LT_TAGVAR(module_cmds, $1)=
5946 _LT_TAGVAR(module_expsym_cmds, $1)=
5947 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5948 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5949 _LT_TAGVAR(reload_flag, $1)=$reload_flag
5950 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5951 _LT_TAGVAR(no_undefined_flag, $1)=
5952 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5953 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5954
5955 # Source file extension for C++ test sources.
5956 ac_ext=cpp
5957
5958 # Object file extension for compiled C++ test sources.
5959 objext=o
5960 _LT_TAGVAR(objext, $1)=$objext
5961
5962 # No sense in running all these tests if we already determined that
5963 # the CXX compiler isn't working. Some variables (like enable_shared)
5964 # are currently assumed to apply to all compilers on this platform,
5965 # and will be corrupted by setting them based on a non-working compiler.
5966 if test "$_lt_caught_CXX_error" != yes; then
5967 # Code to be used in simple compile tests
5968 lt_simple_compile_test_code="int some_variable = 0;"
5969
5970 # Code to be used in simple link tests
5971 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5972
5973 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5974 _LT_TAG_COMPILER
5975
5976 # save warnings/boilerplate of simple test code
5977 _LT_COMPILER_BOILERPLATE
5978 _LT_LINKER_BOILERPLATE
5979
5980 # Allow CC to be a program name with arguments.
5981 lt_save_CC=$CC
5982 lt_save_CFLAGS=$CFLAGS
5983 lt_save_LD=$LD
5984 lt_save_GCC=$GCC
5985 GCC=$GXX
5986 lt_save_with_gnu_ld=$with_gnu_ld
5987 lt_save_path_LD=$lt_cv_path_LD
5988 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5989 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5990 else
5991 $as_unset lt_cv_prog_gnu_ld
5992 fi
5993 if test -n "${lt_cv_path_LDCXX+set}"; then
5994 lt_cv_path_LD=$lt_cv_path_LDCXX
5995 else
5996 $as_unset lt_cv_path_LD
5997 fi
5998 test -z "${LDCXX+set}" || LD=$LDCXX
5999 CC=${CXX-"c++"}
6000 CFLAGS=$CXXFLAGS
6001 compiler=$CC
6002 _LT_TAGVAR(compiler, $1)=$CC
6003 _LT_CC_BASENAME([$compiler])
6004
6005 if test -n "$compiler"; then
6006 # We don't want -fno-exception when compiling C++ code, so set the
6007 # no_builtin_flag separately
6008 if test "$GXX" = yes; then
6009 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6010 else
6011 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6012 fi
6013
6014 if test "$GXX" = yes; then
6015 # Set up default GNU C++ configuration
6016
6017 LT_PATH_LD
6018
6019 # Check if GNU C++ uses GNU ld as the underlying linker, since the
6020 # archiving commands below assume that GNU ld is being used.
6021 if test "$with_gnu_ld" = yes; then
6022 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6023 _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'
6024
6025 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6026 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6027
6028 # If archive_cmds runs LD, not CC, wlarc should be empty
6029 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6030 # investigate it a little bit more. (MM)
6031 wlarc='${wl}'
6032
6033 # ancient GNU ld didn't support --whole-archive et. al.
6034 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6035 $GREP 'no-whole-archive' > /dev/null; then
6036 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6037 else
6038 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6039 fi
6040 else
6041 with_gnu_ld=no
6042 wlarc=
6043
6044 # A generic and very simple default shared library creation
6045 # command for GNU C++ for the case where it uses the native
6046 # linker, instead of GNU ld. If possible, this setting should
6047 # overridden to take advantage of the native linker features on
6048 # the platform it is being used on.
6049 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6050 fi
6051
6052 # Commands to make compiler produce verbose output that lists
6053 # what "hidden" libraries, object files and flags are used when
6054 # linking a shared library.
6055 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6056
6057 else
6058 GXX=no
6059 with_gnu_ld=no
6060 wlarc=
6061 fi
6062
6063 # PORTME: fill in a description of your system's C++ link characteristics
6064 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6065 _LT_TAGVAR(ld_shlibs, $1)=yes
6066 case $host_os in
6067 aix3*)
6068 # FIXME: insert proper C++ library support
6069 _LT_TAGVAR(ld_shlibs, $1)=no
6070 ;;
6071 aix[[4-9]]*)
6072 if test "$host_cpu" = ia64; then
6073 # On IA64, the linker does run time linking by default, so we don't
6074 # have to do anything special.
6075 aix_use_runtimelinking=no
6076 exp_sym_flag='-Bexport'
6077 no_entry_flag=""
6078 else
6079 aix_use_runtimelinking=no
6080
6081 # Test if we are trying to use run time linking or normal
6082 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6083 # need to do runtime linking.
6084 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6085 for ld_flag in $LDFLAGS; do
6086 case $ld_flag in
6087 *-brtl*)
6088 aix_use_runtimelinking=yes
6089 break
6090 ;;
6091 esac
6092 done
6093 ;;
6094 esac
6095
6096 exp_sym_flag='-bexport'
6097 no_entry_flag='-bnoentry'
6098 fi
6099
6100 # When large executables or shared objects are built, AIX ld can
6101 # have problems creating the table of contents. If linking a library
6102 # or program results in "error TOC overflow" add -mminimal-toc to
6103 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6104 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6105
6106 _LT_TAGVAR(archive_cmds, $1)=''
6107 _LT_TAGVAR(hardcode_direct, $1)=yes
6108 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6109 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6110 _LT_TAGVAR(link_all_deplibs, $1)=yes
6111 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6112
6113 if test "$GXX" = yes; then
6114 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6115 # We only want to do this on AIX 4.2 and lower, the check
6116 # below for broken collect2 doesn't work under 4.3+
6117 collect2name=`${CC} -print-prog-name=collect2`
6118 if test -f "$collect2name" &&
6119 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6120 then
6121 # We have reworked collect2
6122 :
6123 else
6124 # We have old collect2
6125 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6126 # It fails to find uninstalled libraries when the uninstalled
6127 # path is not listed in the libpath. Setting hardcode_minus_L
6128 # to unsupported forces relinking
6129 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6130 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6131 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6132 fi
6133 esac
6134 shared_flag='-shared'
6135 if test "$aix_use_runtimelinking" = yes; then
6136 shared_flag="$shared_flag "'${wl}-G'
6137 fi
6138 else
6139 # not using gcc
6140 if test "$host_cpu" = ia64; then
6141 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6142 # chokes on -Wl,-G. The following line is correct:
6143 shared_flag='-G'
6144 else
6145 if test "$aix_use_runtimelinking" = yes; then
6146 shared_flag='${wl}-G'
6147 else
6148 shared_flag='${wl}-bM:SRE'
6149 fi
6150 fi
6151 fi
6152
6153 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6154 # It seems that -bexpall does not export symbols beginning with
6155 # underscore (_), so it is better to generate a list of symbols to
6156 # export.
6157 _LT_TAGVAR(always_export_symbols, $1)=yes
6158 if test "$aix_use_runtimelinking" = yes; then
6159 # Warning - without using the other runtime loading flags (-brtl),
6160 # -berok will link without error, but may produce a broken library.
6161 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6162 # Determine the default libpath from the value encoded in an empty
6163 # executable.
6164 _LT_SYS_MODULE_PATH_AIX([$1])
6165 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6166
6167 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6168 else
6169 if test "$host_cpu" = ia64; then
6170 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6171 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6172 _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"
6173 else
6174 # Determine the default libpath from the value encoded in an
6175 # empty executable.
6176 _LT_SYS_MODULE_PATH_AIX([$1])
6177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6178 # Warning - without using the other run time loading flags,
6179 # -berok will link without error, but may produce a broken library.
6180 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6181 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6182 if test "$with_gnu_ld" = yes; then
6183 # We only use this code for GNU lds that support --whole-archive.
6184 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6185 else
6186 # Exported symbols can be pulled into shared objects from archives
6187 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6188 fi
6189 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6190 # This is similar to how AIX traditionally builds its shared
6191 # libraries.
6192 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6193 fi
6194 fi
6195 ;;
6196
6197 beos*)
6198 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6199 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6200 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6201 # support --undefined. This deserves some investigation. FIXME
6202 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6203 else
6204 _LT_TAGVAR(ld_shlibs, $1)=no
6205 fi
6206 ;;
6207
6208 chorus*)
6209 case $cc_basename in
6210 *)
6211 # FIXME: insert proper C++ library support
6212 _LT_TAGVAR(ld_shlibs, $1)=no
6213 ;;
6214 esac
6215 ;;
6216
6217 cygwin* | mingw* | pw32* | cegcc*)
6218 case $GXX,$cc_basename in
6219 ,cl* | no,cl*)
6220 # Native MSVC
6221 # hardcode_libdir_flag_spec is actually meaningless, as there is
6222 # no search path for DLLs.
6223 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6224 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6225 _LT_TAGVAR(always_export_symbols, $1)=yes
6226 _LT_TAGVAR(file_list_spec, $1)='@'
6227 # Tell ltmain to make .lib files, not .a files.
6228 libext=lib
6229 # Tell ltmain to make .dll files, not .so files.
6230 shrext_cmds=".dll"
6231 # FIXME: Setting linknames here is a bad hack.
6232 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6233 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6234 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6235 else
6236 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6237 fi~
6238 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6239 linknames='
6240 # The linker will not automatically build a static lib if we build a DLL.
6241 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6242 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6243 # Don't use ranlib
6244 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6245 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6246 lt_tool_outputfile="@TOOL_OUTPUT@"~
6247 case $lt_outputfile in
6248 *.exe|*.EXE) ;;
6249 *)
6250 lt_outputfile="$lt_outputfile.exe"
6251 lt_tool_outputfile="$lt_tool_outputfile.exe"
6252 ;;
6253 esac~
6254 func_to_tool_file "$lt_outputfile"~
6255 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6256 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6257 $RM "$lt_outputfile.manifest";
6258 fi'
6259 ;;
6260 *)
6261 # g++
6262 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6263 # as there is no search path for DLLs.
6264 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6265 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6266 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6267 _LT_TAGVAR(always_export_symbols, $1)=no
6268 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6269
6270 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6271 _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'
6272 # If the export-symbols file already is a .def file (1st line
6273 # is EXPORTS), use it as is; otherwise, prepend...
6274 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6275 cp $export_symbols $output_objdir/$soname.def;
6276 else
6277 echo EXPORTS > $output_objdir/$soname.def;
6278 cat $export_symbols >> $output_objdir/$soname.def;
6279 fi~
6280 $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'
6281 else
6282 _LT_TAGVAR(ld_shlibs, $1)=no
6283 fi
6284 ;;
6285 esac
6286 ;;
6287 darwin* | rhapsody*)
6288 _LT_DARWIN_LINKER_FEATURES($1)
6289 ;;
6290
6291 dgux*)
6292 case $cc_basename in
6293 ec++*)
6294 # FIXME: insert proper C++ library support
6295 _LT_TAGVAR(ld_shlibs, $1)=no
6296 ;;
6297 ghcx*)
6298 # Green Hills C++ Compiler
6299 # FIXME: insert proper C++ library support
6300 _LT_TAGVAR(ld_shlibs, $1)=no
6301 ;;
6302 *)
6303 # FIXME: insert proper C++ library support
6304 _LT_TAGVAR(ld_shlibs, $1)=no
6305 ;;
6306 esac
6307 ;;
6308
6309 freebsd2.*)
6310 # C++ shared libraries reported to be fairly broken before
6311 # switch to ELF
6312 _LT_TAGVAR(ld_shlibs, $1)=no
6313 ;;
6314
6315 freebsd-elf*)
6316 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6317 ;;
6318
6319 freebsd* | dragonfly*)
6320 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6321 # conventions
6322 _LT_TAGVAR(ld_shlibs, $1)=yes
6323 ;;
6324
6325 gnu*)
6326 ;;
6327
6328 haiku*)
6329 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6330 _LT_TAGVAR(link_all_deplibs, $1)=yes
6331 ;;
6332
6333 hpux9*)
6334 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6335 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6336 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6337 _LT_TAGVAR(hardcode_direct, $1)=yes
6338 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6339 # but as the default
6340 # location of the library.
6341
6342 case $cc_basename in
6343 CC*)
6344 # FIXME: insert proper C++ library support
6345 _LT_TAGVAR(ld_shlibs, $1)=no
6346 ;;
6347 aCC*)
6348 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6349 # Commands to make compiler produce verbose output that lists
6350 # what "hidden" libraries, object files and flags are used when
6351 # linking a shared library.
6352 #
6353 # There doesn't appear to be a way to prevent this compiler from
6354 # explicitly linking system object files so we need to strip them
6355 # from the output so that they don't get included in the library
6356 # dependencies.
6357 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"'
6358 ;;
6359 *)
6360 if test "$GXX" = yes; then
6361 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6362 else
6363 # FIXME: insert proper C++ library support
6364 _LT_TAGVAR(ld_shlibs, $1)=no
6365 fi
6366 ;;
6367 esac
6368 ;;
6369
6370 hpux10*|hpux11*)
6371 if test $with_gnu_ld = no; then
6372 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6373 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6374
6375 case $host_cpu in
6376 hppa*64*|ia64*)
6377 ;;
6378 *)
6379 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6380 ;;
6381 esac
6382 fi
6383 case $host_cpu in
6384 hppa*64*|ia64*)
6385 _LT_TAGVAR(hardcode_direct, $1)=no
6386 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6387 ;;
6388 *)
6389 _LT_TAGVAR(hardcode_direct, $1)=yes
6390 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6391 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6392 # but as the default
6393 # location of the library.
6394 ;;
6395 esac
6396
6397 case $cc_basename in
6398 CC*)
6399 # FIXME: insert proper C++ library support
6400 _LT_TAGVAR(ld_shlibs, $1)=no
6401 ;;
6402 aCC*)
6403 case $host_cpu in
6404 hppa*64*)
6405 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6406 ;;
6407 ia64*)
6408 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6409 ;;
6410 *)
6411 _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'
6412 ;;
6413 esac
6414 # Commands to make compiler produce verbose output that lists
6415 # what "hidden" libraries, object files and flags are used when
6416 # linking a shared library.
6417 #
6418 # There doesn't appear to be a way to prevent this compiler from
6419 # explicitly linking system object files so we need to strip them
6420 # from the output so that they don't get included in the library
6421 # dependencies.
6422 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"'
6423 ;;
6424 *)
6425 if test "$GXX" = yes; then
6426 if test $with_gnu_ld = no; then
6427 case $host_cpu in
6428 hppa*64*)
6429 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6430 ;;
6431 ia64*)
6432 _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'
6433 ;;
6434 *)
6435 _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'
6436 ;;
6437 esac
6438 fi
6439 else
6440 # FIXME: insert proper C++ library support
6441 _LT_TAGVAR(ld_shlibs, $1)=no
6442 fi
6443 ;;
6444 esac
6445 ;;
6446
6447 interix[[3-9]]*)
6448 _LT_TAGVAR(hardcode_direct, $1)=no
6449 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6450 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6451 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6452 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6453 # Instead, shared libraries are loaded at an image base (0x10000000 by
6454 # default) and relocated if they conflict, which is a slow very memory
6455 # consuming and fragmenting process. To avoid this, we pick a random,
6456 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6457 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6458 _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'
6459 _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'
6460 ;;
6461 irix5* | irix6*)
6462 case $cc_basename in
6463 CC*)
6464 # SGI C++
6465 _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'
6466
6467 # Archives containing C++ object files must be created using
6468 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6469 # necessary to make sure instantiated templates are included
6470 # in the archive.
6471 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6472 ;;
6473 *)
6474 if test "$GXX" = yes; then
6475 if test "$with_gnu_ld" = no; then
6476 _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'
6477 else
6478 _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'
6479 fi
6480 fi
6481 _LT_TAGVAR(link_all_deplibs, $1)=yes
6482 ;;
6483 esac
6484 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6485 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6486 _LT_TAGVAR(inherit_rpath, $1)=yes
6487 ;;
6488
6489 linux* | k*bsd*-gnu | kopensolaris*-gnu)
6490 case $cc_basename in
6491 KCC*)
6492 # Kuck and Associates, Inc. (KAI) C++ Compiler
6493
6494 # KCC will only create a shared library if the output file
6495 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6496 # to its proper name (with version) after linking.
6497 _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'
6498 _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'
6499 # Commands to make compiler produce verbose output that lists
6500 # what "hidden" libraries, object files and flags are used when
6501 # linking a shared library.
6502 #
6503 # There doesn't appear to be a way to prevent this compiler from
6504 # explicitly linking system object files so we need to strip them
6505 # from the output so that they don't get included in the library
6506 # dependencies.
6507 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"'
6508
6509 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6510 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6511
6512 # Archives containing C++ object files must be created using
6513 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6514 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6515 ;;
6516 icpc* | ecpc* )
6517 # Intel C++
6518 with_gnu_ld=yes
6519 # version 8.0 and above of icpc choke on multiply defined symbols
6520 # if we add $predep_objects and $postdep_objects, however 7.1 and
6521 # earlier do not add the objects themselves.
6522 case `$CC -V 2>&1` in
6523 *"Version 7."*)
6524 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6525 _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'
6526 ;;
6527 *) # Version 8.0 or newer
6528 tmp_idyn=
6529 case $host_cpu in
6530 ia64*) tmp_idyn=' -i_dynamic';;
6531 esac
6532 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6533 _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'
6534 ;;
6535 esac
6536 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6537 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6538 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6539 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6540 ;;
6541 pgCC* | pgcpp*)
6542 # Portland Group C++ compiler
6543 case `$CC -V` in
6544 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6545 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6546 rm -rf $tpldir~
6547 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6548 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6549 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6550 rm -rf $tpldir~
6551 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6552 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6553 $RANLIB $oldlib'
6554 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6555 rm -rf $tpldir~
6556 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6557 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6558 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6559 rm -rf $tpldir~
6560 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6561 $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'
6562 ;;
6563 *) # Version 6 and above use weak symbols
6564 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6565 _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'
6566 ;;
6567 esac
6568
6569 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6570 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6571 _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'
6572 ;;
6573 cxx*)
6574 # Compaq C++
6575 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6576 _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'
6577
6578 runpath_var=LD_RUN_PATH
6579 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6580 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6581
6582 # Commands to make compiler produce verbose output that lists
6583 # what "hidden" libraries, object files and flags are used when
6584 # linking a shared library.
6585 #
6586 # There doesn't appear to be a way to prevent this compiler from
6587 # explicitly linking system object files so we need to strip them
6588 # from the output so that they don't get included in the library
6589 # dependencies.
6590 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'
6591 ;;
6592 xl* | mpixl* | bgxl*)
6593 # IBM XL 8.0 on PPC, with GNU ld
6594 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6595 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6596 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6597 if test "x$supports_anon_versioning" = xyes; then
6598 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6599 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6600 echo "local: *; };" >> $output_objdir/$libname.ver~
6601 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6602 fi
6603 ;;
6604 *)
6605 case `$CC -V 2>&1 | sed 5q` in
6606 *Sun\ C*)
6607 # Sun C++ 5.9
6608 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6609 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6610 _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'
6611 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6612 _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'
6613 _LT_TAGVAR(compiler_needs_object, $1)=yes
6614
6615 # Not sure whether something based on
6616 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6617 # would be better.
6618 output_verbose_link_cmd='func_echo_all'
6619
6620 # Archives containing C++ object files must be created using
6621 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6622 # necessary to make sure instantiated templates are included
6623 # in the archive.
6624 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6625 ;;
6626 esac
6627 ;;
6628 esac
6629 ;;
6630
6631 lynxos*)
6632 # FIXME: insert proper C++ library support
6633 _LT_TAGVAR(ld_shlibs, $1)=no
6634 ;;
6635
6636 m88k*)
6637 # FIXME: insert proper C++ library support
6638 _LT_TAGVAR(ld_shlibs, $1)=no
6639 ;;
6640
6641 mvs*)
6642 case $cc_basename in
6643 cxx*)
6644 # FIXME: insert proper C++ library support
6645 _LT_TAGVAR(ld_shlibs, $1)=no
6646 ;;
6647 *)
6648 # FIXME: insert proper C++ library support
6649 _LT_TAGVAR(ld_shlibs, $1)=no
6650 ;;
6651 esac
6652 ;;
6653
6654 netbsd*)
6655 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6656 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6657 wlarc=
6658 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6659 _LT_TAGVAR(hardcode_direct, $1)=yes
6660 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6661 fi
6662 # Workaround some broken pre-1.5 toolchains
6663 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6664 ;;
6665
6666 *nto* | *qnx*)
6667 _LT_TAGVAR(ld_shlibs, $1)=yes
6668 ;;
6669
6670 openbsd2*)
6671 # C++ shared libraries are fairly broken
6672 _LT_TAGVAR(ld_shlibs, $1)=no
6673 ;;
6674
6675 openbsd*)
6676 if test -f /usr/libexec/ld.so; then
6677 _LT_TAGVAR(hardcode_direct, $1)=yes
6678 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6679 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6680 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6681 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6682 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6683 _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'
6684 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6685 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6686 fi
6687 output_verbose_link_cmd=func_echo_all
6688 else
6689 _LT_TAGVAR(ld_shlibs, $1)=no
6690 fi
6691 ;;
6692
6693 osf3* | osf4* | osf5*)
6694 case $cc_basename in
6695 KCC*)
6696 # Kuck and Associates, Inc. (KAI) C++ Compiler
6697
6698 # KCC will only create a shared library if the output file
6699 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6700 # to its proper name (with version) after linking.
6701 _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'
6702
6703 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6704 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6705
6706 # Archives containing C++ object files must be created using
6707 # the KAI C++ compiler.
6708 case $host in
6709 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6710 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6711 esac
6712 ;;
6713 RCC*)
6714 # Rational C++ 2.4.1
6715 # FIXME: insert proper C++ library support
6716 _LT_TAGVAR(ld_shlibs, $1)=no
6717 ;;
6718 cxx*)
6719 case $host in
6720 osf3*)
6721 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6722 _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'
6723 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6724 ;;
6725 *)
6726 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6727 _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'
6728 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6729 echo "-hidden">> $lib.exp~
6730 $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~
6731 $RM $lib.exp'
6732 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6733 ;;
6734 esac
6735
6736 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6737
6738 # Commands to make compiler produce verbose output that lists
6739 # what "hidden" libraries, object files and flags are used when
6740 # linking a shared library.
6741 #
6742 # There doesn't appear to be a way to prevent this compiler from
6743 # explicitly linking system object files so we need to strip them
6744 # from the output so that they don't get included in the library
6745 # dependencies.
6746 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"'
6747 ;;
6748 *)
6749 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6750 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6751 case $host in
6752 osf3*)
6753 _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'
6754 ;;
6755 *)
6756 _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'
6757 ;;
6758 esac
6759
6760 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6761 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6762
6763 # Commands to make compiler produce verbose output that lists
6764 # what "hidden" libraries, object files and flags are used when
6765 # linking a shared library.
6766 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6767
6768 else
6769 # FIXME: insert proper C++ library support
6770 _LT_TAGVAR(ld_shlibs, $1)=no
6771 fi
6772 ;;
6773 esac
6774 ;;
6775
6776 psos*)
6777 # FIXME: insert proper C++ library support
6778 _LT_TAGVAR(ld_shlibs, $1)=no
6779 ;;
6780
6781 sunos4*)
6782 case $cc_basename in
6783 CC*)
6784 # Sun C++ 4.x
6785 # FIXME: insert proper C++ library support
6786 _LT_TAGVAR(ld_shlibs, $1)=no
6787 ;;
6788 lcc*)
6789 # Lucid
6790 # FIXME: insert proper C++ library support
6791 _LT_TAGVAR(ld_shlibs, $1)=no
6792 ;;
6793 *)
6794 # FIXME: insert proper C++ library support
6795 _LT_TAGVAR(ld_shlibs, $1)=no
6796 ;;
6797 esac
6798 ;;
6799
6800 solaris*)
6801 case $cc_basename in
6802 CC* | sunCC*)
6803 # Sun C++ 4.2, 5.x and Centerline C++
6804 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6805 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6806 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6807 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6808 $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'
6809
6810 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6811 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6812 case $host_os in
6813 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6814 *)
6815 # The compiler driver will combine and reorder linker options,
6816 # but understands `-z linker_flag'.
6817 # Supported since Solaris 2.6 (maybe 2.5.1?)
6818 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6819 ;;
6820 esac
6821 _LT_TAGVAR(link_all_deplibs, $1)=yes
6822
6823 output_verbose_link_cmd='func_echo_all'
6824
6825 # Archives containing C++ object files must be created using
6826 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6827 # necessary to make sure instantiated templates are included
6828 # in the archive.
6829 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6830 ;;
6831 gcx*)
6832 # Green Hills C++ Compiler
6833 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6834
6835 # The C++ compiler must be used to create the archive.
6836 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6837 ;;
6838 *)
6839 # GNU C++ compiler with Solaris linker
6840 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6841 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6842 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6844 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6845 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6846
6847 # Commands to make compiler produce verbose output that lists
6848 # what "hidden" libraries, object files and flags are used when
6849 # linking a shared library.
6850 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6851 else
6852 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6853 # platform.
6854 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6855 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6856 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6857
6858 # Commands to make compiler produce verbose output that lists
6859 # what "hidden" libraries, object files and flags are used when
6860 # linking a shared library.
6861 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6862 fi
6863
6864 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6865 case $host_os in
6866 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6867 *)
6868 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6869 ;;
6870 esac
6871 fi
6872 ;;
6873 esac
6874 ;;
6875
6876 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6877 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6878 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6879 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6880 runpath_var='LD_RUN_PATH'
6881
6882 case $cc_basename in
6883 CC*)
6884 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6885 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6886 ;;
6887 *)
6888 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6889 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6890 ;;
6891 esac
6892 ;;
6893
6894 sysv5* | sco3.2v5* | sco5v6*)
6895 # Note: We can NOT use -z defs as we might desire, because we do not
6896 # link with -lc, and that would cause any symbols used from libc to
6897 # always be unresolved, which means just about no library would
6898 # ever link correctly. If we're not using GNU ld we use -z text
6899 # though, which does catch some bad symbols but isn't as heavy-handed
6900 # as -z defs.
6901 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6902 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6903 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6904 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6905 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6906 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6907 _LT_TAGVAR(link_all_deplibs, $1)=yes
6908 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6909 runpath_var='LD_RUN_PATH'
6910
6911 case $cc_basename in
6912 CC*)
6913 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6914 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6915 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6916 '"$_LT_TAGVAR(old_archive_cmds, $1)"
6917 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6918 '"$_LT_TAGVAR(reload_cmds, $1)"
6919 ;;
6920 *)
6921 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6922 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6923 ;;
6924 esac
6925 ;;
6926
6927 tandem*)
6928 case $cc_basename in
6929 NCC*)
6930 # NonStop-UX NCC 3.20
6931 # FIXME: insert proper C++ library support
6932 _LT_TAGVAR(ld_shlibs, $1)=no
6933 ;;
6934 *)
6935 # FIXME: insert proper C++ library support
6936 _LT_TAGVAR(ld_shlibs, $1)=no
6937 ;;
6938 esac
6939 ;;
6940
6941 vxworks*)
6942 # FIXME: insert proper C++ library support
6943 _LT_TAGVAR(ld_shlibs, $1)=no
6944 ;;
6945
6946 *)
6947 # FIXME: insert proper C++ library support
6948 _LT_TAGVAR(ld_shlibs, $1)=no
6949 ;;
6950 esac
6951
6952 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6953 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6954
6955 _LT_TAGVAR(GCC, $1)="$GXX"
6956 _LT_TAGVAR(LD, $1)="$LD"
6957
6958 ## CAVEAT EMPTOR:
6959 ## There is no encapsulation within the following macros, do not change
6960 ## the running order or otherwise move them around unless you know exactly
6961 ## what you are doing...
6962 _LT_SYS_HIDDEN_LIBDEPS($1)
6963 _LT_COMPILER_PIC($1)
6964 _LT_COMPILER_C_O($1)
6965 _LT_COMPILER_FILE_LOCKS($1)
6966 _LT_LINKER_SHLIBS($1)
6967 _LT_SYS_DYNAMIC_LINKER($1)
6968 _LT_LINKER_HARDCODE_LIBPATH($1)
6969
6970 _LT_CONFIG($1)
6971 fi # test -n "$compiler"
6972
6973 CC=$lt_save_CC
6974 CFLAGS=$lt_save_CFLAGS
6975 LDCXX=$LD
6976 LD=$lt_save_LD
6977 GCC=$lt_save_GCC
6978 with_gnu_ld=$lt_save_with_gnu_ld
6979 lt_cv_path_LDCXX=$lt_cv_path_LD
6980 lt_cv_path_LD=$lt_save_path_LD
6981 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6982 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6983 fi # test "$_lt_caught_CXX_error" != yes
6984
6985 AC_LANG_POP
6986 ])# _LT_LANG_CXX_CONFIG
6987
6988
6989 # _LT_FUNC_STRIPNAME_CNF
6990 # ----------------------
6991 # func_stripname_cnf prefix suffix name
6992 # strip PREFIX and SUFFIX off of NAME.
6993 # PREFIX and SUFFIX must not contain globbing or regex special
6994 # characters, hashes, percent signs, but SUFFIX may contain a leading
6995 # dot (in which case that matches only a dot).
6996 #
6997 # This function is identical to the (non-XSI) version of func_stripname,
6998 # except this one can be used by m4 code that may be executed by configure,
6999 # rather than the libtool script.
7000 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7001 AC_REQUIRE([_LT_DECL_SED])
7002 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7003 func_stripname_cnf ()
7004 {
7005 case ${2} in
7006 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7007 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7008 esac
7009 } # func_stripname_cnf
7010 ])# _LT_FUNC_STRIPNAME_CNF
7011
7012 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7013 # ---------------------------------
7014 # Figure out "hidden" library dependencies from verbose
7015 # compiler output when linking a shared library.
7016 # Parse the compiler output and extract the necessary
7017 # objects, libraries and library flags.
7018 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7019 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7020 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7021 # Dependencies to place before and after the object being linked:
7022 _LT_TAGVAR(predep_objects, $1)=
7023 _LT_TAGVAR(postdep_objects, $1)=
7024 _LT_TAGVAR(predeps, $1)=
7025 _LT_TAGVAR(postdeps, $1)=
7026 _LT_TAGVAR(compiler_lib_search_path, $1)=
7027
7028 dnl we can't use the lt_simple_compile_test_code here,
7029 dnl because it contains code intended for an executable,
7030 dnl not a library. It's possible we should let each
7031 dnl tag define a new lt_????_link_test_code variable,
7032 dnl but it's only used here...
7033 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7034 int a;
7035 void foo (void) { a = 0; }
7036 _LT_EOF
7037 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7038 class Foo
7039 {
7040 public:
7041 Foo (void) { a = 0; }
7042 private:
7043 int a;
7044 };
7045 _LT_EOF
7046 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7047 subroutine foo
7048 implicit none
7049 integer*4 a
7050 a=0
7051 return
7052 end
7053 _LT_EOF
7054 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7055 subroutine foo
7056 implicit none
7057 integer a
7058 a=0
7059 return
7060 end
7061 _LT_EOF
7062 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7063 public class foo {
7064 private int a;
7065 public void bar (void) {
7066 a = 0;
7067 }
7068 };
7069 _LT_EOF
7070 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7071 package foo
7072 func foo() {
7073 }
7074 _LT_EOF
7075 ])
7076
7077 _lt_libdeps_save_CFLAGS=$CFLAGS
7078 case "$CC $CFLAGS " in #(
7079 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7080 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7081 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7082 esac
7083
7084 dnl Parse the compiler output and extract the necessary
7085 dnl objects, libraries and library flags.
7086 if AC_TRY_EVAL(ac_compile); then
7087 # Parse the compiler output and extract the necessary
7088 # objects, libraries and library flags.
7089
7090 # Sentinel used to keep track of whether or not we are before
7091 # the conftest object file.
7092 pre_test_object_deps_done=no
7093
7094 for p in `eval "$output_verbose_link_cmd"`; do
7095 case ${prev}${p} in
7096
7097 -L* | -R* | -l*)
7098 # Some compilers place space between "-{L,R}" and the path.
7099 # Remove the space.
7100 if test $p = "-L" ||
7101 test $p = "-R"; then
7102 prev=$p
7103 continue
7104 fi
7105
7106 # Expand the sysroot to ease extracting the directories later.
7107 if test -z "$prev"; then
7108 case $p in
7109 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7110 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7111 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7112 esac
7113 fi
7114 case $p in
7115 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7116 esac
7117 if test "$pre_test_object_deps_done" = no; then
7118 case ${prev} in
7119 -L | -R)
7120 # Internal compiler library paths should come after those
7121 # provided the user. The postdeps already come after the
7122 # user supplied libs so there is no need to process them.
7123 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7124 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7125 else
7126 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7127 fi
7128 ;;
7129 # The "-l" case would never come before the object being
7130 # linked, so don't bother handling this case.
7131 esac
7132 else
7133 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7134 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7135 else
7136 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7137 fi
7138 fi
7139 prev=
7140 ;;
7141
7142 *.lto.$objext) ;; # Ignore GCC LTO objects
7143 *.$objext)
7144 # This assumes that the test object file only shows up
7145 # once in the compiler output.
7146 if test "$p" = "conftest.$objext"; then
7147 pre_test_object_deps_done=yes
7148 continue
7149 fi
7150
7151 if test "$pre_test_object_deps_done" = no; then
7152 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7153 _LT_TAGVAR(predep_objects, $1)="$p"
7154 else
7155 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7156 fi
7157 else
7158 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7159 _LT_TAGVAR(postdep_objects, $1)="$p"
7160 else
7161 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7162 fi
7163 fi
7164 ;;
7165
7166 *) ;; # Ignore the rest.
7167
7168 esac
7169 done
7170
7171 # Clean up.
7172 rm -f a.out a.exe
7173 else
7174 echo "libtool.m4: error: problem compiling $1 test program"
7175 fi
7176
7177 $RM -f confest.$objext
7178 CFLAGS=$_lt_libdeps_save_CFLAGS
7179
7180 # PORTME: override above test on systems where it is broken
7181 m4_if([$1], [CXX],
7182 [case $host_os in
7183 interix[[3-9]]*)
7184 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7185 # hack all around it, let's just trust "g++" to DTRT.
7186 _LT_TAGVAR(predep_objects,$1)=
7187 _LT_TAGVAR(postdep_objects,$1)=
7188 _LT_TAGVAR(postdeps,$1)=
7189 ;;
7190
7191 linux*)
7192 case `$CC -V 2>&1 | sed 5q` in
7193 *Sun\ C*)
7194 # Sun C++ 5.9
7195
7196 # The more standards-conforming stlport4 library is
7197 # incompatible with the Cstd library. Avoid specifying
7198 # it if it's in CXXFLAGS. Ignore libCrun as
7199 # -library=stlport4 depends on it.
7200 case " $CXX $CXXFLAGS " in
7201 *" -library=stlport4 "*)
7202 solaris_use_stlport4=yes
7203 ;;
7204 esac
7205
7206 if test "$solaris_use_stlport4" != yes; then
7207 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7208 fi
7209 ;;
7210 esac
7211 ;;
7212
7213 solaris*)
7214 case $cc_basename in
7215 CC* | sunCC*)
7216 # The more standards-conforming stlport4 library is
7217 # incompatible with the Cstd library. Avoid specifying
7218 # it if it's in CXXFLAGS. Ignore libCrun as
7219 # -library=stlport4 depends on it.
7220 case " $CXX $CXXFLAGS " in
7221 *" -library=stlport4 "*)
7222 solaris_use_stlport4=yes
7223 ;;
7224 esac
7225
7226 # Adding this requires a known-good setup of shared libraries for
7227 # Sun compiler versions before 5.6, else PIC objects from an old
7228 # archive will be linked into the output, leading to subtle bugs.
7229 if test "$solaris_use_stlport4" != yes; then
7230 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7231 fi
7232 ;;
7233 esac
7234 ;;
7235 esac
7236 ])
7237
7238 case " $_LT_TAGVAR(postdeps, $1) " in
7239 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7240 esac
7241 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7242 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7243 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7244 fi
7245 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7246 [The directories searched by this compiler when creating a shared library])
7247 _LT_TAGDECL([], [predep_objects], [1],
7248 [Dependencies to place before and after the objects being linked to
7249 create a shared library])
7250 _LT_TAGDECL([], [postdep_objects], [1])
7251 _LT_TAGDECL([], [predeps], [1])
7252 _LT_TAGDECL([], [postdeps], [1])
7253 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7254 [The library search path used internally by the compiler when linking
7255 a shared library])
7256 ])# _LT_SYS_HIDDEN_LIBDEPS
7257
7258
7259 # _LT_LANG_F77_CONFIG([TAG])
7260 # --------------------------
7261 # Ensure that the configuration variables for a Fortran 77 compiler are
7262 # suitably defined. These variables are subsequently used by _LT_CONFIG
7263 # to write the compiler configuration to `libtool'.
7264 m4_defun([_LT_LANG_F77_CONFIG],
7265 [AC_LANG_PUSH(Fortran 77)
7266 if test -z "$F77" || test "X$F77" = "Xno"; then
7267 _lt_disable_F77=yes
7268 fi
7269
7270 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7271 _LT_TAGVAR(allow_undefined_flag, $1)=
7272 _LT_TAGVAR(always_export_symbols, $1)=no
7273 _LT_TAGVAR(archive_expsym_cmds, $1)=
7274 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7275 _LT_TAGVAR(hardcode_direct, $1)=no
7276 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7277 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7278 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7279 _LT_TAGVAR(hardcode_minus_L, $1)=no
7280 _LT_TAGVAR(hardcode_automatic, $1)=no
7281 _LT_TAGVAR(inherit_rpath, $1)=no
7282 _LT_TAGVAR(module_cmds, $1)=
7283 _LT_TAGVAR(module_expsym_cmds, $1)=
7284 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7285 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7286 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7287 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7288 _LT_TAGVAR(no_undefined_flag, $1)=
7289 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7290 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7291
7292 # Source file extension for f77 test sources.
7293 ac_ext=f
7294
7295 # Object file extension for compiled f77 test sources.
7296 objext=o
7297 _LT_TAGVAR(objext, $1)=$objext
7298
7299 # No sense in running all these tests if we already determined that
7300 # the F77 compiler isn't working. Some variables (like enable_shared)
7301 # are currently assumed to apply to all compilers on this platform,
7302 # and will be corrupted by setting them based on a non-working compiler.
7303 if test "$_lt_disable_F77" != yes; then
7304 # Code to be used in simple compile tests
7305 lt_simple_compile_test_code="\
7306 subroutine t
7307 return
7308 end
7309 "
7310
7311 # Code to be used in simple link tests
7312 lt_simple_link_test_code="\
7313 program t
7314 end
7315 "
7316
7317 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7318 _LT_TAG_COMPILER
7319
7320 # save warnings/boilerplate of simple test code
7321 _LT_COMPILER_BOILERPLATE
7322 _LT_LINKER_BOILERPLATE
7323
7324 # Allow CC to be a program name with arguments.
7325 lt_save_CC="$CC"
7326 lt_save_GCC=$GCC
7327 lt_save_CFLAGS=$CFLAGS
7328 CC=${F77-"f77"}
7329 CFLAGS=$FFLAGS
7330 compiler=$CC
7331 _LT_TAGVAR(compiler, $1)=$CC
7332 _LT_CC_BASENAME([$compiler])
7333 GCC=$G77
7334 if test -n "$compiler"; then
7335 AC_MSG_CHECKING([if libtool supports shared libraries])
7336 AC_MSG_RESULT([$can_build_shared])
7337
7338 AC_MSG_CHECKING([whether to build shared libraries])
7339 test "$can_build_shared" = "no" && enable_shared=no
7340
7341 # On AIX, shared libraries and static libraries use the same namespace, and
7342 # are all built from PIC.
7343 case $host_os in
7344 aix3*)
7345 test "$enable_shared" = yes && enable_static=no
7346 if test -n "$RANLIB"; then
7347 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7348 postinstall_cmds='$RANLIB $lib'
7349 fi
7350 ;;
7351 aix[[4-9]]*)
7352 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7353 test "$enable_shared" = yes && enable_static=no
7354 fi
7355 ;;
7356 esac
7357 AC_MSG_RESULT([$enable_shared])
7358
7359 AC_MSG_CHECKING([whether to build static libraries])
7360 # Make sure either enable_shared or enable_static is yes.
7361 test "$enable_shared" = yes || enable_static=yes
7362 AC_MSG_RESULT([$enable_static])
7363
7364 _LT_TAGVAR(GCC, $1)="$G77"
7365 _LT_TAGVAR(LD, $1)="$LD"
7366
7367 ## CAVEAT EMPTOR:
7368 ## There is no encapsulation within the following macros, do not change
7369 ## the running order or otherwise move them around unless you know exactly
7370 ## what you are doing...
7371 _LT_COMPILER_PIC($1)
7372 _LT_COMPILER_C_O($1)
7373 _LT_COMPILER_FILE_LOCKS($1)
7374 _LT_LINKER_SHLIBS($1)
7375 _LT_SYS_DYNAMIC_LINKER($1)
7376 _LT_LINKER_HARDCODE_LIBPATH($1)
7377
7378 _LT_CONFIG($1)
7379 fi # test -n "$compiler"
7380
7381 GCC=$lt_save_GCC
7382 CC="$lt_save_CC"
7383 CFLAGS="$lt_save_CFLAGS"
7384 fi # test "$_lt_disable_F77" != yes
7385
7386 AC_LANG_POP
7387 ])# _LT_LANG_F77_CONFIG
7388
7389
7390 # _LT_LANG_FC_CONFIG([TAG])
7391 # -------------------------
7392 # Ensure that the configuration variables for a Fortran compiler are
7393 # suitably defined. These variables are subsequently used by _LT_CONFIG
7394 # to write the compiler configuration to `libtool'.
7395 m4_defun([_LT_LANG_FC_CONFIG],
7396 [AC_LANG_PUSH(Fortran)
7397
7398 if test -z "$FC" || test "X$FC" = "Xno"; then
7399 _lt_disable_FC=yes
7400 fi
7401
7402 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7403 _LT_TAGVAR(allow_undefined_flag, $1)=
7404 _LT_TAGVAR(always_export_symbols, $1)=no
7405 _LT_TAGVAR(archive_expsym_cmds, $1)=
7406 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7407 _LT_TAGVAR(hardcode_direct, $1)=no
7408 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7409 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7410 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7411 _LT_TAGVAR(hardcode_minus_L, $1)=no
7412 _LT_TAGVAR(hardcode_automatic, $1)=no
7413 _LT_TAGVAR(inherit_rpath, $1)=no
7414 _LT_TAGVAR(module_cmds, $1)=
7415 _LT_TAGVAR(module_expsym_cmds, $1)=
7416 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7417 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7418 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7419 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7420 _LT_TAGVAR(no_undefined_flag, $1)=
7421 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7422 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7423
7424 # Source file extension for fc test sources.
7425 ac_ext=${ac_fc_srcext-f}
7426
7427 # Object file extension for compiled fc test sources.
7428 objext=o
7429 _LT_TAGVAR(objext, $1)=$objext
7430
7431 # No sense in running all these tests if we already determined that
7432 # the FC compiler isn't working. Some variables (like enable_shared)
7433 # are currently assumed to apply to all compilers on this platform,
7434 # and will be corrupted by setting them based on a non-working compiler.
7435 if test "$_lt_disable_FC" != yes; then
7436 # Code to be used in simple compile tests
7437 lt_simple_compile_test_code="\
7438 subroutine t
7439 return
7440 end
7441 "
7442
7443 # Code to be used in simple link tests
7444 lt_simple_link_test_code="\
7445 program t
7446 end
7447 "
7448
7449 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7450 _LT_TAG_COMPILER
7451
7452 # save warnings/boilerplate of simple test code
7453 _LT_COMPILER_BOILERPLATE
7454 _LT_LINKER_BOILERPLATE
7455
7456 # Allow CC to be a program name with arguments.
7457 lt_save_CC="$CC"
7458 lt_save_GCC=$GCC
7459 lt_save_CFLAGS=$CFLAGS
7460 CC=${FC-"f95"}
7461 CFLAGS=$FCFLAGS
7462 compiler=$CC
7463 GCC=$ac_cv_fc_compiler_gnu
7464
7465 _LT_TAGVAR(compiler, $1)=$CC
7466 _LT_CC_BASENAME([$compiler])
7467
7468 if test -n "$compiler"; then
7469 AC_MSG_CHECKING([if libtool supports shared libraries])
7470 AC_MSG_RESULT([$can_build_shared])
7471
7472 AC_MSG_CHECKING([whether to build shared libraries])
7473 test "$can_build_shared" = "no" && enable_shared=no
7474
7475 # On AIX, shared libraries and static libraries use the same namespace, and
7476 # are all built from PIC.
7477 case $host_os in
7478 aix3*)
7479 test "$enable_shared" = yes && enable_static=no
7480 if test -n "$RANLIB"; then
7481 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7482 postinstall_cmds='$RANLIB $lib'
7483 fi
7484 ;;
7485 aix[[4-9]]*)
7486 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7487 test "$enable_shared" = yes && enable_static=no
7488 fi
7489 ;;
7490 esac
7491 AC_MSG_RESULT([$enable_shared])
7492
7493 AC_MSG_CHECKING([whether to build static libraries])
7494 # Make sure either enable_shared or enable_static is yes.
7495 test "$enable_shared" = yes || enable_static=yes
7496 AC_MSG_RESULT([$enable_static])
7497
7498 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7499 _LT_TAGVAR(LD, $1)="$LD"
7500
7501 ## CAVEAT EMPTOR:
7502 ## There is no encapsulation within the following macros, do not change
7503 ## the running order or otherwise move them around unless you know exactly
7504 ## what you are doing...
7505 _LT_SYS_HIDDEN_LIBDEPS($1)
7506 _LT_COMPILER_PIC($1)
7507 _LT_COMPILER_C_O($1)
7508 _LT_COMPILER_FILE_LOCKS($1)
7509 _LT_LINKER_SHLIBS($1)
7510 _LT_SYS_DYNAMIC_LINKER($1)
7511 _LT_LINKER_HARDCODE_LIBPATH($1)
7512
7513 _LT_CONFIG($1)
7514 fi # test -n "$compiler"
7515
7516 GCC=$lt_save_GCC
7517 CC=$lt_save_CC
7518 CFLAGS=$lt_save_CFLAGS
7519 fi # test "$_lt_disable_FC" != yes
7520
7521 AC_LANG_POP
7522 ])# _LT_LANG_FC_CONFIG
7523
7524
7525 # _LT_LANG_GCJ_CONFIG([TAG])
7526 # --------------------------
7527 # Ensure that the configuration variables for the GNU Java Compiler compiler
7528 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7529 # to write the compiler configuration to `libtool'.
7530 m4_defun([_LT_LANG_GCJ_CONFIG],
7531 [AC_REQUIRE([LT_PROG_GCJ])dnl
7532 AC_LANG_SAVE
7533
7534 # Source file extension for Java test sources.
7535 ac_ext=java
7536
7537 # Object file extension for compiled Java test sources.
7538 objext=o
7539 _LT_TAGVAR(objext, $1)=$objext
7540
7541 # Code to be used in simple compile tests
7542 lt_simple_compile_test_code="class foo {}"
7543
7544 # Code to be used in simple link tests
7545 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7546
7547 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7548 _LT_TAG_COMPILER
7549
7550 # save warnings/boilerplate of simple test code
7551 _LT_COMPILER_BOILERPLATE
7552 _LT_LINKER_BOILERPLATE
7553
7554 # Allow CC to be a program name with arguments.
7555 lt_save_CC=$CC
7556 lt_save_CFLAGS=$CFLAGS
7557 lt_save_GCC=$GCC
7558 GCC=yes
7559 CC=${GCJ-"gcj"}
7560 CFLAGS=$GCJFLAGS
7561 compiler=$CC
7562 _LT_TAGVAR(compiler, $1)=$CC
7563 _LT_TAGVAR(LD, $1)="$LD"
7564 _LT_CC_BASENAME([$compiler])
7565
7566 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7567 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7568
7569 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7570 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7571 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7572
7573 if test -n "$compiler"; then
7574 _LT_COMPILER_NO_RTTI($1)
7575 _LT_COMPILER_PIC($1)
7576 _LT_COMPILER_C_O($1)
7577 _LT_COMPILER_FILE_LOCKS($1)
7578 _LT_LINKER_SHLIBS($1)
7579 _LT_LINKER_HARDCODE_LIBPATH($1)
7580
7581 _LT_CONFIG($1)
7582 fi
7583
7584 AC_LANG_RESTORE
7585
7586 GCC=$lt_save_GCC
7587 CC=$lt_save_CC
7588 CFLAGS=$lt_save_CFLAGS
7589 ])# _LT_LANG_GCJ_CONFIG
7590
7591
7592 # _LT_LANG_GO_CONFIG([TAG])
7593 # --------------------------
7594 # Ensure that the configuration variables for the GNU Go compiler
7595 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7596 # to write the compiler configuration to `libtool'.
7597 m4_defun([_LT_LANG_GO_CONFIG],
7598 [AC_REQUIRE([LT_PROG_GO])dnl
7599 AC_LANG_SAVE
7600
7601 # Source file extension for Go test sources.
7602 ac_ext=go
7603
7604 # Object file extension for compiled Go test sources.
7605 objext=o
7606 _LT_TAGVAR(objext, $1)=$objext
7607
7608 # Code to be used in simple compile tests
7609 lt_simple_compile_test_code="package main; func main() { }"
7610
7611 # Code to be used in simple link tests
7612 lt_simple_link_test_code='package main; func main() { }'
7613
7614 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7615 _LT_TAG_COMPILER
7616
7617 # save warnings/boilerplate of simple test code
7618 _LT_COMPILER_BOILERPLATE
7619 _LT_LINKER_BOILERPLATE
7620
7621 # Allow CC to be a program name with arguments.
7622 lt_save_CC=$CC
7623 lt_save_CFLAGS=$CFLAGS
7624 lt_save_GCC=$GCC
7625 GCC=yes
7626 CC=${GOC-"gccgo"}
7627 CFLAGS=$GOFLAGS
7628 compiler=$CC
7629 _LT_TAGVAR(compiler, $1)=$CC
7630 _LT_TAGVAR(LD, $1)="$LD"
7631 _LT_CC_BASENAME([$compiler])
7632
7633 # Go did not exist at the time GCC didn't implicitly link libc in.
7634 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7635
7636 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7637 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7638 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7639
7640 if test -n "$compiler"; then
7641 _LT_COMPILER_NO_RTTI($1)
7642 _LT_COMPILER_PIC($1)
7643 _LT_COMPILER_C_O($1)
7644 _LT_COMPILER_FILE_LOCKS($1)
7645 _LT_LINKER_SHLIBS($1)
7646 _LT_LINKER_HARDCODE_LIBPATH($1)
7647
7648 _LT_CONFIG($1)
7649 fi
7650
7651 AC_LANG_RESTORE
7652
7653 GCC=$lt_save_GCC
7654 CC=$lt_save_CC
7655 CFLAGS=$lt_save_CFLAGS
7656 ])# _LT_LANG_GO_CONFIG
7657
7658
7659 # _LT_LANG_RC_CONFIG([TAG])
7660 # -------------------------
7661 # Ensure that the configuration variables for the Windows resource compiler
7662 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7663 # to write the compiler configuration to `libtool'.
7664 m4_defun([_LT_LANG_RC_CONFIG],
7665 [AC_REQUIRE([LT_PROG_RC])dnl
7666 AC_LANG_SAVE
7667
7668 # Source file extension for RC test sources.
7669 ac_ext=rc
7670
7671 # Object file extension for compiled RC test sources.
7672 objext=o
7673 _LT_TAGVAR(objext, $1)=$objext
7674
7675 # Code to be used in simple compile tests
7676 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7677
7678 # Code to be used in simple link tests
7679 lt_simple_link_test_code="$lt_simple_compile_test_code"
7680
7681 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7682 _LT_TAG_COMPILER
7683
7684 # save warnings/boilerplate of simple test code
7685 _LT_COMPILER_BOILERPLATE
7686 _LT_LINKER_BOILERPLATE
7687
7688 # Allow CC to be a program name with arguments.
7689 lt_save_CC="$CC"
7690 lt_save_CFLAGS=$CFLAGS
7691 lt_save_GCC=$GCC
7692 GCC=
7693 CC=${RC-"windres"}
7694 CFLAGS=
7695 compiler=$CC
7696 _LT_TAGVAR(compiler, $1)=$CC
7697 _LT_CC_BASENAME([$compiler])
7698 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7699
7700 if test -n "$compiler"; then
7701 :
7702 _LT_CONFIG($1)
7703 fi
7704
7705 GCC=$lt_save_GCC
7706 AC_LANG_RESTORE
7707 CC=$lt_save_CC
7708 CFLAGS=$lt_save_CFLAGS
7709 ])# _LT_LANG_RC_CONFIG
7710
7711
7712 # LT_PROG_GCJ
7713 # -----------
7714 AC_DEFUN([LT_PROG_GCJ],
7715 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7716 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7717 [AC_CHECK_TOOL(GCJ, gcj,)
7718 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7719 AC_SUBST(GCJFLAGS)])])[]dnl
7720 ])
7721
7722 # Old name:
7723 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7724 dnl aclocal-1.4 backwards compatibility:
7725 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7726
7727
7728 # LT_PROG_GO
7729 # ----------
7730 AC_DEFUN([LT_PROG_GO],
7731 [AC_CHECK_TOOL(GOC, gccgo,)
7732 ])
7733
7734
7735 # LT_PROG_RC
7736 # ----------
7737 AC_DEFUN([LT_PROG_RC],
7738 [AC_CHECK_TOOL(RC, windres,)
7739 ])
7740
7741 # Old name:
7742 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7743 dnl aclocal-1.4 backwards compatibility:
7744 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7745
7746
7747 # _LT_DECL_EGREP
7748 # --------------
7749 # If we don't have a new enough Autoconf to choose the best grep
7750 # available, choose the one first in the user's PATH.
7751 m4_defun([_LT_DECL_EGREP],
7752 [AC_REQUIRE([AC_PROG_EGREP])dnl
7753 AC_REQUIRE([AC_PROG_FGREP])dnl
7754 test -z "$GREP" && GREP=grep
7755 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7756 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7757 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7758 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7759 AC_SUBST([GREP])
7760 ])
7761
7762
7763 # _LT_DECL_OBJDUMP
7764 # --------------
7765 # If we don't have a new enough Autoconf to choose the best objdump
7766 # available, choose the one first in the user's PATH.
7767 m4_defun([_LT_DECL_OBJDUMP],
7768 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7769 test -z "$OBJDUMP" && OBJDUMP=objdump
7770 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7771 AC_SUBST([OBJDUMP])
7772 ])
7773
7774 # _LT_DECL_DLLTOOL
7775 # ----------------
7776 # Ensure DLLTOOL variable is set.
7777 m4_defun([_LT_DECL_DLLTOOL],
7778 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7779 test -z "$DLLTOOL" && DLLTOOL=dlltool
7780 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7781 AC_SUBST([DLLTOOL])
7782 ])
7783
7784 # _LT_DECL_SED
7785 # ------------
7786 # Check for a fully-functional sed program, that truncates
7787 # as few characters as possible. Prefer GNU sed if found.
7788 m4_defun([_LT_DECL_SED],
7789 [AC_PROG_SED
7790 test -z "$SED" && SED=sed
7791 Xsed="$SED -e 1s/^X//"
7792 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7793 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7794 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7795 ])# _LT_DECL_SED
7796
7797 m4_ifndef([AC_PROG_SED], [
7798 # NOTE: This macro has been submitted for inclusion into #
7799 # GNU Autoconf as AC_PROG_SED. When it is available in #
7800 # a released version of Autoconf we should remove this #
7801 # macro and use it instead. #
7802
7803 m4_defun([AC_PROG_SED],
7804 [AC_MSG_CHECKING([for a sed that does not truncate output])
7805 AC_CACHE_VAL(lt_cv_path_SED,
7806 [# Loop through the user's path and test for sed and gsed.
7807 # Then use that list of sed's as ones to test for truncation.
7808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7809 for as_dir in $PATH
7810 do
7811 IFS=$as_save_IFS
7812 test -z "$as_dir" && as_dir=.
7813 for lt_ac_prog in sed gsed; do
7814 for ac_exec_ext in '' $ac_executable_extensions; do
7815 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7816 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7817 fi
7818 done
7819 done
7820 done
7821 IFS=$as_save_IFS
7822 lt_ac_max=0
7823 lt_ac_count=0
7824 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7825 # along with /bin/sed that truncates output.
7826 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7827 test ! -f $lt_ac_sed && continue
7828 cat /dev/null > conftest.in
7829 lt_ac_count=0
7830 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7831 # Check for GNU sed and select it if it is found.
7832 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7833 lt_cv_path_SED=$lt_ac_sed
7834 break
7835 fi
7836 while true; do
7837 cat conftest.in conftest.in >conftest.tmp
7838 mv conftest.tmp conftest.in
7839 cp conftest.in conftest.nl
7840 echo >>conftest.nl
7841 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7842 cmp -s conftest.out conftest.nl || break
7843 # 10000 chars as input seems more than enough
7844 test $lt_ac_count -gt 10 && break
7845 lt_ac_count=`expr $lt_ac_count + 1`
7846 if test $lt_ac_count -gt $lt_ac_max; then
7847 lt_ac_max=$lt_ac_count
7848 lt_cv_path_SED=$lt_ac_sed
7849 fi
7850 done
7851 done
7852 ])
7853 SED=$lt_cv_path_SED
7854 AC_SUBST([SED])
7855 AC_MSG_RESULT([$SED])
7856 ])#AC_PROG_SED
7857 ])#m4_ifndef
7858
7859 # Old name:
7860 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7861 dnl aclocal-1.4 backwards compatibility:
7862 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7863
7864
7865 # _LT_CHECK_SHELL_FEATURES
7866 # ------------------------
7867 # Find out whether the shell is Bourne or XSI compatible,
7868 # or has some other useful features.
7869 m4_defun([_LT_CHECK_SHELL_FEATURES],
7870 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7871 # Try some XSI features
7872 xsi_shell=no
7873 ( _lt_dummy="a/b/c"
7874 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7875 = c,a/b,b/c, \
7876 && eval 'test $(( 1 + 1 )) -eq 2 \
7877 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7878 && xsi_shell=yes
7879 AC_MSG_RESULT([$xsi_shell])
7880 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7881
7882 AC_MSG_CHECKING([whether the shell understands "+="])
7883 lt_shell_append=no
7884 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7885 >/dev/null 2>&1 \
7886 && lt_shell_append=yes
7887 AC_MSG_RESULT([$lt_shell_append])
7888 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7889
7890 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7891 lt_unset=unset
7892 else
7893 lt_unset=false
7894 fi
7895 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7896
7897 # test EBCDIC or ASCII
7898 case `echo X|tr X '\101'` in
7899 A) # ASCII based system
7900 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7901 lt_SP2NL='tr \040 \012'
7902 lt_NL2SP='tr \015\012 \040\040'
7903 ;;
7904 *) # EBCDIC based system
7905 lt_SP2NL='tr \100 \n'
7906 lt_NL2SP='tr \r\n \100\100'
7907 ;;
7908 esac
7909 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7910 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7911 ])# _LT_CHECK_SHELL_FEATURES
7912
7913
7914 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7915 # ------------------------------------------------------
7916 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7917 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7918 m4_defun([_LT_PROG_FUNCTION_REPLACE],
7919 [dnl {
7920 sed -e '/^$1 ()$/,/^} # $1 /c\
7921 $1 ()\
7922 {\
7923 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7924 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7925 && mv -f "$cfgfile.tmp" "$cfgfile" \
7926 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7927 test 0 -eq $? || _lt_function_replace_fail=:
7928 ])
7929
7930
7931 # _LT_PROG_REPLACE_SHELLFNS
7932 # -------------------------
7933 # Replace existing portable implementations of several shell functions with
7934 # equivalent extended shell implementations where those features are available..
7935 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7936 [if test x"$xsi_shell" = xyes; then
7937 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7938 case ${1} in
7939 */*) func_dirname_result="${1%/*}${2}" ;;
7940 * ) func_dirname_result="${3}" ;;
7941 esac])
7942
7943 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7944 func_basename_result="${1##*/}"])
7945
7946 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7947 case ${1} in
7948 */*) func_dirname_result="${1%/*}${2}" ;;
7949 * ) func_dirname_result="${3}" ;;
7950 esac
7951 func_basename_result="${1##*/}"])
7952
7953 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7954 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7955 # positional parameters, so assign one to ordinary parameter first.
7956 func_stripname_result=${3}
7957 func_stripname_result=${func_stripname_result#"${1}"}
7958 func_stripname_result=${func_stripname_result%"${2}"}])
7959
7960 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7961 func_split_long_opt_name=${1%%=*}
7962 func_split_long_opt_arg=${1#*=}])
7963
7964 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7965 func_split_short_opt_arg=${1#??}
7966 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7967
7968 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7969 case ${1} in
7970 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7971 *) func_lo2o_result=${1} ;;
7972 esac])
7973
7974 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7975
7976 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7977
7978 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7979 fi
7980
7981 if test x"$lt_shell_append" = xyes; then
7982 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7983
7984 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7985 func_quote_for_eval "${2}"
7986 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7987 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7988
7989 # Save a `func_append' function call where possible by direct use of '+='
7990 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7991 && mv -f "$cfgfile.tmp" "$cfgfile" \
7992 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7993 test 0 -eq $? || _lt_function_replace_fail=:
7994 else
7995 # Save a `func_append' function call even when '+=' is not available
7996 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7997 && mv -f "$cfgfile.tmp" "$cfgfile" \
7998 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7999 test 0 -eq $? || _lt_function_replace_fail=:
8000 fi
8001
8002 if test x"$_lt_function_replace_fail" = x":"; then
8003 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8004 fi
8005 ])
8006
8007 # _LT_PATH_CONVERSION_FUNCTIONS
8008 # -----------------------------
8009 # Determine which file name conversion functions should be used by
8010 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8011 # for certain cross-compile configurations and native mingw.
8012 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8013 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8014 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8015 AC_MSG_CHECKING([how to convert $build file names to $host format])
8016 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8017 [case $host in
8018 *-*-mingw* )
8019 case $build in
8020 *-*-mingw* ) # actually msys
8021 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8022 ;;
8023 *-*-cygwin* )
8024 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8025 ;;
8026 * ) # otherwise, assume *nix
8027 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8028 ;;
8029 esac
8030 ;;
8031 *-*-cygwin* )
8032 case $build in
8033 *-*-mingw* ) # actually msys
8034 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8035 ;;
8036 *-*-cygwin* )
8037 lt_cv_to_host_file_cmd=func_convert_file_noop
8038 ;;
8039 * ) # otherwise, assume *nix
8040 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8041 ;;
8042 esac
8043 ;;
8044 * ) # unhandled hosts (and "normal" native builds)
8045 lt_cv_to_host_file_cmd=func_convert_file_noop
8046 ;;
8047 esac
8048 ])
8049 to_host_file_cmd=$lt_cv_to_host_file_cmd
8050 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8051 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8052 [0], [convert $build file names to $host format])dnl
8053
8054 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8055 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8056 [#assume ordinary cross tools, or native build.
8057 lt_cv_to_tool_file_cmd=func_convert_file_noop
8058 case $host in
8059 *-*-mingw* )
8060 case $build in
8061 *-*-mingw* ) # actually msys
8062 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8063 ;;
8064 esac
8065 ;;
8066 esac
8067 ])
8068 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8069 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8070 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8071 [0], [convert $build files to toolchain format])dnl
8072 ])# _LT_PATH_CONVERSION_FUNCTIONS
8073
8074 # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
8075 #
8076 # Copyright (C) 1999-2006, 2007, 2008, 2011 Free Software Foundation, Inc.
8077 # Written by Thomas Tanner, 1999
8078 #
8079 # This file is free software; the Free Software Foundation gives
8080 # unlimited permission to copy and/or distribute it, with or without
8081 # modifications, as long as this notice is preserved.
8082
8083 # serial 18 LTDL_INIT
8084
8085 # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
8086 # ------------------------------------------
8087 # DIRECTORY contains the libltdl sources. It is okay to call this
8088 # function multiple times, as long as the same DIRECTORY is always given.
8089 AC_DEFUN([LT_CONFIG_LTDL_DIR],
8090 [AC_BEFORE([$0], [LTDL_INIT])
8091 _$0($*)
8092 ])# LT_CONFIG_LTDL_DIR
8093
8094 # We break this out into a separate macro, so that we can call it safely
8095 # internally without being caught accidentally by the sed scan in libtoolize.
8096 m4_defun([_LT_CONFIG_LTDL_DIR],
8097 [dnl remove trailing slashes
8098 m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
8099 m4_case(_LTDL_DIR,
8100 [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
8101 m4_if(_ARG_DIR, [.],
8102 [],
8103 [m4_define([_LTDL_DIR], _ARG_DIR)
8104 _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
8105 [m4_if(_ARG_DIR, _LTDL_DIR,
8106 [],
8107 [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
8108 m4_popdef([_ARG_DIR])
8109 ])# _LT_CONFIG_LTDL_DIR
8110
8111 # Initialise:
8112 m4_define([_LTDL_DIR], [])
8113
8114
8115 # _LT_BUILD_PREFIX
8116 # ----------------
8117 # If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
8118 # to `${top_builddir}/'.
8119 m4_define([_LT_BUILD_PREFIX],
8120 [m4_ifdef([AC_AUTOCONF_VERSION],
8121 [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
8122 [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
8123 [${top_build_prefix}],
8124 [${top_builddir}/])],
8125 [${top_build_prefix}])],
8126 [${top_builddir}/])[]dnl
8127 ])
8128
8129
8130 # LTDL_CONVENIENCE
8131 # ----------------
8132 # sets LIBLTDL to the link flags for the libltdl convenience library and
8133 # LTDLINCL to the include flags for the libltdl header and adds
8134 # --enable-ltdl-convenience to the configure arguments. Note that
8135 # AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
8136 # '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
8137 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
8138 # quotes!). If your package is not flat and you're not using automake,
8139 # define top_build_prefix, top_builddir, and top_srcdir appropriately
8140 # in your Makefiles.
8141 AC_DEFUN([LTDL_CONVENIENCE],
8142 [AC_BEFORE([$0], [LTDL_INIT])dnl
8143 dnl Although the argument is deprecated and no longer documented,
8144 dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
8145 dnl here make sure it is the same as any other declaration of libltdl's
8146 dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
8147 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8148 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8149 _$0()
8150 ])# LTDL_CONVENIENCE
8151
8152 # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
8153 # now we have LT_CONFIG_LTDL_DIR:
8154 AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
8155 [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8156 _LTDL_CONVENIENCE])
8157
8158 dnl aclocal-1.4 backwards compatibility:
8159 dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
8160
8161
8162 # _LTDL_CONVENIENCE
8163 # -----------------
8164 # Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
8165 m4_defun([_LTDL_CONVENIENCE],
8166 [case $enable_ltdl_convenience in
8167 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8168 "") enable_ltdl_convenience=yes
8169 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8170 esac
8171 LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
8172 LTDLDEPS=$LIBLTDL
8173 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8174
8175 AC_SUBST([LIBLTDL])
8176 AC_SUBST([LTDLDEPS])
8177 AC_SUBST([LTDLINCL])
8178
8179 # For backwards non-gettext consistent compatibility...
8180 INCLTDL="$LTDLINCL"
8181 AC_SUBST([INCLTDL])
8182 ])# _LTDL_CONVENIENCE
8183
8184
8185 # LTDL_INSTALLABLE
8186 # ----------------
8187 # sets LIBLTDL to the link flags for the libltdl installable library
8188 # and LTDLINCL to the include flags for the libltdl header and adds
8189 # --enable-ltdl-install to the configure arguments. Note that
8190 # AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
8191 # is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
8192 # available, otherwise with '${top_builddir}/', and LTDLINCL will be
8193 # prefixed with '${top_srcdir}/' (note the single quotes!). If your
8194 # package is not flat and you're not using automake, define top_build_prefix,
8195 # top_builddir, and top_srcdir appropriately in your Makefiles.
8196 # In the future, this macro may have to be called after LT_INIT.
8197 AC_DEFUN([LTDL_INSTALLABLE],
8198 [AC_BEFORE([$0], [LTDL_INIT])dnl
8199 dnl Although the argument is deprecated and no longer documented,
8200 dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
8201 dnl here make sure it is the same as any other declaration of libltdl's
8202 dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
8203 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8204 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8205 _$0()
8206 ])# LTDL_INSTALLABLE
8207
8208 # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
8209 # now we have LT_CONFIG_LTDL_DIR:
8210 AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
8211 [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8212 _LTDL_INSTALLABLE])
8213
8214 dnl aclocal-1.4 backwards compatibility:
8215 dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
8216
8217
8218 # _LTDL_INSTALLABLE
8219 # -----------------
8220 # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
8221 m4_defun([_LTDL_INSTALLABLE],
8222 [if test -f $prefix/lib/libltdl.la; then
8223 lt_save_LDFLAGS="$LDFLAGS"
8224 LDFLAGS="-L$prefix/lib $LDFLAGS"
8225 AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
8226 LDFLAGS="$lt_save_LDFLAGS"
8227 if test x"${lt_lib_ltdl-no}" = xyes; then
8228 if test x"$enable_ltdl_install" != xyes; then
8229 # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
8230 AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
8231 enable_ltdl_install=no
8232 fi
8233 elif test x"$enable_ltdl_install" = xno; then
8234 AC_MSG_WARN([libltdl not installed, but installation disabled])
8235 fi
8236 fi
8237
8238 # If configure.ac declared an installable ltdl, and the user didn't override
8239 # with --disable-ltdl-install, we will install the shipped libltdl.
8240 case $enable_ltdl_install in
8241 no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8242 LIBLTDL="-lltdl"
8243 LTDLDEPS=
8244 LTDLINCL=
8245 ;;
8246 *) enable_ltdl_install=yes
8247 ac_configure_args="$ac_configure_args --enable-ltdl-install"
8248 LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
8249 LTDLDEPS=$LIBLTDL
8250 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8251 ;;
8252 esac
8253
8254 AC_SUBST([LIBLTDL])
8255 AC_SUBST([LTDLDEPS])
8256 AC_SUBST([LTDLINCL])
8257
8258 # For backwards non-gettext consistent compatibility...
8259 INCLTDL="$LTDLINCL"
8260 AC_SUBST([INCLTDL])
8261 ])# LTDL_INSTALLABLE
8262
8263
8264 # _LTDL_MODE_DISPATCH
8265 # -------------------
8266 m4_define([_LTDL_MODE_DISPATCH],
8267 [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
8268 m4_if(_LTDL_DIR, [],
8269 [],
8270 dnl if _LTDL_MODE was not set already, the default value is `subproject':
8271 [m4_case(m4_default(_LTDL_MODE, [subproject]),
8272 [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
8273 _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
8274 [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
8275 [recursive], [],
8276 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
8277 dnl Be careful not to expand twice:
8278 m4_define([$0], [])
8279 ])# _LTDL_MODE_DISPATCH
8280
8281
8282 # _LT_LIBOBJ(MODULE_NAME)
8283 # -----------------------
8284 # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
8285 # of into LIBOBJS.
8286 AC_DEFUN([_LT_LIBOBJ], [
8287 m4_pattern_allow([^_LT_LIBOBJS$])
8288 _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
8289 ])# _LT_LIBOBJS
8290
8291
8292 # LTDL_INIT([OPTIONS])
8293 # --------------------
8294 # Clients of libltdl can use this macro to allow the installer to
8295 # choose between a shipped copy of the ltdl sources or a preinstalled
8296 # version of the library. If the shipped ltdl sources are not in a
8297 # subdirectory named libltdl, the directory name must be given by
8298 # LT_CONFIG_LTDL_DIR.
8299 AC_DEFUN([LTDL_INIT],
8300 [dnl Parse OPTIONS
8301 _LT_SET_OPTIONS([$0], [$1])
8302
8303 dnl We need to keep our own list of libobjs separate from our parent project,
8304 dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
8305 dnl we look for our own LIBOBJs.
8306 m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
8307 m4_pushdef([AC_LIBSOURCES])
8308
8309 dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
8310 m4_if(_LTDL_MODE, [],
8311 [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
8312 m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
8313 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
8314
8315 AC_ARG_WITH([included_ltdl],
8316 [AS_HELP_STRING([--with-included-ltdl],
8317 [use the GNU ltdl sources included here])])
8318
8319 if test "x$with_included_ltdl" != xyes; then
8320 # We are not being forced to use the included libltdl sources, so
8321 # decide whether there is a useful installed version we can use.
8322 AC_CHECK_HEADER([ltdl.h],
8323 [AC_CHECK_DECL([lt_dlinterface_register],
8324 [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
8325 [with_included_ltdl=no],
8326 [with_included_ltdl=yes])],
8327 [with_included_ltdl=yes],
8328 [AC_INCLUDES_DEFAULT
8329 #include <ltdl.h>])],
8330 [with_included_ltdl=yes],
8331 [AC_INCLUDES_DEFAULT]
8332 )
8333 fi
8334
8335 dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
8336 dnl was called yet, then for old times' sake, we assume libltdl is in an
8337 dnl eponymous directory:
8338 AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
8339
8340 AC_ARG_WITH([ltdl_include],
8341 [AS_HELP_STRING([--with-ltdl-include=DIR],
8342 [use the ltdl headers installed in DIR])])
8343
8344 if test -n "$with_ltdl_include"; then
8345 if test -f "$with_ltdl_include/ltdl.h"; then :
8346 else
8347 AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
8348 fi
8349 else
8350 with_ltdl_include=no
8351 fi
8352
8353 AC_ARG_WITH([ltdl_lib],
8354 [AS_HELP_STRING([--with-ltdl-lib=DIR],
8355 [use the libltdl.la installed in DIR])])
8356
8357 if test -n "$with_ltdl_lib"; then
8358 if test -f "$with_ltdl_lib/libltdl.la"; then :
8359 else
8360 AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
8361 fi
8362 else
8363 with_ltdl_lib=no
8364 fi
8365
8366 case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
8367 ,yes,no,no,)
8368 m4_case(m4_default(_LTDL_TYPE, [convenience]),
8369 [convenience], [_LTDL_CONVENIENCE],
8370 [installable], [_LTDL_INSTALLABLE],
8371 [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
8372 ;;
8373 ,no,no,no,)
8374 # If the included ltdl is not to be used, then use the
8375 # preinstalled libltdl we found.
8376 AC_DEFINE([HAVE_LTDL], [1],
8377 [Define this if a modern libltdl is already installed])
8378 LIBLTDL=-lltdl
8379 LTDLDEPS=
8380 LTDLINCL=
8381 ;;
8382 ,no*,no,*)
8383 AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
8384 ;;
8385 *) with_included_ltdl=no
8386 LIBLTDL="-L$with_ltdl_lib -lltdl"
8387 LTDLDEPS=
8388 LTDLINCL="-I$with_ltdl_include"
8389 ;;
8390 esac
8391 INCLTDL="$LTDLINCL"
8392
8393 # Report our decision...
8394 AC_MSG_CHECKING([where to find libltdl headers])
8395 AC_MSG_RESULT([$LTDLINCL])
8396 AC_MSG_CHECKING([where to find libltdl library])
8397 AC_MSG_RESULT([$LIBLTDL])
8398
8399 _LTDL_SETUP
8400
8401 dnl restore autoconf definition.
8402 m4_popdef([AC_LIBOBJ])
8403 m4_popdef([AC_LIBSOURCES])
8404
8405 AC_CONFIG_COMMANDS_PRE([
8406 _ltdl_libobjs=
8407 _ltdl_ltlibobjs=
8408 if test -n "$_LT_LIBOBJS"; then
8409 # Remove the extension.
8410 _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
8411 for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
8412 _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
8413 _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
8414 done
8415 fi
8416 AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
8417 AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
8418 ])
8419
8420 # Only expand once:
8421 m4_define([LTDL_INIT])
8422 ])# LTDL_INIT
8423
8424 # Old names:
8425 AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
8426 AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
8427 AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
8428 dnl aclocal-1.4 backwards compatibility:
8429 dnl AC_DEFUN([AC_LIB_LTDL], [])
8430 dnl AC_DEFUN([AC_WITH_LTDL], [])
8431 dnl AC_DEFUN([LT_WITH_LTDL], [])
8432
8433
8434 # _LTDL_SETUP
8435 # -----------
8436 # Perform all the checks necessary for compilation of the ltdl objects
8437 # -- including compiler checks and header checks. This is a public
8438 # interface mainly for the benefit of libltdl's own configure.ac, most
8439 # other users should call LTDL_INIT instead.
8440 AC_DEFUN([_LTDL_SETUP],
8441 [AC_REQUIRE([AC_PROG_CC])dnl
8442 AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
8443 AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
8444 AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
8445 AC_REQUIRE([LT_LIB_DLLOAD])dnl
8446 AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8447 AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
8448 AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
8449 AC_REQUIRE([gl_FUNC_ARGZ])dnl
8450
8451 m4_require([_LT_CHECK_OBJDIR])dnl
8452 m4_require([_LT_HEADER_DLFCN])dnl
8453 m4_require([_LT_CHECK_DLPREOPEN])dnl
8454 m4_require([_LT_DECL_SED])dnl
8455
8456 dnl Don't require this, or it will be expanded earlier than the code
8457 dnl that sets the variables it relies on:
8458 _LT_ENABLE_INSTALL
8459
8460 dnl _LTDL_MODE specific code must be called at least once:
8461 _LTDL_MODE_DISPATCH
8462
8463 # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
8464 # the user used. This is so that ltdl.h can pick up the parent projects
8465 # config.h file, The first file in AC_CONFIG_HEADERS must contain the
8466 # definitions required by ltdl.c.
8467 # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
8468 AC_CONFIG_COMMANDS_PRE([dnl
8469 m4_pattern_allow([^LT_CONFIG_H$])dnl
8470 m4_ifset([AH_HEADER],
8471 [LT_CONFIG_H=AH_HEADER],
8472 [m4_ifset([AC_LIST_HEADERS],
8473 [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
8474 [])])])
8475 AC_SUBST([LT_CONFIG_H])
8476
8477 AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
8478 [], [], [AC_INCLUDES_DEFAULT])
8479
8480 AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
8481 AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
8482
8483 m4_pattern_allow([LT_LIBEXT])dnl
8484 AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
8485
8486 name=
8487 eval "lt_libprefix=\"$libname_spec\""
8488 m4_pattern_allow([LT_LIBPREFIX])dnl
8489 AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
8490
8491 name=ltdl
8492 eval "LTDLOPEN=\"$libname_spec\""
8493 AC_SUBST([LTDLOPEN])
8494 ])# _LTDL_SETUP
8495
8496
8497 # _LT_ENABLE_INSTALL
8498 # ------------------
8499 m4_define([_LT_ENABLE_INSTALL],
8500 [AC_ARG_ENABLE([ltdl-install],
8501 [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
8502
8503 case ,${enable_ltdl_install},${enable_ltdl_convenience} in
8504 *yes*) ;;
8505 *) enable_ltdl_convenience=yes ;;
8506 esac
8507
8508 m4_ifdef([AM_CONDITIONAL],
8509 [AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
8510 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
8511 ])# _LT_ENABLE_INSTALL
8512
8513
8514 # LT_SYS_DLOPEN_DEPLIBS
8515 # ---------------------
8516 AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
8517 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8518 AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
8519 [lt_cv_sys_dlopen_deplibs],
8520 [# PORTME does your system automatically load deplibs for dlopen?
8521 # or its logical equivalent (e.g. shl_load for HP-UX < 11)
8522 # For now, we just catch OSes we know something about -- in the
8523 # future, we'll try test this programmatically.
8524 lt_cv_sys_dlopen_deplibs=unknown
8525 case $host_os in
8526 aix3*|aix4.1.*|aix4.2.*)
8527 # Unknown whether this is true for these versions of AIX, but
8528 # we want this `case' here to explicitly catch those versions.
8529 lt_cv_sys_dlopen_deplibs=unknown
8530 ;;
8531 aix[[4-9]]*)
8532 lt_cv_sys_dlopen_deplibs=yes
8533 ;;
8534 amigaos*)
8535 case $host_cpu in
8536 powerpc)
8537 lt_cv_sys_dlopen_deplibs=no
8538 ;;
8539 esac
8540 ;;
8541 darwin*)
8542 # Assuming the user has installed a libdl from somewhere, this is true
8543 # If you are looking for one http://www.opendarwin.org/projects/dlcompat
8544 lt_cv_sys_dlopen_deplibs=yes
8545 ;;
8546 freebsd* | dragonfly*)
8547 lt_cv_sys_dlopen_deplibs=yes
8548 ;;
8549 gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
8550 # GNU and its variants, using gnu ld.so (Glibc)
8551 lt_cv_sys_dlopen_deplibs=yes
8552 ;;
8553 hpux10*|hpux11*)
8554 lt_cv_sys_dlopen_deplibs=yes
8555 ;;
8556 interix*)
8557 lt_cv_sys_dlopen_deplibs=yes
8558 ;;
8559 irix[[12345]]*|irix6.[[01]]*)
8560 # Catch all versions of IRIX before 6.2, and indicate that we don't
8561 # know how it worked for any of those versions.
8562 lt_cv_sys_dlopen_deplibs=unknown
8563 ;;
8564 irix*)
8565 # The case above catches anything before 6.2, and it's known that
8566 # at 6.2 and later dlopen does load deplibs.
8567 lt_cv_sys_dlopen_deplibs=yes
8568 ;;
8569 netbsd*)
8570 lt_cv_sys_dlopen_deplibs=yes
8571 ;;
8572 openbsd*)
8573 lt_cv_sys_dlopen_deplibs=yes
8574 ;;
8575 osf[[1234]]*)
8576 # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
8577 # it did *not* use an RPATH in a shared library to find objects the
8578 # library depends on, so we explicitly say `no'.
8579 lt_cv_sys_dlopen_deplibs=no
8580 ;;
8581 osf5.0|osf5.0a|osf5.1)
8582 # dlopen *does* load deplibs and with the right loader patch applied
8583 # it even uses RPATH in a shared library to search for shared objects
8584 # that the library depends on, but there's no easy way to know if that
8585 # patch is installed. Since this is the case, all we can really
8586 # say is unknown -- it depends on the patch being installed. If
8587 # it is, this changes to `yes'. Without it, it would be `no'.
8588 lt_cv_sys_dlopen_deplibs=unknown
8589 ;;
8590 osf*)
8591 # the two cases above should catch all versions of osf <= 5.1. Read
8592 # the comments above for what we know about them.
8593 # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
8594 # is used to find them so we can finally say `yes'.
8595 lt_cv_sys_dlopen_deplibs=yes
8596 ;;
8597 qnx*)
8598 lt_cv_sys_dlopen_deplibs=yes
8599 ;;
8600 solaris*)
8601 lt_cv_sys_dlopen_deplibs=yes
8602 ;;
8603 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8604 libltdl_cv_sys_dlopen_deplibs=yes
8605 ;;
8606 esac
8607 ])
8608 if test "$lt_cv_sys_dlopen_deplibs" != yes; then
8609 AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
8610 [Define if the OS needs help to load dependent libraries for dlopen().])
8611 fi
8612 ])# LT_SYS_DLOPEN_DEPLIBS
8613
8614 # Old name:
8615 AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
8616 dnl aclocal-1.4 backwards compatibility:
8617 dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
8618
8619
8620 # LT_SYS_MODULE_EXT
8621 # -----------------
8622 AC_DEFUN([LT_SYS_MODULE_EXT],
8623 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8624 AC_CACHE_CHECK([which extension is used for runtime loadable modules],
8625 [libltdl_cv_shlibext],
8626 [
8627 module=yes
8628 eval libltdl_cv_shlibext=$shrext_cmds
8629 module=no
8630 eval libltdl_cv_shrext=$shrext_cmds
8631 ])
8632 if test -n "$libltdl_cv_shlibext"; then
8633 m4_pattern_allow([LT_MODULE_EXT])dnl
8634 AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
8635 [Define to the extension used for runtime loadable modules, say, ".so".])
8636 fi
8637 if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then
8638 m4_pattern_allow([LT_SHARED_EXT])dnl
8639 AC_DEFINE_UNQUOTED([LT_SHARED_EXT], ["$libltdl_cv_shrext"],
8640 [Define to the shared library suffix, say, ".dylib".])
8641 fi
8642 ])# LT_SYS_MODULE_EXT
8643
8644 # Old name:
8645 AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
8646 dnl aclocal-1.4 backwards compatibility:
8647 dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
8648
8649
8650 # LT_SYS_MODULE_PATH
8651 # ------------------
8652 AC_DEFUN([LT_SYS_MODULE_PATH],
8653 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8654 AC_CACHE_CHECK([which variable specifies run-time module search path],
8655 [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
8656 if test -n "$lt_cv_module_path_var"; then
8657 m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
8658 AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
8659 [Define to the name of the environment variable that determines the run-time module search path.])
8660 fi
8661 ])# LT_SYS_MODULE_PATH
8662
8663 # Old name:
8664 AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
8665 dnl aclocal-1.4 backwards compatibility:
8666 dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
8667
8668
8669 # LT_SYS_DLSEARCH_PATH
8670 # --------------------
8671 AC_DEFUN([LT_SYS_DLSEARCH_PATH],
8672 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8673 AC_CACHE_CHECK([for the default library search path],
8674 [lt_cv_sys_dlsearch_path],
8675 [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
8676 if test -n "$lt_cv_sys_dlsearch_path"; then
8677 sys_dlsearch_path=
8678 for dir in $lt_cv_sys_dlsearch_path; do
8679 if test -z "$sys_dlsearch_path"; then
8680 sys_dlsearch_path="$dir"
8681 else
8682 sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
8683 fi
8684 done
8685 m4_pattern_allow([LT_DLSEARCH_PATH])dnl
8686 AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
8687 [Define to the system default library search path.])
8688 fi
8689 ])# LT_SYS_DLSEARCH_PATH
8690
8691 # Old name:
8692 AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
8693 dnl aclocal-1.4 backwards compatibility:
8694 dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
8695
8696
8697 # _LT_CHECK_DLPREOPEN
8698 # -------------------
8699 m4_defun([_LT_CHECK_DLPREOPEN],
8700 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8701 AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
8702 [libltdl_cv_preloaded_symbols],
8703 [if test -n "$lt_cv_sys_global_symbol_pipe"; then
8704 libltdl_cv_preloaded_symbols=yes
8705 else
8706 libltdl_cv_preloaded_symbols=no
8707 fi
8708 ])
8709 if test x"$libltdl_cv_preloaded_symbols" = xyes; then
8710 AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
8711 [Define if libtool can extract symbol lists from object files.])
8712 fi
8713 ])# _LT_CHECK_DLPREOPEN
8714
8715
8716 # LT_LIB_DLLOAD
8717 # -------------
8718 AC_DEFUN([LT_LIB_DLLOAD],
8719 [m4_pattern_allow([^LT_DLLOADERS$])
8720 LT_DLLOADERS=
8721 AC_SUBST([LT_DLLOADERS])
8722
8723 AC_LANG_PUSH([C])
8724
8725 LIBADD_DLOPEN=
8726 AC_SEARCH_LIBS([dlopen], [dl],
8727 [AC_DEFINE([HAVE_LIBDL], [1],
8728 [Define if you have the libdl library or equivalent.])
8729 if test "$ac_cv_search_dlopen" != "none required" ; then
8730 LIBADD_DLOPEN="-ldl"
8731 fi
8732 libltdl_cv_lib_dl_dlopen="yes"
8733 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8734 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
8735 # include <dlfcn.h>
8736 #endif
8737 ]], [[dlopen(0, 0);]])],
8738 [AC_DEFINE([HAVE_LIBDL], [1],
8739 [Define if you have the libdl library or equivalent.])
8740 libltdl_cv_func_dlopen="yes"
8741 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8742 [AC_CHECK_LIB([svld], [dlopen],
8743 [AC_DEFINE([HAVE_LIBDL], [1],
8744 [Define if you have the libdl library or equivalent.])
8745 LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
8746 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
8747 if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
8748 then
8749 lt_save_LIBS="$LIBS"
8750 LIBS="$LIBS $LIBADD_DLOPEN"
8751 AC_CHECK_FUNCS([dlerror])
8752 LIBS="$lt_save_LIBS"
8753 fi
8754 AC_SUBST([LIBADD_DLOPEN])
8755
8756 LIBADD_SHL_LOAD=
8757 AC_CHECK_FUNC([shl_load],
8758 [AC_DEFINE([HAVE_SHL_LOAD], [1],
8759 [Define if you have the shl_load function.])
8760 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
8761 [AC_CHECK_LIB([dld], [shl_load],
8762 [AC_DEFINE([HAVE_SHL_LOAD], [1],
8763 [Define if you have the shl_load function.])
8764 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
8765 LIBADD_SHL_LOAD="-ldld"])])
8766 AC_SUBST([LIBADD_SHL_LOAD])
8767
8768 case $host_os in
8769 darwin[[1567]].*)
8770 # We only want this for pre-Mac OS X 10.4.
8771 AC_CHECK_FUNC([_dyld_func_lookup],
8772 [AC_DEFINE([HAVE_DYLD], [1],
8773 [Define if you have the _dyld_func_lookup function.])
8774 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
8775 ;;
8776 beos*)
8777 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
8778 ;;
8779 cygwin* | mingw* | os2* | pw32*)
8780 AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
8781 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
8782 ;;
8783 esac
8784
8785 AC_CHECK_LIB([dld], [dld_link],
8786 [AC_DEFINE([HAVE_DLD], [1],
8787 [Define if you have the GNU dld library.])
8788 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
8789 AC_SUBST([LIBADD_DLD_LINK])
8790
8791 m4_pattern_allow([^LT_DLPREOPEN$])
8792 LT_DLPREOPEN=
8793 if test -n "$LT_DLLOADERS"
8794 then
8795 for lt_loader in $LT_DLLOADERS; do
8796 LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
8797 done
8798 AC_DEFINE([HAVE_LIBDLLOADER], [1],
8799 [Define if libdlloader will be built on this platform])
8800 fi
8801 AC_SUBST([LT_DLPREOPEN])
8802
8803 dnl This isn't used anymore, but set it for backwards compatibility
8804 LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
8805 AC_SUBST([LIBADD_DL])
8806
8807 AC_LANG_POP
8808 ])# LT_LIB_DLLOAD
8809
8810 # Old name:
8811 AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
8812 dnl aclocal-1.4 backwards compatibility:
8813 dnl AC_DEFUN([AC_LTDL_DLLIB], [])
8814
8815
8816 # LT_SYS_SYMBOL_USCORE
8817 # --------------------
8818 # does the compiler prefix global symbols with an underscore?
8819 AC_DEFUN([LT_SYS_SYMBOL_USCORE],
8820 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8821 AC_CACHE_CHECK([for _ prefix in compiled symbols],
8822 [lt_cv_sys_symbol_underscore],
8823 [lt_cv_sys_symbol_underscore=no
8824 cat > conftest.$ac_ext <<_LT_EOF
8825 void nm_test_func(){}
8826 int main(){nm_test_func;return 0;}
8827 _LT_EOF
8828 if AC_TRY_EVAL(ac_compile); then
8829 # Now try to grab the symbols.
8830 ac_nlist=conftest.nm
8831 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
8832 # See whether the symbols have a leading underscore.
8833 if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
8834 lt_cv_sys_symbol_underscore=yes
8835 else
8836 if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
8837 :
8838 else
8839 echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
8840 fi
8841 fi
8842 else
8843 echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
8844 fi
8845 else
8846 echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
8847 cat conftest.c >&AS_MESSAGE_LOG_FD
8848 fi
8849 rm -rf conftest*
8850 ])
8851 sys_symbol_underscore=$lt_cv_sys_symbol_underscore
8852 AC_SUBST([sys_symbol_underscore])
8853 ])# LT_SYS_SYMBOL_USCORE
8854
8855 # Old name:
8856 AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
8857 dnl aclocal-1.4 backwards compatibility:
8858 dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
8859
8860
8861 # LT_FUNC_DLSYM_USCORE
8862 # --------------------
8863 AC_DEFUN([LT_FUNC_DLSYM_USCORE],
8864 [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8865 if test x"$lt_cv_sys_symbol_underscore" = xyes; then
8866 if test x"$libltdl_cv_func_dlopen" = xyes ||
8867 test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
8868 AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
8869 [libltdl_cv_need_uscore],
8870 [libltdl_cv_need_uscore=unknown
8871 save_LIBS="$LIBS"
8872 LIBS="$LIBS $LIBADD_DLOPEN"
8873 _LT_TRY_DLOPEN_SELF(
8874 [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
8875 [], [libltdl_cv_need_uscore=cross])
8876 LIBS="$save_LIBS"
8877 ])
8878 fi
8879 fi
8880
8881 if test x"$libltdl_cv_need_uscore" = xyes; then
8882 AC_DEFINE([NEED_USCORE], [1],
8883 [Define if dlsym() requires a leading underscore in symbol names.])
8884 fi
8885 ])# LT_FUNC_DLSYM_USCORE
8886
8887 # Old name:
8888 AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
8889 dnl aclocal-1.4 backwards compatibility:
8890 dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
8891
8892 # Helper functions for option handling. -*- Autoconf -*-
8893 #
8894 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8895 # Inc.
8896 # Written by Gary V. Vaughan, 2004
8897 #
8898 # This file is free software; the Free Software Foundation gives
8899 # unlimited permission to copy and/or distribute it, with or without
8900 # modifications, as long as this notice is preserved.
8901
8902 # serial 7 ltoptions.m4
8903
8904 # This is to help aclocal find these macros, as it can't see m4_define.
8905 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8906
8907
8908 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8909 # ------------------------------------------
8910 m4_define([_LT_MANGLE_OPTION],
8911 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8912
8913
8914 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8915 # ---------------------------------------
8916 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8917 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
8918 # saved as a flag.
8919 m4_define([_LT_SET_OPTION],
8920 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8921 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8922 _LT_MANGLE_DEFUN([$1], [$2]),
8923 [m4_warning([Unknown $1 option `$2'])])[]dnl
8924 ])
8925
8926
8927 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8928 # ------------------------------------------------------------
8929 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8930 m4_define([_LT_IF_OPTION],
8931 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8932
8933
8934 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8935 # -------------------------------------------------------
8936 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8937 # are set.
8938 m4_define([_LT_UNLESS_OPTIONS],
8939 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8940 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8941 [m4_define([$0_found])])])[]dnl
8942 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8943 ])[]dnl
8944 ])
8945
8946
8947 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8948 # ----------------------------------------
8949 # OPTION-LIST is a space-separated list of Libtool options associated
8950 # with MACRO-NAME. If any OPTION has a matching handler declared with
8951 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8952 # the unknown option and exit.
8953 m4_defun([_LT_SET_OPTIONS],
8954 [# Set options
8955 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8956 [_LT_SET_OPTION([$1], _LT_Option)])
8957
8958 m4_if([$1],[LT_INIT],[
8959 dnl
8960 dnl Simply set some default values (i.e off) if boolean options were not
8961 dnl specified:
8962 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8963 ])
8964 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8965 ])
8966 dnl
8967 dnl If no reference was made to various pairs of opposing options, then
8968 dnl we run the default mode handler for the pair. For example, if neither
8969 dnl `shared' nor `disable-shared' was passed, we enable building of shared
8970 dnl archives by default:
8971 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8972 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8973 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8974 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8975 [_LT_ENABLE_FAST_INSTALL])
8976 ])
8977 ])# _LT_SET_OPTIONS
8978
8979
8980
8981 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8982 # -----------------------------------------
8983 m4_define([_LT_MANGLE_DEFUN],
8984 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8985
8986
8987 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8988 # -----------------------------------------------
8989 m4_define([LT_OPTION_DEFINE],
8990 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8991 ])# LT_OPTION_DEFINE
8992
8993
8994 # dlopen
8995 # ------
8996 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8997 ])
8998
8999 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9000 [_LT_SET_OPTION([LT_INIT], [dlopen])
9001 AC_DIAGNOSE([obsolete],
9002 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9003 put the `dlopen' option into LT_INIT's first parameter.])
9004 ])
9005
9006 dnl aclocal-1.4 backwards compatibility:
9007 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9008
9009
9010 # win32-dll
9011 # ---------
9012 # Declare package support for building win32 dll's.
9013 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9014 [enable_win32_dll=yes
9015
9016 case $host in
9017 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9018 AC_CHECK_TOOL(AS, as, false)
9019 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9020 AC_CHECK_TOOL(OBJDUMP, objdump, false)
9021 ;;
9022 esac
9023
9024 test -z "$AS" && AS=as
9025 _LT_DECL([], [AS], [1], [Assembler program])dnl
9026
9027 test -z "$DLLTOOL" && DLLTOOL=dlltool
9028 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9029
9030 test -z "$OBJDUMP" && OBJDUMP=objdump
9031 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9032 ])# win32-dll
9033
9034 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9035 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9036 _LT_SET_OPTION([LT_INIT], [win32-dll])
9037 AC_DIAGNOSE([obsolete],
9038 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9039 put the `win32-dll' option into LT_INIT's first parameter.])
9040 ])
9041
9042 dnl aclocal-1.4 backwards compatibility:
9043 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9044
9045
9046 # _LT_ENABLE_SHARED([DEFAULT])
9047 # ----------------------------
9048 # implement the --enable-shared flag, and supports the `shared' and
9049 # `disable-shared' LT_INIT options.
9050 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9051 m4_define([_LT_ENABLE_SHARED],
9052 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9053 AC_ARG_ENABLE([shared],
9054 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9055 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9056 [p=${PACKAGE-default}
9057 case $enableval in
9058 yes) enable_shared=yes ;;
9059 no) enable_shared=no ;;
9060 *)
9061 enable_shared=no
9062 # Look at the argument we got. We use all the common list separators.
9063 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9064 for pkg in $enableval; do
9065 IFS="$lt_save_ifs"
9066 if test "X$pkg" = "X$p"; then
9067 enable_shared=yes
9068 fi
9069 done
9070 IFS="$lt_save_ifs"
9071 ;;
9072 esac],
9073 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9074
9075 _LT_DECL([build_libtool_libs], [enable_shared], [0],
9076 [Whether or not to build shared libraries])
9077 ])# _LT_ENABLE_SHARED
9078
9079 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9080 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9081
9082 # Old names:
9083 AC_DEFUN([AC_ENABLE_SHARED],
9084 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9085 ])
9086
9087 AC_DEFUN([AC_DISABLE_SHARED],
9088 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9089 ])
9090
9091 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9092 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9093
9094 dnl aclocal-1.4 backwards compatibility:
9095 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9096 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9097
9098
9099
9100 # _LT_ENABLE_STATIC([DEFAULT])
9101 # ----------------------------
9102 # implement the --enable-static flag, and support the `static' and
9103 # `disable-static' LT_INIT options.
9104 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9105 m4_define([_LT_ENABLE_STATIC],
9106 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9107 AC_ARG_ENABLE([static],
9108 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9109 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9110 [p=${PACKAGE-default}
9111 case $enableval in
9112 yes) enable_static=yes ;;
9113 no) enable_static=no ;;
9114 *)
9115 enable_static=no
9116 # Look at the argument we got. We use all the common list separators.
9117 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9118 for pkg in $enableval; do
9119 IFS="$lt_save_ifs"
9120 if test "X$pkg" = "X$p"; then
9121 enable_static=yes
9122 fi
9123 done
9124 IFS="$lt_save_ifs"
9125 ;;
9126 esac],
9127 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9128
9129 _LT_DECL([build_old_libs], [enable_static], [0],
9130 [Whether or not to build static libraries])
9131 ])# _LT_ENABLE_STATIC
9132
9133 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9134 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9135
9136 # Old names:
9137 AC_DEFUN([AC_ENABLE_STATIC],
9138 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9139 ])
9140
9141 AC_DEFUN([AC_DISABLE_STATIC],
9142 [_LT_SET_OPTION([LT_INIT], [disable-static])
9143 ])
9144
9145 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9146 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9147
9148 dnl aclocal-1.4 backwards compatibility:
9149 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9150 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9151
9152
9153
9154 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9155 # ----------------------------------
9156 # implement the --enable-fast-install flag, and support the `fast-install'
9157 # and `disable-fast-install' LT_INIT options.
9158 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9159 m4_define([_LT_ENABLE_FAST_INSTALL],
9160 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9161 AC_ARG_ENABLE([fast-install],
9162 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9163 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9164 [p=${PACKAGE-default}
9165 case $enableval in
9166 yes) enable_fast_install=yes ;;
9167 no) enable_fast_install=no ;;
9168 *)
9169 enable_fast_install=no
9170 # Look at the argument we got. We use all the common list separators.
9171 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9172 for pkg in $enableval; do
9173 IFS="$lt_save_ifs"
9174 if test "X$pkg" = "X$p"; then
9175 enable_fast_install=yes
9176 fi
9177 done
9178 IFS="$lt_save_ifs"
9179 ;;
9180 esac],
9181 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9182
9183 _LT_DECL([fast_install], [enable_fast_install], [0],
9184 [Whether or not to optimize for fast installation])dnl
9185 ])# _LT_ENABLE_FAST_INSTALL
9186
9187 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9188 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9189
9190 # Old names:
9191 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9192 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9193 AC_DIAGNOSE([obsolete],
9194 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9195 the `fast-install' option into LT_INIT's first parameter.])
9196 ])
9197
9198 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9199 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9200 AC_DIAGNOSE([obsolete],
9201 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9202 the `disable-fast-install' option into LT_INIT's first parameter.])
9203 ])
9204
9205 dnl aclocal-1.4 backwards compatibility:
9206 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9207 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9208
9209
9210 # _LT_WITH_PIC([MODE])
9211 # --------------------
9212 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9213 # LT_INIT options.
9214 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9215 m4_define([_LT_WITH_PIC],
9216 [AC_ARG_WITH([pic],
9217 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9218 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9219 [lt_p=${PACKAGE-default}
9220 case $withval in
9221 yes|no) pic_mode=$withval ;;
9222 *)
9223 pic_mode=default
9224 # Look at the argument we got. We use all the common list separators.
9225 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9226 for lt_pkg in $withval; do
9227 IFS="$lt_save_ifs"
9228 if test "X$lt_pkg" = "X$lt_p"; then
9229 pic_mode=yes
9230 fi
9231 done
9232 IFS="$lt_save_ifs"
9233 ;;
9234 esac],
9235 [pic_mode=default])
9236
9237 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9238
9239 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9240 ])# _LT_WITH_PIC
9241
9242 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9243 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9244
9245 # Old name:
9246 AU_DEFUN([AC_LIBTOOL_PICMODE],
9247 [_LT_SET_OPTION([LT_INIT], [pic-only])
9248 AC_DIAGNOSE([obsolete],
9249 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9250 put the `pic-only' option into LT_INIT's first parameter.])
9251 ])
9252
9253 dnl aclocal-1.4 backwards compatibility:
9254 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9255
9256
9257 m4_define([_LTDL_MODE], [])
9258 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9259 [m4_define([_LTDL_MODE], [nonrecursive])])
9260 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9261 [m4_define([_LTDL_MODE], [recursive])])
9262 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9263 [m4_define([_LTDL_MODE], [subproject])])
9264
9265 m4_define([_LTDL_TYPE], [])
9266 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9267 [m4_define([_LTDL_TYPE], [installable])])
9268 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9269 [m4_define([_LTDL_TYPE], [convenience])])
9270
9271 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
9272 #
9273 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9274 # Written by Gary V. Vaughan, 2004
9275 #
9276 # This file is free software; the Free Software Foundation gives
9277 # unlimited permission to copy and/or distribute it, with or without
9278 # modifications, as long as this notice is preserved.
9279
9280 # serial 6 ltsugar.m4
9281
9282 # This is to help aclocal find these macros, as it can't see m4_define.
9283 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9284
9285
9286 # lt_join(SEP, ARG1, [ARG2...])
9287 # -----------------------------
9288 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9289 # associated separator.
9290 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9291 # versions in m4sugar had bugs.
9292 m4_define([lt_join],
9293 [m4_if([$#], [1], [],
9294 [$#], [2], [[$2]],
9295 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9296 m4_define([_lt_join],
9297 [m4_if([$#$2], [2], [],
9298 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9299
9300
9301 # lt_car(LIST)
9302 # lt_cdr(LIST)
9303 # ------------
9304 # Manipulate m4 lists.
9305 # These macros are necessary as long as will still need to support
9306 # Autoconf-2.59 which quotes differently.
9307 m4_define([lt_car], [[$1]])
9308 m4_define([lt_cdr],
9309 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9310 [$#], 1, [],
9311 [m4_dquote(m4_shift($@))])])
9312 m4_define([lt_unquote], $1)
9313
9314
9315 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9316 # ------------------------------------------
9317 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9318 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9319 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9320 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9321 # than defined and empty).
9322 #
9323 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9324 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9325 m4_define([lt_append],
9326 [m4_define([$1],
9327 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9328
9329
9330
9331 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9332 # ----------------------------------------------------------
9333 # Produce a SEP delimited list of all paired combinations of elements of
9334 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9335 # has the form PREFIXmINFIXSUFFIXn.
9336 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9337 m4_define([lt_combine],
9338 [m4_if(m4_eval([$# > 3]), [1],
9339 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9340 [[m4_foreach([_Lt_prefix], [$2],
9341 [m4_foreach([_Lt_suffix],
9342 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9343 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9344
9345
9346 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9347 # -----------------------------------------------------------------------
9348 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9349 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9350 m4_define([lt_if_append_uniq],
9351 [m4_ifdef([$1],
9352 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9353 [lt_append([$1], [$2], [$3])$4],
9354 [$5])],
9355 [lt_append([$1], [$2], [$3])$4])])
9356
9357
9358 # lt_dict_add(DICT, KEY, VALUE)
9359 # -----------------------------
9360 m4_define([lt_dict_add],
9361 [m4_define([$1($2)], [$3])])
9362
9363
9364 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9365 # --------------------------------------------
9366 m4_define([lt_dict_add_subkey],
9367 [m4_define([$1($2:$3)], [$4])])
9368
9369
9370 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9371 # ----------------------------------
9372 m4_define([lt_dict_fetch],
9373 [m4_ifval([$3],
9374 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9375 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9376
9377
9378 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9379 # -----------------------------------------------------------------
9380 m4_define([lt_if_dict_fetch],
9381 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9382 [$5],
9383 [$6])])
9384
9385
9386 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9387 # --------------------------------------------------------------
9388 m4_define([lt_dict_filter],
9389 [m4_if([$5], [], [],
9390 [lt_join(m4_quote(m4_default([$4], [[, ]])),
9391 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9392 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9393 ])
9394
9395 # ltversion.m4 -- version numbers -*- Autoconf -*-
9396 #
9397 # Copyright (C) 2004 Free Software Foundation, Inc.
9398 # Written by Scott James Remnant, 2004
9399 #
9400 # This file is free software; the Free Software Foundation gives
9401 # unlimited permission to copy and/or distribute it, with or without
9402 # modifications, as long as this notice is preserved.
9403
9404 # @configure_input@
9405
9406 # serial 3337 ltversion.m4
9407 # This file is part of GNU Libtool
9408
9409 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9410 m4_define([LT_PACKAGE_REVISION], [1.3337])
9411
9412 AC_DEFUN([LTVERSION_VERSION],
9413 [macro_version='2.4.2'
9414 macro_revision='1.3337'
9415 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9416 _LT_DECL(, macro_revision, 0)
9417 ])
9418
9419 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9420 #
9421 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9422 # Written by Scott James Remnant, 2004.
9423 #
9424 # This file is free software; the Free Software Foundation gives
9425 # unlimited permission to copy and/or distribute it, with or without
9426 # modifications, as long as this notice is preserved.
9427
9428 # serial 5 lt~obsolete.m4
9429
9430 # These exist entirely to fool aclocal when bootstrapping libtool.
9431 #
9432 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9433 # which have later been changed to m4_define as they aren't part of the
9434 # exported API, or moved to Autoconf or Automake where they belong.
9435 #
9436 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
9437 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9438 # using a macro with the same name in our local m4/libtool.m4 it'll
9439 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9440 # and doesn't know about Autoconf macros at all.)
9441 #
9442 # So we provide this file, which has a silly filename so it's always
9443 # included after everything else. This provides aclocal with the
9444 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9445 # because those macros already exist, or will be overwritten later.
9446 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9447 #
9448 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9449 # Yes, that means every name once taken will need to remain here until
9450 # we give up compatibility with versions before 1.7, at which point
9451 # we need to keep only those names which we still refer to.
9452
9453 # This is to help aclocal find these macros, as it can't see m4_define.
9454 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9455
9456 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9457 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9458 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9459 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9460 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9461 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9462 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9463 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9464 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9465 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9466 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9467 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9468 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9469 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9470 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9471 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9472 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9473 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9474 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9475 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9476 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9477 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9478 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9479 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9480 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9481 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9482 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9483 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9484 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9485 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9486 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9487 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9488 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9489 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9490 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9491 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9492 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9493 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9494 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9495 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9496 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9497 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9498 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9499 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9500 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9501 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9502 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9503 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9504 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9505 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9506 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9507 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9508 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9509 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9510 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9511 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9512 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9513 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9514 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
9515 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
9516 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
9517
9518 # Configure sysconftool
9519 # Copyright 2000-2005 Double Precision, Inc. See COPYING for
9520 # distribution information.
9521 #
9522 # AC_PROG_SYSCONFTOOL
9523
9524 AC_DEFUN([AC_PROG_SYSCONFTOOL],
9525 [
9526
9527 AC_PATH_PROGS(SYSCONFTOOL_PERL, perl5 perl, perl)
9528
9529 if test "$SYSCONFTOOL_PERL" = "perl"
9530 then
9531 AC_ERROR(perl not found - please install perl)
9532 fi
9533
9534 AC_MSG_CHECKING(for sysconftool...)
9535 SYSCONFTOOL=""
9536 for sysconf_dir in $ac_aux_dir . .. ../..
9537 do
9538 if test -f $srcdir/$sysconf_dir/sysconftool
9539 then
9540 SYSCONFTOOL=$srcdir/$sysconf_dir/sysconftool
9541 break
9542 fi
9543 done
9544
9545 if test "$SYSCONFTOOL" = ""
9546 then
9547 AC_ERROR(sysconftool missing - not in the package)
9548 fi
9549
9550 AC_MSG_RESULT( $SYSCONFTOOL)
9551 SYSCONFTOOL="$SYSCONFTOOL_PERL $SYSCONFTOOL"
9552 AC_SUBST(SYSCONFTOOL)
9553 ]
9554 )
9555
9556 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
9557 #
9558 # This file is free software; the Free Software Foundation
9559 # gives unlimited permission to copy and/or distribute it,
9560 # with or without modifications, as long as this notice is preserved.
9561
9562 # AM_AUTOMAKE_VERSION(VERSION)
9563 # ----------------------------
9564 # Automake X.Y traces this macro to ensure aclocal.m4 has been
9565 # generated from the m4 files accompanying Automake X.Y.
9566 # (This private macro should not be called outside this file.)
9567 AC_DEFUN([AM_AUTOMAKE_VERSION],
9568 [am__api_version='1.13'
9569 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9570 dnl require some minimum version. Point them to the right macro.
9571 m4_if([$1], [1.13.4], [],
9572 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9573 ])
9574
9575 # _AM_AUTOCONF_VERSION(VERSION)
9576 # -----------------------------
9577 # aclocal traces this macro to find the Autoconf version.
9578 # This is a private macro too. Using m4_define simplifies
9579 # the logic in aclocal, which can simply ignore this definition.
9580 m4_define([_AM_AUTOCONF_VERSION], [])
9581
9582 # AM_SET_CURRENT_AUTOMAKE_VERSION
9583 # -------------------------------
9584 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9585 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9586 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9587 [AM_AUTOMAKE_VERSION([1.13.4])dnl
9588 m4_ifndef([AC_AUTOCONF_VERSION],
9589 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9590 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9591
9592 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
9593
9594 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
9595 #
9596 # This file is free software; the Free Software Foundation
9597 # gives unlimited permission to copy and/or distribute it,
9598 # with or without modifications, as long as this notice is preserved.
9599
9600 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9601 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
9602 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
9603 #
9604 # Of course, Automake must honor this variable whenever it calls a
9605 # tool from the auxiliary directory. The problem is that $srcdir (and
9606 # therefore $ac_aux_dir as well) can be either absolute or relative,
9607 # depending on how configure is run. This is pretty annoying, since
9608 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
9609 # source directory, any form will work fine, but in subdirectories a
9610 # relative path needs to be adjusted first.
9611 #
9612 # $ac_aux_dir/missing
9613 # fails when called from a subdirectory if $ac_aux_dir is relative
9614 # $top_srcdir/$ac_aux_dir/missing
9615 # fails if $ac_aux_dir is absolute,
9616 # fails when called from a subdirectory in a VPATH build with
9617 # a relative $ac_aux_dir
9618 #
9619 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9620 # are both prefixed by $srcdir. In an in-source build this is usually
9621 # harmless because $srcdir is '.', but things will broke when you
9622 # start a VPATH build or use an absolute $srcdir.
9623 #
9624 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9625 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
9626 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9627 # and then we would define $MISSING as
9628 # MISSING="\${SHELL} $am_aux_dir/missing"
9629 # This will work as long as MISSING is not called from configure, because
9630 # unfortunately $(top_srcdir) has no meaning in configure.
9631 # However there are other variables, like CC, which are often used in
9632 # configure, and could therefore not use this "fixed" $ac_aux_dir.
9633 #
9634 # Another solution, used here, is to always expand $ac_aux_dir to an
9635 # absolute PATH. The drawback is that using absolute paths prevent a
9636 # configured tree to be moved without reconfiguration.
9637
9638 AC_DEFUN([AM_AUX_DIR_EXPAND],
9639 [dnl Rely on autoconf to set up CDPATH properly.
9640 AC_PREREQ([2.50])dnl
9641 # expand $ac_aux_dir to an absolute path
9642 am_aux_dir=`cd $ac_aux_dir && pwd`
9643 ])
9644
9645 # AM_CONDITIONAL -*- Autoconf -*-
9646
9647 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
9648 #
9649 # This file is free software; the Free Software Foundation
9650 # gives unlimited permission to copy and/or distribute it,
9651 # with or without modifications, as long as this notice is preserved.
9652
9653 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
9654 # -------------------------------------
9655 # Define a conditional.
9656 AC_DEFUN([AM_CONDITIONAL],
9657 [AC_PREREQ([2.52])dnl
9658 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
9659 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9660 AC_SUBST([$1_TRUE])dnl
9661 AC_SUBST([$1_FALSE])dnl
9662 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
9663 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
9664 m4_define([_AM_COND_VALUE_$1], [$2])dnl
9665 if $2; then
9666 $1_TRUE=
9667 $1_FALSE='#'
9668 else
9669 $1_TRUE='#'
9670 $1_FALSE=
9671 fi
9672 AC_CONFIG_COMMANDS_PRE(
9673 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9674 AC_MSG_ERROR([[conditional "$1" was never defined.
9675 Usually this means the macro was only invoked conditionally.]])
9676 fi])])
9677
9678 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
9679 #
9680 # This file is free software; the Free Software Foundation
9681 # gives unlimited permission to copy and/or distribute it,
9682 # with or without modifications, as long as this notice is preserved.
9683
9684
9685 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
9686 # written in clear, in which case automake, when reading aclocal.m4,
9687 # will think it sees a *use*, and therefore will trigger all it's
9688 # C support machinery. Also note that it means that autoscan, seeing
9689 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9690
9691
9692 # _AM_DEPENDENCIES(NAME)
9693 # ----------------------
9694 # See how the compiler implements dependency checking.
9695 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
9696 # We try a few techniques and use that to set a single cache variable.
9697 #
9698 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9699 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9700 # dependency, and given that the user is not expected to run this macro,
9701 # just rely on AC_PROG_CC.
9702 AC_DEFUN([_AM_DEPENDENCIES],
9703 [AC_REQUIRE([AM_SET_DEPDIR])dnl
9704 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9705 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9706 AC_REQUIRE([AM_DEP_TRACK])dnl
9707
9708 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
9709 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
9710 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9711 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
9712 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
9713 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
9714 [depcc="$$1" am_compiler_list=])
9715
9716 AC_CACHE_CHECK([dependency style of $depcc],
9717 [am_cv_$1_dependencies_compiler_type],
9718 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9719 # We make a subdir and do the tests there. Otherwise we can end up
9720 # making bogus files that we don't know about and never remove. For
9721 # instance it was reported that on HP-UX the gcc test will end up
9722 # making a dummy file named 'D' -- because '-MD' means "put the output
9723 # in D".
9724 rm -rf conftest.dir
9725 mkdir conftest.dir
9726 # Copy depcomp to subdir because otherwise we won't find it if we're
9727 # using a relative directory.
9728 cp "$am_depcomp" conftest.dir
9729 cd conftest.dir
9730 # We will build objects and dependencies in a subdirectory because
9731 # it helps to detect inapplicable dependency modes. For instance
9732 # both Tru64's cc and ICC support -MD to output dependencies as a
9733 # side effect of compilation, but ICC will put the dependencies in
9734 # the current directory while Tru64 will put them in the object
9735 # directory.
9736 mkdir sub
9737
9738 am_cv_$1_dependencies_compiler_type=none
9739 if test "$am_compiler_list" = ""; then
9740 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9741 fi
9742 am__universal=false
9743 m4_case([$1], [CC],
9744 [case " $depcc " in #(
9745 *\ -arch\ *\ -arch\ *) am__universal=true ;;
9746 esac],
9747 [CXX],
9748 [case " $depcc " in #(
9749 *\ -arch\ *\ -arch\ *) am__universal=true ;;
9750 esac])
9751
9752 for depmode in $am_compiler_list; do
9753 # Setup a source with many dependencies, because some compilers
9754 # like to wrap large dependency lists on column 80 (with \), and
9755 # we should not choose a depcomp mode which is confused by this.
9756 #
9757 # We need to recreate these files for each test, as the compiler may
9758 # overwrite some of them when testing with obscure command lines.
9759 # This happens at least with the AIX C compiler.
9760 : > sub/conftest.c
9761 for i in 1 2 3 4 5 6; do
9762 echo '#include "conftst'$i'.h"' >> sub/conftest.c
9763 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
9764 # Solaris 10 /bin/sh.
9765 echo '/* dummy */' > sub/conftst$i.h
9766 done
9767 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9768
9769 # We check with '-c' and '-o' for the sake of the "dashmstdout"
9770 # mode. It turns out that the SunPro C++ compiler does not properly
9771 # handle '-M -o', and we need to detect this. Also, some Intel
9772 # versions had trouble with output in subdirs.
9773 am__obj=sub/conftest.${OBJEXT-o}
9774 am__minus_obj="-o $am__obj"
9775 case $depmode in
9776 gcc)
9777 # This depmode causes a compiler race in universal mode.
9778 test "$am__universal" = false || continue
9779 ;;
9780 nosideeffect)
9781 # After this tag, mechanisms are not by side-effect, so they'll
9782 # only be used when explicitly requested.
9783 if test "x$enable_dependency_tracking" = xyes; then
9784 continue
9785 else
9786 break
9787 fi
9788 ;;
9789 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
9790 # This compiler won't grok '-c -o', but also, the minuso test has
9791 # not run yet. These depmodes are late enough in the game, and
9792 # so weak that their functioning should not be impacted.
9793 am__obj=conftest.${OBJEXT-o}
9794 am__minus_obj=
9795 ;;
9796 none) break ;;
9797 esac
9798 if depmode=$depmode \
9799 source=sub/conftest.c object=$am__obj \
9800 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9801 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9802 >/dev/null 2>conftest.err &&
9803 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9804 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9805 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9806 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9807 # icc doesn't choke on unknown options, it will just issue warnings
9808 # or remarks (even with -Werror). So we grep stderr for any message
9809 # that says an option was ignored or not supported.
9810 # When given -MP, icc 7.0 and 7.1 complain thusly:
9811 # icc: Command line warning: ignoring option '-M'; no argument required
9812 # The diagnosis changed in icc 8.0:
9813 # icc: Command line remark: option '-MP' not supported
9814 if (grep 'ignoring option' conftest.err ||
9815 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9816 am_cv_$1_dependencies_compiler_type=$depmode
9817 break
9818 fi
9819 fi
9820 done
9821
9822 cd ..
9823 rm -rf conftest.dir
9824 else
9825 am_cv_$1_dependencies_compiler_type=none
9826 fi
9827 ])
9828 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9829 AM_CONDITIONAL([am__fastdep$1], [
9830 test "x$enable_dependency_tracking" != xno \
9831 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9832 ])
9833
9834
9835 # AM_SET_DEPDIR
9836 # -------------
9837 # Choose a directory name for dependency files.
9838 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
9839 AC_DEFUN([AM_SET_DEPDIR],
9840 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9841 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9842 ])
9843
9844
9845 # AM_DEP_TRACK
9846 # ------------
9847 AC_DEFUN([AM_DEP_TRACK],
9848 [AC_ARG_ENABLE([dependency-tracking], [dnl
9849 AS_HELP_STRING(
9850 [--enable-dependency-tracking],
9851 [do not reject slow dependency extractors])
9852 AS_HELP_STRING(
9853 [--disable-dependency-tracking],
9854 [speeds up one-time build])])
9855 if test "x$enable_dependency_tracking" != xno; then
9856 am_depcomp="$ac_aux_dir/depcomp"
9857 AMDEPBACKSLASH='\'
9858 am__nodep='_no'
9859 fi
9860 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9861 AC_SUBST([AMDEPBACKSLASH])dnl
9862 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9863 AC_SUBST([am__nodep])dnl
9864 _AM_SUBST_NOTMAKE([am__nodep])dnl
9865 ])
9866
9867 # Generate code to set up dependency tracking. -*- Autoconf -*-
9868
9869 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
9870 #
9871 # This file is free software; the Free Software Foundation
9872 # gives unlimited permission to copy and/or distribute it,
9873 # with or without modifications, as long as this notice is preserved.
9874
9875
9876 # _AM_OUTPUT_DEPENDENCY_COMMANDS
9877 # ------------------------------
9878 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9879 [{
9880 # Older Autoconf quotes --file arguments for eval, but not when files
9881 # are listed without --file. Let's play safe and only enable the eval
9882 # if we detect the quoting.
9883 case $CONFIG_FILES in
9884 *\'*) eval set x "$CONFIG_FILES" ;;
9885 *) set x $CONFIG_FILES ;;
9886 esac
9887 shift
9888 for mf
9889 do
9890 # Strip MF so we end up with the name of the file.
9891 mf=`echo "$mf" | sed -e 's/:.*$//'`
9892 # Check whether this is an Automake generated Makefile or not.
9893 # We used to match only the files named 'Makefile.in', but
9894 # some people rename them; so instead we look at the file content.
9895 # Grep'ing the first line is not enough: some people post-process
9896 # each Makefile.in and add a new line on top of each file to say so.
9897 # Grep'ing the whole file is not good either: AIX grep has a line
9898 # limit of 2048, but all sed's we know have understand at least 4000.
9899 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9900 dirpart=`AS_DIRNAME("$mf")`
9901 else
9902 continue
9903 fi
9904 # Extract the definition of DEPDIR, am__include, and am__quote
9905 # from the Makefile without running 'make'.
9906 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9907 test -z "$DEPDIR" && continue
9908 am__include=`sed -n 's/^am__include = //p' < "$mf"`
9909 test -z "$am__include" && continue
9910 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9911 # Find all dependency output files, they are included files with
9912 # $(DEPDIR) in their names. We invoke sed twice because it is the
9913 # simplest approach to changing $(DEPDIR) to its actual value in the
9914 # expansion.
9915 for file in `sed -n "
9916 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9917 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
9918 # Make sure the directory exists.
9919 test -f "$dirpart/$file" && continue
9920 fdir=`AS_DIRNAME(["$file"])`
9921 AS_MKDIR_P([$dirpart/$fdir])
9922 # echo "creating $dirpart/$file"
9923 echo '# dummy' > "$dirpart/$file"
9924 done
9925 done
9926 }
9927 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9928
9929
9930 # AM_OUTPUT_DEPENDENCY_COMMANDS
9931 # -----------------------------
9932 # This macro should only be invoked once -- use via AC_REQUIRE.
9933 #
9934 # This code is only required when automatic dependency tracking
9935 # is enabled. FIXME. This creates each '.P' file that we will
9936 # need in order to bootstrap the dependency handling code.
9937 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9938 [AC_CONFIG_COMMANDS([depfiles],
9939 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9940 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9941 ])
9942
9943 # Do all the work for Automake. -*- Autoconf -*-
9944
9945 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
9946 #
9947 # This file is free software; the Free Software Foundation
9948 # gives unlimited permission to copy and/or distribute it,
9949 # with or without modifications, as long as this notice is preserved.
9950
9951 # This macro actually does too much. Some checks are only needed if
9952 # your package does certain things. But this isn't really a big deal.
9953
9954 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9955 # AM_INIT_AUTOMAKE([OPTIONS])
9956 # -----------------------------------------------
9957 # The call with PACKAGE and VERSION arguments is the old style
9958 # call (pre autoconf-2.50), which is being phased out. PACKAGE
9959 # and VERSION should now be passed to AC_INIT and removed from
9960 # the call to AM_INIT_AUTOMAKE.
9961 # We support both call styles for the transition. After
9962 # the next Automake release, Autoconf can make the AC_INIT
9963 # arguments mandatory, and then we can depend on a new Autoconf
9964 # release and drop the old call support.
9965 AC_DEFUN([AM_INIT_AUTOMAKE],
9966 [AC_PREREQ([2.65])dnl
9967 dnl Autoconf wants to disallow AM_ names. We explicitly allow
9968 dnl the ones we care about.
9969 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9970 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9971 AC_REQUIRE([AC_PROG_INSTALL])dnl
9972 if test "`cd $srcdir && pwd`" != "`pwd`"; then
9973 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9974 # is not polluted with repeated "-I."
9975 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9976 # test to see if srcdir already configured
9977 if test -f $srcdir/config.status; then
9978 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9979 fi
9980 fi
9981
9982 # test whether we have cygpath
9983 if test -z "$CYGPATH_W"; then
9984 if (cygpath --version) >/dev/null 2>/dev/null; then
9985 CYGPATH_W='cygpath -w'
9986 else
9987 CYGPATH_W=echo
9988 fi
9989 fi
9990 AC_SUBST([CYGPATH_W])
9991
9992 # Define the identity of the package.
9993 dnl Distinguish between old-style and new-style calls.
9994 m4_ifval([$2],
9995 [AC_DIAGNOSE([obsolete],
9996 [$0: two- and three-arguments forms are deprecated.])
9997 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9998 AC_SUBST([PACKAGE], [$1])dnl
9999 AC_SUBST([VERSION], [$2])],
10000 [_AM_SET_OPTIONS([$1])dnl
10001 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10002 m4_if(
10003 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
10004 [ok:ok],,
10005 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10006 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10007 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10008
10009 _AM_IF_OPTION([no-define],,
10010 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
10011 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
10012
10013 # Some tools Automake needs.
10014 AC_REQUIRE([AM_SANITY_CHECK])dnl
10015 AC_REQUIRE([AC_ARG_PROGRAM])dnl
10016 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
10017 AM_MISSING_PROG([AUTOCONF], [autoconf])
10018 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
10019 AM_MISSING_PROG([AUTOHEADER], [autoheader])
10020 AM_MISSING_PROG([MAKEINFO], [makeinfo])
10021 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10022 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
10023 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10024 # For better backward compatibility. To be removed once Automake 1.9.x
10025 # dies out for good. For more background, see:
10026 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
10027 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
10028 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
10029 # We need awk for the "check" target. The system "awk" is bad on
10030 # some platforms.
10031 AC_REQUIRE([AC_PROG_AWK])dnl
10032 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10033 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10034 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
10035 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10036 [_AM_PROG_TAR([v7])])])
10037 _AM_IF_OPTION([no-dependencies],,
10038 [AC_PROVIDE_IFELSE([AC_PROG_CC],
10039 [_AM_DEPENDENCIES([CC])],
10040 [m4_define([AC_PROG_CC],
10041 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
10042 AC_PROVIDE_IFELSE([AC_PROG_CXX],
10043 [_AM_DEPENDENCIES([CXX])],
10044 [m4_define([AC_PROG_CXX],
10045 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
10046 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
10047 [_AM_DEPENDENCIES([OBJC])],
10048 [m4_define([AC_PROG_OBJC],
10049 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
10050 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
10051 [_AM_DEPENDENCIES([OBJCXX])],
10052 [m4_define([AC_PROG_OBJCXX],
10053 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
10054 ])
10055 AC_REQUIRE([AM_SILENT_RULES])dnl
10056 dnl The testsuite driver may need to know about EXEEXT, so add the
10057 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
10058 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
10059 AC_CONFIG_COMMANDS_PRE(dnl
10060 [m4_provide_if([_AM_COMPILER_EXEEXT],
10061 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
10062 ])
10063
10064 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
10065 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10066 dnl mangled by Autoconf and run in a shell conditional statement.
10067 m4_define([_AC_COMPILER_EXEEXT],
10068 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10069
10070
10071 # When config.status generates a header, we must update the stamp-h file.
10072 # This file resides in the same directory as the config header
10073 # that is generated. The stamp files are numbered to have different names.
10074
10075 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10076 # loop where config.status creates the headers, so we can generate
10077 # our stamp files there.
10078 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10079 [# Compute $1's index in $config_headers.
10080 _am_arg=$1
10081 _am_stamp_count=1
10082 for _am_header in $config_headers :; do
10083 case $_am_header in
10084 $_am_arg | $_am_arg:* )
10085 break ;;
10086 * )
10087 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10088 esac
10089 done
10090 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10091
10092 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10093 #
10094 # This file is free software; the Free Software Foundation
10095 # gives unlimited permission to copy and/or distribute it,
10096 # with or without modifications, as long as this notice is preserved.
10097
10098 # AM_PROG_INSTALL_SH
10099 # ------------------
10100 # Define $install_sh.
10101 AC_DEFUN([AM_PROG_INSTALL_SH],
10102 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10103 if test x"${install_sh}" != xset; then
10104 case $am_aux_dir in
10105 *\ * | *\ *)
10106 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10107 *)
10108 install_sh="\${SHELL} $am_aux_dir/install-sh"
10109 esac
10110 fi
10111 AC_SUBST([install_sh])])
10112
10113 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
10114 #
10115 # This file is free software; the Free Software Foundation
10116 # gives unlimited permission to copy and/or distribute it,
10117 # with or without modifications, as long as this notice is preserved.
10118
10119 # Check whether the underlying file-system supports filenames
10120 # with a leading dot. For instance MS-DOS doesn't.
10121 AC_DEFUN([AM_SET_LEADING_DOT],
10122 [rm -rf .tst 2>/dev/null
10123 mkdir .tst 2>/dev/null
10124 if test -d .tst; then
10125 am__leading_dot=.
10126 else
10127 am__leading_dot=_
10128 fi
10129 rmdir .tst 2>/dev/null
10130 AC_SUBST([am__leading_dot])])
10131
10132 # Check to see how 'make' treats includes. -*- Autoconf -*-
10133
10134 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10135 #
10136 # This file is free software; the Free Software Foundation
10137 # gives unlimited permission to copy and/or distribute it,
10138 # with or without modifications, as long as this notice is preserved.
10139
10140 # AM_MAKE_INCLUDE()
10141 # -----------------
10142 # Check to see how make treats includes.
10143 AC_DEFUN([AM_MAKE_INCLUDE],
10144 [am_make=${MAKE-make}
10145 cat > confinc << 'END'
10146 am__doit:
10147 @echo this is the am__doit target
10148 .PHONY: am__doit
10149 END
10150 # If we don't find an include directive, just comment out the code.
10151 AC_MSG_CHECKING([for style of include used by $am_make])
10152 am__include="#"
10153 am__quote=
10154 _am_result=none
10155 # First try GNU make style include.
10156 echo "include confinc" > confmf
10157 # Ignore all kinds of additional output from 'make'.
10158 case `$am_make -s -f confmf 2> /dev/null` in #(
10159 *the\ am__doit\ target*)
10160 am__include=include
10161 am__quote=
10162 _am_result=GNU
10163 ;;
10164 esac
10165 # Now try BSD make style include.
10166 if test "$am__include" = "#"; then
10167 echo '.include "confinc"' > confmf
10168 case `$am_make -s -f confmf 2> /dev/null` in #(
10169 *the\ am__doit\ target*)
10170 am__include=.include
10171 am__quote="\""
10172 _am_result=BSD
10173 ;;
10174 esac
10175 fi
10176 AC_SUBST([am__include])
10177 AC_SUBST([am__quote])
10178 AC_MSG_RESULT([$_am_result])
10179 rm -f confinc confmf
10180 ])
10181
10182 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
10183
10184 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
10185 #
10186 # This file is free software; the Free Software Foundation
10187 # gives unlimited permission to copy and/or distribute it,
10188 # with or without modifications, as long as this notice is preserved.
10189
10190 # AM_MISSING_PROG(NAME, PROGRAM)
10191 # ------------------------------
10192 AC_DEFUN([AM_MISSING_PROG],
10193 [AC_REQUIRE([AM_MISSING_HAS_RUN])
10194 $1=${$1-"${am_missing_run}$2"}
10195 AC_SUBST($1)])
10196
10197 # AM_MISSING_HAS_RUN
10198 # ------------------
10199 # Define MISSING if not defined so far and test if it is modern enough.
10200 # If it is, set am_missing_run to use it, otherwise, to nothing.
10201 AC_DEFUN([AM_MISSING_HAS_RUN],
10202 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10203 AC_REQUIRE_AUX_FILE([missing])dnl
10204 if test x"${MISSING+set}" != xset; then
10205 case $am_aux_dir in
10206 *\ * | *\ *)
10207 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10208 *)
10209 MISSING="\${SHELL} $am_aux_dir/missing" ;;
10210 esac
10211 fi
10212 # Use eval to expand $SHELL
10213 if eval "$MISSING --is-lightweight"; then
10214 am_missing_run="$MISSING "
10215 else
10216 am_missing_run=
10217 AC_MSG_WARN(['missing' script is too old or missing])
10218 fi
10219 ])
10220
10221 # -*- Autoconf -*-
10222 # Obsolete and "removed" macros, that must however still report explicit
10223 # error messages when used, to smooth transition.
10224 #
10225 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
10226 #
10227 # This file is free software; the Free Software Foundation
10228 # gives unlimited permission to copy and/or distribute it,
10229 # with or without modifications, as long as this notice is preserved.
10230
10231 AC_DEFUN([AM_CONFIG_HEADER],
10232 [AC_DIAGNOSE([obsolete],
10233 ['$0': this macro is obsolete.
10234 You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
10235 AC_CONFIG_HEADERS($@)])
10236
10237 AC_DEFUN([AM_PROG_CC_STDC],
10238 [AC_PROG_CC
10239 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
10240 AC_DIAGNOSE([obsolete],
10241 ['$0': this macro is obsolete.
10242 You should simply use the 'AC][_PROG_CC' macro instead.
10243 Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
10244 but upon 'ac_cv_prog_cc_stdc'.])])
10245
10246 AC_DEFUN([AM_C_PROTOTYPES],
10247 [AC_FATAL([automatic de-ANSI-fication support has been removed])])
10248 AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
10249
10250 # Helper functions for option handling. -*- Autoconf -*-
10251
10252 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10253 #
10254 # This file is free software; the Free Software Foundation
10255 # gives unlimited permission to copy and/or distribute it,
10256 # with or without modifications, as long as this notice is preserved.
10257
10258 # _AM_MANGLE_OPTION(NAME)
10259 # -----------------------
10260 AC_DEFUN([_AM_MANGLE_OPTION],
10261 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10262
10263 # _AM_SET_OPTION(NAME)
10264 # --------------------
10265 # Set option NAME. Presently that only means defining a flag for this option.
10266 AC_DEFUN([_AM_SET_OPTION],
10267 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
10268
10269 # _AM_SET_OPTIONS(OPTIONS)
10270 # ------------------------
10271 # OPTIONS is a space-separated list of Automake options.
10272 AC_DEFUN([_AM_SET_OPTIONS],
10273 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10274
10275 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10276 # -------------------------------------------
10277 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10278 AC_DEFUN([_AM_IF_OPTION],
10279 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10280
10281 # Check to make sure that the build environment is sane. -*- Autoconf -*-
10282
10283 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
10284 #
10285 # This file is free software; the Free Software Foundation
10286 # gives unlimited permission to copy and/or distribute it,
10287 # with or without modifications, as long as this notice is preserved.
10288
10289 # AM_SANITY_CHECK
10290 # ---------------
10291 AC_DEFUN([AM_SANITY_CHECK],
10292 [AC_MSG_CHECKING([whether build environment is sane])
10293 # Reject unsafe characters in $srcdir or the absolute working directory
10294 # name. Accept space and tab only in the latter.
10295 am_lf='
10296 '
10297 case `pwd` in
10298 *[[\\\"\#\$\&\'\`$am_lf]]*)
10299 AC_MSG_ERROR([unsafe absolute working directory name]);;
10300 esac
10301 case $srcdir in
10302 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
10303 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
10304 esac
10305
10306 # Do 'set' in a subshell so we don't clobber the current shell's
10307 # arguments. Must try -L first in case configure is actually a
10308 # symlink; some systems play weird games with the mod time of symlinks
10309 # (eg FreeBSD returns the mod time of the symlink's containing
10310 # directory).
10311 if (
10312 am_has_slept=no
10313 for am_try in 1 2; do
10314 echo "timestamp, slept: $am_has_slept" > conftest.file
10315 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10316 if test "$[*]" = "X"; then
10317 # -L didn't work.
10318 set X `ls -t "$srcdir/configure" conftest.file`
10319 fi
10320 if test "$[*]" != "X $srcdir/configure conftest.file" \
10321 && test "$[*]" != "X conftest.file $srcdir/configure"; then
10322
10323 # If neither matched, then we have a broken ls. This can happen
10324 # if, for instance, CONFIG_SHELL is bash and it inherits a
10325 # broken ls alias from the environment. This has actually
10326 # happened. Such a system could not be considered "sane".
10327 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
10328 alias in your environment])
10329 fi
10330 if test "$[2]" = conftest.file || test $am_try -eq 2; then
10331 break
10332 fi
10333 # Just in case.
10334 sleep 1
10335 am_has_slept=yes
10336 done
10337 test "$[2]" = conftest.file
10338 )
10339 then
10340 # Ok.
10341 :
10342 else
10343 AC_MSG_ERROR([newly created file is older than distributed files!
10344 Check your system clock])
10345 fi
10346 AC_MSG_RESULT([yes])
10347 # If we didn't sleep, we still need to ensure time stamps of config.status and
10348 # generated files are strictly newer.
10349 am_sleep_pid=
10350 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
10351 ( sleep 1 ) &
10352 am_sleep_pid=$!
10353 fi
10354 AC_CONFIG_COMMANDS_PRE(
10355 [AC_MSG_CHECKING([that generated files are newer than configure])
10356 if test -n "$am_sleep_pid"; then
10357 # Hide warnings about reused PIDs.
10358 wait $am_sleep_pid 2>/dev/null
10359 fi
10360 AC_MSG_RESULT([done])])
10361 rm -f conftest.file
10362 ])
10363
10364 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
10365 #
10366 # This file is free software; the Free Software Foundation
10367 # gives unlimited permission to copy and/or distribute it,
10368 # with or without modifications, as long as this notice is preserved.
10369
10370 # AM_SILENT_RULES([DEFAULT])
10371 # --------------------------
10372 # Enable less verbose build rules; with the default set to DEFAULT
10373 # ("yes" being less verbose, "no" or empty being verbose).
10374 AC_DEFUN([AM_SILENT_RULES],
10375 [AC_ARG_ENABLE([silent-rules], [dnl
10376 AS_HELP_STRING(
10377 [--enable-silent-rules],
10378 [less verbose build output (undo: "make V=1")])
10379 AS_HELP_STRING(
10380 [--disable-silent-rules],
10381 [verbose build output (undo: "make V=0")])dnl
10382 ])
10383 case $enable_silent_rules in @%:@ (((
10384 yes) AM_DEFAULT_VERBOSITY=0;;
10385 no) AM_DEFAULT_VERBOSITY=1;;
10386 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
10387 esac
10388 dnl
10389 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
10390 dnl do not support nested variable expansions.
10391 dnl See automake bug#9928 and bug#10237.
10392 am_make=${MAKE-make}
10393 AC_CACHE_CHECK([whether $am_make supports nested variables],
10394 [am_cv_make_support_nested_variables],
10395 [if AS_ECHO([['TRUE=$(BAR$(V))
10396 BAR0=false
10397 BAR1=true
10398 V=1
10399 am__doit:
10400 @$(TRUE)
10401 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
10402 am_cv_make_support_nested_variables=yes
10403 else
10404 am_cv_make_support_nested_variables=no
10405 fi])
10406 if test $am_cv_make_support_nested_variables = yes; then
10407 dnl Using '$V' instead of '$(V)' breaks IRIX make.
10408 AM_V='$(V)'
10409 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
10410 else
10411 AM_V=$AM_DEFAULT_VERBOSITY
10412 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
10413 fi
10414 AC_SUBST([AM_V])dnl
10415 AM_SUBST_NOTMAKE([AM_V])dnl
10416 AC_SUBST([AM_DEFAULT_V])dnl
10417 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
10418 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10419 AM_BACKSLASH='\'
10420 AC_SUBST([AM_BACKSLASH])dnl
10421 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10422 ])
10423
10424 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10425 #
10426 # This file is free software; the Free Software Foundation
10427 # gives unlimited permission to copy and/or distribute it,
10428 # with or without modifications, as long as this notice is preserved.
10429
10430 # AM_PROG_INSTALL_STRIP
10431 # ---------------------
10432 # One issue with vendor 'install' (even GNU) is that you can't
10433 # specify the program used to strip binaries. This is especially
10434 # annoying in cross-compiling environments, where the build's strip
10435 # is unlikely to handle the host's binaries.
10436 # Fortunately install-sh will honor a STRIPPROG variable, so we
10437 # always use install-sh in "make install-strip", and initialize
10438 # STRIPPROG with the value of the STRIP variable (set by the user).
10439 AC_DEFUN([AM_PROG_INSTALL_STRIP],
10440 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10441 # Installed binaries are usually stripped using 'strip' when the user
10442 # run "make install-strip". However 'strip' might not be the right
10443 # tool to use in cross-compilation environments, therefore Automake
10444 # will honor the 'STRIP' environment variable to overrule this program.
10445 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
10446 if test "$cross_compiling" != no; then
10447 AC_CHECK_TOOL([STRIP], [strip], :)
10448 fi
10449 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10450 AC_SUBST([INSTALL_STRIP_PROGRAM])])
10451
10452 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
10453 #
10454 # This file is free software; the Free Software Foundation
10455 # gives unlimited permission to copy and/or distribute it,
10456 # with or without modifications, as long as this notice is preserved.
10457
10458 # _AM_SUBST_NOTMAKE(VARIABLE)
10459 # ---------------------------
10460 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10461 # This macro is traced by Automake.
10462 AC_DEFUN([_AM_SUBST_NOTMAKE])
10463
10464 # AM_SUBST_NOTMAKE(VARIABLE)
10465 # --------------------------
10466 # Public sister of _AM_SUBST_NOTMAKE.
10467 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10468
10469 # Check how to create a tarball. -*- Autoconf -*-
10470
10471 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
10472 #
10473 # This file is free software; the Free Software Foundation
10474 # gives unlimited permission to copy and/or distribute it,
10475 # with or without modifications, as long as this notice is preserved.
10476
10477 # _AM_PROG_TAR(FORMAT)
10478 # --------------------
10479 # Check how to create a tarball in format FORMAT.
10480 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
10481 #
10482 # Substitute a variable $(am__tar) that is a command
10483 # writing to stdout a FORMAT-tarball containing the directory
10484 # $tardir.
10485 # tardir=directory && $(am__tar) > result.tar
10486 #
10487 # Substitute a variable $(am__untar) that extract such
10488 # a tarball read from stdin.
10489 # $(am__untar) < result.tar
10490 #
10491 AC_DEFUN([_AM_PROG_TAR],
10492 [# Always define AMTAR for backward compatibility. Yes, it's still used
10493 # in the wild :-( We should find a proper way to deprecate it ...
10494 AC_SUBST([AMTAR], ['$${TAR-tar}'])
10495
10496 # We'll loop over all known methods to create a tar archive until one works.
10497 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10498
10499 m4_if([$1], [v7],
10500 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
10501
10502 [m4_case([$1],
10503 [ustar],
10504 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
10505 # There is notably a 21 bits limit for the UID and the GID. In fact,
10506 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
10507 # and bug#13588).
10508 am_max_uid=2097151 # 2^21 - 1
10509 am_max_gid=$am_max_uid
10510 # The $UID and $GID variables are not portable, so we need to resort
10511 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
10512 # below are definitely unexpected, so allow the users to see them
10513 # (that is, avoid stderr redirection).
10514 am_uid=`id -u || echo unknown`
10515 am_gid=`id -g || echo unknown`
10516 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
10517 if test $am_uid -le $am_max_uid; then
10518 AC_MSG_RESULT([yes])
10519 else
10520 AC_MSG_RESULT([no])
10521 _am_tools=none
10522 fi
10523 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
10524 if test $am_gid -le $am_max_gid; then
10525 AC_MSG_RESULT([yes])
10526 else
10527 AC_MSG_RESULT([no])
10528 _am_tools=none
10529 fi],
10530
10531 [pax],
10532 [],
10533
10534 [m4_fatal([Unknown tar format])])
10535
10536 AC_MSG_CHECKING([how to create a $1 tar archive])
10537
10538 # Go ahead even if we have the value already cached. We do so because we
10539 # need to set the values for the 'am__tar' and 'am__untar' variables.
10540 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10541
10542 for _am_tool in $_am_tools; do
10543 case $_am_tool in
10544 gnutar)
10545 for _am_tar in tar gnutar gtar; do
10546 AM_RUN_LOG([$_am_tar --version]) && break
10547 done
10548 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10549 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10550 am__untar="$_am_tar -xf -"
10551 ;;
10552 plaintar)
10553 # Must skip GNU tar: if it does not support --format= it doesn't create
10554 # ustar tarball either.
10555 (tar --version) >/dev/null 2>&1 && continue
10556 am__tar='tar chf - "$$tardir"'
10557 am__tar_='tar chf - "$tardir"'
10558 am__untar='tar xf -'
10559 ;;
10560 pax)
10561 am__tar='pax -L -x $1 -w "$$tardir"'
10562 am__tar_='pax -L -x $1 -w "$tardir"'
10563 am__untar='pax -r'
10564 ;;
10565 cpio)
10566 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10567 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10568 am__untar='cpio -i -H $1 -d'
10569 ;;
10570 none)
10571 am__tar=false
10572 am__tar_=false
10573 am__untar=false
10574 ;;
10575 esac
10576
10577 # If the value was cached, stop now. We just wanted to have am__tar
10578 # and am__untar set.
10579 test -n "${am_cv_prog_tar_$1}" && break
10580
10581 # tar/untar a dummy directory, and stop if the command works.
10582 rm -rf conftest.dir
10583 mkdir conftest.dir
10584 echo GrepMe > conftest.dir/file
10585 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10586 rm -rf conftest.dir
10587 if test -s conftest.tar; then
10588 AM_RUN_LOG([$am__untar <conftest.tar])
10589 AM_RUN_LOG([cat conftest.dir/file])
10590 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10591 fi
10592 done
10593 rm -rf conftest.dir
10594
10595 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10596 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10597
10598 AC_SUBST([am__tar])
10599 AC_SUBST([am__untar])
10600 ]) # _AM_PROG_TAR
10601