/[svn]/hopm/releases/1.0.3/aclocal.m4
ViewVC logotype

Contents of /hopm/releases/1.0.3/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log


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