/[svn]/ircd-hybrid/aclocal.m4
ViewVC logotype

Contents of /ircd-hybrid/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1155 - (show annotations)
Tue Aug 9 20:27:45 2011 UTC (11 years, 5 months ago) by michael
File size: 369686 byte(s)
- recreate "trunk"

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