/[svn]/ircd-hybrid/branches/8.2.x/m4/libtool.m4
ViewVC logotype

Contents of /ircd-hybrid/branches/8.2.x/m4/libtool.m4

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7667 - (show annotations)
Wed Jul 20 17:09:36 2016 UTC (6 years, 4 months ago) by michael
File size: 305723 byte(s)
- Fixed svn properties

1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2 #
3 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
4 # Written by Gordon Matzigkeit, 1996
5 #
6 # This file is free software; the Free Software Foundation gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
9
10 m4_define([_LT_COPYING], [dnl
11 # Copyright (C) 2014 Free Software Foundation, Inc.
12 # This is free software; see the source for copying conditions. There is NO
13 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
15 # GNU Libtool is free software; you can redistribute it and/or modify
16 # it under the terms of the GNU General Public License as published by
17 # the Free Software Foundation; either version 2 of of the License, or
18 # (at your option) any later version.
19 #
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program or library that is built
22 # using GNU Libtool, you may include this file under the same
23 # distribution terms that you use for the rest of that program.
24 #
25 # GNU Libtool is distributed in the hope that it will be useful, but
26 # WITHOUT ANY WARRANTY; without even the implied warranty of
27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 # GNU General Public License for more details.
29 #
30 # You should have received a copy of the GNU General Public License
31 # along with this program. If not, see <http://www.gnu.org/licenses/>.
32 ])
33
34 # serial 58 LT_INIT
35
36
37 # LT_PREREQ(VERSION)
38 # ------------------
39 # Complain and exit if this libtool version is less that VERSION.
40 m4_defun([LT_PREREQ],
41 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
42 [m4_default([$3],
43 [m4_fatal([Libtool version $1 or higher is required],
44 63)])],
45 [$2])])
46
47
48 # _LT_CHECK_BUILDDIR
49 # ------------------
50 # Complain if the absolute build directory name contains unusual characters
51 m4_defun([_LT_CHECK_BUILDDIR],
52 [case `pwd` in
53 *\ * | *\ *)
54 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
55 esac
56 ])
57
58
59 # LT_INIT([OPTIONS])
60 # ------------------
61 AC_DEFUN([LT_INIT],
62 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
63 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
64 AC_BEFORE([$0], [LT_LANG])dnl
65 AC_BEFORE([$0], [LT_OUTPUT])dnl
66 AC_BEFORE([$0], [LTDL_INIT])dnl
67 m4_require([_LT_CHECK_BUILDDIR])dnl
68
69 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
70 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
71 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
72 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
73 dnl unless we require an AC_DEFUNed macro:
74 AC_REQUIRE([LTOPTIONS_VERSION])dnl
75 AC_REQUIRE([LTSUGAR_VERSION])dnl
76 AC_REQUIRE([LTVERSION_VERSION])dnl
77 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
78 m4_require([_LT_PROG_LTMAIN])dnl
79
80 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
81
82 dnl Parse OPTIONS
83 _LT_SET_OPTIONS([$0], [$1])
84
85 # This can be used to rebuild libtool when needed
86 LIBTOOL_DEPS=$ltmain
87
88 # Always use our own libtool.
89 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
90 AC_SUBST(LIBTOOL)dnl
91
92 _LT_SETUP
93
94 # Only expand once:
95 m4_define([LT_INIT])
96 ])# LT_INIT
97
98 # Old names:
99 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
100 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
101 dnl aclocal-1.4 backwards compatibility:
102 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
103 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
104
105
106 # _LT_PREPARE_CC_BASENAME
107 # -----------------------
108 m4_defun([_LT_PREPARE_CC_BASENAME], [
109 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
110 func_cc_basename ()
111 {
112 for cc_temp in @S|@*""; do
113 case $cc_temp in
114 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
115 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
116 \-*) ;;
117 *) break;;
118 esac
119 done
120 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
121 }
122 ])# _LT_PREPARE_CC_BASENAME
123
124
125 # _LT_CC_BASENAME(CC)
126 # -------------------
127 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
128 # but that macro is also expanded into generated libtool script, which
129 # arranges for $SED and $ECHO to be set by different means.
130 m4_defun([_LT_CC_BASENAME],
131 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
132 AC_REQUIRE([_LT_DECL_SED])dnl
133 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
134 func_cc_basename $1
135 cc_basename=$func_cc_basename_result
136 ])
137
138
139 # _LT_FILEUTILS_DEFAULTS
140 # ----------------------
141 # It is okay to use these file commands and assume they have been set
142 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
143 m4_defun([_LT_FILEUTILS_DEFAULTS],
144 [: ${CP="cp -f"}
145 : ${MV="mv -f"}
146 : ${RM="rm -f"}
147 ])# _LT_FILEUTILS_DEFAULTS
148
149
150 # _LT_SETUP
151 # ---------
152 m4_defun([_LT_SETUP],
153 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
154 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
155 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
156 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
157
158 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
159 dnl
160 _LT_DECL([], [host_alias], [0], [The host system])dnl
161 _LT_DECL([], [host], [0])dnl
162 _LT_DECL([], [host_os], [0])dnl
163 dnl
164 _LT_DECL([], [build_alias], [0], [The build system])dnl
165 _LT_DECL([], [build], [0])dnl
166 _LT_DECL([], [build_os], [0])dnl
167 dnl
168 AC_REQUIRE([AC_PROG_CC])dnl
169 AC_REQUIRE([LT_PATH_LD])dnl
170 AC_REQUIRE([LT_PATH_NM])dnl
171 dnl
172 AC_REQUIRE([AC_PROG_LN_S])dnl
173 test -z "$LN_S" && LN_S="ln -s"
174 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
175 dnl
176 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
177 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
178 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
179 dnl
180 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
181 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
182 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
183 m4_require([_LT_CMD_RELOAD])dnl
184 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
185 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
186 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
187 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
188 m4_require([_LT_WITH_SYSROOT])dnl
189 m4_require([_LT_CMD_TRUNCATE])dnl
190
191 _LT_CONFIG_LIBTOOL_INIT([
192 # See if we are running on zsh, and set the options that allow our
193 # commands through without removal of \ escapes INIT.
194 if test -n "\${ZSH_VERSION+set}"; then
195 setopt NO_GLOB_SUBST
196 fi
197 ])
198 if test -n "${ZSH_VERSION+set}"; then
199 setopt NO_GLOB_SUBST
200 fi
201
202 _LT_CHECK_OBJDIR
203
204 m4_require([_LT_TAG_COMPILER])dnl
205
206 case $host_os in
207 aix3*)
208 # AIX sometimes has problems with the GCC collect2 program. For some
209 # reason, if we set the COLLECT_NAMES environment variable, the problems
210 # vanish in a puff of smoke.
211 if test set != "${COLLECT_NAMES+set}"; then
212 COLLECT_NAMES=
213 export COLLECT_NAMES
214 fi
215 ;;
216 esac
217
218 # Global variables:
219 ofile=libtool
220 can_build_shared=yes
221
222 # All known linkers require a '.a' archive for static linking (except MSVC,
223 # which needs '.lib').
224 libext=a
225
226 with_gnu_ld=$lt_cv_prog_gnu_ld
227
228 old_CC=$CC
229 old_CFLAGS=$CFLAGS
230
231 # Set sane defaults for various variables
232 test -z "$CC" && CC=cc
233 test -z "$LTCC" && LTCC=$CC
234 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
235 test -z "$LD" && LD=ld
236 test -z "$ac_objext" && ac_objext=o
237
238 _LT_CC_BASENAME([$compiler])
239
240 # Only perform the check for file, if the check method requires it
241 test -z "$MAGIC_CMD" && MAGIC_CMD=file
242 case $deplibs_check_method in
243 file_magic*)
244 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
245 _LT_PATH_MAGIC
246 fi
247 ;;
248 esac
249
250 # Use C for the default configuration in the libtool script
251 LT_SUPPORTED_TAG([CC])
252 _LT_LANG_C_CONFIG
253 _LT_LANG_DEFAULT_CONFIG
254 _LT_CONFIG_COMMANDS
255 ])# _LT_SETUP
256
257
258 # _LT_PREPARE_SED_QUOTE_VARS
259 # --------------------------
260 # Define a few sed substitution that help us do robust quoting.
261 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
262 [# Backslashify metacharacters that are still active within
263 # double-quoted strings.
264 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
265
266 # Same as above, but do not quote variable references.
267 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
268
269 # Sed substitution to delay expansion of an escaped shell variable in a
270 # double_quote_subst'ed string.
271 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
272
273 # Sed substitution to delay expansion of an escaped single quote.
274 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
275
276 # Sed substitution to avoid accidental globbing in evaled expressions
277 no_glob_subst='s/\*/\\\*/g'
278 ])
279
280 # _LT_PROG_LTMAIN
281 # ---------------
282 # Note that this code is called both from 'configure', and 'config.status'
283 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
284 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
285 # so we pass a copy along to make sure it has a sensible value anyway.
286 m4_defun([_LT_PROG_LTMAIN],
287 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
288 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
289 ltmain=$ac_aux_dir/ltmain.sh
290 ])# _LT_PROG_LTMAIN
291
292
293 ## ------------------------------------- ##
294 ## Accumulate code for creating libtool. ##
295 ## ------------------------------------- ##
296
297 # So that we can recreate a full libtool script including additional
298 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
299 # in macros and then make a single call at the end using the 'libtool'
300 # label.
301
302
303 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
304 # ----------------------------------------
305 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
306 m4_define([_LT_CONFIG_LIBTOOL_INIT],
307 [m4_ifval([$1],
308 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
309 [$1
310 ])])])
311
312 # Initialize.
313 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
314
315
316 # _LT_CONFIG_LIBTOOL([COMMANDS])
317 # ------------------------------
318 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
319 m4_define([_LT_CONFIG_LIBTOOL],
320 [m4_ifval([$1],
321 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
322 [$1
323 ])])])
324
325 # Initialize.
326 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
327
328
329 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
330 # -----------------------------------------------------
331 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
332 [_LT_CONFIG_LIBTOOL([$1])
333 _LT_CONFIG_LIBTOOL_INIT([$2])
334 ])
335
336
337 # _LT_FORMAT_COMMENT([COMMENT])
338 # -----------------------------
339 # Add leading comment marks to the start of each line, and a trailing
340 # full-stop to the whole comment if one is not present already.
341 m4_define([_LT_FORMAT_COMMENT],
342 [m4_ifval([$1], [
343 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
344 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
345 )])
346
347
348
349 ## ------------------------ ##
350 ## FIXME: Eliminate VARNAME ##
351 ## ------------------------ ##
352
353
354 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
355 # -------------------------------------------------------------------
356 # CONFIGNAME is the name given to the value in the libtool script.
357 # VARNAME is the (base) name used in the configure script.
358 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
359 # VARNAME. Any other value will be used directly.
360 m4_define([_LT_DECL],
361 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
362 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
363 [m4_ifval([$1], [$1], [$2])])
364 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
365 m4_ifval([$4],
366 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
367 lt_dict_add_subkey([lt_decl_dict], [$2],
368 [tagged?], [m4_ifval([$5], [yes], [no])])])
369 ])
370
371
372 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
373 # --------------------------------------------------------
374 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
375
376
377 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
378 # ------------------------------------------------
379 m4_define([lt_decl_tag_varnames],
380 [_lt_decl_filter([tagged?], [yes], $@)])
381
382
383 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
384 # ---------------------------------------------------------
385 m4_define([_lt_decl_filter],
386 [m4_case([$#],
387 [0], [m4_fatal([$0: too few arguments: $#])],
388 [1], [m4_fatal([$0: too few arguments: $#: $1])],
389 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
390 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
391 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
392 ])
393
394
395 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
396 # --------------------------------------------------
397 m4_define([lt_decl_quote_varnames],
398 [_lt_decl_filter([value], [1], $@)])
399
400
401 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
402 # ---------------------------------------------------
403 m4_define([lt_decl_dquote_varnames],
404 [_lt_decl_filter([value], [2], $@)])
405
406
407 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
408 # ---------------------------------------------------
409 m4_define([lt_decl_varnames_tagged],
410 [m4_assert([$# <= 2])dnl
411 _$0(m4_quote(m4_default([$1], [[, ]])),
412 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
413 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
414 m4_define([_lt_decl_varnames_tagged],
415 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
416
417
418 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
419 # ------------------------------------------------
420 m4_define([lt_decl_all_varnames],
421 [_$0(m4_quote(m4_default([$1], [[, ]])),
422 m4_if([$2], [],
423 m4_quote(lt_decl_varnames),
424 m4_quote(m4_shift($@))))[]dnl
425 ])
426 m4_define([_lt_decl_all_varnames],
427 [lt_join($@, lt_decl_varnames_tagged([$1],
428 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
429 ])
430
431
432 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
433 # ------------------------------------
434 # Quote a variable value, and forward it to 'config.status' so that its
435 # declaration there will have the same value as in 'configure'. VARNAME
436 # must have a single quote delimited value for this to work.
437 m4_define([_LT_CONFIG_STATUS_DECLARE],
438 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
439
440
441 # _LT_CONFIG_STATUS_DECLARATIONS
442 # ------------------------------
443 # We delimit libtool config variables with single quotes, so when
444 # we write them to config.status, we have to be sure to quote all
445 # embedded single quotes properly. In configure, this macro expands
446 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
447 #
448 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
449 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
450 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
451 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
452
453
454 # _LT_LIBTOOL_TAGS
455 # ----------------
456 # Output comment and list of tags supported by the script
457 m4_defun([_LT_LIBTOOL_TAGS],
458 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
459 available_tags='_LT_TAGS'dnl
460 ])
461
462
463 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
464 # -----------------------------------
465 # Extract the dictionary values for VARNAME (optionally with TAG) and
466 # expand to a commented shell variable setting:
467 #
468 # # Some comment about what VAR is for.
469 # visible_name=$lt_internal_name
470 m4_define([_LT_LIBTOOL_DECLARE],
471 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
472 [description])))[]dnl
473 m4_pushdef([_libtool_name],
474 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
475 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
476 [0], [_libtool_name=[$]$1],
477 [1], [_libtool_name=$lt_[]$1],
478 [2], [_libtool_name=$lt_[]$1],
479 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
480 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
481 ])
482
483
484 # _LT_LIBTOOL_CONFIG_VARS
485 # -----------------------
486 # Produce commented declarations of non-tagged libtool config variables
487 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
488 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
489 # section) are produced by _LT_LIBTOOL_TAG_VARS.
490 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
491 [m4_foreach([_lt_var],
492 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
493 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
494
495
496 # _LT_LIBTOOL_TAG_VARS(TAG)
497 # -------------------------
498 m4_define([_LT_LIBTOOL_TAG_VARS],
499 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
500 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
501
502
503 # _LT_TAGVAR(VARNAME, [TAGNAME])
504 # ------------------------------
505 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
506
507
508 # _LT_CONFIG_COMMANDS
509 # -------------------
510 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
511 # variables for single and double quote escaping we saved from calls
512 # to _LT_DECL, we can put quote escaped variables declarations
513 # into 'config.status', and then the shell code to quote escape them in
514 # for loops in 'config.status'. Finally, any additional code accumulated
515 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
516 m4_defun([_LT_CONFIG_COMMANDS],
517 [AC_PROVIDE_IFELSE([LT_OUTPUT],
518 dnl If the libtool generation code has been placed in $CONFIG_LT,
519 dnl instead of duplicating it all over again into config.status,
520 dnl then we will have config.status run $CONFIG_LT later, so it
521 dnl needs to know what name is stored there:
522 [AC_CONFIG_COMMANDS([libtool],
523 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
524 dnl If the libtool generation code is destined for config.status,
525 dnl expand the accumulated commands and init code now:
526 [AC_CONFIG_COMMANDS([libtool],
527 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
528 ])#_LT_CONFIG_COMMANDS
529
530
531 # Initialize.
532 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
533 [
534
535 # The HP-UX ksh and POSIX shell print the target directory to stdout
536 # if CDPATH is set.
537 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
538
539 sed_quote_subst='$sed_quote_subst'
540 double_quote_subst='$double_quote_subst'
541 delay_variable_subst='$delay_variable_subst'
542 _LT_CONFIG_STATUS_DECLARATIONS
543 LTCC='$LTCC'
544 LTCFLAGS='$LTCFLAGS'
545 compiler='$compiler_DEFAULT'
546
547 # A function that is used when there is no print builtin or printf.
548 func_fallback_echo ()
549 {
550 eval 'cat <<_LTECHO_EOF
551 \$[]1
552 _LTECHO_EOF'
553 }
554
555 # Quote evaled strings.
556 for var in lt_decl_all_varnames([[ \
557 ]], lt_decl_quote_varnames); do
558 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
559 *[[\\\\\\\`\\"\\\$]]*)
560 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
561 ;;
562 *)
563 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
564 ;;
565 esac
566 done
567
568 # Double-quote double-evaled strings.
569 for var in lt_decl_all_varnames([[ \
570 ]], lt_decl_dquote_varnames); do
571 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
572 *[[\\\\\\\`\\"\\\$]]*)
573 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
574 ;;
575 *)
576 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
577 ;;
578 esac
579 done
580
581 _LT_OUTPUT_LIBTOOL_INIT
582 ])
583
584 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
585 # ------------------------------------
586 # Generate a child script FILE with all initialization necessary to
587 # reuse the environment learned by the parent script, and make the
588 # file executable. If COMMENT is supplied, it is inserted after the
589 # '#!' sequence but before initialization text begins. After this
590 # macro, additional text can be appended to FILE to form the body of
591 # the child script. The macro ends with non-zero status if the
592 # file could not be fully written (such as if the disk is full).
593 m4_ifdef([AS_INIT_GENERATED],
594 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
595 [m4_defun([_LT_GENERATED_FILE_INIT],
596 [m4_require([AS_PREPARE])]dnl
597 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
598 [lt_write_fail=0
599 cat >$1 <<_ASEOF || lt_write_fail=1
600 #! $SHELL
601 # Generated by $as_me.
602 $2
603 SHELL=\${CONFIG_SHELL-$SHELL}
604 export SHELL
605 _ASEOF
606 cat >>$1 <<\_ASEOF || lt_write_fail=1
607 AS_SHELL_SANITIZE
608 _AS_PREPARE
609 exec AS_MESSAGE_FD>&1
610 _ASEOF
611 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
612 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
613
614 # LT_OUTPUT
615 # ---------
616 # This macro allows early generation of the libtool script (before
617 # AC_OUTPUT is called), incase it is used in configure for compilation
618 # tests.
619 AC_DEFUN([LT_OUTPUT],
620 [: ${CONFIG_LT=./config.lt}
621 AC_MSG_NOTICE([creating $CONFIG_LT])
622 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
623 [# Run this file to recreate a libtool stub with the current configuration.])
624
625 cat >>"$CONFIG_LT" <<\_LTEOF
626 lt_cl_silent=false
627 exec AS_MESSAGE_LOG_FD>>config.log
628 {
629 echo
630 AS_BOX([Running $as_me.])
631 } >&AS_MESSAGE_LOG_FD
632
633 lt_cl_help="\
634 '$as_me' creates a local libtool stub from the current configuration,
635 for use in further configure time tests before the real libtool is
636 generated.
637
638 Usage: $[0] [[OPTIONS]]
639
640 -h, --help print this help, then exit
641 -V, --version print version number, then exit
642 -q, --quiet do not print progress messages
643 -d, --debug don't remove temporary files
644
645 Report bugs to <bug-libtool@gnu.org>."
646
647 lt_cl_version="\
648 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
649 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
650 configured by $[0], generated by m4_PACKAGE_STRING.
651
652 Copyright (C) 2011 Free Software Foundation, Inc.
653 This config.lt script is free software; the Free Software Foundation
654 gives unlimited permision to copy, distribute and modify it."
655
656 while test 0 != $[#]
657 do
658 case $[1] in
659 --version | --v* | -V )
660 echo "$lt_cl_version"; exit 0 ;;
661 --help | --h* | -h )
662 echo "$lt_cl_help"; exit 0 ;;
663 --debug | --d* | -d )
664 debug=: ;;
665 --quiet | --q* | --silent | --s* | -q )
666 lt_cl_silent=: ;;
667
668 -*) AC_MSG_ERROR([unrecognized option: $[1]
669 Try '$[0] --help' for more information.]) ;;
670
671 *) AC_MSG_ERROR([unrecognized argument: $[1]
672 Try '$[0] --help' for more information.]) ;;
673 esac
674 shift
675 done
676
677 if $lt_cl_silent; then
678 exec AS_MESSAGE_FD>/dev/null
679 fi
680 _LTEOF
681
682 cat >>"$CONFIG_LT" <<_LTEOF
683 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
684 _LTEOF
685
686 cat >>"$CONFIG_LT" <<\_LTEOF
687 AC_MSG_NOTICE([creating $ofile])
688 _LT_OUTPUT_LIBTOOL_COMMANDS
689 AS_EXIT(0)
690 _LTEOF
691 chmod +x "$CONFIG_LT"
692
693 # configure is writing to config.log, but config.lt does its own redirection,
694 # appending to config.log, which fails on DOS, as config.log is still kept
695 # open by configure. Here we exec the FD to /dev/null, effectively closing
696 # config.log, so it can be properly (re)opened and appended to by config.lt.
697 lt_cl_success=:
698 test yes = "$silent" &&
699 lt_config_lt_args="$lt_config_lt_args --quiet"
700 exec AS_MESSAGE_LOG_FD>/dev/null
701 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
702 exec AS_MESSAGE_LOG_FD>>config.log
703 $lt_cl_success || AS_EXIT(1)
704 ])# LT_OUTPUT
705
706
707 # _LT_CONFIG(TAG)
708 # ---------------
709 # If TAG is the built-in tag, create an initial libtool script with a
710 # default configuration from the untagged config vars. Otherwise add code
711 # to config.status for appending the configuration named by TAG from the
712 # matching tagged config vars.
713 m4_defun([_LT_CONFIG],
714 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
715 _LT_CONFIG_SAVE_COMMANDS([
716 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
717 m4_if(_LT_TAG, [C], [
718 # See if we are running on zsh, and set the options that allow our
719 # commands through without removal of \ escapes.
720 if test -n "${ZSH_VERSION+set}"; then
721 setopt NO_GLOB_SUBST
722 fi
723
724 cfgfile=${ofile}T
725 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
726 $RM "$cfgfile"
727
728 cat <<_LT_EOF >> "$cfgfile"
729 #! $SHELL
730 # Generated automatically by $as_me ($PACKAGE) $VERSION
731 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
732 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
733
734 # Provide generalized library-building support services.
735 # Written by Gordon Matzigkeit, 1996
736
737 _LT_COPYING
738 _LT_LIBTOOL_TAGS
739
740 # Configured defaults for sys_lib_dlsearch_path munging.
741 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
742
743 # ### BEGIN LIBTOOL CONFIG
744 _LT_LIBTOOL_CONFIG_VARS
745 _LT_LIBTOOL_TAG_VARS
746 # ### END LIBTOOL CONFIG
747
748 _LT_EOF
749
750 cat <<'_LT_EOF' >> "$cfgfile"
751
752 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
753
754 _LT_PREPARE_MUNGE_PATH_LIST
755 _LT_PREPARE_CC_BASENAME
756
757 # ### END FUNCTIONS SHARED WITH CONFIGURE
758
759 _LT_EOF
760
761 case $host_os in
762 aix3*)
763 cat <<\_LT_EOF >> "$cfgfile"
764 # AIX sometimes has problems with the GCC collect2 program. For some
765 # reason, if we set the COLLECT_NAMES environment variable, the problems
766 # vanish in a puff of smoke.
767 if test set != "${COLLECT_NAMES+set}"; then
768 COLLECT_NAMES=
769 export COLLECT_NAMES
770 fi
771 _LT_EOF
772 ;;
773 esac
774
775 _LT_PROG_LTMAIN
776
777 # We use sed instead of cat because bash on DJGPP gets confused if
778 # if finds mixed CR/LF and LF-only lines. Since sed operates in
779 # text mode, it properly converts lines to CR/LF. This bash problem
780 # is reportedly fixed, but why not run on old versions too?
781 sed '$q' "$ltmain" >> "$cfgfile" \
782 || (rm -f "$cfgfile"; exit 1)
783
784 mv -f "$cfgfile" "$ofile" ||
785 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
786 chmod +x "$ofile"
787 ],
788 [cat <<_LT_EOF >> "$ofile"
789
790 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
791 dnl in a comment (ie after a #).
792 # ### BEGIN LIBTOOL TAG CONFIG: $1
793 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
794 # ### END LIBTOOL TAG CONFIG: $1
795 _LT_EOF
796 ])dnl /m4_if
797 ],
798 [m4_if([$1], [], [
799 PACKAGE='$PACKAGE'
800 VERSION='$VERSION'
801 RM='$RM'
802 ofile='$ofile'], [])
803 ])dnl /_LT_CONFIG_SAVE_COMMANDS
804 ])# _LT_CONFIG
805
806
807 # LT_SUPPORTED_TAG(TAG)
808 # ---------------------
809 # Trace this macro to discover what tags are supported by the libtool
810 # --tag option, using:
811 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
812 AC_DEFUN([LT_SUPPORTED_TAG], [])
813
814
815 # C support is built-in for now
816 m4_define([_LT_LANG_C_enabled], [])
817 m4_define([_LT_TAGS], [])
818
819
820 # LT_LANG(LANG)
821 # -------------
822 # Enable libtool support for the given language if not already enabled.
823 AC_DEFUN([LT_LANG],
824 [AC_BEFORE([$0], [LT_OUTPUT])dnl
825 m4_case([$1],
826 [C], [_LT_LANG(C)],
827 [C++], [_LT_LANG(CXX)],
828 [Go], [_LT_LANG(GO)],
829 [Java], [_LT_LANG(GCJ)],
830 [Fortran 77], [_LT_LANG(F77)],
831 [Fortran], [_LT_LANG(FC)],
832 [Windows Resource], [_LT_LANG(RC)],
833 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
834 [_LT_LANG($1)],
835 [m4_fatal([$0: unsupported language: "$1"])])])dnl
836 ])# LT_LANG
837
838
839 # _LT_LANG(LANGNAME)
840 # ------------------
841 m4_defun([_LT_LANG],
842 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
843 [LT_SUPPORTED_TAG([$1])dnl
844 m4_append([_LT_TAGS], [$1 ])dnl
845 m4_define([_LT_LANG_]$1[_enabled], [])dnl
846 _LT_LANG_$1_CONFIG($1)])dnl
847 ])# _LT_LANG
848
849
850 m4_ifndef([AC_PROG_GO], [
851 ############################################################
852 # NOTE: This macro has been submitted for inclusion into #
853 # GNU Autoconf as AC_PROG_GO. When it is available in #
854 # a released version of Autoconf we should remove this #
855 # macro and use it instead. #
856 ############################################################
857 m4_defun([AC_PROG_GO],
858 [AC_LANG_PUSH(Go)dnl
859 AC_ARG_VAR([GOC], [Go compiler command])dnl
860 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
861 _AC_ARG_VAR_LDFLAGS()dnl
862 AC_CHECK_TOOL(GOC, gccgo)
863 if test -z "$GOC"; then
864 if test -n "$ac_tool_prefix"; then
865 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
866 fi
867 fi
868 if test -z "$GOC"; then
869 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
870 fi
871 ])#m4_defun
872 ])#m4_ifndef
873
874
875 # _LT_LANG_DEFAULT_CONFIG
876 # -----------------------
877 m4_defun([_LT_LANG_DEFAULT_CONFIG],
878 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
879 [LT_LANG(CXX)],
880 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
881
882 AC_PROVIDE_IFELSE([AC_PROG_F77],
883 [LT_LANG(F77)],
884 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
885
886 AC_PROVIDE_IFELSE([AC_PROG_FC],
887 [LT_LANG(FC)],
888 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
889
890 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
891 dnl pulling things in needlessly.
892 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
893 [LT_LANG(GCJ)],
894 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
895 [LT_LANG(GCJ)],
896 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
897 [LT_LANG(GCJ)],
898 [m4_ifdef([AC_PROG_GCJ],
899 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
900 m4_ifdef([A][M_PROG_GCJ],
901 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
902 m4_ifdef([LT_PROG_GCJ],
903 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
904
905 AC_PROVIDE_IFELSE([AC_PROG_GO],
906 [LT_LANG(GO)],
907 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
908
909 AC_PROVIDE_IFELSE([LT_PROG_RC],
910 [LT_LANG(RC)],
911 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
912 ])# _LT_LANG_DEFAULT_CONFIG
913
914 # Obsolete macros:
915 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
916 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
917 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
918 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
919 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
920 dnl aclocal-1.4 backwards compatibility:
921 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
922 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
923 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
924 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
925 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
926
927
928 # _LT_TAG_COMPILER
929 # ----------------
930 m4_defun([_LT_TAG_COMPILER],
931 [AC_REQUIRE([AC_PROG_CC])dnl
932
933 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
934 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
935 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
936 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
937
938 # If no C compiler was specified, use CC.
939 LTCC=${LTCC-"$CC"}
940
941 # If no C compiler flags were specified, use CFLAGS.
942 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
943
944 # Allow CC to be a program name with arguments.
945 compiler=$CC
946 ])# _LT_TAG_COMPILER
947
948
949 # _LT_COMPILER_BOILERPLATE
950 # ------------------------
951 # Check for compiler boilerplate output or warnings with
952 # the simple compiler test code.
953 m4_defun([_LT_COMPILER_BOILERPLATE],
954 [m4_require([_LT_DECL_SED])dnl
955 ac_outfile=conftest.$ac_objext
956 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
957 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
958 _lt_compiler_boilerplate=`cat conftest.err`
959 $RM conftest*
960 ])# _LT_COMPILER_BOILERPLATE
961
962
963 # _LT_LINKER_BOILERPLATE
964 # ----------------------
965 # Check for linker boilerplate output or warnings with
966 # the simple link test code.
967 m4_defun([_LT_LINKER_BOILERPLATE],
968 [m4_require([_LT_DECL_SED])dnl
969 ac_outfile=conftest.$ac_objext
970 echo "$lt_simple_link_test_code" >conftest.$ac_ext
971 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
972 _lt_linker_boilerplate=`cat conftest.err`
973 $RM -r conftest*
974 ])# _LT_LINKER_BOILERPLATE
975
976 # _LT_REQUIRED_DARWIN_CHECKS
977 # -------------------------
978 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
979 case $host_os in
980 rhapsody* | darwin*)
981 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
982 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
983 AC_CHECK_TOOL([LIPO], [lipo], [:])
984 AC_CHECK_TOOL([OTOOL], [otool], [:])
985 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
986 _LT_DECL([], [DSYMUTIL], [1],
987 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
988 _LT_DECL([], [NMEDIT], [1],
989 [Tool to change global to local symbols on Mac OS X])
990 _LT_DECL([], [LIPO], [1],
991 [Tool to manipulate fat objects and archives on Mac OS X])
992 _LT_DECL([], [OTOOL], [1],
993 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
994 _LT_DECL([], [OTOOL64], [1],
995 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
996
997 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
998 [lt_cv_apple_cc_single_mod=no
999 if test -z "$LT_MULTI_MODULE"; then
1000 # By default we will add the -single_module flag. You can override
1001 # by either setting the environment variable LT_MULTI_MODULE
1002 # non-empty at configure time, or by adding -multi_module to the
1003 # link flags.
1004 rm -rf libconftest.dylib*
1005 echo "int foo(void){return 1;}" > conftest.c
1006 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1007 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1008 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1009 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1010 _lt_result=$?
1011 # If there is a non-empty error log, and "single_module"
1012 # appears in it, assume the flag caused a linker warning
1013 if test -s conftest.err && $GREP single_module conftest.err; then
1014 cat conftest.err >&AS_MESSAGE_LOG_FD
1015 # Otherwise, if the output was created with a 0 exit code from
1016 # the compiler, it worked.
1017 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1018 lt_cv_apple_cc_single_mod=yes
1019 else
1020 cat conftest.err >&AS_MESSAGE_LOG_FD
1021 fi
1022 rm -rf libconftest.dylib*
1023 rm -f conftest.*
1024 fi])
1025
1026 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1027 [lt_cv_ld_exported_symbols_list],
1028 [lt_cv_ld_exported_symbols_list=no
1029 save_LDFLAGS=$LDFLAGS
1030 echo "_main" > conftest.sym
1031 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1032 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1033 [lt_cv_ld_exported_symbols_list=yes],
1034 [lt_cv_ld_exported_symbols_list=no])
1035 LDFLAGS=$save_LDFLAGS
1036 ])
1037
1038 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1039 [lt_cv_ld_force_load=no
1040 cat > conftest.c << _LT_EOF
1041 int forced_loaded() { return 2;}
1042 _LT_EOF
1043 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1044 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1045 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1046 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1047 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1048 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1049 cat > conftest.c << _LT_EOF
1050 int main() { return 0;}
1051 _LT_EOF
1052 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1053 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1054 _lt_result=$?
1055 if test -s conftest.err && $GREP force_load conftest.err; then
1056 cat conftest.err >&AS_MESSAGE_LOG_FD
1057 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1058 lt_cv_ld_force_load=yes
1059 else
1060 cat conftest.err >&AS_MESSAGE_LOG_FD
1061 fi
1062 rm -f conftest.err libconftest.a conftest conftest.c
1063 rm -rf conftest.dSYM
1064 ])
1065 case $host_os in
1066 rhapsody* | darwin1.[[012]])
1067 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1068 darwin1.*)
1069 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1070 darwin*) # darwin 5.x on
1071 # if running on 10.5 or later, the deployment target defaults
1072 # to the OS version, if on x86, and 10.4, the deployment
1073 # target defaults to 10.4. Don't you love it?
1074 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1075 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1076 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1077 10.[[012]][[,.]]*)
1078 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1079 10.*)
1080 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1081 esac
1082 ;;
1083 esac
1084 if test yes = "$lt_cv_apple_cc_single_mod"; then
1085 _lt_dar_single_mod='$single_module'
1086 fi
1087 if test yes = "$lt_cv_ld_exported_symbols_list"; then
1088 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1089 else
1090 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1091 fi
1092 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1093 _lt_dsymutil='~$DSYMUTIL $lib || :'
1094 else
1095 _lt_dsymutil=
1096 fi
1097 ;;
1098 esac
1099 ])
1100
1101
1102 # _LT_DARWIN_LINKER_FEATURES([TAG])
1103 # ---------------------------------
1104 # Checks for linker and compiler features on darwin
1105 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1106 [
1107 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1108 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1109 _LT_TAGVAR(hardcode_direct, $1)=no
1110 _LT_TAGVAR(hardcode_automatic, $1)=yes
1111 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1112 if test yes = "$lt_cv_ld_force_load"; then
1113 _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\"`'
1114 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1115 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1116 else
1117 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1118 fi
1119 _LT_TAGVAR(link_all_deplibs, $1)=yes
1120 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1121 case $cc_basename in
1122 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1123 *) _lt_dar_can_shared=$GCC ;;
1124 esac
1125 if test yes = "$_lt_dar_can_shared"; then
1126 output_verbose_link_cmd=func_echo_all
1127 _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"
1128 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1129 _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"
1130 _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"
1131 m4_if([$1], [CXX],
1132 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
1133 _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"
1134 _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"
1135 fi
1136 ],[])
1137 else
1138 _LT_TAGVAR(ld_shlibs, $1)=no
1139 fi
1140 ])
1141
1142 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1143 # ----------------------------------
1144 # Links a minimal program and checks the executable
1145 # for the system default hardcoded library path. In most cases,
1146 # this is /usr/lib:/lib, but when the MPI compilers are used
1147 # the location of the communication and MPI libs are included too.
1148 # If we don't find anything, use the default library path according
1149 # to the aix ld manual.
1150 # Store the results from the different compilers for each TAGNAME.
1151 # Allow to override them for all tags through lt_cv_aix_libpath.
1152 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1153 [m4_require([_LT_DECL_SED])dnl
1154 if test set = "${lt_cv_aix_libpath+set}"; then
1155 aix_libpath=$lt_cv_aix_libpath
1156 else
1157 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1158 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1159 lt_aix_libpath_sed='[
1160 /Import File Strings/,/^$/ {
1161 /^0/ {
1162 s/^0 *\([^ ]*\) *$/\1/
1163 p
1164 }
1165 }]'
1166 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1167 # Check for a 64-bit object if we didn't find anything.
1168 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1169 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1170 fi],[])
1171 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1172 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1173 fi
1174 ])
1175 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1176 fi
1177 ])# _LT_SYS_MODULE_PATH_AIX
1178
1179
1180 # _LT_SHELL_INIT(ARG)
1181 # -------------------
1182 m4_define([_LT_SHELL_INIT],
1183 [m4_divert_text([M4SH-INIT], [$1
1184 ])])# _LT_SHELL_INIT
1185
1186
1187
1188 # _LT_PROG_ECHO_BACKSLASH
1189 # -----------------------
1190 # Find how we can fake an echo command that does not interpret backslash.
1191 # In particular, with Autoconf 2.60 or later we add some code to the start
1192 # of the generated configure script that will find a shell with a builtin
1193 # printf (that we can use as an echo command).
1194 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1195 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1196 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1197 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1198
1199 AC_MSG_CHECKING([how to print strings])
1200 # Test print first, because it will be a builtin if present.
1201 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1202 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1203 ECHO='print -r --'
1204 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1205 ECHO='printf %s\n'
1206 else
1207 # Use this function as a fallback that always works.
1208 func_fallback_echo ()
1209 {
1210 eval 'cat <<_LTECHO_EOF
1211 $[]1
1212 _LTECHO_EOF'
1213 }
1214 ECHO='func_fallback_echo'
1215 fi
1216
1217 # func_echo_all arg...
1218 # Invoke $ECHO with all args, space-separated.
1219 func_echo_all ()
1220 {
1221 $ECHO "$*"
1222 }
1223
1224 case $ECHO in
1225 printf*) AC_MSG_RESULT([printf]) ;;
1226 print*) AC_MSG_RESULT([print -r]) ;;
1227 *) AC_MSG_RESULT([cat]) ;;
1228 esac
1229
1230 m4_ifdef([_AS_DETECT_SUGGESTED],
1231 [_AS_DETECT_SUGGESTED([
1232 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1233 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1234 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1235 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1236 PATH=/empty FPATH=/empty; export PATH FPATH
1237 test "X`printf %s $ECHO`" = "X$ECHO" \
1238 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1239
1240 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1241 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1242 ])# _LT_PROG_ECHO_BACKSLASH
1243
1244
1245 # _LT_WITH_SYSROOT
1246 # ----------------
1247 AC_DEFUN([_LT_WITH_SYSROOT],
1248 [AC_MSG_CHECKING([for sysroot])
1249 AC_ARG_WITH([sysroot],
1250 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1251 [Search for dependent libraries within DIR (or the compiler's sysroot
1252 if not specified).])],
1253 [], [with_sysroot=no])
1254
1255 dnl lt_sysroot will always be passed unquoted. We quote it here
1256 dnl in case the user passed a directory name.
1257 lt_sysroot=
1258 case $with_sysroot in #(
1259 yes)
1260 if test yes = "$GCC"; then
1261 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1262 fi
1263 ;; #(
1264 /*)
1265 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1266 ;; #(
1267 no|'')
1268 ;; #(
1269 *)
1270 AC_MSG_RESULT([$with_sysroot])
1271 AC_MSG_ERROR([The sysroot must be an absolute path.])
1272 ;;
1273 esac
1274
1275 AC_MSG_RESULT([${lt_sysroot:-no}])
1276 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1277 [dependent libraries, and where our libraries should be installed.])])
1278
1279 # _LT_ENABLE_LOCK
1280 # ---------------
1281 m4_defun([_LT_ENABLE_LOCK],
1282 [AC_ARG_ENABLE([libtool-lock],
1283 [AS_HELP_STRING([--disable-libtool-lock],
1284 [avoid locking (might break parallel builds)])])
1285 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
1286
1287 # Some flags need to be propagated to the compiler or linker for good
1288 # libtool support.
1289 case $host in
1290 ia64-*-hpux*)
1291 # Find out what ABI is being produced by ac_compile, and set mode
1292 # options accordingly.
1293 echo 'int i;' > conftest.$ac_ext
1294 if AC_TRY_EVAL(ac_compile); then
1295 case `/usr/bin/file conftest.$ac_objext` in
1296 *ELF-32*)
1297 HPUX_IA64_MODE=32
1298 ;;
1299 *ELF-64*)
1300 HPUX_IA64_MODE=64
1301 ;;
1302 esac
1303 fi
1304 rm -rf conftest*
1305 ;;
1306 *-*-irix6*)
1307 # Find out what ABI is being produced by ac_compile, and set linker
1308 # options accordingly.
1309 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1310 if AC_TRY_EVAL(ac_compile); then
1311 if test yes = "$lt_cv_prog_gnu_ld"; then
1312 case `/usr/bin/file conftest.$ac_objext` in
1313 *32-bit*)
1314 LD="${LD-ld} -melf32bsmip"
1315 ;;
1316 *N32*)
1317 LD="${LD-ld} -melf32bmipn32"
1318 ;;
1319 *64-bit*)
1320 LD="${LD-ld} -melf64bmip"
1321 ;;
1322 esac
1323 else
1324 case `/usr/bin/file conftest.$ac_objext` in
1325 *32-bit*)
1326 LD="${LD-ld} -32"
1327 ;;
1328 *N32*)
1329 LD="${LD-ld} -n32"
1330 ;;
1331 *64-bit*)
1332 LD="${LD-ld} -64"
1333 ;;
1334 esac
1335 fi
1336 fi
1337 rm -rf conftest*
1338 ;;
1339
1340 mips64*-*linux*)
1341 # Find out what ABI is being produced by ac_compile, and set linker
1342 # options accordingly.
1343 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1344 if AC_TRY_EVAL(ac_compile); then
1345 emul=elf
1346 case `/usr/bin/file conftest.$ac_objext` in
1347 *32-bit*)
1348 emul="${emul}32"
1349 ;;
1350 *64-bit*)
1351 emul="${emul}64"
1352 ;;
1353 esac
1354 case `/usr/bin/file conftest.$ac_objext` in
1355 *MSB*)
1356 emul="${emul}btsmip"
1357 ;;
1358 *LSB*)
1359 emul="${emul}ltsmip"
1360 ;;
1361 esac
1362 case `/usr/bin/file conftest.$ac_objext` in
1363 *N32*)
1364 emul="${emul}n32"
1365 ;;
1366 esac
1367 LD="${LD-ld} -m $emul"
1368 fi
1369 rm -rf conftest*
1370 ;;
1371
1372 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1373 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1374 # Find out what ABI is being produced by ac_compile, and set linker
1375 # options accordingly. Note that the listed cases only cover the
1376 # situations where additional linker options are needed (such as when
1377 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1378 # vice versa); the common cases where no linker options are needed do
1379 # not appear in the list.
1380 echo 'int i;' > conftest.$ac_ext
1381 if AC_TRY_EVAL(ac_compile); then
1382 case `/usr/bin/file conftest.o` in
1383 *32-bit*)
1384 case $host in
1385 x86_64-*kfreebsd*-gnu)
1386 LD="${LD-ld} -m elf_i386_fbsd"
1387 ;;
1388 x86_64-*linux*)
1389 case `/usr/bin/file conftest.o` in
1390 *x86-64*)
1391 LD="${LD-ld} -m elf32_x86_64"
1392 ;;
1393 *)
1394 LD="${LD-ld} -m elf_i386"
1395 ;;
1396 esac
1397 ;;
1398 powerpc64le-*linux*)
1399 LD="${LD-ld} -m elf32lppclinux"
1400 ;;
1401 powerpc64-*linux*)
1402 LD="${LD-ld} -m elf32ppclinux"
1403 ;;
1404 s390x-*linux*)
1405 LD="${LD-ld} -m elf_s390"
1406 ;;
1407 sparc64-*linux*)
1408 LD="${LD-ld} -m elf32_sparc"
1409 ;;
1410 esac
1411 ;;
1412 *64-bit*)
1413 case $host in
1414 x86_64-*kfreebsd*-gnu)
1415 LD="${LD-ld} -m elf_x86_64_fbsd"
1416 ;;
1417 x86_64-*linux*)
1418 LD="${LD-ld} -m elf_x86_64"
1419 ;;
1420 powerpcle-*linux*)
1421 LD="${LD-ld} -m elf64lppc"
1422 ;;
1423 powerpc-*linux*)
1424 LD="${LD-ld} -m elf64ppc"
1425 ;;
1426 s390*-*linux*|s390*-*tpf*)
1427 LD="${LD-ld} -m elf64_s390"
1428 ;;
1429 sparc*-*linux*)
1430 LD="${LD-ld} -m elf64_sparc"
1431 ;;
1432 esac
1433 ;;
1434 esac
1435 fi
1436 rm -rf conftest*
1437 ;;
1438
1439 *-*-sco3.2v5*)
1440 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1441 SAVE_CFLAGS=$CFLAGS
1442 CFLAGS="$CFLAGS -belf"
1443 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1444 [AC_LANG_PUSH(C)
1445 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1446 AC_LANG_POP])
1447 if test yes != "$lt_cv_cc_needs_belf"; then
1448 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1449 CFLAGS=$SAVE_CFLAGS
1450 fi
1451 ;;
1452 *-*solaris*)
1453 # Find out what ABI is being produced by ac_compile, and set linker
1454 # options accordingly.
1455 echo 'int i;' > conftest.$ac_ext
1456 if AC_TRY_EVAL(ac_compile); then
1457 case `/usr/bin/file conftest.o` in
1458 *64-bit*)
1459 case $lt_cv_prog_gnu_ld in
1460 yes*)
1461 case $host in
1462 i?86-*-solaris*|x86_64-*-solaris*)
1463 LD="${LD-ld} -m elf_x86_64"
1464 ;;
1465 sparc*-*-solaris*)
1466 LD="${LD-ld} -m elf64_sparc"
1467 ;;
1468 esac
1469 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1470 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1471 LD=${LD-ld}_sol2
1472 fi
1473 ;;
1474 *)
1475 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1476 LD="${LD-ld} -64"
1477 fi
1478 ;;
1479 esac
1480 ;;
1481 esac
1482 fi
1483 rm -rf conftest*
1484 ;;
1485 esac
1486
1487 need_locks=$enable_libtool_lock
1488 ])# _LT_ENABLE_LOCK
1489
1490
1491 # _LT_PROG_AR
1492 # -----------
1493 m4_defun([_LT_PROG_AR],
1494 [AC_CHECK_TOOLS(AR, [ar], false)
1495 : ${AR=ar}
1496 : ${AR_FLAGS=cru}
1497 _LT_DECL([], [AR], [1], [The archiver])
1498 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1499
1500 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1501 [lt_cv_ar_at_file=no
1502 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1503 [echo conftest.$ac_objext > conftest.lst
1504 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1505 AC_TRY_EVAL([lt_ar_try])
1506 if test 0 -eq "$ac_status"; then
1507 # Ensure the archiver fails upon bogus file names.
1508 rm -f conftest.$ac_objext libconftest.a
1509 AC_TRY_EVAL([lt_ar_try])
1510 if test 0 -ne "$ac_status"; then
1511 lt_cv_ar_at_file=@
1512 fi
1513 fi
1514 rm -f conftest.* libconftest.a
1515 ])
1516 ])
1517
1518 if test no = "$lt_cv_ar_at_file"; then
1519 archiver_list_spec=
1520 else
1521 archiver_list_spec=$lt_cv_ar_at_file
1522 fi
1523 _LT_DECL([], [archiver_list_spec], [1],
1524 [How to feed a file listing to the archiver])
1525 ])# _LT_PROG_AR
1526
1527
1528 # _LT_CMD_OLD_ARCHIVE
1529 # -------------------
1530 m4_defun([_LT_CMD_OLD_ARCHIVE],
1531 [_LT_PROG_AR
1532
1533 AC_CHECK_TOOL(STRIP, strip, :)
1534 test -z "$STRIP" && STRIP=:
1535 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1536
1537 AC_CHECK_TOOL(RANLIB, ranlib, :)
1538 test -z "$RANLIB" && RANLIB=:
1539 _LT_DECL([], [RANLIB], [1],
1540 [Commands used to install an old-style archive])
1541
1542 # Determine commands to create old-style static archives.
1543 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1544 old_postinstall_cmds='chmod 644 $oldlib'
1545 old_postuninstall_cmds=
1546
1547 if test -n "$RANLIB"; then
1548 case $host_os in
1549 bitrig* | openbsd*)
1550 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1551 ;;
1552 *)
1553 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1554 ;;
1555 esac
1556 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1557 fi
1558
1559 case $host_os in
1560 darwin*)
1561 lock_old_archive_extraction=yes ;;
1562 *)
1563 lock_old_archive_extraction=no ;;
1564 esac
1565 _LT_DECL([], [old_postinstall_cmds], [2])
1566 _LT_DECL([], [old_postuninstall_cmds], [2])
1567 _LT_TAGDECL([], [old_archive_cmds], [2],
1568 [Commands used to build an old-style archive])
1569 _LT_DECL([], [lock_old_archive_extraction], [0],
1570 [Whether to use a lock for old archive extraction])
1571 ])# _LT_CMD_OLD_ARCHIVE
1572
1573
1574 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1575 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1576 # ----------------------------------------------------------------
1577 # Check whether the given compiler option works
1578 AC_DEFUN([_LT_COMPILER_OPTION],
1579 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1580 m4_require([_LT_DECL_SED])dnl
1581 AC_CACHE_CHECK([$1], [$2],
1582 [$2=no
1583 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1584 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1585 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
1586 # Insert the option either (1) after the last *FLAGS variable, or
1587 # (2) before a word containing "conftest.", or (3) at the end.
1588 # Note that $ac_compile itself does not contain backslashes and begins
1589 # with a dollar sign (not a hyphen), so the echo should work correctly.
1590 # The option is referenced via a variable to avoid confusing sed.
1591 lt_compile=`echo "$ac_compile" | $SED \
1592 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1593 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1594 -e 's:$: $lt_compiler_flag:'`
1595 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1596 (eval "$lt_compile" 2>conftest.err)
1597 ac_status=$?
1598 cat conftest.err >&AS_MESSAGE_LOG_FD
1599 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1600 if (exit $ac_status) && test -s "$ac_outfile"; then
1601 # The compiler can only warn and ignore the option if not recognized
1602 # So say no if there are warnings other than the usual output.
1603 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1604 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1605 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1606 $2=yes
1607 fi
1608 fi
1609 $RM conftest*
1610 ])
1611
1612 if test yes = "[$]$2"; then
1613 m4_if([$5], , :, [$5])
1614 else
1615 m4_if([$6], , :, [$6])
1616 fi
1617 ])# _LT_COMPILER_OPTION
1618
1619 # Old name:
1620 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1621 dnl aclocal-1.4 backwards compatibility:
1622 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1623
1624
1625 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1626 # [ACTION-SUCCESS], [ACTION-FAILURE])
1627 # ----------------------------------------------------
1628 # Check whether the given linker option works
1629 AC_DEFUN([_LT_LINKER_OPTION],
1630 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1631 m4_require([_LT_DECL_SED])dnl
1632 AC_CACHE_CHECK([$1], [$2],
1633 [$2=no
1634 save_LDFLAGS=$LDFLAGS
1635 LDFLAGS="$LDFLAGS $3"
1636 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1637 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1638 # The linker can only warn and ignore the option if not recognized
1639 # So say no if there are warnings
1640 if test -s conftest.err; then
1641 # Append any errors to the config.log.
1642 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1643 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1644 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1645 if diff conftest.exp conftest.er2 >/dev/null; then
1646 $2=yes
1647 fi
1648 else
1649 $2=yes
1650 fi
1651 fi
1652 $RM -r conftest*
1653 LDFLAGS=$save_LDFLAGS
1654 ])
1655
1656 if test yes = "[$]$2"; then
1657 m4_if([$4], , :, [$4])
1658 else
1659 m4_if([$5], , :, [$5])
1660 fi
1661 ])# _LT_LINKER_OPTION
1662
1663 # Old name:
1664 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1665 dnl aclocal-1.4 backwards compatibility:
1666 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1667
1668
1669 # LT_CMD_MAX_LEN
1670 #---------------
1671 AC_DEFUN([LT_CMD_MAX_LEN],
1672 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1673 # find the maximum length of command line arguments
1674 AC_MSG_CHECKING([the maximum length of command line arguments])
1675 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1676 i=0
1677 teststring=ABCD
1678
1679 case $build_os in
1680 msdosdjgpp*)
1681 # On DJGPP, this test can blow up pretty badly due to problems in libc
1682 # (any single argument exceeding 2000 bytes causes a buffer overrun
1683 # during glob expansion). Even if it were fixed, the result of this
1684 # check would be larger than it should be.
1685 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1686 ;;
1687
1688 gnu*)
1689 # Under GNU Hurd, this test is not required because there is
1690 # no limit to the length of command line arguments.
1691 # Libtool will interpret -1 as no limit whatsoever
1692 lt_cv_sys_max_cmd_len=-1;
1693 ;;
1694
1695 cygwin* | mingw* | cegcc*)
1696 # On Win9x/ME, this test blows up -- it succeeds, but takes
1697 # about 5 minutes as the teststring grows exponentially.
1698 # Worse, since 9x/ME are not pre-emptively multitasking,
1699 # you end up with a "frozen" computer, even though with patience
1700 # the test eventually succeeds (with a max line length of 256k).
1701 # Instead, let's just punt: use the minimum linelength reported by
1702 # all of the supported platforms: 8192 (on NT/2K/XP).
1703 lt_cv_sys_max_cmd_len=8192;
1704 ;;
1705
1706 mint*)
1707 # On MiNT this can take a long time and run out of memory.
1708 lt_cv_sys_max_cmd_len=8192;
1709 ;;
1710
1711 amigaos*)
1712 # On AmigaOS with pdksh, this test takes hours, literally.
1713 # So we just punt and use a minimum line length of 8192.
1714 lt_cv_sys_max_cmd_len=8192;
1715 ;;
1716
1717 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
1718 # This has been around since 386BSD, at least. Likely further.
1719 if test -x /sbin/sysctl; then
1720 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1721 elif test -x /usr/sbin/sysctl; then
1722 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1723 else
1724 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1725 fi
1726 # And add a safety zone
1727 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1728 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1729 ;;
1730
1731 interix*)
1732 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1733 lt_cv_sys_max_cmd_len=196608
1734 ;;
1735
1736 os2*)
1737 # The test takes a long time on OS/2.
1738 lt_cv_sys_max_cmd_len=8192
1739 ;;
1740
1741 osf*)
1742 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1743 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1744 # nice to cause kernel panics so lets avoid the loop below.
1745 # First set a reasonable default.
1746 lt_cv_sys_max_cmd_len=16384
1747 #
1748 if test -x /sbin/sysconfig; then
1749 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1750 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1751 esac
1752 fi
1753 ;;
1754 sco3.2v5*)
1755 lt_cv_sys_max_cmd_len=102400
1756 ;;
1757 sysv5* | sco5v6* | sysv4.2uw2*)
1758 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1759 if test -n "$kargmax"; then
1760 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1761 else
1762 lt_cv_sys_max_cmd_len=32768
1763 fi
1764 ;;
1765 *)
1766 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1767 if test -n "$lt_cv_sys_max_cmd_len" && \
1768 test undefined != "$lt_cv_sys_max_cmd_len"; then
1769 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1770 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1771 else
1772 # Make teststring a little bigger before we do anything with it.
1773 # a 1K string should be a reasonable start.
1774 for i in 1 2 3 4 5 6 7 8; do
1775 teststring=$teststring$teststring
1776 done
1777 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1778 # If test is not a shell built-in, we'll probably end up computing a
1779 # maximum length that is only half of the actual maximum length, but
1780 # we can't tell.
1781 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1782 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1783 test 17 != "$i" # 1/2 MB should be enough
1784 do
1785 i=`expr $i + 1`
1786 teststring=$teststring$teststring
1787 done
1788 # Only check the string length outside the loop.
1789 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1790 teststring=
1791 # Add a significant safety factor because C++ compilers can tack on
1792 # massive amounts of additional arguments before passing them to the
1793 # linker. It appears as though 1/2 is a usable value.
1794 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1795 fi
1796 ;;
1797 esac
1798 ])
1799 if test -n "$lt_cv_sys_max_cmd_len"; then
1800 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1801 else
1802 AC_MSG_RESULT(none)
1803 fi
1804 max_cmd_len=$lt_cv_sys_max_cmd_len
1805 _LT_DECL([], [max_cmd_len], [0],
1806 [What is the maximum length of a command?])
1807 ])# LT_CMD_MAX_LEN
1808
1809 # Old name:
1810 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1811 dnl aclocal-1.4 backwards compatibility:
1812 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1813
1814
1815 # _LT_HEADER_DLFCN
1816 # ----------------
1817 m4_defun([_LT_HEADER_DLFCN],
1818 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1819 ])# _LT_HEADER_DLFCN
1820
1821
1822 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1823 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1824 # ----------------------------------------------------------------
1825 m4_defun([_LT_TRY_DLOPEN_SELF],
1826 [m4_require([_LT_HEADER_DLFCN])dnl
1827 if test yes = "$cross_compiling"; then :
1828 [$4]
1829 else
1830 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1831 lt_status=$lt_dlunknown
1832 cat > conftest.$ac_ext <<_LT_EOF
1833 [#line $LINENO "configure"
1834 #include "confdefs.h"
1835
1836 #if HAVE_DLFCN_H
1837 #include <dlfcn.h>
1838 #endif
1839
1840 #include <stdio.h>
1841
1842 #ifdef RTLD_GLOBAL
1843 # define LT_DLGLOBAL RTLD_GLOBAL
1844 #else
1845 # ifdef DL_GLOBAL
1846 # define LT_DLGLOBAL DL_GLOBAL
1847 # else
1848 # define LT_DLGLOBAL 0
1849 # endif
1850 #endif
1851
1852 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1853 find out it does not work in some platform. */
1854 #ifndef LT_DLLAZY_OR_NOW
1855 # ifdef RTLD_LAZY
1856 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1857 # else
1858 # ifdef DL_LAZY
1859 # define LT_DLLAZY_OR_NOW DL_LAZY
1860 # else
1861 # ifdef RTLD_NOW
1862 # define LT_DLLAZY_OR_NOW RTLD_NOW
1863 # else
1864 # ifdef DL_NOW
1865 # define LT_DLLAZY_OR_NOW DL_NOW
1866 # else
1867 # define LT_DLLAZY_OR_NOW 0
1868 # endif
1869 # endif
1870 # endif
1871 # endif
1872 #endif
1873
1874 /* When -fvisibility=hidden is used, assume the code has been annotated
1875 correspondingly for the symbols needed. */
1876 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1877 int fnord () __attribute__((visibility("default")));
1878 #endif
1879
1880 int fnord () { return 42; }
1881 int main ()
1882 {
1883 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1884 int status = $lt_dlunknown;
1885
1886 if (self)
1887 {
1888 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1889 else
1890 {
1891 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1892 else puts (dlerror ());
1893 }
1894 /* dlclose (self); */
1895 }
1896 else
1897 puts (dlerror ());
1898
1899 return status;
1900 }]
1901 _LT_EOF
1902 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1903 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1904 lt_status=$?
1905 case x$lt_status in
1906 x$lt_dlno_uscore) $1 ;;
1907 x$lt_dlneed_uscore) $2 ;;
1908 x$lt_dlunknown|x*) $3 ;;
1909 esac
1910 else :
1911 # compilation failed
1912 $3
1913 fi
1914 fi
1915 rm -fr conftest*
1916 ])# _LT_TRY_DLOPEN_SELF
1917
1918
1919 # LT_SYS_DLOPEN_SELF
1920 # ------------------
1921 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1922 [m4_require([_LT_HEADER_DLFCN])dnl
1923 if test yes != "$enable_dlopen"; then
1924 enable_dlopen=unknown
1925 enable_dlopen_self=unknown
1926 enable_dlopen_self_static=unknown
1927 else
1928 lt_cv_dlopen=no
1929 lt_cv_dlopen_libs=
1930
1931 case $host_os in
1932 beos*)
1933 lt_cv_dlopen=load_add_on
1934 lt_cv_dlopen_libs=
1935 lt_cv_dlopen_self=yes
1936 ;;
1937
1938 mingw* | pw32* | cegcc*)
1939 lt_cv_dlopen=LoadLibrary
1940 lt_cv_dlopen_libs=
1941 ;;
1942
1943 cygwin*)
1944 lt_cv_dlopen=dlopen
1945 lt_cv_dlopen_libs=
1946 ;;
1947
1948 darwin*)
1949 # if libdl is installed we need to link against it
1950 AC_CHECK_LIB([dl], [dlopen],
1951 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1952 lt_cv_dlopen=dyld
1953 lt_cv_dlopen_libs=
1954 lt_cv_dlopen_self=yes
1955 ])
1956 ;;
1957
1958 tpf*)
1959 # Don't try to run any link tests for TPF. We know it's impossible
1960 # because TPF is a cross-compiler, and we know how we open DSOs.
1961 lt_cv_dlopen=dlopen
1962 lt_cv_dlopen_libs=
1963 lt_cv_dlopen_self=no
1964 ;;
1965
1966 *)
1967 AC_CHECK_FUNC([shl_load],
1968 [lt_cv_dlopen=shl_load],
1969 [AC_CHECK_LIB([dld], [shl_load],
1970 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
1971 [AC_CHECK_FUNC([dlopen],
1972 [lt_cv_dlopen=dlopen],
1973 [AC_CHECK_LIB([dl], [dlopen],
1974 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
1975 [AC_CHECK_LIB([svld], [dlopen],
1976 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
1977 [AC_CHECK_LIB([dld], [dld_link],
1978 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
1979 ])
1980 ])
1981 ])
1982 ])
1983 ])
1984 ;;
1985 esac
1986
1987 if test no = "$lt_cv_dlopen"; then
1988 enable_dlopen=no
1989 else
1990 enable_dlopen=yes
1991 fi
1992
1993 case $lt_cv_dlopen in
1994 dlopen)
1995 save_CPPFLAGS=$CPPFLAGS
1996 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1997
1998 save_LDFLAGS=$LDFLAGS
1999 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2000
2001 save_LIBS=$LIBS
2002 LIBS="$lt_cv_dlopen_libs $LIBS"
2003
2004 AC_CACHE_CHECK([whether a program can dlopen itself],
2005 lt_cv_dlopen_self, [dnl
2006 _LT_TRY_DLOPEN_SELF(
2007 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2008 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2009 ])
2010
2011 if test yes = "$lt_cv_dlopen_self"; then
2012 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2013 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2014 lt_cv_dlopen_self_static, [dnl
2015 _LT_TRY_DLOPEN_SELF(
2016 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2017 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2018 ])
2019 fi
2020
2021 CPPFLAGS=$save_CPPFLAGS
2022 LDFLAGS=$save_LDFLAGS
2023 LIBS=$save_LIBS
2024 ;;
2025 esac
2026
2027 case $lt_cv_dlopen_self in
2028 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2029 *) enable_dlopen_self=unknown ;;
2030 esac
2031
2032 case $lt_cv_dlopen_self_static in
2033 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2034 *) enable_dlopen_self_static=unknown ;;
2035 esac
2036 fi
2037 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2038 [Whether dlopen is supported])
2039 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2040 [Whether dlopen of programs is supported])
2041 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2042 [Whether dlopen of statically linked programs is supported])
2043 ])# LT_SYS_DLOPEN_SELF
2044
2045 # Old name:
2046 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2047 dnl aclocal-1.4 backwards compatibility:
2048 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2049
2050
2051 # _LT_COMPILER_C_O([TAGNAME])
2052 # ---------------------------
2053 # Check to see if options -c and -o are simultaneously supported by compiler.
2054 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2055 m4_defun([_LT_COMPILER_C_O],
2056 [m4_require([_LT_DECL_SED])dnl
2057 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2058 m4_require([_LT_TAG_COMPILER])dnl
2059 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2060 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2061 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2062 $RM -r conftest 2>/dev/null
2063 mkdir conftest
2064 cd conftest
2065 mkdir out
2066 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2067
2068 lt_compiler_flag="-o out/conftest2.$ac_objext"
2069 # Insert the option either (1) after the last *FLAGS variable, or
2070 # (2) before a word containing "conftest.", or (3) at the end.
2071 # Note that $ac_compile itself does not contain backslashes and begins
2072 # with a dollar sign (not a hyphen), so the echo should work correctly.
2073 lt_compile=`echo "$ac_compile" | $SED \
2074 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2075 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2076 -e 's:$: $lt_compiler_flag:'`
2077 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2078 (eval "$lt_compile" 2>out/conftest.err)
2079 ac_status=$?
2080 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2081 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2082 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2083 then
2084 # The compiler can only warn and ignore the option if not recognized
2085 # So say no if there are warnings
2086 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2087 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2088 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2089 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2090 fi
2091 fi
2092 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2093 $RM conftest*
2094 # SGI C++ compiler will create directory out/ii_files/ for
2095 # template instantiation
2096 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2097 $RM out/* && rmdir out
2098 cd ..
2099 $RM -r conftest
2100 $RM conftest*
2101 ])
2102 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2103 [Does compiler simultaneously support -c and -o options?])
2104 ])# _LT_COMPILER_C_O
2105
2106
2107 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2108 # ----------------------------------
2109 # Check to see if we can do hard links to lock some files if needed
2110 m4_defun([_LT_COMPILER_FILE_LOCKS],
2111 [m4_require([_LT_ENABLE_LOCK])dnl
2112 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2113 _LT_COMPILER_C_O([$1])
2114
2115 hard_links=nottested
2116 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2117 # do not overwrite the value of need_locks provided by the user
2118 AC_MSG_CHECKING([if we can lock with hard links])
2119 hard_links=yes
2120 $RM conftest*
2121 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2122 touch conftest.a
2123 ln conftest.a conftest.b 2>&5 || hard_links=no
2124 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2125 AC_MSG_RESULT([$hard_links])
2126 if test no = "$hard_links"; then
2127 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2128 need_locks=warn
2129 fi
2130 else
2131 need_locks=no
2132 fi
2133 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2134 ])# _LT_COMPILER_FILE_LOCKS
2135
2136
2137 # _LT_CHECK_OBJDIR
2138 # ----------------
2139 m4_defun([_LT_CHECK_OBJDIR],
2140 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2141 [rm -f .libs 2>/dev/null
2142 mkdir .libs 2>/dev/null
2143 if test -d .libs; then
2144 lt_cv_objdir=.libs
2145 else
2146 # MS-DOS does not allow filenames that begin with a dot.
2147 lt_cv_objdir=_libs
2148 fi
2149 rmdir .libs 2>/dev/null])
2150 objdir=$lt_cv_objdir
2151 _LT_DECL([], [objdir], [0],
2152 [The name of the directory that contains temporary libtool files])dnl
2153 m4_pattern_allow([LT_OBJDIR])dnl
2154 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2155 [Define to the sub-directory where libtool stores uninstalled libraries.])
2156 ])# _LT_CHECK_OBJDIR
2157
2158
2159 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2160 # --------------------------------------
2161 # Check hardcoding attributes.
2162 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2163 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2164 _LT_TAGVAR(hardcode_action, $1)=
2165 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2166 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2167 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2168
2169 # We can hardcode non-existent directories.
2170 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2171 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2172 # have to relink, otherwise we might link with an installed library
2173 # when we should be linking with a yet-to-be-installed one
2174 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2175 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2176 # Linking always hardcodes the temporary library directory.
2177 _LT_TAGVAR(hardcode_action, $1)=relink
2178 else
2179 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2180 _LT_TAGVAR(hardcode_action, $1)=immediate
2181 fi
2182 else
2183 # We cannot hardcode anything, or else we can only hardcode existing
2184 # directories.
2185 _LT_TAGVAR(hardcode_action, $1)=unsupported
2186 fi
2187 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2188
2189 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2190 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2191 # Fast installation is not supported
2192 enable_fast_install=no
2193 elif test yes = "$shlibpath_overrides_runpath" ||
2194 test no = "$enable_shared"; then
2195 # Fast installation is not necessary
2196 enable_fast_install=needless
2197 fi
2198 _LT_TAGDECL([], [hardcode_action], [0],
2199 [How to hardcode a shared library path into an executable])
2200 ])# _LT_LINKER_HARDCODE_LIBPATH
2201
2202
2203 # _LT_CMD_STRIPLIB
2204 # ----------------
2205 m4_defun([_LT_CMD_STRIPLIB],
2206 [m4_require([_LT_DECL_EGREP])
2207 striplib=
2208 old_striplib=
2209 AC_MSG_CHECKING([whether stripping libraries is possible])
2210 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2211 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2212 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2213 AC_MSG_RESULT([yes])
2214 else
2215 # FIXME - insert some real tests, host_os isn't really good enough
2216 case $host_os in
2217 darwin*)
2218 if test -n "$STRIP"; then
2219 striplib="$STRIP -x"
2220 old_striplib="$STRIP -S"
2221 AC_MSG_RESULT([yes])
2222 else
2223 AC_MSG_RESULT([no])
2224 fi
2225 ;;
2226 *)
2227 AC_MSG_RESULT([no])
2228 ;;
2229 esac
2230 fi
2231 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2232 _LT_DECL([], [striplib], [1])
2233 ])# _LT_CMD_STRIPLIB
2234
2235
2236 # _LT_PREPARE_MUNGE_PATH_LIST
2237 # ---------------------------
2238 # Make sure func_munge_path_list() is defined correctly.
2239 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2240 [[# func_munge_path_list VARIABLE PATH
2241 # -----------------------------------
2242 # VARIABLE is name of variable containing _space_ separated list of
2243 # directories to be munged by the contents of PATH, which is string
2244 # having a format:
2245 # "DIR[:DIR]:"
2246 # string "DIR[ DIR]" will be prepended to VARIABLE
2247 # ":DIR[:DIR]"
2248 # string "DIR[ DIR]" will be appended to VARIABLE
2249 # "DIRP[:DIRP]::[DIRA:]DIRA"
2250 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2251 # "DIRA[ DIRA]" will be appended to VARIABLE
2252 # "DIR[:DIR]"
2253 # VARIABLE will be replaced by "DIR[ DIR]"
2254 func_munge_path_list ()
2255 {
2256 case x@S|@2 in
2257 x)
2258 ;;
2259 *:)
2260 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2261 ;;
2262 x:*)
2263 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2264 ;;
2265 *::*)
2266 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2267 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2268 ;;
2269 *)
2270 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2271 ;;
2272 esac
2273 }
2274 ]])# _LT_PREPARE_PATH_LIST
2275
2276
2277 # _LT_SYS_DYNAMIC_LINKER([TAG])
2278 # -----------------------------
2279 # PORTME Fill in your ld.so characteristics
2280 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2281 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2282 m4_require([_LT_DECL_EGREP])dnl
2283 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2284 m4_require([_LT_DECL_OBJDUMP])dnl
2285 m4_require([_LT_DECL_SED])dnl
2286 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2287 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2288 AC_MSG_CHECKING([dynamic linker characteristics])
2289 m4_if([$1],
2290 [], [
2291 if test yes = "$GCC"; then
2292 case $host_os in
2293 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2294 *) lt_awk_arg='/^libraries:/' ;;
2295 esac
2296 case $host_os in
2297 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2298 *) lt_sed_strip_eq='s|=/|/|g' ;;
2299 esac
2300 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2301 case $lt_search_path_spec in
2302 *\;*)
2303 # if the path contains ";" then we assume it to be the separator
2304 # otherwise default to the standard path separator (i.e. ":") - it is
2305 # assumed that no part of a normal pathname contains ";" but that should
2306 # okay in the real world where ";" in dirpaths is itself problematic.
2307 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2308 ;;
2309 *)
2310 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2311 ;;
2312 esac
2313 # Ok, now we have the path, separated by spaces, we can step through it
2314 # and add multilib dir if necessary...
2315 lt_tmp_lt_search_path_spec=
2316 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2317 # ...but if some path component already ends with the multilib dir we assume
2318 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2319 case "$lt_multi_os_dir; $lt_search_path_spec " in
2320 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2321 lt_multi_os_dir=
2322 ;;
2323 esac
2324 for lt_sys_path in $lt_search_path_spec; do
2325 if test -d "$lt_sys_path$lt_multi_os_dir"; then
2326 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2327 elif test -n "$lt_multi_os_dir"; then
2328 test -d "$lt_sys_path" && \
2329 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2330 fi
2331 done
2332 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2333 BEGIN {RS = " "; FS = "/|\n";} {
2334 lt_foo = "";
2335 lt_count = 0;
2336 for (lt_i = NF; lt_i > 0; lt_i--) {
2337 if ($lt_i != "" && $lt_i != ".") {
2338 if ($lt_i == "..") {
2339 lt_count++;
2340 } else {
2341 if (lt_count == 0) {
2342 lt_foo = "/" $lt_i lt_foo;
2343 } else {
2344 lt_count--;
2345 }
2346 }
2347 }
2348 }
2349 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2350 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2351 }'`
2352 # AWK program above erroneously prepends '/' to C:/dos/paths
2353 # for these hosts.
2354 case $host_os in
2355 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2356 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2357 esac
2358 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2359 else
2360 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2361 fi])
2362 library_names_spec=
2363 libname_spec='lib$name'
2364 soname_spec=
2365 shrext_cmds=.so
2366 postinstall_cmds=
2367 postuninstall_cmds=
2368 finish_cmds=
2369 finish_eval=
2370 shlibpath_var=
2371 shlibpath_overrides_runpath=unknown
2372 version_type=none
2373 dynamic_linker="$host_os ld.so"
2374 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2375 need_lib_prefix=unknown
2376 hardcode_into_libs=no
2377
2378 # when you set need_version to no, make sure it does not cause -set_version
2379 # flags to be left without arguments
2380 need_version=unknown
2381
2382 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2383 [User-defined run-time library search path.])
2384
2385 case $host_os in
2386 aix3*)
2387 version_type=linux # correct to gnu/linux during the next big refactor
2388 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2389 shlibpath_var=LIBPATH
2390
2391 # AIX 3 has no versioning support, so we append a major version to the name.
2392 soname_spec='$libname$release$shared_ext$major'
2393 ;;
2394
2395 aix[[4-9]]*)
2396 version_type=linux # correct to gnu/linux during the next big refactor
2397 need_lib_prefix=no
2398 need_version=no
2399 hardcode_into_libs=yes
2400 if test ia64 = "$host_cpu"; then
2401 # AIX 5 supports IA64
2402 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2403 shlibpath_var=LD_LIBRARY_PATH
2404 else
2405 # With GCC up to 2.95.x, collect2 would create an import file
2406 # for dependence libraries. The import file would start with
2407 # the line '#! .'. This would cause the generated library to
2408 # depend on '.', always an invalid library. This was fixed in
2409 # development snapshots of GCC prior to 3.0.
2410 case $host_os in
2411 aix4 | aix4.[[01]] | aix4.[[01]].*)
2412 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2413 echo ' yes '
2414 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2415 :
2416 else
2417 can_build_shared=no
2418 fi
2419 ;;
2420 esac
2421 # Using Import Files as archive members, it is possible to support
2422 # filename-based versioning of shared library archives on AIX. While
2423 # this would work for both with and without runtime linking, it will
2424 # prevent static linking of such archives. So we do filename-based
2425 # shared library versioning with .so extension only, which is used
2426 # when both runtime linking and shared linking is enabled.
2427 # Unfortunately, runtime linking may impact performance, so we do
2428 # not want this to be the default eventually. Also, we use the
2429 # versioned .so libs for executables only if there is the -brtl
2430 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2431 # To allow for filename-based versioning support, we need to create
2432 # libNAME.so.V as an archive file, containing:
2433 # *) an Import File, referring to the versioned filename of the
2434 # archive as well as the shared archive member, telling the
2435 # bitwidth (32 or 64) of that shared object, and providing the
2436 # list of exported symbols of that shared object, eventually
2437 # decorated with the 'weak' keyword
2438 # *) the shared object with the F_LOADONLY flag set, to really avoid
2439 # it being seen by the linker.
2440 # At run time we better use the real file rather than another symlink,
2441 # but for link time we create the symlink libNAME.so -> libNAME.so.V
2442
2443 case $with_aix_soname,$aix_use_runtimelinking in
2444 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2445 # soname into executable. Probably we can add versioning support to
2446 # collect2, so additional links can be useful in future.
2447 aix,yes) # traditional libtool
2448 dynamic_linker='AIX unversionable lib.so'
2449 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2450 # instead of lib<name>.a to let people know that these are not
2451 # typical AIX shared libraries.
2452 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2453 ;;
2454 aix,no) # traditional AIX only
2455 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2456 # We preserve .a as extension for shared libraries through AIX4.2
2457 # and later when we are not doing run time linking.
2458 library_names_spec='$libname$release.a $libname.a'
2459 soname_spec='$libname$release$shared_ext$major'
2460 ;;
2461 svr4,*) # full svr4 only
2462 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2463 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2464 # We do not specify a path in Import Files, so LIBPATH fires.
2465 shlibpath_overrides_runpath=yes
2466 ;;
2467 *,yes) # both, prefer svr4
2468 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2469 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2470 # unpreferred sharedlib libNAME.a needs extra handling
2471 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
2472 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
2473 # We do not specify a path in Import Files, so LIBPATH fires.
2474 shlibpath_overrides_runpath=yes
2475 ;;
2476 *,no) # both, prefer aix
2477 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2478 library_names_spec='$libname$release.a $libname.a'
2479 soname_spec='$libname$release$shared_ext$major'
2480 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2481 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
2482 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
2483 ;;
2484 esac
2485 shlibpath_var=LIBPATH
2486 fi
2487 ;;
2488
2489 amigaos*)
2490 case $host_cpu in
2491 powerpc)
2492 # Since July 2007 AmigaOS4 officially supports .so libraries.
2493 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2494 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2495 ;;
2496 m68k)
2497 library_names_spec='$libname.ixlibrary $libname.a'
2498 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2499 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2500 ;;
2501 esac
2502 ;;
2503
2504 beos*)
2505 library_names_spec='$libname$shared_ext'
2506 dynamic_linker="$host_os ld.so"
2507 shlibpath_var=LIBRARY_PATH
2508 ;;
2509
2510 bsdi[[45]]*)
2511 version_type=linux # correct to gnu/linux during the next big refactor
2512 need_version=no
2513 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2514 soname_spec='$libname$release$shared_ext$major'
2515 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2516 shlibpath_var=LD_LIBRARY_PATH
2517 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2518 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2519 # the default ld.so.conf also contains /usr/contrib/lib and
2520 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2521 # libtool to hard-code these into programs
2522 ;;
2523
2524 cygwin* | mingw* | pw32* | cegcc*)
2525 version_type=windows
2526 shrext_cmds=.dll
2527 need_version=no
2528 need_lib_prefix=no
2529
2530 case $GCC,$cc_basename in
2531 yes,*)
2532 # gcc
2533 library_names_spec='$libname.dll.a'
2534 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2535 postinstall_cmds='base_file=`basename \$file`~
2536 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2537 dldir=$destdir/`dirname \$dlpath`~
2538 test -d \$dldir || mkdir -p \$dldir~
2539 $install_prog $dir/$dlname \$dldir/$dlname~
2540 chmod a+x \$dldir/$dlname~
2541 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2542 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2543 fi'
2544 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2545 dlpath=$dir/\$dldll~
2546 $RM \$dlpath'
2547 shlibpath_overrides_runpath=yes
2548
2549 case $host_os in
2550 cygwin*)
2551 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2552 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2553 m4_if([$1], [],[
2554 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2555 ;;
2556 mingw* | cegcc*)
2557 # MinGW DLLs use traditional 'lib' prefix
2558 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2559 ;;
2560 pw32*)
2561 # pw32 DLLs use 'pw' prefix rather than 'lib'
2562 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2563 ;;
2564 esac
2565 dynamic_linker='Win32 ld.exe'
2566 ;;
2567
2568 *,cl*)
2569 # Native MSVC
2570 libname_spec='$name'
2571 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2572 library_names_spec='$libname.dll.lib'
2573
2574 case $build_os in
2575 mingw*)
2576 sys_lib_search_path_spec=
2577 lt_save_ifs=$IFS
2578 IFS=';'
2579 for lt_path in $LIB
2580 do
2581 IFS=$lt_save_ifs
2582 # Let DOS variable expansion print the short 8.3 style file name.
2583 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2584 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2585 done
2586 IFS=$lt_save_ifs
2587 # Convert to MSYS style.
2588 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2589 ;;
2590 cygwin*)
2591 # Convert to unix form, then to dos form, then back to unix form
2592 # but this time dos style (no spaces!) so that the unix form looks
2593 # like /cygdrive/c/PROGRA~1:/cygdr...
2594 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2595 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2596 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2597 ;;
2598 *)
2599 sys_lib_search_path_spec=$LIB
2600 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2601 # It is most probably a Windows format PATH.
2602 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2603 else
2604 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2605 fi
2606 # FIXME: find the short name or the path components, as spaces are
2607 # common. (e.g. "Program Files" -> "PROGRA~1")
2608 ;;
2609 esac
2610
2611 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2612 postinstall_cmds='base_file=`basename \$file`~
2613 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2614 dldir=$destdir/`dirname \$dlpath`~
2615 test -d \$dldir || mkdir -p \$dldir~
2616 $install_prog $dir/$dlname \$dldir/$dlname'
2617 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2618 dlpath=$dir/\$dldll~
2619 $RM \$dlpath'
2620 shlibpath_overrides_runpath=yes
2621 dynamic_linker='Win32 link.exe'
2622 ;;
2623
2624 *)
2625 # Assume MSVC wrapper
2626 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2627 dynamic_linker='Win32 ld.exe'
2628 ;;
2629 esac
2630 # FIXME: first we should search . and the directory the executable is in
2631 shlibpath_var=PATH
2632 ;;
2633
2634 darwin* | rhapsody*)
2635 dynamic_linker="$host_os dyld"
2636 version_type=darwin
2637 need_lib_prefix=no
2638 need_version=no
2639 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2640 soname_spec='$libname$release$major$shared_ext'
2641 shlibpath_overrides_runpath=yes
2642 shlibpath_var=DYLD_LIBRARY_PATH
2643 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2644 m4_if([$1], [],[
2645 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2646 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2647 ;;
2648
2649 dgux*)
2650 version_type=linux # correct to gnu/linux during the next big refactor
2651 need_lib_prefix=no
2652 need_version=no
2653 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2654 soname_spec='$libname$release$shared_ext$major'
2655 shlibpath_var=LD_LIBRARY_PATH
2656 ;;
2657
2658 freebsd* | dragonfly*)
2659 # DragonFly does not have aout. When/if they implement a new
2660 # versioning mechanism, adjust this.
2661 if test -x /usr/bin/objformat; then
2662 objformat=`/usr/bin/objformat`
2663 else
2664 case $host_os in
2665 freebsd[[23]].*) objformat=aout ;;
2666 *) objformat=elf ;;
2667 esac
2668 fi
2669 version_type=freebsd-$objformat
2670 case $version_type in
2671 freebsd-elf*)
2672 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2673 soname_spec='$libname$release$shared_ext$major'
2674 need_version=no
2675 need_lib_prefix=no
2676 ;;
2677 freebsd-*)
2678 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2679 need_version=yes
2680 ;;
2681 esac
2682 shlibpath_var=LD_LIBRARY_PATH
2683 case $host_os in
2684 freebsd2.*)
2685 shlibpath_overrides_runpath=yes
2686 ;;
2687 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2688 shlibpath_overrides_runpath=yes
2689 hardcode_into_libs=yes
2690 ;;
2691 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2692 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2693 shlibpath_overrides_runpath=no
2694 hardcode_into_libs=yes
2695 ;;
2696 *) # from 4.6 on, and DragonFly
2697 shlibpath_overrides_runpath=yes
2698 hardcode_into_libs=yes
2699 ;;
2700 esac
2701 ;;
2702
2703 haiku*)
2704 version_type=linux # correct to gnu/linux during the next big refactor
2705 need_lib_prefix=no
2706 need_version=no
2707 dynamic_linker="$host_os runtime_loader"
2708 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2709 soname_spec='$libname$release$shared_ext$major'
2710 shlibpath_var=LIBRARY_PATH
2711 shlibpath_overrides_runpath=no
2712 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2713 hardcode_into_libs=yes
2714 ;;
2715
2716 hpux9* | hpux10* | hpux11*)
2717 # Give a soname corresponding to the major version so that dld.sl refuses to
2718 # link against other versions.
2719 version_type=sunos
2720 need_lib_prefix=no
2721 need_version=no
2722 case $host_cpu in
2723 ia64*)
2724 shrext_cmds='.so'
2725 hardcode_into_libs=yes
2726 dynamic_linker="$host_os dld.so"
2727 shlibpath_var=LD_LIBRARY_PATH
2728 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2729 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2730 soname_spec='$libname$release$shared_ext$major'
2731 if test 32 = "$HPUX_IA64_MODE"; then
2732 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2733 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2734 else
2735 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2736 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2737 fi
2738 ;;
2739 hppa*64*)
2740 shrext_cmds='.sl'
2741 hardcode_into_libs=yes
2742 dynamic_linker="$host_os dld.sl"
2743 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2744 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2745 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2746 soname_spec='$libname$release$shared_ext$major'
2747 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2748 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2749 ;;
2750 *)
2751 shrext_cmds='.sl'
2752 dynamic_linker="$host_os dld.sl"
2753 shlibpath_var=SHLIB_PATH
2754 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2755 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2756 soname_spec='$libname$release$shared_ext$major'
2757 ;;
2758 esac
2759 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2760 postinstall_cmds='chmod 555 $lib'
2761 # or fails outright, so override atomically:
2762 install_override_mode=555
2763 ;;
2764
2765 interix[[3-9]]*)
2766 version_type=linux # correct to gnu/linux during the next big refactor
2767 need_lib_prefix=no
2768 need_version=no
2769 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2770 soname_spec='$libname$release$shared_ext$major'
2771 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2772 shlibpath_var=LD_LIBRARY_PATH
2773 shlibpath_overrides_runpath=no
2774 hardcode_into_libs=yes
2775 ;;
2776
2777 irix5* | irix6* | nonstopux*)
2778 case $host_os in
2779 nonstopux*) version_type=nonstopux ;;
2780 *)
2781 if test yes = "$lt_cv_prog_gnu_ld"; then
2782 version_type=linux # correct to gnu/linux during the next big refactor
2783 else
2784 version_type=irix
2785 fi ;;
2786 esac
2787 need_lib_prefix=no
2788 need_version=no
2789 soname_spec='$libname$release$shared_ext$major'
2790 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2791 case $host_os in
2792 irix5* | nonstopux*)
2793 libsuff= shlibsuff=
2794 ;;
2795 *)
2796 case $LD in # libtool.m4 will add one of these switches to LD
2797 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2798 libsuff= shlibsuff= libmagic=32-bit;;
2799 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2800 libsuff=32 shlibsuff=N32 libmagic=N32;;
2801 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2802 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2803 *) libsuff= shlibsuff= libmagic=never-match;;
2804 esac
2805 ;;
2806 esac
2807 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2808 shlibpath_overrides_runpath=no
2809 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2810 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2811 hardcode_into_libs=yes
2812 ;;
2813
2814 # No shared lib support for Linux oldld, aout, or coff.
2815 linux*oldld* | linux*aout* | linux*coff*)
2816 dynamic_linker=no
2817 ;;
2818
2819 linux*android*)
2820 version_type=none # Android doesn't support versioned libraries.
2821 need_lib_prefix=no
2822 need_version=no
2823 library_names_spec='$libname$release$shared_ext'
2824 soname_spec='$libname$release$shared_ext'
2825 finish_cmds=
2826 shlibpath_var=LD_LIBRARY_PATH
2827 shlibpath_overrides_runpath=yes
2828
2829 # This implies no fast_install, which is unacceptable.
2830 # Some rework will be needed to allow for fast_install
2831 # before this can be enabled.
2832 hardcode_into_libs=yes
2833
2834 dynamic_linker='Android linker'
2835 # Don't embed -rpath directories since the linker doesn't support them.
2836 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2837 ;;
2838
2839 # This must be glibc/ELF.
2840 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2841 version_type=linux # correct to gnu/linux during the next big refactor
2842 need_lib_prefix=no
2843 need_version=no
2844 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2845 soname_spec='$libname$release$shared_ext$major'
2846 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2847 shlibpath_var=LD_LIBRARY_PATH
2848 shlibpath_overrides_runpath=no
2849
2850 # Some binutils ld are patched to set DT_RUNPATH
2851 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2852 [lt_cv_shlibpath_overrides_runpath=no
2853 save_LDFLAGS=$LDFLAGS
2854 save_libdir=$libdir
2855 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2856 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2857 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2858 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2859 [lt_cv_shlibpath_overrides_runpath=yes])])
2860 LDFLAGS=$save_LDFLAGS
2861 libdir=$save_libdir
2862 ])
2863 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2864
2865 # This implies no fast_install, which is unacceptable.
2866 # Some rework will be needed to allow for fast_install
2867 # before this can be enabled.
2868 hardcode_into_libs=yes
2869
2870 # Ideally, we could use ldconfig to report *all* directores which are
2871 # searched for libraries, however this is still not possible. Aside from not
2872 # being certain /sbin/ldconfig is available, command
2873 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2874 # even though it is searched at run-time. Try to do the best guess by
2875 # appending ld.so.conf contents (and includes) to the search path.
2876 if test -f /etc/ld.so.conf; then
2877 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' ' '`
2878 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2879 fi
2880
2881 # We used to test for /lib/ld.so.1 and disable shared libraries on
2882 # powerpc, because MkLinux only supported shared libraries with the
2883 # GNU dynamic linker. Since this was broken with cross compilers,
2884 # most powerpc-linux boxes support dynamic linking these days and
2885 # people can always --disable-shared, the test was removed, and we
2886 # assume the GNU/Linux dynamic linker is in use.
2887 dynamic_linker='GNU/Linux ld.so'
2888 ;;
2889
2890 netbsd*)
2891 version_type=sunos
2892 need_lib_prefix=no
2893 need_version=no
2894 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2895 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2896 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2897 dynamic_linker='NetBSD (a.out) ld.so'
2898 else
2899 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2900 soname_spec='$libname$release$shared_ext$major'
2901 dynamic_linker='NetBSD ld.elf_so'
2902 fi
2903 shlibpath_var=LD_LIBRARY_PATH
2904 shlibpath_overrides_runpath=yes
2905 hardcode_into_libs=yes
2906 ;;
2907
2908 newsos6)
2909 version_type=linux # correct to gnu/linux during the next big refactor
2910 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2911 shlibpath_var=LD_LIBRARY_PATH
2912 shlibpath_overrides_runpath=yes
2913 ;;
2914
2915 *nto* | *qnx*)
2916 version_type=qnx
2917 need_lib_prefix=no
2918 need_version=no
2919 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2920 soname_spec='$libname$release$shared_ext$major'
2921 shlibpath_var=LD_LIBRARY_PATH
2922 shlibpath_overrides_runpath=no
2923 hardcode_into_libs=yes
2924 dynamic_linker='ldqnx.so'
2925 ;;
2926
2927 openbsd* | bitrig*)
2928 version_type=sunos
2929 sys_lib_dlsearch_path_spec=/usr/lib
2930 need_lib_prefix=no
2931 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2932 need_version=no
2933 else
2934 need_version=yes
2935 fi
2936 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2937 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2938 shlibpath_var=LD_LIBRARY_PATH
2939 shlibpath_overrides_runpath=yes
2940 ;;
2941
2942 os2*)
2943 libname_spec='$name'
2944 version_type=windows
2945 shrext_cmds=.dll
2946 need_version=no
2947 need_lib_prefix=no
2948 # OS/2 can only load a DLL with a base name of 8 characters or less.
2949 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2950 v=$($ECHO $release$versuffix | tr -d .-);
2951 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2952 $ECHO $n$v`$shared_ext'
2953 library_names_spec='${libname}_dll.$libext'
2954 dynamic_linker='OS/2 ld.exe'
2955 shlibpath_var=BEGINLIBPATH
2956 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2957 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2958 postinstall_cmds='base_file=`basename \$file`~
2959 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2960 dldir=$destdir/`dirname \$dlpath`~
2961 test -d \$dldir || mkdir -p \$dldir~
2962 $install_prog $dir/$dlname \$dldir/$dlname~
2963 chmod a+x \$dldir/$dlname~
2964 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2965 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2966 fi'
2967 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2968 dlpath=$dir/\$dldll~
2969 $RM \$dlpath'
2970 ;;
2971
2972 osf3* | osf4* | osf5*)
2973 version_type=osf
2974 need_lib_prefix=no
2975 need_version=no
2976 soname_spec='$libname$release$shared_ext$major'
2977 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2978 shlibpath_var=LD_LIBRARY_PATH
2979 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2980 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2981 ;;
2982
2983 rdos*)
2984 dynamic_linker=no
2985 ;;
2986
2987 solaris*)
2988 version_type=linux # correct to gnu/linux during the next big refactor
2989 need_lib_prefix=no
2990 need_version=no
2991 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2992 soname_spec='$libname$release$shared_ext$major'
2993 shlibpath_var=LD_LIBRARY_PATH
2994 shlibpath_overrides_runpath=yes
2995 hardcode_into_libs=yes
2996 # ldd complains unless libraries are executable
2997 postinstall_cmds='chmod +x $lib'
2998 ;;
2999
3000 sunos4*)
3001 version_type=sunos
3002 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3003 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3004 shlibpath_var=LD_LIBRARY_PATH
3005 shlibpath_overrides_runpath=yes
3006 if test yes = "$with_gnu_ld"; then
3007 need_lib_prefix=no
3008 fi
3009 need_version=yes
3010 ;;
3011
3012 sysv4 | sysv4.3*)
3013 version_type=linux # correct to gnu/linux during the next big refactor
3014 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3015 soname_spec='$libname$release$shared_ext$major'
3016 shlibpath_var=LD_LIBRARY_PATH
3017 case $host_vendor in
3018 sni)
3019 shlibpath_overrides_runpath=no
3020 need_lib_prefix=no
3021 runpath_var=LD_RUN_PATH
3022 ;;
3023 siemens)
3024 need_lib_prefix=no
3025 ;;
3026 motorola)
3027 need_lib_prefix=no
3028 need_version=no
3029 shlibpath_overrides_runpath=no
3030 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3031 ;;
3032 esac
3033 ;;
3034
3035 sysv4*MP*)
3036 if test -d /usr/nec; then
3037 version_type=linux # correct to gnu/linux during the next big refactor
3038 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3039 soname_spec='$libname$shared_ext.$major'
3040 shlibpath_var=LD_LIBRARY_PATH
3041 fi
3042 ;;
3043
3044 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3045 version_type=sco
3046 need_lib_prefix=no
3047 need_version=no
3048 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3049 soname_spec='$libname$release$shared_ext$major'
3050 shlibpath_var=LD_LIBRARY_PATH
3051 shlibpath_overrides_runpath=yes
3052 hardcode_into_libs=yes
3053 if test yes = "$with_gnu_ld"; then
3054 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3055 else
3056 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3057 case $host_os in
3058 sco3.2v5*)
3059 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3060 ;;
3061 esac
3062 fi
3063 sys_lib_dlsearch_path_spec='/usr/lib'
3064 ;;
3065
3066 tpf*)
3067 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3068 version_type=linux # correct to gnu/linux during the next big refactor
3069 need_lib_prefix=no
3070 need_version=no
3071 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3072 shlibpath_var=LD_LIBRARY_PATH
3073 shlibpath_overrides_runpath=no
3074 hardcode_into_libs=yes
3075 ;;
3076
3077 uts4*)
3078 version_type=linux # correct to gnu/linux during the next big refactor
3079 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3080 soname_spec='$libname$release$shared_ext$major'
3081 shlibpath_var=LD_LIBRARY_PATH
3082 ;;
3083
3084 *)
3085 dynamic_linker=no
3086 ;;
3087 esac
3088 AC_MSG_RESULT([$dynamic_linker])
3089 test no = "$dynamic_linker" && can_build_shared=no
3090
3091 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3092 if test yes = "$GCC"; then
3093 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3094 fi
3095
3096 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3097 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3098 fi
3099
3100 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3101 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3102 fi
3103
3104 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3105 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3106
3107 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3108 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3109
3110 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3111 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3112
3113 _LT_DECL([], [variables_saved_for_relink], [1],
3114 [Variables whose values should be saved in libtool wrapper scripts and
3115 restored at link time])
3116 _LT_DECL([], [need_lib_prefix], [0],
3117 [Do we need the "lib" prefix for modules?])
3118 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3119 _LT_DECL([], [version_type], [0], [Library versioning type])
3120 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3121 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3122 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3123 [Is shlibpath searched before the hard-coded library search path?])
3124 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3125 _LT_DECL([], [library_names_spec], [1],
3126 [[List of archive names. First name is the real one, the rest are links.
3127 The last name is the one that the linker finds with -lNAME]])
3128 _LT_DECL([], [soname_spec], [1],
3129 [[The coded name of the library, if different from the real name]])
3130 _LT_DECL([], [install_override_mode], [1],
3131 [Permission mode override for installation of shared libraries])
3132 _LT_DECL([], [postinstall_cmds], [2],
3133 [Command to use after installation of a shared archive])
3134 _LT_DECL([], [postuninstall_cmds], [2],
3135 [Command to use after uninstallation of a shared archive])
3136 _LT_DECL([], [finish_cmds], [2],
3137 [Commands used to finish a libtool library installation in a directory])
3138 _LT_DECL([], [finish_eval], [1],
3139 [[As "finish_cmds", except a single script fragment to be evaled but
3140 not shown]])
3141 _LT_DECL([], [hardcode_into_libs], [0],
3142 [Whether we should hardcode library paths into libraries])
3143 _LT_DECL([], [sys_lib_search_path_spec], [2],
3144 [Compile-time system search path for libraries])
3145 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3146 [Detected run-time system search path for libraries])
3147 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
3148 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3149 ])# _LT_SYS_DYNAMIC_LINKER
3150
3151
3152 # _LT_PATH_TOOL_PREFIX(TOOL)
3153 # --------------------------
3154 # find a file program that can recognize shared library
3155 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3156 [m4_require([_LT_DECL_EGREP])dnl
3157 AC_MSG_CHECKING([for $1])
3158 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3159 [case $MAGIC_CMD in
3160 [[\\/*] | ?:[\\/]*])
3161 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3162 ;;
3163 *)
3164 lt_save_MAGIC_CMD=$MAGIC_CMD
3165 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3166 dnl $ac_dummy forces splitting on constant user-supplied paths.
3167 dnl POSIX.2 word splitting is done only on the output of word expansions,
3168 dnl not every word. This closes a longstanding sh security hole.
3169 ac_dummy="m4_if([$2], , $PATH, [$2])"
3170 for ac_dir in $ac_dummy; do
3171 IFS=$lt_save_ifs
3172 test -z "$ac_dir" && ac_dir=.
3173 if test -f "$ac_dir/$1"; then
3174 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3175 if test -n "$file_magic_test_file"; then
3176 case $deplibs_check_method in
3177 "file_magic "*)
3178 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3179 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3180 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3181 $EGREP "$file_magic_regex" > /dev/null; then
3182 :
3183 else
3184 cat <<_LT_EOF 1>&2
3185
3186 *** Warning: the command libtool uses to detect shared libraries,
3187 *** $file_magic_cmd, produces output that libtool cannot recognize.
3188 *** The result is that libtool may fail to recognize shared libraries
3189 *** as such. This will affect the creation of libtool libraries that
3190 *** depend on shared libraries, but programs linked with such libtool
3191 *** libraries will work regardless of this problem. Nevertheless, you
3192 *** may want to report the problem to your system manager and/or to
3193 *** bug-libtool@gnu.org
3194
3195 _LT_EOF
3196 fi ;;
3197 esac
3198 fi
3199 break
3200 fi
3201 done
3202 IFS=$lt_save_ifs
3203 MAGIC_CMD=$lt_save_MAGIC_CMD
3204 ;;
3205 esac])
3206 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3207 if test -n "$MAGIC_CMD"; then
3208 AC_MSG_RESULT($MAGIC_CMD)
3209 else
3210 AC_MSG_RESULT(no)
3211 fi
3212 _LT_DECL([], [MAGIC_CMD], [0],
3213 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3214 ])# _LT_PATH_TOOL_PREFIX
3215
3216 # Old name:
3217 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3218 dnl aclocal-1.4 backwards compatibility:
3219 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3220
3221
3222 # _LT_PATH_MAGIC
3223 # --------------
3224 # find a file program that can recognize a shared library
3225 m4_defun([_LT_PATH_MAGIC],
3226 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3227 if test -z "$lt_cv_path_MAGIC_CMD"; then
3228 if test -n "$ac_tool_prefix"; then
3229 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3230 else
3231 MAGIC_CMD=:
3232 fi
3233 fi
3234 ])# _LT_PATH_MAGIC
3235
3236
3237 # LT_PATH_LD
3238 # ----------
3239 # find the pathname to the GNU or non-GNU linker
3240 AC_DEFUN([LT_PATH_LD],
3241 [AC_REQUIRE([AC_PROG_CC])dnl
3242 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3243 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3244 m4_require([_LT_DECL_SED])dnl
3245 m4_require([_LT_DECL_EGREP])dnl
3246 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3247
3248 AC_ARG_WITH([gnu-ld],
3249 [AS_HELP_STRING([--with-gnu-ld],
3250 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3251 [test no = "$withval" || with_gnu_ld=yes],
3252 [with_gnu_ld=no])dnl
3253
3254 ac_prog=ld
3255 if test yes = "$GCC"; then
3256 # Check if gcc -print-prog-name=ld gives a path.
3257 AC_MSG_CHECKING([for ld used by $CC])
3258 case $host in
3259 *-*-mingw*)
3260 # gcc leaves a trailing carriage return, which upsets mingw
3261 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3262 *)
3263 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3264 esac
3265 case $ac_prog in
3266 # Accept absolute paths.
3267 [[\\/]]* | ?:[[\\/]]*)
3268 re_direlt='/[[^/]][[^/]]*/\.\./'
3269 # Canonicalize the pathname of ld
3270 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3271 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3272 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3273 done
3274 test -z "$LD" && LD=$ac_prog
3275 ;;
3276 "")
3277 # If it fails, then pretend we aren't using GCC.
3278 ac_prog=ld
3279 ;;
3280 *)
3281 # If it is relative, then search for the first ld in PATH.
3282 with_gnu_ld=unknown
3283 ;;
3284 esac
3285 elif test yes = "$with_gnu_ld"; then
3286 AC_MSG_CHECKING([for GNU ld])
3287 else
3288 AC_MSG_CHECKING([for non-GNU ld])
3289 fi
3290 AC_CACHE_VAL(lt_cv_path_LD,
3291 [if test -z "$LD"; then
3292 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3293 for ac_dir in $PATH; do
3294 IFS=$lt_save_ifs
3295 test -z "$ac_dir" && ac_dir=.
3296 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3297 lt_cv_path_LD=$ac_dir/$ac_prog
3298 # Check to see if the program is GNU ld. I'd rather use --version,
3299 # but apparently some variants of GNU ld only accept -v.
3300 # Break only if it was the GNU/non-GNU ld that we prefer.
3301 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3302 *GNU* | *'with BFD'*)
3303 test no != "$with_gnu_ld" && break
3304 ;;
3305 *)
3306 test yes != "$with_gnu_ld" && break
3307 ;;
3308 esac
3309 fi
3310 done
3311 IFS=$lt_save_ifs
3312 else
3313 lt_cv_path_LD=$LD # Let the user override the test with a path.
3314 fi])
3315 LD=$lt_cv_path_LD
3316 if test -n "$LD"; then
3317 AC_MSG_RESULT($LD)
3318 else
3319 AC_MSG_RESULT(no)
3320 fi
3321 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3322 _LT_PATH_LD_GNU
3323 AC_SUBST([LD])
3324
3325 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3326 ])# LT_PATH_LD
3327
3328 # Old names:
3329 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3330 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3331 dnl aclocal-1.4 backwards compatibility:
3332 dnl AC_DEFUN([AM_PROG_LD], [])
3333 dnl AC_DEFUN([AC_PROG_LD], [])
3334
3335
3336 # _LT_PATH_LD_GNU
3337 #- --------------
3338 m4_defun([_LT_PATH_LD_GNU],
3339 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3340 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3341 case `$LD -v 2>&1 </dev/null` in
3342 *GNU* | *'with BFD'*)
3343 lt_cv_prog_gnu_ld=yes
3344 ;;
3345 *)
3346 lt_cv_prog_gnu_ld=no
3347 ;;
3348 esac])
3349 with_gnu_ld=$lt_cv_prog_gnu_ld
3350 ])# _LT_PATH_LD_GNU
3351
3352
3353 # _LT_CMD_RELOAD
3354 # --------------
3355 # find reload flag for linker
3356 # -- PORTME Some linkers may need a different reload flag.
3357 m4_defun([_LT_CMD_RELOAD],
3358 [AC_CACHE_CHECK([for $LD option to reload object files],
3359 lt_cv_ld_reload_flag,
3360 [lt_cv_ld_reload_flag='-r'])
3361 reload_flag=$lt_cv_ld_reload_flag
3362 case $reload_flag in
3363 "" | " "*) ;;
3364 *) reload_flag=" $reload_flag" ;;
3365 esac
3366 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3367 case $host_os in
3368 cygwin* | mingw* | pw32* | cegcc*)
3369 if test yes != "$GCC"; then
3370 reload_cmds=false
3371 fi
3372 ;;
3373 darwin*)
3374 if test yes = "$GCC"; then
3375 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3376 else
3377 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3378 fi
3379 ;;
3380 esac
3381 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3382 _LT_TAGDECL([], [reload_cmds], [2])dnl
3383 ])# _LT_CMD_RELOAD
3384
3385
3386 # _LT_PATH_DD
3387 # -----------
3388 # find a working dd
3389 m4_defun([_LT_PATH_DD],
3390 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3391 [printf 0123456789abcdef0123456789abcdef >conftest.i
3392 cat conftest.i conftest.i >conftest2.i
3393 : ${lt_DD:=$DD}
3394 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3395 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3396 cmp -s conftest.i conftest.out \
3397 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3398 fi])
3399 rm -f conftest.i conftest2.i conftest.out])
3400 ])# _LT_PATH_DD
3401
3402
3403 # _LT_CMD_TRUNCATE
3404 # ----------------
3405 # find command to truncate a binary pipe
3406 m4_defun([_LT_CMD_TRUNCATE],
3407 [m4_require([_LT_PATH_DD])
3408 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3409 [printf 0123456789abcdef0123456789abcdef >conftest.i
3410 cat conftest.i conftest.i >conftest2.i
3411 lt_cv_truncate_bin=
3412 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3413 cmp -s conftest.i conftest.out \
3414 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3415 fi
3416 rm -f conftest.i conftest2.i conftest.out
3417 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3418 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3419 [Command to truncate a binary pipe])
3420 ])# _LT_CMD_TRUNCATE
3421
3422
3423 # _LT_CHECK_MAGIC_METHOD
3424 # ----------------------
3425 # how to check for library dependencies
3426 # -- PORTME fill in with the dynamic library characteristics
3427 m4_defun([_LT_CHECK_MAGIC_METHOD],
3428 [m4_require([_LT_DECL_EGREP])
3429 m4_require([_LT_DECL_OBJDUMP])
3430 AC_CACHE_CHECK([how to recognize dependent libraries],
3431 lt_cv_deplibs_check_method,
3432 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3433 lt_cv_file_magic_test_file=
3434 lt_cv_deplibs_check_method='unknown'
3435 # Need to set the preceding variable on all platforms that support
3436 # interlibrary dependencies.
3437 # 'none' -- dependencies not supported.
3438 # 'unknown' -- same as none, but documents that we really don't know.
3439 # 'pass_all' -- all dependencies passed with no checks.
3440 # 'test_compile' -- check by making test program.
3441 # 'file_magic [[regex]]' -- check by looking for files in library path
3442 # that responds to the $file_magic_cmd with a given extended regex.
3443 # If you have 'file' or equivalent on your system and you're not sure
3444 # whether 'pass_all' will *always* work, you probably want this one.
3445
3446 case $host_os in
3447 aix[[4-9]]*)
3448 lt_cv_deplibs_check_method=pass_all
3449 ;;
3450
3451 beos*)
3452 lt_cv_deplibs_check_method=pass_all
3453 ;;
3454
3455 bsdi[[45]]*)
3456 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3457 lt_cv_file_magic_cmd='/usr/bin/file -L'
3458 lt_cv_file_magic_test_file=/shlib/libc.so
3459 ;;
3460
3461 cygwin*)
3462 # func_win32_libid is a shell function defined in ltmain.sh
3463 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3464 lt_cv_file_magic_cmd='func_win32_libid'
3465 ;;
3466
3467 mingw* | pw32*)
3468 # Base MSYS/MinGW do not provide the 'file' command needed by
3469 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3470 # unless we find 'file', for example because we are cross-compiling.
3471 if ( file / ) >/dev/null 2>&1; then
3472 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3473 lt_cv_file_magic_cmd='func_win32_libid'
3474 else
3475 # Keep this pattern in sync with the one in func_win32_libid.
3476 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3477 lt_cv_file_magic_cmd='$OBJDUMP -f'
3478 fi
3479 ;;
3480
3481 cegcc*)
3482 # use the weaker test based on 'objdump'. See mingw*.
3483 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3484 lt_cv_file_magic_cmd='$OBJDUMP -f'
3485 ;;
3486
3487 darwin* | rhapsody*)
3488 lt_cv_deplibs_check_method=pass_all
3489 ;;
3490
3491 freebsd* | dragonfly*)
3492 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3493 case $host_cpu in
3494 i*86 )
3495 # Not sure whether the presence of OpenBSD here was a mistake.
3496 # Let's accept both of them until this is cleared up.
3497 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3498 lt_cv_file_magic_cmd=/usr/bin/file
3499 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3500 ;;
3501 esac
3502 else
3503 lt_cv_deplibs_check_method=pass_all
3504 fi
3505 ;;
3506
3507 haiku*)
3508 lt_cv_deplibs_check_method=pass_all
3509 ;;
3510
3511 hpux10.20* | hpux11*)
3512 lt_cv_file_magic_cmd=/usr/bin/file
3513 case $host_cpu in
3514 ia64*)
3515 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3516 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3517 ;;
3518 hppa*64*)
3519 [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]']
3520 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3521 ;;
3522 *)
3523 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3524 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3525 ;;
3526 esac
3527 ;;
3528
3529 interix[[3-9]]*)
3530 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3531 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3532 ;;
3533
3534 irix5* | irix6* | nonstopux*)
3535 case $LD in
3536 *-32|*"-32 ") libmagic=32-bit;;
3537 *-n32|*"-n32 ") libmagic=N32;;
3538 *-64|*"-64 ") libmagic=64-bit;;
3539 *) libmagic=never-match;;
3540 esac
3541 lt_cv_deplibs_check_method=pass_all
3542 ;;
3543
3544 # This must be glibc/ELF.
3545 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3546 lt_cv_deplibs_check_method=pass_all
3547 ;;
3548
3549 netbsd*)
3550 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3551 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3552 else
3553 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3554 fi
3555 ;;
3556
3557 newos6*)
3558 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3559 lt_cv_file_magic_cmd=/usr/bin/file
3560 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3561 ;;
3562
3563 *nto* | *qnx*)
3564 lt_cv_deplibs_check_method=pass_all
3565 ;;
3566
3567 openbsd* | bitrig*)
3568 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3569 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3570 else
3571 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3572 fi
3573 ;;
3574
3575 osf3* | osf4* | osf5*)
3576 lt_cv_deplibs_check_method=pass_all
3577 ;;
3578
3579 rdos*)
3580 lt_cv_deplibs_check_method=pass_all
3581 ;;
3582
3583 solaris*)
3584 lt_cv_deplibs_check_method=pass_all
3585 ;;
3586
3587 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3588 lt_cv_deplibs_check_method=pass_all
3589 ;;
3590
3591 sysv4 | sysv4.3*)
3592 case $host_vendor in
3593 motorola)
3594 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]]'
3595 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3596 ;;
3597 ncr)
3598 lt_cv_deplibs_check_method=pass_all
3599 ;;
3600 sequent)
3601 lt_cv_file_magic_cmd='/bin/file'
3602 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3603 ;;
3604 sni)
3605 lt_cv_file_magic_cmd='/bin/file'
3606 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3607 lt_cv_file_magic_test_file=/lib/libc.so
3608 ;;
3609 siemens)
3610 lt_cv_deplibs_check_method=pass_all
3611 ;;
3612 pc)
3613 lt_cv_deplibs_check_method=pass_all
3614 ;;
3615 esac
3616 ;;
3617
3618 tpf*)
3619 lt_cv_deplibs_check_method=pass_all
3620 ;;
3621 os2*)
3622 lt_cv_deplibs_check_method=pass_all
3623 ;;
3624 esac
3625 ])
3626
3627 file_magic_glob=
3628 want_nocaseglob=no
3629 if test "$build" = "$host"; then
3630 case $host_os in
3631 mingw* | pw32*)
3632 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3633 want_nocaseglob=yes
3634 else
3635 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3636 fi
3637 ;;
3638 esac
3639 fi
3640
3641 file_magic_cmd=$lt_cv_file_magic_cmd
3642 deplibs_check_method=$lt_cv_deplibs_check_method
3643 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3644
3645 _LT_DECL([], [deplibs_check_method], [1],
3646 [Method to check whether dependent libraries are shared objects])
3647 _LT_DECL([], [file_magic_cmd], [1],
3648 [Command to use when deplibs_check_method = "file_magic"])
3649 _LT_DECL([], [file_magic_glob], [1],
3650 [How to find potential files when deplibs_check_method = "file_magic"])
3651 _LT_DECL([], [want_nocaseglob], [1],
3652 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3653 ])# _LT_CHECK_MAGIC_METHOD
3654
3655
3656 # LT_PATH_NM
3657 # ----------
3658 # find the pathname to a BSD- or MS-compatible name lister
3659 AC_DEFUN([LT_PATH_NM],
3660 [AC_REQUIRE([AC_PROG_CC])dnl
3661 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3662 [if test -n "$NM"; then
3663 # Let the user override the test.
3664 lt_cv_path_NM=$NM
3665 else
3666 lt_nm_to_check=${ac_tool_prefix}nm
3667 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3668 lt_nm_to_check="$lt_nm_to_check nm"
3669 fi
3670 for lt_tmp_nm in $lt_nm_to_check; do
3671 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3672 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3673 IFS=$lt_save_ifs
3674 test -z "$ac_dir" && ac_dir=.
3675 tmp_nm=$ac_dir/$lt_tmp_nm
3676 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3677 # Check to see if the nm accepts a BSD-compat flag.
3678 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3679 # nm: unknown option "B" ignored
3680 # Tru64's nm complains that /dev/null is an invalid object file
3681 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3682 case $build_os in
3683 mingw*) lt_bad_file=conftest.nm/nofile ;;
3684 *) lt_bad_file=/dev/null ;;
3685 esac
3686 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3687 *$lt_bad_file* | *'Invalid file or object type'*)
3688 lt_cv_path_NM="$tmp_nm -B"
3689 break 2
3690 ;;
3691 *)
3692 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3693 */dev/null*)
3694 lt_cv_path_NM="$tmp_nm -p"
3695 break 2
3696 ;;
3697 *)
3698 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3699 continue # so that we can try to find one that supports BSD flags
3700 ;;
3701 esac
3702 ;;
3703 esac
3704 fi
3705 done
3706 IFS=$lt_save_ifs
3707 done
3708 : ${lt_cv_path_NM=no}
3709 fi])
3710 if test no != "$lt_cv_path_NM"; then
3711 NM=$lt_cv_path_NM
3712 else
3713 # Didn't find any BSD compatible name lister, look for dumpbin.
3714 if test -n "$DUMPBIN"; then :
3715 # Let the user override the test.
3716 else
3717 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3718 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
3719 *COFF*)
3720 DUMPBIN="$DUMPBIN -symbols -headers"
3721 ;;
3722 *)
3723 DUMPBIN=:
3724 ;;
3725 esac
3726 fi
3727 AC_SUBST([DUMPBIN])
3728 if test : != "$DUMPBIN"; then
3729 NM=$DUMPBIN
3730 fi
3731 fi
3732 test -z "$NM" && NM=nm
3733 AC_SUBST([NM])
3734 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3735
3736 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3737 [lt_cv_nm_interface="BSD nm"
3738 echo "int some_variable = 0;" > conftest.$ac_ext
3739 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3740 (eval "$ac_compile" 2>conftest.err)
3741 cat conftest.err >&AS_MESSAGE_LOG_FD
3742 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3743 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3744 cat conftest.err >&AS_MESSAGE_LOG_FD
3745 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3746 cat conftest.out >&AS_MESSAGE_LOG_FD
3747 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3748 lt_cv_nm_interface="MS dumpbin"
3749 fi
3750 rm -f conftest*])
3751 ])# LT_PATH_NM
3752
3753 # Old names:
3754 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3755 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3756 dnl aclocal-1.4 backwards compatibility:
3757 dnl AC_DEFUN([AM_PROG_NM], [])
3758 dnl AC_DEFUN([AC_PROG_NM], [])
3759
3760 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3761 # --------------------------------
3762 # how to determine the name of the shared library
3763 # associated with a specific link library.
3764 # -- PORTME fill in with the dynamic library characteristics
3765 m4_defun([_LT_CHECK_SHAREDLIB_FROM