ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/branches/ircd-hybrid-20121027/aclocal.m4
Revision: 1587
Committed: Sat Oct 27 20:46:16 2012 UTC (11 years, 5 months ago) by michael
File size: 369686 byte(s)
Log Message:
- Moving directories

File Contents

# Content
1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
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_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17 [m4_warning([this file was generated for autoconf 2.68.
18 You have another version of autoconf. It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22 # Portability macros for glibc argz. -*- Autoconf -*-
23 #
24 # Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
25 # Written by Gary V. Vaughan <gary@gnu.org>
26 #
27 # This file is free software; the Free Software Foundation gives
28 # unlimited permission to copy and/or distribute it, with or without
29 # modifications, as long as this notice is preserved.
30
31 # serial 5 argz.m4
32
33 AC_DEFUN([gl_FUNC_ARGZ],
34 [gl_PREREQ_ARGZ
35
36 AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
37
38 AC_CHECK_TYPES([error_t],
39 [],
40 [AC_DEFINE([error_t], [int],
41 [Define to a type to use for `error_t' if it is not otherwise available.])
42 AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
43 does not typedef error_t.])],
44 [#if defined(HAVE_ARGZ_H)
45 # include <argz.h>
46 #endif])
47
48 ARGZ_H=
49 AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \
50 argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
51
52 dnl if have system argz functions, allow forced use of
53 dnl libltdl-supplied implementation (and default to do so
54 dnl on "known bad" systems). Could use a runtime check, but
55 dnl (a) detecting malloc issues is notoriously unreliable
56 dnl (b) only known system that declares argz functions,
57 dnl provides them, yet they are broken, is cygwin
58 dnl releases prior to 16-Mar-2007 (1.5.24 and earlier)
59 dnl So, it's more straightforward simply to special case
60 dnl this for known bad systems.
61 AS_IF([test -z "$ARGZ_H"],
62 [AC_CACHE_CHECK(
63 [if argz actually works],
64 [lt_cv_sys_argz_works],
65 [[case $host_os in #(
66 *cygwin*)
67 lt_cv_sys_argz_works=no
68 if test "$cross_compiling" != no; then
69 lt_cv_sys_argz_works="guessing no"
70 else
71 lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
72 save_IFS=$IFS
73 IFS=-.
74 set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
75 IFS=$save_IFS
76 lt_os_major=${2-0}
77 lt_os_minor=${3-0}
78 lt_os_micro=${4-0}
79 if test "$lt_os_major" -gt 1 \
80 || { test "$lt_os_major" -eq 1 \
81 && { test "$lt_os_minor" -gt 5 \
82 || { test "$lt_os_minor" -eq 5 \
83 && test "$lt_os_micro" -gt 24; }; }; }; then
84 lt_cv_sys_argz_works=yes
85 fi
86 fi
87 ;; #(
88 *) lt_cv_sys_argz_works=yes ;;
89 esac]])
90 AS_IF([test "$lt_cv_sys_argz_works" = yes],
91 [AC_DEFINE([HAVE_WORKING_ARGZ], 1,
92 [This value is set to 1 to indicate that the system argz facility works])],
93 [ARGZ_H=argz.h
94 AC_LIBOBJ([argz])])])
95
96 AC_SUBST([ARGZ_H])
97 ])
98
99 # Prerequisites of lib/argz.c.
100 AC_DEFUN([gl_PREREQ_ARGZ], [:])
101
102 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
103 #
104 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
105 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
106 # Inc.
107 # Written by Gordon Matzigkeit, 1996
108 #
109 # This file is free software; the Free Software Foundation gives
110 # unlimited permission to copy and/or distribute it, with or without
111 # modifications, as long as this notice is preserved.
112
113 m4_define([_LT_COPYING], [dnl
114 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
115 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
116 # Inc.
117 # Written by Gordon Matzigkeit, 1996
118 #
119 # This file is part of GNU Libtool.
120 #
121 # GNU Libtool is free software; you can redistribute it and/or
122 # modify it under the terms of the GNU General Public License as
123 # published by the Free Software Foundation; either version 2 of
124 # the License, or (at your option) any later version.
125 #
126 # As a special exception to the GNU General Public License,
127 # if you distribute this file as part of a program or library that
128 # is built using GNU Libtool, you may include this file under the
129 # same distribution terms that you use for the rest of that program.
130 #
131 # GNU Libtool is distributed in the hope that it will be useful,
132 # but WITHOUT ANY WARRANTY; without even the implied warranty of
133 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
134 # GNU General Public License for more details.
135 #
136 # You should have received a copy of the GNU General Public License
137 # along with GNU Libtool; see the file COPYING. If not, a copy
138 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
139 # obtained by writing to the Free Software Foundation, Inc.,
140 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
141 ])
142
143 # serial 57 LT_INIT
144
145
146 # LT_PREREQ(VERSION)
147 # ------------------
148 # Complain and exit if this libtool version is less that VERSION.
149 m4_defun([LT_PREREQ],
150 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
151 [m4_default([$3],
152 [m4_fatal([Libtool version $1 or higher is required],
153 63)])],
154 [$2])])
155
156
157 # _LT_CHECK_BUILDDIR
158 # ------------------
159 # Complain if the absolute build directory name contains unusual characters
160 m4_defun([_LT_CHECK_BUILDDIR],
161 [case `pwd` in
162 *\ * | *\ *)
163 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
164 esac
165 ])
166
167
168 # LT_INIT([OPTIONS])
169 # ------------------
170 AC_DEFUN([LT_INIT],
171 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
172 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
173 AC_BEFORE([$0], [LT_LANG])dnl
174 AC_BEFORE([$0], [LT_OUTPUT])dnl
175 AC_BEFORE([$0], [LTDL_INIT])dnl
176 m4_require([_LT_CHECK_BUILDDIR])dnl
177
178 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
179 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
180 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
181 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
182 dnl unless we require an AC_DEFUNed macro:
183 AC_REQUIRE([LTOPTIONS_VERSION])dnl
184 AC_REQUIRE([LTSUGAR_VERSION])dnl
185 AC_REQUIRE([LTVERSION_VERSION])dnl
186 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
187 m4_require([_LT_PROG_LTMAIN])dnl
188
189 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
190
191 dnl Parse OPTIONS
192 _LT_SET_OPTIONS([$0], [$1])
193
194 # This can be used to rebuild libtool when needed
195 LIBTOOL_DEPS="$ltmain"
196
197 # Always use our own libtool.
198 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
199 AC_SUBST(LIBTOOL)dnl
200
201 _LT_SETUP
202
203 # Only expand once:
204 m4_define([LT_INIT])
205 ])# LT_INIT
206
207 # Old names:
208 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
209 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
210 dnl aclocal-1.4 backwards compatibility:
211 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
212 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
213
214
215 # _LT_CC_BASENAME(CC)
216 # -------------------
217 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
218 m4_defun([_LT_CC_BASENAME],
219 [for cc_temp in $1""; do
220 case $cc_temp in
221 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
222 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
223 \-*) ;;
224 *) break;;
225 esac
226 done
227 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
228 ])
229
230
231 # _LT_FILEUTILS_DEFAULTS
232 # ----------------------
233 # It is okay to use these file commands and assume they have been set
234 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
235 m4_defun([_LT_FILEUTILS_DEFAULTS],
236 [: ${CP="cp -f"}
237 : ${MV="mv -f"}
238 : ${RM="rm -f"}
239 ])# _LT_FILEUTILS_DEFAULTS
240
241
242 # _LT_SETUP
243 # ---------
244 m4_defun([_LT_SETUP],
245 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
246 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
247 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
248 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
249
250 _LT_DECL([], [host_alias], [0], [The host system])dnl
251 _LT_DECL([], [host], [0])dnl
252 _LT_DECL([], [host_os], [0])dnl
253 dnl
254 _LT_DECL([], [build_alias], [0], [The build system])dnl
255 _LT_DECL([], [build], [0])dnl
256 _LT_DECL([], [build_os], [0])dnl
257 dnl
258 AC_REQUIRE([AC_PROG_CC])dnl
259 AC_REQUIRE([LT_PATH_LD])dnl
260 AC_REQUIRE([LT_PATH_NM])dnl
261 dnl
262 AC_REQUIRE([AC_PROG_LN_S])dnl
263 test -z "$LN_S" && LN_S="ln -s"
264 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
265 dnl
266 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
267 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
268 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
269 dnl
270 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
271 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
272 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
273 m4_require([_LT_CMD_RELOAD])dnl
274 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
275 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
276 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
277 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
278 m4_require([_LT_WITH_SYSROOT])dnl
279
280 _LT_CONFIG_LIBTOOL_INIT([
281 # See if we are running on zsh, and set the options which allow our
282 # commands through without removal of \ escapes INIT.
283 if test -n "\${ZSH_VERSION+set}" ; then
284 setopt NO_GLOB_SUBST
285 fi
286 ])
287 if test -n "${ZSH_VERSION+set}" ; then
288 setopt NO_GLOB_SUBST
289 fi
290
291 _LT_CHECK_OBJDIR
292
293 m4_require([_LT_TAG_COMPILER])dnl
294
295 case $host_os in
296 aix3*)
297 # AIX sometimes has problems with the GCC collect2 program. For some
298 # reason, if we set the COLLECT_NAMES environment variable, the problems
299 # vanish in a puff of smoke.
300 if test "X${COLLECT_NAMES+set}" != Xset; then
301 COLLECT_NAMES=
302 export COLLECT_NAMES
303 fi
304 ;;
305 esac
306
307 # Global variables:
308 ofile=libtool
309 can_build_shared=yes
310
311 # All known linkers require a `.a' archive for static linking (except MSVC,
312 # which needs '.lib').
313 libext=a
314
315 with_gnu_ld="$lt_cv_prog_gnu_ld"
316
317 old_CC="$CC"
318 old_CFLAGS="$CFLAGS"
319
320 # Set sane defaults for various variables
321 test -z "$CC" && CC=cc
322 test -z "$LTCC" && LTCC=$CC
323 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
324 test -z "$LD" && LD=ld
325 test -z "$ac_objext" && ac_objext=o
326
327 _LT_CC_BASENAME([$compiler])
328
329 # Only perform the check for file, if the check method requires it
330 test -z "$MAGIC_CMD" && MAGIC_CMD=file
331 case $deplibs_check_method in
332 file_magic*)
333 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
334 _LT_PATH_MAGIC
335 fi
336 ;;
337 esac
338
339 # Use C for the default configuration in the libtool script
340 LT_SUPPORTED_TAG([CC])
341 _LT_LANG_C_CONFIG
342 _LT_LANG_DEFAULT_CONFIG
343 _LT_CONFIG_COMMANDS
344 ])# _LT_SETUP
345
346
347 # _LT_PREPARE_SED_QUOTE_VARS
348 # --------------------------
349 # Define a few sed substitution that help us do robust quoting.
350 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
351 [# Backslashify metacharacters that are still active within
352 # double-quoted strings.
353 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
354
355 # Same as above, but do not quote variable references.
356 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
357
358 # Sed substitution to delay expansion of an escaped shell variable in a
359 # double_quote_subst'ed string.
360 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
361
362 # Sed substitution to delay expansion of an escaped single quote.
363 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
364
365 # Sed substitution to avoid accidental globbing in evaled expressions
366 no_glob_subst='s/\*/\\\*/g'
367 ])
368
369 # _LT_PROG_LTMAIN
370 # ---------------
371 # Note that this code is called both from `configure', and `config.status'
372 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
373 # `config.status' has no value for ac_aux_dir unless we are using Automake,
374 # so we pass a copy along to make sure it has a sensible value anyway.
375 m4_defun([_LT_PROG_LTMAIN],
376 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
377 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
378 ltmain="$ac_aux_dir/ltmain.sh"
379 ])# _LT_PROG_LTMAIN
380
381
382
383 # So that we can recreate a full libtool script including additional
384 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
385 # in macros and then make a single call at the end using the `libtool'
386 # label.
387
388
389 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
390 # ----------------------------------------
391 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
392 m4_define([_LT_CONFIG_LIBTOOL_INIT],
393 [m4_ifval([$1],
394 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
395 [$1
396 ])])])
397
398 # Initialize.
399 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
400
401
402 # _LT_CONFIG_LIBTOOL([COMMANDS])
403 # ------------------------------
404 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
405 m4_define([_LT_CONFIG_LIBTOOL],
406 [m4_ifval([$1],
407 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
408 [$1
409 ])])])
410
411 # Initialize.
412 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
413
414
415 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
416 # -----------------------------------------------------
417 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
418 [_LT_CONFIG_LIBTOOL([$1])
419 _LT_CONFIG_LIBTOOL_INIT([$2])
420 ])
421
422
423 # _LT_FORMAT_COMMENT([COMMENT])
424 # -----------------------------
425 # Add leading comment marks to the start of each line, and a trailing
426 # full-stop to the whole comment if one is not present already.
427 m4_define([_LT_FORMAT_COMMENT],
428 [m4_ifval([$1], [
429 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
430 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
431 )])
432
433
434
435
436
437 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
438 # -------------------------------------------------------------------
439 # CONFIGNAME is the name given to the value in the libtool script.
440 # VARNAME is the (base) name used in the configure script.
441 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
442 # VARNAME. Any other value will be used directly.
443 m4_define([_LT_DECL],
444 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
445 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
446 [m4_ifval([$1], [$1], [$2])])
447 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
448 m4_ifval([$4],
449 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
450 lt_dict_add_subkey([lt_decl_dict], [$2],
451 [tagged?], [m4_ifval([$5], [yes], [no])])])
452 ])
453
454
455 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
456 # --------------------------------------------------------
457 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
458
459
460 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
461 # ------------------------------------------------
462 m4_define([lt_decl_tag_varnames],
463 [_lt_decl_filter([tagged?], [yes], $@)])
464
465
466 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
467 # ---------------------------------------------------------
468 m4_define([_lt_decl_filter],
469 [m4_case([$#],
470 [0], [m4_fatal([$0: too few arguments: $#])],
471 [1], [m4_fatal([$0: too few arguments: $#: $1])],
472 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
473 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
474 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
475 ])
476
477
478 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
479 # --------------------------------------------------
480 m4_define([lt_decl_quote_varnames],
481 [_lt_decl_filter([value], [1], $@)])
482
483
484 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
485 # ---------------------------------------------------
486 m4_define([lt_decl_dquote_varnames],
487 [_lt_decl_filter([value], [2], $@)])
488
489
490 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
491 # ---------------------------------------------------
492 m4_define([lt_decl_varnames_tagged],
493 [m4_assert([$# <= 2])dnl
494 _$0(m4_quote(m4_default([$1], [[, ]])),
495 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
496 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
497 m4_define([_lt_decl_varnames_tagged],
498 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
499
500
501 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
502 # ------------------------------------------------
503 m4_define([lt_decl_all_varnames],
504 [_$0(m4_quote(m4_default([$1], [[, ]])),
505 m4_if([$2], [],
506 m4_quote(lt_decl_varnames),
507 m4_quote(m4_shift($@))))[]dnl
508 ])
509 m4_define([_lt_decl_all_varnames],
510 [lt_join($@, lt_decl_varnames_tagged([$1],
511 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
512 ])
513
514
515 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
516 # ------------------------------------
517 # Quote a variable value, and forward it to `config.status' so that its
518 # declaration there will have the same value as in `configure'. VARNAME
519 # must have a single quote delimited value for this to work.
520 m4_define([_LT_CONFIG_STATUS_DECLARE],
521 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
522
523
524 # _LT_CONFIG_STATUS_DECLARATIONS
525 # ------------------------------
526 # We delimit libtool config variables with single quotes, so when
527 # we write them to config.status, we have to be sure to quote all
528 # embedded single quotes properly. In configure, this macro expands
529 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
530 #
531 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
532 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
533 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
534 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
535
536
537 # _LT_LIBTOOL_TAGS
538 # ----------------
539 # Output comment and list of tags supported by the script
540 m4_defun([_LT_LIBTOOL_TAGS],
541 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
542 available_tags="_LT_TAGS"dnl
543 ])
544
545
546 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
547 # -----------------------------------
548 # Extract the dictionary values for VARNAME (optionally with TAG) and
549 # expand to a commented shell variable setting:
550 #
551 # # Some comment about what VAR is for.
552 # visible_name=$lt_internal_name
553 m4_define([_LT_LIBTOOL_DECLARE],
554 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
555 [description])))[]dnl
556 m4_pushdef([_libtool_name],
557 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
558 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
559 [0], [_libtool_name=[$]$1],
560 [1], [_libtool_name=$lt_[]$1],
561 [2], [_libtool_name=$lt_[]$1],
562 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
563 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
564 ])
565
566
567 # _LT_LIBTOOL_CONFIG_VARS
568 # -----------------------
569 # Produce commented declarations of non-tagged libtool config variables
570 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
571 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
572 # section) are produced by _LT_LIBTOOL_TAG_VARS.
573 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
574 [m4_foreach([_lt_var],
575 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
576 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
577
578
579 # _LT_LIBTOOL_TAG_VARS(TAG)
580 # -------------------------
581 m4_define([_LT_LIBTOOL_TAG_VARS],
582 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
583 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
584
585
586 # _LT_TAGVAR(VARNAME, [TAGNAME])
587 # ------------------------------
588 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
589
590
591 # _LT_CONFIG_COMMANDS
592 # -------------------
593 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
594 # variables for single and double quote escaping we saved from calls
595 # to _LT_DECL, we can put quote escaped variables declarations
596 # into `config.status', and then the shell code to quote escape them in
597 # for loops in `config.status'. Finally, any additional code accumulated
598 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
599 m4_defun([_LT_CONFIG_COMMANDS],
600 [AC_PROVIDE_IFELSE([LT_OUTPUT],
601 dnl If the libtool generation code has been placed in $CONFIG_LT,
602 dnl instead of duplicating it all over again into config.status,
603 dnl then we will have config.status run $CONFIG_LT later, so it
604 dnl needs to know what name is stored there:
605 [AC_CONFIG_COMMANDS([libtool],
606 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
607 dnl If the libtool generation code is destined for config.status,
608 dnl expand the accumulated commands and init code now:
609 [AC_CONFIG_COMMANDS([libtool],
610 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
611 ])#_LT_CONFIG_COMMANDS
612
613
614 # Initialize.
615 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
616 [
617
618 # The HP-UX ksh and POSIX shell print the target directory to stdout
619 # if CDPATH is set.
620 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
621
622 sed_quote_subst='$sed_quote_subst'
623 double_quote_subst='$double_quote_subst'
624 delay_variable_subst='$delay_variable_subst'
625 _LT_CONFIG_STATUS_DECLARATIONS
626 LTCC='$LTCC'
627 LTCFLAGS='$LTCFLAGS'
628 compiler='$compiler_DEFAULT'
629
630 # A function that is used when there is no print builtin or printf.
631 func_fallback_echo ()
632 {
633 eval 'cat <<_LTECHO_EOF
634 \$[]1
635 _LTECHO_EOF'
636 }
637
638 # Quote evaled strings.
639 for var in lt_decl_all_varnames([[ \
640 ]], lt_decl_quote_varnames); do
641 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
642 *[[\\\\\\\`\\"\\\$]]*)
643 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
644 ;;
645 *)
646 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
647 ;;
648 esac
649 done
650
651 # Double-quote double-evaled strings.
652 for var in lt_decl_all_varnames([[ \
653 ]], lt_decl_dquote_varnames); do
654 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
655 *[[\\\\\\\`\\"\\\$]]*)
656 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
657 ;;
658 *)
659 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
660 ;;
661 esac
662 done
663
664 _LT_OUTPUT_LIBTOOL_INIT
665 ])
666
667 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
668 # ------------------------------------
669 # Generate a child script FILE with all initialization necessary to
670 # reuse the environment learned by the parent script, and make the
671 # file executable. If COMMENT is supplied, it is inserted after the
672 # `#!' sequence but before initialization text begins. After this
673 # macro, additional text can be appended to FILE to form the body of
674 # the child script. The macro ends with non-zero status if the
675 # file could not be fully written (such as if the disk is full).
676 m4_ifdef([AS_INIT_GENERATED],
677 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
678 [m4_defun([_LT_GENERATED_FILE_INIT],
679 [m4_require([AS_PREPARE])]dnl
680 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
681 [lt_write_fail=0
682 cat >$1 <<_ASEOF || lt_write_fail=1
683 #! $SHELL
684 # Generated by $as_me.
685 $2
686 SHELL=\${CONFIG_SHELL-$SHELL}
687 export SHELL
688 _ASEOF
689 cat >>$1 <<\_ASEOF || lt_write_fail=1
690 AS_SHELL_SANITIZE
691 _AS_PREPARE
692 exec AS_MESSAGE_FD>&1
693 _ASEOF
694 test $lt_write_fail = 0 && chmod +x $1[]dnl
695 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
696
697 # LT_OUTPUT
698 # ---------
699 # This macro allows early generation of the libtool script (before
700 # AC_OUTPUT is called), incase it is used in configure for compilation
701 # tests.
702 AC_DEFUN([LT_OUTPUT],
703 [: ${CONFIG_LT=./config.lt}
704 AC_MSG_NOTICE([creating $CONFIG_LT])
705 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
706 [# Run this file to recreate a libtool stub with the current configuration.])
707
708 cat >>"$CONFIG_LT" <<\_LTEOF
709 lt_cl_silent=false
710 exec AS_MESSAGE_LOG_FD>>config.log
711 {
712 echo
713 AS_BOX([Running $as_me.])
714 } >&AS_MESSAGE_LOG_FD
715
716 lt_cl_help="\
717 \`$as_me' creates a local libtool stub from the current configuration,
718 for use in further configure time tests before the real libtool is
719 generated.
720
721 Usage: $[0] [[OPTIONS]]
722
723 -h, --help print this help, then exit
724 -V, --version print version number, then exit
725 -q, --quiet do not print progress messages
726 -d, --debug don't remove temporary files
727
728 Report bugs to <bug-libtool@gnu.org>."
729
730 lt_cl_version="\
731 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
732 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
733 configured by $[0], generated by m4_PACKAGE_STRING.
734
735 Copyright (C) 2010 Free Software Foundation, Inc.
736 This config.lt script is free software; the Free Software Foundation
737 gives unlimited permision to copy, distribute and modify it."
738
739 while test $[#] != 0
740 do
741 case $[1] in
742 --version | --v* | -V )
743 echo "$lt_cl_version"; exit 0 ;;
744 --help | --h* | -h )
745 echo "$lt_cl_help"; exit 0 ;;
746 --debug | --d* | -d )
747 debug=: ;;
748 --quiet | --q* | --silent | --s* | -q )
749 lt_cl_silent=: ;;
750
751 -*) AC_MSG_ERROR([unrecognized option: $[1]
752 Try \`$[0] --help' for more information.]) ;;
753
754 *) AC_MSG_ERROR([unrecognized argument: $[1]
755 Try \`$[0] --help' for more information.]) ;;
756 esac
757 shift
758 done
759
760 if $lt_cl_silent; then
761 exec AS_MESSAGE_FD>/dev/null
762 fi
763 _LTEOF
764
765 cat >>"$CONFIG_LT" <<_LTEOF
766 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
767 _LTEOF
768
769 cat >>"$CONFIG_LT" <<\_LTEOF
770 AC_MSG_NOTICE([creating $ofile])
771 _LT_OUTPUT_LIBTOOL_COMMANDS
772 AS_EXIT(0)
773 _LTEOF
774 chmod +x "$CONFIG_LT"
775
776 # configure is writing to config.log, but config.lt does its own redirection,
777 # appending to config.log, which fails on DOS, as config.log is still kept
778 # open by configure. Here we exec the FD to /dev/null, effectively closing
779 # config.log, so it can be properly (re)opened and appended to by config.lt.
780 lt_cl_success=:
781 test "$silent" = yes &&
782 lt_config_lt_args="$lt_config_lt_args --quiet"
783 exec AS_MESSAGE_LOG_FD>/dev/null
784 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
785 exec AS_MESSAGE_LOG_FD>>config.log
786 $lt_cl_success || AS_EXIT(1)
787 ])# LT_OUTPUT
788
789
790 # _LT_CONFIG(TAG)
791 # ---------------
792 # If TAG is the built-in tag, create an initial libtool script with a
793 # default configuration from the untagged config vars. Otherwise add code
794 # to config.status for appending the configuration named by TAG from the
795 # matching tagged config vars.
796 m4_defun([_LT_CONFIG],
797 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
798 _LT_CONFIG_SAVE_COMMANDS([
799 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
800 m4_if(_LT_TAG, [C], [
801 # See if we are running on zsh, and set the options which allow our
802 # commands through without removal of \ escapes.
803 if test -n "${ZSH_VERSION+set}" ; then
804 setopt NO_GLOB_SUBST
805 fi
806
807 cfgfile="${ofile}T"
808 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
809 $RM "$cfgfile"
810
811 cat <<_LT_EOF >> "$cfgfile"
812 #! $SHELL
813
814 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
815 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
816 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
817 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
818 #
819 _LT_COPYING
820 _LT_LIBTOOL_TAGS
821
822 # ### BEGIN LIBTOOL CONFIG
823 _LT_LIBTOOL_CONFIG_VARS
824 _LT_LIBTOOL_TAG_VARS
825 # ### END LIBTOOL CONFIG
826
827 _LT_EOF
828
829 case $host_os in
830 aix3*)
831 cat <<\_LT_EOF >> "$cfgfile"
832 # AIX sometimes has problems with the GCC collect2 program. For some
833 # reason, if we set the COLLECT_NAMES environment variable, the problems
834 # vanish in a puff of smoke.
835 if test "X${COLLECT_NAMES+set}" != Xset; then
836 COLLECT_NAMES=
837 export COLLECT_NAMES
838 fi
839 _LT_EOF
840 ;;
841 esac
842
843 _LT_PROG_LTMAIN
844
845 # We use sed instead of cat because bash on DJGPP gets confused if
846 # if finds mixed CR/LF and LF-only lines. Since sed operates in
847 # text mode, it properly converts lines to CR/LF. This bash problem
848 # is reportedly fixed, but why not run on old versions too?
849 sed '$q' "$ltmain" >> "$cfgfile" \
850 || (rm -f "$cfgfile"; exit 1)
851
852 _LT_PROG_REPLACE_SHELLFNS
853
854 mv -f "$cfgfile" "$ofile" ||
855 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
856 chmod +x "$ofile"
857 ],
858 [cat <<_LT_EOF >> "$ofile"
859
860 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
861 dnl in a comment (ie after a #).
862 # ### BEGIN LIBTOOL TAG CONFIG: $1
863 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
864 # ### END LIBTOOL TAG CONFIG: $1
865 _LT_EOF
866 ])dnl /m4_if
867 ],
868 [m4_if([$1], [], [
869 PACKAGE='$PACKAGE'
870 VERSION='$VERSION'
871 TIMESTAMP='$TIMESTAMP'
872 RM='$RM'
873 ofile='$ofile'], [])
874 ])dnl /_LT_CONFIG_SAVE_COMMANDS
875 ])# _LT_CONFIG
876
877
878 # LT_SUPPORTED_TAG(TAG)
879 # ---------------------
880 # Trace this macro to discover what tags are supported by the libtool
881 # --tag option, using:
882 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
883 AC_DEFUN([LT_SUPPORTED_TAG], [])
884
885
886 # C support is built-in for now
887 m4_define([_LT_LANG_C_enabled], [])
888 m4_define([_LT_TAGS], [])
889
890
891 # LT_LANG(LANG)
892 # -------------
893 # Enable libtool support for the given language if not already enabled.
894 AC_DEFUN([LT_LANG],
895 [AC_BEFORE([$0], [LT_OUTPUT])dnl
896 m4_case([$1],
897 [C], [_LT_LANG(C)],
898 [C++], [_LT_LANG(CXX)],
899 [Java], [_LT_LANG(GCJ)],
900 [Fortran 77], [_LT_LANG(F77)],
901 [Fortran], [_LT_LANG(FC)],
902 [Windows Resource], [_LT_LANG(RC)],
903 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
904 [_LT_LANG($1)],
905 [m4_fatal([$0: unsupported language: "$1"])])])dnl
906 ])# LT_LANG
907
908
909 # _LT_LANG(LANGNAME)
910 # ------------------
911 m4_defun([_LT_LANG],
912 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
913 [LT_SUPPORTED_TAG([$1])dnl
914 m4_append([_LT_TAGS], [$1 ])dnl
915 m4_define([_LT_LANG_]$1[_enabled], [])dnl
916 _LT_LANG_$1_CONFIG($1)])dnl
917 ])# _LT_LANG
918
919
920 # _LT_LANG_DEFAULT_CONFIG
921 # -----------------------
922 m4_defun([_LT_LANG_DEFAULT_CONFIG],
923 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
924 [LT_LANG(CXX)],
925 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
926
927 AC_PROVIDE_IFELSE([AC_PROG_F77],
928 [LT_LANG(F77)],
929 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
930
931 AC_PROVIDE_IFELSE([AC_PROG_FC],
932 [LT_LANG(FC)],
933 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
934
935 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
936 dnl pulling things in needlessly.
937 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
938 [LT_LANG(GCJ)],
939 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
940 [LT_LANG(GCJ)],
941 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
942 [LT_LANG(GCJ)],
943 [m4_ifdef([AC_PROG_GCJ],
944 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
945 m4_ifdef([A][M_PROG_GCJ],
946 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
947 m4_ifdef([LT_PROG_GCJ],
948 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
949
950 AC_PROVIDE_IFELSE([LT_PROG_RC],
951 [LT_LANG(RC)],
952 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
953 ])# _LT_LANG_DEFAULT_CONFIG
954
955 # Obsolete macros:
956 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
957 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
958 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
959 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
960 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
961 dnl aclocal-1.4 backwards compatibility:
962 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
963 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
964 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
965 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
966 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
967
968
969 # _LT_TAG_COMPILER
970 # ----------------
971 m4_defun([_LT_TAG_COMPILER],
972 [AC_REQUIRE([AC_PROG_CC])dnl
973
974 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
975 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
976 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
977 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
978
979 # If no C compiler was specified, use CC.
980 LTCC=${LTCC-"$CC"}
981
982 # If no C compiler flags were specified, use CFLAGS.
983 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
984
985 # Allow CC to be a program name with arguments.
986 compiler=$CC
987 ])# _LT_TAG_COMPILER
988
989
990 # _LT_COMPILER_BOILERPLATE
991 # ------------------------
992 # Check for compiler boilerplate output or warnings with
993 # the simple compiler test code.
994 m4_defun([_LT_COMPILER_BOILERPLATE],
995 [m4_require([_LT_DECL_SED])dnl
996 ac_outfile=conftest.$ac_objext
997 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
998 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
999 _lt_compiler_boilerplate=`cat conftest.err`
1000 $RM conftest*
1001 ])# _LT_COMPILER_BOILERPLATE
1002
1003
1004 # _LT_LINKER_BOILERPLATE
1005 # ----------------------
1006 # Check for linker boilerplate output or warnings with
1007 # the simple link test code.
1008 m4_defun([_LT_LINKER_BOILERPLATE],
1009 [m4_require([_LT_DECL_SED])dnl
1010 ac_outfile=conftest.$ac_objext
1011 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1012 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1013 _lt_linker_boilerplate=`cat conftest.err`
1014 $RM -r conftest*
1015 ])# _LT_LINKER_BOILERPLATE
1016
1017 # _LT_REQUIRED_DARWIN_CHECKS
1018 # -------------------------
1019 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1020 case $host_os in
1021 rhapsody* | darwin*)
1022 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1023 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1024 AC_CHECK_TOOL([LIPO], [lipo], [:])
1025 AC_CHECK_TOOL([OTOOL], [otool], [:])
1026 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1027 _LT_DECL([], [DSYMUTIL], [1],
1028 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1029 _LT_DECL([], [NMEDIT], [1],
1030 [Tool to change global to local symbols on Mac OS X])
1031 _LT_DECL([], [LIPO], [1],
1032 [Tool to manipulate fat objects and archives on Mac OS X])
1033 _LT_DECL([], [OTOOL], [1],
1034 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1035 _LT_DECL([], [OTOOL64], [1],
1036 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1037
1038 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1039 [lt_cv_apple_cc_single_mod=no
1040 if test -z "${LT_MULTI_MODULE}"; then
1041 # By default we will add the -single_module flag. You can override
1042 # by either setting the environment variable LT_MULTI_MODULE
1043 # non-empty at configure time, or by adding -multi_module to the
1044 # link flags.
1045 rm -rf libconftest.dylib*
1046 echo "int foo(void){return 1;}" > conftest.c
1047 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1048 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1049 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1050 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1051 _lt_result=$?
1052 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1053 lt_cv_apple_cc_single_mod=yes
1054 else
1055 cat conftest.err >&AS_MESSAGE_LOG_FD
1056 fi
1057 rm -rf libconftest.dylib*
1058 rm -f conftest.*
1059 fi])
1060 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1061 [lt_cv_ld_exported_symbols_list],
1062 [lt_cv_ld_exported_symbols_list=no
1063 save_LDFLAGS=$LDFLAGS
1064 echo "_main" > conftest.sym
1065 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1066 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1067 [lt_cv_ld_exported_symbols_list=yes],
1068 [lt_cv_ld_exported_symbols_list=no])
1069 LDFLAGS="$save_LDFLAGS"
1070 ])
1071 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1072 [lt_cv_ld_force_load=no
1073 cat > conftest.c << _LT_EOF
1074 int forced_loaded() { return 2;}
1075 _LT_EOF
1076 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1077 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1078 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1079 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1080 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1081 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1082 cat > conftest.c << _LT_EOF
1083 int main() { return 0;}
1084 _LT_EOF
1085 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1086 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1087 _lt_result=$?
1088 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
1089 lt_cv_ld_force_load=yes
1090 else
1091 cat conftest.err >&AS_MESSAGE_LOG_FD
1092 fi
1093 rm -f conftest.err libconftest.a conftest conftest.c
1094 rm -rf conftest.dSYM
1095 ])
1096 case $host_os in
1097 rhapsody* | darwin1.[[012]])
1098 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1099 darwin1.*)
1100 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1101 darwin*) # darwin 5.x on
1102 # if running on 10.5 or later, the deployment target defaults
1103 # to the OS version, if on x86, and 10.4, the deployment
1104 # target defaults to 10.4. Don't you love it?
1105 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1106 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1107 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1108 10.[[012]]*)
1109 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1110 10.*)
1111 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1112 esac
1113 ;;
1114 esac
1115 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1116 _lt_dar_single_mod='$single_module'
1117 fi
1118 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1119 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1120 else
1121 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1122 fi
1123 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1124 _lt_dsymutil='~$DSYMUTIL $lib || :'
1125 else
1126 _lt_dsymutil=
1127 fi
1128 ;;
1129 esac
1130 ])
1131
1132
1133 # _LT_DARWIN_LINKER_FEATURES
1134 # --------------------------
1135 # Checks for linker and compiler features on darwin
1136 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1137 [
1138 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1139 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1140 _LT_TAGVAR(hardcode_direct, $1)=no
1141 _LT_TAGVAR(hardcode_automatic, $1)=yes
1142 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1143 if test "$lt_cv_ld_force_load" = "yes"; then
1144 _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\"`'
1145 else
1146 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1147 fi
1148 _LT_TAGVAR(link_all_deplibs, $1)=yes
1149 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1150 case $cc_basename in
1151 ifort*) _lt_dar_can_shared=yes ;;
1152 *) _lt_dar_can_shared=$GCC ;;
1153 esac
1154 if test "$_lt_dar_can_shared" = "yes"; then
1155 output_verbose_link_cmd=func_echo_all
1156 _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}"
1157 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1158 _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}"
1159 _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}"
1160 m4_if([$1], [CXX],
1161 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1162 _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}"
1163 _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}"
1164 fi
1165 ],[])
1166 else
1167 _LT_TAGVAR(ld_shlibs, $1)=no
1168 fi
1169 ])
1170
1171 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1172 # ----------------------------------
1173 # Links a minimal program and checks the executable
1174 # for the system default hardcoded library path. In most cases,
1175 # this is /usr/lib:/lib, but when the MPI compilers are used
1176 # the location of the communication and MPI libs are included too.
1177 # If we don't find anything, use the default library path according
1178 # to the aix ld manual.
1179 # Store the results from the different compilers for each TAGNAME.
1180 # Allow to override them for all tags through lt_cv_aix_libpath.
1181 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1182 [m4_require([_LT_DECL_SED])dnl
1183 if test "${lt_cv_aix_libpath+set}" = set; then
1184 aix_libpath=$lt_cv_aix_libpath
1185 else
1186 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1187 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1188 lt_aix_libpath_sed='[
1189 /Import File Strings/,/^$/ {
1190 /^0/ {
1191 s/^0 *\([^ ]*\) *$/\1/
1192 p
1193 }
1194 }]'
1195 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1196 # Check for a 64-bit object if we didn't find anything.
1197 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1198 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1199 fi],[])
1200 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1201 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1202 fi
1203 ])
1204 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1205 fi
1206 ])# _LT_SYS_MODULE_PATH_AIX
1207
1208
1209 # _LT_SHELL_INIT(ARG)
1210 # -------------------
1211 m4_define([_LT_SHELL_INIT],
1212 [m4_divert_text([M4SH-INIT], [$1
1213 ])])# _LT_SHELL_INIT
1214
1215
1216
1217 # _LT_PROG_ECHO_BACKSLASH
1218 # -----------------------
1219 # Find how we can fake an echo command that does not interpret backslash.
1220 # In particular, with Autoconf 2.60 or later we add some code to the start
1221 # of the generated configure script which will find a shell with a builtin
1222 # printf (which we can use as an echo command).
1223 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1224 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1225 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1226 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1227
1228 AC_MSG_CHECKING([how to print strings])
1229 # Test print first, because it will be a builtin if present.
1230 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1231 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1232 ECHO='print -r --'
1233 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1234 ECHO='printf %s\n'
1235 else
1236 # Use this function as a fallback that always works.
1237 func_fallback_echo ()
1238 {
1239 eval 'cat <<_LTECHO_EOF
1240 $[]1
1241 _LTECHO_EOF'
1242 }
1243 ECHO='func_fallback_echo'
1244 fi
1245
1246 # func_echo_all arg...
1247 # Invoke $ECHO with all args, space-separated.
1248 func_echo_all ()
1249 {
1250 $ECHO "$*"
1251 }
1252
1253 case "$ECHO" in
1254 printf*) AC_MSG_RESULT([printf]) ;;
1255 print*) AC_MSG_RESULT([print -r]) ;;
1256 *) AC_MSG_RESULT([cat]) ;;
1257 esac
1258
1259 m4_ifdef([_AS_DETECT_SUGGESTED],
1260 [_AS_DETECT_SUGGESTED([
1261 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1262 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1263 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1264 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1265 PATH=/empty FPATH=/empty; export PATH FPATH
1266 test "X`printf %s $ECHO`" = "X$ECHO" \
1267 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1268
1269 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1270 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1271 ])# _LT_PROG_ECHO_BACKSLASH
1272
1273
1274 # _LT_WITH_SYSROOT
1275 # ----------------
1276 AC_DEFUN([_LT_WITH_SYSROOT],
1277 [AC_MSG_CHECKING([for sysroot])
1278 AC_ARG_WITH([sysroot],
1279 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
1280 (or the compiler's sysroot if not specified).],
1281 [], [with_sysroot=no])
1282
1283 dnl lt_sysroot will always be passed unquoted. We quote it here
1284 dnl in case the user passed a directory name.
1285 lt_sysroot=
1286 case ${with_sysroot} in #(
1287 yes)
1288 if test "$GCC" = yes; then
1289 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1290 fi
1291 ;; #(
1292 /*)
1293 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1294 ;; #(
1295 no|'')
1296 ;; #(
1297 *)
1298 AC_MSG_RESULT([${with_sysroot}])
1299 AC_MSG_ERROR([The sysroot must be an absolute path.])
1300 ;;
1301 esac
1302
1303 AC_MSG_RESULT([${lt_sysroot:-no}])
1304 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1305 [dependent libraries, and in which our libraries should be installed.])])
1306
1307 # _LT_ENABLE_LOCK
1308 # ---------------
1309 m4_defun([_LT_ENABLE_LOCK],
1310 [AC_ARG_ENABLE([libtool-lock],
1311 [AS_HELP_STRING([--disable-libtool-lock],
1312 [avoid locking (might break parallel builds)])])
1313 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1314
1315 # Some flags need to be propagated to the compiler or linker for good
1316 # libtool support.
1317 case $host in
1318 ia64-*-hpux*)
1319 # Find out which ABI we are using.
1320 echo 'int i;' > conftest.$ac_ext
1321 if AC_TRY_EVAL(ac_compile); then
1322 case `/usr/bin/file conftest.$ac_objext` in
1323 *ELF-32*)
1324 HPUX_IA64_MODE="32"
1325 ;;
1326 *ELF-64*)
1327 HPUX_IA64_MODE="64"
1328 ;;
1329 esac
1330 fi
1331 rm -rf conftest*
1332 ;;
1333 *-*-irix6*)
1334 # Find out which ABI we are using.
1335 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1336 if AC_TRY_EVAL(ac_compile); then
1337 if test "$lt_cv_prog_gnu_ld" = yes; then
1338 case `/usr/bin/file conftest.$ac_objext` in
1339 *32-bit*)
1340 LD="${LD-ld} -melf32bsmip"
1341 ;;
1342 *N32*)
1343 LD="${LD-ld} -melf32bmipn32"
1344 ;;
1345 *64-bit*)
1346 LD="${LD-ld} -melf64bmip"
1347 ;;
1348 esac
1349 else
1350 case `/usr/bin/file conftest.$ac_objext` in
1351 *32-bit*)
1352 LD="${LD-ld} -32"
1353 ;;
1354 *N32*)
1355 LD="${LD-ld} -n32"
1356 ;;
1357 *64-bit*)
1358 LD="${LD-ld} -64"
1359 ;;
1360 esac
1361 fi
1362 fi
1363 rm -rf conftest*
1364 ;;
1365
1366 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1367 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1368 # Find out which ABI we are using.
1369 echo 'int i;' > conftest.$ac_ext
1370 if AC_TRY_EVAL(ac_compile); then
1371 case `/usr/bin/file conftest.o` in
1372 *32-bit*)
1373 case $host in
1374 x86_64-*kfreebsd*-gnu)
1375 LD="${LD-ld} -m elf_i386_fbsd"
1376 ;;
1377 x86_64-*linux*)
1378 LD="${LD-ld} -m elf_i386"
1379 ;;
1380 ppc64-*linux*|powerpc64-*linux*)
1381 LD="${LD-ld} -m elf32ppclinux"
1382 ;;
1383 s390x-*linux*)
1384 LD="${LD-ld} -m elf_s390"
1385 ;;
1386 sparc64-*linux*)
1387 LD="${LD-ld} -m elf32_sparc"
1388 ;;
1389 esac
1390 ;;
1391 *64-bit*)
1392 case $host in
1393 x86_64-*kfreebsd*-gnu)
1394 LD="${LD-ld} -m elf_x86_64_fbsd"
1395 ;;
1396 x86_64-*linux*)
1397 LD="${LD-ld} -m elf_x86_64"
1398 ;;
1399 ppc*-*linux*|powerpc*-*linux*)
1400 LD="${LD-ld} -m elf64ppc"
1401 ;;
1402 s390*-*linux*|s390*-*tpf*)
1403 LD="${LD-ld} -m elf64_s390"
1404 ;;
1405 sparc*-*linux*)
1406 LD="${LD-ld} -m elf64_sparc"
1407 ;;
1408 esac
1409 ;;
1410 esac
1411 fi
1412 rm -rf conftest*
1413 ;;
1414
1415 *-*-sco3.2v5*)
1416 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1417 SAVE_CFLAGS="$CFLAGS"
1418 CFLAGS="$CFLAGS -belf"
1419 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1420 [AC_LANG_PUSH(C)
1421 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1422 AC_LANG_POP])
1423 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1424 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1425 CFLAGS="$SAVE_CFLAGS"
1426 fi
1427 ;;
1428 sparc*-*solaris*)
1429 # Find out which ABI we are using.
1430 echo 'int i;' > conftest.$ac_ext
1431 if AC_TRY_EVAL(ac_compile); then
1432 case `/usr/bin/file conftest.o` in
1433 *64-bit*)
1434 case $lt_cv_prog_gnu_ld in
1435 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1436 *)
1437 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1438 LD="${LD-ld} -64"
1439 fi
1440 ;;
1441 esac
1442 ;;
1443 esac
1444 fi
1445 rm -rf conftest*
1446 ;;
1447 esac
1448
1449 need_locks="$enable_libtool_lock"
1450 ])# _LT_ENABLE_LOCK
1451
1452
1453 # _LT_PROG_AR
1454 # -----------
1455 m4_defun([_LT_PROG_AR],
1456 [AC_CHECK_TOOLS(AR, [ar], false)
1457 : ${AR=ar}
1458 : ${AR_FLAGS=cru}
1459 _LT_DECL([], [AR], [1], [The archiver])
1460 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1461
1462 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1463 [lt_cv_ar_at_file=no
1464 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1465 [echo conftest.$ac_objext > conftest.lst
1466 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1467 AC_TRY_EVAL([lt_ar_try])
1468 if test "$ac_status" -eq 0; then
1469 # Ensure the archiver fails upon bogus file names.
1470 rm -f conftest.$ac_objext libconftest.a
1471 AC_TRY_EVAL([lt_ar_try])
1472 if test "$ac_status" -ne 0; then
1473 lt_cv_ar_at_file=@
1474 fi
1475 fi
1476 rm -f conftest.* libconftest.a
1477 ])
1478 ])
1479
1480 if test "x$lt_cv_ar_at_file" = xno; then
1481 archiver_list_spec=
1482 else
1483 archiver_list_spec=$lt_cv_ar_at_file
1484 fi
1485 _LT_DECL([], [archiver_list_spec], [1],
1486 [How to feed a file listing to the archiver])
1487 ])# _LT_PROG_AR
1488
1489
1490 # _LT_CMD_OLD_ARCHIVE
1491 # -------------------
1492 m4_defun([_LT_CMD_OLD_ARCHIVE],
1493 [_LT_PROG_AR
1494
1495 AC_CHECK_TOOL(STRIP, strip, :)
1496 test -z "$STRIP" && STRIP=:
1497 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1498
1499 AC_CHECK_TOOL(RANLIB, ranlib, :)
1500 test -z "$RANLIB" && RANLIB=:
1501 _LT_DECL([], [RANLIB], [1],
1502 [Commands used to install an old-style archive])
1503
1504 # Determine commands to create old-style static archives.
1505 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1506 old_postinstall_cmds='chmod 644 $oldlib'
1507 old_postuninstall_cmds=
1508
1509 if test -n "$RANLIB"; then
1510 case $host_os in
1511 openbsd*)
1512 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1513 ;;
1514 *)
1515 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1516 ;;
1517 esac
1518 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1519 fi
1520
1521 case $host_os in
1522 darwin*)
1523 lock_old_archive_extraction=yes ;;
1524 *)
1525 lock_old_archive_extraction=no ;;
1526 esac
1527 _LT_DECL([], [old_postinstall_cmds], [2])
1528 _LT_DECL([], [old_postuninstall_cmds], [2])
1529 _LT_TAGDECL([], [old_archive_cmds], [2],
1530 [Commands used to build an old-style archive])
1531 _LT_DECL([], [lock_old_archive_extraction], [0],
1532 [Whether to use a lock for old archive extraction])
1533 ])# _LT_CMD_OLD_ARCHIVE
1534
1535
1536 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1537 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1538 # ----------------------------------------------------------------
1539 # Check whether the given compiler option works
1540 AC_DEFUN([_LT_COMPILER_OPTION],
1541 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1542 m4_require([_LT_DECL_SED])dnl
1543 AC_CACHE_CHECK([$1], [$2],
1544 [$2=no
1545 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1546 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1547 lt_compiler_flag="$3"
1548 # Insert the option either (1) after the last *FLAGS variable, or
1549 # (2) before a word containing "conftest.", or (3) at the end.
1550 # Note that $ac_compile itself does not contain backslashes and begins
1551 # with a dollar sign (not a hyphen), so the echo should work correctly.
1552 # The option is referenced via a variable to avoid confusing sed.
1553 lt_compile=`echo "$ac_compile" | $SED \
1554 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1555 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1556 -e 's:$: $lt_compiler_flag:'`
1557 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1558 (eval "$lt_compile" 2>conftest.err)
1559 ac_status=$?
1560 cat conftest.err >&AS_MESSAGE_LOG_FD
1561 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1562 if (exit $ac_status) && test -s "$ac_outfile"; then
1563 # The compiler can only warn and ignore the option if not recognized
1564 # So say no if there are warnings other than the usual output.
1565 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1566 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1567 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1568 $2=yes
1569 fi
1570 fi
1571 $RM conftest*
1572 ])
1573
1574 if test x"[$]$2" = xyes; then
1575 m4_if([$5], , :, [$5])
1576 else
1577 m4_if([$6], , :, [$6])
1578 fi
1579 ])# _LT_COMPILER_OPTION
1580
1581 # Old name:
1582 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1583 dnl aclocal-1.4 backwards compatibility:
1584 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1585
1586
1587 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1588 # [ACTION-SUCCESS], [ACTION-FAILURE])
1589 # ----------------------------------------------------
1590 # Check whether the given linker option works
1591 AC_DEFUN([_LT_LINKER_OPTION],
1592 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1593 m4_require([_LT_DECL_SED])dnl
1594 AC_CACHE_CHECK([$1], [$2],
1595 [$2=no
1596 save_LDFLAGS="$LDFLAGS"
1597 LDFLAGS="$LDFLAGS $3"
1598 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1599 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1600 # The linker can only warn and ignore the option if not recognized
1601 # So say no if there are warnings
1602 if test -s conftest.err; then
1603 # Append any errors to the config.log.
1604 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1605 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1606 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1607 if diff conftest.exp conftest.er2 >/dev/null; then
1608 $2=yes
1609 fi
1610 else
1611 $2=yes
1612 fi
1613 fi
1614 $RM -r conftest*
1615 LDFLAGS="$save_LDFLAGS"
1616 ])
1617
1618 if test x"[$]$2" = xyes; then
1619 m4_if([$4], , :, [$4])
1620 else
1621 m4_if([$5], , :, [$5])
1622 fi
1623 ])# _LT_LINKER_OPTION
1624
1625 # Old name:
1626 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1627 dnl aclocal-1.4 backwards compatibility:
1628 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1629
1630
1631 # LT_CMD_MAX_LEN
1632 #---------------
1633 AC_DEFUN([LT_CMD_MAX_LEN],
1634 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1635 # find the maximum length of command line arguments
1636 AC_MSG_CHECKING([the maximum length of command line arguments])
1637 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1638 i=0
1639 teststring="ABCD"
1640
1641 case $build_os in
1642 msdosdjgpp*)
1643 # On DJGPP, this test can blow up pretty badly due to problems in libc
1644 # (any single argument exceeding 2000 bytes causes a buffer overrun
1645 # during glob expansion). Even if it were fixed, the result of this
1646 # check would be larger than it should be.
1647 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1648 ;;
1649
1650 gnu*)
1651 # Under GNU Hurd, this test is not required because there is
1652 # no limit to the length of command line arguments.
1653 # Libtool will interpret -1 as no limit whatsoever
1654 lt_cv_sys_max_cmd_len=-1;
1655 ;;
1656
1657 cygwin* | mingw* | cegcc*)
1658 # On Win9x/ME, this test blows up -- it succeeds, but takes
1659 # about 5 minutes as the teststring grows exponentially.
1660 # Worse, since 9x/ME are not pre-emptively multitasking,
1661 # you end up with a "frozen" computer, even though with patience
1662 # the test eventually succeeds (with a max line length of 256k).
1663 # Instead, let's just punt: use the minimum linelength reported by
1664 # all of the supported platforms: 8192 (on NT/2K/XP).
1665 lt_cv_sys_max_cmd_len=8192;
1666 ;;
1667
1668 mint*)
1669 # On MiNT this can take a long time and run out of memory.
1670 lt_cv_sys_max_cmd_len=8192;
1671 ;;
1672
1673 amigaos*)
1674 # On AmigaOS with pdksh, this test takes hours, literally.
1675 # So we just punt and use a minimum line length of 8192.
1676 lt_cv_sys_max_cmd_len=8192;
1677 ;;
1678
1679 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1680 # This has been around since 386BSD, at least. Likely further.
1681 if test -x /sbin/sysctl; then
1682 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1683 elif test -x /usr/sbin/sysctl; then
1684 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1685 else
1686 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1687 fi
1688 # And add a safety zone
1689 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1690 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1691 ;;
1692
1693 interix*)
1694 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1695 lt_cv_sys_max_cmd_len=196608
1696 ;;
1697
1698 osf*)
1699 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1700 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1701 # nice to cause kernel panics so lets avoid the loop below.
1702 # First set a reasonable default.
1703 lt_cv_sys_max_cmd_len=16384
1704 #
1705 if test -x /sbin/sysconfig; then
1706 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1707 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1708 esac
1709 fi
1710 ;;
1711 sco3.2v5*)
1712 lt_cv_sys_max_cmd_len=102400
1713 ;;
1714 sysv5* | sco5v6* | sysv4.2uw2*)
1715 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1716 if test -n "$kargmax"; then
1717 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1718 else
1719 lt_cv_sys_max_cmd_len=32768
1720 fi
1721 ;;
1722 *)
1723 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1724 if test -n "$lt_cv_sys_max_cmd_len"; then
1725 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1726 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1727 else
1728 # Make teststring a little bigger before we do anything with it.
1729 # a 1K string should be a reasonable start.
1730 for i in 1 2 3 4 5 6 7 8 ; do
1731 teststring=$teststring$teststring
1732 done
1733 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1734 # If test is not a shell built-in, we'll probably end up computing a
1735 # maximum length that is only half of the actual maximum length, but
1736 # we can't tell.
1737 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
1738 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1739 test $i != 17 # 1/2 MB should be enough
1740 do
1741 i=`expr $i + 1`
1742 teststring=$teststring$teststring
1743 done
1744 # Only check the string length outside the loop.
1745 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1746 teststring=
1747 # Add a significant safety factor because C++ compilers can tack on
1748 # massive amounts of additional arguments before passing them to the
1749 # linker. It appears as though 1/2 is a usable value.
1750 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1751 fi
1752 ;;
1753 esac
1754 ])
1755 if test -n $lt_cv_sys_max_cmd_len ; then
1756 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1757 else
1758 AC_MSG_RESULT(none)
1759 fi
1760 max_cmd_len=$lt_cv_sys_max_cmd_len
1761 _LT_DECL([], [max_cmd_len], [0],
1762 [What is the maximum length of a command?])
1763 ])# LT_CMD_MAX_LEN
1764
1765 # Old name:
1766 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1767 dnl aclocal-1.4 backwards compatibility:
1768 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1769
1770
1771 # _LT_HEADER_DLFCN
1772 # ----------------
1773 m4_defun([_LT_HEADER_DLFCN],
1774 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1775 ])# _LT_HEADER_DLFCN
1776
1777
1778 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1779 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1780 # ----------------------------------------------------------------
1781 m4_defun([_LT_TRY_DLOPEN_SELF],
1782 [m4_require([_LT_HEADER_DLFCN])dnl
1783 if test "$cross_compiling" = yes; then :
1784 [$4]
1785 else
1786 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1787 lt_status=$lt_dlunknown
1788 cat > conftest.$ac_ext <<_LT_EOF
1789 [#line $LINENO "configure"
1790 #include "confdefs.h"
1791
1792 #if HAVE_DLFCN_H
1793 #include <dlfcn.h>
1794 #endif
1795
1796 #include <stdio.h>
1797
1798 #ifdef RTLD_GLOBAL
1799 # define LT_DLGLOBAL RTLD_GLOBAL
1800 #else
1801 # ifdef DL_GLOBAL
1802 # define LT_DLGLOBAL DL_GLOBAL
1803 # else
1804 # define LT_DLGLOBAL 0
1805 # endif
1806 #endif
1807
1808 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1809 find out it does not work in some platform. */
1810 #ifndef LT_DLLAZY_OR_NOW
1811 # ifdef RTLD_LAZY
1812 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1813 # else
1814 # ifdef DL_LAZY
1815 # define LT_DLLAZY_OR_NOW DL_LAZY
1816 # else
1817 # ifdef RTLD_NOW
1818 # define LT_DLLAZY_OR_NOW RTLD_NOW
1819 # else
1820 # ifdef DL_NOW
1821 # define LT_DLLAZY_OR_NOW DL_NOW
1822 # else
1823 # define LT_DLLAZY_OR_NOW 0
1824 # endif
1825 # endif
1826 # endif
1827 # endif
1828 #endif
1829
1830 /* When -fvisbility=hidden is used, assume the code has been annotated
1831 correspondingly for the symbols needed. */
1832 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1833 int fnord () __attribute__((visibility("default")));
1834 #endif
1835
1836 int fnord () { return 42; }
1837 int main ()
1838 {
1839 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1840 int status = $lt_dlunknown;
1841
1842 if (self)
1843 {
1844 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1845 else
1846 {
1847 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1848 else puts (dlerror ());
1849 }
1850 /* dlclose (self); */
1851 }
1852 else
1853 puts (dlerror ());
1854
1855 return status;
1856 }]
1857 _LT_EOF
1858 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1859 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1860 lt_status=$?
1861 case x$lt_status in
1862 x$lt_dlno_uscore) $1 ;;
1863 x$lt_dlneed_uscore) $2 ;;
1864 x$lt_dlunknown|x*) $3 ;;
1865 esac
1866 else :
1867 # compilation failed
1868 $3
1869 fi
1870 fi
1871 rm -fr conftest*
1872 ])# _LT_TRY_DLOPEN_SELF
1873
1874
1875 # LT_SYS_DLOPEN_SELF
1876 # ------------------
1877 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1878 [m4_require([_LT_HEADER_DLFCN])dnl
1879 if test "x$enable_dlopen" != xyes; then
1880 enable_dlopen=unknown
1881 enable_dlopen_self=unknown
1882 enable_dlopen_self_static=unknown
1883 else
1884 lt_cv_dlopen=no
1885 lt_cv_dlopen_libs=
1886
1887 case $host_os in
1888 beos*)
1889 lt_cv_dlopen="load_add_on"
1890 lt_cv_dlopen_libs=
1891 lt_cv_dlopen_self=yes
1892 ;;
1893
1894 mingw* | pw32* | cegcc*)
1895 lt_cv_dlopen="LoadLibrary"
1896 lt_cv_dlopen_libs=
1897 ;;
1898
1899 cygwin*)
1900 lt_cv_dlopen="dlopen"
1901 lt_cv_dlopen_libs=
1902 ;;
1903
1904 darwin*)
1905 # if libdl is installed we need to link against it
1906 AC_CHECK_LIB([dl], [dlopen],
1907 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1908 lt_cv_dlopen="dyld"
1909 lt_cv_dlopen_libs=
1910 lt_cv_dlopen_self=yes
1911 ])
1912 ;;
1913
1914 *)
1915 AC_CHECK_FUNC([shl_load],
1916 [lt_cv_dlopen="shl_load"],
1917 [AC_CHECK_LIB([dld], [shl_load],
1918 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1919 [AC_CHECK_FUNC([dlopen],
1920 [lt_cv_dlopen="dlopen"],
1921 [AC_CHECK_LIB([dl], [dlopen],
1922 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1923 [AC_CHECK_LIB([svld], [dlopen],
1924 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1925 [AC_CHECK_LIB([dld], [dld_link],
1926 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1927 ])
1928 ])
1929 ])
1930 ])
1931 ])
1932 ;;
1933 esac
1934
1935 if test "x$lt_cv_dlopen" != xno; then
1936 enable_dlopen=yes
1937 else
1938 enable_dlopen=no
1939 fi
1940
1941 case $lt_cv_dlopen in
1942 dlopen)
1943 save_CPPFLAGS="$CPPFLAGS"
1944 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1945
1946 save_LDFLAGS="$LDFLAGS"
1947 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1948
1949 save_LIBS="$LIBS"
1950 LIBS="$lt_cv_dlopen_libs $LIBS"
1951
1952 AC_CACHE_CHECK([whether a program can dlopen itself],
1953 lt_cv_dlopen_self, [dnl
1954 _LT_TRY_DLOPEN_SELF(
1955 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1956 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1957 ])
1958
1959 if test "x$lt_cv_dlopen_self" = xyes; then
1960 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1961 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1962 lt_cv_dlopen_self_static, [dnl
1963 _LT_TRY_DLOPEN_SELF(
1964 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1965 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1966 ])
1967 fi
1968
1969 CPPFLAGS="$save_CPPFLAGS"
1970 LDFLAGS="$save_LDFLAGS"
1971 LIBS="$save_LIBS"
1972 ;;
1973 esac
1974
1975 case $lt_cv_dlopen_self in
1976 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1977 *) enable_dlopen_self=unknown ;;
1978 esac
1979
1980 case $lt_cv_dlopen_self_static in
1981 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1982 *) enable_dlopen_self_static=unknown ;;
1983 esac
1984 fi
1985 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1986 [Whether dlopen is supported])
1987 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1988 [Whether dlopen of programs is supported])
1989 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1990 [Whether dlopen of statically linked programs is supported])
1991 ])# LT_SYS_DLOPEN_SELF
1992
1993 # Old name:
1994 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1995 dnl aclocal-1.4 backwards compatibility:
1996 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1997
1998
1999 # _LT_COMPILER_C_O([TAGNAME])
2000 # ---------------------------
2001 # Check to see if options -c and -o are simultaneously supported by compiler.
2002 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2003 m4_defun([_LT_COMPILER_C_O],
2004 [m4_require([_LT_DECL_SED])dnl
2005 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2006 m4_require([_LT_TAG_COMPILER])dnl
2007 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2008 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2009 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2010 $RM -r conftest 2>/dev/null
2011 mkdir conftest
2012 cd conftest
2013 mkdir out
2014 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2015
2016 lt_compiler_flag="-o out/conftest2.$ac_objext"
2017 # Insert the option either (1) after the last *FLAGS variable, or
2018 # (2) before a word containing "conftest.", or (3) at the end.
2019 # Note that $ac_compile itself does not contain backslashes and begins
2020 # with a dollar sign (not a hyphen), so the echo should work correctly.
2021 lt_compile=`echo "$ac_compile" | $SED \
2022 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2023 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2024 -e 's:$: $lt_compiler_flag:'`
2025 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2026 (eval "$lt_compile" 2>out/conftest.err)
2027 ac_status=$?
2028 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2029 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2030 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2031 then
2032 # The compiler can only warn and ignore the option if not recognized
2033 # So say no if there are warnings
2034 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2035 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2036 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2037 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2038 fi
2039 fi
2040 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2041 $RM conftest*
2042 # SGI C++ compiler will create directory out/ii_files/ for
2043 # template instantiation
2044 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2045 $RM out/* && rmdir out
2046 cd ..
2047 $RM -r conftest
2048 $RM conftest*
2049 ])
2050 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2051 [Does compiler simultaneously support -c and -o options?])
2052 ])# _LT_COMPILER_C_O
2053
2054
2055 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2056 # ----------------------------------
2057 # Check to see if we can do hard links to lock some files if needed
2058 m4_defun([_LT_COMPILER_FILE_LOCKS],
2059 [m4_require([_LT_ENABLE_LOCK])dnl
2060 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2061 _LT_COMPILER_C_O([$1])
2062
2063 hard_links="nottested"
2064 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2065 # do not overwrite the value of need_locks provided by the user
2066 AC_MSG_CHECKING([if we can lock with hard links])
2067 hard_links=yes
2068 $RM conftest*
2069 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2070 touch conftest.a
2071 ln conftest.a conftest.b 2>&5 || hard_links=no
2072 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2073 AC_MSG_RESULT([$hard_links])
2074 if test "$hard_links" = no; then
2075 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2076 need_locks=warn
2077 fi
2078 else
2079 need_locks=no
2080 fi
2081 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2082 ])# _LT_COMPILER_FILE_LOCKS
2083
2084
2085 # _LT_CHECK_OBJDIR
2086 # ----------------
2087 m4_defun([_LT_CHECK_OBJDIR],
2088 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2089 [rm -f .libs 2>/dev/null
2090 mkdir .libs 2>/dev/null
2091 if test -d .libs; then
2092 lt_cv_objdir=.libs
2093 else
2094 # MS-DOS does not allow filenames that begin with a dot.
2095 lt_cv_objdir=_libs
2096 fi
2097 rmdir .libs 2>/dev/null])
2098 objdir=$lt_cv_objdir
2099 _LT_DECL([], [objdir], [0],
2100 [The name of the directory that contains temporary libtool files])dnl
2101 m4_pattern_allow([LT_OBJDIR])dnl
2102 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2103 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2104 ])# _LT_CHECK_OBJDIR
2105
2106
2107 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2108 # --------------------------------------
2109 # Check hardcoding attributes.
2110 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2111 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2112 _LT_TAGVAR(hardcode_action, $1)=
2113 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2114 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2115 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2116
2117 # We can hardcode non-existent directories.
2118 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2119 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2120 # have to relink, otherwise we might link with an installed library
2121 # when we should be linking with a yet-to-be-installed one
2122 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2123 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2124 # Linking always hardcodes the temporary library directory.
2125 _LT_TAGVAR(hardcode_action, $1)=relink
2126 else
2127 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2128 _LT_TAGVAR(hardcode_action, $1)=immediate
2129 fi
2130 else
2131 # We cannot hardcode anything, or else we can only hardcode existing
2132 # directories.
2133 _LT_TAGVAR(hardcode_action, $1)=unsupported
2134 fi
2135 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2136
2137 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2138 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2139 # Fast installation is not supported
2140 enable_fast_install=no
2141 elif test "$shlibpath_overrides_runpath" = yes ||
2142 test "$enable_shared" = no; then
2143 # Fast installation is not necessary
2144 enable_fast_install=needless
2145 fi
2146 _LT_TAGDECL([], [hardcode_action], [0],
2147 [How to hardcode a shared library path into an executable])
2148 ])# _LT_LINKER_HARDCODE_LIBPATH
2149
2150
2151 # _LT_CMD_STRIPLIB
2152 # ----------------
2153 m4_defun([_LT_CMD_STRIPLIB],
2154 [m4_require([_LT_DECL_EGREP])
2155 striplib=
2156 old_striplib=
2157 AC_MSG_CHECKING([whether stripping libraries is possible])
2158 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2159 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2160 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2161 AC_MSG_RESULT([yes])
2162 else
2163 # FIXME - insert some real tests, host_os isn't really good enough
2164 case $host_os in
2165 darwin*)
2166 if test -n "$STRIP" ; then
2167 striplib="$STRIP -x"
2168 old_striplib="$STRIP -S"
2169 AC_MSG_RESULT([yes])
2170 else
2171 AC_MSG_RESULT([no])
2172 fi
2173 ;;
2174 *)
2175 AC_MSG_RESULT([no])
2176 ;;
2177 esac
2178 fi
2179 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2180 _LT_DECL([], [striplib], [1])
2181 ])# _LT_CMD_STRIPLIB
2182
2183
2184 # _LT_SYS_DYNAMIC_LINKER([TAG])
2185 # -----------------------------
2186 # PORTME Fill in your ld.so characteristics
2187 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2188 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2189 m4_require([_LT_DECL_EGREP])dnl
2190 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2191 m4_require([_LT_DECL_OBJDUMP])dnl
2192 m4_require([_LT_DECL_SED])dnl
2193 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2194 AC_MSG_CHECKING([dynamic linker characteristics])
2195 m4_if([$1],
2196 [], [
2197 if test "$GCC" = yes; then
2198 case $host_os in
2199 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2200 *) lt_awk_arg="/^libraries:/" ;;
2201 esac
2202 case $host_os in
2203 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2204 *) lt_sed_strip_eq="s,=/,/,g" ;;
2205 esac
2206 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2207 case $lt_search_path_spec in
2208 *\;*)
2209 # if the path contains ";" then we assume it to be the separator
2210 # otherwise default to the standard path separator (i.e. ":") - it is
2211 # assumed that no part of a normal pathname contains ";" but that should
2212 # okay in the real world where ";" in dirpaths is itself problematic.
2213 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2214 ;;
2215 *)
2216 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2217 ;;
2218 esac
2219 # Ok, now we have the path, separated by spaces, we can step through it
2220 # and add multilib dir if necessary.
2221 lt_tmp_lt_search_path_spec=
2222 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2223 for lt_sys_path in $lt_search_path_spec; do
2224 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2225 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2226 else
2227 test -d "$lt_sys_path" && \
2228 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2229 fi
2230 done
2231 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2232 BEGIN {RS=" "; FS="/|\n";} {
2233 lt_foo="";
2234 lt_count=0;
2235 for (lt_i = NF; lt_i > 0; lt_i--) {
2236 if ($lt_i != "" && $lt_i != ".") {
2237 if ($lt_i == "..") {
2238 lt_count++;
2239 } else {
2240 if (lt_count == 0) {
2241 lt_foo="/" $lt_i lt_foo;
2242 } else {
2243 lt_count--;
2244 }
2245 }
2246 }
2247 }
2248 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2249 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2250 }'`
2251 # AWK program above erroneously prepends '/' to C:/dos/paths
2252 # for these hosts.
2253 case $host_os in
2254 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2255 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2256 esac
2257 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2258 else
2259 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2260 fi])
2261 library_names_spec=
2262 libname_spec='lib$name'
2263 soname_spec=
2264 shrext_cmds=".so"
2265 postinstall_cmds=
2266 postuninstall_cmds=
2267 finish_cmds=
2268 finish_eval=
2269 shlibpath_var=
2270 shlibpath_overrides_runpath=unknown
2271 version_type=none
2272 dynamic_linker="$host_os ld.so"
2273 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2274 need_lib_prefix=unknown
2275 hardcode_into_libs=no
2276
2277 # when you set need_version to no, make sure it does not cause -set_version
2278 # flags to be left without arguments
2279 need_version=unknown
2280
2281 case $host_os in
2282 aix3*)
2283 version_type=linux
2284 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2285 shlibpath_var=LIBPATH
2286
2287 # AIX 3 has no versioning support, so we append a major version to the name.
2288 soname_spec='${libname}${release}${shared_ext}$major'
2289 ;;
2290
2291 aix[[4-9]]*)
2292 version_type=linux
2293 need_lib_prefix=no
2294 need_version=no
2295 hardcode_into_libs=yes
2296 if test "$host_cpu" = ia64; then
2297 # AIX 5 supports IA64
2298 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2299 shlibpath_var=LD_LIBRARY_PATH
2300 else
2301 # With GCC up to 2.95.x, collect2 would create an import file
2302 # for dependence libraries. The import file would start with
2303 # the line `#! .'. This would cause the generated library to
2304 # depend on `.', always an invalid library. This was fixed in
2305 # development snapshots of GCC prior to 3.0.
2306 case $host_os in
2307 aix4 | aix4.[[01]] | aix4.[[01]].*)
2308 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2309 echo ' yes '
2310 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2311 :
2312 else
2313 can_build_shared=no
2314 fi
2315 ;;
2316 esac
2317 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2318 # soname into executable. Probably we can add versioning support to
2319 # collect2, so additional links can be useful in future.
2320 if test "$aix_use_runtimelinking" = yes; then
2321 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2322 # instead of lib<name>.a to let people know that these are not
2323 # typical AIX shared libraries.
2324 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2325 else
2326 # We preserve .a as extension for shared libraries through AIX4.2
2327 # and later when we are not doing run time linking.
2328 library_names_spec='${libname}${release}.a $libname.a'
2329 soname_spec='${libname}${release}${shared_ext}$major'
2330 fi
2331 shlibpath_var=LIBPATH
2332 fi
2333 ;;
2334
2335 amigaos*)
2336 case $host_cpu in
2337 powerpc)
2338 # Since July 2007 AmigaOS4 officially supports .so libraries.
2339 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2340 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2341 ;;
2342 m68k)
2343 library_names_spec='$libname.ixlibrary $libname.a'
2344 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2345 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'
2346 ;;
2347 esac
2348 ;;
2349
2350 beos*)
2351 library_names_spec='${libname}${shared_ext}'
2352 dynamic_linker="$host_os ld.so"
2353 shlibpath_var=LIBRARY_PATH
2354 ;;
2355
2356 bsdi[[45]]*)
2357 version_type=linux
2358 need_version=no
2359 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2360 soname_spec='${libname}${release}${shared_ext}$major'
2361 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2362 shlibpath_var=LD_LIBRARY_PATH
2363 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2364 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2365 # the default ld.so.conf also contains /usr/contrib/lib and
2366 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2367 # libtool to hard-code these into programs
2368 ;;
2369
2370 cygwin* | mingw* | pw32* | cegcc*)
2371 version_type=windows
2372 shrext_cmds=".dll"
2373 need_version=no
2374 need_lib_prefix=no
2375
2376 case $GCC,$cc_basename in
2377 yes,*)
2378 # gcc
2379 library_names_spec='$libname.dll.a'
2380 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2381 postinstall_cmds='base_file=`basename \${file}`~
2382 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2383 dldir=$destdir/`dirname \$dlpath`~
2384 test -d \$dldir || mkdir -p \$dldir~
2385 $install_prog $dir/$dlname \$dldir/$dlname~
2386 chmod a+x \$dldir/$dlname~
2387 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2388 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2389 fi'
2390 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2391 dlpath=$dir/\$dldll~
2392 $RM \$dlpath'
2393 shlibpath_overrides_runpath=yes
2394
2395 case $host_os in
2396 cygwin*)
2397 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2398 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2399 m4_if([$1], [],[
2400 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2401 ;;
2402 mingw* | cegcc*)
2403 # MinGW DLLs use traditional 'lib' prefix
2404 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2405 ;;
2406 pw32*)
2407 # pw32 DLLs use 'pw' prefix rather than 'lib'
2408 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2409 ;;
2410 esac
2411 dynamic_linker='Win32 ld.exe'
2412 ;;
2413
2414 *,cl*)
2415 # Native MSVC
2416 libname_spec='$name'
2417 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2418 library_names_spec='${libname}.dll.lib'
2419
2420 case $build_os in
2421 mingw*)
2422 sys_lib_search_path_spec=
2423 lt_save_ifs=$IFS
2424 IFS=';'
2425 for lt_path in $LIB
2426 do
2427 IFS=$lt_save_ifs
2428 # Let DOS variable expansion print the short 8.3 style file name.
2429 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2430 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2431 done
2432 IFS=$lt_save_ifs
2433 # Convert to MSYS style.
2434 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2435 ;;
2436 cygwin*)
2437 # Convert to unix form, then to dos form, then back to unix form
2438 # but this time dos style (no spaces!) so that the unix form looks
2439 # like /cygdrive/c/PROGRA~1:/cygdr...
2440 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2441 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2442 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2443 ;;
2444 *)
2445 sys_lib_search_path_spec="$LIB"
2446 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2447 # It is most probably a Windows format PATH.
2448 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2449 else
2450 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2451 fi
2452 # FIXME: find the short name or the path components, as spaces are
2453 # common. (e.g. "Program Files" -> "PROGRA~1")
2454 ;;
2455 esac
2456
2457 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2458 postinstall_cmds='base_file=`basename \${file}`~
2459 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2460 dldir=$destdir/`dirname \$dlpath`~
2461 test -d \$dldir || mkdir -p \$dldir~
2462 $install_prog $dir/$dlname \$dldir/$dlname'
2463 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2464 dlpath=$dir/\$dldll~
2465 $RM \$dlpath'
2466 shlibpath_overrides_runpath=yes
2467 dynamic_linker='Win32 link.exe'
2468 ;;
2469
2470 *)
2471 # Assume MSVC wrapper
2472 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2473 dynamic_linker='Win32 ld.exe'
2474 ;;
2475 esac
2476 # FIXME: first we should search . and the directory the executable is in
2477 shlibpath_var=PATH
2478 ;;
2479
2480 darwin* | rhapsody*)
2481 dynamic_linker="$host_os dyld"
2482 version_type=darwin
2483 need_lib_prefix=no
2484 need_version=no
2485 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2486 soname_spec='${libname}${release}${major}$shared_ext'
2487 shlibpath_overrides_runpath=yes
2488 shlibpath_var=DYLD_LIBRARY_PATH
2489 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2490 m4_if([$1], [],[
2491 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2492 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2493 ;;
2494
2495 dgux*)
2496 version_type=linux
2497 need_lib_prefix=no
2498 need_version=no
2499 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2500 soname_spec='${libname}${release}${shared_ext}$major'
2501 shlibpath_var=LD_LIBRARY_PATH
2502 ;;
2503
2504 freebsd1*)
2505 dynamic_linker=no
2506 ;;
2507
2508 freebsd* | dragonfly*)
2509 # DragonFly does not have aout. When/if they implement a new
2510 # versioning mechanism, adjust this.
2511 if test -x /usr/bin/objformat; then
2512 objformat=`/usr/bin/objformat`
2513 else
2514 case $host_os in
2515 freebsd[[123]]*) objformat=aout ;;
2516 *) objformat=elf ;;
2517 esac
2518 fi
2519 version_type=freebsd-$objformat
2520 case $version_type in
2521 freebsd-elf*)
2522 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2523 need_version=no
2524 need_lib_prefix=no
2525 ;;
2526 freebsd-*)
2527 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2528 need_version=yes
2529 ;;
2530 esac
2531 shlibpath_var=LD_LIBRARY_PATH
2532 case $host_os in
2533 freebsd2*)
2534 shlibpath_overrides_runpath=yes
2535 ;;
2536 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2537 shlibpath_overrides_runpath=yes
2538 hardcode_into_libs=yes
2539 ;;
2540 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2541 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2542 shlibpath_overrides_runpath=no
2543 hardcode_into_libs=yes
2544 ;;
2545 *) # from 4.6 on, and DragonFly
2546 shlibpath_overrides_runpath=yes
2547 hardcode_into_libs=yes
2548 ;;
2549 esac
2550 ;;
2551
2552 gnu*)
2553 version_type=linux
2554 need_lib_prefix=no
2555 need_version=no
2556 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2557 soname_spec='${libname}${release}${shared_ext}$major'
2558 shlibpath_var=LD_LIBRARY_PATH
2559 hardcode_into_libs=yes
2560 ;;
2561
2562 haiku*)
2563 version_type=linux
2564 need_lib_prefix=no
2565 need_version=no
2566 dynamic_linker="$host_os runtime_loader"
2567 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2568 soname_spec='${libname}${release}${shared_ext}$major'
2569 shlibpath_var=LIBRARY_PATH
2570 shlibpath_overrides_runpath=yes
2571 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2572 hardcode_into_libs=yes
2573 ;;
2574
2575 hpux9* | hpux10* | hpux11*)
2576 # Give a soname corresponding to the major version so that dld.sl refuses to
2577 # link against other versions.
2578 version_type=sunos
2579 need_lib_prefix=no
2580 need_version=no
2581 case $host_cpu in
2582 ia64*)
2583 shrext_cmds='.so'
2584 hardcode_into_libs=yes
2585 dynamic_linker="$host_os dld.so"
2586 shlibpath_var=LD_LIBRARY_PATH
2587 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2588 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2589 soname_spec='${libname}${release}${shared_ext}$major'
2590 if test "X$HPUX_IA64_MODE" = X32; then
2591 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2592 else
2593 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2594 fi
2595 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2596 ;;
2597 hppa*64*)
2598 shrext_cmds='.sl'
2599 hardcode_into_libs=yes
2600 dynamic_linker="$host_os dld.sl"
2601 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2602 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2603 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2604 soname_spec='${libname}${release}${shared_ext}$major'
2605 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2606 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2607 ;;
2608 *)
2609 shrext_cmds='.sl'
2610 dynamic_linker="$host_os dld.sl"
2611 shlibpath_var=SHLIB_PATH
2612 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2613 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2614 soname_spec='${libname}${release}${shared_ext}$major'
2615 ;;
2616 esac
2617 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2618 postinstall_cmds='chmod 555 $lib'
2619 # or fails outright, so override atomically:
2620 install_override_mode=555
2621 ;;
2622
2623 interix[[3-9]]*)
2624 version_type=linux
2625 need_lib_prefix=no
2626 need_version=no
2627 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2628 soname_spec='${libname}${release}${shared_ext}$major'
2629 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2630 shlibpath_var=LD_LIBRARY_PATH
2631 shlibpath_overrides_runpath=no
2632 hardcode_into_libs=yes
2633 ;;
2634
2635 irix5* | irix6* | nonstopux*)
2636 case $host_os in
2637 nonstopux*) version_type=nonstopux ;;
2638 *)
2639 if test "$lt_cv_prog_gnu_ld" = yes; then
2640 version_type=linux
2641 else
2642 version_type=irix
2643 fi ;;
2644 esac
2645 need_lib_prefix=no
2646 need_version=no
2647 soname_spec='${libname}${release}${shared_ext}$major'
2648 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2649 case $host_os in
2650 irix5* | nonstopux*)
2651 libsuff= shlibsuff=
2652 ;;
2653 *)
2654 case $LD in # libtool.m4 will add one of these switches to LD
2655 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2656 libsuff= shlibsuff= libmagic=32-bit;;
2657 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2658 libsuff=32 shlibsuff=N32 libmagic=N32;;
2659 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2660 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2661 *) libsuff= shlibsuff= libmagic=never-match;;
2662 esac
2663 ;;
2664 esac
2665 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2666 shlibpath_overrides_runpath=no
2667 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2668 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2669 hardcode_into_libs=yes
2670 ;;
2671
2672 # No shared lib support for Linux oldld, aout, or coff.
2673 linux*oldld* | linux*aout* | linux*coff*)
2674 dynamic_linker=no
2675 ;;
2676
2677 # This must be Linux ELF.
2678 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2679 version_type=linux
2680 need_lib_prefix=no
2681 need_version=no
2682 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2683 soname_spec='${libname}${release}${shared_ext}$major'
2684 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2685 shlibpath_var=LD_LIBRARY_PATH
2686 shlibpath_overrides_runpath=no
2687
2688 # Some binutils ld are patched to set DT_RUNPATH
2689 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2690 [lt_cv_shlibpath_overrides_runpath=no
2691 save_LDFLAGS=$LDFLAGS
2692 save_libdir=$libdir
2693 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2694 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2695 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2696 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2697 [lt_cv_shlibpath_overrides_runpath=yes])])
2698 LDFLAGS=$save_LDFLAGS
2699 libdir=$save_libdir
2700 ])
2701 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2702
2703 # This implies no fast_install, which is unacceptable.
2704 # Some rework will be needed to allow for fast_install
2705 # before this can be enabled.
2706 hardcode_into_libs=yes
2707
2708 # Append ld.so.conf contents to the search path
2709 if test -f /etc/ld.so.conf; then
2710 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' ' '`
2711 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2712 fi
2713
2714 # We used to test for /lib/ld.so.1 and disable shared libraries on
2715 # powerpc, because MkLinux only supported shared libraries with the
2716 # GNU dynamic linker. Since this was broken with cross compilers,
2717 # most powerpc-linux boxes support dynamic linking these days and
2718 # people can always --disable-shared, the test was removed, and we
2719 # assume the GNU/Linux dynamic linker is in use.
2720 dynamic_linker='GNU/Linux ld.so'
2721 ;;
2722
2723 netbsd*)
2724 version_type=sunos
2725 need_lib_prefix=no
2726 need_version=no
2727 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2728 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2729 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2730 dynamic_linker='NetBSD (a.out) ld.so'
2731 else
2732 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2733 soname_spec='${libname}${release}${shared_ext}$major'
2734 dynamic_linker='NetBSD ld.elf_so'
2735 fi
2736 shlibpath_var=LD_LIBRARY_PATH
2737 shlibpath_overrides_runpath=yes
2738 hardcode_into_libs=yes
2739 ;;
2740
2741 newsos6)
2742 version_type=linux
2743 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2744 shlibpath_var=LD_LIBRARY_PATH
2745 shlibpath_overrides_runpath=yes
2746 ;;
2747
2748 *nto* | *qnx*)
2749 version_type=qnx
2750 need_lib_prefix=no
2751 need_version=no
2752 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2753 soname_spec='${libname}${release}${shared_ext}$major'
2754 shlibpath_var=LD_LIBRARY_PATH
2755 shlibpath_overrides_runpath=no
2756 hardcode_into_libs=yes
2757 dynamic_linker='ldqnx.so'
2758 ;;
2759
2760 openbsd*)
2761 version_type=sunos
2762 sys_lib_dlsearch_path_spec="/usr/lib"
2763 need_lib_prefix=no
2764 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2765 case $host_os in
2766 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2767 *) need_version=no ;;
2768 esac
2769 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2770 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2771 shlibpath_var=LD_LIBRARY_PATH
2772 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2773 case $host_os in
2774 openbsd2.[[89]] | openbsd2.[[89]].*)
2775 shlibpath_overrides_runpath=no
2776 ;;
2777 *)
2778 shlibpath_overrides_runpath=yes
2779 ;;
2780 esac
2781 else
2782 shlibpath_overrides_runpath=yes
2783 fi
2784 ;;
2785
2786 os2*)
2787 libname_spec='$name'
2788 shrext_cmds=".dll"
2789 need_lib_prefix=no
2790 library_names_spec='$libname${shared_ext} $libname.a'
2791 dynamic_linker='OS/2 ld.exe'
2792 shlibpath_var=LIBPATH
2793 ;;
2794
2795 osf3* | osf4* | osf5*)
2796 version_type=osf
2797 need_lib_prefix=no
2798 need_version=no
2799 soname_spec='${libname}${release}${shared_ext}$major'
2800 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2801 shlibpath_var=LD_LIBRARY_PATH
2802 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2803 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2804 ;;
2805
2806 rdos*)
2807 dynamic_linker=no
2808 ;;
2809
2810 solaris*)
2811 version_type=linux
2812 need_lib_prefix=no
2813 need_version=no
2814 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2815 soname_spec='${libname}${release}${shared_ext}$major'
2816 shlibpath_var=LD_LIBRARY_PATH
2817 shlibpath_overrides_runpath=yes
2818 hardcode_into_libs=yes
2819 # ldd complains unless libraries are executable
2820 postinstall_cmds='chmod +x $lib'
2821 ;;
2822
2823 sunos4*)
2824 version_type=sunos
2825 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2826 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2827 shlibpath_var=LD_LIBRARY_PATH
2828 shlibpath_overrides_runpath=yes
2829 if test "$with_gnu_ld" = yes; then
2830 need_lib_prefix=no
2831 fi
2832 need_version=yes
2833 ;;
2834
2835 sysv4 | sysv4.3*)
2836 version_type=linux
2837 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2838 soname_spec='${libname}${release}${shared_ext}$major'
2839 shlibpath_var=LD_LIBRARY_PATH
2840 case $host_vendor in
2841 sni)
2842 shlibpath_overrides_runpath=no
2843 need_lib_prefix=no
2844 runpath_var=LD_RUN_PATH
2845 ;;
2846 siemens)
2847 need_lib_prefix=no
2848 ;;
2849 motorola)
2850 need_lib_prefix=no
2851 need_version=no
2852 shlibpath_overrides_runpath=no
2853 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2854 ;;
2855 esac
2856 ;;
2857
2858 sysv4*MP*)
2859 if test -d /usr/nec ;then
2860 version_type=linux
2861 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2862 soname_spec='$libname${shared_ext}.$major'
2863 shlibpath_var=LD_LIBRARY_PATH
2864 fi
2865 ;;
2866
2867 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2868 version_type=freebsd-elf
2869 need_lib_prefix=no
2870 need_version=no
2871 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2872 soname_spec='${libname}${release}${shared_ext}$major'
2873 shlibpath_var=LD_LIBRARY_PATH
2874 shlibpath_overrides_runpath=yes
2875 hardcode_into_libs=yes
2876 if test "$with_gnu_ld" = yes; then
2877 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2878 else
2879 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2880 case $host_os in
2881 sco3.2v5*)
2882 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2883 ;;
2884 esac
2885 fi
2886 sys_lib_dlsearch_path_spec='/usr/lib'
2887 ;;
2888
2889 tpf*)
2890 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2891 version_type=linux
2892 need_lib_prefix=no
2893 need_version=no
2894 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2895 shlibpath_var=LD_LIBRARY_PATH
2896 shlibpath_overrides_runpath=no
2897 hardcode_into_libs=yes
2898 ;;
2899
2900 uts4*)
2901 version_type=linux
2902 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2903 soname_spec='${libname}${release}${shared_ext}$major'
2904 shlibpath_var=LD_LIBRARY_PATH
2905 ;;
2906
2907 *)
2908 dynamic_linker=no
2909 ;;
2910 esac
2911 AC_MSG_RESULT([$dynamic_linker])
2912 test "$dynamic_linker" = no && can_build_shared=no
2913
2914 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2915 if test "$GCC" = yes; then
2916 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2917 fi
2918
2919 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2920 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2921 fi
2922 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2923 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2924 fi
2925
2926 _LT_DECL([], [variables_saved_for_relink], [1],
2927 [Variables whose values should be saved in libtool wrapper scripts and
2928 restored at link time])
2929 _LT_DECL([], [need_lib_prefix], [0],
2930 [Do we need the "lib" prefix for modules?])
2931 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2932 _LT_DECL([], [version_type], [0], [Library versioning type])
2933 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2934 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2935 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2936 [Is shlibpath searched before the hard-coded library search path?])
2937 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2938 _LT_DECL([], [library_names_spec], [1],
2939 [[List of archive names. First name is the real one, the rest are links.
2940 The last name is the one that the linker finds with -lNAME]])
2941 _LT_DECL([], [soname_spec], [1],
2942 [[The coded name of the library, if different from the real name]])
2943 _LT_DECL([], [install_override_mode], [1],
2944 [Permission mode override for installation of shared libraries])
2945 _LT_DECL([], [postinstall_cmds], [2],
2946 [Command to use after installation of a shared archive])
2947 _LT_DECL([], [postuninstall_cmds], [2],
2948 [Command to use after uninstallation of a shared archive])
2949 _LT_DECL([], [finish_cmds], [2],
2950 [Commands used to finish a libtool library installation in a directory])
2951 _LT_DECL([], [finish_eval], [1],
2952 [[As "finish_cmds", except a single script fragment to be evaled but
2953 not shown]])
2954 _LT_DECL([], [hardcode_into_libs], [0],
2955 [Whether we should hardcode library paths into libraries])
2956 _LT_DECL([], [sys_lib_search_path_spec], [2],
2957 [Compile-time system search path for libraries])
2958 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2959 [Run-time system search path for libraries])
2960 ])# _LT_SYS_DYNAMIC_LINKER
2961
2962
2963 # _LT_PATH_TOOL_PREFIX(TOOL)
2964 # --------------------------
2965 # find a file program which can recognize shared library
2966 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2967 [m4_require([_LT_DECL_EGREP])dnl
2968 AC_MSG_CHECKING([for $1])
2969 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2970 [case $MAGIC_CMD in
2971 [[\\/*] | ?:[\\/]*])
2972 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2973 ;;
2974 *)
2975 lt_save_MAGIC_CMD="$MAGIC_CMD"
2976 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2977 dnl $ac_dummy forces splitting on constant user-supplied paths.
2978 dnl POSIX.2 word splitting is done only on the output of word expansions,
2979 dnl not every word. This closes a longstanding sh security hole.
2980 ac_dummy="m4_if([$2], , $PATH, [$2])"
2981 for ac_dir in $ac_dummy; do
2982 IFS="$lt_save_ifs"
2983 test -z "$ac_dir" && ac_dir=.
2984 if test -f $ac_dir/$1; then
2985 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2986 if test -n "$file_magic_test_file"; then
2987 case $deplibs_check_method in
2988 "file_magic "*)
2989 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2990 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2991 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2992 $EGREP "$file_magic_regex" > /dev/null; then
2993 :
2994 else
2995 cat <<_LT_EOF 1>&2
2996
2997 *** Warning: the command libtool uses to detect shared libraries,
2998 *** $file_magic_cmd, produces output that libtool cannot recognize.
2999 *** The result is that libtool may fail to recognize shared libraries
3000 *** as such. This will affect the creation of libtool libraries that
3001 *** depend on shared libraries, but programs linked with such libtool
3002 *** libraries will work regardless of this problem. Nevertheless, you
3003 *** may want to report the problem to your system manager and/or to
3004 *** bug-libtool@gnu.org
3005
3006 _LT_EOF
3007 fi ;;
3008 esac
3009 fi
3010 break
3011 fi
3012 done
3013 IFS="$lt_save_ifs"
3014 MAGIC_CMD="$lt_save_MAGIC_CMD"
3015 ;;
3016 esac])
3017 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3018 if test -n "$MAGIC_CMD"; then
3019 AC_MSG_RESULT($MAGIC_CMD)
3020 else
3021 AC_MSG_RESULT(no)
3022 fi
3023 _LT_DECL([], [MAGIC_CMD], [0],
3024 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3025 ])# _LT_PATH_TOOL_PREFIX
3026
3027 # Old name:
3028 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3029 dnl aclocal-1.4 backwards compatibility:
3030 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3031
3032
3033 # _LT_PATH_MAGIC
3034 # --------------
3035 # find a file program which can recognize a shared library
3036 m4_defun([_LT_PATH_MAGIC],
3037 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3038 if test -z "$lt_cv_path_MAGIC_CMD"; then
3039 if test -n "$ac_tool_prefix"; then
3040 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3041 else
3042 MAGIC_CMD=:
3043 fi
3044 fi
3045 ])# _LT_PATH_MAGIC
3046
3047
3048 # LT_PATH_LD
3049 # ----------
3050 # find the pathname to the GNU or non-GNU linker
3051 AC_DEFUN([LT_PATH_LD],
3052 [AC_REQUIRE([AC_PROG_CC])dnl
3053 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3054 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3055 m4_require([_LT_DECL_SED])dnl
3056 m4_require([_LT_DECL_EGREP])dnl
3057 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3058
3059 AC_ARG_WITH([gnu-ld],
3060 [AS_HELP_STRING([--with-gnu-ld],
3061 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3062 [test "$withval" = no || with_gnu_ld=yes],
3063 [with_gnu_ld=no])dnl
3064
3065 ac_prog=ld
3066 if test "$GCC" = yes; then
3067 # Check if gcc -print-prog-name=ld gives a path.
3068 AC_MSG_CHECKING([for ld used by $CC])
3069 case $host in
3070 *-*-mingw*)
3071 # gcc leaves a trailing carriage return which upsets mingw
3072 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3073 *)
3074 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3075 esac
3076 case $ac_prog in
3077 # Accept absolute paths.
3078 [[\\/]]* | ?:[[\\/]]*)
3079 re_direlt='/[[^/]][[^/]]*/\.\./'
3080 # Canonicalize the pathname of ld
3081 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3082 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3083 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3084 done
3085 test -z "$LD" && LD="$ac_prog"
3086 ;;
3087 "")
3088 # If it fails, then pretend we aren't using GCC.
3089 ac_prog=ld
3090 ;;
3091 *)
3092 # If it is relative, then search for the first ld in PATH.
3093 with_gnu_ld=unknown
3094 ;;
3095 esac
3096 elif test "$with_gnu_ld" = yes; then
3097 AC_MSG_CHECKING([for GNU ld])
3098 else
3099 AC_MSG_CHECKING([for non-GNU ld])
3100 fi
3101 AC_CACHE_VAL(lt_cv_path_LD,
3102 [if test -z "$LD"; then
3103 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3104 for ac_dir in $PATH; do
3105 IFS="$lt_save_ifs"
3106 test -z "$ac_dir" && ac_dir=.
3107 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3108 lt_cv_path_LD="$ac_dir/$ac_prog"
3109 # Check to see if the program is GNU ld. I'd rather use --version,
3110 # but apparently some variants of GNU ld only accept -v.
3111 # Break only if it was the GNU/non-GNU ld that we prefer.
3112 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3113 *GNU* | *'with BFD'*)
3114 test "$with_gnu_ld" != no && break
3115 ;;
3116 *)
3117 test "$with_gnu_ld" != yes && break
3118 ;;
3119 esac
3120 fi
3121 done
3122 IFS="$lt_save_ifs"
3123 else
3124 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3125 fi])
3126 LD="$lt_cv_path_LD"
3127 if test -n "$LD"; then
3128 AC_MSG_RESULT($LD)
3129 else
3130 AC_MSG_RESULT(no)
3131 fi
3132 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3133 _LT_PATH_LD_GNU
3134 AC_SUBST([LD])
3135
3136 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3137 ])# LT_PATH_LD
3138
3139 # Old names:
3140 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3141 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3142 dnl aclocal-1.4 backwards compatibility:
3143 dnl AC_DEFUN([AM_PROG_LD], [])
3144 dnl AC_DEFUN([AC_PROG_LD], [])
3145
3146
3147 # _LT_PATH_LD_GNU
3148 #- --------------
3149 m4_defun([_LT_PATH_LD_GNU],
3150 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3151 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3152 case `$LD -v 2>&1 </dev/null` in
3153 *GNU* | *'with BFD'*)
3154 lt_cv_prog_gnu_ld=yes
3155 ;;
3156 *)
3157 lt_cv_prog_gnu_ld=no
3158 ;;
3159 esac])
3160 with_gnu_ld=$lt_cv_prog_gnu_ld
3161 ])# _LT_PATH_LD_GNU
3162
3163
3164 # _LT_CMD_RELOAD
3165 # --------------
3166 # find reload flag for linker
3167 # -- PORTME Some linkers may need a different reload flag.
3168 m4_defun([_LT_CMD_RELOAD],
3169 [AC_CACHE_CHECK([for $LD option to reload object files],
3170 lt_cv_ld_reload_flag,
3171 [lt_cv_ld_reload_flag='-r'])
3172 reload_flag=$lt_cv_ld_reload_flag
3173 case $reload_flag in
3174 "" | " "*) ;;
3175 *) reload_flag=" $reload_flag" ;;
3176 esac
3177 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3178 case $host_os in
3179 cygwin* | mingw* | pw32* | cegcc*)
3180 if test "$GCC" != yes; then
3181 reload_cmds=false
3182 fi
3183 ;;
3184 darwin*)
3185 if test "$GCC" = yes; then
3186 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3187 else
3188 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3189 fi
3190 ;;
3191 esac
3192 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3193 _LT_TAGDECL([], [reload_cmds], [2])dnl
3194 ])# _LT_CMD_RELOAD
3195
3196
3197 # _LT_CHECK_MAGIC_METHOD
3198 # ----------------------
3199 # how to check for library dependencies
3200 # -- PORTME fill in with the dynamic library characteristics
3201 m4_defun([_LT_CHECK_MAGIC_METHOD],
3202 [m4_require([_LT_DECL_EGREP])
3203 m4_require([_LT_DECL_OBJDUMP])
3204 AC_CACHE_CHECK([how to recognize dependent libraries],
3205 lt_cv_deplibs_check_method,
3206 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3207 lt_cv_file_magic_test_file=
3208 lt_cv_deplibs_check_method='unknown'
3209 # Need to set the preceding variable on all platforms that support
3210 # interlibrary dependencies.
3211 # 'none' -- dependencies not supported.
3212 # `unknown' -- same as none, but documents that we really don't know.
3213 # 'pass_all' -- all dependencies passed with no checks.
3214 # 'test_compile' -- check by making test program.
3215 # 'file_magic [[regex]]' -- check by looking for files in library path
3216 # which responds to the $file_magic_cmd with a given extended regex.
3217 # If you have `file' or equivalent on your system and you're not sure
3218 # whether `pass_all' will *always* work, you probably want this one.
3219
3220 case $host_os in
3221 aix[[4-9]]*)
3222 lt_cv_deplibs_check_method=pass_all
3223 ;;
3224
3225 beos*)
3226 lt_cv_deplibs_check_method=pass_all
3227 ;;
3228
3229 bsdi[[45]]*)
3230 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3231 lt_cv_file_magic_cmd='/usr/bin/file -L'
3232 lt_cv_file_magic_test_file=/shlib/libc.so
3233 ;;
3234
3235 cygwin*)
3236 # func_win32_libid is a shell function defined in ltmain.sh
3237 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3238 lt_cv_file_magic_cmd='func_win32_libid'
3239 ;;
3240
3241 mingw* | pw32*)
3242 # Base MSYS/MinGW do not provide the 'file' command needed by
3243 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3244 # unless we find 'file', for example because we are cross-compiling.
3245 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3246 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3247 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3248 lt_cv_file_magic_cmd='func_win32_libid'
3249 else
3250 # Keep this pattern in sync with the one in func_win32_libid.
3251 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3252 lt_cv_file_magic_cmd='$OBJDUMP -f'
3253 fi
3254 ;;
3255
3256 cegcc*)
3257 # use the weaker test based on 'objdump'. See mingw*.
3258 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3259 lt_cv_file_magic_cmd='$OBJDUMP -f'
3260 ;;
3261
3262 darwin* | rhapsody*)
3263 lt_cv_deplibs_check_method=pass_all
3264 ;;
3265
3266 freebsd* | dragonfly*)
3267 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3268 case $host_cpu in
3269 i*86 )
3270 # Not sure whether the presence of OpenBSD here was a mistake.
3271 # Let's accept both of them until this is cleared up.
3272 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3273 lt_cv_file_magic_cmd=/usr/bin/file
3274 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3275 ;;
3276 esac
3277 else
3278 lt_cv_deplibs_check_method=pass_all
3279 fi
3280 ;;
3281
3282 gnu*)
3283 lt_cv_deplibs_check_method=pass_all
3284 ;;
3285
3286 haiku*)
3287 lt_cv_deplibs_check_method=pass_all
3288 ;;
3289
3290 hpux10.20* | hpux11*)
3291 lt_cv_file_magic_cmd=/usr/bin/file
3292 case $host_cpu in
3293 ia64*)
3294 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3295 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3296 ;;
3297 hppa*64*)
3298 [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]']
3299 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3300 ;;
3301 *)
3302 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3303 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3304 ;;
3305 esac
3306 ;;
3307
3308 interix[[3-9]]*)
3309 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3310 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3311 ;;
3312
3313 irix5* | irix6* | nonstopux*)
3314 case $LD in
3315 *-32|*"-32 ") libmagic=32-bit;;
3316 *-n32|*"-n32 ") libmagic=N32;;
3317 *-64|*"-64 ") libmagic=64-bit;;
3318 *) libmagic=never-match;;
3319 esac
3320 lt_cv_deplibs_check_method=pass_all
3321 ;;
3322
3323 # This must be Linux ELF.
3324 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3325 lt_cv_deplibs_check_method=pass_all
3326 ;;
3327
3328 netbsd*)
3329 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3330 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3331 else
3332 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3333 fi
3334 ;;
3335
3336 newos6*)
3337 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3338 lt_cv_file_magic_cmd=/usr/bin/file
3339 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3340 ;;
3341
3342 *nto* | *qnx*)
3343 lt_cv_deplibs_check_method=pass_all
3344 ;;
3345
3346 openbsd*)
3347 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3348 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3349 else
3350 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3351 fi
3352 ;;
3353
3354 osf3* | osf4* | osf5*)
3355 lt_cv_deplibs_check_method=pass_all
3356 ;;
3357
3358 rdos*)
3359 lt_cv_deplibs_check_method=pass_all
3360 ;;
3361
3362 solaris*)
3363 lt_cv_deplibs_check_method=pass_all
3364 ;;
3365
3366 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3367 lt_cv_deplibs_check_method=pass_all
3368 ;;
3369
3370 sysv4 | sysv4.3*)
3371 case $host_vendor in
3372 motorola)
3373 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]]'
3374 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3375 ;;
3376 ncr)
3377 lt_cv_deplibs_check_method=pass_all
3378 ;;
3379 sequent)
3380 lt_cv_file_magic_cmd='/bin/file'
3381 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3382 ;;
3383 sni)
3384 lt_cv_file_magic_cmd='/bin/file'
3385 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3386 lt_cv_file_magic_test_file=/lib/libc.so
3387 ;;
3388 siemens)
3389 lt_cv_deplibs_check_method=pass_all
3390 ;;
3391 pc)
3392 lt_cv_deplibs_check_method=pass_all
3393 ;;
3394 esac
3395 ;;
3396
3397 tpf*)
3398 lt_cv_deplibs_check_method=pass_all
3399 ;;
3400 esac
3401 ])
3402
3403 file_magic_glob=
3404 want_nocaseglob=no
3405 if test "$build" = "$host"; then
3406 case $host_os in
3407 mingw* | pw32*)
3408 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3409 want_nocaseglob=yes
3410 else
3411 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3412 fi
3413 ;;
3414 esac
3415 fi
3416
3417 file_magic_cmd=$lt_cv_file_magic_cmd
3418 deplibs_check_method=$lt_cv_deplibs_check_method
3419 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3420
3421 _LT_DECL([], [deplibs_check_method], [1],
3422 [Method to check whether dependent libraries are shared objects])
3423 _LT_DECL([], [file_magic_cmd], [1],
3424 [Command to use when deplibs_check_method = "file_magic"])
3425 _LT_DECL([], [file_magic_glob], [1],
3426 [How to find potential files when deplibs_check_method = "file_magic"])
3427 _LT_DECL([], [want_nocaseglob], [1],
3428 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3429 ])# _LT_CHECK_MAGIC_METHOD
3430
3431
3432 # LT_PATH_NM
3433 # ----------
3434 # find the pathname to a BSD- or MS-compatible name lister
3435 AC_DEFUN([LT_PATH_NM],
3436 [AC_REQUIRE([AC_PROG_CC])dnl
3437 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3438 [if test -n "$NM"; then
3439 # Let the user override the test.
3440 lt_cv_path_NM="$NM"
3441 else
3442 lt_nm_to_check="${ac_tool_prefix}nm"
3443 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3444 lt_nm_to_check="$lt_nm_to_check nm"
3445 fi
3446 for lt_tmp_nm in $lt_nm_to_check; do
3447 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3448 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3449 IFS="$lt_save_ifs"
3450 test -z "$ac_dir" && ac_dir=.
3451 tmp_nm="$ac_dir/$lt_tmp_nm"
3452 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3453 # Check to see if the nm accepts a BSD-compat flag.
3454 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3455 # nm: unknown option "B" ignored
3456 # Tru64's nm complains that /dev/null is an invalid object file
3457 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3458 */dev/null* | *'Invalid file or object type'*)
3459 lt_cv_path_NM="$tmp_nm -B"
3460 break
3461 ;;
3462 *)
3463 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3464 */dev/null*)
3465 lt_cv_path_NM="$tmp_nm -p"
3466 break
3467 ;;
3468 *)
3469 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3470 continue # so that we can try to find one that supports BSD flags
3471 ;;
3472 esac
3473 ;;
3474 esac
3475 fi
3476 done
3477 IFS="$lt_save_ifs"
3478 done
3479 : ${lt_cv_path_NM=no}
3480 fi])
3481 if test "$lt_cv_path_NM" != "no"; then
3482 NM="$lt_cv_path_NM"
3483 else
3484 # Didn't find any BSD compatible name lister, look for dumpbin.
3485 if test -n "$DUMPBIN"; then :
3486 # Let the user override the test.
3487 else
3488 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3489 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3490 *COFF*)
3491 DUMPBIN="$DUMPBIN -symbols"
3492 ;;
3493 *)
3494 DUMPBIN=:
3495 ;;
3496 esac
3497 fi
3498 AC_SUBST([DUMPBIN])
3499 if test "$DUMPBIN" != ":"; then
3500 NM="$DUMPBIN"
3501 fi
3502 fi
3503 test -z "$NM" && NM=nm
3504 AC_SUBST([NM])
3505 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3506
3507 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3508 [lt_cv_nm_interface="BSD nm"
3509 echo "int some_variable = 0;" > conftest.$ac_ext
3510 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3511 (eval "$ac_compile" 2>conftest.err)
3512 cat conftest.err >&AS_MESSAGE_LOG_FD
3513 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3514 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3515 cat conftest.err >&AS_MESSAGE_LOG_FD
3516 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3517 cat conftest.out >&AS_MESSAGE_LOG_FD
3518 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3519 lt_cv_nm_interface="MS dumpbin"
3520 fi
3521 rm -f conftest*])
3522 ])# LT_PATH_NM
3523
3524 # Old names:
3525 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3526 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3527 dnl aclocal-1.4 backwards compatibility:
3528 dnl AC_DEFUN([AM_PROG_NM], [])
3529 dnl AC_DEFUN([AC_PROG_NM], [])
3530
3531 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3532 # --------------------------------
3533 # how to determine the name of the shared library
3534 # associated with a specific link library.
3535 # -- PORTME fill in with the dynamic library characteristics
3536 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3537 [m4_require([_LT_DECL_EGREP])
3538 m4_require([_LT_DECL_OBJDUMP])
3539 m4_require([_LT_DECL_DLLTOOL])
3540 AC_CACHE_CHECK([how to associate runtime and link libraries],
3541 lt_cv_sharedlib_from_linklib_cmd,
3542 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3543
3544 case $host_os in
3545 cygwin* | mingw* | pw32* | cegcc*)
3546 # two different shell functions defined in ltmain.sh
3547 # decide which to use based on capabilities of $DLLTOOL
3548 case `$DLLTOOL --help 2>&1` in
3549 *--identify-strict*)
3550 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3551 ;;
3552 *)
3553 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3554 ;;
3555 esac
3556 ;;
3557 *)
3558 # fallback: assume linklib IS sharedlib
3559 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3560 ;;
3561 esac
3562 ])
3563 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3564 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3565
3566 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3567 [Command to associate shared and link libraries])
3568 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3569
3570
3571 # _LT_PATH_MANIFEST_TOOL
3572 # ----------------------
3573 # locate the manifest tool
3574 m4_defun([_LT_PATH_MANIFEST_TOOL],
3575 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3576 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3577 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3578 [lt_cv_path_mainfest_tool=no
3579 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3580 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3581 cat conftest.err >&AS_MESSAGE_LOG_FD
3582 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3583 lt_cv_path_mainfest_tool=yes
3584 fi
3585 rm -f conftest*])
3586 if test "x$lt_cv_path_mainfest_tool" != xyes; then
3587 MANIFEST_TOOL=:
3588 fi
3589 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3590 ])# _LT_PATH_MANIFEST_TOOL
3591
3592
3593 # LT_LIB_M
3594 # --------
3595 # check for math library
3596 AC_DEFUN([LT_LIB_M],
3597 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3598 LIBM=
3599 case $host in
3600 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3601 # These system don't have libm, or don't need it
3602 ;;
3603 *-ncr-sysv4.3*)
3604 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3605 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3606 ;;
3607 *)
3608 AC_CHECK_LIB(m, cos, LIBM="-lm")
3609 ;;
3610 esac
3611 AC_SUBST([LIBM])
3612 ])# LT_LIB_M
3613
3614 # Old name:
3615 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3616 dnl aclocal-1.4 backwards compatibility:
3617 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3618
3619
3620 # _LT_COMPILER_NO_RTTI([TAGNAME])
3621 # -------------------------------
3622 m4_defun([_LT_COMPILER_NO_RTTI],
3623 [m4_require([_LT_TAG_COMPILER])dnl
3624
3625 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3626
3627 if test "$GCC" = yes; then
3628 case $cc_basename in
3629 nvcc*)
3630 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3631 *)
3632 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3633 esac
3634
3635 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3636 lt_cv_prog_compiler_rtti_exceptions,
3637 [-fno-rtti -fno-exceptions], [],
3638 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3639 fi
3640 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3641 [Compiler flag to turn off builtin functions])
3642 ])# _LT_COMPILER_NO_RTTI
3643
3644
3645 # _LT_CMD_GLOBAL_SYMBOLS
3646 # ----------------------
3647 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3648 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3649 AC_REQUIRE([AC_PROG_CC])dnl
3650 AC_REQUIRE([AC_PROG_AWK])dnl
3651 AC_REQUIRE([LT_PATH_NM])dnl
3652 AC_REQUIRE([LT_PATH_LD])dnl
3653 m4_require([_LT_DECL_SED])dnl
3654 m4_require([_LT_DECL_EGREP])dnl
3655 m4_require([_LT_TAG_COMPILER])dnl
3656
3657 # Check for command to grab the raw symbol name followed by C symbol from nm.
3658 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3659 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3660 [
3661 # These are sane defaults that work on at least a few old systems.
3662 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3663
3664 # Character class describing NM global symbol codes.
3665 symcode='[[BCDEGRST]]'
3666
3667 # Regexp to match symbols that can be accessed directly from C.
3668 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3669
3670 # Define system-specific variables.
3671 case $host_os in
3672 aix*)
3673 symcode='[[BCDT]]'
3674 ;;
3675 cygwin* | mingw* | pw32* | cegcc*)
3676 symcode='[[ABCDGISTW]]'
3677 ;;
3678 hpux*)
3679 if test "$host_cpu" = ia64; then
3680 symcode='[[ABCDEGRST]]'
3681 fi
3682 ;;
3683 irix* | nonstopux*)
3684 symcode='[[BCDEGRST]]'
3685 ;;
3686 osf*)
3687 symcode='[[BCDEGQRST]]'
3688 ;;
3689 solaris*)
3690 symcode='[[BDRT]]'
3691 ;;
3692 sco3.2v5*)
3693 symcode='[[DT]]'
3694 ;;
3695 sysv4.2uw2*)
3696 symcode='[[DT]]'
3697 ;;
3698 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3699 symcode='[[ABDT]]'
3700 ;;
3701 sysv4)
3702 symcode='[[DFNSTU]]'
3703 ;;
3704 esac
3705
3706 # If we're using GNU nm, then use its standard symbol codes.
3707 case `$NM -V 2>&1` in
3708 *GNU* | *'with BFD'*)
3709 symcode='[[ABCDGIRSTW]]' ;;
3710 esac
3711
3712 # Transform an extracted symbol line into a proper C declaration.
3713 # Some systems (esp. on ia64) link data and code symbols differently,
3714 # so use this general approach.
3715 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3716
3717 # Transform an extracted symbol line into symbol name and symbol address
3718 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3719 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'"
3720
3721 # Handle CRLF in mingw tool chain
3722 opt_cr=
3723 case $build_os in
3724 mingw*)
3725 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3726 ;;
3727 esac
3728
3729 # Try without a prefix underscore, then with it.
3730 for ac_symprfx in "" "_"; do
3731
3732 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3733 symxfrm="\\1 $ac_symprfx\\2 \\2"
3734
3735 # Write the raw and C identifiers.
3736 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3737 # Fake it for dumpbin and say T for any non-static function
3738 # and D for any global variable.
3739 # Also find C++ and __fastcall symbols from MSVC++,
3740 # which start with @ or ?.
3741 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3742 " {last_section=section; section=\$ 3};"\
3743 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3744 " \$ 0!~/External *\|/{next};"\
3745 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3746 " {if(hide[section]) next};"\
3747 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3748 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3749 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3750 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3751 " ' prfx=^$ac_symprfx]"
3752 else
3753 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3754 fi
3755 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3756
3757 # Check to see that the pipe works correctly.
3758 pipe_works=no
3759
3760 rm -f conftest*
3761 cat > conftest.$ac_ext <<_LT_EOF
3762 #ifdef __cplusplus
3763 extern "C" {
3764 #endif
3765 char nm_test_var;
3766 void nm_test_func(void);
3767 void nm_test_func(void){}
3768 #ifdef __cplusplus
3769 }
3770 #endif
3771 int main(){nm_test_var='a';nm_test_func();return(0);}
3772 _LT_EOF
3773
3774 if AC_TRY_EVAL(ac_compile); then
3775 # Now try to grab the symbols.
3776 nlist=conftest.nm
3777 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3778 # Try sorting and uniquifying the output.
3779 if sort "$nlist" | uniq > "$nlist"T; then
3780 mv -f "$nlist"T "$nlist"
3781 else
3782 rm -f "$nlist"T
3783 fi
3784
3785 # Make sure that we snagged all the symbols we need.
3786 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3787 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3788 cat <<_LT_EOF > conftest.$ac_ext
3789 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3790 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3791 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3792 relocations are performed -- see ld's documentation on pseudo-relocs. */
3793 # define LT@&t@_DLSYM_CONST
3794 #elif defined(__osf__)
3795 /* This system does not cope well with relocations in const data. */
3796 # define LT@&t@_DLSYM_CONST
3797 #else
3798 # define LT@&t@_DLSYM_CONST const
3799 #endif
3800
3801 #ifdef __cplusplus
3802 extern "C" {
3803 #endif
3804
3805 _LT_EOF
3806 # Now generate the symbol file.
3807 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3808
3809 cat <<_LT_EOF >> conftest.$ac_ext
3810
3811 /* The mapping between symbol names and symbols. */
3812 LT@&t@_DLSYM_CONST struct {
3813 const char *name;
3814 void *address;
3815 }
3816 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3817 {
3818 { "@PROGRAM@", (void *) 0 },
3819 _LT_EOF
3820 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3821 cat <<\_LT_EOF >> conftest.$ac_ext
3822 {0, (void *) 0}
3823 };
3824
3825 /* This works around a problem in FreeBSD linker */
3826 #ifdef FREEBSD_WORKAROUND
3827 static const void *lt_preloaded_setup() {
3828 return lt__PROGRAM__LTX_preloaded_symbols;
3829 }
3830 #endif
3831
3832 #ifdef __cplusplus
3833 }
3834 #endif
3835 _LT_EOF
3836 # Now try linking the two files.
3837 mv conftest.$ac_objext conftstm.$ac_objext
3838 lt_globsym_save_LIBS=$LIBS
3839 lt_globsym_save_CFLAGS=$CFLAGS
3840 LIBS="conftstm.$ac_objext"
3841 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3842 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3843 pipe_works=yes
3844 fi
3845 LIBS=$lt_globsym_save_LIBS
3846 CFLAGS=$lt_globsym_save_CFLAGS
3847 else
3848 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3849 fi
3850 else
3851 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3852 fi
3853 else
3854 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3855 fi
3856 else
3857 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3858 cat conftest.$ac_ext >&5
3859 fi
3860 rm -rf conftest* conftst*
3861
3862 # Do not use the global_symbol_pipe unless it works.
3863 if test "$pipe_works" = yes; then
3864 break
3865 else
3866 lt_cv_sys_global_symbol_pipe=
3867 fi
3868 done
3869 ])
3870 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3871 lt_cv_sys_global_symbol_to_cdecl=
3872 fi
3873 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3874 AC_MSG_RESULT(failed)
3875 else
3876 AC_MSG_RESULT(ok)
3877 fi
3878
3879 # Response file support.
3880 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3881 nm_file_list_spec='@'
3882 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3883 nm_file_list_spec='@'
3884 fi
3885
3886 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3887 [Take the output of nm and produce a listing of raw symbols and C names])
3888 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3889 [Transform the output of nm in a proper C declaration])
3890 _LT_DECL([global_symbol_to_c_name_address],
3891 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3892 [Transform the output of nm in a C name address pair])
3893 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3894 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3895 [Transform the output of nm in a C name address pair when lib prefix is needed])
3896 _LT_DECL([], [nm_file_list_spec], [1],
3897 [Specify filename containing input files for $NM])
3898 ]) # _LT_CMD_GLOBAL_SYMBOLS
3899
3900
3901 # _LT_COMPILER_PIC([TAGNAME])
3902 # ---------------------------
3903 m4_defun([_LT_COMPILER_PIC],
3904 [m4_require([_LT_TAG_COMPILER])dnl
3905 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3906 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3907 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3908
3909 m4_if([$1], [CXX], [
3910 # C++ specific cases for pic, static, wl, etc.
3911 if test "$GXX" = yes; then
3912 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3913 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3914
3915 case $host_os in
3916 aix*)
3917 # All AIX code is PIC.
3918 if test "$host_cpu" = ia64; then
3919 # AIX 5 now supports IA64 processor
3920 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3921 fi
3922 ;;
3923
3924 amigaos*)
3925 case $host_cpu in
3926 powerpc)
3927 # see comment about AmigaOS4 .so support
3928 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3929 ;;
3930 m68k)
3931 # FIXME: we need at least 68020 code to build shared libraries, but
3932 # adding the `-m68020' flag to GCC prevents building anything better,
3933 # like `-m68040'.
3934 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3935 ;;
3936 esac
3937 ;;
3938
3939 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3940 # PIC is the default for these OSes.
3941 ;;
3942 mingw* | cygwin* | os2* | pw32* | cegcc*)
3943 # This hack is so that the source file can tell whether it is being
3944 # built for inclusion in a dll (and should export symbols for example).
3945 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3946 # (--disable-auto-import) libraries
3947 m4_if([$1], [GCJ], [],
3948 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3949 ;;
3950 darwin* | rhapsody*)
3951 # PIC is the default on this platform
3952 # Common symbols not allowed in MH_DYLIB files
3953 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3954 ;;
3955 *djgpp*)
3956 # DJGPP does not support shared libraries at all
3957 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3958 ;;
3959 haiku*)
3960 # PIC is the default for Haiku.
3961 # The "-static" flag exists, but is broken.
3962 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3963 ;;
3964 interix[[3-9]]*)
3965 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3966 # Instead, we relocate shared libraries at runtime.
3967 ;;
3968 sysv4*MP*)
3969 if test -d /usr/nec; then
3970 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3971 fi
3972 ;;
3973 hpux*)
3974 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3975 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3976 # sets the default TLS model and affects inlining.
3977 case $host_cpu in
3978 hppa*64*)
3979 ;;
3980 *)
3981 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3982 ;;
3983 esac
3984 ;;
3985 *qnx* | *nto*)
3986 # QNX uses GNU C++, but need to define -shared option too, otherwise
3987 # it will coredump.
3988 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3989 ;;
3990 *)
3991 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3992 ;;
3993 esac
3994 else
3995 case $host_os in
3996 aix[[4-9]]*)
3997 # All AIX code is PIC.
3998 if test "$host_cpu" = ia64; then
3999 # AIX 5 now supports IA64 processor
4000 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4001 else
4002 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4003 fi
4004 ;;
4005 chorus*)
4006 case $cc_basename in
4007 cxch68*)
4008 # Green Hills C++ Compiler
4009 # _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"
4010 ;;
4011 esac
4012 ;;
4013 mingw* | cygwin* | os2* | pw32* | cegcc*)
4014 # This hack is so that the source file can tell whether it is being
4015 # built for inclusion in a dll (and should export symbols for example).
4016 m4_if([$1], [GCJ], [],
4017 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4018 ;;
4019 dgux*)
4020 case $cc_basename in
4021 ec++*)
4022 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4023 ;;
4024 ghcx*)
4025 # Green Hills C++ Compiler
4026 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4027 ;;
4028 *)
4029 ;;
4030 esac
4031 ;;
4032 freebsd* | dragonfly*)
4033 # FreeBSD uses GNU C++
4034 ;;
4035 hpux9* | hpux10* | hpux11*)
4036 case $cc_basename in
4037 CC*)
4038 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4039 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4040 if test "$host_cpu" != ia64; then
4041 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4042 fi
4043 ;;
4044 aCC*)
4045 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4046 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4047 case $host_cpu in
4048 hppa*64*|ia64*)
4049 # +Z the default
4050 ;;
4051 *)
4052 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4053 ;;
4054 esac
4055 ;;
4056 *)
4057 ;;
4058 esac
4059 ;;
4060 interix*)
4061 # This is c89, which is MS Visual C++ (no shared libs)
4062 # Anyone wants to do a port?
4063 ;;
4064 irix5* | irix6* | nonstopux*)
4065 case $cc_basename in
4066 CC*)
4067 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4068 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4069 # CC pic flag -KPIC is the default.
4070 ;;
4071 *)
4072 ;;
4073 esac
4074 ;;
4075 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4076 case $cc_basename in
4077 KCC*)
4078 # KAI C++ Compiler
4079 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4080 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4081 ;;
4082 ecpc* )
4083 # old Intel C++ for x86_64 which still supported -KPIC.
4084 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4085 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4086 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4087 ;;
4088 icpc* )
4089 # Intel C++, used to be incompatible with GCC.
4090 # ICC 10 doesn't accept -KPIC any more.
4091 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4092 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4093 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4094 ;;
4095 pgCC* | pgcpp*)
4096 # Portland Group C++ compiler
4097 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4098 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4099 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4100 ;;
4101 cxx*)
4102 # Compaq C++
4103 # Make sure the PIC flag is empty. It appears that all Alpha
4104 # Linux and Compaq Tru64 Unix objects are PIC.
4105 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4106 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4107 ;;
4108 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4109 # IBM XL 8.0, 9.0 on PPC and BlueGene
4110 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4111 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4112 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4113 ;;
4114 *)
4115 case `$CC -V 2>&1 | sed 5q` in
4116 *Sun\ C*)
4117 # Sun C++ 5.9
4118 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4119 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4120 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4121 ;;
4122 esac
4123 ;;
4124 esac
4125 ;;
4126 lynxos*)
4127 ;;
4128 m88k*)
4129 ;;
4130 mvs*)
4131 case $cc_basename in
4132 cxx*)
4133 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4134 ;;
4135 *)
4136 ;;
4137 esac
4138 ;;
4139 netbsd*)
4140 ;;
4141 *qnx* | *nto*)
4142 # QNX uses GNU C++, but need to define -shared option too, otherwise
4143 # it will coredump.
4144 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4145 ;;
4146 osf3* | osf4* | osf5*)
4147 case $cc_basename in
4148 KCC*)
4149 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4150 ;;
4151 RCC*)
4152 # Rational C++ 2.4.1
4153 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4154 ;;
4155 cxx*)
4156 # Digital/Compaq C++
4157 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4158 # Make sure the PIC flag is empty. It appears that all Alpha
4159 # Linux and Compaq Tru64 Unix objects are PIC.
4160 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4161 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4162 ;;
4163 *)
4164 ;;
4165 esac
4166 ;;
4167 psos*)
4168 ;;
4169 solaris*)
4170 case $cc_basename in
4171 CC* | sunCC*)
4172 # Sun C++ 4.2, 5.x and Centerline C++
4173 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4174 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4175 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4176 ;;
4177 gcx*)
4178 # Green Hills C++ Compiler
4179 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4180 ;;
4181 *)
4182 ;;
4183 esac
4184 ;;
4185 sunos4*)
4186 case $cc_basename in
4187 CC*)
4188 # Sun C++ 4.x
4189 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4190 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4191 ;;
4192 lcc*)
4193 # Lucid
4194 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4195 ;;
4196 *)
4197 ;;
4198 esac
4199 ;;
4200 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4201 case $cc_basename in
4202 CC*)
4203 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4204 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4205 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4206 ;;
4207 esac
4208 ;;
4209 tandem*)
4210 case $cc_basename in
4211 NCC*)
4212 # NonStop-UX NCC 3.20
4213 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4214 ;;
4215 *)
4216 ;;
4217 esac
4218 ;;
4219 vxworks*)
4220 ;;
4221 *)
4222 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4223 ;;
4224 esac
4225 fi
4226 ],
4227 [
4228 if test "$GCC" = yes; then
4229 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4230 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4231
4232 case $host_os in
4233 aix*)
4234 # All AIX code is PIC.
4235 if test "$host_cpu" = ia64; then
4236 # AIX 5 now supports IA64 processor
4237 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4238 fi
4239 ;;
4240
4241 amigaos*)
4242 case $host_cpu in
4243 powerpc)
4244 # see comment about AmigaOS4 .so support
4245 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4246 ;;
4247 m68k)
4248 # FIXME: we need at least 68020 code to build shared libraries, but
4249 # adding the `-m68020' flag to GCC prevents building anything better,
4250 # like `-m68040'.
4251 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4252 ;;
4253 esac
4254 ;;
4255
4256 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4257 # PIC is the default for these OSes.
4258 ;;
4259
4260 mingw* | cygwin* | pw32* | os2* | cegcc*)
4261 # This hack is so that the source file can tell whether it is being
4262 # built for inclusion in a dll (and should export symbols for example).
4263 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4264 # (--disable-auto-import) libraries
4265 m4_if([$1], [GCJ], [],
4266 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4267 ;;
4268
4269 darwin* | rhapsody*)
4270 # PIC is the default on this platform
4271 # Common symbols not allowed in MH_DYLIB files
4272 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4273 ;;
4274
4275 haiku*)
4276 # PIC is the default for Haiku.
4277 # The "-static" flag exists, but is broken.
4278 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4279 ;;
4280
4281 hpux*)
4282 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4283 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4284 # sets the default TLS model and affects inlining.
4285 case $host_cpu in
4286 hppa*64*)
4287 # +Z the default
4288 ;;
4289 *)
4290 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4291 ;;
4292 esac
4293 ;;
4294
4295 interix[[3-9]]*)
4296 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4297 # Instead, we relocate shared libraries at runtime.
4298 ;;
4299
4300 msdosdjgpp*)
4301 # Just because we use GCC doesn't mean we suddenly get shared libraries
4302 # on systems that don't support them.
4303 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4304 enable_shared=no
4305 ;;
4306
4307 *nto* | *qnx*)
4308 # QNX uses GNU C++, but need to define -shared option too, otherwise
4309 # it will coredump.
4310 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4311 ;;
4312
4313 sysv4*MP*)
4314 if test -d /usr/nec; then
4315 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4316 fi
4317 ;;
4318
4319 *)
4320 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4321 ;;
4322 esac
4323
4324 case $cc_basename in
4325 nvcc*) # Cuda Compiler Driver 2.2
4326 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4327 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
4328 ;;
4329 esac
4330 else
4331 # PORTME Check for flag to pass linker flags through the system compiler.
4332 case $host_os in
4333 aix*)
4334 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4335 if test "$host_cpu" = ia64; then
4336 # AIX 5 now supports IA64 processor
4337 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4338 else
4339 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4340 fi
4341 ;;
4342
4343 mingw* | cygwin* | pw32* | os2* | cegcc*)
4344 # This hack is so that the source file can tell whether it is being
4345 # built for inclusion in a dll (and should export symbols for example).
4346 m4_if([$1], [GCJ], [],
4347 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4348 ;;
4349
4350 hpux9* | hpux10* | hpux11*)
4351 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4352 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4353 # not for PA HP-UX.
4354 case $host_cpu in
4355 hppa*64*|ia64*)
4356 # +Z the default
4357 ;;
4358 *)
4359 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4360 ;;
4361 esac
4362 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4363 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4364 ;;
4365
4366 irix5* | irix6* | nonstopux*)
4367 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4368 # PIC (with -KPIC) is the default.
4369 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4370 ;;
4371
4372 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4373 case $cc_basename in
4374 # old Intel for x86_64 which still supported -KPIC.
4375 ecc*)
4376 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4377 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4378 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4379 ;;
4380 # icc used to be incompatible with GCC.
4381 # ICC 10 doesn't accept -KPIC any more.
4382 icc* | ifort*)
4383 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4384 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4385 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4386 ;;
4387 # Lahey Fortran 8.1.
4388 lf95*)
4389 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4390 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4391 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4392 ;;
4393 nagfor*)
4394 # NAG Fortran compiler
4395 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4396 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4397 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4398 ;;
4399 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4400 # Portland Group compilers (*not* the Pentium gcc compiler,
4401 # which looks to be a dead project)
4402 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4403 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4404 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4405 ;;
4406 ccc*)
4407 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4408 # All Alpha code is PIC.
4409 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4410 ;;
4411 xl* | bgxl* | bgf* | mpixl*)
4412 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4413 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4414 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4415 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4416 ;;
4417 *)
4418 case `$CC -V 2>&1 | sed 5q` in
4419 *Sun\ F* | *Sun*Fortran*)
4420 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4421 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4422 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4423 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4424 ;;
4425 *Sun\ C*)
4426 # Sun C 5.9
4427 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4428 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4429 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4430 ;;
4431 esac
4432 ;;
4433 esac
4434 ;;
4435
4436 newsos6)
4437 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4438 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4439 ;;
4440
4441 *nto* | *qnx*)
4442 # QNX uses GNU C++, but need to define -shared option too, otherwise
4443 # it will coredump.
4444 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4445 ;;
4446
4447 osf3* | osf4* | osf5*)
4448 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4449 # All OSF/1 code is PIC.
4450 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4451 ;;
4452
4453 rdos*)
4454 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4455 ;;
4456
4457 solaris*)
4458 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4459 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4460 case $cc_basename in
4461 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4462 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4463 *)
4464 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4465 esac
4466 ;;
4467
4468 sunos4*)
4469 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4470 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4471 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4472 ;;
4473
4474 sysv4 | sysv4.2uw2* | sysv4.3*)
4475 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4476 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4477 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4478 ;;
4479
4480 sysv4*MP*)
4481 if test -d /usr/nec ;then
4482 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4483 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4484 fi
4485 ;;
4486
4487 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4488 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4489 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4490 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4491 ;;
4492
4493 unicos*)
4494 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4495 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4496 ;;
4497
4498 uts4*)
4499 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4500 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4501 ;;
4502
4503 *)
4504 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4505 ;;
4506 esac
4507 fi
4508 ])
4509 case $host_os in
4510 # For platforms which do not support PIC, -DPIC is meaningless:
4511 *djgpp*)
4512 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4513 ;;
4514 *)
4515 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4516 ;;
4517 esac
4518
4519 AC_CACHE_CHECK([for $compiler option to produce PIC],
4520 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4521 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4522 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4523
4524 #
4525 # Check to make sure the PIC flag actually works.
4526 #
4527 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4528 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4529 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4530 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4531 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4532 "" | " "*) ;;
4533 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4534 esac],
4535 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4536 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4537 fi
4538 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4539 [Additional compiler flags for building library objects])
4540
4541 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4542 [How to pass a linker flag through the compiler])
4543 #
4544 # Check to make sure the static flag actually works.
4545 #
4546 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4547 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4548 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4549 $lt_tmp_static_flag,
4550 [],
4551 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4552 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4553 [Compiler flag to prevent dynamic linking])
4554 ])# _LT_COMPILER_PIC
4555
4556
4557 # _LT_LINKER_SHLIBS([TAGNAME])
4558 # ----------------------------
4559 # See if the linker supports building shared libraries.
4560 m4_defun([_LT_LINKER_SHLIBS],
4561 [AC_REQUIRE([LT_PATH_LD])dnl
4562 AC_REQUIRE([LT_PATH_NM])dnl
4563 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4564 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4565 m4_require([_LT_DECL_EGREP])dnl
4566 m4_require([_LT_DECL_SED])dnl
4567 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4568 m4_require([_LT_TAG_COMPILER])dnl
4569 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4570 m4_if([$1], [CXX], [
4571 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4572 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4573 case $host_os in
4574 aix[[4-9]]*)
4575 # If we're using GNU nm, then we don't want the "-C" option.
4576 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4577 # Also, AIX nm treats weak defined symbols like other global defined
4578 # symbols, whereas GNU nm marks them as "W".
4579 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4580 _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'
4581 else
4582 _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'
4583 fi
4584 ;;
4585 pw32*)
4586 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4587 ;;
4588 cygwin* | mingw* | cegcc*)
4589 case $cc_basename in
4590 cl*) ;;
4591 *)
4592 _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'
4593 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4594 ;;
4595 esac
4596 ;;
4597 *)
4598 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4599 ;;
4600 esac
4601 ], [
4602 runpath_var=
4603 _LT_TAGVAR(allow_undefined_flag, $1)=
4604 _LT_TAGVAR(always_export_symbols, $1)=no
4605 _LT_TAGVAR(archive_cmds, $1)=
4606 _LT_TAGVAR(archive_expsym_cmds, $1)=
4607 _LT_TAGVAR(compiler_needs_object, $1)=no
4608 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4609 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4610 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4611 _LT_TAGVAR(hardcode_automatic, $1)=no
4612 _LT_TAGVAR(hardcode_direct, $1)=no
4613 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4614 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4615 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4616 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4617 _LT_TAGVAR(hardcode_minus_L, $1)=no
4618 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4619 _LT_TAGVAR(inherit_rpath, $1)=no
4620 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4621 _LT_TAGVAR(module_cmds, $1)=
4622 _LT_TAGVAR(module_expsym_cmds, $1)=
4623 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4624 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4625 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4626 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4627 # include_expsyms should be a list of space-separated symbols to be *always*
4628 # included in the symbol list
4629 _LT_TAGVAR(include_expsyms, $1)=
4630 # exclude_expsyms can be an extended regexp of symbols to exclude
4631 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4632 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4633 # as well as any symbol that contains `d'.
4634 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4635 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4636 # platforms (ab)use it in PIC code, but their linkers get confused if
4637 # the symbol is explicitly referenced. Since portable code cannot
4638 # rely on this symbol name, it's probably fine to never include it in
4639 # preloaded symbol tables.
4640 # Exclude shared library initialization/finalization symbols.
4641 dnl Note also adjust exclude_expsyms for C++ above.
4642 extract_expsyms_cmds=
4643
4644 case $host_os in
4645 cygwin* | mingw* | pw32* | cegcc*)
4646 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4647 # When not using gcc, we currently assume that we are using
4648 # Microsoft Visual C++.
4649 if test "$GCC" != yes; then
4650 with_gnu_ld=no
4651 fi
4652 ;;
4653 interix*)
4654 # we just hope/assume this is gcc and not c89 (= MSVC++)
4655 with_gnu_ld=yes
4656 ;;
4657 openbsd*)
4658 with_gnu_ld=no
4659 ;;
4660 esac
4661
4662 _LT_TAGVAR(ld_shlibs, $1)=yes
4663
4664 # On some targets, GNU ld is compatible enough with the native linker
4665 # that we're better off using the native interface for both.
4666 lt_use_gnu_ld_interface=no
4667 if test "$with_gnu_ld" = yes; then
4668 case $host_os in
4669 aix*)
4670 # The AIX port of GNU ld has always aspired to compatibility
4671 # with the native linker. However, as the warning in the GNU ld
4672 # block says, versions before 2.19.5* couldn't really create working
4673 # shared libraries, regardless of the interface used.
4674 case `$LD -v 2>&1` in
4675 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4676 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4677 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4678 *)
4679 lt_use_gnu_ld_interface=yes
4680 ;;
4681 esac
4682 ;;
4683 *)
4684 lt_use_gnu_ld_interface=yes
4685 ;;
4686 esac
4687 fi
4688
4689 if test "$lt_use_gnu_ld_interface" = yes; then
4690 # If archive_cmds runs LD, not CC, wlarc should be empty
4691 wlarc='${wl}'
4692
4693 # Set some defaults for GNU ld with shared library support. These
4694 # are reset later if shared libraries are not supported. Putting them
4695 # here allows them to be overridden if necessary.
4696 runpath_var=LD_RUN_PATH
4697 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4698 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4699 # ancient GNU ld didn't support --whole-archive et. al.
4700 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4701 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4702 else
4703 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4704 fi
4705 supports_anon_versioning=no
4706 case `$LD -v 2>&1` in
4707 *GNU\ gold*) supports_anon_versioning=yes ;;
4708 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4709 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4710 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4711 *\ 2.11.*) ;; # other 2.11 versions
4712 *) supports_anon_versioning=yes ;;
4713 esac
4714
4715 # See if GNU ld supports shared libraries.
4716 case $host_os in
4717 aix[[3-9]]*)
4718 # On AIX/PPC, the GNU linker is very broken
4719 if test "$host_cpu" != ia64; then
4720 _LT_TAGVAR(ld_shlibs, $1)=no
4721 cat <<_LT_EOF 1>&2
4722
4723 *** Warning: the GNU linker, at least up to release 2.19, is reported
4724 *** to be unable to reliably create shared libraries on AIX.
4725 *** Therefore, libtool is disabling shared libraries support. If you
4726 *** really care for shared libraries, you may want to install binutils
4727 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4728 *** You will then need to restart the configuration process.
4729
4730 _LT_EOF
4731 fi
4732 ;;
4733
4734 amigaos*)
4735 case $host_cpu in
4736 powerpc)
4737 # see comment about AmigaOS4 .so support
4738 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4739 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4740 ;;
4741 m68k)
4742 _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)'
4743 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4744 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4745 ;;
4746 esac
4747 ;;
4748
4749 beos*)
4750 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4751 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4752 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4753 # support --undefined. This deserves some investigation. FIXME
4754 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4755 else
4756 _LT_TAGVAR(ld_shlibs, $1)=no
4757 fi
4758 ;;
4759
4760 cygwin* | mingw* | pw32* | cegcc*)
4761 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4762 # as there is no search path for DLLs.
4763 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4764 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4765 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4766 _LT_TAGVAR(always_export_symbols, $1)=no
4767 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4768 _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'
4769 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4770
4771 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4772 _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'
4773 # If the export-symbols file already is a .def file (1st line
4774 # is EXPORTS), use it as is; otherwise, prepend...
4775 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4776 cp $export_symbols $output_objdir/$soname.def;
4777 else
4778 echo EXPORTS > $output_objdir/$soname.def;
4779 cat $export_symbols >> $output_objdir/$soname.def;
4780 fi~
4781 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4782 else
4783 _LT_TAGVAR(ld_shlibs, $1)=no
4784 fi
4785 ;;
4786
4787 haiku*)
4788 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4789 _LT_TAGVAR(link_all_deplibs, $1)=yes
4790 ;;
4791
4792 interix[[3-9]]*)
4793 _LT_TAGVAR(hardcode_direct, $1)=no
4794 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4795 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4796 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4797 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4798 # Instead, shared libraries are loaded at an image base (0x10000000 by
4799 # default) and relocated if they conflict, which is a slow very memory
4800 # consuming and fragmenting process. To avoid this, we pick a random,
4801 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4802 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4803 _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'
4804 _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'
4805 ;;
4806
4807 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4808 tmp_diet=no
4809 if test "$host_os" = linux-dietlibc; then
4810 case $cc_basename in
4811 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4812 esac
4813 fi
4814 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4815 && test "$tmp_diet" = no
4816 then
4817 tmp_addflag=' $pic_flag'
4818 tmp_sharedflag='-shared'
4819 case $cc_basename,$host_cpu in
4820 pgcc*) # Portland Group C compiler
4821 _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'
4822 tmp_addflag=' $pic_flag'
4823 ;;
4824 pgf77* | pgf90* | pgf95* | pgfortran*)
4825 # Portland Group f77 and f90 compilers
4826 _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'
4827 tmp_addflag=' $pic_flag -Mnomain' ;;
4828 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4829 tmp_addflag=' -i_dynamic' ;;
4830 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4831 tmp_addflag=' -i_dynamic -nofor_main' ;;
4832 ifc* | ifort*) # Intel Fortran compiler
4833 tmp_addflag=' -nofor_main' ;;
4834 lf95*) # Lahey Fortran 8.1
4835 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4836 tmp_sharedflag='--shared' ;;
4837 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4838 tmp_sharedflag='-qmkshrobj'
4839 tmp_addflag= ;;
4840 nvcc*) # Cuda Compiler Driver 2.2
4841 _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'
4842 _LT_TAGVAR(compiler_needs_object, $1)=yes
4843 ;;
4844 esac
4845 case `$CC -V 2>&1 | sed 5q` in
4846 *Sun\ C*) # Sun C 5.9
4847 _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'
4848 _LT_TAGVAR(compiler_needs_object, $1)=yes
4849 tmp_sharedflag='-G' ;;
4850 *Sun\ F*) # Sun Fortran 8.3
4851 tmp_sharedflag='-G' ;;
4852 esac
4853 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4854
4855 if test "x$supports_anon_versioning" = xyes; then
4856 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4857 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4858 echo "local: *; };" >> $output_objdir/$libname.ver~
4859 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4860 fi
4861
4862 case $cc_basename in
4863 xlf* | bgf* | bgxlf* | mpixlf*)
4864 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4865 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4866 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4867 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4868 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4869 if test "x$supports_anon_versioning" = xyes; then
4870 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4871 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4872 echo "local: *; };" >> $output_objdir/$libname.ver~
4873 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4874 fi
4875 ;;
4876 esac
4877 else
4878 _LT_TAGVAR(ld_shlibs, $1)=no
4879 fi
4880 ;;
4881
4882 netbsd*)
4883 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4884 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4885 wlarc=
4886 else
4887 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4888 _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'
4889 fi
4890 ;;
4891
4892 solaris*)
4893 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4894 _LT_TAGVAR(ld_shlibs, $1)=no
4895 cat <<_LT_EOF 1>&2
4896
4897 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4898 *** create shared libraries on Solaris systems. Therefore, libtool
4899 *** is disabling shared libraries support. We urge you to upgrade GNU
4900 *** binutils to release 2.9.1 or newer. Another option is to modify
4901 *** your PATH or compiler configuration so that the native linker is
4902 *** used, and then restart.
4903
4904 _LT_EOF
4905 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4906 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4907 _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'
4908 else
4909 _LT_TAGVAR(ld_shlibs, $1)=no
4910 fi
4911 ;;
4912
4913 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4914 case `$LD -v 2>&1` in
4915 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4916 _LT_TAGVAR(ld_shlibs, $1)=no
4917 cat <<_LT_EOF 1>&2
4918
4919 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4920 *** reliably create shared libraries on SCO systems. Therefore, libtool
4921 *** is disabling shared libraries support. We urge you to upgrade GNU
4922 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4923 *** your PATH or compiler configuration so that the native linker is
4924 *** used, and then restart.
4925
4926 _LT_EOF
4927 ;;
4928 *)
4929 # For security reasons, it is highly recommended that you always
4930 # use absolute paths for naming shared libraries, and exclude the
4931 # DT_RUNPATH tag from executables and libraries. But doing so
4932 # requires that you compile everything twice, which is a pain.
4933 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4934 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4935 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4936 _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'
4937 else
4938 _LT_TAGVAR(ld_shlibs, $1)=no
4939 fi
4940 ;;
4941 esac
4942 ;;
4943
4944 sunos4*)
4945 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4946 wlarc=
4947 _LT_TAGVAR(hardcode_direct, $1)=yes
4948 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4949 ;;
4950
4951 *)
4952 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4953 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4954 _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'
4955 else
4956 _LT_TAGVAR(ld_shlibs, $1)=no
4957 fi
4958 ;;
4959 esac
4960
4961 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4962 runpath_var=
4963 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4964 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4965 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4966 fi
4967 else
4968 # PORTME fill in a description of your system's linker (not GNU ld)
4969 case $host_os in
4970 aix3*)
4971 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4972 _LT_TAGVAR(always_export_symbols, $1)=yes
4973 _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'
4974 # Note: this linker hardcodes the directories in LIBPATH if there
4975 # are no directories specified by -L.
4976 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4977 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4978 # Neither direct hardcoding nor static linking is supported with a
4979 # broken collect2.
4980 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4981 fi
4982 ;;
4983
4984 aix[[4-9]]*)
4985 if test "$host_cpu" = ia64; then
4986 # On IA64, the linker does run time linking by default, so we don't
4987 # have to do anything special.
4988 aix_use_runtimelinking=no
4989 exp_sym_flag='-Bexport'
4990 no_entry_flag=""
4991 else
4992 # If we're using GNU nm, then we don't want the "-C" option.
4993 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4994 # Also, AIX nm treats weak defined symbols like other global
4995 # defined symbols, whereas GNU nm marks them as "W".
4996 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4997 _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'
4998 else
4999 _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'
5000 fi
5001 aix_use_runtimelinking=no
5002
5003 # Test if we are trying to use run time linking or normal
5004 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5005 # need to do runtime linking.
5006 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5007 for ld_flag in $LDFLAGS; do
5008 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5009 aix_use_runtimelinking=yes
5010 break
5011 fi
5012 done
5013 ;;
5014 esac
5015
5016 exp_sym_flag='-bexport'
5017 no_entry_flag='-bnoentry'
5018 fi
5019
5020 # When large executables or shared objects are built, AIX ld can
5021 # have problems creating the table of contents. If linking a library
5022 # or program results in "error TOC overflow" add -mminimal-toc to
5023 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5024 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5025
5026 _LT_TAGVAR(archive_cmds, $1)=''
5027 _LT_TAGVAR(hardcode_direct, $1)=yes
5028 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5029 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5030 _LT_TAGVAR(link_all_deplibs, $1)=yes
5031 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5032
5033 if test "$GCC" = yes; then
5034 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5035 # We only want to do this on AIX 4.2 and lower, the check
5036 # below for broken collect2 doesn't work under 4.3+
5037 collect2name=`${CC} -print-prog-name=collect2`
5038 if test -f "$collect2name" &&
5039 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5040 then
5041 # We have reworked collect2
5042 :
5043 else
5044 # We have old collect2
5045 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5046 # It fails to find uninstalled libraries when the uninstalled
5047 # path is not listed in the libpath. Setting hardcode_minus_L
5048 # to unsupported forces relinking
5049 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5050 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5051 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5052 fi
5053 ;;
5054 esac
5055 shared_flag='-shared'
5056 if test "$aix_use_runtimelinking" = yes; then
5057 shared_flag="$shared_flag "'${wl}-G'
5058 fi
5059 else
5060 # not using gcc
5061 if test "$host_cpu" = ia64; then
5062 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5063 # chokes on -Wl,-G. The following line is correct:
5064 shared_flag='-G'
5065 else
5066 if test "$aix_use_runtimelinking" = yes; then
5067 shared_flag='${wl}-G'
5068 else
5069 shared_flag='${wl}-bM:SRE'
5070 fi
5071 fi
5072 fi
5073
5074 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5075 # It seems that -bexpall does not export symbols beginning with
5076 # underscore (_), so it is better to generate a list of symbols to export.
5077 _LT_TAGVAR(always_export_symbols, $1)=yes
5078 if test "$aix_use_runtimelinking" = yes; then
5079 # Warning - without using the other runtime loading flags (-brtl),
5080 # -berok will link without error, but may produce a broken library.
5081 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5082 # Determine the default libpath from the value encoded in an
5083 # empty executable.
5084 _LT_SYS_MODULE_PATH_AIX([$1])
5085 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5086 _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"
5087 else
5088 if test "$host_cpu" = ia64; then
5089 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5090 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5091 _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"
5092 else
5093 # Determine the default libpath from the value encoded in an
5094 # empty executable.
5095 _LT_SYS_MODULE_PATH_AIX([$1])
5096 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5097 # Warning - without using the other run time loading flags,
5098 # -berok will link without error, but may produce a broken library.
5099 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5100 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5101 if test "$with_gnu_ld" = yes; then
5102 # We only use this code for GNU lds that support --whole-archive.
5103 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5104 else
5105 # Exported symbols can be pulled into shared objects from archives
5106 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5107 fi
5108 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5109 # This is similar to how AIX traditionally builds its shared libraries.
5110 _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'
5111 fi
5112 fi
5113 ;;
5114
5115 amigaos*)
5116 case $host_cpu in
5117 powerpc)
5118 # see comment about AmigaOS4 .so support
5119 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5120 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5121 ;;
5122 m68k)
5123 _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)'
5124 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5125 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5126 ;;
5127 esac
5128 ;;
5129
5130 bsdi[[45]]*)
5131 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5132 ;;
5133
5134 cygwin* | mingw* | pw32* | cegcc*)
5135 # When not using gcc, we currently assume that we are using
5136 # Microsoft Visual C++.
5137 # hardcode_libdir_flag_spec is actually meaningless, as there is
5138 # no search path for DLLs.
5139 case $cc_basename in
5140 cl*)
5141 # Native MSVC
5142 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5143 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5144 _LT_TAGVAR(always_export_symbols, $1)=yes
5145 _LT_TAGVAR(file_list_spec, $1)='@'
5146 # Tell ltmain to make .lib files, not .a files.
5147 libext=lib
5148 # Tell ltmain to make .dll files, not .so files.
5149 shrext_cmds=".dll"
5150 # FIXME: Setting linknames here is a bad hack.
5151 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5152 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5153 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5154 else
5155 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5156 fi~
5157 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5158 linknames='
5159 # The linker will not automatically build a static lib if we build a DLL.
5160 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5161 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5162 _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'
5163 # Don't use ranlib
5164 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5165 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5166 lt_tool_outputfile="@TOOL_OUTPUT@"~
5167 case $lt_outputfile in
5168 *.exe|*.EXE) ;;
5169 *)
5170 lt_outputfile="$lt_outputfile.exe"
5171 lt_tool_outputfile="$lt_tool_outputfile.exe"
5172 ;;
5173 esac~
5174 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5175 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5176 $RM "$lt_outputfile.manifest";
5177 fi'
5178 ;;
5179 *)
5180 # Assume MSVC wrapper
5181 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5182 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5183 # Tell ltmain to make .lib files, not .a files.
5184 libext=lib
5185 # Tell ltmain to make .dll files, not .so files.
5186 shrext_cmds=".dll"
5187 # FIXME: Setting linknames here is a bad hack.
5188 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5189 # The linker will automatically build a .lib file if we build a DLL.
5190 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5191 # FIXME: Should let the user specify the lib program.
5192 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5193 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5194 ;;
5195 esac
5196 ;;
5197
5198 darwin* | rhapsody*)
5199 _LT_DARWIN_LINKER_FEATURES($1)
5200 ;;
5201
5202 dgux*)
5203 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5204 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5205 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5206 ;;
5207
5208 freebsd1*)
5209 _LT_TAGVAR(ld_shlibs, $1)=no
5210 ;;
5211
5212 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5213 # support. Future versions do this automatically, but an explicit c++rt0.o
5214 # does not break anything, and helps significantly (at the cost of a little
5215 # extra space).
5216 freebsd2.2*)
5217 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5218 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5219 _LT_TAGVAR(hardcode_direct, $1)=yes
5220 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5221 ;;
5222
5223 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5224 freebsd2*)
5225 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5226 _LT_TAGVAR(hardcode_direct, $1)=yes
5227 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5228 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5229 ;;
5230
5231 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5232 freebsd* | dragonfly*)
5233 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5234 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5235 _LT_TAGVAR(hardcode_direct, $1)=yes
5236 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5237 ;;
5238
5239 hpux9*)
5240 if test "$GCC" = yes; then
5241 _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'
5242 else
5243 _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'
5244 fi
5245 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5246 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5247 _LT_TAGVAR(hardcode_direct, $1)=yes
5248
5249 # hardcode_minus_L: Not really in the search PATH,
5250 # but as the default location of the library.
5251 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5252 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5253 ;;
5254
5255 hpux10*)
5256 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5257 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5258 else
5259 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5260 fi
5261 if test "$with_gnu_ld" = no; then
5262 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5263 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5264 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5265 _LT_TAGVAR(hardcode_direct, $1)=yes
5266 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5267 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5268 # hardcode_minus_L: Not really in the search PATH,
5269 # but as the default location of the library.
5270 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5271 fi
5272 ;;
5273
5274 hpux11*)
5275 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5276 case $host_cpu in
5277 hppa*64*)
5278 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5279 ;;
5280 ia64*)
5281 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5282 ;;
5283 *)
5284 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5285 ;;
5286 esac
5287 else
5288 case $host_cpu in
5289 hppa*64*)
5290 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5291 ;;
5292 ia64*)
5293 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5294 ;;
5295 *)
5296 m4_if($1, [], [
5297 # Older versions of the 11.00 compiler do not understand -b yet
5298 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5299 _LT_LINKER_OPTION([if $CC understands -b],
5300 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5301 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5302 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5303 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5304 ;;
5305 esac
5306 fi
5307 if test "$with_gnu_ld" = no; then
5308 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5309 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5310
5311 case $host_cpu in
5312 hppa*64*|ia64*)
5313 _LT_TAGVAR(hardcode_direct, $1)=no
5314 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5315 ;;
5316 *)
5317 _LT_TAGVAR(hardcode_direct, $1)=yes
5318 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5319 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5320
5321 # hardcode_minus_L: Not really in the search PATH,
5322 # but as the default location of the library.
5323 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5324 ;;
5325 esac
5326 fi
5327 ;;
5328
5329 irix5* | irix6* | nonstopux*)
5330 if test "$GCC" = yes; then
5331 _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'
5332 # Try to use the -exported_symbol ld option, if it does not
5333 # work, assume that -exports_file does not work either and
5334 # implicitly export all symbols.
5335 # This should be the same for all languages, so no per-tag cache variable.
5336 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5337 [lt_cv_irix_exported_symbol],
5338 [save_LDFLAGS="$LDFLAGS"
5339 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5340 AC_LINK_IFELSE(
5341 [AC_LANG_SOURCE(
5342 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5343 [C++], [[int foo (void) { return 0; }]],
5344 [Fortran 77], [[
5345 subroutine foo
5346 end]],
5347 [Fortran], [[
5348 subroutine foo
5349 end]])])],
5350 [lt_cv_irix_exported_symbol=yes],
5351 [lt_cv_irix_exported_symbol=no])
5352 LDFLAGS="$save_LDFLAGS"])
5353 if test "$lt_cv_irix_exported_symbol" = yes; then
5354 _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'
5355 fi
5356 else
5357 _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'
5358 _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'
5359 fi
5360 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5361 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5362 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5363 _LT_TAGVAR(inherit_rpath, $1)=yes
5364 _LT_TAGVAR(link_all_deplibs, $1)=yes
5365 ;;
5366
5367 netbsd*)
5368 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5369 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5370 else
5371 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5372 fi
5373 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5374 _LT_TAGVAR(hardcode_direct, $1)=yes
5375 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5376 ;;
5377
5378 newsos6)
5379 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5380 _LT_TAGVAR(hardcode_direct, $1)=yes
5381 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5382 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5383 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5384 ;;
5385
5386 *nto* | *qnx*)
5387 ;;
5388
5389 openbsd*)
5390 if test -f /usr/libexec/ld.so; then
5391 _LT_TAGVAR(hardcode_direct, $1)=yes
5392 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5393 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5394 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5395 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5396 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5397 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5398 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5399 else
5400 case $host_os in
5401 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5402 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5403 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5404 ;;
5405 *)
5406 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5407 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5408 ;;
5409 esac
5410 fi
5411 else
5412 _LT_TAGVAR(ld_shlibs, $1)=no
5413 fi
5414 ;;
5415
5416 os2*)
5417 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5418 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5419 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5420 _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'
5421 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5422 ;;
5423
5424 osf3*)
5425 if test "$GCC" = yes; then
5426 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5427 _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'
5428 else
5429 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5430 _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'
5431 fi
5432 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5433 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5434 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5435 ;;
5436
5437 osf4* | osf5*) # as osf3* with the addition of -msym flag
5438 if test "$GCC" = yes; then
5439 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5440 _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'
5441 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5442 else
5443 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5444 _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'
5445 _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~
5446 $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'
5447
5448 # Both c and cxx compiler support -rpath directly
5449 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5450 fi
5451 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5452 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5453 ;;
5454
5455 solaris*)
5456 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5457 if test "$GCC" = yes; then
5458 wlarc='${wl}'
5459 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5460 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5461 $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'
5462 else
5463 case `$CC -V 2>&1` in
5464 *"Compilers 5.0"*)
5465 wlarc=''
5466 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5467 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5468 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5469 ;;
5470 *)
5471 wlarc='${wl}'
5472 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5473 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5474 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5475 ;;
5476 esac
5477 fi
5478 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5479 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5480 case $host_os in
5481 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5482 *)
5483 # The compiler driver will combine and reorder linker options,
5484 # but understands `-z linker_flag'. GCC discards it without `$wl',
5485 # but is careful enough not to reorder.
5486 # Supported since Solaris 2.6 (maybe 2.5.1?)
5487 if test "$GCC" = yes; then
5488 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5489 else
5490 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5491 fi
5492 ;;
5493 esac
5494 _LT_TAGVAR(link_all_deplibs, $1)=yes
5495 ;;
5496
5497 sunos4*)
5498 if test "x$host_vendor" = xsequent; then
5499 # Use $CC to link under sequent, because it throws in some extra .o
5500 # files that make .init and .fini sections work.
5501 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5502 else
5503 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5504 fi
5505 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5506 _LT_TAGVAR(hardcode_direct, $1)=yes
5507 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5508 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5509 ;;
5510
5511 sysv4)
5512 case $host_vendor in
5513 sni)
5514 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5515 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5516 ;;
5517 siemens)
5518 ## LD is ld it makes a PLAMLIB
5519 ## CC just makes a GrossModule.
5520 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5521 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5522 _LT_TAGVAR(hardcode_direct, $1)=no
5523 ;;
5524 motorola)
5525 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5526 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5527 ;;
5528 esac
5529 runpath_var='LD_RUN_PATH'
5530 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5531 ;;
5532
5533 sysv4.3*)
5534 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5535 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5536 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5537 ;;
5538
5539 sysv4*MP*)
5540 if test -d /usr/nec; then
5541 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5542 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5543 runpath_var=LD_RUN_PATH
5544 hardcode_runpath_var=yes
5545 _LT_TAGVAR(ld_shlibs, $1)=yes
5546 fi
5547 ;;
5548
5549 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5550 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5551 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5552 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5553 runpath_var='LD_RUN_PATH'
5554
5555 if test "$GCC" = yes; then
5556 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5557 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5558 else
5559 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5560 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5561 fi
5562 ;;
5563
5564 sysv5* | sco3.2v5* | sco5v6*)
5565 # Note: We can NOT use -z defs as we might desire, because we do not
5566 # link with -lc, and that would cause any symbols used from libc to
5567 # always be unresolved, which means just about no library would
5568 # ever link correctly. If we're not using GNU ld we use -z text
5569 # though, which does catch some bad symbols but isn't as heavy-handed
5570 # as -z defs.
5571 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5572 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5573 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5574 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5575 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5576 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5577 _LT_TAGVAR(link_all_deplibs, $1)=yes
5578 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5579 runpath_var='LD_RUN_PATH'
5580
5581 if test "$GCC" = yes; then
5582 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5583 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5584 else
5585 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5586 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5587 fi
5588 ;;
5589
5590 uts4*)
5591 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5592 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5593 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5594 ;;
5595
5596 *)
5597 _LT_TAGVAR(ld_shlibs, $1)=no
5598 ;;
5599 esac
5600
5601 if test x$host_vendor = xsni; then
5602 case $host in
5603 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5604 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5605 ;;
5606 esac
5607 fi
5608 fi
5609 ])
5610 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5611 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5612
5613 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5614
5615 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5616 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5617 _LT_DECL([], [extract_expsyms_cmds], [2],
5618 [The commands to extract the exported symbol list from a shared archive])
5619
5620 #
5621 # Do we need to explicitly link libc?
5622 #
5623 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5624 x|xyes)
5625 # Assume -lc should be added
5626 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5627
5628 if test "$enable_shared" = yes && test "$GCC" = yes; then
5629 case $_LT_TAGVAR(archive_cmds, $1) in
5630 *'~'*)
5631 # FIXME: we may have to deal with multi-command sequences.
5632 ;;
5633 '$CC '*)
5634 # Test whether the compiler implicitly links with -lc since on some
5635 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5636 # to ld, don't add -lc before -lgcc.
5637 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5638 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5639 [$RM conftest*
5640 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5641
5642 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5643 soname=conftest
5644 lib=conftest
5645 libobjs=conftest.$ac_objext
5646 deplibs=
5647 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5648 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5649 compiler_flags=-v
5650 linker_flags=-v
5651 verstring=
5652 output_objdir=.
5653 libname=conftest
5654 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5655 _LT_TAGVAR(allow_undefined_flag, $1)=
5656 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5657 then
5658 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5659 else
5660 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5661 fi
5662 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5663 else
5664 cat conftest.err 1>&5
5665 fi
5666 $RM conftest*
5667 ])
5668 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5669 ;;
5670 esac
5671 fi
5672 ;;
5673 esac
5674
5675 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5676 [Whether or not to add -lc for building shared libraries])
5677 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5678 [enable_shared_with_static_runtimes], [0],
5679 [Whether or not to disallow shared libs when runtime libs are static])
5680 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5681 [Compiler flag to allow reflexive dlopens])
5682 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5683 [Compiler flag to generate shared objects directly from archives])
5684 _LT_TAGDECL([], [compiler_needs_object], [1],
5685 [Whether the compiler copes with passing no objects directly])
5686 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5687 [Create an old-style archive from a shared archive])
5688 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5689 [Create a temporary old-style archive to link instead of a shared archive])
5690 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5691 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5692 _LT_TAGDECL([], [module_cmds], [2],
5693 [Commands used to build a loadable module if different from building
5694 a shared archive.])
5695 _LT_TAGDECL([], [module_expsym_cmds], [2])
5696 _LT_TAGDECL([], [with_gnu_ld], [1],
5697 [Whether we are building with GNU ld or not])
5698 _LT_TAGDECL([], [allow_undefined_flag], [1],
5699 [Flag that allows shared libraries with undefined symbols to be built])
5700 _LT_TAGDECL([], [no_undefined_flag], [1],
5701 [Flag that enforces no undefined symbols])
5702 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5703 [Flag to hardcode $libdir into a binary during linking.
5704 This must work even if $libdir does not exist])
5705 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5706 [[If ld is used when linking, flag to hardcode $libdir into a binary
5707 during linking. This must work even if $libdir does not exist]])
5708 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5709 [Whether we need a single "-rpath" flag with a separated argument])
5710 _LT_TAGDECL([], [hardcode_direct], [0],
5711 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5712 DIR into the resulting binary])
5713 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5714 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5715 DIR into the resulting binary and the resulting library dependency is
5716 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5717 library is relocated])
5718 _LT_TAGDECL([], [hardcode_minus_L], [0],
5719 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5720 into the resulting binary])
5721 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5722 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5723 into the resulting binary])
5724 _LT_TAGDECL([], [hardcode_automatic], [0],
5725 [Set to "yes" if building a shared library automatically hardcodes DIR
5726 into the library and all subsequent libraries and executables linked
5727 against it])
5728 _LT_TAGDECL([], [inherit_rpath], [0],
5729 [Set to yes if linker adds runtime paths of dependent libraries
5730 to runtime path list])
5731 _LT_TAGDECL([], [link_all_deplibs], [0],
5732 [Whether libtool must link a program against all its dependency libraries])
5733 _LT_TAGDECL([], [always_export_symbols], [0],
5734 [Set to "yes" if exported symbols are required])
5735 _LT_TAGDECL([], [export_symbols_cmds], [2],
5736 [The commands to list exported symbols])
5737 _LT_TAGDECL([], [exclude_expsyms], [1],
5738 [Symbols that should not be listed in the preloaded symbols])
5739 _LT_TAGDECL([], [include_expsyms], [1],
5740 [Symbols that must always be exported])
5741 _LT_TAGDECL([], [prelink_cmds], [2],
5742 [Commands necessary for linking programs (against libraries) with templates])
5743 _LT_TAGDECL([], [postlink_cmds], [2],
5744 [Commands necessary for finishing linking programs])
5745 _LT_TAGDECL([], [file_list_spec], [1],
5746 [Specify filename containing input files])
5747 dnl FIXME: Not yet implemented
5748 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5749 dnl [Compiler flag to generate thread safe objects])
5750 ])# _LT_LINKER_SHLIBS
5751
5752
5753 # _LT_LANG_C_CONFIG([TAG])
5754 # ------------------------
5755 # Ensure that the configuration variables for a C compiler are suitably
5756 # defined. These variables are subsequently used by _LT_CONFIG to write
5757 # the compiler configuration to `libtool'.
5758 m4_defun([_LT_LANG_C_CONFIG],
5759 [m4_require([_LT_DECL_EGREP])dnl
5760 lt_save_CC="$CC"
5761 AC_LANG_PUSH(C)
5762
5763 # Source file extension for C test sources.
5764 ac_ext=c
5765
5766 # Object file extension for compiled C test sources.
5767 objext=o
5768 _LT_TAGVAR(objext, $1)=$objext
5769
5770 # Code to be used in simple compile tests
5771 lt_simple_compile_test_code="int some_variable = 0;"
5772
5773 # Code to be used in simple link tests
5774 lt_simple_link_test_code='int main(){return(0);}'
5775
5776 _LT_TAG_COMPILER
5777 # Save the default compiler, since it gets overwritten when the other
5778 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5779 compiler_DEFAULT=$CC
5780
5781 # save warnings/boilerplate of simple test code
5782 _LT_COMPILER_BOILERPLATE
5783 _LT_LINKER_BOILERPLATE
5784
5785 if test -n "$compiler"; then
5786 _LT_COMPILER_NO_RTTI($1)
5787 _LT_COMPILER_PIC($1)
5788 _LT_COMPILER_C_O($1)
5789 _LT_COMPILER_FILE_LOCKS($1)
5790 _LT_LINKER_SHLIBS($1)
5791 _LT_SYS_DYNAMIC_LINKER($1)
5792 _LT_LINKER_HARDCODE_LIBPATH($1)
5793 LT_SYS_DLOPEN_SELF
5794 _LT_CMD_STRIPLIB
5795
5796 # Report which library types will actually be built
5797 AC_MSG_CHECKING([if libtool supports shared libraries])
5798 AC_MSG_RESULT([$can_build_shared])
5799
5800 AC_MSG_CHECKING([whether to build shared libraries])
5801 test "$can_build_shared" = "no" && enable_shared=no
5802
5803 # On AIX, shared libraries and static libraries use the same namespace, and
5804 # are all built from PIC.
5805 case $host_os in
5806 aix3*)
5807 test "$enable_shared" = yes && enable_static=no
5808 if test -n "$RANLIB"; then
5809 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5810 postinstall_cmds='$RANLIB $lib'
5811 fi
5812 ;;
5813
5814 aix[[4-9]]*)
5815 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5816 test "$enable_shared" = yes && enable_static=no
5817 fi
5818 ;;
5819 esac
5820 AC_MSG_RESULT([$enable_shared])
5821
5822 AC_MSG_CHECKING([whether to build static libraries])
5823 # Make sure either enable_shared or enable_static is yes.
5824 test "$enable_shared" = yes || enable_static=yes
5825 AC_MSG_RESULT([$enable_static])
5826
5827 _LT_CONFIG($1)
5828 fi
5829 AC_LANG_POP
5830 CC="$lt_save_CC"
5831 ])# _LT_LANG_C_CONFIG
5832
5833
5834 # _LT_LANG_CXX_CONFIG([TAG])
5835 # --------------------------
5836 # Ensure that the configuration variables for a C++ compiler are suitably
5837 # defined. These variables are subsequently used by _LT_CONFIG to write
5838 # the compiler configuration to `libtool'.
5839 m4_defun([_LT_LANG_CXX_CONFIG],
5840 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5841 m4_require([_LT_DECL_EGREP])dnl
5842 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5843 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5844 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5845 (test "X$CXX" != "Xg++"))) ; then
5846 AC_PROG_CXXCPP
5847 else
5848 _lt_caught_CXX_error=yes
5849 fi
5850
5851 AC_LANG_PUSH(C++)
5852 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5853 _LT_TAGVAR(allow_undefined_flag, $1)=
5854 _LT_TAGVAR(always_export_symbols, $1)=no
5855 _LT_TAGVAR(archive_expsym_cmds, $1)=
5856 _LT_TAGVAR(compiler_needs_object, $1)=no
5857 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5858 _LT_TAGVAR(hardcode_direct, $1)=no
5859 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5860 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5861 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5862 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5863 _LT_TAGVAR(hardcode_minus_L, $1)=no
5864 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5865 _LT_TAGVAR(hardcode_automatic, $1)=no
5866 _LT_TAGVAR(inherit_rpath, $1)=no
5867 _LT_TAGVAR(module_cmds, $1)=
5868 _LT_TAGVAR(module_expsym_cmds, $1)=
5869 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5870 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5871 _LT_TAGVAR(reload_flag, $1)=$reload_flag
5872 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5873 _LT_TAGVAR(no_undefined_flag, $1)=
5874 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5875 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5876
5877 # Source file extension for C++ test sources.
5878 ac_ext=cpp
5879
5880 # Object file extension for compiled C++ test sources.
5881 objext=o
5882 _LT_TAGVAR(objext, $1)=$objext
5883
5884 # No sense in running all these tests if we already determined that
5885 # the CXX compiler isn't working. Some variables (like enable_shared)
5886 # are currently assumed to apply to all compilers on this platform,
5887 # and will be corrupted by setting them based on a non-working compiler.
5888 if test "$_lt_caught_CXX_error" != yes; then
5889 # Code to be used in simple compile tests
5890 lt_simple_compile_test_code="int some_variable = 0;"
5891
5892 # Code to be used in simple link tests
5893 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5894
5895 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5896 _LT_TAG_COMPILER
5897
5898 # save warnings/boilerplate of simple test code
5899 _LT_COMPILER_BOILERPLATE
5900 _LT_LINKER_BOILERPLATE
5901
5902 # Allow CC to be a program name with arguments.
5903 lt_save_CC=$CC
5904 lt_save_CFLAGS=$CFLAGS
5905 lt_save_LD=$LD
5906 lt_save_GCC=$GCC
5907 GCC=$GXX
5908 lt_save_with_gnu_ld=$with_gnu_ld
5909 lt_save_path_LD=$lt_cv_path_LD
5910 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5911 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5912 else
5913 $as_unset lt_cv_prog_gnu_ld
5914 fi
5915 if test -n "${lt_cv_path_LDCXX+set}"; then
5916 lt_cv_path_LD=$lt_cv_path_LDCXX
5917 else
5918 $as_unset lt_cv_path_LD
5919 fi
5920 test -z "${LDCXX+set}" || LD=$LDCXX
5921 CC=${CXX-"c++"}
5922 CFLAGS=$CXXFLAGS
5923 compiler=$CC
5924 _LT_TAGVAR(compiler, $1)=$CC
5925 _LT_CC_BASENAME([$compiler])
5926
5927 if test -n "$compiler"; then
5928 # We don't want -fno-exception when compiling C++ code, so set the
5929 # no_builtin_flag separately
5930 if test "$GXX" = yes; then
5931 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5932 else
5933 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5934 fi
5935
5936 if test "$GXX" = yes; then
5937 # Set up default GNU C++ configuration
5938
5939 LT_PATH_LD
5940
5941 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5942 # archiving commands below assume that GNU ld is being used.
5943 if test "$with_gnu_ld" = yes; then
5944 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5945 _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'
5946
5947 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5948 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5949
5950 # If archive_cmds runs LD, not CC, wlarc should be empty
5951 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5952 # investigate it a little bit more. (MM)
5953 wlarc='${wl}'
5954
5955 # ancient GNU ld didn't support --whole-archive et. al.
5956 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5957 $GREP 'no-whole-archive' > /dev/null; then
5958 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5959 else
5960 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5961 fi
5962 else
5963 with_gnu_ld=no
5964 wlarc=
5965
5966 # A generic and very simple default shared library creation
5967 # command for GNU C++ for the case where it uses the native
5968 # linker, instead of GNU ld. If possible, this setting should
5969 # overridden to take advantage of the native linker features on
5970 # the platform it is being used on.
5971 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5972 fi
5973
5974 # Commands to make compiler produce verbose output that lists
5975 # what "hidden" libraries, object files and flags are used when
5976 # linking a shared library.
5977 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
5978
5979 else
5980 GXX=no
5981 with_gnu_ld=no
5982 wlarc=
5983 fi
5984
5985 # PORTME: fill in a description of your system's C++ link characteristics
5986 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5987 _LT_TAGVAR(ld_shlibs, $1)=yes
5988 case $host_os in
5989 aix3*)
5990 # FIXME: insert proper C++ library support
5991 _LT_TAGVAR(ld_shlibs, $1)=no
5992 ;;
5993 aix[[4-9]]*)
5994 if test "$host_cpu" = ia64; then
5995 # On IA64, the linker does run time linking by default, so we don't
5996 # have to do anything special.
5997 aix_use_runtimelinking=no
5998 exp_sym_flag='-Bexport'
5999 no_entry_flag=""
6000 else
6001 aix_use_runtimelinking=no
6002
6003 # Test if we are trying to use run time linking or normal
6004 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6005 # need to do runtime linking.
6006 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6007 for ld_flag in $LDFLAGS; do
6008 case $ld_flag in
6009 *-brtl*)
6010 aix_use_runtimelinking=yes
6011 break
6012 ;;
6013 esac
6014 done
6015 ;;
6016 esac
6017
6018 exp_sym_flag='-bexport'
6019 no_entry_flag='-bnoentry'
6020 fi
6021
6022 # When large executables or shared objects are built, AIX ld can
6023 # have problems creating the table of contents. If linking a library
6024 # or program results in "error TOC overflow" add -mminimal-toc to
6025 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6026 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6027
6028 _LT_TAGVAR(archive_cmds, $1)=''
6029 _LT_TAGVAR(hardcode_direct, $1)=yes
6030 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6031 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6032 _LT_TAGVAR(link_all_deplibs, $1)=yes
6033 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6034
6035 if test "$GXX" = yes; then
6036 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6037 # We only want to do this on AIX 4.2 and lower, the check
6038 # below for broken collect2 doesn't work under 4.3+
6039 collect2name=`${CC} -print-prog-name=collect2`
6040 if test -f "$collect2name" &&
6041 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6042 then
6043 # We have reworked collect2
6044 :
6045 else
6046 # We have old collect2
6047 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6048 # It fails to find uninstalled libraries when the uninstalled
6049 # path is not listed in the libpath. Setting hardcode_minus_L
6050 # to unsupported forces relinking
6051 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6052 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6053 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6054 fi
6055 esac
6056 shared_flag='-shared'
6057 if test "$aix_use_runtimelinking" = yes; then
6058 shared_flag="$shared_flag "'${wl}-G'
6059 fi
6060 else
6061 # not using gcc
6062 if test "$host_cpu" = ia64; then
6063 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6064 # chokes on -Wl,-G. The following line is correct:
6065 shared_flag='-G'
6066 else
6067 if test "$aix_use_runtimelinking" = yes; then
6068 shared_flag='${wl}-G'
6069 else
6070 shared_flag='${wl}-bM:SRE'
6071 fi
6072 fi
6073 fi
6074
6075 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6076 # It seems that -bexpall does not export symbols beginning with
6077 # underscore (_), so it is better to generate a list of symbols to
6078 # export.
6079 _LT_TAGVAR(always_export_symbols, $1)=yes
6080 if test "$aix_use_runtimelinking" = yes; then
6081 # Warning - without using the other runtime loading flags (-brtl),
6082 # -berok will link without error, but may produce a broken library.
6083 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6084 # Determine the default libpath from the value encoded in an empty
6085 # executable.
6086 _LT_SYS_MODULE_PATH_AIX([$1])
6087 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6088
6089 _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"
6090 else
6091 if test "$host_cpu" = ia64; then
6092 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6093 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6094 _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"
6095 else
6096 # Determine the default libpath from the value encoded in an
6097 # empty executable.
6098 _LT_SYS_MODULE_PATH_AIX([$1])
6099 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6100 # Warning - without using the other run time loading flags,
6101 # -berok will link without error, but may produce a broken library.
6102 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6103 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6104 if test "$with_gnu_ld" = yes; then
6105 # We only use this code for GNU lds that support --whole-archive.
6106 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6107 else
6108 # Exported symbols can be pulled into shared objects from archives
6109 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6110 fi
6111 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6112 # This is similar to how AIX traditionally builds its shared
6113 # libraries.
6114 _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'
6115 fi
6116 fi
6117 ;;
6118
6119 beos*)
6120 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6121 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6122 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6123 # support --undefined. This deserves some investigation. FIXME
6124 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6125 else
6126 _LT_TAGVAR(ld_shlibs, $1)=no
6127 fi
6128 ;;
6129
6130 chorus*)
6131 case $cc_basename in
6132 *)
6133 # FIXME: insert proper C++ library support
6134 _LT_TAGVAR(ld_shlibs, $1)=no
6135 ;;
6136 esac
6137 ;;
6138
6139 cygwin* | mingw* | pw32* | cegcc*)
6140 case $GXX,$cc_basename in
6141 ,cl* | no,cl*)
6142 # Native MSVC
6143 # hardcode_libdir_flag_spec is actually meaningless, as there is
6144 # no search path for DLLs.
6145 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6146 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6147 _LT_TAGVAR(always_export_symbols, $1)=yes
6148 _LT_TAGVAR(file_list_spec, $1)='@'
6149 # Tell ltmain to make .lib files, not .a files.
6150 libext=lib
6151 # Tell ltmain to make .dll files, not .so files.
6152 shrext_cmds=".dll"
6153 # FIXME: Setting linknames here is a bad hack.
6154 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6155 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6156 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6157 else
6158 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6159 fi~
6160 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6161 linknames='
6162 # The linker will not automatically build a static lib if we build a DLL.
6163 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6164 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6165 # Don't use ranlib
6166 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6167 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6168 lt_tool_outputfile="@TOOL_OUTPUT@"~
6169 case $lt_outputfile in
6170 *.exe|*.EXE) ;;
6171 *)
6172 lt_outputfile="$lt_outputfile.exe"
6173 lt_tool_outputfile="$lt_tool_outputfile.exe"
6174 ;;
6175 esac~
6176 func_to_tool_file "$lt_outputfile"~
6177 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6178 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6179 $RM "$lt_outputfile.manifest";
6180 fi'
6181 ;;
6182 *)
6183 # g++
6184 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6185 # as there is no search path for DLLs.
6186 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6187 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6188 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6189 _LT_TAGVAR(always_export_symbols, $1)=no
6190 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6191
6192 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6193 _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'
6194 # If the export-symbols file already is a .def file (1st line
6195 # is EXPORTS), use it as is; otherwise, prepend...
6196 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6197 cp $export_symbols $output_objdir/$soname.def;
6198 else
6199 echo EXPORTS > $output_objdir/$soname.def;
6200 cat $export_symbols >> $output_objdir/$soname.def;
6201 fi~
6202 $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'
6203 else
6204 _LT_TAGVAR(ld_shlibs, $1)=no
6205 fi
6206 ;;
6207 esac
6208 ;;
6209 darwin* | rhapsody*)
6210 _LT_DARWIN_LINKER_FEATURES($1)
6211 ;;
6212
6213 dgux*)
6214 case $cc_basename in
6215 ec++*)
6216 # FIXME: insert proper C++ library support
6217 _LT_TAGVAR(ld_shlibs, $1)=no
6218 ;;
6219 ghcx*)
6220 # Green Hills C++ Compiler
6221 # FIXME: insert proper C++ library support
6222 _LT_TAGVAR(ld_shlibs, $1)=no
6223 ;;
6224 *)
6225 # FIXME: insert proper C++ library support
6226 _LT_TAGVAR(ld_shlibs, $1)=no
6227 ;;
6228 esac
6229 ;;
6230
6231 freebsd[[12]]*)
6232 # C++ shared libraries reported to be fairly broken before
6233 # switch to ELF
6234 _LT_TAGVAR(ld_shlibs, $1)=no
6235 ;;
6236
6237 freebsd-elf*)
6238 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6239 ;;
6240
6241 freebsd* | dragonfly*)
6242 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6243 # conventions
6244 _LT_TAGVAR(ld_shlibs, $1)=yes
6245 ;;
6246
6247 gnu*)
6248 ;;
6249
6250 haiku*)
6251 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6252 _LT_TAGVAR(link_all_deplibs, $1)=yes
6253 ;;
6254
6255 hpux9*)
6256 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6257 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6258 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6259 _LT_TAGVAR(hardcode_direct, $1)=yes
6260 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6261 # but as the default
6262 # location of the library.
6263
6264 case $cc_basename in
6265 CC*)
6266 # FIXME: insert proper C++ library support
6267 _LT_TAGVAR(ld_shlibs, $1)=no
6268 ;;
6269 aCC*)
6270 _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'
6271 # Commands to make compiler produce verbose output that lists
6272 # what "hidden" libraries, object files and flags are used when
6273 # linking a shared library.
6274 #
6275 # There doesn't appear to be a way to prevent this compiler from
6276 # explicitly linking system object files so we need to strip them
6277 # from the output so that they don't get included in the library
6278 # dependencies.
6279 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"'
6280 ;;
6281 *)
6282 if test "$GXX" = yes; then
6283 _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'
6284 else
6285 # FIXME: insert proper C++ library support
6286 _LT_TAGVAR(ld_shlibs, $1)=no
6287 fi
6288 ;;
6289 esac
6290 ;;
6291
6292 hpux10*|hpux11*)
6293 if test $with_gnu_ld = no; then
6294 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6295 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6296
6297 case $host_cpu in
6298 hppa*64*|ia64*)
6299 ;;
6300 *)
6301 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6302 ;;
6303 esac
6304 fi
6305 case $host_cpu in
6306 hppa*64*|ia64*)
6307 _LT_TAGVAR(hardcode_direct, $1)=no
6308 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6309 ;;
6310 *)
6311 _LT_TAGVAR(hardcode_direct, $1)=yes
6312 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6313 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6314 # but as the default
6315 # location of the library.
6316 ;;
6317 esac
6318
6319 case $cc_basename in
6320 CC*)
6321 # FIXME: insert proper C++ library support
6322 _LT_TAGVAR(ld_shlibs, $1)=no
6323 ;;
6324 aCC*)
6325 case $host_cpu in
6326 hppa*64*)
6327 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6328 ;;
6329 ia64*)
6330 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6331 ;;
6332 *)
6333 _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'
6334 ;;
6335 esac
6336 # Commands to make compiler produce verbose output that lists
6337 # what "hidden" libraries, object files and flags are used when
6338 # linking a shared library.
6339 #
6340 # There doesn't appear to be a way to prevent this compiler from
6341 # explicitly linking system object files so we need to strip them
6342 # from the output so that they don't get included in the library
6343 # dependencies.
6344 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"'
6345 ;;
6346 *)
6347 if test "$GXX" = yes; then
6348 if test $with_gnu_ld = no; then
6349 case $host_cpu in
6350 hppa*64*)
6351 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6352 ;;
6353 ia64*)
6354 _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'
6355 ;;
6356 *)
6357 _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'
6358 ;;
6359 esac
6360 fi
6361 else
6362 # FIXME: insert proper C++ library support
6363 _LT_TAGVAR(ld_shlibs, $1)=no
6364 fi
6365 ;;
6366 esac
6367 ;;
6368
6369 interix[[3-9]]*)
6370 _LT_TAGVAR(hardcode_direct, $1)=no
6371 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6372 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6373 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6374 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6375 # Instead, shared libraries are loaded at an image base (0x10000000 by
6376 # default) and relocated if they conflict, which is a slow very memory
6377 # consuming and fragmenting process. To avoid this, we pick a random,
6378 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6379 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6380 _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'
6381 _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'
6382 ;;
6383 irix5* | irix6*)
6384 case $cc_basename in
6385 CC*)
6386 # SGI C++
6387 _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'
6388
6389 # Archives containing C++ object files must be created using
6390 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6391 # necessary to make sure instantiated templates are included
6392 # in the archive.
6393 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6394 ;;
6395 *)
6396 if test "$GXX" = yes; then
6397 if test "$with_gnu_ld" = no; then
6398 _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'
6399 else
6400 _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'
6401 fi
6402 fi
6403 _LT_TAGVAR(link_all_deplibs, $1)=yes
6404 ;;
6405 esac
6406 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6407 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6408 _LT_TAGVAR(inherit_rpath, $1)=yes
6409 ;;
6410
6411 linux* | k*bsd*-gnu | kopensolaris*-gnu)
6412 case $cc_basename in
6413 KCC*)
6414 # Kuck and Associates, Inc. (KAI) C++ Compiler
6415
6416 # KCC will only create a shared library if the output file
6417 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6418 # to its proper name (with version) after linking.
6419 _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'
6420 _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'
6421 # Commands to make compiler produce verbose output that lists
6422 # what "hidden" libraries, object files and flags are used when
6423 # linking a shared library.
6424 #
6425 # There doesn't appear to be a way to prevent this compiler from
6426 # explicitly linking system object files so we need to strip them
6427 # from the output so that they don't get included in the library
6428 # dependencies.
6429 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"'
6430
6431 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6432 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6433
6434 # Archives containing C++ object files must be created using
6435 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6436 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6437 ;;
6438 icpc* | ecpc* )
6439 # Intel C++
6440 with_gnu_ld=yes
6441 # version 8.0 and above of icpc choke on multiply defined symbols
6442 # if we add $predep_objects and $postdep_objects, however 7.1 and
6443 # earlier do not add the objects themselves.
6444 case `$CC -V 2>&1` in
6445 *"Version 7."*)
6446 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6447 _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'
6448 ;;
6449 *) # Version 8.0 or newer
6450 tmp_idyn=
6451 case $host_cpu in
6452 ia64*) tmp_idyn=' -i_dynamic';;
6453 esac
6454 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6455 _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'
6456 ;;
6457 esac
6458 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6459 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6460 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6461 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6462 ;;
6463 pgCC* | pgcpp*)
6464 # Portland Group C++ compiler
6465 case `$CC -V` in
6466 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6467 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6468 rm -rf $tpldir~
6469 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6470 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6471 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6472 rm -rf $tpldir~
6473 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6474 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6475 $RANLIB $oldlib'
6476 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6477 rm -rf $tpldir~
6478 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6479 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6480 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6481 rm -rf $tpldir~
6482 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6483 $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'
6484 ;;
6485 *) # Version 6 and above use weak symbols
6486 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6487 _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'
6488 ;;
6489 esac
6490
6491 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6492 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6493 _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'
6494 ;;
6495 cxx*)
6496 # Compaq C++
6497 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6498 _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'
6499
6500 runpath_var=LD_RUN_PATH
6501 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6502 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6503
6504 # Commands to make compiler produce verbose output that lists
6505 # what "hidden" libraries, object files and flags are used when
6506 # linking a shared library.
6507 #
6508 # There doesn't appear to be a way to prevent this compiler from
6509 # explicitly linking system object files so we need to strip them
6510 # from the output so that they don't get included in the library
6511 # dependencies.
6512 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'
6513 ;;
6514 xl* | mpixl* | bgxl*)
6515 # IBM XL 8.0 on PPC, with GNU ld
6516 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6517 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6518 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6519 if test "x$supports_anon_versioning" = xyes; then
6520 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6521 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6522 echo "local: *; };" >> $output_objdir/$libname.ver~
6523 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6524 fi
6525 ;;
6526 *)
6527 case `$CC -V 2>&1 | sed 5q` in
6528 *Sun\ C*)
6529 # Sun C++ 5.9
6530 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6531 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6532 _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'
6533 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6534 _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'
6535 _LT_TAGVAR(compiler_needs_object, $1)=yes
6536
6537 # Not sure whether something based on
6538 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6539 # would be better.
6540 output_verbose_link_cmd='func_echo_all'
6541
6542 # Archives containing C++ object files must be created using
6543 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6544 # necessary to make sure instantiated templates are included
6545 # in the archive.
6546 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6547 ;;
6548 esac
6549 ;;
6550 esac
6551 ;;
6552
6553 lynxos*)
6554 # FIXME: insert proper C++ library support
6555 _LT_TAGVAR(ld_shlibs, $1)=no
6556 ;;
6557
6558 m88k*)
6559 # FIXME: insert proper C++ library support
6560 _LT_TAGVAR(ld_shlibs, $1)=no
6561 ;;
6562
6563 mvs*)
6564 case $cc_basename in
6565 cxx*)
6566 # FIXME: insert proper C++ library support
6567 _LT_TAGVAR(ld_shlibs, $1)=no
6568 ;;
6569 *)
6570 # FIXME: insert proper C++ library support
6571 _LT_TAGVAR(ld_shlibs, $1)=no
6572 ;;
6573 esac
6574 ;;
6575
6576 netbsd*)
6577 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6578 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6579 wlarc=
6580 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6581 _LT_TAGVAR(hardcode_direct, $1)=yes
6582 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6583 fi
6584 # Workaround some broken pre-1.5 toolchains
6585 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6586 ;;
6587
6588 *nto* | *qnx*)
6589 _LT_TAGVAR(ld_shlibs, $1)=yes
6590 ;;
6591
6592 openbsd2*)
6593 # C++ shared libraries are fairly broken
6594 _LT_TAGVAR(ld_shlibs, $1)=no
6595 ;;
6596
6597 openbsd*)
6598 if test -f /usr/libexec/ld.so; then
6599 _LT_TAGVAR(hardcode_direct, $1)=yes
6600 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6601 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6602 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6603 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6604 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6605 _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'
6606 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6607 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6608 fi
6609 output_verbose_link_cmd=func_echo_all
6610 else
6611 _LT_TAGVAR(ld_shlibs, $1)=no
6612 fi
6613 ;;
6614
6615 osf3* | osf4* | osf5*)
6616 case $cc_basename in
6617 KCC*)
6618 # Kuck and Associates, Inc. (KAI) C++ Compiler
6619
6620 # KCC will only create a shared library if the output file
6621 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6622 # to its proper name (with version) after linking.
6623 _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'
6624
6625 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6626 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6627
6628 # Archives containing C++ object files must be created using
6629 # the KAI C++ compiler.
6630 case $host in
6631 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6632 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6633 esac
6634 ;;
6635 RCC*)
6636 # Rational C++ 2.4.1
6637 # FIXME: insert proper C++ library support
6638 _LT_TAGVAR(ld_shlibs, $1)=no
6639 ;;
6640 cxx*)
6641 case $host in
6642 osf3*)
6643 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6644 _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'
6645 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6646 ;;
6647 *)
6648 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6649 _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'
6650 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6651 echo "-hidden">> $lib.exp~
6652 $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~
6653 $RM $lib.exp'
6654 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6655 ;;
6656 esac
6657
6658 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6659
6660 # Commands to make compiler produce verbose output that lists
6661 # what "hidden" libraries, object files and flags are used when
6662 # linking a shared library.
6663 #
6664 # There doesn't appear to be a way to prevent this compiler from
6665 # explicitly linking system object files so we need to strip them
6666 # from the output so that they don't get included in the library
6667 # dependencies.
6668 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"'
6669 ;;
6670 *)
6671 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6672 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6673 case $host in
6674 osf3*)
6675 _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'
6676 ;;
6677 *)
6678 _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'
6679 ;;
6680 esac
6681
6682 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6683 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6684
6685 # Commands to make compiler produce verbose output that lists
6686 # what "hidden" libraries, object files and flags are used when
6687 # linking a shared library.
6688 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6689
6690 else
6691 # FIXME: insert proper C++ library support
6692 _LT_TAGVAR(ld_shlibs, $1)=no
6693 fi
6694 ;;
6695 esac
6696 ;;
6697
6698 psos*)
6699 # FIXME: insert proper C++ library support
6700 _LT_TAGVAR(ld_shlibs, $1)=no
6701 ;;
6702
6703 sunos4*)
6704 case $cc_basename in
6705 CC*)
6706 # Sun C++ 4.x
6707 # FIXME: insert proper C++ library support
6708 _LT_TAGVAR(ld_shlibs, $1)=no
6709 ;;
6710 lcc*)
6711 # Lucid
6712 # FIXME: insert proper C++ library support
6713 _LT_TAGVAR(ld_shlibs, $1)=no
6714 ;;
6715 *)
6716 # FIXME: insert proper C++ library support
6717 _LT_TAGVAR(ld_shlibs, $1)=no
6718 ;;
6719 esac
6720 ;;
6721
6722 solaris*)
6723 case $cc_basename in
6724 CC* | sunCC*)
6725 # Sun C++ 4.2, 5.x and Centerline C++
6726 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6727 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6728 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6729 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6730 $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'
6731
6732 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6733 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6734 case $host_os in
6735 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6736 *)
6737 # The compiler driver will combine and reorder linker options,
6738 # but understands `-z linker_flag'.
6739 # Supported since Solaris 2.6 (maybe 2.5.1?)
6740 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6741 ;;
6742 esac
6743 _LT_TAGVAR(link_all_deplibs, $1)=yes
6744
6745 output_verbose_link_cmd='func_echo_all'
6746
6747 # Archives containing C++ object files must be created using
6748 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6749 # necessary to make sure instantiated templates are included
6750 # in the archive.
6751 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6752 ;;
6753 gcx*)
6754 # Green Hills C++ Compiler
6755 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6756
6757 # The C++ compiler must be used to create the archive.
6758 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6759 ;;
6760 *)
6761 # GNU C++ compiler with Solaris linker
6762 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6763 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6764 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6765 _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'
6766 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6767 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6768
6769 # Commands to make compiler produce verbose output that lists
6770 # what "hidden" libraries, object files and flags are used when
6771 # linking a shared library.
6772 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6773 else
6774 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6775 # platform.
6776 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6777 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6778 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6779
6780 # Commands to make compiler produce verbose output that lists
6781 # what "hidden" libraries, object files and flags are used when
6782 # linking a shared library.
6783 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6784 fi
6785
6786 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6787 case $host_os in
6788 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6789 *)
6790 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6791 ;;
6792 esac
6793 fi
6794 ;;
6795 esac
6796 ;;
6797
6798 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6799 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6800 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6801 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6802 runpath_var='LD_RUN_PATH'
6803
6804 case $cc_basename in
6805 CC*)
6806 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6807 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6808 ;;
6809 *)
6810 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6811 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6812 ;;
6813 esac
6814 ;;
6815
6816 sysv5* | sco3.2v5* | sco5v6*)
6817 # Note: We can NOT use -z defs as we might desire, because we do not
6818 # link with -lc, and that would cause any symbols used from libc to
6819 # always be unresolved, which means just about no library would
6820 # ever link correctly. If we're not using GNU ld we use -z text
6821 # though, which does catch some bad symbols but isn't as heavy-handed
6822 # as -z defs.
6823 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6824 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6825 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6826 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6827 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6828 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6829 _LT_TAGVAR(link_all_deplibs, $1)=yes
6830 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6831 runpath_var='LD_RUN_PATH'
6832
6833 case $cc_basename in
6834 CC*)
6835 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6836 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6837 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6838 '"$_LT_TAGVAR(old_archive_cmds, $1)"
6839 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6840 '"$_LT_TAGVAR(reload_cmds, $1)"
6841 ;;
6842 *)
6843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6844 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6845 ;;
6846 esac
6847 ;;
6848
6849 tandem*)
6850 case $cc_basename in
6851 NCC*)
6852 # NonStop-UX NCC 3.20
6853 # FIXME: insert proper C++ library support
6854 _LT_TAGVAR(ld_shlibs, $1)=no
6855 ;;
6856 *)
6857 # FIXME: insert proper C++ library support
6858 _LT_TAGVAR(ld_shlibs, $1)=no
6859 ;;
6860 esac
6861 ;;
6862
6863 vxworks*)
6864 # FIXME: insert proper C++ library support
6865 _LT_TAGVAR(ld_shlibs, $1)=no
6866 ;;
6867
6868 *)
6869 # FIXME: insert proper C++ library support
6870 _LT_TAGVAR(ld_shlibs, $1)=no
6871 ;;
6872 esac
6873
6874 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6875 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6876
6877 _LT_TAGVAR(GCC, $1)="$GXX"
6878 _LT_TAGVAR(LD, $1)="$LD"
6879
6880 ## CAVEAT EMPTOR:
6881 ## There is no encapsulation within the following macros, do not change
6882 ## the running order or otherwise move them around unless you know exactly
6883 ## what you are doing...
6884 _LT_SYS_HIDDEN_LIBDEPS($1)
6885 _LT_COMPILER_PIC($1)
6886 _LT_COMPILER_C_O($1)
6887 _LT_COMPILER_FILE_LOCKS($1)
6888 _LT_LINKER_SHLIBS($1)
6889 _LT_SYS_DYNAMIC_LINKER($1)
6890 _LT_LINKER_HARDCODE_LIBPATH($1)
6891
6892 _LT_CONFIG($1)
6893 fi # test -n "$compiler"
6894
6895 CC=$lt_save_CC
6896 CFLAGS=$lt_save_CFLAGS
6897 LDCXX=$LD
6898 LD=$lt_save_LD
6899 GCC=$lt_save_GCC
6900 with_gnu_ld=$lt_save_with_gnu_ld
6901 lt_cv_path_LDCXX=$lt_cv_path_LD
6902 lt_cv_path_LD=$lt_save_path_LD
6903 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6904 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6905 fi # test "$_lt_caught_CXX_error" != yes
6906
6907 AC_LANG_POP
6908 ])# _LT_LANG_CXX_CONFIG
6909
6910
6911 # _LT_FUNC_STRIPNAME_CNF
6912 # ----------------------
6913 # func_stripname_cnf prefix suffix name
6914 # strip PREFIX and SUFFIX off of NAME.
6915 # PREFIX and SUFFIX must not contain globbing or regex special
6916 # characters, hashes, percent signs, but SUFFIX may contain a leading
6917 # dot (in which case that matches only a dot).
6918 #
6919 # This function is identical to the (non-XSI) version of func_stripname,
6920 # except this one can be used by m4 code that may be executed by configure,
6921 # rather than the libtool script.
6922 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6923 AC_REQUIRE([_LT_DECL_SED])
6924 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6925 func_stripname_cnf ()
6926 {
6927 case ${2} in
6928 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6929 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6930 esac
6931 } # func_stripname_cnf
6932 ])# _LT_FUNC_STRIPNAME_CNF
6933
6934 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6935 # ---------------------------------
6936 # Figure out "hidden" library dependencies from verbose
6937 # compiler output when linking a shared library.
6938 # Parse the compiler output and extract the necessary
6939 # objects, libraries and library flags.
6940 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6941 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6942 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6943 # Dependencies to place before and after the object being linked:
6944 _LT_TAGVAR(predep_objects, $1)=
6945 _LT_TAGVAR(postdep_objects, $1)=
6946 _LT_TAGVAR(predeps, $1)=
6947 _LT_TAGVAR(postdeps, $1)=
6948 _LT_TAGVAR(compiler_lib_search_path, $1)=
6949
6950 dnl we can't use the lt_simple_compile_test_code here,
6951 dnl because it contains code intended for an executable,
6952 dnl not a library. It's possible we should let each
6953 dnl tag define a new lt_????_link_test_code variable,
6954 dnl but it's only used here...
6955 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6956 int a;
6957 void foo (void) { a = 0; }
6958 _LT_EOF
6959 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6960 class Foo
6961 {
6962 public:
6963 Foo (void) { a = 0; }
6964 private:
6965 int a;
6966 };
6967 _LT_EOF
6968 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6969 subroutine foo
6970 implicit none
6971 integer*4 a
6972 a=0
6973 return
6974 end
6975 _LT_EOF
6976 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6977 subroutine foo
6978 implicit none
6979 integer a
6980 a=0
6981 return
6982 end
6983 _LT_EOF
6984 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6985 public class foo {
6986 private int a;
6987 public void bar (void) {
6988 a = 0;
6989 }
6990 };
6991 _LT_EOF
6992 ])
6993
6994 _lt_libdeps_save_CFLAGS=$CFLAGS
6995 case "$CC $CFLAGS " in #(
6996 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
6997 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
6998 esac
6999
7000 dnl Parse the compiler output and extract the necessary
7001 dnl objects, libraries and library flags.
7002 if AC_TRY_EVAL(ac_compile); then
7003 # Parse the compiler output and extract the necessary
7004 # objects, libraries and library flags.
7005
7006 # Sentinel used to keep track of whether or not we are before
7007 # the conftest object file.
7008 pre_test_object_deps_done=no
7009
7010 for p in `eval "$output_verbose_link_cmd"`; do
7011 case ${prev}${p} in
7012
7013 -L* | -R* | -l*)
7014 # Some compilers place space between "-{L,R}" and the path.
7015 # Remove the space.
7016 if test $p = "-L" ||
7017 test $p = "-R"; then
7018 prev=$p
7019 continue
7020 fi
7021
7022 # Expand the sysroot to ease extracting the directories later.
7023 if test -z "$prev"; then
7024 case $p in
7025 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7026 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7027 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7028 esac
7029 fi
7030 case $p in
7031 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7032 esac
7033 if test "$pre_test_object_deps_done" = no; then
7034 case ${prev} in
7035 -L | -R)
7036 # Internal compiler library paths should come after those
7037 # provided the user. The postdeps already come after the
7038 # user supplied libs so there is no need to process them.
7039 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7040 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7041 else
7042 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7043 fi
7044 ;;
7045 # The "-l" case would never come before the object being
7046 # linked, so don't bother handling this case.
7047 esac
7048 else
7049 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7050 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7051 else
7052 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7053 fi
7054 fi
7055 prev=
7056 ;;
7057
7058 *.lto.$objext) ;; # Ignore GCC LTO objects
7059 *.$objext)
7060 # This assumes that the test object file only shows up
7061 # once in the compiler output.
7062 if test "$p" = "conftest.$objext"; then
7063 pre_test_object_deps_done=yes
7064 continue
7065 fi
7066
7067 if test "$pre_test_object_deps_done" = no; then
7068 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7069 _LT_TAGVAR(predep_objects, $1)="$p"
7070 else
7071 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7072 fi
7073 else
7074 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7075 _LT_TAGVAR(postdep_objects, $1)="$p"
7076 else
7077 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7078 fi
7079 fi
7080 ;;
7081
7082 *) ;; # Ignore the rest.
7083
7084 esac
7085 done
7086
7087 # Clean up.
7088 rm -f a.out a.exe
7089 else
7090 echo "libtool.m4: error: problem compiling $1 test program"
7091 fi
7092
7093 $RM -f confest.$objext
7094 CFLAGS=$_lt_libdeps_save_CFLAGS
7095
7096 # PORTME: override above test on systems where it is broken
7097 m4_if([$1], [CXX],
7098 [case $host_os in
7099 interix[[3-9]]*)
7100 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7101 # hack all around it, let's just trust "g++" to DTRT.
7102 _LT_TAGVAR(predep_objects,$1)=
7103 _LT_TAGVAR(postdep_objects,$1)=
7104 _LT_TAGVAR(postdeps,$1)=
7105 ;;
7106
7107 linux*)
7108 case `$CC -V 2>&1 | sed 5q` in
7109 *Sun\ C*)
7110 # Sun C++ 5.9
7111
7112 # The more standards-conforming stlport4 library is
7113 # incompatible with the Cstd library. Avoid specifying
7114 # it if it's in CXXFLAGS. Ignore libCrun as
7115 # -library=stlport4 depends on it.
7116 case " $CXX $CXXFLAGS " in
7117 *" -library=stlport4 "*)
7118 solaris_use_stlport4=yes
7119 ;;
7120 esac
7121
7122 if test "$solaris_use_stlport4" != yes; then
7123 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7124 fi
7125 ;;
7126 esac
7127 ;;
7128
7129 solaris*)
7130 case $cc_basename in
7131 CC* | sunCC*)
7132 # The more standards-conforming stlport4 library is
7133 # incompatible with the Cstd library. Avoid specifying
7134 # it if it's in CXXFLAGS. Ignore libCrun as
7135 # -library=stlport4 depends on it.
7136 case " $CXX $CXXFLAGS " in
7137 *" -library=stlport4 "*)
7138 solaris_use_stlport4=yes
7139 ;;
7140 esac
7141
7142 # Adding this requires a known-good setup of shared libraries for
7143 # Sun compiler versions before 5.6, else PIC objects from an old
7144 # archive will be linked into the output, leading to subtle bugs.
7145 if test "$solaris_use_stlport4" != yes; then
7146 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7147 fi
7148 ;;
7149 esac
7150 ;;
7151 esac
7152 ])
7153
7154 case " $_LT_TAGVAR(postdeps, $1) " in
7155 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7156 esac
7157 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7158 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7159 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7160 fi
7161 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7162 [The directories searched by this compiler when creating a shared library])
7163 _LT_TAGDECL([], [predep_objects], [1],
7164 [Dependencies to place before and after the objects being linked to
7165 create a shared library])
7166 _LT_TAGDECL([], [postdep_objects], [1])
7167 _LT_TAGDECL([], [predeps], [1])
7168 _LT_TAGDECL([], [postdeps], [1])
7169 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7170 [The library search path used internally by the compiler when linking
7171 a shared library])
7172 ])# _LT_SYS_HIDDEN_LIBDEPS
7173
7174
7175 # _LT_LANG_F77_CONFIG([TAG])
7176 # --------------------------
7177 # Ensure that the configuration variables for a Fortran 77 compiler are
7178 # suitably defined. These variables are subsequently used by _LT_CONFIG
7179 # to write the compiler configuration to `libtool'.
7180 m4_defun([_LT_LANG_F77_CONFIG],
7181 [AC_LANG_PUSH(Fortran 77)
7182 if test -z "$F77" || test "X$F77" = "Xno"; then
7183 _lt_disable_F77=yes
7184 fi
7185
7186 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7187 _LT_TAGVAR(allow_undefined_flag, $1)=
7188 _LT_TAGVAR(always_export_symbols, $1)=no
7189 _LT_TAGVAR(archive_expsym_cmds, $1)=
7190 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7191 _LT_TAGVAR(hardcode_direct, $1)=no
7192 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7193 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7194 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7195 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7196 _LT_TAGVAR(hardcode_minus_L, $1)=no
7197 _LT_TAGVAR(hardcode_automatic, $1)=no
7198 _LT_TAGVAR(inherit_rpath, $1)=no
7199 _LT_TAGVAR(module_cmds, $1)=
7200 _LT_TAGVAR(module_expsym_cmds, $1)=
7201 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7202 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7203 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7204 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7205 _LT_TAGVAR(no_undefined_flag, $1)=
7206 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7207 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7208
7209 # Source file extension for f77 test sources.
7210 ac_ext=f
7211
7212 # Object file extension for compiled f77 test sources.
7213 objext=o
7214 _LT_TAGVAR(objext, $1)=$objext
7215
7216 # No sense in running all these tests if we already determined that
7217 # the F77 compiler isn't working. Some variables (like enable_shared)
7218 # are currently assumed to apply to all compilers on this platform,
7219 # and will be corrupted by setting them based on a non-working compiler.
7220 if test "$_lt_disable_F77" != yes; then
7221 # Code to be used in simple compile tests
7222 lt_simple_compile_test_code="\
7223 subroutine t
7224 return
7225 end
7226 "
7227
7228 # Code to be used in simple link tests
7229 lt_simple_link_test_code="\
7230 program t
7231 end
7232 "
7233
7234 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7235 _LT_TAG_COMPILER
7236
7237 # save warnings/boilerplate of simple test code
7238 _LT_COMPILER_BOILERPLATE
7239 _LT_LINKER_BOILERPLATE
7240
7241 # Allow CC to be a program name with arguments.
7242 lt_save_CC="$CC"
7243 lt_save_GCC=$GCC
7244 lt_save_CFLAGS=$CFLAGS
7245 CC=${F77-"f77"}
7246 CFLAGS=$FFLAGS
7247 compiler=$CC
7248 _LT_TAGVAR(compiler, $1)=$CC
7249 _LT_CC_BASENAME([$compiler])
7250 GCC=$G77
7251 if test -n "$compiler"; then
7252 AC_MSG_CHECKING([if libtool supports shared libraries])
7253 AC_MSG_RESULT([$can_build_shared])
7254
7255 AC_MSG_CHECKING([whether to build shared libraries])
7256 test "$can_build_shared" = "no" && enable_shared=no
7257
7258 # On AIX, shared libraries and static libraries use the same namespace, and
7259 # are all built from PIC.
7260 case $host_os in
7261 aix3*)
7262 test "$enable_shared" = yes && enable_static=no
7263 if test -n "$RANLIB"; then
7264 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7265 postinstall_cmds='$RANLIB $lib'
7266 fi
7267 ;;
7268 aix[[4-9]]*)
7269 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7270 test "$enable_shared" = yes && enable_static=no
7271 fi
7272 ;;
7273 esac
7274 AC_MSG_RESULT([$enable_shared])
7275
7276 AC_MSG_CHECKING([whether to build static libraries])
7277 # Make sure either enable_shared or enable_static is yes.
7278 test "$enable_shared" = yes || enable_static=yes
7279 AC_MSG_RESULT([$enable_static])
7280
7281 _LT_TAGVAR(GCC, $1)="$G77"
7282 _LT_TAGVAR(LD, $1)="$LD"
7283
7284 ## CAVEAT EMPTOR:
7285 ## There is no encapsulation within the following macros, do not change
7286 ## the running order or otherwise move them around unless you know exactly
7287 ## what you are doing...
7288 _LT_COMPILER_PIC($1)
7289 _LT_COMPILER_C_O($1)
7290 _LT_COMPILER_FILE_LOCKS($1)
7291 _LT_LINKER_SHLIBS($1)
7292 _LT_SYS_DYNAMIC_LINKER($1)
7293 _LT_LINKER_HARDCODE_LIBPATH($1)
7294
7295 _LT_CONFIG($1)
7296 fi # test -n "$compiler"
7297
7298 GCC=$lt_save_GCC
7299 CC="$lt_save_CC"
7300 CFLAGS="$lt_save_CFLAGS"
7301 fi # test "$_lt_disable_F77" != yes
7302
7303 AC_LANG_POP
7304 ])# _LT_LANG_F77_CONFIG
7305
7306
7307 # _LT_LANG_FC_CONFIG([TAG])
7308 # -------------------------
7309 # Ensure that the configuration variables for a Fortran compiler are
7310 # suitably defined. These variables are subsequently used by _LT_CONFIG
7311 # to write the compiler configuration to `libtool'.
7312 m4_defun([_LT_LANG_FC_CONFIG],
7313 [AC_LANG_PUSH(Fortran)
7314
7315 if test -z "$FC" || test "X$FC" = "Xno"; then
7316 _lt_disable_FC=yes
7317 fi
7318
7319 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7320 _LT_TAGVAR(allow_undefined_flag, $1)=
7321 _LT_TAGVAR(always_export_symbols, $1)=no
7322 _LT_TAGVAR(archive_expsym_cmds, $1)=
7323 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7324 _LT_TAGVAR(hardcode_direct, $1)=no
7325 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7326 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7327 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7328 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7329 _LT_TAGVAR(hardcode_minus_L, $1)=no
7330 _LT_TAGVAR(hardcode_automatic, $1)=no
7331 _LT_TAGVAR(inherit_rpath, $1)=no
7332 _LT_TAGVAR(module_cmds, $1)=
7333 _LT_TAGVAR(module_expsym_cmds, $1)=
7334 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7335 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7336 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7337 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7338 _LT_TAGVAR(no_undefined_flag, $1)=
7339 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7340 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7341
7342 # Source file extension for fc test sources.
7343 ac_ext=${ac_fc_srcext-f}
7344
7345 # Object file extension for compiled fc test sources.
7346 objext=o
7347 _LT_TAGVAR(objext, $1)=$objext
7348
7349 # No sense in running all these tests if we already determined that
7350 # the FC compiler isn't working. Some variables (like enable_shared)
7351 # are currently assumed to apply to all compilers on this platform,
7352 # and will be corrupted by setting them based on a non-working compiler.
7353 if test "$_lt_disable_FC" != yes; then
7354 # Code to be used in simple compile tests
7355 lt_simple_compile_test_code="\
7356 subroutine t
7357 return
7358 end
7359 "
7360
7361 # Code to be used in simple link tests
7362 lt_simple_link_test_code="\
7363 program t
7364 end
7365 "
7366
7367 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7368 _LT_TAG_COMPILER
7369
7370 # save warnings/boilerplate of simple test code
7371 _LT_COMPILER_BOILERPLATE
7372 _LT_LINKER_BOILERPLATE
7373
7374 # Allow CC to be a program name with arguments.
7375 lt_save_CC="$CC"
7376 lt_save_GCC=$GCC
7377 lt_save_CFLAGS=$CFLAGS
7378 CC=${FC-"f95"}
7379 CFLAGS=$FCFLAGS
7380 compiler=$CC
7381 GCC=$ac_cv_fc_compiler_gnu
7382
7383 _LT_TAGVAR(compiler, $1)=$CC
7384 _LT_CC_BASENAME([$compiler])
7385
7386 if test -n "$compiler"; then
7387 AC_MSG_CHECKING([if libtool supports shared libraries])
7388 AC_MSG_RESULT([$can_build_shared])
7389
7390 AC_MSG_CHECKING([whether to build shared libraries])
7391 test "$can_build_shared" = "no" && enable_shared=no
7392
7393 # On AIX, shared libraries and static libraries use the same namespace, and
7394 # are all built from PIC.
7395 case $host_os in
7396 aix3*)
7397 test "$enable_shared" = yes && enable_static=no
7398 if test -n "$RANLIB"; then
7399 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7400 postinstall_cmds='$RANLIB $lib'
7401 fi
7402 ;;
7403 aix[[4-9]]*)
7404 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7405 test "$enable_shared" = yes && enable_static=no
7406 fi
7407 ;;
7408 esac
7409 AC_MSG_RESULT([$enable_shared])
7410
7411 AC_MSG_CHECKING([whether to build static libraries])
7412 # Make sure either enable_shared or enable_static is yes.
7413 test "$enable_shared" = yes || enable_static=yes
7414 AC_MSG_RESULT([$enable_static])
7415
7416 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7417 _LT_TAGVAR(LD, $1)="$LD"
7418
7419 ## CAVEAT EMPTOR:
7420 ## There is no encapsulation within the following macros, do not change
7421 ## the running order or otherwise move them around unless you know exactly
7422 ## what you are doing...
7423 _LT_SYS_HIDDEN_LIBDEPS($1)
7424 _LT_COMPILER_PIC($1)
7425 _LT_COMPILER_C_O($1)
7426 _LT_COMPILER_FILE_LOCKS($1)
7427 _LT_LINKER_SHLIBS($1)
7428 _LT_SYS_DYNAMIC_LINKER($1)
7429 _LT_LINKER_HARDCODE_LIBPATH($1)
7430
7431 _LT_CONFIG($1)
7432 fi # test -n "$compiler"
7433
7434 GCC=$lt_save_GCC
7435 CC=$lt_save_CC
7436 CFLAGS=$lt_save_CFLAGS
7437 fi # test "$_lt_disable_FC" != yes
7438
7439 AC_LANG_POP
7440 ])# _LT_LANG_FC_CONFIG
7441
7442
7443 # _LT_LANG_GCJ_CONFIG([TAG])
7444 # --------------------------
7445 # Ensure that the configuration variables for the GNU Java Compiler compiler
7446 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7447 # to write the compiler configuration to `libtool'.
7448 m4_defun([_LT_LANG_GCJ_CONFIG],
7449 [AC_REQUIRE([LT_PROG_GCJ])dnl
7450 AC_LANG_SAVE
7451
7452 # Source file extension for Java test sources.
7453 ac_ext=java
7454
7455 # Object file extension for compiled Java test sources.
7456 objext=o
7457 _LT_TAGVAR(objext, $1)=$objext
7458
7459 # Code to be used in simple compile tests
7460 lt_simple_compile_test_code="class foo {}"
7461
7462 # Code to be used in simple link tests
7463 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7464
7465 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7466 _LT_TAG_COMPILER
7467
7468 # save warnings/boilerplate of simple test code
7469 _LT_COMPILER_BOILERPLATE
7470 _LT_LINKER_BOILERPLATE
7471
7472 # Allow CC to be a program name with arguments.
7473 lt_save_CC=$CC
7474 lt_save_CFLAGS=$CFLAGS
7475 lt_save_GCC=$GCC
7476 GCC=yes
7477 CC=${GCJ-"gcj"}
7478 CFLAGS=$GCJFLAGS
7479 compiler=$CC
7480 _LT_TAGVAR(compiler, $1)=$CC
7481 _LT_TAGVAR(LD, $1)="$LD"
7482 _LT_CC_BASENAME([$compiler])
7483
7484 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7485 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7486
7487 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7488 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7489 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7490
7491 if test -n "$compiler"; then
7492 _LT_COMPILER_NO_RTTI($1)
7493 _LT_COMPILER_PIC($1)
7494 _LT_COMPILER_C_O($1)
7495 _LT_COMPILER_FILE_LOCKS($1)
7496 _LT_LINKER_SHLIBS($1)
7497 _LT_LINKER_HARDCODE_LIBPATH($1)
7498
7499 _LT_CONFIG($1)
7500 fi
7501
7502 AC_LANG_RESTORE
7503
7504 GCC=$lt_save_GCC
7505 CC=$lt_save_CC
7506 CFLAGS=$lt_save_CFLAGS
7507 ])# _LT_LANG_GCJ_CONFIG
7508
7509
7510 # _LT_LANG_RC_CONFIG([TAG])
7511 # -------------------------
7512 # Ensure that the configuration variables for the Windows resource compiler
7513 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7514 # to write the compiler configuration to `libtool'.
7515 m4_defun([_LT_LANG_RC_CONFIG],
7516 [AC_REQUIRE([LT_PROG_RC])dnl
7517 AC_LANG_SAVE
7518
7519 # Source file extension for RC test sources.
7520 ac_ext=rc
7521
7522 # Object file extension for compiled RC test sources.
7523 objext=o
7524 _LT_TAGVAR(objext, $1)=$objext
7525
7526 # Code to be used in simple compile tests
7527 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7528
7529 # Code to be used in simple link tests
7530 lt_simple_link_test_code="$lt_simple_compile_test_code"
7531
7532 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7533 _LT_TAG_COMPILER
7534
7535 # save warnings/boilerplate of simple test code
7536 _LT_COMPILER_BOILERPLATE
7537 _LT_LINKER_BOILERPLATE
7538
7539 # Allow CC to be a program name with arguments.
7540 lt_save_CC="$CC"
7541 lt_save_CFLAGS=$CFLAGS
7542 lt_save_GCC=$GCC
7543 GCC=
7544 CC=${RC-"windres"}
7545 CFLAGS=
7546 compiler=$CC
7547 _LT_TAGVAR(compiler, $1)=$CC
7548 _LT_CC_BASENAME([$compiler])
7549 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7550
7551 if test -n "$compiler"; then
7552 :
7553 _LT_CONFIG($1)
7554 fi
7555
7556 GCC=$lt_save_GCC
7557 AC_LANG_RESTORE
7558 CC=$lt_save_CC
7559 CFLAGS=$lt_save_CFLAGS
7560 ])# _LT_LANG_RC_CONFIG
7561
7562
7563 # LT_PROG_GCJ
7564 # -----------
7565 AC_DEFUN([LT_PROG_GCJ],
7566 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7567 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7568 [AC_CHECK_TOOL(GCJ, gcj,)
7569 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7570 AC_SUBST(GCJFLAGS)])])[]dnl
7571 ])
7572
7573 # Old name:
7574 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7575 dnl aclocal-1.4 backwards compatibility:
7576 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7577
7578
7579 # LT_PROG_RC
7580 # ----------
7581 AC_DEFUN([LT_PROG_RC],
7582 [AC_CHECK_TOOL(RC, windres,)
7583 ])
7584
7585 # Old name:
7586 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7587 dnl aclocal-1.4 backwards compatibility:
7588 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7589
7590
7591 # _LT_DECL_EGREP
7592 # --------------
7593 # If we don't have a new enough Autoconf to choose the best grep
7594 # available, choose the one first in the user's PATH.
7595 m4_defun([_LT_DECL_EGREP],
7596 [AC_REQUIRE([AC_PROG_EGREP])dnl
7597 AC_REQUIRE([AC_PROG_FGREP])dnl
7598 test -z "$GREP" && GREP=grep
7599 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7600 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7601 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7602 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7603 AC_SUBST([GREP])
7604 ])
7605
7606
7607 # _LT_DECL_OBJDUMP
7608 # --------------
7609 # If we don't have a new enough Autoconf to choose the best objdump
7610 # available, choose the one first in the user's PATH.
7611 m4_defun([_LT_DECL_OBJDUMP],
7612 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7613 test -z "$OBJDUMP" && OBJDUMP=objdump
7614 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7615 AC_SUBST([OBJDUMP])
7616 ])
7617
7618 # _LT_DECL_DLLTOOL
7619 # ----------------
7620 # Ensure DLLTOOL variable is set.
7621 m4_defun([_LT_DECL_DLLTOOL],
7622 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7623 test -z "$DLLTOOL" && DLLTOOL=dlltool
7624 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7625 AC_SUBST([DLLTOOL])
7626 ])
7627
7628 # _LT_DECL_SED
7629 # ------------
7630 # Check for a fully-functional sed program, that truncates
7631 # as few characters as possible. Prefer GNU sed if found.
7632 m4_defun([_LT_DECL_SED],
7633 [AC_PROG_SED
7634 test -z "$SED" && SED=sed
7635 Xsed="$SED -e 1s/^X//"
7636 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7637 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7638 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7639 ])# _LT_DECL_SED
7640
7641 m4_ifndef([AC_PROG_SED], [
7642 # NOTE: This macro has been submitted for inclusion into #
7643 # GNU Autoconf as AC_PROG_SED. When it is available in #
7644 # a released version of Autoconf we should remove this #
7645 # macro and use it instead. #
7646
7647 m4_defun([AC_PROG_SED],
7648 [AC_MSG_CHECKING([for a sed that does not truncate output])
7649 AC_CACHE_VAL(lt_cv_path_SED,
7650 [# Loop through the user's path and test for sed and gsed.
7651 # Then use that list of sed's as ones to test for truncation.
7652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7653 for as_dir in $PATH
7654 do
7655 IFS=$as_save_IFS
7656 test -z "$as_dir" && as_dir=.
7657 for lt_ac_prog in sed gsed; do
7658 for ac_exec_ext in '' $ac_executable_extensions; do
7659 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7660 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7661 fi
7662 done
7663 done
7664 done
7665 IFS=$as_save_IFS
7666 lt_ac_max=0
7667 lt_ac_count=0
7668 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7669 # along with /bin/sed that truncates output.
7670 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7671 test ! -f $lt_ac_sed && continue
7672 cat /dev/null > conftest.in
7673 lt_ac_count=0
7674 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7675 # Check for GNU sed and select it if it is found.
7676 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7677 lt_cv_path_SED=$lt_ac_sed
7678 break
7679 fi
7680 while true; do
7681 cat conftest.in conftest.in >conftest.tmp
7682 mv conftest.tmp conftest.in
7683 cp conftest.in conftest.nl
7684 echo >>conftest.nl
7685 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7686 cmp -s conftest.out conftest.nl || break
7687 # 10000 chars as input seems more than enough
7688 test $lt_ac_count -gt 10 && break
7689 lt_ac_count=`expr $lt_ac_count + 1`
7690 if test $lt_ac_count -gt $lt_ac_max; then
7691 lt_ac_max=$lt_ac_count
7692 lt_cv_path_SED=$lt_ac_sed
7693 fi
7694 done
7695 done
7696 ])
7697 SED=$lt_cv_path_SED
7698 AC_SUBST([SED])
7699 AC_MSG_RESULT([$SED])
7700 ])#AC_PROG_SED
7701 ])#m4_ifndef
7702
7703 # Old name:
7704 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7705 dnl aclocal-1.4 backwards compatibility:
7706 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7707
7708
7709 # _LT_CHECK_SHELL_FEATURES
7710 # ------------------------
7711 # Find out whether the shell is Bourne or XSI compatible,
7712 # or has some other useful features.
7713 m4_defun([_LT_CHECK_SHELL_FEATURES],
7714 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7715 # Try some XSI features
7716 xsi_shell=no
7717 ( _lt_dummy="a/b/c"
7718 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7719 = c,a/b,b/c, \
7720 && eval 'test $(( 1 + 1 )) -eq 2 \
7721 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7722 && xsi_shell=yes
7723 AC_MSG_RESULT([$xsi_shell])
7724 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7725
7726 AC_MSG_CHECKING([whether the shell understands "+="])
7727 lt_shell_append=no
7728 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7729 >/dev/null 2>&1 \
7730 && lt_shell_append=yes
7731 AC_MSG_RESULT([$lt_shell_append])
7732 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7733
7734 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7735 lt_unset=unset
7736 else
7737 lt_unset=false
7738 fi
7739 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7740
7741 # test EBCDIC or ASCII
7742 case `echo X|tr X '\101'` in
7743 A) # ASCII based system
7744 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7745 lt_SP2NL='tr \040 \012'
7746 lt_NL2SP='tr \015\012 \040\040'
7747 ;;
7748 *) # EBCDIC based system
7749 lt_SP2NL='tr \100 \n'
7750 lt_NL2SP='tr \r\n \100\100'
7751 ;;
7752 esac
7753 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7754 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7755 ])# _LT_CHECK_SHELL_FEATURES
7756
7757
7758 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7759 # ------------------------------------------------------
7760 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7761 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7762 m4_defun([_LT_PROG_FUNCTION_REPLACE],
7763 [dnl {
7764 sed -e '/^$1 ()$/,/^} # $1 /c\
7765 $1 ()\
7766 {\
7767 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7768 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7769 && mv -f "$cfgfile.tmp" "$cfgfile" \
7770 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7771 test 0 -eq $? || _lt_function_replace_fail=:
7772 ])
7773
7774
7775 # _LT_PROG_REPLACE_SHELLFNS
7776 # -------------------------
7777 # Replace existing portable implementations of several shell functions with
7778 # equivalent extended shell implementations where those features are available..
7779 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7780 [if test x"$xsi_shell" = xyes; then
7781 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7782 case ${1} in
7783 */*) func_dirname_result="${1%/*}${2}" ;;
7784 * ) func_dirname_result="${3}" ;;
7785 esac])
7786
7787 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7788 func_basename_result="${1##*/}"])
7789
7790 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7791 case ${1} in
7792 */*) func_dirname_result="${1%/*}${2}" ;;
7793 * ) func_dirname_result="${3}" ;;
7794 esac
7795 func_basename_result="${1##*/}"])
7796
7797 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7798 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7799 # positional parameters, so assign one to ordinary parameter first.
7800 func_stripname_result=${3}
7801 func_stripname_result=${func_stripname_result#"${1}"}
7802 func_stripname_result=${func_stripname_result%"${2}"}])
7803
7804 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7805 func_split_long_opt_name=${1%%=*}
7806 func_split_long_opt_arg=${1#*=}])
7807
7808 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7809 func_split_short_opt_arg=${1#??}
7810 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7811
7812 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7813 case ${1} in
7814 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7815 *) func_lo2o_result=${1} ;;
7816 esac])
7817
7818 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7819
7820 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7821
7822 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7823 fi
7824
7825 if test x"$lt_shell_append" = xyes; then
7826 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7827
7828 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7829 func_quote_for_eval "${2}"
7830 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7831 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7832
7833 # Save a `func_append' function call where possible by direct use of '+='
7834 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7835 && mv -f "$cfgfile.tmp" "$cfgfile" \
7836 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7837 test 0 -eq $? || _lt_function_replace_fail=:
7838 else
7839 # Save a `func_append' function call even when '+=' is not available
7840 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7841 && mv -f "$cfgfile.tmp" "$cfgfile" \
7842 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7843 test 0 -eq $? || _lt_function_replace_fail=:
7844 fi
7845
7846 if test x"$_lt_function_replace_fail" = x":"; then
7847 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7848 fi
7849 ])
7850
7851 # _LT_PATH_CONVERSION_FUNCTIONS
7852 # -----------------------------
7853 # Determine which file name conversion functions should be used by
7854 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
7855 # for certain cross-compile configurations and native mingw.
7856 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7857 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7858 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7859 AC_MSG_CHECKING([how to convert $build file names to $host format])
7860 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
7861 [case $host in
7862 *-*-mingw* )
7863 case $build in
7864 *-*-mingw* ) # actually msys
7865 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7866 ;;
7867 *-*-cygwin* )
7868 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7869 ;;
7870 * ) # otherwise, assume *nix
7871 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7872 ;;
7873 esac
7874 ;;
7875 *-*-cygwin* )
7876 case $build in
7877 *-*-mingw* ) # actually msys
7878 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7879 ;;
7880 *-*-cygwin* )
7881 lt_cv_to_host_file_cmd=func_convert_file_noop
7882 ;;
7883 * ) # otherwise, assume *nix
7884 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7885 ;;
7886 esac
7887 ;;
7888 * ) # unhandled hosts (and "normal" native builds)
7889 lt_cv_to_host_file_cmd=func_convert_file_noop
7890 ;;
7891 esac
7892 ])
7893 to_host_file_cmd=$lt_cv_to_host_file_cmd
7894 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7895 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7896 [0], [convert $build file names to $host format])dnl
7897
7898 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
7899 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7900 [#assume ordinary cross tools, or native build.
7901 lt_cv_to_tool_file_cmd=func_convert_file_noop
7902 case $host in
7903 *-*-mingw* )
7904 case $build in
7905 *-*-mingw* ) # actually msys
7906 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7907 ;;
7908 esac
7909 ;;
7910 esac
7911 ])
7912 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7913 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7914 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7915 [0], [convert $build files to toolchain format])dnl
7916 ])# _LT_PATH_CONVERSION_FUNCTIONS
7917
7918 # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
7919 #
7920 # Copyright (C) 1999-2006, 2007, 2008 Free Software Foundation, Inc.
7921 # Written by Thomas Tanner, 1999
7922 #
7923 # This file is free software; the Free Software Foundation gives
7924 # unlimited permission to copy and/or distribute it, with or without
7925 # modifications, as long as this notice is preserved.
7926
7927 # serial 18 LTDL_INIT
7928
7929 # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
7930 # ------------------------------------------
7931 # DIRECTORY contains the libltdl sources. It is okay to call this
7932 # function multiple times, as long as the same DIRECTORY is always given.
7933 AC_DEFUN([LT_CONFIG_LTDL_DIR],
7934 [AC_BEFORE([$0], [LTDL_INIT])
7935 _$0($*)
7936 ])# LT_CONFIG_LTDL_DIR
7937
7938 # We break this out into a separate macro, so that we can call it safely
7939 # internally without being caught accidentally by the sed scan in libtoolize.
7940 m4_defun([_LT_CONFIG_LTDL_DIR],
7941 [dnl remove trailing slashes
7942 m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
7943 m4_case(_LTDL_DIR,
7944 [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
7945 m4_if(_ARG_DIR, [.],
7946 [],
7947 [m4_define([_LTDL_DIR], _ARG_DIR)
7948 _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
7949 [m4_if(_ARG_DIR, _LTDL_DIR,
7950 [],
7951 [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
7952 m4_popdef([_ARG_DIR])
7953 ])# _LT_CONFIG_LTDL_DIR
7954
7955 # Initialise:
7956 m4_define([_LTDL_DIR], [])
7957
7958
7959 # _LT_BUILD_PREFIX
7960 # ----------------
7961 # If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
7962 # to `${top_builddir}/'.
7963 m4_define([_LT_BUILD_PREFIX],
7964 [m4_ifdef([AC_AUTOCONF_VERSION],
7965 [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
7966 [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
7967 [${top_build_prefix}],
7968 [${top_builddir}/])],
7969 [${top_build_prefix}])],
7970 [${top_builddir}/])[]dnl
7971 ])
7972
7973
7974 # LTDL_CONVENIENCE
7975 # ----------------
7976 # sets LIBLTDL to the link flags for the libltdl convenience library and
7977 # LTDLINCL to the include flags for the libltdl header and adds
7978 # --enable-ltdl-convenience to the configure arguments. Note that
7979 # AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
7980 # '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
7981 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
7982 # quotes!). If your package is not flat and you're not using automake,
7983 # define top_build_prefix, top_builddir, and top_srcdir appropriately
7984 # in your Makefiles.
7985 AC_DEFUN([LTDL_CONVENIENCE],
7986 [AC_BEFORE([$0], [LTDL_INIT])dnl
7987 dnl Although the argument is deprecated and no longer documented,
7988 dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
7989 dnl here make sure it is the same as any other declaration of libltdl's
7990 dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
7991 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
7992 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
7993 _$0()
7994 ])# LTDL_CONVENIENCE
7995
7996 # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
7997 # now we have LT_CONFIG_LTDL_DIR:
7998 AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
7999 [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8000 _LTDL_CONVENIENCE])
8001
8002 dnl aclocal-1.4 backwards compatibility:
8003 dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
8004
8005
8006 # _LTDL_CONVENIENCE
8007 # -----------------
8008 # Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
8009 m4_defun([_LTDL_CONVENIENCE],
8010 [case $enable_ltdl_convenience in
8011 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8012 "") enable_ltdl_convenience=yes
8013 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8014 esac
8015 LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
8016 LTDLDEPS=$LIBLTDL
8017 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8018
8019 AC_SUBST([LIBLTDL])
8020 AC_SUBST([LTDLDEPS])
8021 AC_SUBST([LTDLINCL])
8022
8023 # For backwards non-gettext consistent compatibility...
8024 INCLTDL="$LTDLINCL"
8025 AC_SUBST([INCLTDL])
8026 ])# _LTDL_CONVENIENCE
8027
8028
8029 # LTDL_INSTALLABLE
8030 # ----------------
8031 # sets LIBLTDL to the link flags for the libltdl installable library
8032 # and LTDLINCL to the include flags for the libltdl header and adds
8033 # --enable-ltdl-install to the configure arguments. Note that
8034 # AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
8035 # is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
8036 # available, otherwise with '${top_builddir}/', and LTDLINCL will be
8037 # prefixed with '${top_srcdir}/' (note the single quotes!). If your
8038 # package is not flat and you're not using automake, define top_build_prefix,
8039 # top_builddir, and top_srcdir appropriately in your Makefiles.
8040 # In the future, this macro may have to be called after LT_INIT.
8041 AC_DEFUN([LTDL_INSTALLABLE],
8042 [AC_BEFORE([$0], [LTDL_INIT])dnl
8043 dnl Although the argument is deprecated and no longer documented,
8044 dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
8045 dnl here make sure it is the same as any other declaration of libltdl's
8046 dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
8047 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8048 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8049 _$0()
8050 ])# LTDL_INSTALLABLE
8051
8052 # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
8053 # now we have LT_CONFIG_LTDL_DIR:
8054 AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
8055 [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8056 _LTDL_INSTALLABLE])
8057
8058 dnl aclocal-1.4 backwards compatibility:
8059 dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
8060
8061
8062 # _LTDL_INSTALLABLE
8063 # -----------------
8064 # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
8065 m4_defun([_LTDL_INSTALLABLE],
8066 [if test -f $prefix/lib/libltdl.la; then
8067 lt_save_LDFLAGS="$LDFLAGS"
8068 LDFLAGS="-L$prefix/lib $LDFLAGS"
8069 AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
8070 LDFLAGS="$lt_save_LDFLAGS"
8071 if test x"${lt_lib_ltdl-no}" = xyes; then
8072 if test x"$enable_ltdl_install" != xyes; then
8073 # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
8074 AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
8075 enable_ltdl_install=no
8076 fi
8077 elif test x"$enable_ltdl_install" = xno; then
8078 AC_MSG_WARN([libltdl not installed, but installation disabled])
8079 fi
8080 fi
8081
8082 # If configure.ac declared an installable ltdl, and the user didn't override
8083 # with --disable-ltdl-install, we will install the shipped libltdl.
8084 case $enable_ltdl_install in
8085 no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8086 LIBLTDL="-lltdl"
8087 LTDLDEPS=
8088 LTDLINCL=
8089 ;;
8090 *) enable_ltdl_install=yes
8091 ac_configure_args="$ac_configure_args --enable-ltdl-install"
8092 LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
8093 LTDLDEPS=$LIBLTDL
8094 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8095 ;;
8096 esac
8097
8098 AC_SUBST([LIBLTDL])
8099 AC_SUBST([LTDLDEPS])
8100 AC_SUBST([LTDLINCL])
8101
8102 # For backwards non-gettext consistent compatibility...
8103 INCLTDL="$LTDLINCL"
8104 AC_SUBST([INCLTDL])
8105 ])# LTDL_INSTALLABLE
8106
8107
8108 # _LTDL_MODE_DISPATCH
8109 # -------------------
8110 m4_define([_LTDL_MODE_DISPATCH],
8111 [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
8112 m4_if(_LTDL_DIR, [],
8113 [],
8114 dnl if _LTDL_MODE was not set already, the default value is `subproject':
8115 [m4_case(m4_default(_LTDL_MODE, [subproject]),
8116 [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
8117 _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
8118 [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
8119 [recursive], [],
8120 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
8121 dnl Be careful not to expand twice:
8122 m4_define([$0], [])
8123 ])# _LTDL_MODE_DISPATCH
8124
8125
8126 # _LT_LIBOBJ(MODULE_NAME)
8127 # -----------------------
8128 # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
8129 # of into LIBOBJS.
8130 AC_DEFUN([_LT_LIBOBJ], [
8131 m4_pattern_allow([^_LT_LIBOBJS$])
8132 _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
8133 ])# _LT_LIBOBJS
8134
8135
8136 # LTDL_INIT([OPTIONS])
8137 # --------------------
8138 # Clients of libltdl can use this macro to allow the installer to
8139 # choose between a shipped copy of the ltdl sources or a preinstalled
8140 # version of the library. If the shipped ltdl sources are not in a
8141 # subdirectory named libltdl, the directory name must be given by
8142 # LT_CONFIG_LTDL_DIR.
8143 AC_DEFUN([LTDL_INIT],
8144 [dnl Parse OPTIONS
8145 _LT_SET_OPTIONS([$0], [$1])
8146
8147 dnl We need to keep our own list of libobjs separate from our parent project,
8148 dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
8149 dnl we look for our own LIBOBJs.
8150 m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
8151 m4_pushdef([AC_LIBSOURCES])
8152
8153 dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
8154 m4_if(_LTDL_MODE, [],
8155 [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
8156 m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
8157 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
8158
8159 AC_ARG_WITH([included_ltdl],
8160 [AS_HELP_STRING([--with-included-ltdl],
8161 [use the GNU ltdl sources included here])])
8162
8163 if test "x$with_included_ltdl" != xyes; then
8164 # We are not being forced to use the included libltdl sources, so
8165 # decide whether there is a useful installed version we can use.
8166 AC_CHECK_HEADER([ltdl.h],
8167 [AC_CHECK_DECL([lt_dlinterface_register],
8168 [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
8169 [with_included_ltdl=no],
8170 [with_included_ltdl=yes])],
8171 [with_included_ltdl=yes],
8172 [AC_INCLUDES_DEFAULT
8173 #include <ltdl.h>])],
8174 [with_included_ltdl=yes],
8175 [AC_INCLUDES_DEFAULT]
8176 )
8177 fi
8178
8179 dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
8180 dnl was called yet, then for old times' sake, we assume libltdl is in an
8181 dnl eponymous directory:
8182 AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
8183
8184 AC_ARG_WITH([ltdl_include],
8185 [AS_HELP_STRING([--with-ltdl-include=DIR],
8186 [use the ltdl headers installed in DIR])])
8187
8188 if test -n "$with_ltdl_include"; then
8189 if test -f "$with_ltdl_include/ltdl.h"; then :
8190 else
8191 AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
8192 fi
8193 else
8194 with_ltdl_include=no
8195 fi
8196
8197 AC_ARG_WITH([ltdl_lib],
8198 [AS_HELP_STRING([--with-ltdl-lib=DIR],
8199 [use the libltdl.la installed in DIR])])
8200
8201 if test -n "$with_ltdl_lib"; then
8202 if test -f "$with_ltdl_lib/libltdl.la"; then :
8203 else
8204 AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
8205 fi
8206 else
8207 with_ltdl_lib=no
8208 fi
8209
8210 case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
8211 ,yes,no,no,)
8212 m4_case(m4_default(_LTDL_TYPE, [convenience]),
8213 [convenience], [_LTDL_CONVENIENCE],
8214 [installable], [_LTDL_INSTALLABLE],
8215 [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
8216 ;;
8217 ,no,no,no,)
8218 # If the included ltdl is not to be used, then use the
8219 # preinstalled libltdl we found.
8220 AC_DEFINE([HAVE_LTDL], [1],
8221 [Define this if a modern libltdl is already installed])
8222 LIBLTDL=-lltdl
8223 LTDLDEPS=
8224 LTDLINCL=
8225 ;;
8226 ,no*,no,*)
8227 AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
8228 ;;
8229 *) with_included_ltdl=no
8230 LIBLTDL="-L$with_ltdl_lib -lltdl"
8231 LTDLDEPS=
8232 LTDLINCL="-I$with_ltdl_include"
8233 ;;
8234 esac
8235 INCLTDL="$LTDLINCL"
8236
8237 # Report our decision...
8238 AC_MSG_CHECKING([where to find libltdl headers])
8239 AC_MSG_RESULT([$LTDLINCL])
8240 AC_MSG_CHECKING([where to find libltdl library])
8241 AC_MSG_RESULT([$LIBLTDL])
8242
8243 _LTDL_SETUP
8244
8245 dnl restore autoconf definition.
8246 m4_popdef([AC_LIBOBJ])
8247 m4_popdef([AC_LIBSOURCES])
8248
8249 AC_CONFIG_COMMANDS_PRE([
8250 _ltdl_libobjs=
8251 _ltdl_ltlibobjs=
8252 if test -n "$_LT_LIBOBJS"; then
8253 # Remove the extension.
8254 _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
8255 for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
8256 _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
8257 _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
8258 done
8259 fi
8260 AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
8261 AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
8262 ])
8263
8264 # Only expand once:
8265 m4_define([LTDL_INIT])
8266 ])# LTDL_INIT
8267
8268 # Old names:
8269 AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
8270 AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
8271 AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
8272 dnl aclocal-1.4 backwards compatibility:
8273 dnl AC_DEFUN([AC_LIB_LTDL], [])
8274 dnl AC_DEFUN([AC_WITH_LTDL], [])
8275 dnl AC_DEFUN([LT_WITH_LTDL], [])
8276
8277
8278 # _LTDL_SETUP
8279 # -----------
8280 # Perform all the checks necessary for compilation of the ltdl objects
8281 # -- including compiler checks and header checks. This is a public
8282 # interface mainly for the benefit of libltdl's own configure.ac, most
8283 # other users should call LTDL_INIT instead.
8284 AC_DEFUN([_LTDL_SETUP],
8285 [AC_REQUIRE([AC_PROG_CC])dnl
8286 AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
8287 AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
8288 AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
8289 AC_REQUIRE([LT_LIB_DLLOAD])dnl
8290 AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8291 AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
8292 AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
8293 AC_REQUIRE([gl_FUNC_ARGZ])dnl
8294
8295 m4_require([_LT_CHECK_OBJDIR])dnl
8296 m4_require([_LT_HEADER_DLFCN])dnl
8297 m4_require([_LT_CHECK_DLPREOPEN])dnl
8298 m4_require([_LT_DECL_SED])dnl
8299
8300 dnl Don't require this, or it will be expanded earlier than the code
8301 dnl that sets the variables it relies on:
8302 _LT_ENABLE_INSTALL
8303
8304 dnl _LTDL_MODE specific code must be called at least once:
8305 _LTDL_MODE_DISPATCH
8306
8307 # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
8308 # the user used. This is so that ltdl.h can pick up the parent projects
8309 # config.h file, The first file in AC_CONFIG_HEADERS must contain the
8310 # definitions required by ltdl.c.
8311 # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
8312 AC_CONFIG_COMMANDS_PRE([dnl
8313 m4_pattern_allow([^LT_CONFIG_H$])dnl
8314 m4_ifset([AH_HEADER],
8315 [LT_CONFIG_H=AH_HEADER],
8316 [m4_ifset([AC_LIST_HEADERS],
8317 [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
8318 [])])])
8319 AC_SUBST([LT_CONFIG_H])
8320
8321 AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
8322 [], [], [AC_INCLUDES_DEFAULT])
8323
8324 AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
8325 AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
8326
8327 m4_pattern_allow([LT_LIBEXT])dnl
8328 AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
8329
8330 name=
8331 eval "lt_libprefix=\"$libname_spec\""
8332 m4_pattern_allow([LT_LIBPREFIX])dnl
8333 AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
8334
8335 name=ltdl
8336 eval "LTDLOPEN=\"$libname_spec\""
8337 AC_SUBST([LTDLOPEN])
8338 ])# _LTDL_SETUP
8339
8340
8341 # _LT_ENABLE_INSTALL
8342 # ------------------
8343 m4_define([_LT_ENABLE_INSTALL],
8344 [AC_ARG_ENABLE([ltdl-install],
8345 [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
8346
8347 case ,${enable_ltdl_install},${enable_ltdl_convenience} in
8348 *yes*) ;;
8349 *) enable_ltdl_convenience=yes ;;
8350 esac
8351
8352 m4_ifdef([AM_CONDITIONAL],
8353 [AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
8354 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
8355 ])# _LT_ENABLE_INSTALL
8356
8357
8358 # LT_SYS_DLOPEN_DEPLIBS
8359 # ---------------------
8360 AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
8361 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8362 AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
8363 [lt_cv_sys_dlopen_deplibs],
8364 [# PORTME does your system automatically load deplibs for dlopen?
8365 # or its logical equivalent (e.g. shl_load for HP-UX < 11)
8366 # For now, we just catch OSes we know something about -- in the
8367 # future, we'll try test this programmatically.
8368 lt_cv_sys_dlopen_deplibs=unknown
8369 case $host_os in
8370 aix3*|aix4.1.*|aix4.2.*)
8371 # Unknown whether this is true for these versions of AIX, but
8372 # we want this `case' here to explicitly catch those versions.
8373 lt_cv_sys_dlopen_deplibs=unknown
8374 ;;
8375 aix[[4-9]]*)
8376 lt_cv_sys_dlopen_deplibs=yes
8377 ;;
8378 amigaos*)
8379 case $host_cpu in
8380 powerpc)
8381 lt_cv_sys_dlopen_deplibs=no
8382 ;;
8383 esac
8384 ;;
8385 darwin*)
8386 # Assuming the user has installed a libdl from somewhere, this is true
8387 # If you are looking for one http://www.opendarwin.org/projects/dlcompat
8388 lt_cv_sys_dlopen_deplibs=yes
8389 ;;
8390 freebsd* | dragonfly*)
8391 lt_cv_sys_dlopen_deplibs=yes
8392 ;;
8393 gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
8394 # GNU and its variants, using gnu ld.so (Glibc)
8395 lt_cv_sys_dlopen_deplibs=yes
8396 ;;
8397 hpux10*|hpux11*)
8398 lt_cv_sys_dlopen_deplibs=yes
8399 ;;
8400 interix*)
8401 lt_cv_sys_dlopen_deplibs=yes
8402 ;;
8403 irix[[12345]]*|irix6.[[01]]*)
8404 # Catch all versions of IRIX before 6.2, and indicate that we don't
8405 # know how it worked for any of those versions.
8406 lt_cv_sys_dlopen_deplibs=unknown
8407 ;;
8408 irix*)
8409 # The case above catches anything before 6.2, and it's known that
8410 # at 6.2 and later dlopen does load deplibs.
8411 lt_cv_sys_dlopen_deplibs=yes
8412 ;;
8413 netbsd*)
8414 lt_cv_sys_dlopen_deplibs=yes
8415 ;;
8416 openbsd*)
8417 lt_cv_sys_dlopen_deplibs=yes
8418 ;;
8419 osf[[1234]]*)
8420 # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
8421 # it did *not* use an RPATH in a shared library to find objects the
8422 # library depends on, so we explicitly say `no'.
8423 lt_cv_sys_dlopen_deplibs=no
8424 ;;
8425 osf5.0|osf5.0a|osf5.1)
8426 # dlopen *does* load deplibs and with the right loader patch applied
8427 # it even uses RPATH in a shared library to search for shared objects
8428 # that the library depends on, but there's no easy way to know if that
8429 # patch is installed. Since this is the case, all we can really
8430 # say is unknown -- it depends on the patch being installed. If
8431 # it is, this changes to `yes'. Without it, it would be `no'.
8432 lt_cv_sys_dlopen_deplibs=unknown
8433 ;;
8434 osf*)
8435 # the two cases above should catch all versions of osf <= 5.1. Read
8436 # the comments above for what we know about them.
8437 # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
8438 # is used to find them so we can finally say `yes'.
8439 lt_cv_sys_dlopen_deplibs=yes
8440 ;;
8441 qnx*)
8442 lt_cv_sys_dlopen_deplibs=yes
8443 ;;
8444 solaris*)
8445 lt_cv_sys_dlopen_deplibs=yes
8446 ;;
8447 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8448 libltdl_cv_sys_dlopen_deplibs=yes
8449 ;;
8450 esac
8451 ])
8452 if test "$lt_cv_sys_dlopen_deplibs" != yes; then
8453 AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
8454 [Define if the OS needs help to load dependent libraries for dlopen().])
8455 fi
8456 ])# LT_SYS_DLOPEN_DEPLIBS
8457
8458 # Old name:
8459 AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
8460 dnl aclocal-1.4 backwards compatibility:
8461 dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
8462
8463
8464 # LT_SYS_MODULE_EXT
8465 # -----------------
8466 AC_DEFUN([LT_SYS_MODULE_EXT],
8467 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8468 AC_CACHE_CHECK([which extension is used for runtime loadable modules],
8469 [libltdl_cv_shlibext],
8470 [
8471 module=yes
8472 eval libltdl_cv_shlibext=$shrext_cmds
8473 ])
8474 if test -n "$libltdl_cv_shlibext"; then
8475 m4_pattern_allow([LT_MODULE_EXT])dnl
8476 AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
8477 [Define to the extension used for runtime loadable modules, say, ".so".])
8478 fi
8479 ])# LT_SYS_MODULE_EXT
8480
8481 # Old name:
8482 AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
8483 dnl aclocal-1.4 backwards compatibility:
8484 dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
8485
8486
8487 # LT_SYS_MODULE_PATH
8488 # ------------------
8489 AC_DEFUN([LT_SYS_MODULE_PATH],
8490 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8491 AC_CACHE_CHECK([which variable specifies run-time module search path],
8492 [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
8493 if test -n "$lt_cv_module_path_var"; then
8494 m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
8495 AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
8496 [Define to the name of the environment variable that determines the run-time module search path.])
8497 fi
8498 ])# LT_SYS_MODULE_PATH
8499
8500 # Old name:
8501 AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
8502 dnl aclocal-1.4 backwards compatibility:
8503 dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
8504
8505
8506 # LT_SYS_DLSEARCH_PATH
8507 # --------------------
8508 AC_DEFUN([LT_SYS_DLSEARCH_PATH],
8509 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8510 AC_CACHE_CHECK([for the default library search path],
8511 [lt_cv_sys_dlsearch_path],
8512 [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
8513 if test -n "$lt_cv_sys_dlsearch_path"; then
8514 sys_dlsearch_path=
8515 for dir in $lt_cv_sys_dlsearch_path; do
8516 if test -z "$sys_dlsearch_path"; then
8517 sys_dlsearch_path="$dir"
8518 else
8519 sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
8520 fi
8521 done
8522 m4_pattern_allow([LT_DLSEARCH_PATH])dnl
8523 AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
8524 [Define to the system default library search path.])
8525 fi
8526 ])# LT_SYS_DLSEARCH_PATH
8527
8528 # Old name:
8529 AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
8530 dnl aclocal-1.4 backwards compatibility:
8531 dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
8532
8533
8534 # _LT_CHECK_DLPREOPEN
8535 # -------------------
8536 m4_defun([_LT_CHECK_DLPREOPEN],
8537 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8538 AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
8539 [libltdl_cv_preloaded_symbols],
8540 [if test -n "$lt_cv_sys_global_symbol_pipe"; then
8541 libltdl_cv_preloaded_symbols=yes
8542 else
8543 libltdl_cv_preloaded_symbols=no
8544 fi
8545 ])
8546 if test x"$libltdl_cv_preloaded_symbols" = xyes; then
8547 AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
8548 [Define if libtool can extract symbol lists from object files.])
8549 fi
8550 ])# _LT_CHECK_DLPREOPEN
8551
8552
8553 # LT_LIB_DLLOAD
8554 # -------------
8555 AC_DEFUN([LT_LIB_DLLOAD],
8556 [m4_pattern_allow([^LT_DLLOADERS$])
8557 LT_DLLOADERS=
8558 AC_SUBST([LT_DLLOADERS])
8559
8560 AC_LANG_PUSH([C])
8561
8562 LIBADD_DLOPEN=
8563 AC_SEARCH_LIBS([dlopen], [dl],
8564 [AC_DEFINE([HAVE_LIBDL], [1],
8565 [Define if you have the libdl library or equivalent.])
8566 if test "$ac_cv_search_dlopen" != "none required" ; then
8567 LIBADD_DLOPEN="-ldl"
8568 fi
8569 libltdl_cv_lib_dl_dlopen="yes"
8570 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8571 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
8572 # include <dlfcn.h>
8573 #endif
8574 ]], [[dlopen(0, 0);]])],
8575 [AC_DEFINE([HAVE_LIBDL], [1],
8576 [Define if you have the libdl library or equivalent.])
8577 libltdl_cv_func_dlopen="yes"
8578 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8579 [AC_CHECK_LIB([svld], [dlopen],
8580 [AC_DEFINE([HAVE_LIBDL], [1],
8581 [Define if you have the libdl library or equivalent.])
8582 LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
8583 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
8584 if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
8585 then
8586 lt_save_LIBS="$LIBS"
8587 LIBS="$LIBS $LIBADD_DLOPEN"
8588 AC_CHECK_FUNCS([dlerror])
8589 LIBS="$lt_save_LIBS"
8590 fi
8591 AC_SUBST([LIBADD_DLOPEN])
8592
8593 LIBADD_SHL_LOAD=
8594 AC_CHECK_FUNC([shl_load],
8595 [AC_DEFINE([HAVE_SHL_LOAD], [1],
8596 [Define if you have the shl_load function.])
8597 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
8598 [AC_CHECK_LIB([dld], [shl_load],
8599 [AC_DEFINE([HAVE_SHL_LOAD], [1],
8600 [Define if you have the shl_load function.])
8601 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
8602 LIBADD_SHL_LOAD="-ldld"])])
8603 AC_SUBST([LIBADD_SHL_LOAD])
8604
8605 case $host_os in
8606 darwin[[1567]].*)
8607 # We only want this for pre-Mac OS X 10.4.
8608 AC_CHECK_FUNC([_dyld_func_lookup],
8609 [AC_DEFINE([HAVE_DYLD], [1],
8610 [Define if you have the _dyld_func_lookup function.])
8611 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
8612 ;;
8613 beos*)
8614 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
8615 ;;
8616 cygwin* | mingw* | os2* | pw32*)
8617 AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
8618 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
8619 ;;
8620 esac
8621
8622 AC_CHECK_LIB([dld], [dld_link],
8623 [AC_DEFINE([HAVE_DLD], [1],
8624 [Define if you have the GNU dld library.])
8625 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
8626 AC_SUBST([LIBADD_DLD_LINK])
8627
8628 m4_pattern_allow([^LT_DLPREOPEN$])
8629 LT_DLPREOPEN=
8630 if test -n "$LT_DLLOADERS"
8631 then
8632 for lt_loader in $LT_DLLOADERS; do
8633 LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
8634 done
8635 AC_DEFINE([HAVE_LIBDLLOADER], [1],
8636 [Define if libdlloader will be built on this platform])
8637 fi
8638 AC_SUBST([LT_DLPREOPEN])
8639
8640 dnl This isn't used anymore, but set it for backwards compatibility
8641 LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
8642 AC_SUBST([LIBADD_DL])
8643
8644 AC_LANG_POP
8645 ])# LT_LIB_DLLOAD
8646
8647 # Old name:
8648 AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
8649 dnl aclocal-1.4 backwards compatibility:
8650 dnl AC_DEFUN([AC_LTDL_DLLIB], [])
8651
8652
8653 # LT_SYS_SYMBOL_USCORE
8654 # --------------------
8655 # does the compiler prefix global symbols with an underscore?
8656 AC_DEFUN([LT_SYS_SYMBOL_USCORE],
8657 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8658 AC_CACHE_CHECK([for _ prefix in compiled symbols],
8659 [lt_cv_sys_symbol_underscore],
8660 [lt_cv_sys_symbol_underscore=no
8661 cat > conftest.$ac_ext <<_LT_EOF
8662 void nm_test_func(){}
8663 int main(){nm_test_func;return 0;}
8664 _LT_EOF
8665 if AC_TRY_EVAL(ac_compile); then
8666 # Now try to grab the symbols.
8667 ac_nlist=conftest.nm
8668 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
8669 # See whether the symbols have a leading underscore.
8670 if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
8671 lt_cv_sys_symbol_underscore=yes
8672 else
8673 if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
8674 :
8675 else
8676 echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
8677 fi
8678 fi
8679 else
8680 echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
8681 fi
8682 else
8683 echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
8684 cat conftest.c >&AS_MESSAGE_LOG_FD
8685 fi
8686 rm -rf conftest*
8687 ])
8688 sys_symbol_underscore=$lt_cv_sys_symbol_underscore
8689 AC_SUBST([sys_symbol_underscore])
8690 ])# LT_SYS_SYMBOL_USCORE
8691
8692 # Old name:
8693 AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
8694 dnl aclocal-1.4 backwards compatibility:
8695 dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
8696
8697
8698 # LT_FUNC_DLSYM_USCORE
8699 # --------------------
8700 AC_DEFUN([LT_FUNC_DLSYM_USCORE],
8701 [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8702 if test x"$lt_cv_sys_symbol_underscore" = xyes; then
8703 if test x"$libltdl_cv_func_dlopen" = xyes ||
8704 test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
8705 AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
8706 [libltdl_cv_need_uscore],
8707 [libltdl_cv_need_uscore=unknown
8708 save_LIBS="$LIBS"
8709 LIBS="$LIBS $LIBADD_DLOPEN"
8710 _LT_TRY_DLOPEN_SELF(
8711 [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
8712 [], [libltdl_cv_need_uscore=cross])
8713 LIBS="$save_LIBS"
8714 ])
8715 fi
8716 fi
8717
8718 if test x"$libltdl_cv_need_uscore" = xyes; then
8719 AC_DEFINE([NEED_USCORE], [1],
8720 [Define if dlsym() requires a leading underscore in symbol names.])
8721 fi
8722 ])# LT_FUNC_DLSYM_USCORE
8723
8724 # Old name:
8725 AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
8726 dnl aclocal-1.4 backwards compatibility:
8727 dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
8728
8729 # Helper functions for option handling. -*- Autoconf -*-
8730 #
8731 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8732 # Inc.
8733 # Written by Gary V. Vaughan, 2004
8734 #
8735 # This file is free software; the Free Software Foundation gives
8736 # unlimited permission to copy and/or distribute it, with or without
8737 # modifications, as long as this notice is preserved.
8738
8739 # serial 7 ltoptions.m4
8740
8741 # This is to help aclocal find these macros, as it can't see m4_define.
8742 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8743
8744
8745 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8746 # ------------------------------------------
8747 m4_define([_LT_MANGLE_OPTION],
8748 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8749
8750
8751 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8752 # ---------------------------------------
8753 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8754 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
8755 # saved as a flag.
8756 m4_define([_LT_SET_OPTION],
8757 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8758 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8759 _LT_MANGLE_DEFUN([$1], [$2]),
8760 [m4_warning([Unknown $1 option `$2'])])[]dnl
8761 ])
8762
8763
8764 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8765 # ------------------------------------------------------------
8766 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8767 m4_define([_LT_IF_OPTION],
8768 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8769
8770
8771 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8772 # -------------------------------------------------------
8773 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8774 # are set.
8775 m4_define([_LT_UNLESS_OPTIONS],
8776 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8777 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8778 [m4_define([$0_found])])])[]dnl
8779 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8780 ])[]dnl
8781 ])
8782
8783
8784 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8785 # ----------------------------------------
8786 # OPTION-LIST is a space-separated list of Libtool options associated
8787 # with MACRO-NAME. If any OPTION has a matching handler declared with
8788 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8789 # the unknown option and exit.
8790 m4_defun([_LT_SET_OPTIONS],
8791 [# Set options
8792 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8793 [_LT_SET_OPTION([$1], _LT_Option)])
8794
8795 m4_if([$1],[LT_INIT],[
8796 dnl
8797 dnl Simply set some default values (i.e off) if boolean options were not
8798 dnl specified:
8799 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8800 ])
8801 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8802 ])
8803 dnl
8804 dnl If no reference was made to various pairs of opposing options, then
8805 dnl we run the default mode handler for the pair. For example, if neither
8806 dnl `shared' nor `disable-shared' was passed, we enable building of shared
8807 dnl archives by default:
8808 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8809 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8810 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8811 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8812 [_LT_ENABLE_FAST_INSTALL])
8813 ])
8814 ])# _LT_SET_OPTIONS
8815
8816
8817
8818 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8819 # -----------------------------------------
8820 m4_define([_LT_MANGLE_DEFUN],
8821 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8822
8823
8824 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8825 # -----------------------------------------------
8826 m4_define([LT_OPTION_DEFINE],
8827 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8828 ])# LT_OPTION_DEFINE
8829
8830
8831 # dlopen
8832 # ------
8833 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8834 ])
8835
8836 AU_DEFUN([AC_LIBTOOL_DLOPEN],
8837 [_LT_SET_OPTION([LT_INIT], [dlopen])
8838 AC_DIAGNOSE([obsolete],
8839 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8840 put the `dlopen' option into LT_INIT's first parameter.])
8841 ])
8842
8843 dnl aclocal-1.4 backwards compatibility:
8844 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8845
8846
8847 # win32-dll
8848 # ---------
8849 # Declare package support for building win32 dll's.
8850 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8851 [enable_win32_dll=yes
8852
8853 case $host in
8854 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8855 AC_CHECK_TOOL(AS, as, false)
8856 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8857 AC_CHECK_TOOL(OBJDUMP, objdump, false)
8858 ;;
8859 esac
8860
8861 test -z "$AS" && AS=as
8862 _LT_DECL([], [AS], [1], [Assembler program])dnl
8863
8864 test -z "$DLLTOOL" && DLLTOOL=dlltool
8865 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8866
8867 test -z "$OBJDUMP" && OBJDUMP=objdump
8868 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8869 ])# win32-dll
8870
8871 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8872 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8873 _LT_SET_OPTION([LT_INIT], [win32-dll])
8874 AC_DIAGNOSE([obsolete],
8875 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8876 put the `win32-dll' option into LT_INIT's first parameter.])
8877 ])
8878
8879 dnl aclocal-1.4 backwards compatibility:
8880 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8881
8882
8883 # _LT_ENABLE_SHARED([DEFAULT])
8884 # ----------------------------
8885 # implement the --enable-shared flag, and supports the `shared' and
8886 # `disable-shared' LT_INIT options.
8887 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8888 m4_define([_LT_ENABLE_SHARED],
8889 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8890 AC_ARG_ENABLE([shared],
8891 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8892 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8893 [p=${PACKAGE-default}
8894 case $enableval in
8895 yes) enable_shared=yes ;;
8896 no) enable_shared=no ;;
8897 *)
8898 enable_shared=no
8899 # Look at the argument we got. We use all the common list separators.
8900 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8901 for pkg in $enableval; do
8902 IFS="$lt_save_ifs"
8903 if test "X$pkg" = "X$p"; then
8904 enable_shared=yes
8905 fi
8906 done
8907 IFS="$lt_save_ifs"
8908 ;;
8909 esac],
8910 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8911
8912 _LT_DECL([build_libtool_libs], [enable_shared], [0],
8913 [Whether or not to build shared libraries])
8914 ])# _LT_ENABLE_SHARED
8915
8916 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8917 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8918
8919 # Old names:
8920 AC_DEFUN([AC_ENABLE_SHARED],
8921 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8922 ])
8923
8924 AC_DEFUN([AC_DISABLE_SHARED],
8925 [_LT_SET_OPTION([LT_INIT], [disable-shared])
8926 ])
8927
8928 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8929 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8930
8931 dnl aclocal-1.4 backwards compatibility:
8932 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8933 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8934
8935
8936
8937 # _LT_ENABLE_STATIC([DEFAULT])
8938 # ----------------------------
8939 # implement the --enable-static flag, and support the `static' and
8940 # `disable-static' LT_INIT options.
8941 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8942 m4_define([_LT_ENABLE_STATIC],
8943 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8944 AC_ARG_ENABLE([static],
8945 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8946 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8947 [p=${PACKAGE-default}
8948 case $enableval in
8949 yes) enable_static=yes ;;
8950 no) enable_static=no ;;
8951 *)
8952 enable_static=no
8953 # Look at the argument we got. We use all the common list separators.
8954 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8955 for pkg in $enableval; do
8956 IFS="$lt_save_ifs"
8957 if test "X$pkg" = "X$p"; then
8958 enable_static=yes
8959 fi
8960 done
8961 IFS="$lt_save_ifs"
8962 ;;
8963 esac],
8964 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8965
8966 _LT_DECL([build_old_libs], [enable_static], [0],
8967 [Whether or not to build static libraries])
8968 ])# _LT_ENABLE_STATIC
8969
8970 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8971 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8972
8973 # Old names:
8974 AC_DEFUN([AC_ENABLE_STATIC],
8975 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8976 ])
8977
8978 AC_DEFUN([AC_DISABLE_STATIC],
8979 [_LT_SET_OPTION([LT_INIT], [disable-static])
8980 ])
8981
8982 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8983 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8984
8985 dnl aclocal-1.4 backwards compatibility:
8986 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8987 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8988
8989
8990
8991 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
8992 # ----------------------------------
8993 # implement the --enable-fast-install flag, and support the `fast-install'
8994 # and `disable-fast-install' LT_INIT options.
8995 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8996 m4_define([_LT_ENABLE_FAST_INSTALL],
8997 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8998 AC_ARG_ENABLE([fast-install],
8999 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9000 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9001 [p=${PACKAGE-default}
9002 case $enableval in
9003 yes) enable_fast_install=yes ;;
9004 no) enable_fast_install=no ;;
9005 *)
9006 enable_fast_install=no
9007 # Look at the argument we got. We use all the common list separators.
9008 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9009 for pkg in $enableval; do
9010 IFS="$lt_save_ifs"
9011 if test "X$pkg" = "X$p"; then
9012 enable_fast_install=yes
9013 fi
9014 done
9015 IFS="$lt_save_ifs"
9016 ;;
9017 esac],
9018 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9019
9020 _LT_DECL([fast_install], [enable_fast_install], [0],
9021 [Whether or not to optimize for fast installation])dnl
9022 ])# _LT_ENABLE_FAST_INSTALL
9023
9024 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9025 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9026
9027 # Old names:
9028 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9029 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9030 AC_DIAGNOSE([obsolete],
9031 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9032 the `fast-install' option into LT_INIT's first parameter.])
9033 ])
9034
9035 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9036 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9037 AC_DIAGNOSE([obsolete],
9038 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9039 the `disable-fast-install' option into LT_INIT's first parameter.])
9040 ])
9041
9042 dnl aclocal-1.4 backwards compatibility:
9043 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9044 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9045
9046
9047 # _LT_WITH_PIC([MODE])
9048 # --------------------
9049 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9050 # LT_INIT options.
9051 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9052 m4_define([_LT_WITH_PIC],
9053 [AC_ARG_WITH([pic],
9054 [AS_HELP_STRING([--with-pic],
9055 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9056 [pic_mode="$withval"],
9057 [pic_mode=default])
9058
9059 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9060
9061 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9062 ])# _LT_WITH_PIC
9063
9064 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9065 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9066
9067 # Old name:
9068 AU_DEFUN([AC_LIBTOOL_PICMODE],
9069 [_LT_SET_OPTION([LT_INIT], [pic-only])
9070 AC_DIAGNOSE([obsolete],
9071 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9072 put the `pic-only' option into LT_INIT's first parameter.])
9073 ])
9074
9075 dnl aclocal-1.4 backwards compatibility:
9076 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9077
9078
9079 m4_define([_LTDL_MODE], [])
9080 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9081 [m4_define([_LTDL_MODE], [nonrecursive])])
9082 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9083 [m4_define([_LTDL_MODE], [recursive])])
9084 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9085 [m4_define([_LTDL_MODE], [subproject])])
9086
9087 m4_define([_LTDL_TYPE], [])
9088 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9089 [m4_define([_LTDL_TYPE], [installable])])
9090 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9091 [m4_define([_LTDL_TYPE], [convenience])])
9092
9093 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
9094 #
9095 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9096 # Written by Gary V. Vaughan, 2004
9097 #
9098 # This file is free software; the Free Software Foundation gives
9099 # unlimited permission to copy and/or distribute it, with or without
9100 # modifications, as long as this notice is preserved.
9101
9102 # serial 6 ltsugar.m4
9103
9104 # This is to help aclocal find these macros, as it can't see m4_define.
9105 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9106
9107
9108 # lt_join(SEP, ARG1, [ARG2...])
9109 # -----------------------------
9110 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9111 # associated separator.
9112 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9113 # versions in m4sugar had bugs.
9114 m4_define([lt_join],
9115 [m4_if([$#], [1], [],
9116 [$#], [2], [[$2]],
9117 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9118 m4_define([_lt_join],
9119 [m4_if([$#$2], [2], [],
9120 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9121
9122
9123 # lt_car(LIST)
9124 # lt_cdr(LIST)
9125 # ------------
9126 # Manipulate m4 lists.
9127 # These macros are necessary as long as will still need to support
9128 # Autoconf-2.59 which quotes differently.
9129 m4_define([lt_car], [[$1]])
9130 m4_define([lt_cdr],
9131 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9132 [$#], 1, [],
9133 [m4_dquote(m4_shift($@))])])
9134 m4_define([lt_unquote], $1)
9135
9136
9137 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9138 # ------------------------------------------
9139 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9140 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9141 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9142 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9143 # than defined and empty).
9144 #
9145 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9146 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9147 m4_define([lt_append],
9148 [m4_define([$1],
9149 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9150
9151
9152
9153 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9154 # ----------------------------------------------------------
9155 # Produce a SEP delimited list of all paired combinations of elements of
9156 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9157 # has the form PREFIXmINFIXSUFFIXn.
9158 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9159 m4_define([lt_combine],
9160 [m4_if(m4_eval([$# > 3]), [1],
9161 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9162 [[m4_foreach([_Lt_prefix], [$2],
9163 [m4_foreach([_Lt_suffix],
9164 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9165 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9166
9167
9168 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9169 # -----------------------------------------------------------------------
9170 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9171 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9172 m4_define([lt_if_append_uniq],
9173 [m4_ifdef([$1],
9174 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9175 [lt_append([$1], [$2], [$3])$4],
9176 [$5])],
9177 [lt_append([$1], [$2], [$3])$4])])
9178
9179
9180 # lt_dict_add(DICT, KEY, VALUE)
9181 # -----------------------------
9182 m4_define([lt_dict_add],
9183 [m4_define([$1($2)], [$3])])
9184
9185
9186 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9187 # --------------------------------------------
9188 m4_define([lt_dict_add_subkey],
9189 [m4_define([$1($2:$3)], [$4])])
9190
9191
9192 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9193 # ----------------------------------
9194 m4_define([lt_dict_fetch],
9195 [m4_ifval([$3],
9196 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9197 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9198
9199
9200 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9201 # -----------------------------------------------------------------
9202 m4_define([lt_if_dict_fetch],
9203 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9204 [$5],
9205 [$6])])
9206
9207
9208 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9209 # --------------------------------------------------------------
9210 m4_define([lt_dict_filter],
9211 [m4_if([$5], [], [],
9212 [lt_join(m4_quote(m4_default([$4], [[, ]])),
9213 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9214 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9215 ])
9216
9217 # ltversion.m4 -- version numbers -*- Autoconf -*-
9218 #
9219 # Copyright (C) 2004 Free Software Foundation, Inc.
9220 # Written by Scott James Remnant, 2004
9221 #
9222 # This file is free software; the Free Software Foundation gives
9223 # unlimited permission to copy and/or distribute it, with or without
9224 # modifications, as long as this notice is preserved.
9225
9226 # @configure_input@
9227
9228 # serial 3293 ltversion.m4
9229 # This file is part of GNU Libtool
9230
9231 m4_define([LT_PACKAGE_VERSION], [2.4])
9232 m4_define([LT_PACKAGE_REVISION], [1.3293])
9233
9234 AC_DEFUN([LTVERSION_VERSION],
9235 [macro_version='2.4'
9236 macro_revision='1.3293'
9237 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9238 _LT_DECL(, macro_revision, 0)
9239 ])
9240
9241 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9242 #
9243 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9244 # Written by Scott James Remnant, 2004.
9245 #
9246 # This file is free software; the Free Software Foundation gives
9247 # unlimited permission to copy and/or distribute it, with or without
9248 # modifications, as long as this notice is preserved.
9249
9250 # serial 5 lt~obsolete.m4
9251
9252 # These exist entirely to fool aclocal when bootstrapping libtool.
9253 #
9254 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9255 # which have later been changed to m4_define as they aren't part of the
9256 # exported API, or moved to Autoconf or Automake where they belong.
9257 #
9258 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
9259 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9260 # using a macro with the same name in our local m4/libtool.m4 it'll
9261 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9262 # and doesn't know about Autoconf macros at all.)
9263 #
9264 # So we provide this file, which has a silly filename so it's always
9265 # included after everything else. This provides aclocal with the
9266 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9267 # because those macros already exist, or will be overwritten later.
9268 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9269 #
9270 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9271 # Yes, that means every name once taken will need to remain here until
9272 # we give up compatibility with versions before 1.7, at which point
9273 # we need to keep only those names which we still refer to.
9274
9275 # This is to help aclocal find these macros, as it can't see m4_define.
9276 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9277
9278 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9279 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9280 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9281 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9282 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9283 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9284 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9285 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9286 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9287 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9288 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9289 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9290 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9291 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9292 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9293 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9294 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9295 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9296 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9297 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9298 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9299 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9300 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9301 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9302 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9303 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9304 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9305 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9306 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9307 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9308 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9309 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9310 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9311 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9312 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9313 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9314 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9315 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9316 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9317 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9318 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9319 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9320 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9321 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9322 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9323 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9324 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9325 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9326 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9327 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9328 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9329 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9330 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9331 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9332 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9333 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9334 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9335 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9336 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
9337 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
9338 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
9339
9340 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
9341 #
9342 # This file is free software; the Free Software Foundation
9343 # gives unlimited permission to copy and/or distribute it,
9344 # with or without modifications, as long as this notice is preserved.
9345
9346 # AM_AUTOMAKE_VERSION(VERSION)
9347 # ----------------------------
9348 # Automake X.Y traces this macro to ensure aclocal.m4 has been
9349 # generated from the m4 files accompanying Automake X.Y.
9350 # (This private macro should not be called outside this file.)
9351 AC_DEFUN([AM_AUTOMAKE_VERSION],
9352 [am__api_version='1.11'
9353 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9354 dnl require some minimum version. Point them to the right macro.
9355 m4_if([$1], [1.11.1], [],
9356 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9357 ])
9358
9359 # _AM_AUTOCONF_VERSION(VERSION)
9360 # -----------------------------
9361 # aclocal traces this macro to find the Autoconf version.
9362 # This is a private macro too. Using m4_define simplifies
9363 # the logic in aclocal, which can simply ignore this definition.
9364 m4_define([_AM_AUTOCONF_VERSION], [])
9365
9366 # AM_SET_CURRENT_AUTOMAKE_VERSION
9367 # -------------------------------
9368 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9369 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9370 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9371 [AM_AUTOMAKE_VERSION([1.11.1])dnl
9372 m4_ifndef([AC_AUTOCONF_VERSION],
9373 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9374 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9375
9376 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
9377
9378 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9379 #
9380 # This file is free software; the Free Software Foundation
9381 # gives unlimited permission to copy and/or distribute it,
9382 # with or without modifications, as long as this notice is preserved.
9383
9384 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9385 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
9386 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9387 #
9388 # Of course, Automake must honor this variable whenever it calls a
9389 # tool from the auxiliary directory. The problem is that $srcdir (and
9390 # therefore $ac_aux_dir as well) can be either absolute or relative,
9391 # depending on how configure is run. This is pretty annoying, since
9392 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
9393 # source directory, any form will work fine, but in subdirectories a
9394 # relative path needs to be adjusted first.
9395 #
9396 # $ac_aux_dir/missing
9397 # fails when called from a subdirectory if $ac_aux_dir is relative
9398 # $top_srcdir/$ac_aux_dir/missing
9399 # fails if $ac_aux_dir is absolute,
9400 # fails when called from a subdirectory in a VPATH build with
9401 # a relative $ac_aux_dir
9402 #
9403 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9404 # are both prefixed by $srcdir. In an in-source build this is usually
9405 # harmless because $srcdir is `.', but things will broke when you
9406 # start a VPATH build or use an absolute $srcdir.
9407 #
9408 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9409 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
9410 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9411 # and then we would define $MISSING as
9412 # MISSING="\${SHELL} $am_aux_dir/missing"
9413 # This will work as long as MISSING is not called from configure, because
9414 # unfortunately $(top_srcdir) has no meaning in configure.
9415 # However there are other variables, like CC, which are often used in
9416 # configure, and could therefore not use this "fixed" $ac_aux_dir.
9417 #
9418 # Another solution, used here, is to always expand $ac_aux_dir to an
9419 # absolute PATH. The drawback is that using absolute paths prevent a
9420 # configured tree to be moved without reconfiguration.
9421
9422 AC_DEFUN([AM_AUX_DIR_EXPAND],
9423 [dnl Rely on autoconf to set up CDPATH properly.
9424 AC_PREREQ([2.50])dnl
9425 # expand $ac_aux_dir to an absolute path
9426 am_aux_dir=`cd $ac_aux_dir && pwd`
9427 ])
9428
9429 # AM_CONDITIONAL -*- Autoconf -*-
9430
9431 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9432 # Free Software Foundation, Inc.
9433 #
9434 # This file is free software; the Free Software Foundation
9435 # gives unlimited permission to copy and/or distribute it,
9436 # with or without modifications, as long as this notice is preserved.
9437
9438 # serial 9
9439
9440 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
9441 # -------------------------------------
9442 # Define a conditional.
9443 AC_DEFUN([AM_CONDITIONAL],
9444 [AC_PREREQ(2.52)dnl
9445 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
9446 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9447 AC_SUBST([$1_TRUE])dnl
9448 AC_SUBST([$1_FALSE])dnl
9449 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
9450 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
9451 m4_define([_AM_COND_VALUE_$1], [$2])dnl
9452 if $2; then
9453 $1_TRUE=
9454 $1_FALSE='#'
9455 else
9456 $1_TRUE='#'
9457 $1_FALSE=
9458 fi
9459 AC_CONFIG_COMMANDS_PRE(
9460 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9461 AC_MSG_ERROR([[conditional "$1" was never defined.
9462 Usually this means the macro was only invoked conditionally.]])
9463 fi])])
9464
9465 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9466 # Free Software Foundation, Inc.
9467 #
9468 # This file is free software; the Free Software Foundation
9469 # gives unlimited permission to copy and/or distribute it,
9470 # with or without modifications, as long as this notice is preserved.
9471
9472 # serial 10
9473
9474 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9475 # written in clear, in which case automake, when reading aclocal.m4,
9476 # will think it sees a *use*, and therefore will trigger all it's
9477 # C support machinery. Also note that it means that autoscan, seeing
9478 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9479
9480
9481 # _AM_DEPENDENCIES(NAME)
9482 # ----------------------
9483 # See how the compiler implements dependency checking.
9484 # NAME is "CC", "CXX", "GCJ", or "OBJC".
9485 # We try a few techniques and use that to set a single cache variable.
9486 #
9487 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9488 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9489 # dependency, and given that the user is not expected to run this macro,
9490 # just rely on AC_PROG_CC.
9491 AC_DEFUN([_AM_DEPENDENCIES],
9492 [AC_REQUIRE([AM_SET_DEPDIR])dnl
9493 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9494 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9495 AC_REQUIRE([AM_DEP_TRACK])dnl
9496
9497 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
9498 [$1], CXX, [depcc="$CXX" am_compiler_list=],
9499 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9500 [$1], UPC, [depcc="$UPC" am_compiler_list=],
9501 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
9502 [depcc="$$1" am_compiler_list=])
9503
9504 AC_CACHE_CHECK([dependency style of $depcc],
9505 [am_cv_$1_dependencies_compiler_type],
9506 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9507 # We make a subdir and do the tests there. Otherwise we can end up
9508 # making bogus files that we don't know about and never remove. For
9509 # instance it was reported that on HP-UX the gcc test will end up
9510 # making a dummy file named `D' -- because `-MD' means `put the output
9511 # in D'.
9512 mkdir conftest.dir
9513 # Copy depcomp to subdir because otherwise we won't find it if we're
9514 # using a relative directory.
9515 cp "$am_depcomp" conftest.dir
9516 cd conftest.dir
9517 # We will build objects and dependencies in a subdirectory because
9518 # it helps to detect inapplicable dependency modes. For instance
9519 # both Tru64's cc and ICC support -MD to output dependencies as a
9520 # side effect of compilation, but ICC will put the dependencies in
9521 # the current directory while Tru64 will put them in the object
9522 # directory.
9523 mkdir sub
9524
9525 am_cv_$1_dependencies_compiler_type=none
9526 if test "$am_compiler_list" = ""; then
9527 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9528 fi
9529 am__universal=false
9530 m4_case([$1], [CC],
9531 [case " $depcc " in #(
9532 *\ -arch\ *\ -arch\ *) am__universal=true ;;
9533 esac],
9534 [CXX],
9535 [case " $depcc " in #(
9536 *\ -arch\ *\ -arch\ *) am__universal=true ;;
9537 esac])
9538
9539 for depmode in $am_compiler_list; do
9540 # Setup a source with many dependencies, because some compilers
9541 # like to wrap large dependency lists on column 80 (with \), and
9542 # we should not choose a depcomp mode which is confused by this.
9543 #
9544 # We need to recreate these files for each test, as the compiler may
9545 # overwrite some of them when testing with obscure command lines.
9546 # This happens at least with the AIX C compiler.
9547 : > sub/conftest.c
9548 for i in 1 2 3 4 5 6; do
9549 echo '#include "conftst'$i'.h"' >> sub/conftest.c
9550 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9551 # Solaris 8's {/usr,}/bin/sh.
9552 touch sub/conftst$i.h
9553 done
9554 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9555
9556 # We check with `-c' and `-o' for the sake of the "dashmstdout"
9557 # mode. It turns out that the SunPro C++ compiler does not properly
9558 # handle `-M -o', and we need to detect this. Also, some Intel
9559 # versions had trouble with output in subdirs
9560 am__obj=sub/conftest.${OBJEXT-o}
9561 am__minus_obj="-o $am__obj"
9562 case $depmode in
9563 gcc)
9564 # This depmode causes a compiler race in universal mode.
9565 test "$am__universal" = false || continue
9566 ;;
9567 nosideeffect)
9568 # after this tag, mechanisms are not by side-effect, so they'll
9569 # only be used when explicitly requested
9570 if test "x$enable_dependency_tracking" = xyes; then
9571 continue
9572 else
9573 break
9574 fi
9575 ;;
9576 msvisualcpp | msvcmsys)
9577 # This compiler won't grok `-c -o', but also, the minuso test has
9578 # not run yet. These depmodes are late enough in the game, and
9579 # so weak that their functioning should not be impacted.
9580 am__obj=conftest.${OBJEXT-o}
9581 am__minus_obj=
9582 ;;
9583 none) break ;;
9584 esac
9585 if depmode=$depmode \
9586 source=sub/conftest.c object=$am__obj \
9587 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9588 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9589 >/dev/null 2>conftest.err &&
9590 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9591 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9592 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9593 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9594 # icc doesn't choke on unknown options, it will just issue warnings
9595 # or remarks (even with -Werror). So we grep stderr for any message
9596 # that says an option was ignored or not supported.
9597 # When given -MP, icc 7.0 and 7.1 complain thusly:
9598 # icc: Command line warning: ignoring option '-M'; no argument required
9599 # The diagnosis changed in icc 8.0:
9600 # icc: Command line remark: option '-MP' not supported
9601 if (grep 'ignoring option' conftest.err ||
9602 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9603 am_cv_$1_dependencies_compiler_type=$depmode
9604 break
9605 fi
9606 fi
9607 done
9608
9609 cd ..
9610 rm -rf conftest.dir
9611 else
9612 am_cv_$1_dependencies_compiler_type=none
9613 fi
9614 ])
9615 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9616 AM_CONDITIONAL([am__fastdep$1], [
9617 test "x$enable_dependency_tracking" != xno \
9618 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9619 ])
9620
9621
9622 # AM_SET_DEPDIR
9623 # -------------
9624 # Choose a directory name for dependency files.
9625 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
9626 AC_DEFUN([AM_SET_DEPDIR],
9627 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9628 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9629 ])
9630
9631
9632 # AM_DEP_TRACK
9633 # ------------
9634 AC_DEFUN([AM_DEP_TRACK],
9635 [AC_ARG_ENABLE(dependency-tracking,
9636 [ --disable-dependency-tracking speeds up one-time build
9637 --enable-dependency-tracking do not reject slow dependency extractors])
9638 if test "x$enable_dependency_tracking" != xno; then
9639 am_depcomp="$ac_aux_dir/depcomp"
9640 AMDEPBACKSLASH='\'
9641 fi
9642 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9643 AC_SUBST([AMDEPBACKSLASH])dnl
9644 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9645 ])
9646
9647 # Generate code to set up dependency tracking. -*- Autoconf -*-
9648
9649 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9650 # Free Software Foundation, Inc.
9651 #
9652 # This file is free software; the Free Software Foundation
9653 # gives unlimited permission to copy and/or distribute it,
9654 # with or without modifications, as long as this notice is preserved.
9655
9656 #serial 5
9657
9658 # _AM_OUTPUT_DEPENDENCY_COMMANDS
9659 # ------------------------------
9660 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9661 [{
9662 # Autoconf 2.62 quotes --file arguments for eval, but not when files
9663 # are listed without --file. Let's play safe and only enable the eval
9664 # if we detect the quoting.
9665 case $CONFIG_FILES in
9666 *\'*) eval set x "$CONFIG_FILES" ;;
9667 *) set x $CONFIG_FILES ;;
9668 esac
9669 shift
9670 for mf
9671 do
9672 # Strip MF so we end up with the name of the file.
9673 mf=`echo "$mf" | sed -e 's/:.*$//'`
9674 # Check whether this is an Automake generated Makefile or not.
9675 # We used to match only the files named `Makefile.in', but
9676 # some people rename them; so instead we look at the file content.
9677 # Grep'ing the first line is not enough: some people post-process
9678 # each Makefile.in and add a new line on top of each file to say so.
9679 # Grep'ing the whole file is not good either: AIX grep has a line
9680 # limit of 2048, but all sed's we know have understand at least 4000.
9681 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9682 dirpart=`AS_DIRNAME("$mf")`
9683 else
9684 continue
9685 fi
9686 # Extract the definition of DEPDIR, am__include, and am__quote
9687 # from the Makefile without running `make'.
9688 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9689 test -z "$DEPDIR" && continue
9690 am__include=`sed -n 's/^am__include = //p' < "$mf"`
9691 test -z "am__include" && continue
9692 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9693 # When using ansi2knr, U may be empty or an underscore; expand it
9694 U=`sed -n 's/^U = //p' < "$mf"`
9695 # Find all dependency output files, they are included files with
9696 # $(DEPDIR) in their names. We invoke sed twice because it is the
9697 # simplest approach to changing $(DEPDIR) to its actual value in the
9698 # expansion.
9699 for file in `sed -n "
9700 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9701 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9702 # Make sure the directory exists.
9703 test -f "$dirpart/$file" && continue
9704 fdir=`AS_DIRNAME(["$file"])`
9705 AS_MKDIR_P([$dirpart/$fdir])
9706 # echo "creating $dirpart/$file"
9707 echo '# dummy' > "$dirpart/$file"
9708 done
9709 done
9710 }
9711 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9712
9713
9714 # AM_OUTPUT_DEPENDENCY_COMMANDS
9715 # -----------------------------
9716 # This macro should only be invoked once -- use via AC_REQUIRE.
9717 #
9718 # This code is only required when automatic dependency tracking
9719 # is enabled. FIXME. This creates each `.P' file that we will
9720 # need in order to bootstrap the dependency handling code.
9721 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9722 [AC_CONFIG_COMMANDS([depfiles],
9723 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9724 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9725 ])
9726
9727 # Do all the work for Automake. -*- Autoconf -*-
9728
9729 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9730 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9731 #
9732 # This file is free software; the Free Software Foundation
9733 # gives unlimited permission to copy and/or distribute it,
9734 # with or without modifications, as long as this notice is preserved.
9735
9736 # serial 16
9737
9738 # This macro actually does too much. Some checks are only needed if
9739 # your package does certain things. But this isn't really a big deal.
9740
9741 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9742 # AM_INIT_AUTOMAKE([OPTIONS])
9743 # -----------------------------------------------
9744 # The call with PACKAGE and VERSION arguments is the old style
9745 # call (pre autoconf-2.50), which is being phased out. PACKAGE
9746 # and VERSION should now be passed to AC_INIT and removed from
9747 # the call to AM_INIT_AUTOMAKE.
9748 # We support both call styles for the transition. After
9749 # the next Automake release, Autoconf can make the AC_INIT
9750 # arguments mandatory, and then we can depend on a new Autoconf
9751 # release and drop the old call support.
9752 AC_DEFUN([AM_INIT_AUTOMAKE],
9753 [AC_PREREQ([2.62])dnl
9754 dnl Autoconf wants to disallow AM_ names. We explicitly allow
9755 dnl the ones we care about.
9756 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9757 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9758 AC_REQUIRE([AC_PROG_INSTALL])dnl
9759 if test "`cd $srcdir && pwd`" != "`pwd`"; then
9760 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9761 # is not polluted with repeated "-I."
9762 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9763 # test to see if srcdir already configured
9764 if test -f $srcdir/config.status; then
9765 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9766 fi
9767 fi
9768
9769 # test whether we have cygpath
9770 if test -z "$CYGPATH_W"; then
9771 if (cygpath --version) >/dev/null 2>/dev/null; then
9772 CYGPATH_W='cygpath -w'
9773 else
9774 CYGPATH_W=echo
9775 fi
9776 fi
9777 AC_SUBST([CYGPATH_W])
9778
9779 # Define the identity of the package.
9780 dnl Distinguish between old-style and new-style calls.
9781 m4_ifval([$2],
9782 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9783 AC_SUBST([PACKAGE], [$1])dnl
9784 AC_SUBST([VERSION], [$2])],
9785 [_AM_SET_OPTIONS([$1])dnl
9786 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9787 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9788 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9789 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9790 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9791
9792 _AM_IF_OPTION([no-define],,
9793 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9794 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9795
9796 # Some tools Automake needs.
9797 AC_REQUIRE([AM_SANITY_CHECK])dnl
9798 AC_REQUIRE([AC_ARG_PROGRAM])dnl
9799 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9800 AM_MISSING_PROG(AUTOCONF, autoconf)
9801 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9802 AM_MISSING_PROG(AUTOHEADER, autoheader)
9803 AM_MISSING_PROG(MAKEINFO, makeinfo)
9804 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9805 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9806 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9807 # We need awk for the "check" target. The system "awk" is bad on
9808 # some platforms.
9809 AC_REQUIRE([AC_PROG_AWK])dnl
9810 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9811 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9812 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9813 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9814 [_AM_PROG_TAR([v7])])])
9815 _AM_IF_OPTION([no-dependencies],,
9816 [AC_PROVIDE_IFELSE([AC_PROG_CC],
9817 [_AM_DEPENDENCIES(CC)],
9818 [define([AC_PROG_CC],
9819 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9820 AC_PROVIDE_IFELSE([AC_PROG_CXX],
9821 [_AM_DEPENDENCIES(CXX)],
9822 [define([AC_PROG_CXX],
9823 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9824 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9825 [_AM_DEPENDENCIES(OBJC)],
9826 [define([AC_PROG_OBJC],
9827 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9828 ])
9829 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9830 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9831 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
9832 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9833 AC_CONFIG_COMMANDS_PRE(dnl
9834 [m4_provide_if([_AM_COMPILER_EXEEXT],
9835 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9836 ])
9837
9838 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
9839 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9840 dnl mangled by Autoconf and run in a shell conditional statement.
9841 m4_define([_AC_COMPILER_EXEEXT],
9842 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9843
9844
9845 # When config.status generates a header, we must update the stamp-h file.
9846 # This file resides in the same directory as the config header
9847 # that is generated. The stamp files are numbered to have different names.
9848
9849 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9850 # loop where config.status creates the headers, so we can generate
9851 # our stamp files there.
9852 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9853 [# Compute $1's index in $config_headers.
9854 _am_arg=$1
9855 _am_stamp_count=1
9856 for _am_header in $config_headers :; do
9857 case $_am_header in
9858 $_am_arg | $_am_arg:* )
9859 break ;;
9860 * )
9861 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9862 esac
9863 done
9864 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9865
9866 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
9867 #
9868 # This file is free software; the Free Software Foundation
9869 # gives unlimited permission to copy and/or distribute it,
9870 # with or without modifications, as long as this notice is preserved.
9871
9872 # AM_PROG_INSTALL_SH
9873 # ------------------
9874 # Define $install_sh.
9875 AC_DEFUN([AM_PROG_INSTALL_SH],
9876 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9877 if test x"${install_sh}" != xset; then
9878 case $am_aux_dir in
9879 *\ * | *\ *)
9880 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9881 *)
9882 install_sh="\${SHELL} $am_aux_dir/install-sh"
9883 esac
9884 fi
9885 AC_SUBST(install_sh)])
9886
9887 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
9888 #
9889 # This file is free software; the Free Software Foundation
9890 # gives unlimited permission to copy and/or distribute it,
9891 # with or without modifications, as long as this notice is preserved.
9892
9893 # serial 2
9894
9895 # Check whether the underlying file-system supports filenames
9896 # with a leading dot. For instance MS-DOS doesn't.
9897 AC_DEFUN([AM_SET_LEADING_DOT],
9898 [rm -rf .tst 2>/dev/null
9899 mkdir .tst 2>/dev/null
9900 if test -d .tst; then
9901 am__leading_dot=.
9902 else
9903 am__leading_dot=_
9904 fi
9905 rmdir .tst 2>/dev/null
9906 AC_SUBST([am__leading_dot])])
9907
9908 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
9909 # Free Software Foundation, Inc.
9910 #
9911 # This file is free software; the Free Software Foundation
9912 # gives unlimited permission to copy and/or distribute it,
9913 # with or without modifications, as long as this notice is preserved.
9914
9915 # serial 5
9916
9917 # AM_PROG_LEX
9918 # -----------
9919 # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
9920 # "missing" invocation, for better error output.
9921 AC_DEFUN([AM_PROG_LEX],
9922 [AC_PREREQ(2.50)dnl
9923 AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
9924 AC_REQUIRE([AC_PROG_LEX])dnl
9925 if test "$LEX" = :; then
9926 LEX=${am_missing_run}flex
9927 fi])
9928
9929 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
9930 # From Jim Meyering
9931
9932 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9933 # Free Software Foundation, Inc.
9934 #
9935 # This file is free software; the Free Software Foundation
9936 # gives unlimited permission to copy and/or distribute it,
9937 # with or without modifications, as long as this notice is preserved.
9938
9939 # serial 5
9940
9941 # AM_MAINTAINER_MODE([DEFAULT-MODE])
9942 # ----------------------------------
9943 # Control maintainer-specific portions of Makefiles.
9944 # Default is to disable them, unless `enable' is passed literally.
9945 # For symmetry, `disable' may be passed as well. Anyway, the user
9946 # can override the default with the --enable/--disable switch.
9947 AC_DEFUN([AM_MAINTAINER_MODE],
9948 [m4_case(m4_default([$1], [disable]),
9949 [enable], [m4_define([am_maintainer_other], [disable])],
9950 [disable], [m4_define([am_maintainer_other], [enable])],
9951 [m4_define([am_maintainer_other], [enable])
9952 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
9953 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
9954 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
9955 AC_ARG_ENABLE([maintainer-mode],
9956 [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
9957 (and sometimes confusing) to the casual installer],
9958 [USE_MAINTAINER_MODE=$enableval],
9959 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
9960 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
9961 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
9962 MAINT=$MAINTAINER_MODE_TRUE
9963 AC_SUBST([MAINT])dnl
9964 ]
9965 )
9966
9967 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9968
9969 # Check to see how 'make' treats includes. -*- Autoconf -*-
9970
9971 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
9972 #
9973 # This file is free software; the Free Software Foundation
9974 # gives unlimited permission to copy and/or distribute it,
9975 # with or without modifications, as long as this notice is preserved.
9976
9977 # serial 4
9978
9979 # AM_MAKE_INCLUDE()
9980 # -----------------
9981 # Check to see how make treats includes.
9982 AC_DEFUN([AM_MAKE_INCLUDE],
9983 [am_make=${MAKE-make}
9984 cat > confinc << 'END'
9985 am__doit:
9986 @echo this is the am__doit target
9987 .PHONY: am__doit
9988 END
9989 # If we don't find an include directive, just comment out the code.
9990 AC_MSG_CHECKING([for style of include used by $am_make])
9991 am__include="#"
9992 am__quote=
9993 _am_result=none
9994 # First try GNU make style include.
9995 echo "include confinc" > confmf
9996 # Ignore all kinds of additional output from `make'.
9997 case `$am_make -s -f confmf 2> /dev/null` in #(
9998 *the\ am__doit\ target*)
9999 am__include=include
10000 am__quote=
10001 _am_result=GNU
10002 ;;
10003 esac
10004 # Now try BSD make style include.
10005 if test "$am__include" = "#"; then
10006 echo '.include "confinc"' > confmf
10007 case `$am_make -s -f confmf 2> /dev/null` in #(
10008 *the\ am__doit\ target*)
10009 am__include=.include
10010 am__quote="\""
10011 _am_result=BSD
10012 ;;
10013 esac
10014 fi
10015 AC_SUBST([am__include])
10016 AC_SUBST([am__quote])
10017 AC_MSG_RESULT([$_am_result])
10018 rm -f confinc confmf
10019 ])
10020
10021 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
10022
10023 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
10024 # Free Software Foundation, Inc.
10025 #
10026 # This file is free software; the Free Software Foundation
10027 # gives unlimited permission to copy and/or distribute it,
10028 # with or without modifications, as long as this notice is preserved.
10029
10030 # serial 6
10031
10032 # AM_MISSING_PROG(NAME, PROGRAM)
10033 # ------------------------------
10034 AC_DEFUN([AM_MISSING_PROG],
10035 [AC_REQUIRE([AM_MISSING_HAS_RUN])
10036 $1=${$1-"${am_missing_run}$2"}
10037 AC_SUBST($1)])
10038
10039
10040 # AM_MISSING_HAS_RUN
10041 # ------------------
10042 # Define MISSING if not defined so far and test if it supports --run.
10043 # If it does, set am_missing_run to use it, otherwise, to nothing.
10044 AC_DEFUN([AM_MISSING_HAS_RUN],
10045 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10046 AC_REQUIRE_AUX_FILE([missing])dnl
10047 if test x"${MISSING+set}" != xset; then
10048 case $am_aux_dir in
10049 *\ * | *\ *)
10050 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10051 *)
10052 MISSING="\${SHELL} $am_aux_dir/missing" ;;
10053 esac
10054 fi
10055 # Use eval to expand $SHELL
10056 if eval "$MISSING --run true"; then
10057 am_missing_run="$MISSING --run "
10058 else
10059 am_missing_run=
10060 AC_MSG_WARN([`missing' script is too old or missing])
10061 fi
10062 ])
10063
10064 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
10065 #
10066 # This file is free software; the Free Software Foundation
10067 # gives unlimited permission to copy and/or distribute it,
10068 # with or without modifications, as long as this notice is preserved.
10069
10070 # AM_PROG_MKDIR_P
10071 # ---------------
10072 # Check for `mkdir -p'.
10073 AC_DEFUN([AM_PROG_MKDIR_P],
10074 [AC_PREREQ([2.60])dnl
10075 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10076 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
10077 dnl while keeping a definition of mkdir_p for backward compatibility.
10078 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
10079 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
10080 dnl Makefile.ins that do not define MKDIR_P, so we do our own
10081 dnl adjustment using top_builddir (which is defined more often than
10082 dnl MKDIR_P).
10083 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
10084 case $mkdir_p in
10085 [[\\/$]]* | ?:[[\\/]]*) ;;
10086 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
10087 esac
10088 ])
10089
10090 # Helper functions for option handling. -*- Autoconf -*-
10091
10092 # Copyright (C) 2001, 2002, 2003, 2005, 2008 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 # serial 4
10099
10100 # _AM_MANGLE_OPTION(NAME)
10101 # -----------------------
10102 AC_DEFUN([_AM_MANGLE_OPTION],
10103 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10104
10105 # _AM_SET_OPTION(NAME)
10106 # ------------------------------
10107 # Set option NAME. Presently that only means defining a flag for this option.
10108 AC_DEFUN([_AM_SET_OPTION],
10109 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10110
10111 # _AM_SET_OPTIONS(OPTIONS)
10112 # ----------------------------------
10113 # OPTIONS is a space-separated list of Automake options.
10114 AC_DEFUN([_AM_SET_OPTIONS],
10115 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10116
10117 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10118 # -------------------------------------------
10119 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10120 AC_DEFUN([_AM_IF_OPTION],
10121 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10122
10123 # Check to make sure that the build environment is sane. -*- Autoconf -*-
10124
10125 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
10126 # Free Software Foundation, Inc.
10127 #
10128 # This file is free software; the Free Software Foundation
10129 # gives unlimited permission to copy and/or distribute it,
10130 # with or without modifications, as long as this notice is preserved.
10131
10132 # serial 5
10133
10134 # AM_SANITY_CHECK
10135 # ---------------
10136 AC_DEFUN([AM_SANITY_CHECK],
10137 [AC_MSG_CHECKING([whether build environment is sane])
10138 # Just in case
10139 sleep 1
10140 echo timestamp > conftest.file
10141 # Reject unsafe characters in $srcdir or the absolute working directory
10142 # name. Accept space and tab only in the latter.
10143 am_lf='
10144 '
10145 case `pwd` in
10146 *[[\\\"\#\$\&\'\`$am_lf]]*)
10147 AC_MSG_ERROR([unsafe absolute working directory name]);;
10148 esac
10149 case $srcdir in
10150 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
10151 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
10152 esac
10153
10154 # Do `set' in a subshell so we don't clobber the current shell's
10155 # arguments. Must try -L first in case configure is actually a
10156 # symlink; some systems play weird games with the mod time of symlinks
10157 # (eg FreeBSD returns the mod time of the symlink's containing
10158 # directory).
10159 if (
10160 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10161 if test "$[*]" = "X"; then
10162 # -L didn't work.
10163 set X `ls -t "$srcdir/configure" conftest.file`
10164 fi
10165 rm -f conftest.file
10166 if test "$[*]" != "X $srcdir/configure conftest.file" \
10167 && test "$[*]" != "X conftest.file $srcdir/configure"; then
10168
10169 # If neither matched, then we have a broken ls. This can happen
10170 # if, for instance, CONFIG_SHELL is bash and it inherits a
10171 # broken ls alias from the environment. This has actually
10172 # happened. Such a system could not be considered "sane".
10173 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
10174 alias in your environment])
10175 fi
10176
10177 test "$[2]" = conftest.file
10178 )
10179 then
10180 # Ok.
10181 :
10182 else
10183 AC_MSG_ERROR([newly created file is older than distributed files!
10184 Check your system clock])
10185 fi
10186 AC_MSG_RESULT(yes)])
10187
10188 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
10189 #
10190 # This file is free software; the Free Software Foundation
10191 # gives unlimited permission to copy and/or distribute it,
10192 # with or without modifications, as long as this notice is preserved.
10193
10194 # AM_PROG_INSTALL_STRIP
10195 # ---------------------
10196 # One issue with vendor `install' (even GNU) is that you can't
10197 # specify the program used to strip binaries. This is especially
10198 # annoying in cross-compiling environments, where the build's strip
10199 # is unlikely to handle the host's binaries.
10200 # Fortunately install-sh will honor a STRIPPROG variable, so we
10201 # always use install-sh in `make install-strip', and initialize
10202 # STRIPPROG with the value of the STRIP variable (set by the user).
10203 AC_DEFUN([AM_PROG_INSTALL_STRIP],
10204 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10205 # Installed binaries are usually stripped using `strip' when the user
10206 # run `make install-strip'. However `strip' might not be the right
10207 # tool to use in cross-compilation environments, therefore Automake
10208 # will honor the `STRIP' environment variable to overrule this program.
10209 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10210 if test "$cross_compiling" != no; then
10211 AC_CHECK_TOOL([STRIP], [strip], :)
10212 fi
10213 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10214 AC_SUBST([INSTALL_STRIP_PROGRAM])])
10215
10216 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
10217 #
10218 # This file is free software; the Free Software Foundation
10219 # gives unlimited permission to copy and/or distribute it,
10220 # with or without modifications, as long as this notice is preserved.
10221
10222 # serial 2
10223
10224 # _AM_SUBST_NOTMAKE(VARIABLE)
10225 # ---------------------------
10226 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10227 # This macro is traced by Automake.
10228 AC_DEFUN([_AM_SUBST_NOTMAKE])
10229
10230 # AM_SUBST_NOTMAKE(VARIABLE)
10231 # ---------------------------
10232 # Public sister of _AM_SUBST_NOTMAKE.
10233 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10234
10235 # Check how to create a tarball. -*- Autoconf -*-
10236
10237 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
10238 #
10239 # This file is free software; the Free Software Foundation
10240 # gives unlimited permission to copy and/or distribute it,
10241 # with or without modifications, as long as this notice is preserved.
10242
10243 # serial 2
10244
10245 # _AM_PROG_TAR(FORMAT)
10246 # --------------------
10247 # Check how to create a tarball in format FORMAT.
10248 # FORMAT should be one of `v7', `ustar', or `pax'.
10249 #
10250 # Substitute a variable $(am__tar) that is a command
10251 # writing to stdout a FORMAT-tarball containing the directory
10252 # $tardir.
10253 # tardir=directory && $(am__tar) > result.tar
10254 #
10255 # Substitute a variable $(am__untar) that extract such
10256 # a tarball read from stdin.
10257 # $(am__untar) < result.tar
10258 AC_DEFUN([_AM_PROG_TAR],
10259 [# Always define AMTAR for backward compatibility.
10260 AM_MISSING_PROG([AMTAR], [tar])
10261 m4_if([$1], [v7],
10262 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
10263 [m4_case([$1], [ustar],, [pax],,
10264 [m4_fatal([Unknown tar format])])
10265 AC_MSG_CHECKING([how to create a $1 tar archive])
10266 # Loop over all known methods to create a tar archive until one works.
10267 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10268 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10269 # Do not fold the above two line into one, because Tru64 sh and
10270 # Solaris sh will not grok spaces in the rhs of `-'.
10271 for _am_tool in $_am_tools
10272 do
10273 case $_am_tool in
10274 gnutar)
10275 for _am_tar in tar gnutar gtar;
10276 do
10277 AM_RUN_LOG([$_am_tar --version]) && break
10278 done
10279 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10280 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10281 am__untar="$_am_tar -xf -"
10282 ;;
10283 plaintar)
10284 # Must skip GNU tar: if it does not support --format= it doesn't create
10285 # ustar tarball either.
10286 (tar --version) >/dev/null 2>&1 && continue
10287 am__tar='tar chf - "$$tardir"'
10288 am__tar_='tar chf - "$tardir"'
10289 am__untar='tar xf -'
10290 ;;
10291 pax)
10292 am__tar='pax -L -x $1 -w "$$tardir"'
10293 am__tar_='pax -L -x $1 -w "$tardir"'
10294 am__untar='pax -r'
10295 ;;
10296 cpio)
10297 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10298 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10299 am__untar='cpio -i -H $1 -d'
10300 ;;
10301 none)
10302 am__tar=false
10303 am__tar_=false
10304 am__untar=false
10305 ;;
10306 esac
10307
10308 # If the value was cached, stop now. We just wanted to have am__tar
10309 # and am__untar set.
10310 test -n "${am_cv_prog_tar_$1}" && break
10311
10312 # tar/untar a dummy directory, and stop if the command works
10313 rm -rf conftest.dir
10314 mkdir conftest.dir
10315 echo GrepMe > conftest.dir/file
10316 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10317 rm -rf conftest.dir
10318 if test -s conftest.tar; then
10319 AM_RUN_LOG([$am__untar <conftest.tar])
10320 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10321 fi
10322 done
10323 rm -rf conftest.dir
10324
10325 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10326 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10327 AC_SUBST([am__tar])
10328 AC_SUBST([am__untar])
10329 ]) # _AM_PROG_TAR
10330
10331 m4_include([acinclude.m4])