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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1373 - (show annotations)
Fri Apr 27 07:32:34 2012 UTC (7 years, 4 months ago) by michael
File size: 375802 byte(s)
- autoconf 2.69 & automake 1.12

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