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