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