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

Contents of /ircd-hybrid/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1093 - (show annotations)
Sun Jun 13 10:04:30 2010 UTC (2 months, 3 weeks ago) by michael
File size: 352355 byte(s)
- Updated ltdl to latest 2.2.10 release
1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17 [m4_warning([this file was generated for autoconf 2.65.
18 You have another version of autoconf. It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22 # Portability macros for glibc argz. -*- Autoconf -*-
23 #
24 # Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
25 # Written by Gary V. Vaughan <gary@gnu.org>
26 #
27 # This file is free software; the Free Software Foundation gives
28 # unlimited permission to copy and/or distribute it, with or without
29 # modifications, as long as this notice is preserved.
30
31 # serial 5 argz.m4
32
33 AC_DEFUN([gl_FUNC_ARGZ],
34 [gl_PREREQ_ARGZ
35
36 AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
37
38 AC_CHECK_TYPES([error_t],
39 [],
40 [AC_DEFINE([error_t], [int],
41 [Define to a type to use for `error_t' if it is not otherwise available.])
42 AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
43 does not typedef error_t.])],
44 [#if defined(HAVE_ARGZ_H)
45 # include <argz.h>
46 #endif])
47
48 ARGZ_H=
49 AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \
50 argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
51
52 dnl if have system argz functions, allow forced use of
53 dnl libltdl-supplied implementation (and default to do so
54 dnl on "known bad" systems). Could use a runtime check, but
55 dnl (a) detecting malloc issues is notoriously unreliable
56 dnl (b) only known system that declares argz functions,
57 dnl provides them, yet they are broken, is cygwin
58 dnl releases prior to 16-Mar-2007 (1.5.24 and earlier)
59 dnl So, it's more straightforward simply to special case
60 dnl this for known bad systems.
61 AS_IF([test -z "$ARGZ_H"],
62 [AC_CACHE_CHECK(
63 [if argz actually works],
64 [lt_cv_sys_argz_works],
65 [[case $host_os in #(
66 *cygwin*)
67 lt_cv_sys_argz_works=no
68 if test "$cross_compiling" != no; then
69 lt_cv_sys_argz_works="guessing no"
70 else
71 lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
72 save_IFS=$IFS
73 IFS=-.
74 set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
75 IFS=$save_IFS
76 lt_os_major=${2-0}
77 lt_os_minor=${3-0}
78 lt_os_micro=${4-0}
79 if test "$lt_os_major" -gt 1 \
80 || { test "$lt_os_major" -eq 1 \
81 && { test "$lt_os_minor" -gt 5 \
82 || { test "$lt_os_minor" -eq 5 \
83 && test "$lt_os_micro" -gt 24; }; }; }; then
84 lt_cv_sys_argz_works=yes
85 fi
86 fi
87 ;; #(
88 *) lt_cv_sys_argz_works=yes ;;
89 esac]])
90 AS_IF([test $lt_cv_sys_argz_works = yes],
91 [AC_DEFINE([HAVE_WORKING_ARGZ], 1,
92 [This value is set to 1 to indicate that the system argz facility works])],
93 [ARGZ_H=argz.h
94 AC_LIBOBJ([argz])])])
95
96 AC_SUBST([ARGZ_H])
97 ])
98
99 # Prerequisites of lib/argz.c.
100 AC_DEFUN([gl_PREREQ_ARGZ], [:])
101
102 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
103 #
104 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
105 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
106 # Inc.
107 # Written by Gordon Matzigkeit, 1996
108 #
109 # This file is free software; the Free Software Foundation gives
110 # unlimited permission to copy and/or distribute it, with or without
111 # modifications, as long as this notice is preserved.
112
113 m4_define([_LT_COPYING], [dnl
114 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
115 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
116 # Inc.
117 # Written by Gordon Matzigkeit, 1996
118 #
119 # This file is part of GNU Libtool.
120 #
121 # GNU Libtool is free software; you can redistribute it and/or
122 # modify it under the terms of the GNU General Public License as
123 # published by the Free Software Foundation; either version 2 of
124 # the License, or (at your option) any later version.
125 #
126 # As a special exception to the GNU General Public License,
127 # if you distribute this file as part of a program or library that
128 # is built using GNU Libtool, you may include this file under the
129 # same distribution terms that you use for the rest of that program.
130 #
131 # GNU Libtool is distributed in the hope that it will be useful,
132 # but WITHOUT ANY WARRANTY; without even the implied warranty of
133 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
134 # GNU General Public License for more details.
135 #
136 # You should have received a copy of the GNU General Public License
137 # along with GNU Libtool; see the file COPYING. If not, a copy
138 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
139 # obtained by writing to the Free Software Foundation, Inc.,
140 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
141 ])
142
143 # serial 57 LT_INIT
144
145
146 # LT_PREREQ(VERSION)
147 # ------------------
148 # Complain and exit if this libtool version is less that VERSION.
149 m4_defun([LT_PREREQ],
150 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
151 [m4_default([$3],
152 [m4_fatal([Libtool version $1 or higher is required],
153 63)])],
154 [$2])])
155
156
157 # _LT_CHECK_BUILDDIR
158 # ------------------
159 # Complain if the absolute build directory name contains unusual characters
160 m4_defun([_LT_CHECK_BUILDDIR],
161 [case `pwd` in
162 *\ * | *\ *)
163 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
164 esac
165 ])
166
167
168 # LT_INIT([OPTIONS])
169 # ------------------
170 AC_DEFUN([LT_INIT],
171 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
172 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
173 AC_BEFORE([$0], [LT_LANG])dnl
174 AC_BEFORE([$0], [LT_OUTPUT])dnl
175 AC_BEFORE([$0], [LTDL_INIT])dnl
176 m4_require([_LT_CHECK_BUILDDIR])dnl
177
178 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
179 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
180 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
181 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
182 dnl unless we require an AC_DEFUNed macro:
183 AC_REQUIRE([LTOPTIONS_VERSION])dnl
184 AC_REQUIRE([LTSUGAR_VERSION])dnl
185 AC_REQUIRE([LTVERSION_VERSION])dnl
186 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
187 m4_require([_LT_PROG_LTMAIN])dnl
188
189 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
190
191 dnl Parse OPTIONS
192 _LT_SET_OPTIONS([$0], [$1])
193
194 # This can be used to rebuild libtool when needed
195 LIBTOOL_DEPS="$ltmain"
196
197 # Always use our own libtool.
198 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
199 AC_SUBST(LIBTOOL)dnl
200
201 _LT_SETUP
202
203 # Only expand once:
204 m4_define([LT_INIT])
205 ])# LT_INIT
206
207 # Old names:
208 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
209 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
210 dnl aclocal-1.4 backwards compatibility:
211 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
212 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
213
214
215 # _LT_CC_BASENAME(CC)
216 # -------------------
217 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
218 m4_defun([_LT_CC_BASENAME],
219 [for cc_temp in $1""; do
220 case $cc_temp in
221 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
222 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
223 \-*) ;;
224 *) break;;
225 esac
226 done
227 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
228 ])
229
230
231 # _LT_FILEUTILS_DEFAULTS
232 # ----------------------
233 # It is okay to use these file commands and assume they have been set
234 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
235 m4_defun([_LT_FILEUTILS_DEFAULTS],
236 [: ${CP="cp -f"}
237 : ${MV="mv -f"}
238 : ${RM="rm -f"}
239 ])# _LT_FILEUTILS_DEFAULTS
240
241
242 # _LT_SETUP
243 # ---------
244 m4_defun([_LT_SETUP],
245 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
246 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
247 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
248 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
249
250 _LT_DECL([], [host_alias], [0], [The host system])dnl
251 _LT_DECL([], [host], [0])dnl
252 _LT_DECL([], [host_os], [0])dnl
253 dnl
254 _LT_DECL([], [build_alias], [0], [The build system])dnl
255 _LT_DECL([], [build], [0])dnl
256 _LT_DECL([], [build_os], [0])dnl
257 dnl
258 AC_REQUIRE([AC_PROG_CC])dnl
259 AC_REQUIRE([LT_PATH_LD])dnl
260 AC_REQUIRE([LT_PATH_NM])dnl
261 dnl
262 AC_REQUIRE([AC_PROG_LN_S])dnl
263 test -z "$LN_S" && LN_S="ln -s"
264 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
265 dnl
266 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
267 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
268 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
269 dnl
270 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
271 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
272 m4_require([_LT_CMD_RELOAD])dnl
273 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
274 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
275 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
276
277 _LT_CONFIG_LIBTOOL_INIT([
278 # See if we are running on zsh, and set the options which allow our
279 # commands through without removal of \ escapes INIT.
280 if test -n "\${ZSH_VERSION+set}" ; then
281 setopt NO_GLOB_SUBST
282 fi
283 ])
284 if test -n "${ZSH_VERSION+set}" ; then
285 setopt NO_GLOB_SUBST
286 fi
287
288 _LT_CHECK_OBJDIR
289
290 m4_require([_LT_TAG_COMPILER])dnl
291
292 case $host_os in
293 aix3*)
294 # AIX sometimes has problems with the GCC collect2 program. For some
295 # reason, if we set the COLLECT_NAMES environment variable, the problems
296 # vanish in a puff of smoke.
297 if test "X${COLLECT_NAMES+set}" != Xset; then
298 COLLECT_NAMES=
299 export COLLECT_NAMES
300 fi
301 ;;
302 esac
303
304 # Global variables:
305 ofile=libtool
306 can_build_shared=yes
307
308 # All known linkers require a `.a' archive for static linking (except MSVC,
309 # which needs '.lib').
310 libext=a
311
312 with_gnu_ld="$lt_cv_prog_gnu_ld"
313
314 old_CC="$CC"
315 old_CFLAGS="$CFLAGS"
316
317 # Set sane defaults for various variables
318 test -z "$CC" && CC=cc
319 test -z "$LTCC" && LTCC=$CC
320 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
321 test -z "$LD" && LD=ld
322 test -z "$ac_objext" && ac_objext=o
323
324 _LT_CC_BASENAME([$compiler])
325
326 # Only perform the check for file, if the check method requires it
327 test -z "$MAGIC_CMD" && MAGIC_CMD=file
328 case $deplibs_check_method in
329 file_magic*)
330 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
331 _LT_PATH_MAGIC
332 fi
333 ;;
334 esac
335
336 # Use C for the default configuration in the libtool script
337 LT_SUPPORTED_TAG([CC])
338 _LT_LANG_C_CONFIG
339 _LT_LANG_DEFAULT_CONFIG
340 _LT_CONFIG_COMMANDS
341 ])# _LT_SETUP
342
343
344 # _LT_PREPARE_SED_QUOTE_VARS
345 # --------------------------
346 # Define a few sed substitution that help us do robust quoting.
347 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
348 [# Backslashify metacharacters that are still active within
349 # double-quoted strings.
350 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
351
352 # Same as above, but do not quote variable references.
353 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
354
355 # Sed substitution to delay expansion of an escaped shell variable in a
356 # double_quote_subst'ed string.
357 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
358
359 # Sed substitution to delay expansion of an escaped single quote.
360 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
361
362 # Sed substitution to avoid accidental globbing in evaled expressions
363 no_glob_subst='s/\*/\\\*/g'
364 ])
365
366 # _LT_PROG_LTMAIN
367 # ---------------
368 # Note that this code is called both from `configure', and `config.status'
369 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
370 # `config.status' has no value for ac_aux_dir unless we are using Automake,
371 # so we pass a copy along to make sure it has a sensible value anyway.
372 m4_defun([_LT_PROG_LTMAIN],
373 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
374 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
375 ltmain="$ac_aux_dir/ltmain.sh"
376 ])# _LT_PROG_LTMAIN
377
378
379
380 # So that we can recreate a full libtool script including additional
381 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
382 # in macros and then make a single call at the end using the `libtool'
383 # label.
384
385
386 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
387 # ----------------------------------------
388 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
389 m4_define([_LT_CONFIG_LIBTOOL_INIT],
390 [m4_ifval([$1],
391 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
392 [$1
393 ])])])
394
395 # Initialize.
396 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
397
398
399 # _LT_CONFIG_LIBTOOL([COMMANDS])
400 # ------------------------------
401 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
402 m4_define([_LT_CONFIG_LIBTOOL],
403 [m4_ifval([$1],
404 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
405 [$1
406 ])])])
407
408 # Initialize.
409 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
410
411
412 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
413 # -----------------------------------------------------
414 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
415 [_LT_CONFIG_LIBTOOL([$1])
416 _LT_CONFIG_LIBTOOL_INIT([$2])
417 ])
418
419
420 # _LT_FORMAT_COMMENT([COMMENT])
421 # -----------------------------
422 # Add leading comment marks to the start of each line, and a trailing
423 # full-stop to the whole comment if one is not present already.
424 m4_define([_LT_FORMAT_COMMENT],
425 [m4_ifval([$1], [
426 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
427 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
428 )])
429
430
431
432
433
434 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
435 # -------------------------------------------------------------------
436 # CONFIGNAME is the name given to the value in the libtool script.
437 # VARNAME is the (base) name used in the configure script.
438 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
439 # VARNAME. Any other value will be used directly.
440 m4_define([_LT_DECL],
441 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
442 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
443 [m4_ifval([$1], [$1], [$2])])
444 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
445 m4_ifval([$4],
446 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
447 lt_dict_add_subkey([lt_decl_dict], [$2],
448 [tagged?], [m4_ifval([$5], [yes], [no])])])
449 ])
450
451
452 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
453 # --------------------------------------------------------
454 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
455
456
457 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
458 # ------------------------------------------------
459 m4_define([lt_decl_tag_varnames],
460 [_lt_decl_filter([tagged?], [yes], $@)])
461
462
463 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
464 # ---------------------------------------------------------
465 m4_define([_lt_decl_filter],
466 [m4_case([$#],
467 [0], [m4_fatal([$0: too few arguments: $#])],
468 [1], [m4_fatal([$0: too few arguments: $#: $1])],
469 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
470 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
471 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
472 ])
473
474
475 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
476 # --------------------------------------------------
477 m4_define([lt_decl_quote_varnames],
478 [_lt_decl_filter([value], [1], $@)])
479
480
481 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
482 # ---------------------------------------------------
483 m4_define([lt_decl_dquote_varnames],
484 [_lt_decl_filter([value], [2], $@)])
485
486
487 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
488 # ---------------------------------------------------
489 m4_define([lt_decl_varnames_tagged],
490 [m4_assert([$# <= 2])dnl
491 _$0(m4_quote(m4_default([$1], [[, ]])),
492 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
493 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
494 m4_define([_lt_decl_varnames_tagged],
495 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
496
497
498 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
499 # ------------------------------------------------
500 m4_define([lt_decl_all_varnames],
501 [_$0(m4_quote(m4_default([$1], [[, ]])),
502 m4_if([$2], [],
503 m4_quote(lt_decl_varnames),
504 m4_quote(m4_shift($@))))[]dnl
505 ])
506 m4_define([_lt_decl_all_varnames],
507 [lt_join($@, lt_decl_varnames_tagged([$1],
508 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
509 ])
510
511
512 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
513 # ------------------------------------
514 # Quote a variable value, and forward it to `config.status' so that its
515 # declaration there will have the same value as in `configure'. VARNAME
516 # must have a single quote delimited value for this to work.
517 m4_define([_LT_CONFIG_STATUS_DECLARE],
518 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
519
520
521 # _LT_CONFIG_STATUS_DECLARATIONS
522 # ------------------------------
523 # We delimit libtool config variables with single quotes, so when
524 # we write them to config.status, we have to be sure to quote all
525 # embedded single quotes properly. In configure, this macro expands
526 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
527 #
528 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
529 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
530 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
531 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
532
533
534 # _LT_LIBTOOL_TAGS
535 # ----------------
536 # Output comment and list of tags supported by the script
537 m4_defun([_LT_LIBTOOL_TAGS],
538 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
539 available_tags="_LT_TAGS"dnl
540 ])
541
542
543 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
544 # -----------------------------------
545 # Extract the dictionary values for VARNAME (optionally with TAG) and
546 # expand to a commented shell variable setting:
547 #
548 # # Some comment about what VAR is for.
549 # visible_name=$lt_internal_name
550 m4_define([_LT_LIBTOOL_DECLARE],
551 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
552 [description])))[]dnl
553 m4_pushdef([_libtool_name],
554 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
555 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
556 [0], [_libtool_name=[$]$1],
557 [1], [_libtool_name=$lt_[]$1],
558 [2], [_libtool_name=$lt_[]$1],
559 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
560 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
561 ])
562
563
564 # _LT_LIBTOOL_CONFIG_VARS
565 # -----------------------
566 # Produce commented declarations of non-tagged libtool config variables
567 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
568 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
569 # section) are produced by _LT_LIBTOOL_TAG_VARS.
570 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
571 [m4_foreach([_lt_var],
572 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
573 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
574
575
576 # _LT_LIBTOOL_TAG_VARS(TAG)
577 # -------------------------
578 m4_define([_LT_LIBTOOL_TAG_VARS],
579 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
580 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
581
582
583 # _LT_TAGVAR(VARNAME, [TAGNAME])
584 # ------------------------------
585 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
586
587
588 # _LT_CONFIG_COMMANDS
589 # -------------------
590 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
591 # variables for single and double quote escaping we saved from calls
592 # to _LT_DECL, we can put quote escaped variables declarations
593 # into `config.status', and then the shell code to quote escape them in
594 # for loops in `config.status'. Finally, any additional code accumulated
595 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
596 m4_defun([_LT_CONFIG_COMMANDS],
597 [AC_PROVIDE_IFELSE([LT_OUTPUT],
598 dnl If the libtool generation code has been placed in $CONFIG_LT,
599 dnl instead of duplicating it all over again into config.status,
600 dnl then we will have config.status run $CONFIG_LT later, so it
601 dnl needs to know what name is stored there:
602 [AC_CONFIG_COMMANDS([libtool],
603 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
604 dnl If the libtool generation code is destined for config.status,
605 dnl expand the accumulated commands and init code now:
606 [AC_CONFIG_COMMANDS([libtool],
607 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
608 ])#_LT_CONFIG_COMMANDS
609
610
611 # Initialize.
612 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
613 [
614
615 # The HP-UX ksh and POSIX shell print the target directory to stdout
616 # if CDPATH is set.
617 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
618
619 sed_quote_subst='$sed_quote_subst'
620 double_quote_subst='$double_quote_subst'
621 delay_variable_subst='$delay_variable_subst'
622 _LT_CONFIG_STATUS_DECLARATIONS
623 LTCC='$LTCC'
624 LTCFLAGS='$LTCFLAGS'
625 compiler='$compiler_DEFAULT'
626
627 # A function that is used when there is no print builtin or printf.
628 func_fallback_echo ()
629 {
630 eval 'cat <<_LTECHO_EOF
631 \$[]1
632 _LTECHO_EOF'
633 }
634
635 # Quote evaled strings.
636 for var in lt_decl_all_varnames([[ \
637 ]], lt_decl_quote_varnames); do
638 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
639 *[[\\\\\\\`\\"\\\$]]*)
640 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
641 ;;
642 *)
643 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
644 ;;
645 esac
646 done
647
648 # Double-quote double-evaled strings.
649 for var in lt_decl_all_varnames([[ \
650 ]], lt_decl_dquote_varnames); do
651 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
652 *[[\\\\\\\`\\"\\\$]]*)
653 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
654 ;;
655 *)
656 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
657 ;;
658 esac
659 done
660
661 _LT_OUTPUT_LIBTOOL_INIT
662 ])
663
664 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
665 # ------------------------------------
666 # Generate a child script FILE with all initialization necessary to
667 # reuse the environment learned by the parent script, and make the
668 # file executable. If COMMENT is supplied, it is inserted after the
669 # `#!' sequence but before initialization text begins. After this
670 # macro, additional text can be appended to FILE to form the body of
671 # the child script. The macro ends with non-zero status if the
672 # file could not be fully written (such as if the disk is full).
673 m4_ifdef([AS_INIT_GENERATED],
674 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
675 [m4_defun([_LT_GENERATED_FILE_INIT],
676 [m4_require([AS_PREPARE])]dnl
677 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
678 [lt_write_fail=0
679 cat >$1 <<_ASEOF || lt_write_fail=1
680 #! $SHELL
681 # Generated by $as_me.
682 $2
683 SHELL=\${CONFIG_SHELL-$SHELL}
684 export SHELL
685 _ASEOF
686 cat >>$1 <<\_ASEOF || lt_write_fail=1
687 AS_SHELL_SANITIZE
688 _AS_PREPARE
689 exec AS_MESSAGE_FD>&1
690 _ASEOF
691 test $lt_write_fail = 0 && chmod +x $1[]dnl
692 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
693
694 # LT_OUTPUT
695 # ---------
696 # This macro allows early generation of the libtool script (before
697 # AC_OUTPUT is called), incase it is used in configure for compilation
698 # tests.
699 AC_DEFUN([LT_OUTPUT],
700 [: ${CONFIG_LT=./config.lt}
701 AC_MSG_NOTICE([creating $CONFIG_LT])
702 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
703 [# Run this file to recreate a libtool stub with the current configuration.])
704
705 cat >>"$CONFIG_LT" <<\_LTEOF
706 lt_cl_silent=false
707 exec AS_MESSAGE_LOG_FD>>config.log
708 {
709 echo
710 AS_BOX([Running $as_me.])
711 } >&AS_MESSAGE_LOG_FD
712
713 lt_cl_help="\
714 \`$as_me' creates a local libtool stub from the current configuration,
715 for use in further configure time tests before the real libtool is
716 generated.
717
718 Usage: $[0] [[OPTIONS]]
719
720 -h, --help print this help, then exit
721 -V, --version print version number, then exit
722 -q, --quiet do not print progress messages
723 -d, --debug don't remove temporary files
724
725 Report bugs to <bug-libtool@gnu.org>."
726
727 lt_cl_version="\
728 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
729 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
730 configured by $[0], generated by m4_PACKAGE_STRING.
731
732 Copyright (C) 2010 Free Software Foundation, Inc.
733 This config.lt script is free software; the Free Software Foundation
734 gives unlimited permision to copy, distribute and modify it."
735
736 while test $[#] != 0
737 do
738 case $[1] in
739 --version | --v* | -V )
740 echo "$lt_cl_version"; exit 0 ;;
741 --help | --h* | -h )
742 echo "$lt_cl_help"; exit 0 ;;
743 --debug | --d* | -d )
744 debug=: ;;
745 --quiet | --q* | --silent | --s* | -q )
746 lt_cl_silent=: ;;
747
748 -*) AC_MSG_ERROR([unrecognized option: $[1]
749 Try \`$[0] --help' for more information.]) ;;
750
751 *) AC_MSG_ERROR([unrecognized argument: $[1]
752 Try \`$[0] --help' for more information.]) ;;
753 esac
754 shift
755 done
756
757 if $lt_cl_silent; then
758 exec AS_MESSAGE_FD>/dev/null
759 fi
760 _LTEOF
761
762 cat >>"$CONFIG_LT" <<_LTEOF
763 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
764 _LTEOF
765
766 cat >>"$CONFIG_LT" <<\_LTEOF
767 AC_MSG_NOTICE([creating $ofile])
768 _LT_OUTPUT_LIBTOOL_COMMANDS
769 AS_EXIT(0)
770 _LTEOF
771 chmod +x "$CONFIG_LT"
772
773 # configure is writing to config.log, but config.lt does its own redirection,
774 # appending to config.log, which fails on DOS, as config.log is still kept
775 # open by configure. Here we exec the FD to /dev/null, effectively closing
776 # config.log, so it can be properly (re)opened and appended to by config.lt.
777 lt_cl_success=:
778 test "$silent" = yes &&
779 lt_config_lt_args="$lt_config_lt_args --quiet"
780 exec AS_MESSAGE_LOG_FD>/dev/null
781 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
782 exec AS_MESSAGE_LOG_FD>>config.log
783 $lt_cl_success || AS_EXIT(1)
784 ])# LT_OUTPUT
785
786
787 # _LT_CONFIG(TAG)
788 # ---------------
789 # If TAG is the built-in tag, create an initial libtool script with a
790 # default configuration from the untagged config vars. Otherwise add code
791 # to config.status for appending the configuration named by TAG from the
792 # matching tagged config vars.
793 m4_defun([_LT_CONFIG],
794 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
795 _LT_CONFIG_SAVE_COMMANDS([
796 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
797 m4_if(_LT_TAG, [C], [
798 # See if we are running on zsh, and set the options which allow our
799 # commands through without removal of \ escapes.
800 if test -n "${ZSH_VERSION+set}" ; then
801 setopt NO_GLOB_SUBST
802 fi
803
804 cfgfile="${ofile}T"
805 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
806 $RM "$cfgfile"
807
808 cat <<_LT_EOF >> "$cfgfile"
809 #! $SHELL
810
811 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
812 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
813 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
814 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
815 #
816 _LT_COPYING
817 _LT_LIBTOOL_TAGS
818
819 # ### BEGIN LIBTOOL CONFIG
820 _LT_LIBTOOL_CONFIG_VARS
821 _LT_LIBTOOL_TAG_VARS
822 # ### END LIBTOOL CONFIG
823
824 _LT_EOF
825
826 case $host_os in
827 aix3*)
828 cat <<\_LT_EOF >> "$cfgfile"
829 # AIX sometimes has problems with the GCC collect2 program. For some
830 # reason, if we set the COLLECT_NAMES environment variable, the problems
831 # vanish in a puff of smoke.
832 if test "X${COLLECT_NAMES+set}" != Xset; then
833 COLLECT_NAMES=
834 export COLLECT_NAMES
835 fi
836 _LT_EOF
837 ;;
838 esac
839
840 _LT_PROG_LTMAIN
841
842 # We use sed instead of cat because bash on DJGPP gets confused if
843 # if finds mixed CR/LF and LF-only lines. Since sed operates in
844 # text mode, it properly converts lines to CR/LF. This bash problem
845 # is reportedly fixed, but why not run on old versions too?
846 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
847 || (rm -f "$cfgfile"; exit 1)
848
849 _LT_PROG_XSI_SHELLFNS
850
851 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
852 || (rm -f "$cfgfile"; exit 1)
853
854 mv -f "$cfgfile" "$ofile" ||
855 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
856 chmod +x "$ofile"
857 ],
858 [cat <<_LT_EOF >> "$ofile"
859
860 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
861 dnl in a comment (ie after a #).
862 # ### BEGIN LIBTOOL TAG CONFIG: $1
863 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
864 # ### END LIBTOOL TAG CONFIG: $1
865 _LT_EOF
866 ])dnl /m4_if
867 ],
868 [m4_if([$1], [], [
869 PACKAGE='$PACKAGE'
870 VERSION='$VERSION'
871 TIMESTAMP='$TIMESTAMP'
872 RM='$RM'
873 ofile='$ofile'], [])
874 ])dnl /_LT_CONFIG_SAVE_COMMANDS
875 ])# _LT_CONFIG
876
877
878 # LT_SUPPORTED_TAG(TAG)
879 # ---------------------
880 # Trace this macro to discover what tags are supported by the libtool
881 # --tag option, using:
882 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
883 AC_DEFUN([LT_SUPPORTED_TAG], [])
884
885
886 # C support is built-in for now
887 m4_define([_LT_LANG_C_enabled], [])
888 m4_define([_LT_TAGS], [])
889
890
891 # LT_LANG(LANG)
892 # -------------
893 # Enable libtool support for the given language if not already enabled.
894 AC_DEFUN([LT_LANG],
895 [AC_BEFORE([$0], [LT_OUTPUT])dnl
896 m4_case([$1],
897 [C], [_LT_LANG(C)],
898 [C++], [_LT_LANG(CXX)],
899 [Java], [_LT_LANG(GCJ)],
900 [Fortran 77], [_LT_LANG(F77)],
901 [Fortran], [_LT_LANG(FC)],
902 [Windows Resource], [_LT_LANG(RC)],
903 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
904 [_LT_LANG($1)],
905 [m4_fatal([$0: unsupported language: "$1"])])])dnl
906 ])# LT_LANG
907
908
909 # _LT_LANG(LANGNAME)
910 # ------------------
911 m4_defun([_LT_LANG],
912 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
913 [LT_SUPPORTED_TAG([$1])dnl
914 m4_append([_LT_TAGS], [$1 ])dnl
915 m4_define([_LT_LANG_]$1[_enabled], [])dnl
916 _LT_LANG_$1_CONFIG($1)])dnl
917 ])# _LT_LANG
918
919
920 # _LT_LANG_DEFAULT_CONFIG
921 # -----------------------
922 m4_defun([_LT_LANG_DEFAULT_CONFIG],
923 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
924 [LT_LANG(CXX)],
925 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
926
927 AC_PROVIDE_IFELSE([AC_PROG_F77],
928 [LT_LANG(F77)],
929 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
930
931 AC_PROVIDE_IFELSE([AC_PROG_FC],
932 [LT_LANG(FC)],
933 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
934
935 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
936 dnl pulling things in needlessly.
937 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
938 [LT_LANG(GCJ)],
939 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
940 [LT_LANG(GCJ)],
941 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
942 [LT_LANG(GCJ)],
943 [m4_ifdef([AC_PROG_GCJ],
944 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
945 m4_ifdef([A][M_PROG_GCJ],
946 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
947 m4_ifdef([LT_PROG_GCJ],
948 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
949
950 AC_PROVIDE_IFELSE([LT_PROG_RC],
951 [LT_LANG(RC)],
952 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
953 ])# _LT_LANG_DEFAULT_CONFIG
954
955 # Obsolete macros:
956 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
957 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
958 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
959 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
960 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
961 dnl aclocal-1.4 backwards compatibility:
962 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
963 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
964 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
965 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
966 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
967
968
969 # _LT_TAG_COMPILER
970 # ----------------
971 m4_defun([_LT_TAG_COMPILER],
972 [AC_REQUIRE([AC_PROG_CC])dnl
973
974 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
975 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
976 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
977 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
978
979 # If no C compiler was specified, use CC.
980 LTCC=${LTCC-"$CC"}
981
982 # If no C compiler flags were specified, use CFLAGS.
983 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
984
985 # Allow CC to be a program name with arguments.
986 compiler=$CC
987 ])# _LT_TAG_COMPILER
988
989
990 # _LT_COMPILER_BOILERPLATE
991 # ------------------------
992 # Check for compiler boilerplate output or warnings with
993 # the simple compiler test code.
994 m4_defun([_LT_COMPILER_BOILERPLATE],
995 [m4_require([_LT_DECL_SED])dnl
996 ac_outfile=conftest.$ac_objext
997 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
998 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
999 _lt_compiler_boilerplate=`cat conftest.err`
1000 $RM conftest*
1001 ])# _LT_COMPILER_BOILERPLATE
1002
1003
1004 # _LT_LINKER_BOILERPLATE
1005 # ----------------------
1006 # Check for linker boilerplate output or warnings with
1007 # the simple link test code.
1008 m4_defun([_LT_LINKER_BOILERPLATE],
1009 [m4_require([_LT_DECL_SED])dnl
1010 ac_outfile=conftest.$ac_objext
1011 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1012 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1013 _lt_linker_boilerplate=`cat conftest.err`
1014 $RM -r conftest*
1015 ])# _LT_LINKER_BOILERPLATE
1016
1017 # _LT_REQUIRED_DARWIN_CHECKS
1018 # -------------------------
1019 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1020 case $host_os in
1021 rhapsody* | darwin*)
1022 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1023 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1024 AC_CHECK_TOOL([LIPO], [lipo], [:])
1025 AC_CHECK_TOOL([OTOOL], [otool], [:])
1026 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1027 _LT_DECL([], [DSYMUTIL], [1],
1028 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1029 _LT_DECL([], [NMEDIT], [1],
1030 [Tool to change global to local symbols on Mac OS X])
1031 _LT_DECL([], [LIPO], [1],
1032 [Tool to manipulate fat objects and archives on Mac OS X])
1033 _LT_DECL([], [OTOOL], [1],
1034 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1035 _LT_DECL([], [OTOOL64], [1],
1036 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1037
1038 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1039 [lt_cv_apple_cc_single_mod=no
1040 if test -z "${LT_MULTI_MODULE}"; then
1041 # By default we will add the -single_module flag. You can override
1042 # by either setting the environment variable LT_MULTI_MODULE
1043 # non-empty at configure time, or by adding -multi_module to the
1044 # link flags.
1045 rm -rf libconftest.dylib*
1046 echo "int foo(void){return 1;}" > conftest.c
1047 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1048 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1049 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1050 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1051 _lt_result=$?
1052 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1053 lt_cv_apple_cc_single_mod=yes
1054 else
1055 cat conftest.err >&AS_MESSAGE_LOG_FD
1056 fi
1057 rm -rf libconftest.dylib*
1058 rm -f conftest.*
1059 fi])
1060 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1061 [lt_cv_ld_exported_symbols_list],
1062 [lt_cv_ld_exported_symbols_list=no
1063 save_LDFLAGS=$LDFLAGS
1064 echo "_main" > conftest.sym
1065 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1066 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1067 [lt_cv_ld_exported_symbols_list=yes],
1068 [lt_cv_ld_exported_symbols_list=no])
1069 LDFLAGS="$save_LDFLAGS"
1070 ])
1071 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1072 [lt_cv_ld_force_load=no
1073 cat > conftest.c << _LT_EOF
1074 int forced_loaded() { return 2;}
1075 _LT_EOF
1076 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1077 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1078 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1079 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1080 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1081 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1082 cat > conftest.c << _LT_EOF
1083 int main() { return 0;}
1084 _LT_EOF
1085 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1086 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1087 _lt_result=$?
1088 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
1089 lt_cv_ld_force_load=yes
1090 else
1091 cat conftest.err >&AS_MESSAGE_LOG_FD
1092 fi
1093 rm -f conftest.err libconftest.a conftest conftest.c
1094 rm -rf conftest.dSYM
1095 ])
1096 case $host_os in
1097 rhapsody* | darwin1.[[012]])
1098 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1099 darwin1.*)
1100 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1101 darwin*) # darwin 5.x on
1102 # if running on 10.5 or later, the deployment target defaults
1103 # to the OS version, if on x86, and 10.4, the deployment
1104 # target defaults to 10.4. Don't you love it?
1105 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1106 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1107 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1108 10.[[012]]*)
1109 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1110 10.*)
1111 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1112 esac
1113 ;;
1114 esac
1115 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1116 _lt_dar_single_mod='$single_module'
1117 fi
1118 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1119 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1120 else
1121 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1122 fi
1123 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1124 _lt_dsymutil='~$DSYMUTIL $lib || :'
1125 else
1126 _lt_dsymutil=
1127 fi
1128 ;;
1129 esac
1130 ])
1131
1132
1133 # _LT_DARWIN_LINKER_FEATURES
1134 # --------------------------
1135 # Checks for linker and compiler features on darwin
1136 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1137 [
1138 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1139 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1140 _LT_TAGVAR(hardcode_direct, $1)=no
1141 _LT_TAGVAR(hardcode_automatic, $1)=yes
1142 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1143 if test "$lt_cv_ld_force_load" = "yes"; then
1144 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1145 else
1146 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1147 fi
1148 _LT_TAGVAR(link_all_deplibs, $1)=yes
1149 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1150 case $cc_basename in
1151 ifort*) _lt_dar_can_shared=yes ;;
1152 *) _lt_dar_can_shared=$GCC ;;
1153 esac
1154 if test "$_lt_dar_can_shared" = "yes"; then
1155 output_verbose_link_cmd=func_echo_all
1156 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1157 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1158 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1159 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1160 m4_if([$1], [CXX],
1161 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1162 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1163 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1164 fi
1165 ],[])
1166 else
1167 _LT_TAGVAR(ld_shlibs, $1)=no
1168 fi
1169 ])
1170
1171 # _LT_SYS_MODULE_PATH_AIX
1172 # -----------------------
1173 # Links a minimal program and checks the executable
1174 # for the system default hardcoded library path. In most cases,
1175 # this is /usr/lib:/lib, but when the MPI compilers are used
1176 # the location of the communication and MPI libs are included too.
1177 # If we don't find anything, use the default library path according
1178 # to the aix ld manual.
1179 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1180 [m4_require([_LT_DECL_SED])dnl
1181 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1182 lt_aix_libpath_sed='
1183 /Import File Strings/,/^$/ {
1184 /^0/ {
1185 s/^0 *\(.*\)$/\1/
1186 p
1187 }
1188 }'
1189 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1190 # Check for a 64-bit object if we didn't find anything.
1191 if test -z "$aix_libpath"; then
1192 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1193 fi],[])
1194 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1195 ])# _LT_SYS_MODULE_PATH_AIX
1196
1197
1198 # _LT_SHELL_INIT(ARG)
1199 # -------------------
1200 m4_define([_LT_SHELL_INIT],
1201 [m4_divert_text([M4SH-INIT], [$1
1202 ])])# _LT_SHELL_INIT
1203
1204
1205
1206 # _LT_PROG_ECHO_BACKSLASH
1207 # -----------------------
1208 # Find how we can fake an echo command that does not interpret backslash.
1209 # In particular, with Autoconf 2.60 or later we add some code to the start
1210 # of the generated configure script which will find a shell with a builtin
1211 # printf (which we can use as an echo command).
1212 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1213 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1214 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1215 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1216
1217 AC_MSG_CHECKING([how to print strings])
1218 # Test print first, because it will be a builtin if present.
1219 if test "X`print -r -- -n 2>/dev/null`" = X-n && \
1220 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1221 ECHO='print -r --'
1222 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1223 ECHO='printf %s\n'
1224 else
1225 # Use this function as a fallback that always works.
1226 func_fallback_echo ()
1227 {
1228 eval 'cat <<_LTECHO_EOF
1229 $[]1
1230 _LTECHO_EOF'
1231 }
1232 ECHO='func_fallback_echo'
1233 fi
1234
1235 # func_echo_all arg...
1236 # Invoke $ECHO with all args, space-separated.
1237 func_echo_all ()
1238 {
1239 $ECHO "$*"
1240 }
1241
1242 case "$ECHO" in
1243 printf*) AC_MSG_RESULT([printf]) ;;
1244 print*) AC_MSG_RESULT([print -r]) ;;
1245 *) AC_MSG_RESULT([cat]) ;;
1246 esac
1247
1248 m4_ifdef([_AS_DETECT_SUGGESTED],
1249 [_AS_DETECT_SUGGESTED([
1250 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1251 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1252 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1253 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1254 PATH=/empty FPATH=/empty; export PATH FPATH
1255 test "X`printf %s $ECHO`" = "X$ECHO" \
1256 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1257
1258 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1259 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1260 ])# _LT_PROG_ECHO_BACKSLASH
1261
1262
1263 # _LT_ENABLE_LOCK
1264 # ---------------
1265 m4_defun([_LT_ENABLE_LOCK],
1266 [AC_ARG_ENABLE([libtool-lock],
1267 [AS_HELP_STRING([--disable-libtool-lock],
1268 [avoid locking (might break parallel builds)])])
1269 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1270
1271 # Some flags need to be propagated to the compiler or linker for good
1272 # libtool support.
1273 case $host in
1274 ia64-*-hpux*)
1275 # Find out which ABI we are using.
1276 echo 'int i;' > conftest.$ac_ext
1277 if AC_TRY_EVAL(ac_compile); then
1278 case `/usr/bin/file conftest.$ac_objext` in
1279 *ELF-32*)
1280 HPUX_IA64_MODE="32"
1281 ;;
1282 *ELF-64*)
1283 HPUX_IA64_MODE="64"
1284 ;;
1285 esac
1286 fi
1287 rm -rf conftest*
1288 ;;
1289 *-*-irix6*)
1290 # Find out which ABI we are using.
1291 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1292 if AC_TRY_EVAL(ac_compile); then
1293 if test "$lt_cv_prog_gnu_ld" = yes; then
1294 case `/usr/bin/file conftest.$ac_objext` in
1295 *32-bit*)
1296 LD="${LD-ld} -melf32bsmip"
1297 ;;
1298 *N32*)
1299 LD="${LD-ld} -melf32bmipn32"
1300 ;;
1301 *64-bit*)
1302 LD="${LD-ld} -melf64bmip"
1303 ;;
1304 esac
1305 else
1306 case `/usr/bin/file conftest.$ac_objext` in
1307 *32-bit*)
1308 LD="${LD-ld} -32"
1309 ;;
1310 *N32*)
1311 LD="${LD-ld} -n32"
1312 ;;
1313 *64-bit*)
1314 LD="${LD-ld} -64"
1315 ;;
1316 esac
1317 fi
1318 fi
1319 rm -rf conftest*
1320 ;;
1321
1322 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1323 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1324 # Find out which ABI we are using.
1325 echo 'int i;' > conftest.$ac_ext
1326 if AC_TRY_EVAL(ac_compile); then
1327 case `/usr/bin/file conftest.o` in
1328 *32-bit*)
1329 case $host in
1330 x86_64-*kfreebsd*-gnu)
1331 LD="${LD-ld} -m elf_i386_fbsd"
1332 ;;
1333 x86_64-*linux*)
1334 LD="${LD-ld} -m elf_i386"
1335 ;;
1336 ppc64-*linux*|powerpc64-*linux*)
1337 LD="${LD-ld} -m elf32ppclinux"
1338 ;;
1339 s390x-*linux*)
1340 LD="${LD-ld} -m elf_s390"
1341 ;;
1342 sparc64-*linux*)
1343 LD="${LD-ld} -m elf32_sparc"
1344 ;;
1345 esac
1346 ;;
1347 *64-bit*)
1348 case $host in
1349 x86_64-*kfreebsd*-gnu)
1350 LD="${LD-ld} -m elf_x86_64_fbsd"
1351 ;;
1352 x86_64-*linux*)
1353 LD="${LD-ld} -m elf_x86_64"
1354 ;;
1355 ppc*-*linux*|powerpc*-*linux*)
1356 LD="${LD-ld} -m elf64ppc"
1357 ;;
1358 s390*-*linux*|s390*-*tpf*)
1359 LD="${LD-ld} -m elf64_s390"
1360 ;;
1361 sparc*-*linux*)
1362 LD="${LD-ld} -m elf64_sparc"
1363 ;;
1364 esac
1365 ;;
1366 esac
1367 fi
1368 rm -rf conftest*
1369 ;;
1370
1371 *-*-sco3.2v5*)
1372 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1373 SAVE_CFLAGS="$CFLAGS"
1374 CFLAGS="$CFLAGS -belf"
1375 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1376 [AC_LANG_PUSH(C)
1377 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1378 AC_LANG_POP])
1379 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1380 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1381 CFLAGS="$SAVE_CFLAGS"
1382 fi
1383 ;;
1384 sparc*-*solaris*)
1385 # Find out which ABI we are using.
1386 echo 'int i;' > conftest.$ac_ext
1387 if AC_TRY_EVAL(ac_compile); then
1388 case `/usr/bin/file conftest.o` in
1389 *64-bit*)
1390 case $lt_cv_prog_gnu_ld in
1391 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1392 *)
1393 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1394 LD="${LD-ld} -64"
1395 fi
1396 ;;
1397 esac
1398 ;;
1399 esac
1400 fi
1401 rm -rf conftest*
1402 ;;
1403 esac
1404
1405 need_locks="$enable_libtool_lock"
1406 ])# _LT_ENABLE_LOCK
1407
1408
1409 # _LT_CMD_OLD_ARCHIVE
1410 # -------------------
1411 m4_defun([_LT_CMD_OLD_ARCHIVE],
1412 [AC_CHECK_TOOL(AR, ar, false)
1413 test -z "$AR" && AR=ar
1414 test -z "$AR_FLAGS" && AR_FLAGS=cru
1415 _LT_DECL([], [AR], [1], [The archiver])
1416 _LT_DECL([], [AR_FLAGS], [1])
1417
1418 AC_CHECK_TOOL(STRIP, strip, :)
1419 test -z "$STRIP" && STRIP=:
1420 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1421
1422 AC_CHECK_TOOL(RANLIB, ranlib, :)
1423 test -z "$RANLIB" && RANLIB=:
1424 _LT_DECL([], [RANLIB], [1],
1425 [Commands used to install an old-style archive])
1426
1427 # Determine commands to create old-style static archives.
1428 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1429 old_postinstall_cmds='chmod 644 $oldlib'
1430 old_postuninstall_cmds=
1431
1432 if test -n "$RANLIB"; then
1433 case $host_os in
1434 openbsd*)
1435 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1436 ;;
1437 *)
1438 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1439 ;;
1440 esac
1441 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1442 fi
1443
1444 case $host_os in
1445 darwin*)
1446 lock_old_archive_extraction=yes ;;
1447 *)
1448 lock_old_archive_extraction=no ;;
1449 esac
1450 _LT_DECL([], [old_postinstall_cmds], [2])
1451 _LT_DECL([], [old_postuninstall_cmds], [2])
1452 _LT_TAGDECL([], [old_archive_cmds], [2],
1453 [Commands used to build an old-style archive])
1454 _LT_DECL([], [lock_old_archive_extraction], [0],
1455 [Whether to use a lock for old archive extraction])
1456 ])# _LT_CMD_OLD_ARCHIVE
1457
1458
1459 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1460 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1461 # ----------------------------------------------------------------
1462 # Check whether the given compiler option works
1463 AC_DEFUN([_LT_COMPILER_OPTION],
1464 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1465 m4_require([_LT_DECL_SED])dnl
1466 AC_CACHE_CHECK([$1], [$2],
1467 [$2=no
1468 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1469 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1470 lt_compiler_flag="$3"
1471 # Insert the option either (1) after the last *FLAGS variable, or
1472 # (2) before a word containing "conftest.", or (3) at the end.
1473 # Note that $ac_compile itself does not contain backslashes and begins
1474 # with a dollar sign (not a hyphen), so the echo should work correctly.
1475 # The option is referenced via a variable to avoid confusing sed.
1476 lt_compile=`echo "$ac_compile" | $SED \
1477 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1478 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1479 -e 's:$: $lt_compiler_flag:'`
1480 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1481 (eval "$lt_compile" 2>conftest.err)
1482 ac_status=$?
1483 cat conftest.err >&AS_MESSAGE_LOG_FD
1484 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1485 if (exit $ac_status) && test -s "$ac_outfile"; then
1486 # The compiler can only warn and ignore the option if not recognized
1487 # So say no if there are warnings other than the usual output.
1488 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1489 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1490 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1491 $2=yes
1492 fi
1493 fi
1494 $RM conftest*
1495 ])
1496
1497 if test x"[$]$2" = xyes; then
1498 m4_if([$5], , :, [$5])
1499 else
1500 m4_if([$6], , :, [$6])
1501 fi
1502 ])# _LT_COMPILER_OPTION
1503
1504 # Old name:
1505 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1506 dnl aclocal-1.4 backwards compatibility:
1507 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1508
1509
1510 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1511 # [ACTION-SUCCESS], [ACTION-FAILURE])
1512 # ----------------------------------------------------
1513 # Check whether the given linker option works
1514 AC_DEFUN([_LT_LINKER_OPTION],
1515 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1516 m4_require([_LT_DECL_SED])dnl
1517 AC_CACHE_CHECK([$1], [$2],
1518 [$2=no
1519 save_LDFLAGS="$LDFLAGS"
1520 LDFLAGS="$LDFLAGS $3"
1521 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1522 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1523 # The linker can only warn and ignore the option if not recognized
1524 # So say no if there are warnings
1525 if test -s conftest.err; then
1526 # Append any errors to the config.log.
1527 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1528 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1529 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1530 if diff conftest.exp conftest.er2 >/dev/null; then
1531 $2=yes
1532 fi
1533 else
1534 $2=yes
1535 fi
1536 fi
1537 $RM -r conftest*
1538 LDFLAGS="$save_LDFLAGS"
1539 ])
1540
1541 if test x"[$]$2" = xyes; then
1542 m4_if([$4], , :, [$4])
1543 else
1544 m4_if([$5], , :, [$5])
1545 fi
1546 ])# _LT_LINKER_OPTION
1547
1548 # Old name:
1549 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1550 dnl aclocal-1.4 backwards compatibility:
1551 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1552
1553
1554 # LT_CMD_MAX_LEN
1555 #---------------
1556 AC_DEFUN([LT_CMD_MAX_LEN],
1557 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1558 # find the maximum length of command line arguments
1559 AC_MSG_CHECKING([the maximum length of command line arguments])
1560 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1561 i=0
1562 teststring="ABCD"
1563
1564 case $build_os in
1565 msdosdjgpp*)
1566 # On DJGPP, this test can blow up pretty badly due to problems in libc
1567 # (any single argument exceeding 2000 bytes causes a buffer overrun
1568 # during glob expansion). Even if it were fixed, the result of this
1569 # check would be larger than it should be.
1570 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1571 ;;
1572
1573 gnu*)
1574 # Under GNU Hurd, this test is not required because there is
1575 # no limit to the length of command line arguments.
1576 # Libtool will interpret -1 as no limit whatsoever
1577 lt_cv_sys_max_cmd_len=-1;
1578 ;;
1579
1580 cygwin* | mingw* | cegcc*)
1581 # On Win9x/ME, this test blows up -- it succeeds, but takes
1582 # about 5 minutes as the teststring grows exponentially.
1583 # Worse, since 9x/ME are not pre-emptively multitasking,
1584 # you end up with a "frozen" computer, even though with patience
1585 # the test eventually succeeds (with a max line length of 256k).
1586 # Instead, let's just punt: use the minimum linelength reported by
1587 # all of the supported platforms: 8192 (on NT/2K/XP).
1588 lt_cv_sys_max_cmd_len=8192;
1589 ;;
1590
1591 mint*)
1592 # On MiNT this can take a long time and run out of memory.
1593 lt_cv_sys_max_cmd_len=8192;
1594 ;;
1595
1596 amigaos*)
1597 # On AmigaOS with pdksh, this test takes hours, literally.
1598 # So we just punt and use a minimum line length of 8192.
1599 lt_cv_sys_max_cmd_len=8192;
1600 ;;
1601
1602 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1603 # This has been around since 386BSD, at least. Likely further.
1604 if test -x /sbin/sysctl; then
1605 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1606 elif test -x /usr/sbin/sysctl; then
1607 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1608 else
1609 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1610 fi
1611 # And add a safety zone
1612 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1613 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1614 ;;
1615
1616 interix*)
1617 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1618 lt_cv_sys_max_cmd_len=196608
1619 ;;
1620
1621 osf*)
1622 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1623 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1624 # nice to cause kernel panics so lets avoid the loop below.
1625 # First set a reasonable default.
1626 lt_cv_sys_max_cmd_len=16384
1627 #
1628 if test -x /sbin/sysconfig; then
1629 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1630 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1631 esac
1632 fi
1633 ;;
1634 sco3.2v5*)
1635 lt_cv_sys_max_cmd_len=102400
1636 ;;
1637 sysv5* | sco5v6* | sysv4.2uw2*)
1638 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1639 if test -n "$kargmax"; then
1640 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1641 else
1642 lt_cv_sys_max_cmd_len=32768
1643 fi
1644 ;;
1645 *)
1646 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1647 if test -n "$lt_cv_sys_max_cmd_len"; then
1648 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1649 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1650 else
1651 # Make teststring a little bigger before we do anything with it.
1652 # a 1K string should be a reasonable start.
1653 for i in 1 2 3 4 5 6 7 8 ; do
1654 teststring=$teststring$teststring
1655 done
1656 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1657 # If test is not a shell built-in, we'll probably end up computing a
1658 # maximum length that is only half of the actual maximum length, but
1659 # we can't tell.
1660 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
1661 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1662 test $i != 17 # 1/2 MB should be enough
1663 do
1664 i=`expr $i + 1`
1665 teststring=$teststring$teststring
1666 done
1667 # Only check the string length outside the loop.
1668 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1669 teststring=
1670 # Add a significant safety factor because C++ compilers can tack on
1671 # massive amounts of additional arguments before passing them to the
1672 # linker. It appears as though 1/2 is a usable value.
1673 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1674 fi
1675 ;;
1676 esac
1677 ])
1678 if test -n $lt_cv_sys_max_cmd_len ; then
1679 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1680 else
1681 AC_MSG_RESULT(none)
1682 fi
1683 max_cmd_len=$lt_cv_sys_max_cmd_len
1684 _LT_DECL([], [max_cmd_len], [0],
1685 [What is the maximum length of a command?])
1686 ])# LT_CMD_MAX_LEN
1687
1688 # Old name:
1689 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1690 dnl aclocal-1.4 backwards compatibility:
1691 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1692
1693
1694 # _LT_HEADER_DLFCN
1695 # ----------------
1696 m4_defun([_LT_HEADER_DLFCN],
1697 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1698 ])# _LT_HEADER_DLFCN
1699
1700
1701 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1702 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1703 # ----------------------------------------------------------------
1704 m4_defun([_LT_TRY_DLOPEN_SELF],
1705 [m4_require([_LT_HEADER_DLFCN])dnl
1706 if test "$cross_compiling" = yes; then :
1707 [$4]
1708 else
1709 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1710 lt_status=$lt_dlunknown
1711 cat > conftest.$ac_ext <<_LT_EOF
1712 [#line $LINENO "configure"
1713 #include "confdefs.h"
1714
1715 #if HAVE_DLFCN_H
1716 #include <dlfcn.h>
1717 #endif
1718
1719 #include <stdio.h>
1720
1721 #ifdef RTLD_GLOBAL
1722 # define LT_DLGLOBAL RTLD_GLOBAL
1723 #else
1724 # ifdef DL_GLOBAL
1725 # define LT_DLGLOBAL DL_GLOBAL
1726 # else
1727 # define LT_DLGLOBAL 0
1728 # endif
1729 #endif
1730
1731 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1732 find out it does not work in some platform. */
1733 #ifndef LT_DLLAZY_OR_NOW
1734 # ifdef RTLD_LAZY
1735 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1736 # else
1737 # ifdef DL_LAZY
1738 # define LT_DLLAZY_OR_NOW DL_LAZY
1739 # else
1740 # ifdef RTLD_NOW
1741 # define LT_DLLAZY_OR_NOW RTLD_NOW
1742 # else
1743 # ifdef DL_NOW
1744 # define LT_DLLAZY_OR_NOW DL_NOW
1745 # else
1746 # define LT_DLLAZY_OR_NOW 0
1747 # endif
1748 # endif
1749 # endif
1750 # endif
1751 #endif
1752
1753 /* When -fvisbility=hidden is used, assume the code has been annotated
1754 correspondingly for the symbols needed. */
1755 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1756 void fnord () __attribute__((visibility("default")));
1757 #endif
1758
1759 void fnord () { int i=42; }
1760 int main ()
1761 {
1762 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1763 int status = $lt_dlunknown;
1764
1765 if (self)
1766 {
1767 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1768 else
1769 {
1770 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1771 else puts (dlerror ());
1772 }
1773 /* dlclose (self); */
1774 }
1775 else
1776 puts (dlerror ());
1777
1778 return status;
1779 }]
1780 _LT_EOF
1781 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1782 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1783 lt_status=$?
1784 case x$lt_status in
1785 x$lt_dlno_uscore) $1 ;;
1786 x$lt_dlneed_uscore) $2 ;;
1787 x$lt_dlunknown|x*) $3 ;;
1788 esac
1789 else :
1790 # compilation failed
1791 $3
1792 fi
1793 fi
1794 rm -fr conftest*
1795 ])# _LT_TRY_DLOPEN_SELF
1796
1797
1798 # LT_SYS_DLOPEN_SELF
1799 # ------------------
1800 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1801 [m4_require([_LT_HEADER_DLFCN])dnl
1802 if test "x$enable_dlopen" != xyes; then
1803 enable_dlopen=unknown
1804 enable_dlopen_self=unknown
1805 enable_dlopen_self_static=unknown
1806 else
1807 lt_cv_dlopen=no
1808 lt_cv_dlopen_libs=
1809
1810 case $host_os in
1811 beos*)
1812 lt_cv_dlopen="load_add_on"
1813 lt_cv_dlopen_libs=
1814 lt_cv_dlopen_self=yes
1815 ;;
1816
1817 mingw* | pw32* | cegcc*)
1818 lt_cv_dlopen="LoadLibrary"
1819 lt_cv_dlopen_libs=
1820 ;;
1821
1822 cygwin*)
1823 lt_cv_dlopen="dlopen"
1824 lt_cv_dlopen_libs=
1825 ;;
1826
1827 darwin*)
1828 # if libdl is installed we need to link against it
1829 AC_CHECK_LIB([dl], [dlopen],
1830 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1831 lt_cv_dlopen="dyld"
1832 lt_cv_dlopen_libs=
1833 lt_cv_dlopen_self=yes
1834 ])
1835 ;;
1836
1837 *)
1838 AC_CHECK_FUNC([shl_load],
1839 [lt_cv_dlopen="shl_load"],
1840 [AC_CHECK_LIB([dld], [shl_load],
1841 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1842 [AC_CHECK_FUNC([dlopen],
1843 [lt_cv_dlopen="dlopen"],
1844 [AC_CHECK_LIB([dl], [dlopen],
1845 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1846 [AC_CHECK_LIB([svld], [dlopen],
1847 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1848 [AC_CHECK_LIB([dld], [dld_link],
1849 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1850 ])
1851 ])
1852 ])
1853 ])
1854 ])
1855 ;;
1856 esac
1857
1858 if test "x$lt_cv_dlopen" != xno; then
1859 enable_dlopen=yes
1860 else
1861 enable_dlopen=no
1862 fi
1863
1864 case $lt_cv_dlopen in
1865 dlopen)
1866 save_CPPFLAGS="$CPPFLAGS"
1867 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1868
1869 save_LDFLAGS="$LDFLAGS"
1870 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1871
1872 save_LIBS="$LIBS"
1873 LIBS="$lt_cv_dlopen_libs $LIBS"
1874
1875 AC_CACHE_CHECK([whether a program can dlopen itself],
1876 lt_cv_dlopen_self, [dnl
1877 _LT_TRY_DLOPEN_SELF(
1878 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1879 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1880 ])
1881
1882 if test "x$lt_cv_dlopen_self" = xyes; then
1883 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1884 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1885 lt_cv_dlopen_self_static, [dnl
1886 _LT_TRY_DLOPEN_SELF(
1887 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1888 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1889 ])
1890 fi
1891
1892 CPPFLAGS="$save_CPPFLAGS"
1893 LDFLAGS="$save_LDFLAGS"
1894 LIBS="$save_LIBS"
1895 ;;
1896 esac
1897
1898 case $lt_cv_dlopen_self in
1899 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1900 *) enable_dlopen_self=unknown ;;
1901 esac
1902
1903 case $lt_cv_dlopen_self_static in
1904 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1905 *) enable_dlopen_self_static=unknown ;;
1906 esac
1907 fi
1908 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1909 [Whether dlopen is supported])
1910 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1911 [Whether dlopen of programs is supported])
1912 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1913 [Whether dlopen of statically linked programs is supported])
1914 ])# LT_SYS_DLOPEN_SELF
1915
1916 # Old name:
1917 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1918 dnl aclocal-1.4 backwards compatibility:
1919 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1920
1921
1922 # _LT_COMPILER_C_O([TAGNAME])
1923 # ---------------------------
1924 # Check to see if options -c and -o are simultaneously supported by compiler.
1925 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1926 m4_defun([_LT_COMPILER_C_O],
1927 [m4_require([_LT_DECL_SED])dnl
1928 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1929 m4_require([_LT_TAG_COMPILER])dnl
1930 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1931 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1932 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1933 $RM -r conftest 2>/dev/null
1934 mkdir conftest
1935 cd conftest
1936 mkdir out
1937 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1938
1939 lt_compiler_flag="-o out/conftest2.$ac_objext"
1940 # Insert the option either (1) after the last *FLAGS variable, or
1941 # (2) before a word containing "conftest.", or (3) at the end.
1942 # Note that $ac_compile itself does not contain backslashes and begins
1943 # with a dollar sign (not a hyphen), so the echo should work correctly.
1944 lt_compile=`echo "$ac_compile" | $SED \
1945 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1946 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1947 -e 's:$: $lt_compiler_flag:'`
1948 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1949 (eval "$lt_compile" 2>out/conftest.err)
1950 ac_status=$?
1951 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1952 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1953 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1954 then
1955 # The compiler can only warn and ignore the option if not recognized
1956 # So say no if there are warnings
1957 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
1958 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1959 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1960 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1961 fi
1962 fi
1963 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1964 $RM conftest*
1965 # SGI C++ compiler will create directory out/ii_files/ for
1966 # template instantiation
1967 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1968 $RM out/* && rmdir out
1969 cd ..
1970 $RM -r conftest
1971 $RM conftest*
1972 ])
1973 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1974 [Does compiler simultaneously support -c and -o options?])
1975 ])# _LT_COMPILER_C_O
1976
1977
1978 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
1979 # ----------------------------------
1980 # Check to see if we can do hard links to lock some files if needed
1981 m4_defun([_LT_COMPILER_FILE_LOCKS],
1982 [m4_require([_LT_ENABLE_LOCK])dnl
1983 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1984 _LT_COMPILER_C_O([$1])
1985
1986 hard_links="nottested"
1987 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1988 # do not overwrite the value of need_locks provided by the user
1989 AC_MSG_CHECKING([if we can lock with hard links])
1990 hard_links=yes
1991 $RM conftest*
1992 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1993 touch conftest.a
1994 ln conftest.a conftest.b 2>&5 || hard_links=no
1995 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1996 AC_MSG_RESULT([$hard_links])
1997 if test "$hard_links" = no; then
1998 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1999 need_locks=warn
2000 fi
2001 else
2002 need_locks=no
2003 fi
2004 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2005 ])# _LT_COMPILER_FILE_LOCKS
2006
2007
2008 # _LT_CHECK_OBJDIR
2009 # ----------------
2010 m4_defun([_LT_CHECK_OBJDIR],
2011 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2012 [rm -f .libs 2>/dev/null
2013 mkdir .libs 2>/dev/null
2014 if test -d .libs; then
2015 lt_cv_objdir=.libs
2016 else
2017 # MS-DOS does not allow filenames that begin with a dot.
2018 lt_cv_objdir=_libs
2019 fi
2020 rmdir .libs 2>/dev/null])
2021 objdir=$lt_cv_objdir
2022 _LT_DECL([], [objdir], [0],
2023 [The name of the directory that contains temporary libtool files])dnl
2024 m4_pattern_allow([LT_OBJDIR])dnl
2025 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2026 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2027 ])# _LT_CHECK_OBJDIR
2028
2029
2030 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2031 # --------------------------------------
2032 # Check hardcoding attributes.
2033 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2034 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2035 _LT_TAGVAR(hardcode_action, $1)=
2036 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2037 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2038 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2039
2040 # We can hardcode non-existent directories.
2041 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2042 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2043 # have to relink, otherwise we might link with an installed library
2044 # when we should be linking with a yet-to-be-installed one
2045 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2046 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2047 # Linking always hardcodes the temporary library directory.
2048 _LT_TAGVAR(hardcode_action, $1)=relink
2049 else
2050 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2051 _LT_TAGVAR(hardcode_action, $1)=immediate
2052 fi
2053 else
2054 # We cannot hardcode anything, or else we can only hardcode existing
2055 # directories.
2056 _LT_TAGVAR(hardcode_action, $1)=unsupported
2057 fi
2058 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2059
2060 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2061 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2062 # Fast installation is not supported
2063 enable_fast_install=no
2064 elif test "$shlibpath_overrides_runpath" = yes ||
2065 test "$enable_shared" = no; then
2066 # Fast installation is not necessary
2067 enable_fast_install=needless
2068 fi
2069 _LT_TAGDECL([], [hardcode_action], [0],
2070 [How to hardcode a shared library path into an executable])
2071 ])# _LT_LINKER_HARDCODE_LIBPATH
2072
2073
2074 # _LT_CMD_STRIPLIB
2075 # ----------------
2076 m4_defun([_LT_CMD_STRIPLIB],
2077 [m4_require([_LT_DECL_EGREP])
2078 striplib=
2079 old_striplib=
2080 AC_MSG_CHECKING([whether stripping libraries is possible])
2081 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2082 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2083 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2084 AC_MSG_RESULT([yes])
2085 else
2086 # FIXME - insert some real tests, host_os isn't really good enough
2087 case $host_os in
2088 darwin*)
2089 if test -n "$STRIP" ; then
2090 striplib="$STRIP -x"
2091 old_striplib="$STRIP -S"
2092 AC_MSG_RESULT([yes])
2093 else
2094 AC_MSG_RESULT([no])
2095 fi
2096 ;;
2097 *)
2098 AC_MSG_RESULT([no])
2099 ;;
2100 esac
2101 fi
2102 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2103 _LT_DECL([], [striplib], [1])
2104 ])# _LT_CMD_STRIPLIB
2105
2106
2107 # _LT_SYS_DYNAMIC_LINKER([TAG])
2108 # -----------------------------
2109 # PORTME Fill in your ld.so characteristics
2110 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2111 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2112 m4_require([_LT_DECL_EGREP])dnl
2113 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2114 m4_require([_LT_DECL_OBJDUMP])dnl
2115 m4_require([_LT_DECL_SED])dnl
2116 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2117 AC_MSG_CHECKING([dynamic linker characteristics])
2118 m4_if([$1],
2119 [], [
2120 if test "$GCC" = yes; then
2121 case $host_os in
2122 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2123 *) lt_awk_arg="/^libraries:/" ;;
2124 esac
2125 case $host_os in
2126 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2127 *) lt_sed_strip_eq="s,=/,/,g" ;;
2128 esac
2129 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2130 case $lt_search_path_spec in
2131 *\;*)
2132 # if the path contains ";" then we assume it to be the separator
2133 # otherwise default to the standard path separator (i.e. ":") - it is
2134 # assumed that no part of a normal pathname contains ";" but that should
2135 # okay in the real world where ";" in dirpaths is itself problematic.
2136 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2137 ;;
2138 *)
2139 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2140 ;;
2141 esac
2142 # Ok, now we have the path, separated by spaces, we can step through it
2143 # and add multilib dir if necessary.
2144 lt_tmp_lt_search_path_spec=
2145 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2146 for lt_sys_path in $lt_search_path_spec; do
2147 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2148 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2149 else
2150 test -d "$lt_sys_path" && \
2151 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2152 fi
2153 done
2154 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2155 BEGIN {RS=" "; FS="/|\n";} {
2156 lt_foo="";
2157 lt_count=0;
2158 for (lt_i = NF; lt_i > 0; lt_i--) {
2159 if ($lt_i != "" && $lt_i != ".") {
2160 if ($lt_i == "..") {
2161 lt_count++;
2162 } else {
2163 if (lt_count == 0) {
2164 lt_foo="/" $lt_i lt_foo;
2165 } else {
2166 lt_count--;
2167 }
2168 }
2169 }
2170 }
2171 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2172 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2173 }'`
2174 # AWK program above erroneously prepends '/' to C:/dos/paths
2175 # for these hosts.
2176 case $host_os in
2177 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2178 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2179 esac
2180 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2181 else
2182 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2183 fi])
2184 library_names_spec=
2185 libname_spec='lib$name'
2186 soname_spec=
2187 shrext_cmds=".so"
2188 postinstall_cmds=
2189 postuninstall_cmds=
2190 finish_cmds=
2191 finish_eval=
2192 shlibpath_var=
2193 shlibpath_overrides_runpath=unknown
2194 version_type=none
2195 dynamic_linker="$host_os ld.so"
2196 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2197 need_lib_prefix=unknown
2198 hardcode_into_libs=no
2199
2200 # when you set need_version to no, make sure it does not cause -set_version
2201 # flags to be left without arguments
2202 need_version=unknown
2203
2204 case $host_os in
2205 aix3*)
2206 version_type=linux
2207 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2208 shlibpath_var=LIBPATH
2209
2210 # AIX 3 has no versioning support, so we append a major version to the name.
2211 soname_spec='${libname}${release}${shared_ext}$major'
2212 ;;
2213
2214 aix[[4-9]]*)
2215 version_type=linux
2216 need_lib_prefix=no
2217 need_version=no
2218 hardcode_into_libs=yes
2219 if test "$host_cpu" = ia64; then
2220 # AIX 5 supports IA64
2221 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2222 shlibpath_var=LD_LIBRARY_PATH
2223 else
2224 # With GCC up to 2.95.x, collect2 would create an import file
2225 # for dependence libraries. The import file would start with
2226 # the line `#! .'. This would cause the generated library to
2227 # depend on `.', always an invalid library. This was fixed in
2228 # development snapshots of GCC prior to 3.0.
2229 case $host_os in
2230 aix4 | aix4.[[01]] | aix4.[[01]].*)
2231 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2232 echo ' yes '
2233 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2234 :
2235 else
2236 can_build_shared=no
2237 fi
2238 ;;
2239 esac
2240 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2241 # soname into executable. Probably we can add versioning support to
2242 # collect2, so additional links can be useful in future.
2243 if test "$aix_use_runtimelinking" = yes; then
2244 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2245 # instead of lib<name>.a to let people know that these are not
2246 # typical AIX shared libraries.
2247 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2248 else
2249 # We preserve .a as extension for shared libraries through AIX4.2
2250 # and later when we are not doing run time linking.
2251 library_names_spec='${libname}${release}.a $libname.a'
2252 soname_spec='${libname}${release}${shared_ext}$major'
2253 fi
2254 shlibpath_var=LIBPATH
2255 fi
2256 ;;
2257
2258 amigaos*)
2259 case $host_cpu in
2260 powerpc)
2261 # Since July 2007 AmigaOS4 officially supports .so libraries.
2262 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2263 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2264 ;;
2265 m68k)
2266 library_names_spec='$libname.ixlibrary $libname.a'
2267 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2268 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'
2269 ;;
2270 esac
2271 ;;
2272
2273 beos*)
2274 library_names_spec='${libname}${shared_ext}'
2275 dynamic_linker="$host_os ld.so"
2276 shlibpath_var=LIBRARY_PATH
2277 ;;
2278
2279 bsdi[[45]]*)
2280 version_type=linux
2281 need_version=no
2282 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2283 soname_spec='${libname}${release}${shared_ext}$major'
2284 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2285 shlibpath_var=LD_LIBRARY_PATH
2286 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2287 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2288 # the default ld.so.conf also contains /usr/contrib/lib and
2289 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2290 # libtool to hard-code these into programs
2291 ;;
2292
2293 cygwin* | mingw* | pw32* | cegcc*)
2294 version_type=windows
2295 shrext_cmds=".dll"
2296 need_version=no
2297 need_lib_prefix=no
2298
2299 case $GCC,$host_os in
2300 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2301 library_names_spec='$libname.dll.a'
2302 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2303 postinstall_cmds='base_file=`basename \${file}`~
2304 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2305 dldir=$destdir/`dirname \$dlpath`~
2306 test -d \$dldir || mkdir -p \$dldir~
2307 $install_prog $dir/$dlname \$dldir/$dlname~
2308 chmod a+x \$dldir/$dlname~
2309 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then