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

Contents of /ircd-hybrid/trunk/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1592 - (show annotations)
Sat Oct 27 21:02:32 2012 UTC (7 years, 8 months ago) by michael
File size: 375462 byte(s)
- Second time's the charm? Moving svnroot/ircd-hybrid-8 to
  svnroot/ircd-hybrid/trunk

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