Annotation of sql/sqlite/aclocal.m4, revision 1.6
1.1 misha 1: # generated automatically by aclocal 1.9 -*- Autoconf -*-
2:
3: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4: # 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:
1.5 moko 14: # Portability macros for glibc argz. -*- Autoconf -*-
15: #
16: # Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
17: # Written by Gary V. Vaughan <gary@gnu.org>
18: #
19: # This file is free software; the Free Software Foundation gives
20: # unlimited permission to copy and/or distribute it, with or without
21: # modifications, as long as this notice is preserved.
22:
23: # serial 5 argz.m4
24:
25: AC_DEFUN([gl_FUNC_ARGZ],
26: [gl_PREREQ_ARGZ
27:
28: AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
29:
30: AC_CHECK_TYPES([error_t],
31: [],
32: [AC_DEFINE([error_t], [int],
33: [Define to a type to use for `error_t' if it is not otherwise available.])
34: AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
35: does not typedef error_t.])],
36: [#if defined(HAVE_ARGZ_H)
37: # include <argz.h>
38: #endif])
39:
40: ARGZ_H=
41: AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \
42: argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
43:
44: dnl if have system argz functions, allow forced use of
45: dnl libltdl-supplied implementation (and default to do so
46: dnl on "known bad" systems). Could use a runtime check, but
47: dnl (a) detecting malloc issues is notoriously unreliable
48: dnl (b) only known system that declares argz functions,
49: dnl provides them, yet they are broken, is cygwin
50: dnl releases prior to 16-Mar-2007 (1.5.24 and earlier)
51: dnl So, it's more straightforward simply to special case
52: dnl this for known bad systems.
53: AS_IF([test -z "$ARGZ_H"],
54: [AC_CACHE_CHECK(
55: [if argz actually works],
56: [lt_cv_sys_argz_works],
57: [[case $host_os in #(
58: *cygwin*)
59: lt_cv_sys_argz_works=no
60: if test "$cross_compiling" != no; then
61: lt_cv_sys_argz_works="guessing no"
62: else
63: lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
64: save_IFS=$IFS
65: IFS=-.
66: set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
67: IFS=$save_IFS
68: lt_os_major=${2-0}
69: lt_os_minor=${3-0}
70: lt_os_micro=${4-0}
71: if test "$lt_os_major" -gt 1 \
72: || { test "$lt_os_major" -eq 1 \
73: && { test "$lt_os_minor" -gt 5 \
74: || { test "$lt_os_minor" -eq 5 \
75: && test "$lt_os_micro" -gt 24; }; }; }; then
76: lt_cv_sys_argz_works=yes
77: fi
78: fi
79: ;; #(
80: *) lt_cv_sys_argz_works=yes ;;
81: esac]])
82: AS_IF([test "$lt_cv_sys_argz_works" = yes],
83: [AC_DEFINE([HAVE_WORKING_ARGZ], 1,
84: [This value is set to 1 to indicate that the system argz facility works])],
85: [ARGZ_H=argz.h
86: AC_LIBOBJ([argz])])])
87:
88: AC_SUBST([ARGZ_H])
89: ])
90:
91: # Prerequisites of lib/argz.c.
92: AC_DEFUN([gl_PREREQ_ARGZ], [:])
93:
94: # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
95: #
96: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
97: # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
98: # Foundation, Inc.
99: # Written by Gordon Matzigkeit, 1996
100: #
101: # This file is free software; the Free Software Foundation gives
102: # unlimited permission to copy and/or distribute it, with or without
103: # modifications, as long as this notice is preserved.
104:
105: m4_define([_LT_COPYING], [dnl
106: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
107: # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
108: # Foundation, Inc.
109: # Written by Gordon Matzigkeit, 1996
110: #
111: # This file is part of GNU Libtool.
112: #
113: # GNU Libtool is free software; you can redistribute it and/or
114: # modify it under the terms of the GNU General Public License as
115: # published by the Free Software Foundation; either version 2 of
116: # the License, or (at your option) any later version.
117: #
118: # As a special exception to the GNU General Public License,
119: # if you distribute this file as part of a program or library that
120: # is built using GNU Libtool, you may include this file under the
121: # same distribution terms that you use for the rest of that program.
122: #
123: # GNU Libtool is distributed in the hope that it will be useful,
124: # but WITHOUT ANY WARRANTY; without even the implied warranty of
125: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
126: # GNU General Public License for more details.
127: #
128: # You should have received a copy of the GNU General Public License
129: # along with GNU Libtool; see the file COPYING. If not, a copy
130: # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
131: # obtained by writing to the Free Software Foundation, Inc.,
132: # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
133: ])
134:
135: # serial 57 LT_INIT
136:
137:
138: # LT_PREREQ(VERSION)
139: # ------------------
140: # Complain and exit if this libtool version is less that VERSION.
141: m4_defun([LT_PREREQ],
142: [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
143: [m4_default([$3],
144: [m4_fatal([Libtool version $1 or higher is required],
145: 63)])],
146: [$2])])
147:
148:
149: # _LT_CHECK_BUILDDIR
150: # ------------------
151: # Complain if the absolute build directory name contains unusual characters
152: m4_defun([_LT_CHECK_BUILDDIR],
153: [case `pwd` in
154: *\ * | *\ *)
155: AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
156: esac
157: ])
158:
159:
160: # LT_INIT([OPTIONS])
161: # ------------------
162: AC_DEFUN([LT_INIT],
163: [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
164: AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
165: AC_BEFORE([$0], [LT_LANG])dnl
166: AC_BEFORE([$0], [LT_OUTPUT])dnl
167: AC_BEFORE([$0], [LTDL_INIT])dnl
168: m4_require([_LT_CHECK_BUILDDIR])dnl
169:
170: dnl Autoconf doesn't catch unexpanded LT_ macros by default:
171: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
172: m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
173: dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
174: dnl unless we require an AC_DEFUNed macro:
175: AC_REQUIRE([LTOPTIONS_VERSION])dnl
176: AC_REQUIRE([LTSUGAR_VERSION])dnl
177: AC_REQUIRE([LTVERSION_VERSION])dnl
178: AC_REQUIRE([LTOBSOLETE_VERSION])dnl
179: m4_require([_LT_PROG_LTMAIN])dnl
180:
181: _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
182:
183: dnl Parse OPTIONS
184: _LT_SET_OPTIONS([$0], [$1])
185:
186: # This can be used to rebuild libtool when needed
187: LIBTOOL_DEPS="$ltmain"
188:
189: # Always use our own libtool.
190: LIBTOOL='$(SHELL) $(top_builddir)/libtool'
191: AC_SUBST(LIBTOOL)dnl
192:
193: _LT_SETUP
194:
195: # Only expand once:
196: m4_define([LT_INIT])
197: ])# LT_INIT
198:
199: # Old names:
200: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
201: AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
202: dnl aclocal-1.4 backwards compatibility:
203: dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
204: dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
205:
206:
207: # _LT_CC_BASENAME(CC)
208: # -------------------
209: # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
210: m4_defun([_LT_CC_BASENAME],
211: [for cc_temp in $1""; do
212: case $cc_temp in
213: compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
214: distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
215: \-*) ;;
216: *) break;;
217: esac
218: done
219: cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
220: ])
221:
222:
223: # _LT_FILEUTILS_DEFAULTS
224: # ----------------------
225: # It is okay to use these file commands and assume they have been set
226: # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
227: m4_defun([_LT_FILEUTILS_DEFAULTS],
228: [: ${CP="cp -f"}
229: : ${MV="mv -f"}
230: : ${RM="rm -f"}
231: ])# _LT_FILEUTILS_DEFAULTS
232:
233:
234: # _LT_SETUP
235: # ---------
236: m4_defun([_LT_SETUP],
237: [AC_REQUIRE([AC_CANONICAL_HOST])dnl
238: AC_REQUIRE([AC_CANONICAL_BUILD])dnl
239: AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
240: AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
241:
242: _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
243: dnl
244: _LT_DECL([], [host_alias], [0], [The host system])dnl
245: _LT_DECL([], [host], [0])dnl
246: _LT_DECL([], [host_os], [0])dnl
247: dnl
248: _LT_DECL([], [build_alias], [0], [The build system])dnl
249: _LT_DECL([], [build], [0])dnl
250: _LT_DECL([], [build_os], [0])dnl
251: dnl
252: AC_REQUIRE([AC_PROG_CC])dnl
253: AC_REQUIRE([LT_PATH_LD])dnl
254: AC_REQUIRE([LT_PATH_NM])dnl
255: dnl
256: AC_REQUIRE([AC_PROG_LN_S])dnl
257: test -z "$LN_S" && LN_S="ln -s"
258: _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
259: dnl
260: AC_REQUIRE([LT_CMD_MAX_LEN])dnl
261: _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
262: _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
263: dnl
264: m4_require([_LT_FILEUTILS_DEFAULTS])dnl
265: m4_require([_LT_CHECK_SHELL_FEATURES])dnl
266: m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
267: m4_require([_LT_CMD_RELOAD])dnl
268: m4_require([_LT_CHECK_MAGIC_METHOD])dnl
269: m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
270: m4_require([_LT_CMD_OLD_ARCHIVE])dnl
271: m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
272: m4_require([_LT_WITH_SYSROOT])dnl
273:
274: _LT_CONFIG_LIBTOOL_INIT([
275: # See if we are running on zsh, and set the options which allow our
276: # commands through without removal of \ escapes INIT.
277: if test -n "\${ZSH_VERSION+set}" ; then
278: setopt NO_GLOB_SUBST
279: fi
280: ])
281: if test -n "${ZSH_VERSION+set}" ; then
282: setopt NO_GLOB_SUBST
283: fi
284:
285: _LT_CHECK_OBJDIR
286:
287: m4_require([_LT_TAG_COMPILER])dnl
288:
289: case $host_os in
290: aix3*)
291: # AIX sometimes has problems with the GCC collect2 program. For some
292: # reason, if we set the COLLECT_NAMES environment variable, the problems
293: # vanish in a puff of smoke.
294: if test "X${COLLECT_NAMES+set}" != Xset; then
295: COLLECT_NAMES=
296: export COLLECT_NAMES
297: fi
298: ;;
299: esac
300:
301: # Global variables:
302: ofile=libtool
303: can_build_shared=yes
304:
305: # All known linkers require a `.a' archive for static linking (except MSVC,
306: # which needs '.lib').
307: libext=a
308:
309: with_gnu_ld="$lt_cv_prog_gnu_ld"
310:
311: old_CC="$CC"
312: old_CFLAGS="$CFLAGS"
313:
314: # Set sane defaults for various variables
315: test -z "$CC" && CC=cc
316: test -z "$LTCC" && LTCC=$CC
317: test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
318: test -z "$LD" && LD=ld
319: test -z "$ac_objext" && ac_objext=o
320:
321: _LT_CC_BASENAME([$compiler])
322:
323: # Only perform the check for file, if the check method requires it
324: test -z "$MAGIC_CMD" && MAGIC_CMD=file
325: case $deplibs_check_method in
326: file_magic*)
327: if test "$file_magic_cmd" = '$MAGIC_CMD'; then
328: _LT_PATH_MAGIC
329: fi
330: ;;
331: esac
332:
333: # Use C for the default configuration in the libtool script
334: LT_SUPPORTED_TAG([CC])
335: _LT_LANG_C_CONFIG
336: _LT_LANG_DEFAULT_CONFIG
337: _LT_CONFIG_COMMANDS
338: ])# _LT_SETUP
339:
340:
341: # _LT_PREPARE_SED_QUOTE_VARS
342: # --------------------------
343: # Define a few sed substitution that help us do robust quoting.
344: m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
345: [# Backslashify metacharacters that are still active within
346: # double-quoted strings.
347: sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
348:
349: # Same as above, but do not quote variable references.
350: double_quote_subst='s/\([["`\\]]\)/\\\1/g'
351:
352: # Sed substitution to delay expansion of an escaped shell variable in a
353: # double_quote_subst'ed string.
354: delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
355:
356: # Sed substitution to delay expansion of an escaped single quote.
357: delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
358:
359: # Sed substitution to avoid accidental globbing in evaled expressions
360: no_glob_subst='s/\*/\\\*/g'
361: ])
362:
363: # _LT_PROG_LTMAIN
364: # ---------------
365: # Note that this code is called both from `configure', and `config.status'
366: # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
367: # `config.status' has no value for ac_aux_dir unless we are using Automake,
368: # so we pass a copy along to make sure it has a sensible value anyway.
369: m4_defun([_LT_PROG_LTMAIN],
370: [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
371: _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
372: ltmain="$ac_aux_dir/ltmain.sh"
373: ])# _LT_PROG_LTMAIN
374:
375:
376:
377: # So that we can recreate a full libtool script including additional
378: # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
379: # in macros and then make a single call at the end using the `libtool'
380: # label.
381:
382:
383: # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
384: # ----------------------------------------
385: # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
386: m4_define([_LT_CONFIG_LIBTOOL_INIT],
387: [m4_ifval([$1],
388: [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
389: [$1
390: ])])])
391:
392: # Initialize.
393: m4_define([_LT_OUTPUT_LIBTOOL_INIT])
394:
395:
396: # _LT_CONFIG_LIBTOOL([COMMANDS])
397: # ------------------------------
398: # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
399: m4_define([_LT_CONFIG_LIBTOOL],
400: [m4_ifval([$1],
401: [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
402: [$1
403: ])])])
404:
405: # Initialize.
406: m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
407:
408:
409: # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
410: # -----------------------------------------------------
411: m4_defun([_LT_CONFIG_SAVE_COMMANDS],
412: [_LT_CONFIG_LIBTOOL([$1])
413: _LT_CONFIG_LIBTOOL_INIT([$2])
414: ])
415:
416:
417: # _LT_FORMAT_COMMENT([COMMENT])
418: # -----------------------------
419: # Add leading comment marks to the start of each line, and a trailing
420: # full-stop to the whole comment if one is not present already.
421: m4_define([_LT_FORMAT_COMMENT],
422: [m4_ifval([$1], [
423: m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
424: [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
425: )])
426:
427:
428:
429:
430:
431: # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
432: # -------------------------------------------------------------------
433: # CONFIGNAME is the name given to the value in the libtool script.
434: # VARNAME is the (base) name used in the configure script.
435: # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
436: # VARNAME. Any other value will be used directly.
437: m4_define([_LT_DECL],
438: [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
439: [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
440: [m4_ifval([$1], [$1], [$2])])
441: lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
442: m4_ifval([$4],
443: [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
444: lt_dict_add_subkey([lt_decl_dict], [$2],
445: [tagged?], [m4_ifval([$5], [yes], [no])])])
446: ])
447:
448:
449: # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
450: # --------------------------------------------------------
451: m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
452:
453:
454: # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
455: # ------------------------------------------------
456: m4_define([lt_decl_tag_varnames],
457: [_lt_decl_filter([tagged?], [yes], $@)])
458:
459:
460: # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
461: # ---------------------------------------------------------
462: m4_define([_lt_decl_filter],
463: [m4_case([$#],
464: [0], [m4_fatal([$0: too few arguments: $#])],
465: [1], [m4_fatal([$0: too few arguments: $#: $1])],
466: [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
467: [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
468: [lt_dict_filter([lt_decl_dict], $@)])[]dnl
469: ])
470:
471:
472: # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
473: # --------------------------------------------------
474: m4_define([lt_decl_quote_varnames],
475: [_lt_decl_filter([value], [1], $@)])
476:
477:
478: # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
479: # ---------------------------------------------------
480: m4_define([lt_decl_dquote_varnames],
481: [_lt_decl_filter([value], [2], $@)])
482:
483:
484: # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
485: # ---------------------------------------------------
486: m4_define([lt_decl_varnames_tagged],
487: [m4_assert([$# <= 2])dnl
488: _$0(m4_quote(m4_default([$1], [[, ]])),
489: m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
490: m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
491: m4_define([_lt_decl_varnames_tagged],
492: [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
493:
494:
495: # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
496: # ------------------------------------------------
497: m4_define([lt_decl_all_varnames],
498: [_$0(m4_quote(m4_default([$1], [[, ]])),
499: m4_if([$2], [],
500: m4_quote(lt_decl_varnames),
501: m4_quote(m4_shift($@))))[]dnl
502: ])
503: m4_define([_lt_decl_all_varnames],
504: [lt_join($@, lt_decl_varnames_tagged([$1],
505: lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
506: ])
507:
508:
509: # _LT_CONFIG_STATUS_DECLARE([VARNAME])
510: # ------------------------------------
511: # Quote a variable value, and forward it to `config.status' so that its
512: # declaration there will have the same value as in `configure'. VARNAME
513: # must have a single quote delimited value for this to work.
514: m4_define([_LT_CONFIG_STATUS_DECLARE],
515: [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
516:
517:
518: # _LT_CONFIG_STATUS_DECLARATIONS
519: # ------------------------------
520: # We delimit libtool config variables with single quotes, so when
521: # we write them to config.status, we have to be sure to quote all
522: # embedded single quotes properly. In configure, this macro expands
523: # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
524: #
525: # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
526: m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
527: [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
528: [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
529:
530:
531: # _LT_LIBTOOL_TAGS
532: # ----------------
533: # Output comment and list of tags supported by the script
534: m4_defun([_LT_LIBTOOL_TAGS],
535: [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
536: available_tags="_LT_TAGS"dnl
537: ])
538:
539:
540: # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
541: # -----------------------------------
542: # Extract the dictionary values for VARNAME (optionally with TAG) and
543: # expand to a commented shell variable setting:
544: #
545: # # Some comment about what VAR is for.
546: # visible_name=$lt_internal_name
547: m4_define([_LT_LIBTOOL_DECLARE],
548: [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
549: [description])))[]dnl
550: m4_pushdef([_libtool_name],
551: m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
552: m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
553: [0], [_libtool_name=[$]$1],
554: [1], [_libtool_name=$lt_[]$1],
555: [2], [_libtool_name=$lt_[]$1],
556: [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
557: m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
558: ])
559:
560:
561: # _LT_LIBTOOL_CONFIG_VARS
562: # -----------------------
563: # Produce commented declarations of non-tagged libtool config variables
564: # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
565: # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
566: # section) are produced by _LT_LIBTOOL_TAG_VARS.
567: m4_defun([_LT_LIBTOOL_CONFIG_VARS],
568: [m4_foreach([_lt_var],
569: m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
570: [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
571:
572:
573: # _LT_LIBTOOL_TAG_VARS(TAG)
574: # -------------------------
575: m4_define([_LT_LIBTOOL_TAG_VARS],
576: [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
577: [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
578:
579:
580: # _LT_TAGVAR(VARNAME, [TAGNAME])
581: # ------------------------------
582: m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
583:
584:
585: # _LT_CONFIG_COMMANDS
586: # -------------------
587: # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
588: # variables for single and double quote escaping we saved from calls
589: # to _LT_DECL, we can put quote escaped variables declarations
590: # into `config.status', and then the shell code to quote escape them in
591: # for loops in `config.status'. Finally, any additional code accumulated
592: # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
593: m4_defun([_LT_CONFIG_COMMANDS],
594: [AC_PROVIDE_IFELSE([LT_OUTPUT],
595: dnl If the libtool generation code has been placed in $CONFIG_LT,
596: dnl instead of duplicating it all over again into config.status,
597: dnl then we will have config.status run $CONFIG_LT later, so it
598: dnl needs to know what name is stored there:
599: [AC_CONFIG_COMMANDS([libtool],
600: [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
601: dnl If the libtool generation code is destined for config.status,
602: dnl expand the accumulated commands and init code now:
603: [AC_CONFIG_COMMANDS([libtool],
604: [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
605: ])#_LT_CONFIG_COMMANDS
606:
607:
608: # Initialize.
609: m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
610: [
611:
612: # The HP-UX ksh and POSIX shell print the target directory to stdout
613: # if CDPATH is set.
614: (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
615:
616: sed_quote_subst='$sed_quote_subst'
617: double_quote_subst='$double_quote_subst'
618: delay_variable_subst='$delay_variable_subst'
619: _LT_CONFIG_STATUS_DECLARATIONS
620: LTCC='$LTCC'
621: LTCFLAGS='$LTCFLAGS'
622: compiler='$compiler_DEFAULT'
623:
624: # A function that is used when there is no print builtin or printf.
625: func_fallback_echo ()
626: {
627: eval 'cat <<_LTECHO_EOF
628: \$[]1
629: _LTECHO_EOF'
630: }
631:
632: # Quote evaled strings.
633: for var in lt_decl_all_varnames([[ \
634: ]], lt_decl_quote_varnames); do
635: case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
636: *[[\\\\\\\`\\"\\\$]]*)
637: eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
638: ;;
639: *)
640: eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
641: ;;
642: esac
643: done
644:
645: # Double-quote double-evaled strings.
646: for var in lt_decl_all_varnames([[ \
647: ]], lt_decl_dquote_varnames); do
648: case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
649: *[[\\\\\\\`\\"\\\$]]*)
650: eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
651: ;;
652: *)
653: eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
654: ;;
655: esac
656: done
657:
658: _LT_OUTPUT_LIBTOOL_INIT
659: ])
660:
661: # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
662: # ------------------------------------
663: # Generate a child script FILE with all initialization necessary to
664: # reuse the environment learned by the parent script, and make the
665: # file executable. If COMMENT is supplied, it is inserted after the
666: # `#!' sequence but before initialization text begins. After this
667: # macro, additional text can be appended to FILE to form the body of
668: # the child script. The macro ends with non-zero status if the
669: # file could not be fully written (such as if the disk is full).
670: m4_ifdef([AS_INIT_GENERATED],
671: [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
672: [m4_defun([_LT_GENERATED_FILE_INIT],
673: [m4_require([AS_PREPARE])]dnl
674: [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
675: [lt_write_fail=0
676: cat >$1 <<_ASEOF || lt_write_fail=1
677: #! $SHELL
678: # Generated by $as_me.
679: $2
680: SHELL=\${CONFIG_SHELL-$SHELL}
681: export SHELL
682: _ASEOF
683: cat >>$1 <<\_ASEOF || lt_write_fail=1
684: AS_SHELL_SANITIZE
685: _AS_PREPARE
686: exec AS_MESSAGE_FD>&1
687: _ASEOF
688: test $lt_write_fail = 0 && chmod +x $1[]dnl
689: m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
690:
691: # LT_OUTPUT
692: # ---------
693: # This macro allows early generation of the libtool script (before
694: # AC_OUTPUT is called), incase it is used in configure for compilation
695: # tests.
696: AC_DEFUN([LT_OUTPUT],
697: [: ${CONFIG_LT=./config.lt}
698: AC_MSG_NOTICE([creating $CONFIG_LT])
699: _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
700: [# Run this file to recreate a libtool stub with the current configuration.])
701:
702: cat >>"$CONFIG_LT" <<\_LTEOF
703: lt_cl_silent=false
704: exec AS_MESSAGE_LOG_FD>>config.log
705: {
706: echo
707: AS_BOX([Running $as_me.])
708: } >&AS_MESSAGE_LOG_FD
709:
710: lt_cl_help="\
711: \`$as_me' creates a local libtool stub from the current configuration,
712: for use in further configure time tests before the real libtool is
713: generated.
714:
715: Usage: $[0] [[OPTIONS]]
716:
717: -h, --help print this help, then exit
718: -V, --version print version number, then exit
719: -q, --quiet do not print progress messages
720: -d, --debug don't remove temporary files
721:
722: Report bugs to <bug-libtool@gnu.org>."
723:
724: lt_cl_version="\
725: m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
726: m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
727: configured by $[0], generated by m4_PACKAGE_STRING.
728:
729: Copyright (C) 2011 Free Software Foundation, Inc.
730: This config.lt script is free software; the Free Software Foundation
731: gives unlimited permision to copy, distribute and modify it."
732:
733: while test $[#] != 0
734: do
735: case $[1] in
736: --version | --v* | -V )
737: echo "$lt_cl_version"; exit 0 ;;
738: --help | --h* | -h )
739: echo "$lt_cl_help"; exit 0 ;;
740: --debug | --d* | -d )
741: debug=: ;;
742: --quiet | --q* | --silent | --s* | -q )
743: lt_cl_silent=: ;;
744:
745: -*) AC_MSG_ERROR([unrecognized option: $[1]
746: Try \`$[0] --help' for more information.]) ;;
747:
748: *) AC_MSG_ERROR([unrecognized argument: $[1]
749: Try \`$[0] --help' for more information.]) ;;
750: esac
751: shift
752: done
753:
754: if $lt_cl_silent; then
755: exec AS_MESSAGE_FD>/dev/null
756: fi
757: _LTEOF
758:
759: cat >>"$CONFIG_LT" <<_LTEOF
760: _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
761: _LTEOF
762:
763: cat >>"$CONFIG_LT" <<\_LTEOF
764: AC_MSG_NOTICE([creating $ofile])
765: _LT_OUTPUT_LIBTOOL_COMMANDS
766: AS_EXIT(0)
767: _LTEOF
768: chmod +x "$CONFIG_LT"
769:
770: # configure is writing to config.log, but config.lt does its own redirection,
771: # appending to config.log, which fails on DOS, as config.log is still kept
772: # open by configure. Here we exec the FD to /dev/null, effectively closing
773: # config.log, so it can be properly (re)opened and appended to by config.lt.
774: lt_cl_success=:
775: test "$silent" = yes &&
776: lt_config_lt_args="$lt_config_lt_args --quiet"
777: exec AS_MESSAGE_LOG_FD>/dev/null
778: $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
779: exec AS_MESSAGE_LOG_FD>>config.log
780: $lt_cl_success || AS_EXIT(1)
781: ])# LT_OUTPUT
782:
783:
784: # _LT_CONFIG(TAG)
785: # ---------------
786: # If TAG is the built-in tag, create an initial libtool script with a
787: # default configuration from the untagged config vars. Otherwise add code
788: # to config.status for appending the configuration named by TAG from the
789: # matching tagged config vars.
790: m4_defun([_LT_CONFIG],
791: [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
792: _LT_CONFIG_SAVE_COMMANDS([
793: m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
794: m4_if(_LT_TAG, [C], [
795: # See if we are running on zsh, and set the options which allow our
796: # commands through without removal of \ escapes.
797: if test -n "${ZSH_VERSION+set}" ; then
798: setopt NO_GLOB_SUBST
799: fi
800:
801: cfgfile="${ofile}T"
802: trap "$RM \"$cfgfile\"; exit 1" 1 2 15
803: $RM "$cfgfile"
804:
805: cat <<_LT_EOF >> "$cfgfile"
806: #! $SHELL
807:
808: # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
809: # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
810: # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
811: # NOTE: Changes made to this file will be lost: look at ltmain.sh.
812: #
813: _LT_COPYING
814: _LT_LIBTOOL_TAGS
815:
816: # ### BEGIN LIBTOOL CONFIG
817: _LT_LIBTOOL_CONFIG_VARS
818: _LT_LIBTOOL_TAG_VARS
819: # ### END LIBTOOL CONFIG
820:
821: _LT_EOF
822:
823: case $host_os in
824: aix3*)
825: cat <<\_LT_EOF >> "$cfgfile"
826: # AIX sometimes has problems with the GCC collect2 program. For some
827: # reason, if we set the COLLECT_NAMES environment variable, the problems
828: # vanish in a puff of smoke.
829: if test "X${COLLECT_NAMES+set}" != Xset; then
830: COLLECT_NAMES=
831: export COLLECT_NAMES
832: fi
833: _LT_EOF
834: ;;
835: esac
836:
837: _LT_PROG_LTMAIN
838:
839: # We use sed instead of cat because bash on DJGPP gets confused if
840: # if finds mixed CR/LF and LF-only lines. Since sed operates in
841: # text mode, it properly converts lines to CR/LF. This bash problem
842: # is reportedly fixed, but why not run on old versions too?
843: sed '$q' "$ltmain" >> "$cfgfile" \
844: || (rm -f "$cfgfile"; exit 1)
845:
846: _LT_PROG_REPLACE_SHELLFNS
847:
848: mv -f "$cfgfile" "$ofile" ||
849: (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
850: chmod +x "$ofile"
851: ],
852: [cat <<_LT_EOF >> "$ofile"
853:
854: dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
855: dnl in a comment (ie after a #).
856: # ### BEGIN LIBTOOL TAG CONFIG: $1
857: _LT_LIBTOOL_TAG_VARS(_LT_TAG)
858: # ### END LIBTOOL TAG CONFIG: $1
859: _LT_EOF
860: ])dnl /m4_if
861: ],
862: [m4_if([$1], [], [
863: PACKAGE='$PACKAGE'
864: VERSION='$VERSION'
865: TIMESTAMP='$TIMESTAMP'
866: RM='$RM'
867: ofile='$ofile'], [])
868: ])dnl /_LT_CONFIG_SAVE_COMMANDS
869: ])# _LT_CONFIG
870:
871:
872: # LT_SUPPORTED_TAG(TAG)
873: # ---------------------
874: # Trace this macro to discover what tags are supported by the libtool
875: # --tag option, using:
876: # autoconf --trace 'LT_SUPPORTED_TAG:$1'
877: AC_DEFUN([LT_SUPPORTED_TAG], [])
878:
879:
880: # C support is built-in for now
881: m4_define([_LT_LANG_C_enabled], [])
882: m4_define([_LT_TAGS], [])
883:
884:
885: # LT_LANG(LANG)
886: # -------------
887: # Enable libtool support for the given language if not already enabled.
888: AC_DEFUN([LT_LANG],
889: [AC_BEFORE([$0], [LT_OUTPUT])dnl
890: m4_case([$1],
891: [C], [_LT_LANG(C)],
892: [C++], [_LT_LANG(CXX)],
893: [Go], [_LT_LANG(GO)],
894: [Java], [_LT_LANG(GCJ)],
895: [Fortran 77], [_LT_LANG(F77)],
896: [Fortran], [_LT_LANG(FC)],
897: [Windows Resource], [_LT_LANG(RC)],
898: [m4_ifdef([_LT_LANG_]$1[_CONFIG],
899: [_LT_LANG($1)],
900: [m4_fatal([$0: unsupported language: "$1"])])])dnl
901: ])# LT_LANG
902:
903:
904: # _LT_LANG(LANGNAME)
905: # ------------------
906: m4_defun([_LT_LANG],
907: [m4_ifdef([_LT_LANG_]$1[_enabled], [],
908: [LT_SUPPORTED_TAG([$1])dnl
909: m4_append([_LT_TAGS], [$1 ])dnl
910: m4_define([_LT_LANG_]$1[_enabled], [])dnl
911: _LT_LANG_$1_CONFIG($1)])dnl
912: ])# _LT_LANG
913:
914:
915: m4_ifndef([AC_PROG_GO], [
916: # NOTE: This macro has been submitted for inclusion into #
917: # GNU Autoconf as AC_PROG_GO. When it is available in #
918: # a released version of Autoconf we should remove this #
919: # macro and use it instead. #
920: m4_defun([AC_PROG_GO],
921: [AC_LANG_PUSH(Go)dnl
922: AC_ARG_VAR([GOC], [Go compiler command])dnl
923: AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
924: _AC_ARG_VAR_LDFLAGS()dnl
925: AC_CHECK_TOOL(GOC, gccgo)
926: if test -z "$GOC"; then
927: if test -n "$ac_tool_prefix"; then
928: AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
929: fi
930: fi
931: if test -z "$GOC"; then
932: AC_CHECK_PROG(GOC, gccgo, gccgo, false)
933: fi
934: ])#m4_defun
935: ])#m4_ifndef
936:
937:
938: # _LT_LANG_DEFAULT_CONFIG
939: # -----------------------
940: m4_defun([_LT_LANG_DEFAULT_CONFIG],
941: [AC_PROVIDE_IFELSE([AC_PROG_CXX],
942: [LT_LANG(CXX)],
943: [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
944:
945: AC_PROVIDE_IFELSE([AC_PROG_F77],
946: [LT_LANG(F77)],
947: [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
948:
949: AC_PROVIDE_IFELSE([AC_PROG_FC],
950: [LT_LANG(FC)],
951: [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
952:
953: dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
954: dnl pulling things in needlessly.
955: AC_PROVIDE_IFELSE([AC_PROG_GCJ],
956: [LT_LANG(GCJ)],
957: [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
958: [LT_LANG(GCJ)],
959: [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
960: [LT_LANG(GCJ)],
961: [m4_ifdef([AC_PROG_GCJ],
962: [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
963: m4_ifdef([A][M_PROG_GCJ],
964: [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
965: m4_ifdef([LT_PROG_GCJ],
966: [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
967:
968: AC_PROVIDE_IFELSE([AC_PROG_GO],
969: [LT_LANG(GO)],
970: [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
971:
972: AC_PROVIDE_IFELSE([LT_PROG_RC],
973: [LT_LANG(RC)],
974: [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
975: ])# _LT_LANG_DEFAULT_CONFIG
976:
977: # Obsolete macros:
978: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
979: AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
980: AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
981: AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
982: AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
983: dnl aclocal-1.4 backwards compatibility:
984: dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
985: dnl AC_DEFUN([AC_LIBTOOL_F77], [])
986: dnl AC_DEFUN([AC_LIBTOOL_FC], [])
987: dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
988: dnl AC_DEFUN([AC_LIBTOOL_RC], [])
989:
990:
991: # _LT_TAG_COMPILER
992: # ----------------
993: m4_defun([_LT_TAG_COMPILER],
994: [AC_REQUIRE([AC_PROG_CC])dnl
995:
996: _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
997: _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
998: _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
999: _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1000:
1001: # If no C compiler was specified, use CC.
1002: LTCC=${LTCC-"$CC"}
1003:
1004: # If no C compiler flags were specified, use CFLAGS.
1005: LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1006:
1007: # Allow CC to be a program name with arguments.
1008: compiler=$CC
1009: ])# _LT_TAG_COMPILER
1010:
1011:
1012: # _LT_COMPILER_BOILERPLATE
1013: # ------------------------
1014: # Check for compiler boilerplate output or warnings with
1015: # the simple compiler test code.
1016: m4_defun([_LT_COMPILER_BOILERPLATE],
1017: [m4_require([_LT_DECL_SED])dnl
1018: ac_outfile=conftest.$ac_objext
1019: echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1020: eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1021: _lt_compiler_boilerplate=`cat conftest.err`
1022: $RM conftest*
1023: ])# _LT_COMPILER_BOILERPLATE
1024:
1025:
1026: # _LT_LINKER_BOILERPLATE
1027: # ----------------------
1028: # Check for linker boilerplate output or warnings with
1029: # the simple link test code.
1030: m4_defun([_LT_LINKER_BOILERPLATE],
1031: [m4_require([_LT_DECL_SED])dnl
1032: ac_outfile=conftest.$ac_objext
1033: echo "$lt_simple_link_test_code" >conftest.$ac_ext
1034: eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1035: _lt_linker_boilerplate=`cat conftest.err`
1036: $RM -r conftest*
1037: ])# _LT_LINKER_BOILERPLATE
1038:
1039: # _LT_REQUIRED_DARWIN_CHECKS
1040: # -------------------------
1041: m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1042: case $host_os in
1043: rhapsody* | darwin*)
1044: AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1045: AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1046: AC_CHECK_TOOL([LIPO], [lipo], [:])
1047: AC_CHECK_TOOL([OTOOL], [otool], [:])
1048: AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1049: _LT_DECL([], [DSYMUTIL], [1],
1050: [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1051: _LT_DECL([], [NMEDIT], [1],
1052: [Tool to change global to local symbols on Mac OS X])
1053: _LT_DECL([], [LIPO], [1],
1054: [Tool to manipulate fat objects and archives on Mac OS X])
1055: _LT_DECL([], [OTOOL], [1],
1056: [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1057: _LT_DECL([], [OTOOL64], [1],
1058: [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1059:
1060: AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1061: [lt_cv_apple_cc_single_mod=no
1062: if test -z "${LT_MULTI_MODULE}"; then
1063: # By default we will add the -single_module flag. You can override
1064: # by either setting the environment variable LT_MULTI_MODULE
1065: # non-empty at configure time, or by adding -multi_module to the
1066: # link flags.
1067: rm -rf libconftest.dylib*
1068: echo "int foo(void){return 1;}" > conftest.c
1069: echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1070: -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1071: $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1072: -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1073: _lt_result=$?
1074: # If there is a non-empty error log, and "single_module"
1075: # appears in it, assume the flag caused a linker warning
1076: if test -s conftest.err && $GREP single_module conftest.err; then
1077: cat conftest.err >&AS_MESSAGE_LOG_FD
1078: # Otherwise, if the output was created with a 0 exit code from
1079: # the compiler, it worked.
1080: elif test -f libconftest.dylib && test $_lt_result -eq 0; then
1081: lt_cv_apple_cc_single_mod=yes
1082: else
1083: cat conftest.err >&AS_MESSAGE_LOG_FD
1084: fi
1085: rm -rf libconftest.dylib*
1086: rm -f conftest.*
1087: fi])
1088:
1089: AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1090: [lt_cv_ld_exported_symbols_list],
1091: [lt_cv_ld_exported_symbols_list=no
1092: save_LDFLAGS=$LDFLAGS
1093: echo "_main" > conftest.sym
1094: LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1095: AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1096: [lt_cv_ld_exported_symbols_list=yes],
1097: [lt_cv_ld_exported_symbols_list=no])
1098: LDFLAGS="$save_LDFLAGS"
1099: ])
1100:
1101: AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1102: [lt_cv_ld_force_load=no
1103: cat > conftest.c << _LT_EOF
1104: int forced_loaded() { return 2;}
1105: _LT_EOF
1106: echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1107: $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1108: echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1109: $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1110: echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1111: $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1112: cat > conftest.c << _LT_EOF
1113: int main() { return 0;}
1114: _LT_EOF
1115: echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1116: $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1117: _lt_result=$?
1118: if test -s conftest.err && $GREP force_load conftest.err; then
1119: cat conftest.err >&AS_MESSAGE_LOG_FD
1120: elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1121: lt_cv_ld_force_load=yes
1122: else
1123: cat conftest.err >&AS_MESSAGE_LOG_FD
1124: fi
1125: rm -f conftest.err libconftest.a conftest conftest.c
1126: rm -rf conftest.dSYM
1127: ])
1128: case $host_os in
1129: rhapsody* | darwin1.[[012]])
1130: _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1131: darwin1.*)
1132: _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1133: darwin*) # darwin 5.x on
1134: # if running on 10.5 or later, the deployment target defaults
1135: # to the OS version, if on x86, and 10.4, the deployment
1136: # target defaults to 10.4. Don't you love it?
1137: case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1138: 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1139: _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1140: 10.[[012]]*)
1141: _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1142: 10.*)
1143: _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1144: esac
1145: ;;
1146: esac
1147: if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1148: _lt_dar_single_mod='$single_module'
1149: fi
1150: if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1151: _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1152: else
1153: _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1154: fi
1155: if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1156: _lt_dsymutil='~$DSYMUTIL $lib || :'
1157: else
1158: _lt_dsymutil=
1159: fi
1160: ;;
1161: esac
1162: ])
1163:
1164:
1165: # _LT_DARWIN_LINKER_FEATURES([TAG])
1166: # ---------------------------------
1167: # Checks for linker and compiler features on darwin
1168: m4_defun([_LT_DARWIN_LINKER_FEATURES],
1169: [
1170: m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1171: _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1172: _LT_TAGVAR(hardcode_direct, $1)=no
1173: _LT_TAGVAR(hardcode_automatic, $1)=yes
1174: _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1175: if test "$lt_cv_ld_force_load" = "yes"; then
1176: _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\"`'
1177: m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1178: [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1179: else
1180: _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1181: fi
1182: _LT_TAGVAR(link_all_deplibs, $1)=yes
1183: _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1184: case $cc_basename in
1185: ifort*) _lt_dar_can_shared=yes ;;
1186: *) _lt_dar_can_shared=$GCC ;;
1187: esac
1188: if test "$_lt_dar_can_shared" = "yes"; then
1189: output_verbose_link_cmd=func_echo_all
1190: _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}"
1191: _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1192: _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}"
1193: _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}"
1194: m4_if([$1], [CXX],
1195: [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1196: _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}"
1197: _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}"
1198: fi
1199: ],[])
1200: else
1201: _LT_TAGVAR(ld_shlibs, $1)=no
1202: fi
1203: ])
1204:
1205: # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1206: # ----------------------------------
1207: # Links a minimal program and checks the executable
1208: # for the system default hardcoded library path. In most cases,
1209: # this is /usr/lib:/lib, but when the MPI compilers are used
1210: # the location of the communication and MPI libs are included too.
1211: # If we don't find anything, use the default library path according
1212: # to the aix ld manual.
1213: # Store the results from the different compilers for each TAGNAME.
1214: # Allow to override them for all tags through lt_cv_aix_libpath.
1215: m4_defun([_LT_SYS_MODULE_PATH_AIX],
1216: [m4_require([_LT_DECL_SED])dnl
1217: if test "${lt_cv_aix_libpath+set}" = set; then
1218: aix_libpath=$lt_cv_aix_libpath
1219: else
1220: AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1221: [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1222: lt_aix_libpath_sed='[
1223: /Import File Strings/,/^$/ {
1224: /^0/ {
1225: s/^0 *\([^ ]*\) *$/\1/
1226: p
1227: }
1228: }]'
1229: _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1230: # Check for a 64-bit object if we didn't find anything.
1231: if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1232: _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1233: fi],[])
1234: if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1235: _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1236: fi
1237: ])
1238: aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1239: fi
1240: ])# _LT_SYS_MODULE_PATH_AIX
1241:
1242:
1243: # _LT_SHELL_INIT(ARG)
1244: # -------------------
1245: m4_define([_LT_SHELL_INIT],
1246: [m4_divert_text([M4SH-INIT], [$1
1247: ])])# _LT_SHELL_INIT
1248:
1249:
1250:
1251: # _LT_PROG_ECHO_BACKSLASH
1252: # -----------------------
1253: # Find how we can fake an echo command that does not interpret backslash.
1254: # In particular, with Autoconf 2.60 or later we add some code to the start
1255: # of the generated configure script which will find a shell with a builtin
1256: # printf (which we can use as an echo command).
1257: m4_defun([_LT_PROG_ECHO_BACKSLASH],
1258: [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1259: ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1260: ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1261:
1262: AC_MSG_CHECKING([how to print strings])
1263: # Test print first, because it will be a builtin if present.
1264: if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1265: test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1266: ECHO='print -r --'
1267: elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1268: ECHO='printf %s\n'
1269: else
1270: # Use this function as a fallback that always works.
1271: func_fallback_echo ()
1272: {
1273: eval 'cat <<_LTECHO_EOF
1274: $[]1
1275: _LTECHO_EOF'
1276: }
1277: ECHO='func_fallback_echo'
1278: fi
1279:
1280: # func_echo_all arg...
1281: # Invoke $ECHO with all args, space-separated.
1282: func_echo_all ()
1283: {
1284: $ECHO "$*"
1285: }
1286:
1287: case "$ECHO" in
1288: printf*) AC_MSG_RESULT([printf]) ;;
1289: print*) AC_MSG_RESULT([print -r]) ;;
1290: *) AC_MSG_RESULT([cat]) ;;
1291: esac
1292:
1293: m4_ifdef([_AS_DETECT_SUGGESTED],
1294: [_AS_DETECT_SUGGESTED([
1295: test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1296: ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1297: ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1298: ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1299: PATH=/empty FPATH=/empty; export PATH FPATH
1300: test "X`printf %s $ECHO`" = "X$ECHO" \
1301: || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1302:
1303: _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1304: _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1305: ])# _LT_PROG_ECHO_BACKSLASH
1306:
1307:
1308: # _LT_WITH_SYSROOT
1309: # ----------------
1310: AC_DEFUN([_LT_WITH_SYSROOT],
1311: [AC_MSG_CHECKING([for sysroot])
1312: AC_ARG_WITH([sysroot],
1313: [ --with-sysroot[=DIR] Search for dependent libraries within DIR
1314: (or the compiler's sysroot if not specified).],
1315: [], [with_sysroot=no])
1316:
1317: dnl lt_sysroot will always be passed unquoted. We quote it here
1318: dnl in case the user passed a directory name.
1319: lt_sysroot=
1320: case ${with_sysroot} in #(
1321: yes)
1322: if test "$GCC" = yes; then
1323: lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1324: fi
1325: ;; #(
1326: /*)
1327: lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1328: ;; #(
1329: no|'')
1330: ;; #(
1331: *)
1332: AC_MSG_RESULT([${with_sysroot}])
1333: AC_MSG_ERROR([The sysroot must be an absolute path.])
1334: ;;
1335: esac
1336:
1337: AC_MSG_RESULT([${lt_sysroot:-no}])
1338: _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1339: [dependent libraries, and in which our libraries should be installed.])])
1340:
1341: # _LT_ENABLE_LOCK
1342: # ---------------
1343: m4_defun([_LT_ENABLE_LOCK],
1344: [AC_ARG_ENABLE([libtool-lock],
1345: [AS_HELP_STRING([--disable-libtool-lock],
1346: [avoid locking (might break parallel builds)])])
1347: test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1348:
1349: # Some flags need to be propagated to the compiler or linker for good
1350: # libtool support.
1351: case $host in
1352: ia64-*-hpux*)
1353: # Find out which ABI we are using.
1354: echo 'int i;' > conftest.$ac_ext
1355: if AC_TRY_EVAL(ac_compile); then
1356: case `/usr/bin/file conftest.$ac_objext` in
1357: *ELF-32*)
1358: HPUX_IA64_MODE="32"
1359: ;;
1360: *ELF-64*)
1361: HPUX_IA64_MODE="64"
1362: ;;
1363: esac
1364: fi
1365: rm -rf conftest*
1366: ;;
1367: *-*-irix6*)
1368: # Find out which ABI we are using.
1369: echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1370: if AC_TRY_EVAL(ac_compile); then
1371: if test "$lt_cv_prog_gnu_ld" = yes; then
1372: case `/usr/bin/file conftest.$ac_objext` in
1373: *32-bit*)
1374: LD="${LD-ld} -melf32bsmip"
1375: ;;
1376: *N32*)
1377: LD="${LD-ld} -melf32bmipn32"
1378: ;;
1379: *64-bit*)
1380: LD="${LD-ld} -melf64bmip"
1381: ;;
1382: esac
1383: else
1384: case `/usr/bin/file conftest.$ac_objext` in
1385: *32-bit*)
1386: LD="${LD-ld} -32"
1387: ;;
1388: *N32*)
1389: LD="${LD-ld} -n32"
1390: ;;
1391: *64-bit*)
1392: LD="${LD-ld} -64"
1393: ;;
1394: esac
1395: fi
1396: fi
1397: rm -rf conftest*
1398: ;;
1399:
1400: x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1401: s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1402: # Find out which ABI we are using.
1403: echo 'int i;' > conftest.$ac_ext
1404: if AC_TRY_EVAL(ac_compile); then
1405: case `/usr/bin/file conftest.o` in
1406: *32-bit*)
1407: case $host in
1408: x86_64-*kfreebsd*-gnu)
1409: LD="${LD-ld} -m elf_i386_fbsd"
1410: ;;
1411: x86_64-*linux*)
1412: LD="${LD-ld} -m elf_i386"
1413: ;;
1414: ppc64-*linux*|powerpc64-*linux*)
1415: LD="${LD-ld} -m elf32ppclinux"
1416: ;;
1417: s390x-*linux*)
1418: LD="${LD-ld} -m elf_s390"
1419: ;;
1420: sparc64-*linux*)
1421: LD="${LD-ld} -m elf32_sparc"
1422: ;;
1423: esac
1424: ;;
1425: *64-bit*)
1426: case $host in
1427: x86_64-*kfreebsd*-gnu)
1428: LD="${LD-ld} -m elf_x86_64_fbsd"
1429: ;;
1430: x86_64-*linux*)
1431: LD="${LD-ld} -m elf_x86_64"
1432: ;;
1433: ppc*-*linux*|powerpc*-*linux*)
1434: LD="${LD-ld} -m elf64ppc"
1435: ;;
1436: s390*-*linux*|s390*-*tpf*)
1437: LD="${LD-ld} -m elf64_s390"
1438: ;;
1439: sparc*-*linux*)
1440: LD="${LD-ld} -m elf64_sparc"
1441: ;;
1442: esac
1443: ;;
1444: esac
1445: fi
1446: rm -rf conftest*
1447: ;;
1448:
1449: *-*-sco3.2v5*)
1450: # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1451: SAVE_CFLAGS="$CFLAGS"
1452: CFLAGS="$CFLAGS -belf"
1453: AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1454: [AC_LANG_PUSH(C)
1455: AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1456: AC_LANG_POP])
1457: if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1458: # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1459: CFLAGS="$SAVE_CFLAGS"
1460: fi
1461: ;;
1462: *-*solaris*)
1463: # Find out which ABI we are using.
1464: echo 'int i;' > conftest.$ac_ext
1465: if AC_TRY_EVAL(ac_compile); then
1466: case `/usr/bin/file conftest.o` in
1467: *64-bit*)
1468: case $lt_cv_prog_gnu_ld in
1469: yes*)
1470: case $host in
1471: i?86-*-solaris*)
1472: LD="${LD-ld} -m elf_x86_64"
1473: ;;
1474: sparc*-*-solaris*)
1475: LD="${LD-ld} -m elf64_sparc"
1476: ;;
1477: esac
1478: # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1479: if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1480: LD="${LD-ld}_sol2"
1481: fi
1482: ;;
1483: *)
1484: if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1485: LD="${LD-ld} -64"
1486: fi
1487: ;;
1488: esac
1489: ;;
1490: esac
1491: fi
1492: rm -rf conftest*
1493: ;;
1494: esac
1495:
1496: need_locks="$enable_libtool_lock"
1497: ])# _LT_ENABLE_LOCK
1498:
1499:
1500: # _LT_PROG_AR
1501: # -----------
1502: m4_defun([_LT_PROG_AR],
1503: [AC_CHECK_TOOLS(AR, [ar], false)
1504: : ${AR=ar}
1505: : ${AR_FLAGS=cru}
1506: _LT_DECL([], [AR], [1], [The archiver])
1507: _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1508:
1509: AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1510: [lt_cv_ar_at_file=no
1511: AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1512: [echo conftest.$ac_objext > conftest.lst
1513: lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1514: AC_TRY_EVAL([lt_ar_try])
1515: if test "$ac_status" -eq 0; then
1516: # Ensure the archiver fails upon bogus file names.
1517: rm -f conftest.$ac_objext libconftest.a
1518: AC_TRY_EVAL([lt_ar_try])
1519: if test "$ac_status" -ne 0; then
1520: lt_cv_ar_at_file=@
1521: fi
1522: fi
1523: rm -f conftest.* libconftest.a
1524: ])
1525: ])
1526:
1527: if test "x$lt_cv_ar_at_file" = xno; then
1528: archiver_list_spec=
1529: else
1530: archiver_list_spec=$lt_cv_ar_at_file
1531: fi
1532: _LT_DECL([], [archiver_list_spec], [1],
1533: [How to feed a file listing to the archiver])
1534: ])# _LT_PROG_AR
1535:
1536:
1537: # _LT_CMD_OLD_ARCHIVE
1538: # -------------------
1539: m4_defun([_LT_CMD_OLD_ARCHIVE],
1540: [_LT_PROG_AR
1541:
1542: AC_CHECK_TOOL(STRIP, strip, :)
1543: test -z "$STRIP" && STRIP=:
1544: _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1545:
1546: AC_CHECK_TOOL(RANLIB, ranlib, :)
1547: test -z "$RANLIB" && RANLIB=:
1548: _LT_DECL([], [RANLIB], [1],
1549: [Commands used to install an old-style archive])
1550:
1551: # Determine commands to create old-style static archives.
1552: old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1553: old_postinstall_cmds='chmod 644 $oldlib'
1554: old_postuninstall_cmds=
1555:
1556: if test -n "$RANLIB"; then
1557: case $host_os in
1558: openbsd*)
1559: old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1560: ;;
1561: *)
1562: old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1563: ;;
1564: esac
1565: old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1566: fi
1567:
1568: case $host_os in
1569: darwin*)
1570: lock_old_archive_extraction=yes ;;
1571: *)
1572: lock_old_archive_extraction=no ;;
1573: esac
1574: _LT_DECL([], [old_postinstall_cmds], [2])
1575: _LT_DECL([], [old_postuninstall_cmds], [2])
1576: _LT_TAGDECL([], [old_archive_cmds], [2],
1577: [Commands used to build an old-style archive])
1578: _LT_DECL([], [lock_old_archive_extraction], [0],
1579: [Whether to use a lock for old archive extraction])
1580: ])# _LT_CMD_OLD_ARCHIVE
1581:
1582:
1583: # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1584: # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1585: # ----------------------------------------------------------------
1586: # Check whether the given compiler option works
1587: AC_DEFUN([_LT_COMPILER_OPTION],
1588: [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1589: m4_require([_LT_DECL_SED])dnl
1590: AC_CACHE_CHECK([$1], [$2],
1591: [$2=no
1592: m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1593: echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1594: lt_compiler_flag="$3"
1595: # Insert the option either (1) after the last *FLAGS variable, or
1596: # (2) before a word containing "conftest.", or (3) at the end.
1597: # Note that $ac_compile itself does not contain backslashes and begins
1598: # with a dollar sign (not a hyphen), so the echo should work correctly.
1599: # The option is referenced via a variable to avoid confusing sed.
1600: lt_compile=`echo "$ac_compile" | $SED \
1601: -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1602: -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1603: -e 's:$: $lt_compiler_flag:'`
1604: (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1605: (eval "$lt_compile" 2>conftest.err)
1606: ac_status=$?
1607: cat conftest.err >&AS_MESSAGE_LOG_FD
1608: echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1609: if (exit $ac_status) && test -s "$ac_outfile"; then
1610: # The compiler can only warn and ignore the option if not recognized
1611: # So say no if there are warnings other than the usual output.
1612: $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1613: $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1614: if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1615: $2=yes
1616: fi
1617: fi
1618: $RM conftest*
1619: ])
1620:
1621: if test x"[$]$2" = xyes; then
1622: m4_if([$5], , :, [$5])
1623: else
1624: m4_if([$6], , :, [$6])
1625: fi
1626: ])# _LT_COMPILER_OPTION
1627:
1628: # Old name:
1629: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1630: dnl aclocal-1.4 backwards compatibility:
1631: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1632:
1633:
1634: # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1635: # [ACTION-SUCCESS], [ACTION-FAILURE])
1636: # ----------------------------------------------------
1637: # Check whether the given linker option works
1638: AC_DEFUN([_LT_LINKER_OPTION],
1639: [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1640: m4_require([_LT_DECL_SED])dnl
1641: AC_CACHE_CHECK([$1], [$2],
1642: [$2=no
1643: save_LDFLAGS="$LDFLAGS"
1644: LDFLAGS="$LDFLAGS $3"
1645: echo "$lt_simple_link_test_code" > conftest.$ac_ext
1646: if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1647: # The linker can only warn and ignore the option if not recognized
1648: # So say no if there are warnings
1649: if test -s conftest.err; then
1650: # Append any errors to the config.log.
1651: cat conftest.err 1>&AS_MESSAGE_LOG_FD
1652: $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1653: $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1654: if diff conftest.exp conftest.er2 >/dev/null; then
1655: $2=yes
1656: fi
1657: else
1658: $2=yes
1659: fi
1660: fi
1661: $RM -r conftest*
1662: LDFLAGS="$save_LDFLAGS"
1663: ])
1664:
1665: if test x"[$]$2" = xyes; then
1666: m4_if([$4], , :, [$4])
1667: else
1668: m4_if([$5], , :, [$5])
1669: fi
1670: ])# _LT_LINKER_OPTION
1671:
1672: # Old name:
1673: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1674: dnl aclocal-1.4 backwards compatibility:
1675: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1676:
1677:
1678: # LT_CMD_MAX_LEN
1679: #---------------
1680: AC_DEFUN([LT_CMD_MAX_LEN],
1681: [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1682: # find the maximum length of command line arguments
1683: AC_MSG_CHECKING([the maximum length of command line arguments])
1684: AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1685: i=0
1686: teststring="ABCD"
1687:
1688: case $build_os in
1689: msdosdjgpp*)
1690: # On DJGPP, this test can blow up pretty badly due to problems in libc
1691: # (any single argument exceeding 2000 bytes causes a buffer overrun
1692: # during glob expansion). Even if it were fixed, the result of this
1693: # check would be larger than it should be.
1694: lt_cv_sys_max_cmd_len=12288; # 12K is about right
1695: ;;
1696:
1697: gnu*)
1698: # Under GNU Hurd, this test is not required because there is
1699: # no limit to the length of command line arguments.
1700: # Libtool will interpret -1 as no limit whatsoever
1701: lt_cv_sys_max_cmd_len=-1;
1702: ;;
1703:
1704: cygwin* | mingw* | cegcc*)
1705: # On Win9x/ME, this test blows up -- it succeeds, but takes
1706: # about 5 minutes as the teststring grows exponentially.
1707: # Worse, since 9x/ME are not pre-emptively multitasking,
1708: # you end up with a "frozen" computer, even though with patience
1709: # the test eventually succeeds (with a max line length of 256k).
1710: # Instead, let's just punt: use the minimum linelength reported by
1711: # all of the supported platforms: 8192 (on NT/2K/XP).
1712: lt_cv_sys_max_cmd_len=8192;
1713: ;;
1714:
1715: mint*)
1716: # On MiNT this can take a long time and run out of memory.
1717: lt_cv_sys_max_cmd_len=8192;
1718: ;;
1719:
1720: amigaos*)
1721: # On AmigaOS with pdksh, this test takes hours, literally.
1722: # So we just punt and use a minimum line length of 8192.
1723: lt_cv_sys_max_cmd_len=8192;
1724: ;;
1725:
1726: netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1727: # This has been around since 386BSD, at least. Likely further.
1728: if test -x /sbin/sysctl; then
1729: lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1730: elif test -x /usr/sbin/sysctl; then
1731: lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1732: else
1733: lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1734: fi
1735: # And add a safety zone
1736: lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1737: lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1738: ;;
1739:
1740: interix*)
1741: # We know the value 262144 and hardcode it with a safety zone (like BSD)
1742: lt_cv_sys_max_cmd_len=196608
1743: ;;
1744:
1745: os2*)
1746: # The test takes a long time on OS/2.
1747: lt_cv_sys_max_cmd_len=8192
1748: ;;
1749:
1750: osf*)
1751: # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1752: # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1753: # nice to cause kernel panics so lets avoid the loop below.
1754: # First set a reasonable default.
1755: lt_cv_sys_max_cmd_len=16384
1756: #
1757: if test -x /sbin/sysconfig; then
1758: case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1759: *1*) lt_cv_sys_max_cmd_len=-1 ;;
1760: esac
1761: fi
1762: ;;
1763: sco3.2v5*)
1764: lt_cv_sys_max_cmd_len=102400
1765: ;;
1766: sysv5* | sco5v6* | sysv4.2uw2*)
1767: kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1768: if test -n "$kargmax"; then
1769: lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1770: else
1771: lt_cv_sys_max_cmd_len=32768
1772: fi
1773: ;;
1774: *)
1775: lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1776: if test -n "$lt_cv_sys_max_cmd_len"; then
1777: lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1778: lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1779: else
1780: # Make teststring a little bigger before we do anything with it.
1781: # a 1K string should be a reasonable start.
1782: for i in 1 2 3 4 5 6 7 8 ; do
1783: teststring=$teststring$teststring
1784: done
1785: SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1786: # If test is not a shell built-in, we'll probably end up computing a
1787: # maximum length that is only half of the actual maximum length, but
1788: # we can't tell.
1789: while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1790: = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1791: test $i != 17 # 1/2 MB should be enough
1792: do
1793: i=`expr $i + 1`
1794: teststring=$teststring$teststring
1795: done
1796: # Only check the string length outside the loop.
1797: lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1798: teststring=
1799: # Add a significant safety factor because C++ compilers can tack on
1800: # massive amounts of additional arguments before passing them to the
1801: # linker. It appears as though 1/2 is a usable value.
1802: lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1803: fi
1804: ;;
1805: esac
1806: ])
1807: if test -n $lt_cv_sys_max_cmd_len ; then
1808: AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1809: else
1810: AC_MSG_RESULT(none)
1811: fi
1812: max_cmd_len=$lt_cv_sys_max_cmd_len
1813: _LT_DECL([], [max_cmd_len], [0],
1814: [What is the maximum length of a command?])
1815: ])# LT_CMD_MAX_LEN
1816:
1817: # Old name:
1818: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1819: dnl aclocal-1.4 backwards compatibility:
1820: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1821:
1822:
1823: # _LT_HEADER_DLFCN
1824: # ----------------
1825: m4_defun([_LT_HEADER_DLFCN],
1826: [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1827: ])# _LT_HEADER_DLFCN
1828:
1829:
1830: # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1831: # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1832: # ----------------------------------------------------------------
1833: m4_defun([_LT_TRY_DLOPEN_SELF],
1834: [m4_require([_LT_HEADER_DLFCN])dnl
1835: if test "$cross_compiling" = yes; then :
1836: [$4]
1837: else
1838: lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1839: lt_status=$lt_dlunknown
1840: cat > conftest.$ac_ext <<_LT_EOF
1841: [#line $LINENO "configure"
1842: #include "confdefs.h"
1843:
1844: #if HAVE_DLFCN_H
1845: #include <dlfcn.h>
1846: #endif
1847:
1848: #include <stdio.h>
1849:
1850: #ifdef RTLD_GLOBAL
1851: # define LT_DLGLOBAL RTLD_GLOBAL
1852: #else
1853: # ifdef DL_GLOBAL
1854: # define LT_DLGLOBAL DL_GLOBAL
1855: # else
1856: # define LT_DLGLOBAL 0
1857: # endif
1858: #endif
1859:
1860: /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1861: find out it does not work in some platform. */
1862: #ifndef LT_DLLAZY_OR_NOW
1863: # ifdef RTLD_LAZY
1864: # define LT_DLLAZY_OR_NOW RTLD_LAZY
1865: # else
1866: # ifdef DL_LAZY
1867: # define LT_DLLAZY_OR_NOW DL_LAZY
1868: # else
1869: # ifdef RTLD_NOW
1870: # define LT_DLLAZY_OR_NOW RTLD_NOW
1871: # else
1872: # ifdef DL_NOW
1873: # define LT_DLLAZY_OR_NOW DL_NOW
1874: # else
1875: # define LT_DLLAZY_OR_NOW 0
1876: # endif
1877: # endif
1878: # endif
1879: # endif
1880: #endif
1881:
1882: /* When -fvisbility=hidden is used, assume the code has been annotated
1883: correspondingly for the symbols needed. */
1884: #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1885: int fnord () __attribute__((visibility("default")));
1886: #endif
1887:
1888: int fnord () { return 42; }
1889: int main ()
1890: {
1891: void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1892: int status = $lt_dlunknown;
1893:
1894: if (self)
1895: {
1896: if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1897: else
1898: {
1899: if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1900: else puts (dlerror ());
1901: }
1902: /* dlclose (self); */
1903: }
1904: else
1905: puts (dlerror ());
1906:
1907: return status;
1908: }]
1909: _LT_EOF
1910: if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1911: (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1912: lt_status=$?
1913: case x$lt_status in
1914: x$lt_dlno_uscore) $1 ;;
1915: x$lt_dlneed_uscore) $2 ;;
1916: x$lt_dlunknown|x*) $3 ;;
1917: esac
1918: else :
1919: # compilation failed
1920: $3
1921: fi
1922: fi
1923: rm -fr conftest*
1924: ])# _LT_TRY_DLOPEN_SELF
1925:
1926:
1927: # LT_SYS_DLOPEN_SELF
1928: # ------------------
1929: AC_DEFUN([LT_SYS_DLOPEN_SELF],
1930: [m4_require([_LT_HEADER_DLFCN])dnl
1931: if test "x$enable_dlopen" != xyes; then
1932: enable_dlopen=unknown
1933: enable_dlopen_self=unknown
1934: enable_dlopen_self_static=unknown
1935: else
1936: lt_cv_dlopen=no
1937: lt_cv_dlopen_libs=
1938:
1939: case $host_os in
1940: beos*)
1941: lt_cv_dlopen="load_add_on"
1942: lt_cv_dlopen_libs=
1943: lt_cv_dlopen_self=yes
1944: ;;
1945:
1946: mingw* | pw32* | cegcc*)
1947: lt_cv_dlopen="LoadLibrary"
1948: lt_cv_dlopen_libs=
1949: ;;
1950:
1951: cygwin*)
1952: lt_cv_dlopen="dlopen"
1953: lt_cv_dlopen_libs=
1954: ;;
1955:
1956: darwin*)
1957: # if libdl is installed we need to link against it
1958: AC_CHECK_LIB([dl], [dlopen],
1959: [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1960: lt_cv_dlopen="dyld"
1961: lt_cv_dlopen_libs=
1962: lt_cv_dlopen_self=yes
1963: ])
1964: ;;
1965:
1966: *)
1967: AC_CHECK_FUNC([shl_load],
1968: [lt_cv_dlopen="shl_load"],
1969: [AC_CHECK_LIB([dld], [shl_load],
1970: [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1971: [AC_CHECK_FUNC([dlopen],
1972: [lt_cv_dlopen="dlopen"],
1973: [AC_CHECK_LIB([dl], [dlopen],
1974: [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1975: [AC_CHECK_LIB([svld], [dlopen],
1976: [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1977: [AC_CHECK_LIB([dld], [dld_link],
1978: [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1979: ])
1980: ])
1981: ])
1982: ])
1983: ])
1984: ;;
1985: esac
1986:
1987: if test "x$lt_cv_dlopen" != xno; then
1988: enable_dlopen=yes
1989: else
1990: enable_dlopen=no
1991: fi
1992:
1993: case $lt_cv_dlopen in
1994: dlopen)
1995: save_CPPFLAGS="$CPPFLAGS"
1996: test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1997:
1998: save_LDFLAGS="$LDFLAGS"
1999: wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2000:
2001: save_LIBS="$LIBS"
2002: LIBS="$lt_cv_dlopen_libs $LIBS"
2003:
2004: AC_CACHE_CHECK([whether a program can dlopen itself],
2005: lt_cv_dlopen_self, [dnl
2006: _LT_TRY_DLOPEN_SELF(
2007: lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2008: lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2009: ])
2010:
2011: if test "x$lt_cv_dlopen_self" = xyes; then
2012: wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2013: AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2014: lt_cv_dlopen_self_static, [dnl
2015: _LT_TRY_DLOPEN_SELF(
2016: lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2017: lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2018: ])
2019: fi
2020:
2021: CPPFLAGS="$save_CPPFLAGS"
2022: LDFLAGS="$save_LDFLAGS"
2023: LIBS="$save_LIBS"
2024: ;;
2025: esac
2026:
2027: case $lt_cv_dlopen_self in
2028: yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2029: *) enable_dlopen_self=unknown ;;
2030: esac
2031:
2032: case $lt_cv_dlopen_self_static in
2033: yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2034: *) enable_dlopen_self_static=unknown ;;
2035: esac
2036: fi
2037: _LT_DECL([dlopen_support], [enable_dlopen], [0],
2038: [Whether dlopen is supported])
2039: _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2040: [Whether dlopen of programs is supported])
2041: _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2042: [Whether dlopen of statically linked programs is supported])
2043: ])# LT_SYS_DLOPEN_SELF
2044:
2045: # Old name:
2046: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2047: dnl aclocal-1.4 backwards compatibility:
2048: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2049:
2050:
2051: # _LT_COMPILER_C_O([TAGNAME])
2052: # ---------------------------
2053: # Check to see if options -c and -o are simultaneously supported by compiler.
2054: # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2055: m4_defun([_LT_COMPILER_C_O],
2056: [m4_require([_LT_DECL_SED])dnl
2057: m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2058: m4_require([_LT_TAG_COMPILER])dnl
2059: AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2060: [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2061: [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2062: $RM -r conftest 2>/dev/null
2063: mkdir conftest
2064: cd conftest
2065: mkdir out
2066: echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2067:
2068: lt_compiler_flag="-o out/conftest2.$ac_objext"
2069: # Insert the option either (1) after the last *FLAGS variable, or
2070: # (2) before a word containing "conftest.", or (3) at the end.
2071: # Note that $ac_compile itself does not contain backslashes and begins
2072: # with a dollar sign (not a hyphen), so the echo should work correctly.
2073: lt_compile=`echo "$ac_compile" | $SED \
2074: -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2075: -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2076: -e 's:$: $lt_compiler_flag:'`
2077: (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2078: (eval "$lt_compile" 2>out/conftest.err)
2079: ac_status=$?
2080: cat out/conftest.err >&AS_MESSAGE_LOG_FD
2081: echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2082: if (exit $ac_status) && test -s out/conftest2.$ac_objext
2083: then
2084: # The compiler can only warn and ignore the option if not recognized
2085: # So say no if there are warnings
2086: $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2087: $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2088: if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2089: _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2090: fi
2091: fi
2092: chmod u+w . 2>&AS_MESSAGE_LOG_FD
2093: $RM conftest*
2094: # SGI C++ compiler will create directory out/ii_files/ for
2095: # template instantiation
2096: test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2097: $RM out/* && rmdir out
2098: cd ..
2099: $RM -r conftest
2100: $RM conftest*
2101: ])
2102: _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2103: [Does compiler simultaneously support -c and -o options?])
2104: ])# _LT_COMPILER_C_O
2105:
2106:
2107: # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2108: # ----------------------------------
2109: # Check to see if we can do hard links to lock some files if needed
2110: m4_defun([_LT_COMPILER_FILE_LOCKS],
2111: [m4_require([_LT_ENABLE_LOCK])dnl
2112: m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2113: _LT_COMPILER_C_O([$1])
2114:
2115: hard_links="nottested"
2116: if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2117: # do not overwrite the value of need_locks provided by the user
2118: AC_MSG_CHECKING([if we can lock with hard links])
2119: hard_links=yes
2120: $RM conftest*
2121: ln conftest.a conftest.b 2>/dev/null && hard_links=no
2122: touch conftest.a
2123: ln conftest.a conftest.b 2>&5 || hard_links=no
2124: ln conftest.a conftest.b 2>/dev/null && hard_links=no
2125: AC_MSG_RESULT([$hard_links])
2126: if test "$hard_links" = no; then
2127: AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2128: need_locks=warn
2129: fi
2130: else
2131: need_locks=no
2132: fi
2133: _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2134: ])# _LT_COMPILER_FILE_LOCKS
2135:
2136:
2137: # _LT_CHECK_OBJDIR
2138: # ----------------
2139: m4_defun([_LT_CHECK_OBJDIR],
2140: [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2141: [rm -f .libs 2>/dev/null
2142: mkdir .libs 2>/dev/null
2143: if test -d .libs; then
2144: lt_cv_objdir=.libs
2145: else
2146: # MS-DOS does not allow filenames that begin with a dot.
2147: lt_cv_objdir=_libs
2148: fi
2149: rmdir .libs 2>/dev/null])
2150: objdir=$lt_cv_objdir
2151: _LT_DECL([], [objdir], [0],
2152: [The name of the directory that contains temporary libtool files])dnl
2153: m4_pattern_allow([LT_OBJDIR])dnl
2154: AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2155: [Define to the sub-directory in which libtool stores uninstalled libraries.])
2156: ])# _LT_CHECK_OBJDIR
2157:
2158:
2159: # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2160: # --------------------------------------
2161: # Check hardcoding attributes.
2162: m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2163: [AC_MSG_CHECKING([how to hardcode library paths into programs])
2164: _LT_TAGVAR(hardcode_action, $1)=
2165: if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2166: test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2167: test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2168:
2169: # We can hardcode non-existent directories.
2170: if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2171: # If the only mechanism to avoid hardcoding is shlibpath_var, we
2172: # have to relink, otherwise we might link with an installed library
2173: # when we should be linking with a yet-to-be-installed one
2174: ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2175: test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2176: # Linking always hardcodes the temporary library directory.
2177: _LT_TAGVAR(hardcode_action, $1)=relink
2178: else
2179: # We can link without hardcoding, and we can hardcode nonexisting dirs.
2180: _LT_TAGVAR(hardcode_action, $1)=immediate
2181: fi
2182: else
2183: # We cannot hardcode anything, or else we can only hardcode existing
2184: # directories.
2185: _LT_TAGVAR(hardcode_action, $1)=unsupported
2186: fi
2187: AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2188:
2189: if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2190: test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2191: # Fast installation is not supported
2192: enable_fast_install=no
2193: elif test "$shlibpath_overrides_runpath" = yes ||
2194: test "$enable_shared" = no; then
2195: # Fast installation is not necessary
2196: enable_fast_install=needless
2197: fi
2198: _LT_TAGDECL([], [hardcode_action], [0],
2199: [How to hardcode a shared library path into an executable])
2200: ])# _LT_LINKER_HARDCODE_LIBPATH
2201:
2202:
2203: # _LT_CMD_STRIPLIB
2204: # ----------------
2205: m4_defun([_LT_CMD_STRIPLIB],
2206: [m4_require([_LT_DECL_EGREP])
2207: striplib=
2208: old_striplib=
2209: AC_MSG_CHECKING([whether stripping libraries is possible])
2210: if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2211: test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2212: test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2213: AC_MSG_RESULT([yes])
2214: else
2215: # FIXME - insert some real tests, host_os isn't really good enough
2216: case $host_os in
2217: darwin*)
2218: if test -n "$STRIP" ; then
2219: striplib="$STRIP -x"
2220: old_striplib="$STRIP -S"
2221: AC_MSG_RESULT([yes])
2222: else
2223: AC_MSG_RESULT([no])
2224: fi
2225: ;;
2226: *)
2227: AC_MSG_RESULT([no])
2228: ;;
2229: esac
2230: fi
2231: _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2232: _LT_DECL([], [striplib], [1])
2233: ])# _LT_CMD_STRIPLIB
2234:
2235:
2236: # _LT_SYS_DYNAMIC_LINKER([TAG])
2237: # -----------------------------
2238: # PORTME Fill in your ld.so characteristics
2239: m4_defun([_LT_SYS_DYNAMIC_LINKER],
2240: [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2241: m4_require([_LT_DECL_EGREP])dnl
2242: m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2243: m4_require([_LT_DECL_OBJDUMP])dnl
2244: m4_require([_LT_DECL_SED])dnl
2245: m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2246: AC_MSG_CHECKING([dynamic linker characteristics])
2247: m4_if([$1],
2248: [], [
2249: if test "$GCC" = yes; then
2250: case $host_os in
2251: darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2252: *) lt_awk_arg="/^libraries:/" ;;
2253: esac
2254: case $host_os in
2255: mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2256: *) lt_sed_strip_eq="s,=/,/,g" ;;
2257: esac
2258: lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2259: case $lt_search_path_spec in
2260: *\;*)
2261: # if the path contains ";" then we assume it to be the separator
2262: # otherwise default to the standard path separator (i.e. ":") - it is
2263: # assumed that no part of a normal pathname contains ";" but that should
2264: # okay in the real world where ";" in dirpaths is itself problematic.
2265: lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2266: ;;
2267: *)
2268: lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2269: ;;
2270: esac
2271: # Ok, now we have the path, separated by spaces, we can step through it
2272: # and add multilib dir if necessary.
2273: lt_tmp_lt_search_path_spec=
2274: lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2275: for lt_sys_path in $lt_search_path_spec; do
2276: if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2277: lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2278: else
2279: test -d "$lt_sys_path" && \
2280: lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2281: fi
2282: done
2283: lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2284: BEGIN {RS=" "; FS="/|\n";} {
2285: lt_foo="";
2286: lt_count=0;
2287: for (lt_i = NF; lt_i > 0; lt_i--) {
2288: if ($lt_i != "" && $lt_i != ".") {
2289: if ($lt_i == "..") {
2290: lt_count++;
2291: } else {
2292: if (lt_count == 0) {
2293: lt_foo="/" $lt_i lt_foo;
2294: } else {
2295: lt_count--;
2296: }
2297: }
2298: }
2299: }
2300: if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2301: if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2302: }'`
2303: # AWK program above erroneously prepends '/' to C:/dos/paths
2304: # for these hosts.
2305: case $host_os in
2306: mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2307: $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2308: esac
2309: sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2310: else
2311: sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2312: fi])
2313: library_names_spec=
2314: libname_spec='lib$name'
2315: soname_spec=
2316: shrext_cmds=".so"
2317: postinstall_cmds=
2318: postuninstall_cmds=
2319: finish_cmds=
2320: finish_eval=
2321: shlibpath_var=
2322: shlibpath_overrides_runpath=unknown
2323: version_type=none
2324: dynamic_linker="$host_os ld.so"
2325: sys_lib_dlsearch_path_spec="/lib /usr/lib"
2326: need_lib_prefix=unknown
2327: hardcode_into_libs=no
2328:
2329: # when you set need_version to no, make sure it does not cause -set_version
2330: # flags to be left without arguments
2331: need_version=unknown
2332:
2333: case $host_os in
2334: aix3*)
2335: version_type=linux # correct to gnu/linux during the next big refactor
2336: library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2337: shlibpath_var=LIBPATH
2338:
2339: # AIX 3 has no versioning support, so we append a major version to the name.
2340: soname_spec='${libname}${release}${shared_ext}$major'
2341: ;;
2342:
2343: aix[[4-9]]*)
2344: version_type=linux # correct to gnu/linux during the next big refactor
2345: need_lib_prefix=no
2346: need_version=no
2347: hardcode_into_libs=yes
2348: if test "$host_cpu" = ia64; then
2349: # AIX 5 supports IA64
2350: library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2351: shlibpath_var=LD_LIBRARY_PATH
2352: else
2353: # With GCC up to 2.95.x, collect2 would create an import file
2354: # for dependence libraries. The import file would start with
2355: # the line `#! .'. This would cause the generated library to
2356: # depend on `.', always an invalid library. This was fixed in
2357: # development snapshots of GCC prior to 3.0.
2358: case $host_os in
2359: aix4 | aix4.[[01]] | aix4.[[01]].*)
2360: if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2361: echo ' yes '
2362: echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2363: :
2364: else
2365: can_build_shared=no
2366: fi
2367: ;;
2368: esac
2369: # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2370: # soname into executable. Probably we can add versioning support to
2371: # collect2, so additional links can be useful in future.
2372: if test "$aix_use_runtimelinking" = yes; then
2373: # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2374: # instead of lib<name>.a to let people know that these are not
2375: # typical AIX shared libraries.
2376: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2377: else
2378: # We preserve .a as extension for shared libraries through AIX4.2
2379: # and later when we are not doing run time linking.
2380: library_names_spec='${libname}${release}.a $libname.a'
2381: soname_spec='${libname}${release}${shared_ext}$major'
2382: fi
2383: shlibpath_var=LIBPATH
2384: fi
2385: ;;
2386:
2387: amigaos*)
2388: case $host_cpu in
2389: powerpc)
2390: # Since July 2007 AmigaOS4 officially supports .so libraries.
2391: # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2392: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2393: ;;
2394: m68k)
2395: library_names_spec='$libname.ixlibrary $libname.a'
2396: # Create ${libname}_ixlibrary.a entries in /sys/libs.
2397: 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'
2398: ;;
2399: esac
2400: ;;
2401:
2402: beos*)
2403: library_names_spec='${libname}${shared_ext}'
2404: dynamic_linker="$host_os ld.so"
2405: shlibpath_var=LIBRARY_PATH
2406: ;;
2407:
2408: bsdi[[45]]*)
2409: version_type=linux # correct to gnu/linux during the next big refactor
2410: need_version=no
2411: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2412: soname_spec='${libname}${release}${shared_ext}$major'
2413: finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2414: shlibpath_var=LD_LIBRARY_PATH
2415: sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2416: sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2417: # the default ld.so.conf also contains /usr/contrib/lib and
2418: # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2419: # libtool to hard-code these into programs
2420: ;;
2421:
2422: cygwin* | mingw* | pw32* | cegcc*)
2423: version_type=windows
2424: shrext_cmds=".dll"
2425: need_version=no
2426: need_lib_prefix=no
2427:
2428: case $GCC,$cc_basename in
2429: yes,*)
2430: # gcc
2431: library_names_spec='$libname.dll.a'
2432: # DLL is installed to $(libdir)/../bin by postinstall_cmds
2433: postinstall_cmds='base_file=`basename \${file}`~
2434: dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2435: dldir=$destdir/`dirname \$dlpath`~
2436: test -d \$dldir || mkdir -p \$dldir~
2437: $install_prog $dir/$dlname \$dldir/$dlname~
2438: chmod a+x \$dldir/$dlname~
2439: if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2440: eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2441: fi'
2442: postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2443: dlpath=$dir/\$dldll~
2444: $RM \$dlpath'
2445: shlibpath_overrides_runpath=yes
2446:
2447: case $host_os in
2448: cygwin*)
2449: # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2450: soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2451: m4_if([$1], [],[
2452: sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2453: ;;
2454: mingw* | cegcc*)
2455: # MinGW DLLs use traditional 'lib' prefix
2456: soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2457: ;;
2458: pw32*)
2459: # pw32 DLLs use 'pw' prefix rather than 'lib'
2460: library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2461: ;;
2462: esac
2463: dynamic_linker='Win32 ld.exe'
2464: ;;
2465:
2466: *,cl*)
2467: # Native MSVC
2468: libname_spec='$name'
2469: soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2470: library_names_spec='${libname}.dll.lib'
2471:
2472: case $build_os in
2473: mingw*)
2474: sys_lib_search_path_spec=
2475: lt_save_ifs=$IFS
2476: IFS=';'
2477: for lt_path in $LIB
2478: do
2479: IFS=$lt_save_ifs
2480: # Let DOS variable expansion print the short 8.3 style file name.
2481: lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2482: sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2483: done
2484: IFS=$lt_save_ifs
2485: # Convert to MSYS style.
2486: sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2487: ;;
2488: cygwin*)
2489: # Convert to unix form, then to dos form, then back to unix form
2490: # but this time dos style (no spaces!) so that the unix form looks
2491: # like /cygdrive/c/PROGRA~1:/cygdr...
2492: sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2493: sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2494: sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2495: ;;
2496: *)
2497: sys_lib_search_path_spec="$LIB"
2498: if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2499: # It is most probably a Windows format PATH.
2500: sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2501: else
2502: sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2503: fi
2504: # FIXME: find the short name or the path components, as spaces are
2505: # common. (e.g. "Program Files" -> "PROGRA~1")
2506: ;;
2507: esac
2508:
2509: # DLL is installed to $(libdir)/../bin by postinstall_cmds
2510: postinstall_cmds='base_file=`basename \${file}`~
2511: dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2512: dldir=$destdir/`dirname \$dlpath`~
2513: test -d \$dldir || mkdir -p \$dldir~
2514: $install_prog $dir/$dlname \$dldir/$dlname'
2515: postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2516: dlpath=$dir/\$dldll~
2517: $RM \$dlpath'
2518: shlibpath_overrides_runpath=yes
2519: dynamic_linker='Win32 link.exe'
2520: ;;
2521:
2522: *)
2523: # Assume MSVC wrapper
2524: library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2525: dynamic_linker='Win32 ld.exe'
2526: ;;
2527: esac
2528: # FIXME: first we should search . and the directory the executable is in
2529: shlibpath_var=PATH
2530: ;;
2531:
2532: darwin* | rhapsody*)
2533: dynamic_linker="$host_os dyld"
2534: version_type=darwin
2535: need_lib_prefix=no
2536: need_version=no
2537: library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2538: soname_spec='${libname}${release}${major}$shared_ext'
2539: shlibpath_overrides_runpath=yes
2540: shlibpath_var=DYLD_LIBRARY_PATH
2541: shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2542: m4_if([$1], [],[
2543: sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2544: sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2545: ;;
2546:
2547: dgux*)
2548: version_type=linux # correct to gnu/linux during the next big refactor
2549: need_lib_prefix=no
2550: need_version=no
2551: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2552: soname_spec='${libname}${release}${shared_ext}$major'
2553: shlibpath_var=LD_LIBRARY_PATH
2554: ;;
2555:
2556: freebsd* | dragonfly*)
2557: # DragonFly does not have aout. When/if they implement a new
2558: # versioning mechanism, adjust this.
2559: if test -x /usr/bin/objformat; then
2560: objformat=`/usr/bin/objformat`
2561: else
2562: case $host_os in
2563: freebsd[[23]].*) objformat=aout ;;
2564: *) objformat=elf ;;
2565: esac
2566: fi
2567: version_type=freebsd-$objformat
2568: case $version_type in
2569: freebsd-elf*)
2570: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2571: need_version=no
2572: need_lib_prefix=no
2573: ;;
2574: freebsd-*)
2575: library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2576: need_version=yes
2577: ;;
2578: esac
2579: shlibpath_var=LD_LIBRARY_PATH
2580: case $host_os in
2581: freebsd2.*)
2582: shlibpath_overrides_runpath=yes
2583: ;;
2584: freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2585: shlibpath_overrides_runpath=yes
2586: hardcode_into_libs=yes
2587: ;;
2588: freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2589: freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2590: shlibpath_overrides_runpath=no
2591: hardcode_into_libs=yes
2592: ;;
2593: *) # from 4.6 on, and DragonFly
2594: shlibpath_overrides_runpath=yes
2595: hardcode_into_libs=yes
2596: ;;
2597: esac
2598: ;;
2599:
2600: gnu*)
2601: version_type=linux # correct to gnu/linux during the next big refactor
2602: need_lib_prefix=no
2603: need_version=no
2604: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2605: soname_spec='${libname}${release}${shared_ext}$major'
2606: shlibpath_var=LD_LIBRARY_PATH
2607: shlibpath_overrides_runpath=no
2608: hardcode_into_libs=yes
2609: ;;
2610:
2611: haiku*)
2612: version_type=linux # correct to gnu/linux during the next big refactor
2613: need_lib_prefix=no
2614: need_version=no
2615: dynamic_linker="$host_os runtime_loader"
2616: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2617: soname_spec='${libname}${release}${shared_ext}$major'
2618: shlibpath_var=LIBRARY_PATH
2619: shlibpath_overrides_runpath=yes
2620: sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2621: hardcode_into_libs=yes
2622: ;;
2623:
2624: hpux9* | hpux10* | hpux11*)
2625: # Give a soname corresponding to the major version so that dld.sl refuses to
2626: # link against other versions.
2627: version_type=sunos
2628: need_lib_prefix=no
2629: need_version=no
2630: case $host_cpu in
2631: ia64*)
2632: shrext_cmds='.so'
2633: hardcode_into_libs=yes
2634: dynamic_linker="$host_os dld.so"
2635: shlibpath_var=LD_LIBRARY_PATH
2636: shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2637: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2638: soname_spec='${libname}${release}${shared_ext}$major'
2639: if test "X$HPUX_IA64_MODE" = X32; then
2640: sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2641: else
2642: sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2643: fi
2644: sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2645: ;;
2646: hppa*64*)
2647: shrext_cmds='.sl'
2648: hardcode_into_libs=yes
2649: dynamic_linker="$host_os dld.sl"
2650: shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2651: shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2652: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2653: soname_spec='${libname}${release}${shared_ext}$major'
2654: sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2655: sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2656: ;;
2657: *)
2658: shrext_cmds='.sl'
2659: dynamic_linker="$host_os dld.sl"
2660: shlibpath_var=SHLIB_PATH
2661: shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2662: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2663: soname_spec='${libname}${release}${shared_ext}$major'
2664: ;;
2665: esac
2666: # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2667: postinstall_cmds='chmod 555 $lib'
2668: # or fails outright, so override atomically:
2669: install_override_mode=555
2670: ;;
2671:
2672: interix[[3-9]]*)
2673: version_type=linux # correct to gnu/linux during the next big refactor
2674: need_lib_prefix=no
2675: need_version=no
2676: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2677: soname_spec='${libname}${release}${shared_ext}$major'
2678: dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2679: shlibpath_var=LD_LIBRARY_PATH
2680: shlibpath_overrides_runpath=no
2681: hardcode_into_libs=yes
2682: ;;
2683:
2684: irix5* | irix6* | nonstopux*)
2685: case $host_os in
2686: nonstopux*) version_type=nonstopux ;;
2687: *)
2688: if test "$lt_cv_prog_gnu_ld" = yes; then
2689: version_type=linux # correct to gnu/linux during the next big refactor
2690: else
2691: version_type=irix
2692: fi ;;
2693: esac
2694: need_lib_prefix=no
2695: need_version=no
2696: soname_spec='${libname}${release}${shared_ext}$major'
2697: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2698: case $host_os in
2699: irix5* | nonstopux*)
2700: libsuff= shlibsuff=
2701: ;;
2702: *)
2703: case $LD in # libtool.m4 will add one of these switches to LD
2704: *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2705: libsuff= shlibsuff= libmagic=32-bit;;
2706: *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2707: libsuff=32 shlibsuff=N32 libmagic=N32;;
2708: *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2709: libsuff=64 shlibsuff=64 libmagic=64-bit;;
2710: *) libsuff= shlibsuff= libmagic=never-match;;
2711: esac
2712: ;;
2713: esac
2714: shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2715: shlibpath_overrides_runpath=no
2716: sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2717: sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2718: hardcode_into_libs=yes
2719: ;;
2720:
2721: # No shared lib support for Linux oldld, aout, or coff.
2722: linux*oldld* | linux*aout* | linux*coff*)
2723: dynamic_linker=no
2724: ;;
2725:
2726: # This must be glibc/ELF.
2727: linux* | k*bsd*-gnu | kopensolaris*-gnu)
2728: version_type=linux # correct to gnu/linux during the next big refactor
2729: need_lib_prefix=no
2730: need_version=no
2731: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2732: soname_spec='${libname}${release}${shared_ext}$major'
2733: finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2734: shlibpath_var=LD_LIBRARY_PATH
2735: shlibpath_overrides_runpath=no
2736:
2737: # Some binutils ld are patched to set DT_RUNPATH
2738: AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2739: [lt_cv_shlibpath_overrides_runpath=no
2740: save_LDFLAGS=$LDFLAGS
2741: save_libdir=$libdir
2742: eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2743: LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2744: AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2745: [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2746: [lt_cv_shlibpath_overrides_runpath=yes])])
2747: LDFLAGS=$save_LDFLAGS
2748: libdir=$save_libdir
2749: ])
2750: shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2751:
2752: # This implies no fast_install, which is unacceptable.
2753: # Some rework will be needed to allow for fast_install
2754: # before this can be enabled.
2755: hardcode_into_libs=yes
2756:
2757: # Append ld.so.conf contents to the search path
2758: if test -f /etc/ld.so.conf; then
2759: 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' ' '`
2760: sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2761: fi
2762:
2763: # We used to test for /lib/ld.so.1 and disable shared libraries on
2764: # powerpc, because MkLinux only supported shared libraries with the
2765: # GNU dynamic linker. Since this was broken with cross compilers,
2766: # most powerpc-linux boxes support dynamic linking these days and
2767: # people can always --disable-shared, the test was removed, and we
2768: # assume the GNU/Linux dynamic linker is in use.
2769: dynamic_linker='GNU/Linux ld.so'
2770: ;;
2771:
2772: netbsd*)
2773: version_type=sunos
2774: need_lib_prefix=no
2775: need_version=no
2776: if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2777: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2778: finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2779: dynamic_linker='NetBSD (a.out) ld.so'
2780: else
2781: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2782: soname_spec='${libname}${release}${shared_ext}$major'
2783: dynamic_linker='NetBSD ld.elf_so'
2784: fi
2785: shlibpath_var=LD_LIBRARY_PATH
2786: shlibpath_overrides_runpath=yes
2787: hardcode_into_libs=yes
2788: ;;
2789:
2790: newsos6)
2791: version_type=linux # correct to gnu/linux during the next big refactor
2792: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2793: shlibpath_var=LD_LIBRARY_PATH
2794: shlibpath_overrides_runpath=yes
2795: ;;
2796:
2797: *nto* | *qnx*)
2798: version_type=qnx
2799: need_lib_prefix=no
2800: need_version=no
2801: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2802: soname_spec='${libname}${release}${shared_ext}$major'
2803: shlibpath_var=LD_LIBRARY_PATH
2804: shlibpath_overrides_runpath=no
2805: hardcode_into_libs=yes
2806: dynamic_linker='ldqnx.so'
2807: ;;
2808:
2809: openbsd*)
2810: version_type=sunos
2811: sys_lib_dlsearch_path_spec="/usr/lib"
2812: need_lib_prefix=no
2813: # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2814: case $host_os in
2815: openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2816: *) need_version=no ;;
2817: esac
2818: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2819: finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2820: shlibpath_var=LD_LIBRARY_PATH
2821: if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2822: case $host_os in
2823: openbsd2.[[89]] | openbsd2.[[89]].*)
2824: shlibpath_overrides_runpath=no
2825: ;;
2826: *)
2827: shlibpath_overrides_runpath=yes
2828: ;;
2829: esac
2830: else
2831: shlibpath_overrides_runpath=yes
2832: fi
2833: ;;
2834:
2835: os2*)
2836: libname_spec='$name'
2837: shrext_cmds=".dll"
2838: need_lib_prefix=no
2839: library_names_spec='$libname${shared_ext} $libname.a'
2840: dynamic_linker='OS/2 ld.exe'
2841: shlibpath_var=LIBPATH
2842: ;;
2843:
2844: osf3* | osf4* | osf5*)
2845: version_type=osf
2846: need_lib_prefix=no
2847: need_version=no
2848: soname_spec='${libname}${release}${shared_ext}$major'
2849: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2850: shlibpath_var=LD_LIBRARY_PATH
2851: sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2852: sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2853: ;;
2854:
2855: rdos*)
2856: dynamic_linker=no
2857: ;;
2858:
2859: solaris*)
2860: version_type=linux # correct to gnu/linux during the next big refactor
2861: need_lib_prefix=no
2862: need_version=no
2863: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2864: soname_spec='${libname}${release}${shared_ext}$major'
2865: shlibpath_var=LD_LIBRARY_PATH
2866: shlibpath_overrides_runpath=yes
2867: hardcode_into_libs=yes
2868: # ldd complains unless libraries are executable
2869: postinstall_cmds='chmod +x $lib'
2870: ;;
2871:
2872: sunos4*)
2873: version_type=sunos
2874: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2875: finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2876: shlibpath_var=LD_LIBRARY_PATH
2877: shlibpath_overrides_runpath=yes
2878: if test "$with_gnu_ld" = yes; then
2879: need_lib_prefix=no
2880: fi
2881: need_version=yes
2882: ;;
2883:
2884: sysv4 | sysv4.3*)
2885: version_type=linux # correct to gnu/linux during the next big refactor
2886: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2887: soname_spec='${libname}${release}${shared_ext}$major'
2888: shlibpath_var=LD_LIBRARY_PATH
2889: case $host_vendor in
2890: sni)
2891: shlibpath_overrides_runpath=no
2892: need_lib_prefix=no
2893: runpath_var=LD_RUN_PATH
2894: ;;
2895: siemens)
2896: need_lib_prefix=no
2897: ;;
2898: motorola)
2899: need_lib_prefix=no
2900: need_version=no
2901: shlibpath_overrides_runpath=no
2902: sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2903: ;;
2904: esac
2905: ;;
2906:
2907: sysv4*MP*)
2908: if test -d /usr/nec ;then
2909: version_type=linux # correct to gnu/linux during the next big refactor
2910: library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2911: soname_spec='$libname${shared_ext}.$major'
2912: shlibpath_var=LD_LIBRARY_PATH
2913: fi
2914: ;;
2915:
2916: sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2917: version_type=freebsd-elf
2918: need_lib_prefix=no
2919: need_version=no
2920: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2921: soname_spec='${libname}${release}${shared_ext}$major'
2922: shlibpath_var=LD_LIBRARY_PATH
2923: shlibpath_overrides_runpath=yes
2924: hardcode_into_libs=yes
2925: if test "$with_gnu_ld" = yes; then
2926: sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2927: else
2928: sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2929: case $host_os in
2930: sco3.2v5*)
2931: sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2932: ;;
2933: esac
2934: fi
2935: sys_lib_dlsearch_path_spec='/usr/lib'
2936: ;;
2937:
2938: tpf*)
2939: # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2940: version_type=linux # correct to gnu/linux during the next big refactor
2941: need_lib_prefix=no
2942: need_version=no
2943: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2944: shlibpath_var=LD_LIBRARY_PATH
2945: shlibpath_overrides_runpath=no
2946: hardcode_into_libs=yes
2947: ;;
2948:
2949: uts4*)
2950: version_type=linux # correct to gnu/linux during the next big refactor
2951: library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2952: soname_spec='${libname}${release}${shared_ext}$major'
2953: shlibpath_var=LD_LIBRARY_PATH
2954: ;;
2955:
2956: *)
2957: dynamic_linker=no
2958: ;;
2959: esac
2960: AC_MSG_RESULT([$dynamic_linker])
2961: test "$dynamic_linker" = no && can_build_shared=no
2962:
2963: variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2964: if test "$GCC" = yes; then
2965: variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2966: fi
2967:
2968: if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2969: sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2970: fi
2971: if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2972: sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2973: fi
2974:
2975: _LT_DECL([], [variables_saved_for_relink], [1],
2976: [Variables whose values should be saved in libtool wrapper scripts and
2977: restored at link time])
2978: _LT_DECL([], [need_lib_prefix], [0],
2979: [Do we need the "lib" prefix for modules?])
2980: _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2981: _LT_DECL([], [version_type], [0], [Library versioning type])
2982: _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2983: _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2984: _LT_DECL([], [shlibpath_overrides_runpath], [0],
2985: [Is shlibpath searched before the hard-coded library search path?])
2986: _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2987: _LT_DECL([], [library_names_spec], [1],
2988: [[List of archive names. First name is the real one, the rest are links.
2989: The last name is the one that the linker finds with -lNAME]])
2990: _LT_DECL([], [soname_spec], [1],
2991: [[The coded name of the library, if different from the real name]])
2992: _LT_DECL([], [install_override_mode], [1],
2993: [Permission mode override for installation of shared libraries])
2994: _LT_DECL([], [postinstall_cmds], [2],
2995: [Command to use after installation of a shared archive])
2996: _LT_DECL([], [postuninstall_cmds], [2],
2997: [Command to use after uninstallation of a shared archive])
2998: _LT_DECL([], [finish_cmds], [2],
2999: [Commands used to finish a libtool library installation in a directory])
3000: _LT_DECL([], [finish_eval], [1],
3001: [[As "finish_cmds", except a single script fragment to be evaled but
3002: not shown]])
3003: _LT_DECL([], [hardcode_into_libs], [0],
3004: [Whether we should hardcode library paths into libraries])
3005: _LT_DECL([], [sys_lib_search_path_spec], [2],
3006: [Compile-time system search path for libraries])
3007: _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3008: [Run-time system search path for libraries])
3009: ])# _LT_SYS_DYNAMIC_LINKER
3010:
3011:
3012: # _LT_PATH_TOOL_PREFIX(TOOL)
3013: # --------------------------
3014: # find a file program which can recognize shared library
3015: AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3016: [m4_require([_LT_DECL_EGREP])dnl
3017: AC_MSG_CHECKING([for $1])
3018: AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3019: [case $MAGIC_CMD in
3020: [[\\/*] | ?:[\\/]*])
3021: lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3022: ;;
3023: *)
3024: lt_save_MAGIC_CMD="$MAGIC_CMD"
3025: lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3026: dnl $ac_dummy forces splitting on constant user-supplied paths.
3027: dnl POSIX.2 word splitting is done only on the output of word expansions,
3028: dnl not every word. This closes a longstanding sh security hole.
3029: ac_dummy="m4_if([$2], , $PATH, [$2])"
3030: for ac_dir in $ac_dummy; do
3031: IFS="$lt_save_ifs"
3032: test -z "$ac_dir" && ac_dir=.
3033: if test -f $ac_dir/$1; then
3034: lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3035: if test -n "$file_magic_test_file"; then
3036: case $deplibs_check_method in
3037: "file_magic "*)
3038: file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3039: MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3040: if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3041: $EGREP "$file_magic_regex" > /dev/null; then
3042: :
3043: else
3044: cat <<_LT_EOF 1>&2
3045:
3046: *** Warning: the command libtool uses to detect shared libraries,
3047: *** $file_magic_cmd, produces output that libtool cannot recognize.
3048: *** The result is that libtool may fail to recognize shared libraries
3049: *** as such. This will affect the creation of libtool libraries that
3050: *** depend on shared libraries, but programs linked with such libtool
3051: *** libraries will work regardless of this problem. Nevertheless, you
3052: *** may want to report the problem to your system manager and/or to
3053: *** bug-libtool@gnu.org
3054:
3055: _LT_EOF
3056: fi ;;
3057: esac
3058: fi
3059: break
3060: fi
3061: done
3062: IFS="$lt_save_ifs"
3063: MAGIC_CMD="$lt_save_MAGIC_CMD"
3064: ;;
3065: esac])
3066: MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3067: if test -n "$MAGIC_CMD"; then
3068: AC_MSG_RESULT($MAGIC_CMD)
3069: else
3070: AC_MSG_RESULT(no)
3071: fi
3072: _LT_DECL([], [MAGIC_CMD], [0],
3073: [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3074: ])# _LT_PATH_TOOL_PREFIX
3075:
3076: # Old name:
3077: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3078: dnl aclocal-1.4 backwards compatibility:
3079: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3080:
3081:
3082: # _LT_PATH_MAGIC
3083: # --------------
3084: # find a file program which can recognize a shared library
3085: m4_defun([_LT_PATH_MAGIC],
3086: [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3087: if test -z "$lt_cv_path_MAGIC_CMD"; then
3088: if test -n "$ac_tool_prefix"; then
3089: _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3090: else
3091: MAGIC_CMD=:
3092: fi
3093: fi
3094: ])# _LT_PATH_MAGIC
3095:
3096:
3097: # LT_PATH_LD
3098: # ----------
3099: # find the pathname to the GNU or non-GNU linker
3100: AC_DEFUN([LT_PATH_LD],
3101: [AC_REQUIRE([AC_PROG_CC])dnl
3102: AC_REQUIRE([AC_CANONICAL_HOST])dnl
3103: AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3104: m4_require([_LT_DECL_SED])dnl
3105: m4_require([_LT_DECL_EGREP])dnl
3106: m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3107:
3108: AC_ARG_WITH([gnu-ld],
3109: [AS_HELP_STRING([--with-gnu-ld],
3110: [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3111: [test "$withval" = no || with_gnu_ld=yes],
3112: [with_gnu_ld=no])dnl
3113:
3114: ac_prog=ld
3115: if test "$GCC" = yes; then
3116: # Check if gcc -print-prog-name=ld gives a path.
3117: AC_MSG_CHECKING([for ld used by $CC])
3118: case $host in
3119: *-*-mingw*)
3120: # gcc leaves a trailing carriage return which upsets mingw
3121: ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3122: *)
3123: ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3124: esac
3125: case $ac_prog in
3126: # Accept absolute paths.
3127: [[\\/]]* | ?:[[\\/]]*)
3128: re_direlt='/[[^/]][[^/]]*/\.\./'
3129: # Canonicalize the pathname of ld
3130: ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3131: while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3132: ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3133: done
3134: test -z "$LD" && LD="$ac_prog"
3135: ;;
3136: "")
3137: # If it fails, then pretend we aren't using GCC.
3138: ac_prog=ld
3139: ;;
3140: *)
3141: # If it is relative, then search for the first ld in PATH.
3142: with_gnu_ld=unknown
3143: ;;
3144: esac
3145: elif test "$with_gnu_ld" = yes; then
3146: AC_MSG_CHECKING([for GNU ld])
3147: else
3148: AC_MSG_CHECKING([for non-GNU ld])
3149: fi
3150: AC_CACHE_VAL(lt_cv_path_LD,
3151: [if test -z "$LD"; then
3152: lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3153: for ac_dir in $PATH; do
3154: IFS="$lt_save_ifs"
3155: test -z "$ac_dir" && ac_dir=.
3156: if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3157: lt_cv_path_LD="$ac_dir/$ac_prog"
3158: # Check to see if the program is GNU ld. I'd rather use --version,
3159: # but apparently some variants of GNU ld only accept -v.
3160: # Break only if it was the GNU/non-GNU ld that we prefer.
3161: case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3162: *GNU* | *'with BFD'*)
3163: test "$with_gnu_ld" != no && break
3164: ;;
3165: *)
3166: test "$with_gnu_ld" != yes && break
3167: ;;
3168: esac
3169: fi
3170: done
3171: IFS="$lt_save_ifs"
3172: else
3173: lt_cv_path_LD="$LD" # Let the user override the test with a path.
3174: fi])
3175: LD="$lt_cv_path_LD"
3176: if test -n "$LD"; then
3177: AC_MSG_RESULT($LD)
3178: else
3179: AC_MSG_RESULT(no)
3180: fi
3181: test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3182: _LT_PATH_LD_GNU
3183: AC_SUBST([LD])
3184:
3185: _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3186: ])# LT_PATH_LD
3187:
3188: # Old names:
3189: AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3190: AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3191: dnl aclocal-1.4 backwards compatibility:
3192: dnl AC_DEFUN([AM_PROG_LD], [])
3193: dnl AC_DEFUN([AC_PROG_LD], [])
3194:
3195:
3196: # _LT_PATH_LD_GNU
3197: #- --------------
3198: m4_defun([_LT_PATH_LD_GNU],
3199: [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3200: [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3201: case `$LD -v 2>&1 </dev/null` in
3202: *GNU* | *'with BFD'*)
3203: lt_cv_prog_gnu_ld=yes
3204: ;;
3205: *)
3206: lt_cv_prog_gnu_ld=no
3207: ;;
3208: esac])
3209: with_gnu_ld=$lt_cv_prog_gnu_ld
3210: ])# _LT_PATH_LD_GNU
3211:
3212:
3213: # _LT_CMD_RELOAD
3214: # --------------
3215: # find reload flag for linker
3216: # -- PORTME Some linkers may need a different reload flag.
3217: m4_defun([_LT_CMD_RELOAD],
3218: [AC_CACHE_CHECK([for $LD option to reload object files],
3219: lt_cv_ld_reload_flag,
3220: [lt_cv_ld_reload_flag='-r'])
3221: reload_flag=$lt_cv_ld_reload_flag
3222: case $reload_flag in
3223: "" | " "*) ;;
3224: *) reload_flag=" $reload_flag" ;;
3225: esac
3226: reload_cmds='$LD$reload_flag -o $output$reload_objs'
3227: case $host_os in
3228: cygwin* | mingw* | pw32* | cegcc*)
3229: if test "$GCC" != yes; then
3230: reload_cmds=false
3231: fi
3232: ;;
3233: darwin*)
3234: if test "$GCC" = yes; then
3235: reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3236: else
3237: reload_cmds='$LD$reload_flag -o $output$reload_objs'
3238: fi
3239: ;;
3240: esac
3241: _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3242: _LT_TAGDECL([], [reload_cmds], [2])dnl
3243: ])# _LT_CMD_RELOAD
3244:
3245:
3246: # _LT_CHECK_MAGIC_METHOD
3247: # ----------------------
3248: # how to check for library dependencies
3249: # -- PORTME fill in with the dynamic library characteristics
3250: m4_defun([_LT_CHECK_MAGIC_METHOD],
3251: [m4_require([_LT_DECL_EGREP])
3252: m4_require([_LT_DECL_OBJDUMP])
3253: AC_CACHE_CHECK([how to recognize dependent libraries],
3254: lt_cv_deplibs_check_method,
3255: [lt_cv_file_magic_cmd='$MAGIC_CMD'
3256: lt_cv_file_magic_test_file=
3257: lt_cv_deplibs_check_method='unknown'
3258: # Need to set the preceding variable on all platforms that support
3259: # interlibrary dependencies.
3260: # 'none' -- dependencies not supported.
3261: # `unknown' -- same as none, but documents that we really don't know.
3262: # 'pass_all' -- all dependencies passed with no checks.
3263: # 'test_compile' -- check by making test program.
3264: # 'file_magic [[regex]]' -- check by looking for files in library path
3265: # which responds to the $file_magic_cmd with a given extended regex.
3266: # If you have `file' or equivalent on your system and you're not sure
3267: # whether `pass_all' will *always* work, you probably want this one.
3268:
3269: case $host_os in
3270: aix[[4-9]]*)
3271: lt_cv_deplibs_check_method=pass_all
3272: ;;
3273:
3274: beos*)
3275: lt_cv_deplibs_check_method=pass_all
3276: ;;
3277:
3278: bsdi[[45]]*)
3279: lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3280: lt_cv_file_magic_cmd='/usr/bin/file -L'
3281: lt_cv_file_magic_test_file=/shlib/libc.so
3282: ;;
3283:
3284: cygwin*)
3285: # func_win32_libid is a shell function defined in ltmain.sh
3286: lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3287: lt_cv_file_magic_cmd='func_win32_libid'
3288: ;;
3289:
3290: mingw* | pw32*)
3291: # Base MSYS/MinGW do not provide the 'file' command needed by
3292: # func_win32_libid shell function, so use a weaker test based on 'objdump',
3293: # unless we find 'file', for example because we are cross-compiling.
3294: # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3295: if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3296: lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3297: lt_cv_file_magic_cmd='func_win32_libid'
3298: else
3299: # Keep this pattern in sync with the one in func_win32_libid.
3300: lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3301: lt_cv_file_magic_cmd='$OBJDUMP -f'
3302: fi
3303: ;;
3304:
3305: cegcc*)
3306: # use the weaker test based on 'objdump'. See mingw*.
3307: lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3308: lt_cv_file_magic_cmd='$OBJDUMP -f'
3309: ;;
3310:
3311: darwin* | rhapsody*)
3312: lt_cv_deplibs_check_method=pass_all
3313: ;;
3314:
3315: freebsd* | dragonfly*)
3316: if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3317: case $host_cpu in
3318: i*86 )
3319: # Not sure whether the presence of OpenBSD here was a mistake.
3320: # Let's accept both of them until this is cleared up.
3321: lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3322: lt_cv_file_magic_cmd=/usr/bin/file
3323: lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3324: ;;
3325: esac
3326: else
3327: lt_cv_deplibs_check_method=pass_all
3328: fi
3329: ;;
3330:
3331: gnu*)
3332: lt_cv_deplibs_check_method=pass_all
3333: ;;
3334:
3335: haiku*)
3336: lt_cv_deplibs_check_method=pass_all
3337: ;;
3338:
3339: hpux10.20* | hpux11*)
3340: lt_cv_file_magic_cmd=/usr/bin/file
3341: case $host_cpu in
3342: ia64*)
3343: lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3344: lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3345: ;;
3346: hppa*64*)
3347: [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]']
3348: lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3349: ;;
3350: *)
3351: lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3352: lt_cv_file_magic_test_file=/usr/lib/libc.sl
3353: ;;
3354: esac
3355: ;;
3356:
3357: interix[[3-9]]*)
3358: # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3359: lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3360: ;;
3361:
3362: irix5* | irix6* | nonstopux*)
3363: case $LD in
3364: *-32|*"-32 ") libmagic=32-bit;;
3365: *-n32|*"-n32 ") libmagic=N32;;
3366: *-64|*"-64 ") libmagic=64-bit;;
3367: *) libmagic=never-match;;
3368: esac
3369: lt_cv_deplibs_check_method=pass_all
3370: ;;
3371:
3372: # This must be glibc/ELF.
3373: linux* | k*bsd*-gnu | kopensolaris*-gnu)
3374: lt_cv_deplibs_check_method=pass_all
3375: ;;
3376:
3377: netbsd*)
3378: if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3379: lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3380: else
3381: lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3382: fi
3383: ;;
3384:
3385: newos6*)
3386: lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3387: lt_cv_file_magic_cmd=/usr/bin/file
3388: lt_cv_file_magic_test_file=/usr/lib/libnls.so
3389: ;;
3390:
3391: *nto* | *qnx*)
3392: lt_cv_deplibs_check_method=pass_all
3393: ;;
3394:
3395: openbsd*)
3396: if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3397: lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3398: else
3399: lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3400: fi
3401: ;;
3402:
3403: osf3* | osf4* | osf5*)
3404: lt_cv_deplibs_check_method=pass_all
3405: ;;
3406:
3407: rdos*)
3408: lt_cv_deplibs_check_method=pass_all
3409: ;;
3410:
3411: solaris*)
3412: lt_cv_deplibs_check_method=pass_all
3413: ;;
3414:
3415: sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3416: lt_cv_deplibs_check_method=pass_all
3417: ;;
3418:
3419: sysv4 | sysv4.3*)
3420: case $host_vendor in
3421: motorola)
3422: 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]]'
3423: lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3424: ;;
3425: ncr)
3426: lt_cv_deplibs_check_method=pass_all
3427: ;;
3428: sequent)
3429: lt_cv_file_magic_cmd='/bin/file'
3430: lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3431: ;;
3432: sni)
3433: lt_cv_file_magic_cmd='/bin/file'
3434: lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3435: lt_cv_file_magic_test_file=/lib/libc.so
3436: ;;
3437: siemens)
3438: lt_cv_deplibs_check_method=pass_all
3439: ;;
3440: pc)
3441: lt_cv_deplibs_check_method=pass_all
3442: ;;
3443: esac
3444: ;;
3445:
3446: tpf*)
3447: lt_cv_deplibs_check_method=pass_all
3448: ;;
3449: esac
3450: ])
3451:
3452: file_magic_glob=
3453: want_nocaseglob=no
3454: if test "$build" = "$host"; then
3455: case $host_os in
3456: mingw* | pw32*)
3457: if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3458: want_nocaseglob=yes
3459: else
3460: file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3461: fi
3462: ;;
3463: esac
3464: fi
3465:
3466: file_magic_cmd=$lt_cv_file_magic_cmd
3467: deplibs_check_method=$lt_cv_deplibs_check_method
3468: test -z "$deplibs_check_method" && deplibs_check_method=unknown
3469:
3470: _LT_DECL([], [deplibs_check_method], [1],
3471: [Method to check whether dependent libraries are shared objects])
3472: _LT_DECL([], [file_magic_cmd], [1],
3473: [Command to use when deplibs_check_method = "file_magic"])
3474: _LT_DECL([], [file_magic_glob], [1],
3475: [How to find potential files when deplibs_check_method = "file_magic"])
3476: _LT_DECL([], [want_nocaseglob], [1],
3477: [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3478: ])# _LT_CHECK_MAGIC_METHOD
3479:
3480:
3481: # LT_PATH_NM
3482: # ----------
3483: # find the pathname to a BSD- or MS-compatible name lister
3484: AC_DEFUN([LT_PATH_NM],
3485: [AC_REQUIRE([AC_PROG_CC])dnl
3486: AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3487: [if test -n "$NM"; then
3488: # Let the user override the test.
3489: lt_cv_path_NM="$NM"
3490: else
3491: lt_nm_to_check="${ac_tool_prefix}nm"
3492: if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3493: lt_nm_to_check="$lt_nm_to_check nm"
3494: fi
3495: for lt_tmp_nm in $lt_nm_to_check; do
3496: lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3497: for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3498: IFS="$lt_save_ifs"
3499: test -z "$ac_dir" && ac_dir=.
3500: tmp_nm="$ac_dir/$lt_tmp_nm"
3501: if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3502: # Check to see if the nm accepts a BSD-compat flag.
3503: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3504: # nm: unknown option "B" ignored
3505: # Tru64's nm complains that /dev/null is an invalid object file
3506: case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3507: */dev/null* | *'Invalid file or object type'*)
3508: lt_cv_path_NM="$tmp_nm -B"
3509: break
3510: ;;
3511: *)
3512: case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3513: */dev/null*)
3514: lt_cv_path_NM="$tmp_nm -p"
3515: break
3516: ;;
3517: *)
3518: lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3519: continue # so that we can try to find one that supports BSD flags
3520: ;;
3521: esac
3522: ;;
3523: esac
3524: fi
3525: done
3526: IFS="$lt_save_ifs"
3527: done
3528: : ${lt_cv_path_NM=no}
3529: fi])
3530: if test "$lt_cv_path_NM" != "no"; then
3531: NM="$lt_cv_path_NM"
3532: else
3533: # Didn't find any BSD compatible name lister, look for dumpbin.
3534: if test -n "$DUMPBIN"; then :
3535: # Let the user override the test.
3536: else
3537: AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3538: case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3539: *COFF*)
3540: DUMPBIN="$DUMPBIN -symbols"
3541: ;;
3542: *)
3543: DUMPBIN=:
3544: ;;
3545: esac
3546: fi
3547: AC_SUBST([DUMPBIN])
3548: if test "$DUMPBIN" != ":"; then
3549: NM="$DUMPBIN"
3550: fi
3551: fi
3552: test -z "$NM" && NM=nm
3553: AC_SUBST([NM])
3554: _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3555:
3556: AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3557: [lt_cv_nm_interface="BSD nm"
3558: echo "int some_variable = 0;" > conftest.$ac_ext
3559: (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3560: (eval "$ac_compile" 2>conftest.err)
3561: cat conftest.err >&AS_MESSAGE_LOG_FD
3562: (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3563: (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3564: cat conftest.err >&AS_MESSAGE_LOG_FD
3565: (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3566: cat conftest.out >&AS_MESSAGE_LOG_FD
3567: if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3568: lt_cv_nm_interface="MS dumpbin"
3569: fi
3570: rm -f conftest*])
3571: ])# LT_PATH_NM
3572:
3573: # Old names:
3574: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3575: AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3576: dnl aclocal-1.4 backwards compatibility:
3577: dnl AC_DEFUN([AM_PROG_NM], [])
3578: dnl AC_DEFUN([AC_PROG_NM], [])
3579:
3580: # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3581: # --------------------------------
3582: # how to determine the name of the shared library
3583: # associated with a specific link library.
3584: # -- PORTME fill in with the dynamic library characteristics
3585: m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3586: [m4_require([_LT_DECL_EGREP])
3587: m4_require([_LT_DECL_OBJDUMP])
3588: m4_require([_LT_DECL_DLLTOOL])
3589: AC_CACHE_CHECK([how to associate runtime and link libraries],
3590: lt_cv_sharedlib_from_linklib_cmd,
3591: [lt_cv_sharedlib_from_linklib_cmd='unknown'
3592:
3593: case $host_os in
3594: cygwin* | mingw* | pw32* | cegcc*)
3595: # two different shell functions defined in ltmain.sh
3596: # decide which to use based on capabilities of $DLLTOOL
3597: case `$DLLTOOL --help 2>&1` in
3598: *--identify-strict*)
3599: lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3600: ;;
3601: *)
3602: lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3603: ;;
3604: esac
3605: ;;
3606: *)
3607: # fallback: assume linklib IS sharedlib
3608: lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3609: ;;
3610: esac
3611: ])
3612: sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3613: test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3614:
3615: _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3616: [Command to associate shared and link libraries])
3617: ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3618:
3619:
3620: # _LT_PATH_MANIFEST_TOOL
3621: # ----------------------
3622: # locate the manifest tool
3623: m4_defun([_LT_PATH_MANIFEST_TOOL],
3624: [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3625: test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3626: AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3627: [lt_cv_path_mainfest_tool=no
3628: echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3629: $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3630: cat conftest.err >&AS_MESSAGE_LOG_FD
3631: if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3632: lt_cv_path_mainfest_tool=yes
3633: fi
3634: rm -f conftest*])
3635: if test "x$lt_cv_path_mainfest_tool" != xyes; then
3636: MANIFEST_TOOL=:
3637: fi
3638: _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3639: ])# _LT_PATH_MANIFEST_TOOL
3640:
3641:
3642: # LT_LIB_M
3643: # --------
3644: # check for math library
3645: AC_DEFUN([LT_LIB_M],
3646: [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3647: LIBM=
3648: case $host in
3649: *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3650: # These system don't have libm, or don't need it
3651: ;;
3652: *-ncr-sysv4.3*)
3653: AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3654: AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3655: ;;
3656: *)
3657: AC_CHECK_LIB(m, cos, LIBM="-lm")
3658: ;;
3659: esac
3660: AC_SUBST([LIBM])
3661: ])# LT_LIB_M
3662:
3663: # Old name:
3664: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3665: dnl aclocal-1.4 backwards compatibility:
3666: dnl AC_DEFUN([AC_CHECK_LIBM], [])
3667:
3668:
3669: # _LT_COMPILER_NO_RTTI([TAGNAME])
3670: # -------------------------------
3671: m4_defun([_LT_COMPILER_NO_RTTI],
3672: [m4_require([_LT_TAG_COMPILER])dnl
3673:
3674: _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3675:
3676: if test "$GCC" = yes; then
3677: case $cc_basename in
3678: nvcc*)
3679: _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3680: *)
3681: _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3682: esac
3683:
3684: _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3685: lt_cv_prog_compiler_rtti_exceptions,
3686: [-fno-rtti -fno-exceptions], [],
3687: [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3688: fi
3689: _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3690: [Compiler flag to turn off builtin functions])
3691: ])# _LT_COMPILER_NO_RTTI
3692:
3693:
3694: # _LT_CMD_GLOBAL_SYMBOLS
3695: # ----------------------
3696: m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3697: [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3698: AC_REQUIRE([AC_PROG_CC])dnl
3699: AC_REQUIRE([AC_PROG_AWK])dnl
3700: AC_REQUIRE([LT_PATH_NM])dnl
3701: AC_REQUIRE([LT_PATH_LD])dnl
3702: m4_require([_LT_DECL_SED])dnl
3703: m4_require([_LT_DECL_EGREP])dnl
3704: m4_require([_LT_TAG_COMPILER])dnl
3705:
3706: # Check for command to grab the raw symbol name followed by C symbol from nm.
3707: AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3708: AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3709: [
3710: # These are sane defaults that work on at least a few old systems.
3711: # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3712:
3713: # Character class describing NM global symbol codes.
3714: symcode='[[BCDEGRST]]'
3715:
3716: # Regexp to match symbols that can be accessed directly from C.
3717: sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3718:
3719: # Define system-specific variables.
3720: case $host_os in
3721: aix*)
3722: symcode='[[BCDT]]'
3723: ;;
3724: cygwin* | mingw* | pw32* | cegcc*)
3725: symcode='[[ABCDGISTW]]'
3726: ;;
3727: hpux*)
3728: if test "$host_cpu" = ia64; then
3729: symcode='[[ABCDEGRST]]'
3730: fi
3731: ;;
3732: irix* | nonstopux*)
3733: symcode='[[BCDEGRST]]'
3734: ;;
3735: osf*)
3736: symcode='[[BCDEGQRST]]'
3737: ;;
3738: solaris*)
3739: symcode='[[BDRT]]'
3740: ;;
3741: sco3.2v5*)
3742: symcode='[[DT]]'
3743: ;;
3744: sysv4.2uw2*)
3745: symcode='[[DT]]'
3746: ;;
3747: sysv5* | sco5v6* | unixware* | OpenUNIX*)
3748: symcode='[[ABDT]]'
3749: ;;
3750: sysv4)
3751: symcode='[[DFNSTU]]'
3752: ;;
3753: esac
3754:
3755: # If we're using GNU nm, then use its standard symbol codes.
3756: case `$NM -V 2>&1` in
3757: *GNU* | *'with BFD'*)
3758: symcode='[[ABCDGIRSTW]]' ;;
3759: esac
3760:
3761: # Transform an extracted symbol line into a proper C declaration.
3762: # Some systems (esp. on ia64) link data and code symbols differently,
3763: # so use this general approach.
3764: lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3765:
3766: # Transform an extracted symbol line into symbol name and symbol address
3767: lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3768: 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'"
3769:
3770: # Handle CRLF in mingw tool chain
3771: opt_cr=
3772: case $build_os in
3773: mingw*)
3774: opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3775: ;;
3776: esac
3777:
3778: # Try without a prefix underscore, then with it.
3779: for ac_symprfx in "" "_"; do
3780:
3781: # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3782: symxfrm="\\1 $ac_symprfx\\2 \\2"
3783:
3784: # Write the raw and C identifiers.
3785: if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3786: # Fake it for dumpbin and say T for any non-static function
3787: # and D for any global variable.
3788: # Also find C++ and __fastcall symbols from MSVC++,
3789: # which start with @ or ?.
3790: lt_cv_sys_global_symbol_pipe="$AWK ['"\
3791: " {last_section=section; section=\$ 3};"\
3792: " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
3793: " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3794: " \$ 0!~/External *\|/{next};"\
3795: " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3796: " {if(hide[section]) next};"\
3797: " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3798: " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3799: " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3800: " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3801: " ' prfx=^$ac_symprfx]"
3802: else
3803: lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3804: fi
3805: lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3806:
3807: # Check to see that the pipe works correctly.
3808: pipe_works=no
3809:
3810: rm -f conftest*
3811: cat > conftest.$ac_ext <<_LT_EOF
3812: #ifdef __cplusplus
3813: extern "C" {
3814: #endif
3815: char nm_test_var;
3816: void nm_test_func(void);
3817: void nm_test_func(void){}
3818: #ifdef __cplusplus
3819: }
3820: #endif
3821: int main(){nm_test_var='a';nm_test_func();return(0);}
3822: _LT_EOF
3823:
3824: if AC_TRY_EVAL(ac_compile); then
3825: # Now try to grab the symbols.
3826: nlist=conftest.nm
3827: if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3828: # Try sorting and uniquifying the output.
3829: if sort "$nlist" | uniq > "$nlist"T; then
3830: mv -f "$nlist"T "$nlist"
3831: else
3832: rm -f "$nlist"T
3833: fi
3834:
3835: # Make sure that we snagged all the symbols we need.
3836: if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3837: if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3838: cat <<_LT_EOF > conftest.$ac_ext
3839: /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3840: #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3841: /* DATA imports from DLLs on WIN32 con't be const, because runtime
3842: relocations are performed -- see ld's documentation on pseudo-relocs. */
3843: # define LT@&t@_DLSYM_CONST
3844: #elif defined(__osf__)
3845: /* This system does not cope well with relocations in const data. */
3846: # define LT@&t@_DLSYM_CONST
3847: #else
3848: # define LT@&t@_DLSYM_CONST const
3849: #endif
3850:
3851: #ifdef __cplusplus
3852: extern "C" {
3853: #endif
3854:
3855: _LT_EOF
3856: # Now generate the symbol file.
3857: eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3858:
3859: cat <<_LT_EOF >> conftest.$ac_ext
3860:
3861: /* The mapping between symbol names and symbols. */
3862: LT@&t@_DLSYM_CONST struct {
3863: const char *name;
3864: void *address;
3865: }
3866: lt__PROGRAM__LTX_preloaded_symbols[[]] =
3867: {
3868: { "@PROGRAM@", (void *) 0 },
3869: _LT_EOF
3870: $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3871: cat <<\_LT_EOF >> conftest.$ac_ext
3872: {0, (void *) 0}
3873: };
3874:
3875: /* This works around a problem in FreeBSD linker */
3876: #ifdef FREEBSD_WORKAROUND
3877: static const void *lt_preloaded_setup() {
3878: return lt__PROGRAM__LTX_preloaded_symbols;
3879: }
3880: #endif
3881:
3882: #ifdef __cplusplus
3883: }
3884: #endif
3885: _LT_EOF
3886: # Now try linking the two files.
3887: mv conftest.$ac_objext conftstm.$ac_objext
3888: lt_globsym_save_LIBS=$LIBS
3889: lt_globsym_save_CFLAGS=$CFLAGS
3890: LIBS="conftstm.$ac_objext"
3891: CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3892: if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3893: pipe_works=yes
3894: fi
3895: LIBS=$lt_globsym_save_LIBS
3896: CFLAGS=$lt_globsym_save_CFLAGS
3897: else
3898: echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3899: fi
3900: else
3901: echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3902: fi
3903: else
3904: echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3905: fi
3906: else
3907: echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3908: cat conftest.$ac_ext >&5
3909: fi
3910: rm -rf conftest* conftst*
3911:
3912: # Do not use the global_symbol_pipe unless it works.
3913: if test "$pipe_works" = yes; then
3914: break
3915: else
3916: lt_cv_sys_global_symbol_pipe=
3917: fi
3918: done
3919: ])
3920: if test -z "$lt_cv_sys_global_symbol_pipe"; then
3921: lt_cv_sys_global_symbol_to_cdecl=
3922: fi
3923: if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3924: AC_MSG_RESULT(failed)
3925: else
3926: AC_MSG_RESULT(ok)
3927: fi
3928:
3929: # Response file support.
3930: if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3931: nm_file_list_spec='@'
3932: elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3933: nm_file_list_spec='@'
3934: fi
3935:
3936: _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3937: [Take the output of nm and produce a listing of raw symbols and C names])
3938: _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3939: [Transform the output of nm in a proper C declaration])
3940: _LT_DECL([global_symbol_to_c_name_address],
3941: [lt_cv_sys_global_symbol_to_c_name_address], [1],
3942: [Transform the output of nm in a C name address pair])
3943: _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3944: [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3945: [Transform the output of nm in a C name address pair when lib prefix is needed])
3946: _LT_DECL([], [nm_file_list_spec], [1],
3947: [Specify filename containing input files for $NM])
3948: ]) # _LT_CMD_GLOBAL_SYMBOLS
3949:
3950:
3951: # _LT_COMPILER_PIC([TAGNAME])
3952: # ---------------------------
3953: m4_defun([_LT_COMPILER_PIC],
3954: [m4_require([_LT_TAG_COMPILER])dnl
3955: _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3956: _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3957: _LT_TAGVAR(lt_prog_compiler_static, $1)=
3958:
3959: m4_if([$1], [CXX], [
3960: # C++ specific cases for pic, static, wl, etc.
3961: if test "$GXX" = yes; then
3962: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3963: _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3964:
3965: case $host_os in
3966: aix*)
3967: # All AIX code is PIC.
3968: if test "$host_cpu" = ia64; then
3969: # AIX 5 now supports IA64 processor
3970: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3971: fi
3972: ;;
3973:
3974: amigaos*)
3975: case $host_cpu in
3976: powerpc)
3977: # see comment about AmigaOS4 .so support
3978: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3979: ;;
3980: m68k)
3981: # FIXME: we need at least 68020 code to build shared libraries, but
3982: # adding the `-m68020' flag to GCC prevents building anything better,
3983: # like `-m68040'.
3984: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3985: ;;
3986: esac
3987: ;;
3988:
3989: beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3990: # PIC is the default for these OSes.
3991: ;;
3992: mingw* | cygwin* | os2* | pw32* | cegcc*)
3993: # This hack is so that the source file can tell whether it is being
3994: # built for inclusion in a dll (and should export symbols for example).
3995: # Although the cygwin gcc ignores -fPIC, still need this for old-style
3996: # (--disable-auto-import) libraries
3997: m4_if([$1], [GCJ], [],
3998: [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3999: ;;
4000: darwin* | rhapsody*)
4001: # PIC is the default on this platform
4002: # Common symbols not allowed in MH_DYLIB files
4003: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4004: ;;
4005: *djgpp*)
4006: # DJGPP does not support shared libraries at all
4007: _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4008: ;;
4009: haiku*)
4010: # PIC is the default for Haiku.
4011: # The "-static" flag exists, but is broken.
4012: _LT_TAGVAR(lt_prog_compiler_static, $1)=
4013: ;;
4014: interix[[3-9]]*)
4015: # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4016: # Instead, we relocate shared libraries at runtime.
4017: ;;
4018: sysv4*MP*)
4019: if test -d /usr/nec; then
4020: _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4021: fi
4022: ;;
4023: hpux*)
4024: # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4025: # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4026: # sets the default TLS model and affects inlining.
4027: case $host_cpu in
4028: hppa*64*)
4029: ;;
4030: *)
4031: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4032: ;;
4033: esac
4034: ;;
4035: *qnx* | *nto*)
4036: # QNX uses GNU C++, but need to define -shared option too, otherwise
4037: # it will coredump.
4038: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4039: ;;
4040: *)
4041: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4042: ;;
4043: esac
4044: else
4045: case $host_os in
4046: aix[[4-9]]*)
4047: # All AIX code is PIC.
4048: if test "$host_cpu" = ia64; then
4049: # AIX 5 now supports IA64 processor
4050: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4051: else
4052: _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4053: fi
4054: ;;
4055: chorus*)
4056: case $cc_basename in
4057: cxch68*)
4058: # Green Hills C++ Compiler
4059: # _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"
4060: ;;
4061: esac
4062: ;;
4063: mingw* | cygwin* | os2* | pw32* | cegcc*)
4064: # This hack is so that the source file can tell whether it is being
4065: # built for inclusion in a dll (and should export symbols for example).
4066: m4_if([$1], [GCJ], [],
4067: [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4068: ;;
4069: dgux*)
4070: case $cc_basename in
4071: ec++*)
4072: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4073: ;;
4074: ghcx*)
4075: # Green Hills C++ Compiler
4076: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4077: ;;
4078: *)
4079: ;;
4080: esac
4081: ;;
4082: freebsd* | dragonfly*)
4083: # FreeBSD uses GNU C++
4084: ;;
4085: hpux9* | hpux10* | hpux11*)
4086: case $cc_basename in
4087: CC*)
4088: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4089: _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4090: if test "$host_cpu" != ia64; then
4091: _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4092: fi
4093: ;;
4094: aCC*)
4095: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4096: _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4097: case $host_cpu in
4098: hppa*64*|ia64*)
4099: # +Z the default
4100: ;;
4101: *)
4102: _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4103: ;;
4104: esac
4105: ;;
4106: *)
4107: ;;
4108: esac
4109: ;;
4110: interix*)
4111: # This is c89, which is MS Visual C++ (no shared libs)
4112: # Anyone wants to do a port?
4113: ;;
4114: irix5* | irix6* | nonstopux*)
4115: case $cc_basename in
4116: CC*)
4117: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4118: _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4119: # CC pic flag -KPIC is the default.
4120: ;;
4121: *)
4122: ;;
4123: esac
4124: ;;
4125: linux* | k*bsd*-gnu | kopensolaris*-gnu)
4126: case $cc_basename in
4127: KCC*)
4128: # KAI C++ Compiler
4129: _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4130: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4131: ;;
4132: ecpc* )
4133: # old Intel C++ for x86_64 which still supported -KPIC.
4134: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4135: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4136: _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4137: ;;
4138: icpc* )
4139: # Intel C++, used to be incompatible with GCC.
4140: # ICC 10 doesn't accept -KPIC any more.
4141: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4142: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4143: _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4144: ;;
4145: pgCC* | pgcpp*)
4146: # Portland Group C++ compiler
4147: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4148: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4149: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4150: ;;
4151: cxx*)
4152: # Compaq C++
4153: # Make sure the PIC flag is empty. It appears that all Alpha
4154: # Linux and Compaq Tru64 Unix objects are PIC.
4155: _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4156: _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4157: ;;
4158: xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4159: # IBM XL 8.0, 9.0 on PPC and BlueGene
4160: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4161: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4162: _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4163: ;;
4164: *)
4165: case `$CC -V 2>&1 | sed 5q` in
4166: *Sun\ C*)
4167: # Sun C++ 5.9
4168: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4169: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4170: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4171: ;;
4172: esac
4173: ;;
4174: esac
4175: ;;
4176: lynxos*)
4177: ;;
4178: m88k*)
4179: ;;
4180: mvs*)
4181: case $cc_basename in
4182: cxx*)
4183: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4184: ;;
4185: *)
4186: ;;
4187: esac
4188: ;;
4189: netbsd*)
4190: ;;
4191: *qnx* | *nto*)
4192: # QNX uses GNU C++, but need to define -shared option too, otherwise
4193: # it will coredump.
4194: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4195: ;;
4196: osf3* | osf4* | osf5*)
4197: case $cc_basename in
4198: KCC*)
4199: _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4200: ;;
4201: RCC*)
4202: # Rational C++ 2.4.1
4203: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4204: ;;
4205: cxx*)
4206: # Digital/Compaq C++
4207: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4208: # Make sure the PIC flag is empty. It appears that all Alpha
4209: # Linux and Compaq Tru64 Unix objects are PIC.
4210: _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4211: _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4212: ;;
4213: *)
4214: ;;
4215: esac
4216: ;;
4217: psos*)
4218: ;;
4219: solaris*)
4220: case $cc_basename in
4221: CC* | sunCC*)
4222: # Sun C++ 4.2, 5.x and Centerline C++
4223: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4224: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4225: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4226: ;;
4227: gcx*)
4228: # Green Hills C++ Compiler
4229: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4230: ;;
4231: *)
4232: ;;
4233: esac
4234: ;;
4235: sunos4*)
4236: case $cc_basename in
4237: CC*)
4238: # Sun C++ 4.x
4239: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4240: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4241: ;;
4242: lcc*)
4243: # Lucid
4244: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4245: ;;
4246: *)
4247: ;;
4248: esac
4249: ;;
4250: sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4251: case $cc_basename in
4252: CC*)
4253: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4254: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4255: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4256: ;;
4257: esac
4258: ;;
4259: tandem*)
4260: case $cc_basename in
4261: NCC*)
4262: # NonStop-UX NCC 3.20
4263: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4264: ;;
4265: *)
4266: ;;
4267: esac
4268: ;;
4269: vxworks*)
4270: ;;
4271: *)
4272: _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4273: ;;
4274: esac
4275: fi
4276: ],
4277: [
4278: if test "$GCC" = yes; then
4279: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4280: _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4281:
4282: case $host_os in
4283: aix*)
4284: # All AIX code is PIC.
4285: if test "$host_cpu" = ia64; then
4286: # AIX 5 now supports IA64 processor
4287: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4288: fi
4289: ;;
4290:
4291: amigaos*)
4292: case $host_cpu in
4293: powerpc)
4294: # see comment about AmigaOS4 .so support
4295: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4296: ;;
4297: m68k)
4298: # FIXME: we need at least 68020 code to build shared libraries, but
4299: # adding the `-m68020' flag to GCC prevents building anything better,
4300: # like `-m68040'.
4301: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4302: ;;
4303: esac
4304: ;;
4305:
4306: beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4307: # PIC is the default for these OSes.
4308: ;;
4309:
4310: mingw* | cygwin* | pw32* | os2* | cegcc*)
4311: # This hack is so that the source file can tell whether it is being
4312: # built for inclusion in a dll (and should export symbols for example).
4313: # Although the cygwin gcc ignores -fPIC, still need this for old-style
4314: # (--disable-auto-import) libraries
4315: m4_if([$1], [GCJ], [],
4316: [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4317: ;;
4318:
4319: darwin* | rhapsody*)
4320: # PIC is the default on this platform
4321: # Common symbols not allowed in MH_DYLIB files
4322: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4323: ;;
4324:
4325: haiku*)
4326: # PIC is the default for Haiku.
4327: # The "-static" flag exists, but is broken.
4328: _LT_TAGVAR(lt_prog_compiler_static, $1)=
4329: ;;
4330:
4331: hpux*)
4332: # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4333: # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4334: # sets the default TLS model and affects inlining.
4335: case $host_cpu in
4336: hppa*64*)
4337: # +Z the default
4338: ;;
4339: *)
4340: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4341: ;;
4342: esac
4343: ;;
4344:
4345: interix[[3-9]]*)
4346: # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4347: # Instead, we relocate shared libraries at runtime.
4348: ;;
4349:
4350: msdosdjgpp*)
4351: # Just because we use GCC doesn't mean we suddenly get shared libraries
4352: # on systems that don't support them.
4353: _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4354: enable_shared=no
4355: ;;
4356:
4357: *nto* | *qnx*)
4358: # QNX uses GNU C++, but need to define -shared option too, otherwise
4359: # it will coredump.
4360: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4361: ;;
4362:
4363: sysv4*MP*)
4364: if test -d /usr/nec; then
4365: _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4366: fi
4367: ;;
4368:
4369: *)
4370: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4371: ;;
4372: esac
4373:
4374: case $cc_basename in
4375: nvcc*) # Cuda Compiler Driver 2.2
4376: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4377: if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4378: _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4379: fi
4380: ;;
4381: esac
4382: else
4383: # PORTME Check for flag to pass linker flags through the system compiler.
4384: case $host_os in
4385: aix*)
4386: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4387: if test "$host_cpu" = ia64; then
4388: # AIX 5 now supports IA64 processor
4389: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4390: else
4391: _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4392: fi
4393: ;;
4394:
4395: mingw* | cygwin* | pw32* | os2* | cegcc*)
4396: # This hack is so that the source file can tell whether it is being
4397: # built for inclusion in a dll (and should export symbols for example).
4398: m4_if([$1], [GCJ], [],
4399: [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4400: ;;
4401:
4402: hpux9* | hpux10* | hpux11*)
4403: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4404: # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4405: # not for PA HP-UX.
4406: case $host_cpu in
4407: hppa*64*|ia64*)
4408: # +Z the default
4409: ;;
4410: *)
4411: _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4412: ;;
4413: esac
4414: # Is there a better lt_prog_compiler_static that works with the bundled CC?
4415: _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4416: ;;
4417:
4418: irix5* | irix6* | nonstopux*)
4419: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4420: # PIC (with -KPIC) is the default.
4421: _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4422: ;;
4423:
4424: linux* | k*bsd*-gnu | kopensolaris*-gnu)
4425: case $cc_basename in
4426: # old Intel for x86_64 which still supported -KPIC.
4427: ecc*)
4428: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4429: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4430: _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4431: ;;
4432: # icc used to be incompatible with GCC.
4433: # ICC 10 doesn't accept -KPIC any more.
4434: icc* | ifort*)
4435: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4436: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4437: _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4438: ;;
4439: # Lahey Fortran 8.1.
4440: lf95*)
4441: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4442: _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4443: _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4444: ;;
4445: nagfor*)
4446: # NAG Fortran compiler
4447: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4448: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4449: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4450: ;;
4451: pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4452: # Portland Group compilers (*not* the Pentium gcc compiler,
4453: # which looks to be a dead project)
4454: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4455: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4456: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4457: ;;
4458: ccc*)
4459: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4460: # All Alpha code is PIC.
4461: _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4462: ;;
4463: xl* | bgxl* | bgf* | mpixl*)
4464: # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4465: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4466: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4467: _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4468: ;;
4469: *)
4470: case `$CC -V 2>&1 | sed 5q` in
4471: *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4472: # Sun Fortran 8.3 passes all unrecognized flags to the linker
4473: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4474: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4475: _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4476: ;;
4477: *Sun\ F* | *Sun*Fortran*)
4478: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4479: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4480: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4481: ;;
4482: *Sun\ C*)
4483: # Sun C 5.9
4484: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4485: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4486: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4487: ;;
4488: *Intel*\ [[CF]]*Compiler*)
4489: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4490: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4491: _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4492: ;;
4493: *Portland\ Group*)
4494: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4495: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4496: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4497: ;;
4498: esac
4499: ;;
4500: esac
4501: ;;
4502:
4503: newsos6)
4504: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4505: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4506: ;;
4507:
4508: *nto* | *qnx*)
4509: # QNX uses GNU C++, but need to define -shared option too, otherwise
4510: # it will coredump.
4511: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4512: ;;
4513:
4514: osf3* | osf4* | osf5*)
4515: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4516: # All OSF/1 code is PIC.
4517: _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4518: ;;
4519:
4520: rdos*)
4521: _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4522: ;;
4523:
4524: solaris*)
4525: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4526: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4527: case $cc_basename in
4528: f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4529: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4530: *)
4531: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4532: esac
4533: ;;
4534:
4535: sunos4*)
4536: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4537: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4538: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4539: ;;
4540:
4541: sysv4 | sysv4.2uw2* | sysv4.3*)
4542: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4543: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4544: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4545: ;;
4546:
4547: sysv4*MP*)
4548: if test -d /usr/nec ;then
4549: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4550: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4551: fi
4552: ;;
4553:
4554: sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4555: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4556: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4557: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4558: ;;
4559:
4560: unicos*)
4561: _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4562: _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4563: ;;
4564:
4565: uts4*)
4566: _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4567: _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4568: ;;
4569:
4570: *)
4571: _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4572: ;;
4573: esac
4574: fi
4575: ])
4576: case $host_os in
4577: # For platforms which do not support PIC, -DPIC is meaningless:
4578: *djgpp*)
4579: _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4580: ;;
4581: *)
4582: _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4583: ;;
4584: esac
4585:
4586: AC_CACHE_CHECK([for $compiler option to produce PIC],
4587: [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4588: [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4589: _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4590:
4591: #
4592: # Check to make sure the PIC flag actually works.
4593: #
4594: if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4595: _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4596: [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4597: [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4598: [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4599: "" | " "*) ;;
4600: *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4601: esac],
4602: [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4603: _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4604: fi
4605: _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4606: [Additional compiler flags for building library objects])
4607:
4608: _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4609: [How to pass a linker flag through the compiler])
4610: #
4611: # Check to make sure the static flag actually works.
4612: #
4613: wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4614: _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4615: _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4616: $lt_tmp_static_flag,
4617: [],
4618: [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4619: _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4620: [Compiler flag to prevent dynamic linking])
4621: ])# _LT_COMPILER_PIC
4622:
4623:
4624: # _LT_LINKER_SHLIBS([TAGNAME])
4625: # ----------------------------
4626: # See if the linker supports building shared libraries.
4627: m4_defun([_LT_LINKER_SHLIBS],
4628: [AC_REQUIRE([LT_PATH_LD])dnl
4629: AC_REQUIRE([LT_PATH_NM])dnl
4630: m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4631: m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4632: m4_require([_LT_DECL_EGREP])dnl
4633: m4_require([_LT_DECL_SED])dnl
4634: m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4635: m4_require([_LT_TAG_COMPILER])dnl
4636: AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4637: m4_if([$1], [CXX], [
4638: _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4639: _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4640: case $host_os in
4641: aix[[4-9]]*)
4642: # If we're using GNU nm, then we don't want the "-C" option.
4643: # -C means demangle to AIX nm, but means don't demangle with GNU nm
4644: # Also, AIX nm treats weak defined symbols like other global defined
4645: # symbols, whereas GNU nm marks them as "W".
4646: if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4647: _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4648: else
4649: _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4650: fi
4651: ;;
4652: pw32*)
4653: _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4654: ;;
4655: cygwin* | mingw* | cegcc*)
4656: case $cc_basename in
4657: cl*)
4658: _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4659: ;;
4660: *)
4661: _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4662: _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4663: ;;
4664: esac
4665: ;;
4666: *)
4667: _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4668: ;;
4669: esac
4670: ], [
4671: runpath_var=
4672: _LT_TAGVAR(allow_undefined_flag, $1)=
4673: _LT_TAGVAR(always_export_symbols, $1)=no
4674: _LT_TAGVAR(archive_cmds, $1)=
4675: _LT_TAGVAR(archive_expsym_cmds, $1)=
4676: _LT_TAGVAR(compiler_needs_object, $1)=no
4677: _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4678: _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4679: _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4680: _LT_TAGVAR(hardcode_automatic, $1)=no
4681: _LT_TAGVAR(hardcode_direct, $1)=no
4682: _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4683: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4684: _LT_TAGVAR(hardcode_libdir_separator, $1)=
4685: _LT_TAGVAR(hardcode_minus_L, $1)=no
4686: _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4687: _LT_TAGVAR(inherit_rpath, $1)=no
4688: _LT_TAGVAR(link_all_deplibs, $1)=unknown
4689: _LT_TAGVAR(module_cmds, $1)=
4690: _LT_TAGVAR(module_expsym_cmds, $1)=
4691: _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4692: _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4693: _LT_TAGVAR(thread_safe_flag_spec, $1)=
4694: _LT_TAGVAR(whole_archive_flag_spec, $1)=
4695: # include_expsyms should be a list of space-separated symbols to be *always*
4696: # included in the symbol list
4697: _LT_TAGVAR(include_expsyms, $1)=
4698: # exclude_expsyms can be an extended regexp of symbols to exclude
4699: # it will be wrapped by ` (' and `)$', so one must not match beginning or
4700: # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4701: # as well as any symbol that contains `d'.
4702: _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4703: # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4704: # platforms (ab)use it in PIC code, but their linkers get confused if
4705: # the symbol is explicitly referenced. Since portable code cannot
4706: # rely on this symbol name, it's probably fine to never include it in
4707: # preloaded symbol tables.
4708: # Exclude shared library initialization/finalization symbols.
4709: dnl Note also adjust exclude_expsyms for C++ above.
4710: extract_expsyms_cmds=
4711:
4712: case $host_os in
4713: cygwin* | mingw* | pw32* | cegcc*)
4714: # FIXME: the MSVC++ port hasn't been tested in a loooong time
4715: # When not using gcc, we currently assume that we are using
4716: # Microsoft Visual C++.
4717: if test "$GCC" != yes; then
4718: with_gnu_ld=no
4719: fi
4720: ;;
4721: interix*)
4722: # we just hope/assume this is gcc and not c89 (= MSVC++)
4723: with_gnu_ld=yes
4724: ;;
4725: openbsd*)
4726: with_gnu_ld=no
4727: ;;
4728: esac
4729:
4730: _LT_TAGVAR(ld_shlibs, $1)=yes
4731:
4732: # On some targets, GNU ld is compatible enough with the native linker
4733: # that we're better off using the native interface for both.
4734: lt_use_gnu_ld_interface=no
4735: if test "$with_gnu_ld" = yes; then
4736: case $host_os in
4737: aix*)
4738: # The AIX port of GNU ld has always aspired to compatibility
4739: # with the native linker. However, as the warning in the GNU ld
4740: # block says, versions before 2.19.5* couldn't really create working
4741: # shared libraries, regardless of the interface used.
4742: case `$LD -v 2>&1` in
4743: *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4744: *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4745: *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4746: *)
4747: lt_use_gnu_ld_interface=yes
4748: ;;
4749: esac
4750: ;;
4751: *)
4752: lt_use_gnu_ld_interface=yes
4753: ;;
4754: esac
4755: fi
4756:
4757: if test "$lt_use_gnu_ld_interface" = yes; then
4758: # If archive_cmds runs LD, not CC, wlarc should be empty
4759: wlarc='${wl}'
4760:
4761: # Set some defaults for GNU ld with shared library support. These
4762: # are reset later if shared libraries are not supported. Putting them
4763: # here allows them to be overridden if necessary.
4764: runpath_var=LD_RUN_PATH
4765: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4766: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4767: # ancient GNU ld didn't support --whole-archive et. al.
4768: if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4769: _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4770: else
4771: _LT_TAGVAR(whole_archive_flag_spec, $1)=
4772: fi
4773: supports_anon_versioning=no
4774: case `$LD -v 2>&1` in
4775: *GNU\ gold*) supports_anon_versioning=yes ;;
4776: *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4777: *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4778: *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4779: *\ 2.11.*) ;; # other 2.11 versions
4780: *) supports_anon_versioning=yes ;;
4781: esac
4782:
4783: # See if GNU ld supports shared libraries.
4784: case $host_os in
4785: aix[[3-9]]*)
4786: # On AIX/PPC, the GNU linker is very broken
4787: if test "$host_cpu" != ia64; then
4788: _LT_TAGVAR(ld_shlibs, $1)=no
4789: cat <<_LT_EOF 1>&2
4790:
4791: *** Warning: the GNU linker, at least up to release 2.19, is reported
4792: *** to be unable to reliably create shared libraries on AIX.
4793: *** Therefore, libtool is disabling shared libraries support. If you
4794: *** really care for shared libraries, you may want to install binutils
4795: *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4796: *** You will then need to restart the configuration process.
4797:
4798: _LT_EOF
4799: fi
4800: ;;
4801:
4802: amigaos*)
4803: case $host_cpu in
4804: powerpc)
4805: # see comment about AmigaOS4 .so support
4806: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4807: _LT_TAGVAR(archive_expsym_cmds, $1)=''
4808: ;;
4809: m68k)
4810: _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4811: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4812: _LT_TAGVAR(hardcode_minus_L, $1)=yes
4813: ;;
4814: esac
4815: ;;
4816:
4817: beos*)
4818: if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4819: _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4820: # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4821: # support --undefined. This deserves some investigation. FIXME
4822: _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4823: else
4824: _LT_TAGVAR(ld_shlibs, $1)=no
4825: fi
4826: ;;
4827:
4828: cygwin* | mingw* | pw32* | cegcc*)
4829: # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4830: # as there is no search path for DLLs.
4831: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4832: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4833: _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4834: _LT_TAGVAR(always_export_symbols, $1)=no
4835: _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4836: _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4837: _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4838:
4839: if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4840: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4841: # If the export-symbols file already is a .def file (1st line
4842: # is EXPORTS), use it as is; otherwise, prepend...
4843: _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4844: cp $export_symbols $output_objdir/$soname.def;
4845: else
4846: echo EXPORTS > $output_objdir/$soname.def;
4847: cat $export_symbols >> $output_objdir/$soname.def;
4848: fi~
4849: $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4850: else
4851: _LT_TAGVAR(ld_shlibs, $1)=no
4852: fi
4853: ;;
4854:
4855: haiku*)
4856: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4857: _LT_TAGVAR(link_all_deplibs, $1)=yes
4858: ;;
4859:
4860: interix[[3-9]]*)
4861: _LT_TAGVAR(hardcode_direct, $1)=no
4862: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4863: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4864: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4865: # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4866: # Instead, shared libraries are loaded at an image base (0x10000000 by
4867: # default) and relocated if they conflict, which is a slow very memory
4868: # consuming and fragmenting process. To avoid this, we pick a random,
4869: # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4870: # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4871: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4872: _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4873: ;;
4874:
4875: gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4876: tmp_diet=no
4877: if test "$host_os" = linux-dietlibc; then
4878: case $cc_basename in
4879: diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4880: esac
4881: fi
4882: if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4883: && test "$tmp_diet" = no
4884: then
4885: tmp_addflag=' $pic_flag'
4886: tmp_sharedflag='-shared'
4887: case $cc_basename,$host_cpu in
4888: pgcc*) # Portland Group C compiler
4889: _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4890: tmp_addflag=' $pic_flag'
4891: ;;
4892: pgf77* | pgf90* | pgf95* | pgfortran*)
4893: # Portland Group f77 and f90 compilers
4894: _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4895: tmp_addflag=' $pic_flag -Mnomain' ;;
4896: ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4897: tmp_addflag=' -i_dynamic' ;;
4898: efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4899: tmp_addflag=' -i_dynamic -nofor_main' ;;
4900: ifc* | ifort*) # Intel Fortran compiler
4901: tmp_addflag=' -nofor_main' ;;
4902: lf95*) # Lahey Fortran 8.1
4903: _LT_TAGVAR(whole_archive_flag_spec, $1)=
4904: tmp_sharedflag='--shared' ;;
4905: xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4906: tmp_sharedflag='-qmkshrobj'
4907: tmp_addflag= ;;
4908: nvcc*) # Cuda Compiler Driver 2.2
4909: _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4910: _LT_TAGVAR(compiler_needs_object, $1)=yes
4911: ;;
4912: esac
4913: case `$CC -V 2>&1 | sed 5q` in
4914: *Sun\ C*) # Sun C 5.9
4915: _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4916: _LT_TAGVAR(compiler_needs_object, $1)=yes
4917: tmp_sharedflag='-G' ;;
4918: *Sun\ F*) # Sun Fortran 8.3
4919: tmp_sharedflag='-G' ;;
4920: esac
4921: _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4922:
4923: if test "x$supports_anon_versioning" = xyes; then
4924: _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4925: cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4926: echo "local: *; };" >> $output_objdir/$libname.ver~
4927: $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4928: fi
4929:
4930: case $cc_basename in
4931: xlf* | bgf* | bgxlf* | mpixlf*)
4932: # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4933: _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4934: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4935: _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4936: if test "x$supports_anon_versioning" = xyes; then
4937: _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4938: cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4939: echo "local: *; };" >> $output_objdir/$libname.ver~
4940: $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4941: fi
4942: ;;
4943: esac
4944: else
4945: _LT_TAGVAR(ld_shlibs, $1)=no
4946: fi
4947: ;;
4948:
4949: netbsd*)
4950: if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4951: _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4952: wlarc=
4953: else
4954: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4955: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4956: fi
4957: ;;
4958:
4959: solaris*)
4960: if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4961: _LT_TAGVAR(ld_shlibs, $1)=no
4962: cat <<_LT_EOF 1>&2
4963:
4964: *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4965: *** create shared libraries on Solaris systems. Therefore, libtool
4966: *** is disabling shared libraries support. We urge you to upgrade GNU
4967: *** binutils to release 2.9.1 or newer. Another option is to modify
4968: *** your PATH or compiler configuration so that the native linker is
4969: *** used, and then restart.
4970:
4971: _LT_EOF
4972: elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4973: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4974: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4975: else
4976: _LT_TAGVAR(ld_shlibs, $1)=no
4977: fi
4978: ;;
4979:
4980: sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4981: case `$LD -v 2>&1` in
4982: *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4983: _LT_TAGVAR(ld_shlibs, $1)=no
4984: cat <<_LT_EOF 1>&2
4985:
4986: *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4987: *** reliably create shared libraries on SCO systems. Therefore, libtool
4988: *** is disabling shared libraries support. We urge you to upgrade GNU
4989: *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4990: *** your PATH or compiler configuration so that the native linker is
4991: *** used, and then restart.
4992:
4993: _LT_EOF
4994: ;;
4995: *)
4996: # For security reasons, it is highly recommended that you always
4997: # use absolute paths for naming shared libraries, and exclude the
4998: # DT_RUNPATH tag from executables and libraries. But doing so
4999: # requires that you compile everything twice, which is a pain.
5000: if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5001: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5002: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5003: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5004: else
5005: _LT_TAGVAR(ld_shlibs, $1)=no
5006: fi
5007: ;;
5008: esac
5009: ;;
5010:
5011: sunos4*)
5012: _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5013: wlarc=
5014: _LT_TAGVAR(hardcode_direct, $1)=yes
5015: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5016: ;;
5017:
5018: *)
5019: if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5020: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5021: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5022: else
5023: _LT_TAGVAR(ld_shlibs, $1)=no
5024: fi
5025: ;;
5026: esac
5027:
5028: if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5029: runpath_var=
5030: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5031: _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5032: _LT_TAGVAR(whole_archive_flag_spec, $1)=
5033: fi
5034: else
5035: # PORTME fill in a description of your system's linker (not GNU ld)
5036: case $host_os in
5037: aix3*)
5038: _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5039: _LT_TAGVAR(always_export_symbols, $1)=yes
5040: _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5041: # Note: this linker hardcodes the directories in LIBPATH if there
5042: # are no directories specified by -L.
5043: _LT_TAGVAR(hardcode_minus_L, $1)=yes
5044: if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5045: # Neither direct hardcoding nor static linking is supported with a
5046: # broken collect2.
5047: _LT_TAGVAR(hardcode_direct, $1)=unsupported
5048: fi
5049: ;;
5050:
5051: aix[[4-9]]*)
5052: if test "$host_cpu" = ia64; then
5053: # On IA64, the linker does run time linking by default, so we don't
5054: # have to do anything special.
5055: aix_use_runtimelinking=no
5056: exp_sym_flag='-Bexport'
5057: no_entry_flag=""
5058: else
5059: # If we're using GNU nm, then we don't want the "-C" option.
5060: # -C means demangle to AIX nm, but means don't demangle with GNU nm
5061: # Also, AIX nm treats weak defined symbols like other global
5062: # defined symbols, whereas GNU nm marks them as "W".
5063: if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5064: _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5065: else
5066: _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5067: fi
5068: aix_use_runtimelinking=no
5069:
5070: # Test if we are trying to use run time linking or normal
5071: # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5072: # need to do runtime linking.
5073: case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5074: for ld_flag in $LDFLAGS; do
5075: if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5076: aix_use_runtimelinking=yes
5077: break
5078: fi
5079: done
5080: ;;
5081: esac
5082:
5083: exp_sym_flag='-bexport'
5084: no_entry_flag='-bnoentry'
5085: fi
5086:
5087: # When large executables or shared objects are built, AIX ld can
5088: # have problems creating the table of contents. If linking a library
5089: # or program results in "error TOC overflow" add -mminimal-toc to
5090: # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5091: # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5092:
5093: _LT_TAGVAR(archive_cmds, $1)=''
5094: _LT_TAGVAR(hardcode_direct, $1)=yes
5095: _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5096: _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5097: _LT_TAGVAR(link_all_deplibs, $1)=yes
5098: _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5099:
5100: if test "$GCC" = yes; then
5101: case $host_os in aix4.[[012]]|aix4.[[012]].*)
5102: # We only want to do this on AIX 4.2 and lower, the check
5103: # below for broken collect2 doesn't work under 4.3+
5104: collect2name=`${CC} -print-prog-name=collect2`
5105: if test -f "$collect2name" &&
5106: strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5107: then
5108: # We have reworked collect2
5109: :
5110: else
5111: # We have old collect2
5112: _LT_TAGVAR(hardcode_direct, $1)=unsupported
5113: # It fails to find uninstalled libraries when the uninstalled
5114: # path is not listed in the libpath. Setting hardcode_minus_L
5115: # to unsupported forces relinking
5116: _LT_TAGVAR(hardcode_minus_L, $1)=yes
5117: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5118: _LT_TAGVAR(hardcode_libdir_separator, $1)=
5119: fi
5120: ;;
5121: esac
5122: shared_flag='-shared'
5123: if test "$aix_use_runtimelinking" = yes; then
5124: shared_flag="$shared_flag "'${wl}-G'
5125: fi
5126: else
5127: # not using gcc
5128: if test "$host_cpu" = ia64; then
5129: # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5130: # chokes on -Wl,-G. The following line is correct:
5131: shared_flag='-G'
5132: else
5133: if test "$aix_use_runtimelinking" = yes; then
5134: shared_flag='${wl}-G'
5135: else
5136: shared_flag='${wl}-bM:SRE'
5137: fi
5138: fi
5139: fi
5140:
5141: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5142: # It seems that -bexpall does not export symbols beginning with
5143: # underscore (_), so it is better to generate a list of symbols to export.
5144: _LT_TAGVAR(always_export_symbols, $1)=yes
5145: if test "$aix_use_runtimelinking" = yes; then
5146: # Warning - without using the other runtime loading flags (-brtl),
5147: # -berok will link without error, but may produce a broken library.
5148: _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5149: # Determine the default libpath from the value encoded in an
5150: # empty executable.
5151: _LT_SYS_MODULE_PATH_AIX([$1])
5152: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5153: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5154: else
5155: if test "$host_cpu" = ia64; then
5156: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5157: _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5158: _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5159: else
5160: # Determine the default libpath from the value encoded in an
5161: # empty executable.
5162: _LT_SYS_MODULE_PATH_AIX([$1])
5163: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5164: # Warning - without using the other run time loading flags,
5165: # -berok will link without error, but may produce a broken library.
5166: _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5167: _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5168: if test "$with_gnu_ld" = yes; then
5169: # We only use this code for GNU lds that support --whole-archive.
5170: _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5171: else
5172: # Exported symbols can be pulled into shared objects from archives
5173: _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5174: fi
5175: _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5176: # This is similar to how AIX traditionally builds its shared libraries.
5177: _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5178: fi
5179: fi
5180: ;;
5181:
5182: amigaos*)
5183: case $host_cpu in
5184: powerpc)
5185: # see comment about AmigaOS4 .so support
5186: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5187: _LT_TAGVAR(archive_expsym_cmds, $1)=''
5188: ;;
5189: m68k)
5190: _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5191: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5192: _LT_TAGVAR(hardcode_minus_L, $1)=yes
5193: ;;
5194: esac
5195: ;;
5196:
5197: bsdi[[45]]*)
5198: _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5199: ;;
5200:
5201: cygwin* | mingw* | pw32* | cegcc*)
5202: # When not using gcc, we currently assume that we are using
5203: # Microsoft Visual C++.
5204: # hardcode_libdir_flag_spec is actually meaningless, as there is
5205: # no search path for DLLs.
5206: case $cc_basename in
5207: cl*)
5208: # Native MSVC
5209: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5210: _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5211: _LT_TAGVAR(always_export_symbols, $1)=yes
5212: _LT_TAGVAR(file_list_spec, $1)='@'
5213: # Tell ltmain to make .lib files, not .a files.
5214: libext=lib
5215: # Tell ltmain to make .dll files, not .so files.
5216: shrext_cmds=".dll"
5217: # FIXME: Setting linknames here is a bad hack.
5218: _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5219: _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5220: sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5221: else
5222: sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5223: fi~
5224: $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5225: linknames='
5226: # The linker will not automatically build a static lib if we build a DLL.
5227: # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5228: _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5229: _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5230: _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5231: # Don't use ranlib
5232: _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5233: _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5234: lt_tool_outputfile="@TOOL_OUTPUT@"~
5235: case $lt_outputfile in
5236: *.exe|*.EXE) ;;
5237: *)
5238: lt_outputfile="$lt_outputfile.exe"
5239: lt_tool_outputfile="$lt_tool_outputfile.exe"
5240: ;;
5241: esac~
5242: if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5243: $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5244: $RM "$lt_outputfile.manifest";
5245: fi'
5246: ;;
5247: *)
5248: # Assume MSVC wrapper
5249: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5250: _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5251: # Tell ltmain to make .lib files, not .a files.
5252: libext=lib
5253: # Tell ltmain to make .dll files, not .so files.
5254: shrext_cmds=".dll"
5255: # FIXME: Setting linknames here is a bad hack.
5256: _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5257: # The linker will automatically build a .lib file if we build a DLL.
5258: _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5259: # FIXME: Should let the user specify the lib program.
5260: _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5261: _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5262: ;;
5263: esac
5264: ;;
5265:
5266: darwin* | rhapsody*)
5267: _LT_DARWIN_LINKER_FEATURES($1)
5268: ;;
5269:
5270: dgux*)
5271: _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5272: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5273: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5274: ;;
5275:
5276: # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5277: # support. Future versions do this automatically, but an explicit c++rt0.o
5278: # does not break anything, and helps significantly (at the cost of a little
5279: # extra space).
5280: freebsd2.2*)
5281: _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5282: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5283: _LT_TAGVAR(hardcode_direct, $1)=yes
5284: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5285: ;;
5286:
5287: # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5288: freebsd2.*)
5289: _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5290: _LT_TAGVAR(hardcode_direct, $1)=yes
5291: _LT_TAGVAR(hardcode_minus_L, $1)=yes
5292: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5293: ;;
5294:
5295: # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5296: freebsd* | dragonfly*)
5297: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5298: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5299: _LT_TAGVAR(hardcode_direct, $1)=yes
5300: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5301: ;;
5302:
5303: hpux9*)
5304: if test "$GCC" = yes; then
5305: _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5306: else
5307: _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5308: fi
5309: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5310: _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5311: _LT_TAGVAR(hardcode_direct, $1)=yes
5312:
5313: # hardcode_minus_L: Not really in the search PATH,
5314: # but as the default location of the library.
5315: _LT_TAGVAR(hardcode_minus_L, $1)=yes
5316: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5317: ;;
5318:
5319: hpux10*)
5320: if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5321: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5322: else
5323: _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5324: fi
5325: if test "$with_gnu_ld" = no; then
5326: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5327: _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5328: _LT_TAGVAR(hardcode_direct, $1)=yes
5329: _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5330: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5331: # hardcode_minus_L: Not really in the search PATH,
5332: # but as the default location of the library.
5333: _LT_TAGVAR(hardcode_minus_L, $1)=yes
5334: fi
5335: ;;
5336:
5337: hpux11*)
5338: if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5339: case $host_cpu in
5340: hppa*64*)
5341: _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5342: ;;
5343: ia64*)
5344: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5345: ;;
5346: *)
5347: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5348: ;;
5349: esac
5350: else
5351: case $host_cpu in
5352: hppa*64*)
5353: _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5354: ;;
5355: ia64*)
5356: _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5357: ;;
5358: *)
5359: m4_if($1, [], [
5360: # Older versions of the 11.00 compiler do not understand -b yet
5361: # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5362: _LT_LINKER_OPTION([if $CC understands -b],
5363: _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5364: [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5365: [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5366: [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5367: ;;
5368: esac
5369: fi
5370: if test "$with_gnu_ld" = no; then
5371: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5372: _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5373:
5374: case $host_cpu in
5375: hppa*64*|ia64*)
5376: _LT_TAGVAR(hardcode_direct, $1)=no
5377: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5378: ;;
5379: *)
5380: _LT_TAGVAR(hardcode_direct, $1)=yes
5381: _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5382: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5383:
5384: # hardcode_minus_L: Not really in the search PATH,
5385: # but as the default location of the library.
5386: _LT_TAGVAR(hardcode_minus_L, $1)=yes
5387: ;;
5388: esac
5389: fi
5390: ;;
5391:
5392: irix5* | irix6* | nonstopux*)
5393: if test "$GCC" = yes; then
5394: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5395: # Try to use the -exported_symbol ld option, if it does not
5396: # work, assume that -exports_file does not work either and
5397: # implicitly export all symbols.
5398: # This should be the same for all languages, so no per-tag cache variable.
5399: AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5400: [lt_cv_irix_exported_symbol],
5401: [save_LDFLAGS="$LDFLAGS"
5402: LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5403: AC_LINK_IFELSE(
5404: [AC_LANG_SOURCE(
5405: [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5406: [C++], [[int foo (void) { return 0; }]],
5407: [Fortran 77], [[
5408: subroutine foo
5409: end]],
5410: [Fortran], [[
5411: subroutine foo
5412: end]])])],
5413: [lt_cv_irix_exported_symbol=yes],
5414: [lt_cv_irix_exported_symbol=no])
5415: LDFLAGS="$save_LDFLAGS"])
5416: if test "$lt_cv_irix_exported_symbol" = yes; then
5417: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5418: fi
5419: else
5420: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5421: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5422: fi
5423: _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5424: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5425: _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5426: _LT_TAGVAR(inherit_rpath, $1)=yes
5427: _LT_TAGVAR(link_all_deplibs, $1)=yes
5428: ;;
5429:
5430: netbsd*)
5431: if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5432: _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5433: else
5434: _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5435: fi
5436: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5437: _LT_TAGVAR(hardcode_direct, $1)=yes
5438: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5439: ;;
5440:
5441: newsos6)
5442: _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5443: _LT_TAGVAR(hardcode_direct, $1)=yes
5444: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5445: _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5446: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5447: ;;
5448:
5449: *nto* | *qnx*)
5450: ;;
5451:
5452: openbsd*)
5453: if test -f /usr/libexec/ld.so; then
5454: _LT_TAGVAR(hardcode_direct, $1)=yes
5455: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5456: _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5457: if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5458: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5459: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5460: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5461: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5462: else
5463: case $host_os in
5464: openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5465: _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5466: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5467: ;;
5468: *)
5469: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5470: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5471: ;;
5472: esac
5473: fi
5474: else
5475: _LT_TAGVAR(ld_shlibs, $1)=no
5476: fi
5477: ;;
5478:
5479: os2*)
5480: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5481: _LT_TAGVAR(hardcode_minus_L, $1)=yes
5482: _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5483: _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5484: _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5485: ;;
5486:
5487: osf3*)
5488: if test "$GCC" = yes; then
5489: _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5490: _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5491: else
5492: _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5493: _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5494: fi
5495: _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5496: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5497: _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5498: ;;
5499:
5500: osf4* | osf5*) # as osf3* with the addition of -msym flag
5501: if test "$GCC" = yes; then
5502: _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5503: _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5504: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5505: else
5506: _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5507: _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5508: _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5509: $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5510:
5511: # Both c and cxx compiler support -rpath directly
5512: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5513: fi
5514: _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5515: _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5516: ;;
5517:
5518: solaris*)
5519: _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5520: if test "$GCC" = yes; then
5521: wlarc='${wl}'
5522: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5523: _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5524: $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5525: else
5526: case `$CC -V 2>&1` in
5527: *"Compilers 5.0"*)
5528: wlarc=''
5529: _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5530: _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5531: $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5532: ;;
5533: *)
5534: wlarc='${wl}'
5535: _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5536: _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5537: $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5538: ;;
5539: esac
5540: fi
5541: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5542: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5543: case $host_os in
5544: solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5545: *)
5546: # The compiler driver will combine and reorder linker options,
5547: # but understands `-z linker_flag'. GCC discards it without `$wl',
5548: # but is careful enough not to reorder.
5549: # Supported since Solaris 2.6 (maybe 2.5.1?)
5550: if test "$GCC" = yes; then
5551: _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5552: else
5553: _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5554: fi
5555: ;;
5556: esac
5557: _LT_TAGVAR(link_all_deplibs, $1)=yes
5558: ;;
5559:
5560: sunos4*)
5561: if test "x$host_vendor" = xsequent; then
5562: # Use $CC to link under sequent, because it throws in some extra .o
5563: # files that make .init and .fini sections work.
5564: _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5565: else
5566: _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5567: fi
5568: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5569: _LT_TAGVAR(hardcode_direct, $1)=yes
5570: _LT_TAGVAR(hardcode_minus_L, $1)=yes
5571: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5572: ;;
5573:
5574: sysv4)
5575: case $host_vendor in
5576: sni)
5577: _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5578: _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5579: ;;
5580: siemens)
5581: ## LD is ld it makes a PLAMLIB
5582: ## CC just makes a GrossModule.
5583: _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5584: _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5585: _LT_TAGVAR(hardcode_direct, $1)=no
5586: ;;
5587: motorola)
5588: _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5589: _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5590: ;;
5591: esac
5592: runpath_var='LD_RUN_PATH'
5593: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5594: ;;
5595:
5596: sysv4.3*)
5597: _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5598: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5599: _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5600: ;;
5601:
5602: sysv4*MP*)
5603: if test -d /usr/nec; then
5604: _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5605: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5606: runpath_var=LD_RUN_PATH
5607: hardcode_runpath_var=yes
5608: _LT_TAGVAR(ld_shlibs, $1)=yes
5609: fi
5610: ;;
5611:
5612: sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5613: _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5614: _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5615: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5616: runpath_var='LD_RUN_PATH'
5617:
5618: if test "$GCC" = yes; then
5619: _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5620: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5621: else
5622: _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5623: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5624: fi
5625: ;;
5626:
5627: sysv5* | sco3.2v5* | sco5v6*)
5628: # Note: We can NOT use -z defs as we might desire, because we do not
5629: # link with -lc, and that would cause any symbols used from libc to
5630: # always be unresolved, which means just about no library would
5631: # ever link correctly. If we're not using GNU ld we use -z text
5632: # though, which does catch some bad symbols but isn't as heavy-handed
5633: # as -z defs.
5634: _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5635: _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5636: _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5637: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5638: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5639: _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5640: _LT_TAGVAR(link_all_deplibs, $1)=yes
5641: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5642: runpath_var='LD_RUN_PATH'
5643:
5644: if test "$GCC" = yes; then
5645: _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5646: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5647: else
5648: _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5649: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5650: fi
5651: ;;
5652:
5653: uts4*)
5654: _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5655: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5656: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5657: ;;
5658:
5659: *)
5660: _LT_TAGVAR(ld_shlibs, $1)=no
5661: ;;
5662: esac
5663:
5664: if test x$host_vendor = xsni; then
5665: case $host in
5666: sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5667: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5668: ;;
5669: esac
5670: fi
5671: fi
5672: ])
5673: AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5674: test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5675:
5676: _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5677:
5678: _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5679: _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5680: _LT_DECL([], [extract_expsyms_cmds], [2],
5681: [The commands to extract the exported symbol list from a shared archive])
5682:
5683: #
5684: # Do we need to explicitly link libc?
5685: #
5686: case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5687: x|xyes)
5688: # Assume -lc should be added
5689: _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5690:
5691: if test "$enable_shared" = yes && test "$GCC" = yes; then
5692: case $_LT_TAGVAR(archive_cmds, $1) in
5693: *'~'*)
5694: # FIXME: we may have to deal with multi-command sequences.
5695: ;;
5696: '$CC '*)
5697: # Test whether the compiler implicitly links with -lc since on some
5698: # systems, -lgcc has to come before -lc. If gcc already passes -lc
5699: # to ld, don't add -lc before -lgcc.
5700: AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5701: [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5702: [$RM conftest*
5703: echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5704:
5705: if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5706: soname=conftest
5707: lib=conftest
5708: libobjs=conftest.$ac_objext
5709: deplibs=
5710: wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5711: pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5712: compiler_flags=-v
5713: linker_flags=-v
5714: verstring=
5715: output_objdir=.
5716: libname=conftest
5717: lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5718: _LT_TAGVAR(allow_undefined_flag, $1)=
5719: if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5720: then
5721: lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5722: else
5723: lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5724: fi
5725: _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5726: else
5727: cat conftest.err 1>&5
5728: fi
5729: $RM conftest*
5730: ])
5731: _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5732: ;;
5733: esac
5734: fi
5735: ;;
5736: esac
5737:
5738: _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5739: [Whether or not to add -lc for building shared libraries])
5740: _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5741: [enable_shared_with_static_runtimes], [0],
5742: [Whether or not to disallow shared libs when runtime libs are static])
5743: _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5744: [Compiler flag to allow reflexive dlopens])
5745: _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5746: [Compiler flag to generate shared objects directly from archives])
5747: _LT_TAGDECL([], [compiler_needs_object], [1],
5748: [Whether the compiler copes with passing no objects directly])
5749: _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5750: [Create an old-style archive from a shared archive])
5751: _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5752: [Create a temporary old-style archive to link instead of a shared archive])
5753: _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5754: _LT_TAGDECL([], [archive_expsym_cmds], [2])
5755: _LT_TAGDECL([], [module_cmds], [2],
5756: [Commands used to build a loadable module if different from building
5757: a shared archive.])
5758: _LT_TAGDECL([], [module_expsym_cmds], [2])
5759: _LT_TAGDECL([], [with_gnu_ld], [1],
5760: [Whether we are building with GNU ld or not])
5761: _LT_TAGDECL([], [allow_undefined_flag], [1],
5762: [Flag that allows shared libraries with undefined symbols to be built])
5763: _LT_TAGDECL([], [no_undefined_flag], [1],
5764: [Flag that enforces no undefined symbols])
5765: _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5766: [Flag to hardcode $libdir into a binary during linking.
5767: This must work even if $libdir does not exist])
5768: _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5769: [Whether we need a single "-rpath" flag with a separated argument])
5770: _LT_TAGDECL([], [hardcode_direct], [0],
5771: [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5772: DIR into the resulting binary])
5773: _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5774: [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5775: DIR into the resulting binary and the resulting library dependency is
5776: "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5777: library is relocated])
5778: _LT_TAGDECL([], [hardcode_minus_L], [0],
5779: [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5780: into the resulting binary])
5781: _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5782: [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5783: into the resulting binary])
5784: _LT_TAGDECL([], [hardcode_automatic], [0],
5785: [Set to "yes" if building a shared library automatically hardcodes DIR
5786: into the library and all subsequent libraries and executables linked
5787: against it])
5788: _LT_TAGDECL([], [inherit_rpath], [0],
5789: [Set to yes if linker adds runtime paths of dependent libraries
5790: to runtime path list])
5791: _LT_TAGDECL([], [link_all_deplibs], [0],
5792: [Whether libtool must link a program against all its dependency libraries])
5793: _LT_TAGDECL([], [always_export_symbols], [0],
5794: [Set to "yes" if exported symbols are required])
5795: _LT_TAGDECL([], [export_symbols_cmds], [2],
5796: [The commands to list exported symbols])
5797: _LT_TAGDECL([], [exclude_expsyms], [1],
5798: [Symbols that should not be listed in the preloaded symbols])
5799: _LT_TAGDECL([], [include_expsyms], [1],
5800: [Symbols that must always be exported])
5801: _LT_TAGDECL([], [prelink_cmds], [2],
5802: [Commands necessary for linking programs (against libraries) with templates])
5803: _LT_TAGDECL([], [postlink_cmds], [2],
5804: [Commands necessary for finishing linking programs])
5805: _LT_TAGDECL([], [file_list_spec], [1],
5806: [Specify filename containing input files])
5807: dnl FIXME: Not yet implemented
5808: dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5809: dnl [Compiler flag to generate thread safe objects])
5810: ])# _LT_LINKER_SHLIBS
5811:
5812:
5813: # _LT_LANG_C_CONFIG([TAG])
5814: # ------------------------
5815: # Ensure that the configuration variables for a C compiler are suitably
5816: # defined. These variables are subsequently used by _LT_CONFIG to write
5817: # the compiler configuration to `libtool'.
5818: m4_defun([_LT_LANG_C_CONFIG],
5819: [m4_require([_LT_DECL_EGREP])dnl
5820: lt_save_CC="$CC"
5821: AC_LANG_PUSH(C)
5822:
5823: # Source file extension for C test sources.
5824: ac_ext=c
5825:
5826: # Object file extension for compiled C test sources.
5827: objext=o
5828: _LT_TAGVAR(objext, $1)=$objext
5829:
5830: # Code to be used in simple compile tests
5831: lt_simple_compile_test_code="int some_variable = 0;"
5832:
5833: # Code to be used in simple link tests
5834: lt_simple_link_test_code='int main(){return(0);}'
5835:
5836: _LT_TAG_COMPILER
5837: # Save the default compiler, since it gets overwritten when the other
5838: # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5839: compiler_DEFAULT=$CC
5840:
5841: # save warnings/boilerplate of simple test code
5842: _LT_COMPILER_BOILERPLATE
5843: _LT_LINKER_BOILERPLATE
5844:
5845: if test -n "$compiler"; then
5846: _LT_COMPILER_NO_RTTI($1)
5847: _LT_COMPILER_PIC($1)
5848: _LT_COMPILER_C_O($1)
5849: _LT_COMPILER_FILE_LOCKS($1)
5850: _LT_LINKER_SHLIBS($1)
5851: _LT_SYS_DYNAMIC_LINKER($1)
5852: _LT_LINKER_HARDCODE_LIBPATH($1)
5853: LT_SYS_DLOPEN_SELF
5854: _LT_CMD_STRIPLIB
5855:
5856: # Report which library types will actually be built
5857: AC_MSG_CHECKING([if libtool supports shared libraries])
5858: AC_MSG_RESULT([$can_build_shared])
5859:
5860: AC_MSG_CHECKING([whether to build shared libraries])
5861: test "$can_build_shared" = "no" && enable_shared=no
5862:
5863: # On AIX, shared libraries and static libraries use the same namespace, and
5864: # are all built from PIC.
5865: case $host_os in
5866: aix3*)
5867: test "$enable_shared" = yes && enable_static=no
5868: if test -n "$RANLIB"; then
5869: archive_cmds="$archive_cmds~\$RANLIB \$lib"
5870: postinstall_cmds='$RANLIB $lib'
5871: fi
5872: ;;
5873:
5874: aix[[4-9]]*)
5875: if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5876: test "$enable_shared" = yes && enable_static=no
5877: fi
5878: ;;
5879: esac
5880: AC_MSG_RESULT([$enable_shared])
5881:
5882: AC_MSG_CHECKING([whether to build static libraries])
5883: # Make sure either enable_shared or enable_static is yes.
5884: test "$enable_shared" = yes || enable_static=yes
5885: AC_MSG_RESULT([$enable_static])
5886:
5887: _LT_CONFIG($1)
5888: fi
5889: AC_LANG_POP
5890: CC="$lt_save_CC"
5891: ])# _LT_LANG_C_CONFIG
5892:
5893:
5894: # _LT_LANG_CXX_CONFIG([TAG])
5895: # --------------------------
5896: # Ensure that the configuration variables for a C++ compiler are suitably
5897: # defined. These variables are subsequently used by _LT_CONFIG to write
5898: # the compiler configuration to `libtool'.
5899: m4_defun([_LT_LANG_CXX_CONFIG],
5900: [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5901: m4_require([_LT_DECL_EGREP])dnl
5902: m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5903: if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5904: ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5905: (test "X$CXX" != "Xg++"))) ; then
5906: AC_PROG_CXXCPP
5907: else
5908: _lt_caught_CXX_error=yes
5909: fi
5910:
5911: AC_LANG_PUSH(C++)
5912: _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5913: _LT_TAGVAR(allow_undefined_flag, $1)=
5914: _LT_TAGVAR(always_export_symbols, $1)=no
5915: _LT_TAGVAR(archive_expsym_cmds, $1)=
5916: _LT_TAGVAR(compiler_needs_object, $1)=no
5917: _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5918: _LT_TAGVAR(hardcode_direct, $1)=no
5919: _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5920: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5921: _LT_TAGVAR(hardcode_libdir_separator, $1)=
5922: _LT_TAGVAR(hardcode_minus_L, $1)=no
5923: _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5924: _LT_TAGVAR(hardcode_automatic, $1)=no
5925: _LT_TAGVAR(inherit_rpath, $1)=no
5926: _LT_TAGVAR(module_cmds, $1)=
5927: _LT_TAGVAR(module_expsym_cmds, $1)=
5928: _LT_TAGVAR(link_all_deplibs, $1)=unknown
5929: _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5930: _LT_TAGVAR(reload_flag, $1)=$reload_flag
5931: _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5932: _LT_TAGVAR(no_undefined_flag, $1)=
5933: _LT_TAGVAR(whole_archive_flag_spec, $1)=
5934: _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5935:
5936: # Source file extension for C++ test sources.
5937: ac_ext=cpp
5938:
5939: # Object file extension for compiled C++ test sources.
5940: objext=o
5941: _LT_TAGVAR(objext, $1)=$objext
5942:
5943: # No sense in running all these tests if we already determined that
5944: # the CXX compiler isn't working. Some variables (like enable_shared)
5945: # are currently assumed to apply to all compilers on this platform,
5946: # and will be corrupted by setting them based on a non-working compiler.
5947: if test "$_lt_caught_CXX_error" != yes; then
5948: # Code to be used in simple compile tests
5949: lt_simple_compile_test_code="int some_variable = 0;"
5950:
5951: # Code to be used in simple link tests
5952: lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5953:
5954: # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5955: _LT_TAG_COMPILER
5956:
5957: # save warnings/boilerplate of simple test code
5958: _LT_COMPILER_BOILERPLATE
5959: _LT_LINKER_BOILERPLATE
5960:
5961: # Allow CC to be a program name with arguments.
5962: lt_save_CC=$CC
5963: lt_save_CFLAGS=$CFLAGS
5964: lt_save_LD=$LD
5965: lt_save_GCC=$GCC
5966: GCC=$GXX
5967: lt_save_with_gnu_ld=$with_gnu_ld
5968: lt_save_path_LD=$lt_cv_path_LD
5969: if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5970: lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5971: else
5972: $as_unset lt_cv_prog_gnu_ld
5973: fi
5974: if test -n "${lt_cv_path_LDCXX+set}"; then
5975: lt_cv_path_LD=$lt_cv_path_LDCXX
5976: else
5977: $as_unset lt_cv_path_LD
5978: fi
5979: test -z "${LDCXX+set}" || LD=$LDCXX
5980: CC=${CXX-"c++"}
5981: CFLAGS=$CXXFLAGS
5982: compiler=$CC
5983: _LT_TAGVAR(compiler, $1)=$CC
5984: _LT_CC_BASENAME([$compiler])
5985:
5986: if test -n "$compiler"; then
5987: # We don't want -fno-exception when compiling C++ code, so set the
5988: # no_builtin_flag separately
5989: if test "$GXX" = yes; then
5990: _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5991: else
5992: _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5993: fi
5994:
5995: if test "$GXX" = yes; then
5996: # Set up default GNU C++ configuration
5997:
5998: LT_PATH_LD
5999:
6000: # Check if GNU C++ uses GNU ld as the underlying linker, since the
6001: # archiving commands below assume that GNU ld is being used.
6002: if test "$with_gnu_ld" = yes; then
6003: _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6004: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6005:
6006: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6007: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6008:
6009: # If archive_cmds runs LD, not CC, wlarc should be empty
6010: # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6011: # investigate it a little bit more. (MM)
6012: wlarc='${wl}'
6013:
6014: # ancient GNU ld didn't support --whole-archive et. al.
6015: if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6016: $GREP 'no-whole-archive' > /dev/null; then
6017: _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6018: else
6019: _LT_TAGVAR(whole_archive_flag_spec, $1)=
6020: fi
6021: else
6022: with_gnu_ld=no
6023: wlarc=
6024:
6025: # A generic and very simple default shared library creation
6026: # command for GNU C++ for the case where it uses the native
6027: # linker, instead of GNU ld. If possible, this setting should
6028: # overridden to take advantage of the native linker features on
6029: # the platform it is being used on.
6030: _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6031: fi
6032:
6033: # Commands to make compiler produce verbose output that lists
6034: # what "hidden" libraries, object files and flags are used when
6035: # linking a shared library.
6036: output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6037:
6038: else
6039: GXX=no
6040: with_gnu_ld=no
6041: wlarc=
6042: fi
6043:
6044: # PORTME: fill in a description of your system's C++ link characteristics
6045: AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6046: _LT_TAGVAR(ld_shlibs, $1)=yes
6047: case $host_os in
6048: aix3*)
6049: # FIXME: insert proper C++ library support
6050: _LT_TAGVAR(ld_shlibs, $1)=no
6051: ;;
6052: aix[[4-9]]*)
6053: if test "$host_cpu" = ia64; then
6054: # On IA64, the linker does run time linking by default, so we don't
6055: # have to do anything special.
6056: aix_use_runtimelinking=no
6057: exp_sym_flag='-Bexport'
6058: no_entry_flag=""
6059: else
6060: aix_use_runtimelinking=no
6061:
6062: # Test if we are trying to use run time linking or normal
6063: # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6064: # need to do runtime linking.
6065: case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6066: for ld_flag in $LDFLAGS; do
6067: case $ld_flag in
6068: *-brtl*)
6069: aix_use_runtimelinking=yes
6070: break
6071: ;;
6072: esac
6073: done
6074: ;;
6075: esac
6076:
6077: exp_sym_flag='-bexport'
6078: no_entry_flag='-bnoentry'
6079: fi
6080:
6081: # When large executables or shared objects are built, AIX ld can
6082: # have problems creating the table of contents. If linking a library
6083: # or program results in "error TOC overflow" add -mminimal-toc to
6084: # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6085: # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6086:
6087: _LT_TAGVAR(archive_cmds, $1)=''
6088: _LT_TAGVAR(hardcode_direct, $1)=yes
6089: _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6090: _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6091: _LT_TAGVAR(link_all_deplibs, $1)=yes
6092: _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6093:
6094: if test "$GXX" = yes; then
6095: case $host_os in aix4.[[012]]|aix4.[[012]].*)
6096: # We only want to do this on AIX 4.2 and lower, the check
6097: # below for broken collect2 doesn't work under 4.3+
6098: collect2name=`${CC} -print-prog-name=collect2`
6099: if test -f "$collect2name" &&
6100: strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6101: then
6102: # We have reworked collect2
6103: :
6104: else
6105: # We have old collect2
6106: _LT_TAGVAR(hardcode_direct, $1)=unsupported
6107: # It fails to find uninstalled libraries when the uninstalled
6108: # path is not listed in the libpath. Setting hardcode_minus_L
6109: # to unsupported forces relinking
6110: _LT_TAGVAR(hardcode_minus_L, $1)=yes
6111: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6112: _LT_TAGVAR(hardcode_libdir_separator, $1)=
6113: fi
6114: esac
6115: shared_flag='-shared'
6116: if test "$aix_use_runtimelinking" = yes; then
6117: shared_flag="$shared_flag "'${wl}-G'
6118: fi
6119: else
6120: # not using gcc
6121: if test "$host_cpu" = ia64; then
6122: # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6123: # chokes on -Wl,-G. The following line is correct:
6124: shared_flag='-G'
6125: else
6126: if test "$aix_use_runtimelinking" = yes; then
6127: shared_flag='${wl}-G'
6128: else
6129: shared_flag='${wl}-bM:SRE'
6130: fi
6131: fi
6132: fi
6133:
6134: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6135: # It seems that -bexpall does not export symbols beginning with
6136: # underscore (_), so it is better to generate a list of symbols to
6137: # export.
6138: _LT_TAGVAR(always_export_symbols, $1)=yes
6139: if test "$aix_use_runtimelinking" = yes; then
6140: # Warning - without using the other runtime loading flags (-brtl),
6141: # -berok will link without error, but may produce a broken library.
6142: _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6143: # Determine the default libpath from the value encoded in an empty
6144: # executable.
6145: _LT_SYS_MODULE_PATH_AIX([$1])
6146: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6147:
6148: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6149: else
6150: if test "$host_cpu" = ia64; then
6151: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6152: _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6153: _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6154: else
6155: # Determine the default libpath from the value encoded in an
6156: # empty executable.
6157: _LT_SYS_MODULE_PATH_AIX([$1])
6158: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6159: # Warning - without using the other run time loading flags,
6160: # -berok will link without error, but may produce a broken library.
6161: _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6162: _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6163: if test "$with_gnu_ld" = yes; then
6164: # We only use this code for GNU lds that support --whole-archive.
6165: _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6166: else
6167: # Exported symbols can be pulled into shared objects from archives
6168: _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6169: fi
6170: _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6171: # This is similar to how AIX traditionally builds its shared
6172: # libraries.
6173: _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6174: fi
6175: fi
6176: ;;
6177:
6178: beos*)
6179: if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6180: _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6181: # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6182: # support --undefined. This deserves some investigation. FIXME
6183: _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6184: else
6185: _LT_TAGVAR(ld_shlibs, $1)=no
6186: fi
6187: ;;
6188:
6189: chorus*)
6190: case $cc_basename in
6191: *)
6192: # FIXME: insert proper C++ library support
6193: _LT_TAGVAR(ld_shlibs, $1)=no
6194: ;;
6195: esac
6196: ;;
6197:
6198: cygwin* | mingw* | pw32* | cegcc*)
6199: case $GXX,$cc_basename in
6200: ,cl* | no,cl*)
6201: # Native MSVC
6202: # hardcode_libdir_flag_spec is actually meaningless, as there is
6203: # no search path for DLLs.
6204: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6205: _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6206: _LT_TAGVAR(always_export_symbols, $1)=yes
6207: _LT_TAGVAR(file_list_spec, $1)='@'
6208: # Tell ltmain to make .lib files, not .a files.
6209: libext=lib
6210: # Tell ltmain to make .dll files, not .so files.
6211: shrext_cmds=".dll"
6212: # FIXME: Setting linknames here is a bad hack.
6213: _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6214: _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6215: $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6216: else
6217: $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6218: fi~
6219: $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6220: linknames='
6221: # The linker will not automatically build a static lib if we build a DLL.
6222: # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6223: _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6224: # Don't use ranlib
6225: _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6226: _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6227: lt_tool_outputfile="@TOOL_OUTPUT@"~
6228: case $lt_outputfile in
6229: *.exe|*.EXE) ;;
6230: *)
6231: lt_outputfile="$lt_outputfile.exe"
6232: lt_tool_outputfile="$lt_tool_outputfile.exe"
6233: ;;
6234: esac~
6235: func_to_tool_file "$lt_outputfile"~
6236: if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6237: $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6238: $RM "$lt_outputfile.manifest";
6239: fi'
6240: ;;
6241: *)
6242: # g++
6243: # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6244: # as there is no search path for DLLs.
6245: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6246: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6247: _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6248: _LT_TAGVAR(always_export_symbols, $1)=no
6249: _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6250:
6251: if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6252: _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6253: # If the export-symbols file already is a .def file (1st line
6254: # is EXPORTS), use it as is; otherwise, prepend...
6255: _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6256: cp $export_symbols $output_objdir/$soname.def;
6257: else
6258: echo EXPORTS > $output_objdir/$soname.def;
6259: cat $export_symbols >> $output_objdir/$soname.def;
6260: fi~
6261: $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6262: else
6263: _LT_TAGVAR(ld_shlibs, $1)=no
6264: fi
6265: ;;
6266: esac
6267: ;;
6268: darwin* | rhapsody*)
6269: _LT_DARWIN_LINKER_FEATURES($1)
6270: ;;
6271:
6272: dgux*)
6273: case $cc_basename in
6274: ec++*)
6275: # FIXME: insert proper C++ library support
6276: _LT_TAGVAR(ld_shlibs, $1)=no
6277: ;;
6278: ghcx*)
6279: # Green Hills C++ Compiler
6280: # FIXME: insert proper C++ library support
6281: _LT_TAGVAR(ld_shlibs, $1)=no
6282: ;;
6283: *)
6284: # FIXME: insert proper C++ library support
6285: _LT_TAGVAR(ld_shlibs, $1)=no
6286: ;;
6287: esac
6288: ;;
6289:
6290: freebsd2.*)
6291: # C++ shared libraries reported to be fairly broken before
6292: # switch to ELF
6293: _LT_TAGVAR(ld_shlibs, $1)=no
6294: ;;
6295:
6296: freebsd-elf*)
6297: _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6298: ;;
6299:
6300: freebsd* | dragonfly*)
6301: # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6302: # conventions
6303: _LT_TAGVAR(ld_shlibs, $1)=yes
6304: ;;
6305:
6306: gnu*)
6307: ;;
6308:
6309: haiku*)
6310: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6311: _LT_TAGVAR(link_all_deplibs, $1)=yes
6312: ;;
6313:
6314: hpux9*)
6315: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6316: _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6317: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6318: _LT_TAGVAR(hardcode_direct, $1)=yes
6319: _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6320: # but as the default
6321: # location of the library.
6322:
6323: case $cc_basename in
6324: CC*)
6325: # FIXME: insert proper C++ library support
6326: _LT_TAGVAR(ld_shlibs, $1)=no
6327: ;;
6328: aCC*)
6329: _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6330: # Commands to make compiler produce verbose output that lists
6331: # what "hidden" libraries, object files and flags are used when
6332: # linking a shared library.
6333: #
6334: # There doesn't appear to be a way to prevent this compiler from
6335: # explicitly linking system object files so we need to strip them
6336: # from the output so that they don't get included in the library
6337: # dependencies.
6338: output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6339: ;;
6340: *)
6341: if test "$GXX" = yes; then
6342: _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6343: else
6344: # FIXME: insert proper C++ library support
6345: _LT_TAGVAR(ld_shlibs, $1)=no
6346: fi
6347: ;;
6348: esac
6349: ;;
6350:
6351: hpux10*|hpux11*)
6352: if test $with_gnu_ld = no; then
6353: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6354: _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6355:
6356: case $host_cpu in
6357: hppa*64*|ia64*)
6358: ;;
6359: *)
6360: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6361: ;;
6362: esac
6363: fi
6364: case $host_cpu in
6365: hppa*64*|ia64*)
6366: _LT_TAGVAR(hardcode_direct, $1)=no
6367: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6368: ;;
6369: *)
6370: _LT_TAGVAR(hardcode_direct, $1)=yes
6371: _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6372: _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6373: # but as the default
6374: # location of the library.
6375: ;;
6376: esac
6377:
6378: case $cc_basename in
6379: CC*)
6380: # FIXME: insert proper C++ library support
6381: _LT_TAGVAR(ld_shlibs, $1)=no
6382: ;;
6383: aCC*)
6384: case $host_cpu in
6385: hppa*64*)
6386: _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6387: ;;
6388: ia64*)
6389: _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6390: ;;
6391: *)
6392: _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6393: ;;
6394: esac
6395: # Commands to make compiler produce verbose output that lists
6396: # what "hidden" libraries, object files and flags are used when
6397: # linking a shared library.
6398: #
6399: # There doesn't appear to be a way to prevent this compiler from
6400: # explicitly linking system object files so we need to strip them
6401: # from the output so that they don't get included in the library
6402: # dependencies.
6403: output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6404: ;;
6405: *)
6406: if test "$GXX" = yes; then
6407: if test $with_gnu_ld = no; then
6408: case $host_cpu in
6409: hppa*64*)
6410: _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6411: ;;
6412: ia64*)
6413: _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6414: ;;
6415: *)
6416: _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6417: ;;
6418: esac
6419: fi
6420: else
6421: # FIXME: insert proper C++ library support
6422: _LT_TAGVAR(ld_shlibs, $1)=no
6423: fi
6424: ;;
6425: esac
6426: ;;
6427:
6428: interix[[3-9]]*)
6429: _LT_TAGVAR(hardcode_direct, $1)=no
6430: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6431: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6432: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6433: # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6434: # Instead, shared libraries are loaded at an image base (0x10000000 by
6435: # default) and relocated if they conflict, which is a slow very memory
6436: # consuming and fragmenting process. To avoid this, we pick a random,
6437: # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6438: # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6439: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6440: _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6441: ;;
6442: irix5* | irix6*)
6443: case $cc_basename in
6444: CC*)
6445: # SGI C++
6446: _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6447:
6448: # Archives containing C++ object files must be created using
6449: # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6450: # necessary to make sure instantiated templates are included
6451: # in the archive.
6452: _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6453: ;;
6454: *)
6455: if test "$GXX" = yes; then
6456: if test "$with_gnu_ld" = no; then
6457: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6458: else
6459: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
6460: fi
6461: fi
6462: _LT_TAGVAR(link_all_deplibs, $1)=yes
6463: ;;
6464: esac
6465: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6466: _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6467: _LT_TAGVAR(inherit_rpath, $1)=yes
6468: ;;
6469:
6470: linux* | k*bsd*-gnu | kopensolaris*-gnu)
6471: case $cc_basename in
6472: KCC*)
6473: # Kuck and Associates, Inc. (KAI) C++ Compiler
6474:
6475: # KCC will only create a shared library if the output file
6476: # ends with ".so" (or ".sl" for HP-UX), so rename the library
6477: # to its proper name (with version) after linking.
6478: _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6479: _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6480: # Commands to make compiler produce verbose output that lists
6481: # what "hidden" libraries, object files and flags are used when
6482: # linking a shared library.
6483: #
6484: # There doesn't appear to be a way to prevent this compiler from
6485: # explicitly linking system object files so we need to strip them
6486: # from the output so that they don't get included in the library
6487: # dependencies.
6488: output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6489:
6490: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6491: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6492:
6493: # Archives containing C++ object files must be created using
6494: # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6495: _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6496: ;;
6497: icpc* | ecpc* )
6498: # Intel C++
6499: with_gnu_ld=yes
6500: # version 8.0 and above of icpc choke on multiply defined symbols
6501: # if we add $predep_objects and $postdep_objects, however 7.1 and
6502: # earlier do not add the objects themselves.
6503: case `$CC -V 2>&1` in
6504: *"Version 7."*)
6505: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6506: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6507: ;;
6508: *) # Version 8.0 or newer
6509: tmp_idyn=
6510: case $host_cpu in
6511: ia64*) tmp_idyn=' -i_dynamic';;
6512: esac
6513: _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6514: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6515: ;;
6516: esac
6517: _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6518: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6519: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6520: _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6521: ;;
6522: pgCC* | pgcpp*)
6523: # Portland Group C++ compiler
6524: case `$CC -V` in
6525: *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6526: _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6527: rm -rf $tpldir~
6528: $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6529: compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6530: _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6531: rm -rf $tpldir~
6532: $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6533: $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6534: $RANLIB $oldlib'
6535: _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6536: rm -rf $tpldir~
6537: $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6538: $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6539: _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6540: rm -rf $tpldir~
6541: $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6542: $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6543: ;;
6544: *) # Version 6 and above use weak symbols
6545: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6546: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6547: ;;
6548: esac
6549:
6550: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6551: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6552: _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6553: ;;
6554: cxx*)
6555: # Compaq C++
6556: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6557: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
6558:
6559: runpath_var=LD_RUN_PATH
6560: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6561: _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6562:
6563: # Commands to make compiler produce verbose output that lists
6564: # what "hidden" libraries, object files and flags are used when
6565: # linking a shared library.
6566: #
6567: # There doesn't appear to be a way to prevent this compiler from
6568: # explicitly linking system object files so we need to strip them
6569: # from the output so that they don't get included in the library
6570: # dependencies.
6571: output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
6572: ;;
6573: xl* | mpixl* | bgxl*)
6574: # IBM XL 8.0 on PPC, with GNU ld
6575: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6576: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6577: _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6578: if test "x$supports_anon_versioning" = xyes; then
6579: _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6580: cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6581: echo "local: *; };" >> $output_objdir/$libname.ver~
6582: $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6583: fi
6584: ;;
6585: *)
6586: case `$CC -V 2>&1 | sed 5q` in
6587: *Sun\ C*)
6588: # Sun C++ 5.9
6589: _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6590: _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6591: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6592: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6593: _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6594: _LT_TAGVAR(compiler_needs_object, $1)=yes
6595:
6596: # Not sure whether something based on
6597: # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6598: # would be better.
6599: output_verbose_link_cmd='func_echo_all'
6600:
6601: # Archives containing C++ object files must be created using
6602: # "CC -xar", where "CC" is the Sun C++ compiler. This is
6603: # necessary to make sure instantiated templates are included
6604: # in the archive.
6605: _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6606: ;;
6607: esac
6608: ;;
6609: esac
6610: ;;
6611:
6612: lynxos*)
6613: # FIXME: insert proper C++ library support
6614: _LT_TAGVAR(ld_shlibs, $1)=no
6615: ;;
6616:
6617: m88k*)
6618: # FIXME: insert proper C++ library support
6619: _LT_TAGVAR(ld_shlibs, $1)=no
6620: ;;
6621:
6622: mvs*)
6623: case $cc_basename in
6624: cxx*)
6625: # FIXME: insert proper C++ library support
6626: _LT_TAGVAR(ld_shlibs, $1)=no
6627: ;;
6628: *)
6629: # FIXME: insert proper C++ library support
6630: _LT_TAGVAR(ld_shlibs, $1)=no
6631: ;;
6632: esac
6633: ;;
6634:
6635: netbsd*)
6636: if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6637: _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6638: wlarc=
6639: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6640: _LT_TAGVAR(hardcode_direct, $1)=yes
6641: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6642: fi
6643: # Workaround some broken pre-1.5 toolchains
6644: output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6645: ;;
6646:
6647: *nto* | *qnx*)
6648: _LT_TAGVAR(ld_shlibs, $1)=yes
6649: ;;
6650:
6651: openbsd2*)
6652: # C++ shared libraries are fairly broken
6653: _LT_TAGVAR(ld_shlibs, $1)=no
6654: ;;
6655:
6656: openbsd*)
6657: if test -f /usr/libexec/ld.so; then
6658: _LT_TAGVAR(hardcode_direct, $1)=yes
6659: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6660: _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6661: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6662: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6663: if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6664: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6665: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6666: _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6667: fi
6668: output_verbose_link_cmd=func_echo_all
6669: else
6670: _LT_TAGVAR(ld_shlibs, $1)=no
6671: fi
6672: ;;
6673:
6674: osf3* | osf4* | osf5*)
6675: case $cc_basename in
6676: KCC*)
6677: # Kuck and Associates, Inc. (KAI) C++ Compiler
6678:
6679: # KCC will only create a shared library if the output file
6680: # ends with ".so" (or ".sl" for HP-UX), so rename the library
6681: # to its proper name (with version) after linking.
6682: _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6683:
6684: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6685: _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6686:
6687: # Archives containing C++ object files must be created using
6688: # the KAI C++ compiler.
6689: case $host in
6690: osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6691: *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6692: esac
6693: ;;
6694: RCC*)
6695: # Rational C++ 2.4.1
6696: # FIXME: insert proper C++ library support
6697: _LT_TAGVAR(ld_shlibs, $1)=no
6698: ;;
6699: cxx*)
6700: case $host in
6701: osf3*)
6702: _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6703: _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6704: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6705: ;;
6706: *)
6707: _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6708: _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6709: _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6710: echo "-hidden">> $lib.exp~
6711: $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
6712: $RM $lib.exp'
6713: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6714: ;;
6715: esac
6716:
6717: _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6718:
6719: # Commands to make compiler produce verbose output that lists
6720: # what "hidden" libraries, object files and flags are used when
6721: # linking a shared library.
6722: #
6723: # There doesn't appear to be a way to prevent this compiler from
6724: # explicitly linking system object files so we need to strip them
6725: # from the output so that they don't get included in the library
6726: # dependencies.
6727: output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6728: ;;
6729: *)
6730: if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6731: _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6732: case $host in
6733: osf3*)
6734: _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6735: ;;
6736: *)
6737: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6738: ;;
6739: esac
6740:
6741: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6742: _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6743:
6744: # Commands to make compiler produce verbose output that lists
6745: # what "hidden" libraries, object files and flags are used when
6746: # linking a shared library.
6747: output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6748:
6749: else
6750: # FIXME: insert proper C++ library support
6751: _LT_TAGVAR(ld_shlibs, $1)=no
6752: fi
6753: ;;
6754: esac
6755: ;;
6756:
6757: psos*)
6758: # FIXME: insert proper C++ library support
6759: _LT_TAGVAR(ld_shlibs, $1)=no
6760: ;;
6761:
6762: sunos4*)
6763: case $cc_basename in
6764: CC*)
6765: # Sun C++ 4.x
6766: # FIXME: insert proper C++ library support
6767: _LT_TAGVAR(ld_shlibs, $1)=no
6768: ;;
6769: lcc*)
6770: # Lucid
6771: # FIXME: insert proper C++ library support
6772: _LT_TAGVAR(ld_shlibs, $1)=no
6773: ;;
6774: *)
6775: # FIXME: insert proper C++ library support
6776: _LT_TAGVAR(ld_shlibs, $1)=no
6777: ;;
6778: esac
6779: ;;
6780:
6781: solaris*)
6782: case $cc_basename in
6783: CC* | sunCC*)
6784: # Sun C++ 4.2, 5.x and Centerline C++
6785: _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6786: _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6787: _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6788: _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6789: $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6790:
6791: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6792: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6793: case $host_os in
6794: solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6795: *)
6796: # The compiler driver will combine and reorder linker options,
6797: # but understands `-z linker_flag'.
6798: # Supported since Solaris 2.6 (maybe 2.5.1?)
6799: _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6800: ;;
6801: esac
6802: _LT_TAGVAR(link_all_deplibs, $1)=yes
6803:
6804: output_verbose_link_cmd='func_echo_all'
6805:
6806: # Archives containing C++ object files must be created using
6807: # "CC -xar", where "CC" is the Sun C++ compiler. This is
6808: # necessary to make sure instantiated templates are included
6809: # in the archive.
6810: _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6811: ;;
6812: gcx*)
6813: # Green Hills C++ Compiler
6814: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6815:
6816: # The C++ compiler must be used to create the archive.
6817: _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6818: ;;
6819: *)
6820: # GNU C++ compiler with Solaris linker
6821: if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6822: _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6823: if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6824: _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6825: _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6826: $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6827:
6828: # Commands to make compiler produce verbose output that lists
6829: # what "hidden" libraries, object files and flags are used when
6830: # linking a shared library.
6831: output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6832: else
6833: # g++ 2.7 appears to require `-G' NOT `-shared' on this
6834: # platform.
6835: _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6836: _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6837: $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6838:
6839: # Commands to make compiler produce verbose output that lists
6840: # what "hidden" libraries, object files and flags are used when
6841: # linking a shared library.
6842: output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6843: fi
6844:
6845: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6846: case $host_os in
6847: solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6848: *)
6849: _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6850: ;;
6851: esac
6852: fi
6853: ;;
6854: esac
6855: ;;
6856:
6857: sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6858: _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6859: _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6860: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6861: runpath_var='LD_RUN_PATH'
6862:
6863: case $cc_basename in
6864: CC*)
6865: _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6866: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6867: ;;
6868: *)
6869: _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6870: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6871: ;;
6872: esac
6873: ;;
6874:
6875: sysv5* | sco3.2v5* | sco5v6*)
6876: # Note: We can NOT use -z defs as we might desire, because we do not
6877: # link with -lc, and that would cause any symbols used from libc to
6878: # always be unresolved, which means just about no library would
6879: # ever link correctly. If we're not using GNU ld we use -z text
6880: # though, which does catch some bad symbols but isn't as heavy-handed
6881: # as -z defs.
6882: _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6883: _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6884: _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6885: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6886: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6887: _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6888: _LT_TAGVAR(link_all_deplibs, $1)=yes
6889: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6890: runpath_var='LD_RUN_PATH'
6891:
6892: case $cc_basename in
6893: CC*)
6894: _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6895: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6896: _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6897: '"$_LT_TAGVAR(old_archive_cmds, $1)"
6898: _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6899: '"$_LT_TAGVAR(reload_cmds, $1)"
6900: ;;
6901: *)
6902: _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6903: _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6904: ;;
6905: esac
6906: ;;
6907:
6908: tandem*)
6909: case $cc_basename in
6910: NCC*)
6911: # NonStop-UX NCC 3.20
6912: # FIXME: insert proper C++ library support
6913: _LT_TAGVAR(ld_shlibs, $1)=no
6914: ;;
6915: *)
6916: # FIXME: insert proper C++ library support
6917: _LT_TAGVAR(ld_shlibs, $1)=no
6918: ;;
6919: esac
6920: ;;
6921:
6922: vxworks*)
6923: # FIXME: insert proper C++ library support
6924: _LT_TAGVAR(ld_shlibs, $1)=no
6925: ;;
6926:
6927: *)
6928: # FIXME: insert proper C++ library support
6929: _LT_TAGVAR(ld_shlibs, $1)=no
6930: ;;
6931: esac
6932:
6933: AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6934: test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6935:
6936: _LT_TAGVAR(GCC, $1)="$GXX"
6937: _LT_TAGVAR(LD, $1)="$LD"
6938:
6939: ## CAVEAT EMPTOR:
6940: ## There is no encapsulation within the following macros, do not change
6941: ## the running order or otherwise move them around unless you know exactly
6942: ## what you are doing...
6943: _LT_SYS_HIDDEN_LIBDEPS($1)
6944: _LT_COMPILER_PIC($1)
6945: _LT_COMPILER_C_O($1)
6946: _LT_COMPILER_FILE_LOCKS($1)
6947: _LT_LINKER_SHLIBS($1)
6948: _LT_SYS_DYNAMIC_LINKER($1)
6949: _LT_LINKER_HARDCODE_LIBPATH($1)
6950:
6951: _LT_CONFIG($1)
6952: fi # test -n "$compiler"
6953:
6954: CC=$lt_save_CC
6955: CFLAGS=$lt_save_CFLAGS
6956: LDCXX=$LD
6957: LD=$lt_save_LD
6958: GCC=$lt_save_GCC
6959: with_gnu_ld=$lt_save_with_gnu_ld
6960: lt_cv_path_LDCXX=$lt_cv_path_LD
6961: lt_cv_path_LD=$lt_save_path_LD
6962: lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6963: lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6964: fi # test "$_lt_caught_CXX_error" != yes
6965:
6966: AC_LANG_POP
6967: ])# _LT_LANG_CXX_CONFIG
6968:
6969:
6970: # _LT_FUNC_STRIPNAME_CNF
6971: # ----------------------
6972: # func_stripname_cnf prefix suffix name
6973: # strip PREFIX and SUFFIX off of NAME.
6974: # PREFIX and SUFFIX must not contain globbing or regex special
6975: # characters, hashes, percent signs, but SUFFIX may contain a leading
6976: # dot (in which case that matches only a dot).
6977: #
6978: # This function is identical to the (non-XSI) version of func_stripname,
6979: # except this one can be used by m4 code that may be executed by configure,
6980: # rather than the libtool script.
6981: m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6982: AC_REQUIRE([_LT_DECL_SED])
6983: AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6984: func_stripname_cnf ()
6985: {
6986: case ${2} in
6987: .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6988: *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6989: esac
6990: } # func_stripname_cnf
6991: ])# _LT_FUNC_STRIPNAME_CNF
6992:
6993: # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6994: # ---------------------------------
6995: # Figure out "hidden" library dependencies from verbose
6996: # compiler output when linking a shared library.
6997: # Parse the compiler output and extract the necessary
6998: # objects, libraries and library flags.
6999: m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7000: [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7001: AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7002: # Dependencies to place before and after the object being linked:
7003: _LT_TAGVAR(predep_objects, $1)=
7004: _LT_TAGVAR(postdep_objects, $1)=
7005: _LT_TAGVAR(predeps, $1)=
7006: _LT_TAGVAR(postdeps, $1)=
7007: _LT_TAGVAR(compiler_lib_search_path, $1)=
7008:
7009: dnl we can't use the lt_simple_compile_test_code here,
7010: dnl because it contains code intended for an executable,
7011: dnl not a library. It's possible we should let each
7012: dnl tag define a new lt_????_link_test_code variable,
7013: dnl but it's only used here...
7014: m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7015: int a;
7016: void foo (void) { a = 0; }
7017: _LT_EOF
7018: ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7019: class Foo
7020: {
7021: public:
7022: Foo (void) { a = 0; }
7023: private:
7024: int a;
7025: };
7026: _LT_EOF
7027: ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7028: subroutine foo
7029: implicit none
7030: integer*4 a
7031: a=0
7032: return
7033: end
7034: _LT_EOF
7035: ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7036: subroutine foo
7037: implicit none
7038: integer a
7039: a=0
7040: return
7041: end
7042: _LT_EOF
7043: ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7044: public class foo {
7045: private int a;
7046: public void bar (void) {
7047: a = 0;
7048: }
7049: };
7050: _LT_EOF
7051: ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7052: package foo
7053: func foo() {
7054: }
7055: _LT_EOF
7056: ])
7057:
7058: _lt_libdeps_save_CFLAGS=$CFLAGS
7059: case "$CC $CFLAGS " in #(
7060: *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7061: *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7062: *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7063: esac
7064:
7065: dnl Parse the compiler output and extract the necessary
7066: dnl objects, libraries and library flags.
7067: if AC_TRY_EVAL(ac_compile); then
7068: # Parse the compiler output and extract the necessary
7069: # objects, libraries and library flags.
7070:
7071: # Sentinel used to keep track of whether or not we are before
7072: # the conftest object file.
7073: pre_test_object_deps_done=no
7074:
7075: for p in `eval "$output_verbose_link_cmd"`; do
7076: case ${prev}${p} in
7077:
7078: -L* | -R* | -l*)
7079: # Some compilers place space between "-{L,R}" and the path.
7080: # Remove the space.
7081: if test $p = "-L" ||
7082: test $p = "-R"; then
7083: prev=$p
7084: continue
7085: fi
7086:
7087: # Expand the sysroot to ease extracting the directories later.
7088: if test -z "$prev"; then
7089: case $p in
7090: -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7091: -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7092: -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7093: esac
7094: fi
7095: case $p in
7096: =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7097: esac
7098: if test "$pre_test_object_deps_done" = no; then
7099: case ${prev} in
7100: -L | -R)
7101: # Internal compiler library paths should come after those
7102: # provided the user. The postdeps already come after the
7103: # user supplied libs so there is no need to process them.
7104: if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7105: _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7106: else
7107: _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7108: fi
7109: ;;
7110: # The "-l" case would never come before the object being
7111: # linked, so don't bother handling this case.
7112: esac
7113: else
7114: if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7115: _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7116: else
7117: _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7118: fi
7119: fi
7120: prev=
7121: ;;
7122:
7123: *.lto.$objext) ;; # Ignore GCC LTO objects
7124: *.$objext)
7125: # This assumes that the test object file only shows up
7126: # once in the compiler output.
7127: if test "$p" = "conftest.$objext"; then
7128: pre_test_object_deps_done=yes
7129: continue
7130: fi
7131:
7132: if test "$pre_test_object_deps_done" = no; then
7133: if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7134: _LT_TAGVAR(predep_objects, $1)="$p"
7135: else
7136: _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7137: fi
7138: else
7139: if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7140: _LT_TAGVAR(postdep_objects, $1)="$p"
7141: else
7142: _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7143: fi
7144: fi
7145: ;;
7146:
7147: *) ;; # Ignore the rest.
7148:
7149: esac
7150: done
7151:
7152: # Clean up.
7153: rm -f a.out a.exe
7154: else
7155: echo "libtool.m4: error: problem compiling $1 test program"
7156: fi
7157:
7158: $RM -f confest.$objext
7159: CFLAGS=$_lt_libdeps_save_CFLAGS
7160:
7161: # PORTME: override above test on systems where it is broken
7162: m4_if([$1], [CXX],
7163: [case $host_os in
7164: interix[[3-9]]*)
7165: # Interix 3.5 installs completely hosed .la files for C++, so rather than
7166: # hack all around it, let's just trust "g++" to DTRT.
7167: _LT_TAGVAR(predep_objects,$1)=
7168: _LT_TAGVAR(postdep_objects,$1)=
7169: _LT_TAGVAR(postdeps,$1)=
7170: ;;
7171:
7172: linux*)
7173: case `$CC -V 2>&1 | sed 5q` in
7174: *Sun\ C*)
7175: # Sun C++ 5.9
7176:
7177: # The more standards-conforming stlport4 library is
7178: # incompatible with the Cstd library. Avoid specifying
7179: # it if it's in CXXFLAGS. Ignore libCrun as
7180: # -library=stlport4 depends on it.
7181: case " $CXX $CXXFLAGS " in
7182: *" -library=stlport4 "*)
7183: solaris_use_stlport4=yes
7184: ;;
7185: esac
7186:
7187: if test "$solaris_use_stlport4" != yes; then
7188: _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7189: fi
7190: ;;
7191: esac
7192: ;;
7193:
7194: solaris*)
7195: case $cc_basename in
7196: CC* | sunCC*)
7197: # The more standards-conforming stlport4 library is
7198: # incompatible with the Cstd library. Avoid specifying
7199: # it if it's in CXXFLAGS. Ignore libCrun as
7200: # -library=stlport4 depends on it.
7201: case " $CXX $CXXFLAGS " in
7202: *" -library=stlport4 "*)
7203: solaris_use_stlport4=yes
7204: ;;
7205: esac
7206:
7207: # Adding this requires a known-good setup of shared libraries for
7208: # Sun compiler versions before 5.6, else PIC objects from an old
7209: # archive will be linked into the output, leading to subtle bugs.
7210: if test "$solaris_use_stlport4" != yes; then
7211: _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7212: fi
7213: ;;
7214: esac
7215: ;;
7216: esac
7217: ])
7218:
7219: case " $_LT_TAGVAR(postdeps, $1) " in
7220: *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7221: esac
7222: _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7223: if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7224: _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7225: fi
7226: _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7227: [The directories searched by this compiler when creating a shared library])
7228: _LT_TAGDECL([], [predep_objects], [1],
7229: [Dependencies to place before and after the objects being linked to
7230: create a shared library])
7231: _LT_TAGDECL([], [postdep_objects], [1])
7232: _LT_TAGDECL([], [predeps], [1])
7233: _LT_TAGDECL([], [postdeps], [1])
7234: _LT_TAGDECL([], [compiler_lib_search_path], [1],
7235: [The library search path used internally by the compiler when linking
7236: a shared library])
7237: ])# _LT_SYS_HIDDEN_LIBDEPS
7238:
7239:
7240: # _LT_LANG_F77_CONFIG([TAG])
7241: # --------------------------
7242: # Ensure that the configuration variables for a Fortran 77 compiler are
7243: # suitably defined. These variables are subsequently used by _LT_CONFIG
7244: # to write the compiler configuration to `libtool'.
7245: m4_defun([_LT_LANG_F77_CONFIG],
7246: [AC_LANG_PUSH(Fortran 77)
7247: if test -z "$F77" || test "X$F77" = "Xno"; then
7248: _lt_disable_F77=yes
7249: fi
7250:
7251: _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7252: _LT_TAGVAR(allow_undefined_flag, $1)=
7253: _LT_TAGVAR(always_export_symbols, $1)=no
7254: _LT_TAGVAR(archive_expsym_cmds, $1)=
7255: _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7256: _LT_TAGVAR(hardcode_direct, $1)=no
7257: _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7258: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7259: _LT_TAGVAR(hardcode_libdir_separator, $1)=
7260: _LT_TAGVAR(hardcode_minus_L, $1)=no
7261: _LT_TAGVAR(hardcode_automatic, $1)=no
7262: _LT_TAGVAR(inherit_rpath, $1)=no
7263: _LT_TAGVAR(module_cmds, $1)=
7264: _LT_TAGVAR(module_expsym_cmds, $1)=
7265: _LT_TAGVAR(link_all_deplibs, $1)=unknown
7266: _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7267: _LT_TAGVAR(reload_flag, $1)=$reload_flag
7268: _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7269: _LT_TAGVAR(no_undefined_flag, $1)=
7270: _LT_TAGVAR(whole_archive_flag_spec, $1)=
7271: _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7272:
7273: # Source file extension for f77 test sources.
7274: ac_ext=f
7275:
7276: # Object file extension for compiled f77 test sources.
7277: objext=o
7278: _LT_TAGVAR(objext, $1)=$objext
7279:
7280: # No sense in running all these tests if we already determined that
7281: # the F77 compiler isn't working. Some variables (like enable_shared)
7282: # are currently assumed to apply to all compilers on this platform,
7283: # and will be corrupted by setting them based on a non-working compiler.
7284: if test "$_lt_disable_F77" != yes; then
7285: # Code to be used in simple compile tests
7286: lt_simple_compile_test_code="\
7287: subroutine t
7288: return
7289: end
7290: "
7291:
7292: # Code to be used in simple link tests
7293: lt_simple_link_test_code="\
7294: program t
7295: end
7296: "
7297:
7298: # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7299: _LT_TAG_COMPILER
7300:
7301: # save warnings/boilerplate of simple test code
7302: _LT_COMPILER_BOILERPLATE
7303: _LT_LINKER_BOILERPLATE
7304:
7305: # Allow CC to be a program name with arguments.
7306: lt_save_CC="$CC"
7307: lt_save_GCC=$GCC
7308: lt_save_CFLAGS=$CFLAGS
7309: CC=${F77-"f77"}
7310: CFLAGS=$FFLAGS
7311: compiler=$CC
7312: _LT_TAGVAR(compiler, $1)=$CC
7313: _LT_CC_BASENAME([$compiler])
7314: GCC=$G77
7315: if test -n "$compiler"; then
7316: AC_MSG_CHECKING([if libtool supports shared libraries])
7317: AC_MSG_RESULT([$can_build_shared])
7318:
7319: AC_MSG_CHECKING([whether to build shared libraries])
7320: test "$can_build_shared" = "no" && enable_shared=no
7321:
7322: # On AIX, shared libraries and static libraries use the same namespace, and
7323: # are all built from PIC.
7324: case $host_os in
7325: aix3*)
7326: test "$enable_shared" = yes && enable_static=no
7327: if test -n "$RANLIB"; then
7328: archive_cmds="$archive_cmds~\$RANLIB \$lib"
7329: postinstall_cmds='$RANLIB $lib'
7330: fi
7331: ;;
7332: aix[[4-9]]*)
7333: if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7334: test "$enable_shared" = yes && enable_static=no
7335: fi
7336: ;;
7337: esac
7338: AC_MSG_RESULT([$enable_shared])
7339:
7340: AC_MSG_CHECKING([whether to build static libraries])
7341: # Make sure either enable_shared or enable_static is yes.
7342: test "$enable_shared" = yes || enable_static=yes
7343: AC_MSG_RESULT([$enable_static])
7344:
7345: _LT_TAGVAR(GCC, $1)="$G77"
7346: _LT_TAGVAR(LD, $1)="$LD"
7347:
7348: ## CAVEAT EMPTOR:
7349: ## There is no encapsulation within the following macros, do not change
7350: ## the running order or otherwise move them around unless you know exactly
7351: ## what you are doing...
7352: _LT_COMPILER_PIC($1)
7353: _LT_COMPILER_C_O($1)
7354: _LT_COMPILER_FILE_LOCKS($1)
7355: _LT_LINKER_SHLIBS($1)
7356: _LT_SYS_DYNAMIC_LINKER($1)
7357: _LT_LINKER_HARDCODE_LIBPATH($1)
7358:
7359: _LT_CONFIG($1)
7360: fi # test -n "$compiler"
7361:
7362: GCC=$lt_save_GCC
7363: CC="$lt_save_CC"
7364: CFLAGS="$lt_save_CFLAGS"
7365: fi # test "$_lt_disable_F77" != yes
7366:
7367: AC_LANG_POP
7368: ])# _LT_LANG_F77_CONFIG
7369:
7370:
7371: # _LT_LANG_FC_CONFIG([TAG])
7372: # -------------------------
7373: # Ensure that the configuration variables for a Fortran compiler are
7374: # suitably defined. These variables are subsequently used by _LT_CONFIG
7375: # to write the compiler configuration to `libtool'.
7376: m4_defun([_LT_LANG_FC_CONFIG],
7377: [AC_LANG_PUSH(Fortran)
7378:
7379: if test -z "$FC" || test "X$FC" = "Xno"; then
7380: _lt_disable_FC=yes
7381: fi
7382:
7383: _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7384: _LT_TAGVAR(allow_undefined_flag, $1)=
7385: _LT_TAGVAR(always_export_symbols, $1)=no
7386: _LT_TAGVAR(archive_expsym_cmds, $1)=
7387: _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7388: _LT_TAGVAR(hardcode_direct, $1)=no
7389: _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7390: _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7391: _LT_TAGVAR(hardcode_libdir_separator, $1)=
7392: _LT_TAGVAR(hardcode_minus_L, $1)=no
7393: _LT_TAGVAR(hardcode_automatic, $1)=no
7394: _LT_TAGVAR(inherit_rpath, $1)=no
7395: _LT_TAGVAR(module_cmds, $1)=
7396: _LT_TAGVAR(module_expsym_cmds, $1)=
7397: _LT_TAGVAR(link_all_deplibs, $1)=unknown
7398: _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7399: _LT_TAGVAR(reload_flag, $1)=$reload_flag
7400: _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7401: _LT_TAGVAR(no_undefined_flag, $1)=
7402: _LT_TAGVAR(whole_archive_flag_spec, $1)=
7403: _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7404:
7405: # Source file extension for fc test sources.
7406: ac_ext=${ac_fc_srcext-f}
7407:
7408: # Object file extension for compiled fc test sources.
7409: objext=o
7410: _LT_TAGVAR(objext, $1)=$objext
7411:
7412: # No sense in running all these tests if we already determined that
7413: # the FC compiler isn't working. Some variables (like enable_shared)
7414: # are currently assumed to apply to all compilers on this platform,
7415: # and will be corrupted by setting them based on a non-working compiler.
7416: if test "$_lt_disable_FC" != yes; then
7417: # Code to be used in simple compile tests
7418: lt_simple_compile_test_code="\
7419: subroutine t
7420: return
7421: end
7422: "
7423:
7424: # Code to be used in simple link tests
7425: lt_simple_link_test_code="\
7426: program t
7427: end
7428: "
7429:
7430: # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7431: _LT_TAG_COMPILER
7432:
7433: # save warnings/boilerplate of simple test code
7434: _LT_COMPILER_BOILERPLATE
7435: _LT_LINKER_BOILERPLATE
7436:
7437: # Allow CC to be a program name with arguments.
7438: lt_save_CC="$CC"
7439: lt_save_GCC=$GCC
7440: lt_save_CFLAGS=$CFLAGS
7441: CC=${FC-"f95"}
7442: CFLAGS=$FCFLAGS
7443: compiler=$CC
7444: GCC=$ac_cv_fc_compiler_gnu
7445:
7446: _LT_TAGVAR(compiler, $1)=$CC
7447: _LT_CC_BASENAME([$compiler])
7448:
7449: if test -n "$compiler"; then
7450: AC_MSG_CHECKING([if libtool supports shared libraries])
7451: AC_MSG_RESULT([$can_build_shared])
7452:
7453: AC_MSG_CHECKING([whether to build shared libraries])
7454: test "$can_build_shared" = "no" && enable_shared=no
7455:
7456: # On AIX, shared libraries and static libraries use the same namespace, and
7457: # are all built from PIC.
7458: case $host_os in
7459: aix3*)
7460: test "$enable_shared" = yes && enable_static=no
7461: if test -n "$RANLIB"; then
7462: archive_cmds="$archive_cmds~\$RANLIB \$lib"
7463: postinstall_cmds='$RANLIB $lib'
7464: fi
7465: ;;
7466: aix[[4-9]]*)
7467: if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7468: test "$enable_shared" = yes && enable_static=no
7469: fi
7470: ;;
7471: esac
7472: AC_MSG_RESULT([$enable_shared])
7473:
7474: AC_MSG_CHECKING([whether to build static libraries])
7475: # Make sure either enable_shared or enable_static is yes.
7476: test "$enable_shared" = yes || enable_static=yes
7477: AC_MSG_RESULT([$enable_static])
7478:
7479: _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7480: _LT_TAGVAR(LD, $1)="$LD"
7481:
7482: ## CAVEAT EMPTOR:
7483: ## There is no encapsulation within the following macros, do not change
7484: ## the running order or otherwise move them around unless you know exactly
7485: ## what you are doing...
7486: _LT_SYS_HIDDEN_LIBDEPS($1)
7487: _LT_COMPILER_PIC($1)
7488: _LT_COMPILER_C_O($1)
7489: _LT_COMPILER_FILE_LOCKS($1)
7490: _LT_LINKER_SHLIBS($1)
7491: _LT_SYS_DYNAMIC_LINKER($1)
7492: _LT_LINKER_HARDCODE_LIBPATH($1)
7493:
7494: _LT_CONFIG($1)
7495: fi # test -n "$compiler"
7496:
7497: GCC=$lt_save_GCC
7498: CC=$lt_save_CC
7499: CFLAGS=$lt_save_CFLAGS
7500: fi # test "$_lt_disable_FC" != yes
7501:
7502: AC_LANG_POP
7503: ])# _LT_LANG_FC_CONFIG
7504:
7505:
7506: # _LT_LANG_GCJ_CONFIG([TAG])
7507: # --------------------------
7508: # Ensure that the configuration variables for the GNU Java Compiler compiler
7509: # are suitably defined. These variables are subsequently used by _LT_CONFIG
7510: # to write the compiler configuration to `libtool'.
7511: m4_defun([_LT_LANG_GCJ_CONFIG],
7512: [AC_REQUIRE([LT_PROG_GCJ])dnl
7513: AC_LANG_SAVE
7514:
7515: # Source file extension for Java test sources.
7516: ac_ext=java
7517:
7518: # Object file extension for compiled Java test sources.
7519: objext=o
7520: _LT_TAGVAR(objext, $1)=$objext
7521:
7522: # Code to be used in simple compile tests
7523: lt_simple_compile_test_code="class foo {}"
7524:
7525: # Code to be used in simple link tests
7526: lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7527:
7528: # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7529: _LT_TAG_COMPILER
7530:
7531: # save warnings/boilerplate of simple test code
7532: _LT_COMPILER_BOILERPLATE
7533: _LT_LINKER_BOILERPLATE
7534:
7535: # Allow CC to be a program name with arguments.
7536: lt_save_CC=$CC
7537: lt_save_CFLAGS=$CFLAGS
7538: lt_save_GCC=$GCC
7539: GCC=yes
7540: CC=${GCJ-"gcj"}
7541: CFLAGS=$GCJFLAGS
7542: compiler=$CC
7543: _LT_TAGVAR(compiler, $1)=$CC
7544: _LT_TAGVAR(LD, $1)="$LD"
7545: _LT_CC_BASENAME([$compiler])
7546:
7547: # GCJ did not exist at the time GCC didn't implicitly link libc in.
7548: _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7549:
7550: _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7551: _LT_TAGVAR(reload_flag, $1)=$reload_flag
7552: _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7553:
7554: if test -n "$compiler"; then
7555: _LT_COMPILER_NO_RTTI($1)
7556: _LT_COMPILER_PIC($1)
7557: _LT_COMPILER_C_O($1)
7558: _LT_COMPILER_FILE_LOCKS($1)
7559: _LT_LINKER_SHLIBS($1)
7560: _LT_LINKER_HARDCODE_LIBPATH($1)
7561:
7562: _LT_CONFIG($1)
7563: fi
7564:
7565: AC_LANG_RESTORE
7566:
7567: GCC=$lt_save_GCC
7568: CC=$lt_save_CC
7569: CFLAGS=$lt_save_CFLAGS
7570: ])# _LT_LANG_GCJ_CONFIG
7571:
7572:
7573: # _LT_LANG_GO_CONFIG([TAG])
7574: # --------------------------
7575: # Ensure that the configuration variables for the GNU Go compiler
7576: # are suitably defined. These variables are subsequently used by _LT_CONFIG
7577: # to write the compiler configuration to `libtool'.
7578: m4_defun([_LT_LANG_GO_CONFIG],
7579: [AC_REQUIRE([LT_PROG_GO])dnl
7580: AC_LANG_SAVE
7581:
7582: # Source file extension for Go test sources.
7583: ac_ext=go
7584:
7585: # Object file extension for compiled Go test sources.
7586: objext=o
7587: _LT_TAGVAR(objext, $1)=$objext
7588:
7589: # Code to be used in simple compile tests
7590: lt_simple_compile_test_code="package main; func main() { }"
7591:
7592: # Code to be used in simple link tests
7593: lt_simple_link_test_code='package main; func main() { }'
7594:
7595: # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7596: _LT_TAG_COMPILER
7597:
7598: # save warnings/boilerplate of simple test code
7599: _LT_COMPILER_BOILERPLATE
7600: _LT_LINKER_BOILERPLATE
7601:
7602: # Allow CC to be a program name with arguments.
7603: lt_save_CC=$CC
7604: lt_save_CFLAGS=$CFLAGS
7605: lt_save_GCC=$GCC
7606: GCC=yes
7607: CC=${GOC-"gccgo"}
7608: CFLAGS=$GOFLAGS
7609: compiler=$CC
7610: _LT_TAGVAR(compiler, $1)=$CC
7611: _LT_TAGVAR(LD, $1)="$LD"
7612: _LT_CC_BASENAME([$compiler])
7613:
7614: # Go did not exist at the time GCC didn't implicitly link libc in.
7615: _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7616:
7617: _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7618: _LT_TAGVAR(reload_flag, $1)=$reload_flag
7619: _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7620:
7621: if test -n "$compiler"; then
7622: _LT_COMPILER_NO_RTTI($1)
7623: _LT_COMPILER_PIC($1)
7624: _LT_COMPILER_C_O($1)
7625: _LT_COMPILER_FILE_LOCKS($1)
7626: _LT_LINKER_SHLIBS($1)
7627: _LT_LINKER_HARDCODE_LIBPATH($1)
7628:
7629: _LT_CONFIG($1)
7630: fi
7631:
7632: AC_LANG_RESTORE
7633:
7634: GCC=$lt_save_GCC
7635: CC=$lt_save_CC
7636: CFLAGS=$lt_save_CFLAGS
7637: ])# _LT_LANG_GO_CONFIG
7638:
7639:
7640: # _LT_LANG_RC_CONFIG([TAG])
7641: # -------------------------
7642: # Ensure that the configuration variables for the Windows resource compiler
7643: # are suitably defined. These variables are subsequently used by _LT_CONFIG
7644: # to write the compiler configuration to `libtool'.
7645: m4_defun([_LT_LANG_RC_CONFIG],
7646: [AC_REQUIRE([LT_PROG_RC])dnl
7647: AC_LANG_SAVE
7648:
7649: # Source file extension for RC test sources.
7650: ac_ext=rc
7651:
7652: # Object file extension for compiled RC test sources.
7653: objext=o
7654: _LT_TAGVAR(objext, $1)=$objext
7655:
7656: # Code to be used in simple compile tests
7657: lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7658:
7659: # Code to be used in simple link tests
7660: lt_simple_link_test_code="$lt_simple_compile_test_code"
7661:
7662: # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7663: _LT_TAG_COMPILER
7664:
7665: # save warnings/boilerplate of simple test code
7666: _LT_COMPILER_BOILERPLATE
7667: _LT_LINKER_BOILERPLATE
7668:
7669: # Allow CC to be a program name with arguments.
7670: lt_save_CC="$CC"
7671: lt_save_CFLAGS=$CFLAGS
7672: lt_save_GCC=$GCC
7673: GCC=
7674: CC=${RC-"windres"}
7675: CFLAGS=
7676: compiler=$CC
7677: _LT_TAGVAR(compiler, $1)=$CC
7678: _LT_CC_BASENAME([$compiler])
7679: _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7680:
7681: if test -n "$compiler"; then
7682: :
7683: _LT_CONFIG($1)
7684: fi
7685:
7686: GCC=$lt_save_GCC
7687: AC_LANG_RESTORE
7688: CC=$lt_save_CC
7689: CFLAGS=$lt_save_CFLAGS
7690: ])# _LT_LANG_RC_CONFIG
7691:
7692:
7693: # LT_PROG_GCJ
7694: # -----------
7695: AC_DEFUN([LT_PROG_GCJ],
7696: [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7697: [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7698: [AC_CHECK_TOOL(GCJ, gcj,)
7699: test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7700: AC_SUBST(GCJFLAGS)])])[]dnl
7701: ])
7702:
7703: # Old name:
7704: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7705: dnl aclocal-1.4 backwards compatibility:
7706: dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7707:
7708:
7709: # LT_PROG_GO
7710: # ----------
7711: AC_DEFUN([LT_PROG_GO],
7712: [AC_CHECK_TOOL(GOC, gccgo,)
7713: ])
7714:
7715:
7716: # LT_PROG_RC
7717: # ----------
7718: AC_DEFUN([LT_PROG_RC],
7719: [AC_CHECK_TOOL(RC, windres,)
7720: ])
7721:
7722: # Old name:
7723: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7724: dnl aclocal-1.4 backwards compatibility:
7725: dnl AC_DEFUN([LT_AC_PROG_RC], [])
7726:
7727:
7728: # _LT_DECL_EGREP
7729: # --------------
7730: # If we don't have a new enough Autoconf to choose the best grep
7731: # available, choose the one first in the user's PATH.
7732: m4_defun([_LT_DECL_EGREP],
7733: [AC_REQUIRE([AC_PROG_EGREP])dnl
7734: AC_REQUIRE([AC_PROG_FGREP])dnl
7735: test -z "$GREP" && GREP=grep
7736: _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7737: _LT_DECL([], [EGREP], [1], [An ERE matcher])
7738: _LT_DECL([], [FGREP], [1], [A literal string matcher])
7739: dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7740: AC_SUBST([GREP])
7741: ])
7742:
7743:
7744: # _LT_DECL_OBJDUMP
7745: # --------------
7746: # If we don't have a new enough Autoconf to choose the best objdump
7747: # available, choose the one first in the user's PATH.
7748: m4_defun([_LT_DECL_OBJDUMP],
7749: [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7750: test -z "$OBJDUMP" && OBJDUMP=objdump
7751: _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7752: AC_SUBST([OBJDUMP])
7753: ])
7754:
7755: # _LT_DECL_DLLTOOL
7756: # ----------------
7757: # Ensure DLLTOOL variable is set.
7758: m4_defun([_LT_DECL_DLLTOOL],
7759: [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7760: test -z "$DLLTOOL" && DLLTOOL=dlltool
7761: _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7762: AC_SUBST([DLLTOOL])
7763: ])
7764:
7765: # _LT_DECL_SED
7766: # ------------
7767: # Check for a fully-functional sed program, that truncates
7768: # as few characters as possible. Prefer GNU sed if found.
7769: m4_defun([_LT_DECL_SED],
7770: [AC_PROG_SED
7771: test -z "$SED" && SED=sed
7772: Xsed="$SED -e 1s/^X//"
7773: _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7774: _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7775: [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7776: ])# _LT_DECL_SED
7777:
7778: m4_ifndef([AC_PROG_SED], [
7779: # NOTE: This macro has been submitted for inclusion into #
7780: # GNU Autoconf as AC_PROG_SED. When it is available in #
7781: # a released version of Autoconf we should remove this #
7782: # macro and use it instead. #
7783:
7784: m4_defun([AC_PROG_SED],
7785: [AC_MSG_CHECKING([for a sed that does not truncate output])
7786: AC_CACHE_VAL(lt_cv_path_SED,
7787: [# Loop through the user's path and test for sed and gsed.
7788: # Then use that list of sed's as ones to test for truncation.
7789: as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7790: for as_dir in $PATH
7791: do
7792: IFS=$as_save_IFS
7793: test -z "$as_dir" && as_dir=.
7794: for lt_ac_prog in sed gsed; do
7795: for ac_exec_ext in '' $ac_executable_extensions; do
7796: if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7797: lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7798: fi
7799: done
7800: done
7801: done
7802: IFS=$as_save_IFS
7803: lt_ac_max=0
7804: lt_ac_count=0
7805: # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7806: # along with /bin/sed that truncates output.
7807: for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7808: test ! -f $lt_ac_sed && continue
7809: cat /dev/null > conftest.in
7810: lt_ac_count=0
7811: echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7812: # Check for GNU sed and select it if it is found.
7813: if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7814: lt_cv_path_SED=$lt_ac_sed
7815: break
7816: fi
7817: while true; do
7818: cat conftest.in conftest.in >conftest.tmp
7819: mv conftest.tmp conftest.in
7820: cp conftest.in conftest.nl
7821: echo >>conftest.nl
7822: $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7823: cmp -s conftest.out conftest.nl || break
7824: # 10000 chars as input seems more than enough
7825: test $lt_ac_count -gt 10 && break
7826: lt_ac_count=`expr $lt_ac_count + 1`
7827: if test $lt_ac_count -gt $lt_ac_max; then
7828: lt_ac_max=$lt_ac_count
7829: lt_cv_path_SED=$lt_ac_sed
7830: fi
7831: done
7832: done
7833: ])
7834: SED=$lt_cv_path_SED
7835: AC_SUBST([SED])
7836: AC_MSG_RESULT([$SED])
7837: ])#AC_PROG_SED
7838: ])#m4_ifndef
7839:
7840: # Old name:
7841: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7842: dnl aclocal-1.4 backwards compatibility:
7843: dnl AC_DEFUN([LT_AC_PROG_SED], [])
7844:
7845:
7846: # _LT_CHECK_SHELL_FEATURES
7847: # ------------------------
7848: # Find out whether the shell is Bourne or XSI compatible,
7849: # or has some other useful features.
7850: m4_defun([_LT_CHECK_SHELL_FEATURES],
7851: [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7852: # Try some XSI features
7853: xsi_shell=no
7854: ( _lt_dummy="a/b/c"
7855: test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7856: = c,a/b,b/c, \
7857: && eval 'test $(( 1 + 1 )) -eq 2 \
7858: && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7859: && xsi_shell=yes
7860: AC_MSG_RESULT([$xsi_shell])
7861: _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7862:
7863: AC_MSG_CHECKING([whether the shell understands "+="])
7864: lt_shell_append=no
7865: ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7866: >/dev/null 2>&1 \
7867: && lt_shell_append=yes
7868: AC_MSG_RESULT([$lt_shell_append])
7869: _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7870:
7871: if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7872: lt_unset=unset
7873: else
7874: lt_unset=false
7875: fi
7876: _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7877:
7878: # test EBCDIC or ASCII
7879: case `echo X|tr X '\101'` in
7880: A) # ASCII based system
7881: # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7882: lt_SP2NL='tr \040 \012'
7883: lt_NL2SP='tr \015\012 \040\040'
7884: ;;
7885: *) # EBCDIC based system
7886: lt_SP2NL='tr \100 \n'
7887: lt_NL2SP='tr \r\n \100\100'
7888: ;;
7889: esac
7890: _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7891: _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7892: ])# _LT_CHECK_SHELL_FEATURES
7893:
7894:
7895: # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7896: # ------------------------------------------------------
7897: # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7898: # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7899: m4_defun([_LT_PROG_FUNCTION_REPLACE],
7900: [dnl {
7901: sed -e '/^$1 ()$/,/^} # $1 /c\
7902: $1 ()\
7903: {\
7904: m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7905: } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7906: && mv -f "$cfgfile.tmp" "$cfgfile" \
7907: || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7908: test 0 -eq $? || _lt_function_replace_fail=:
7909: ])
7910:
7911:
7912: # _LT_PROG_REPLACE_SHELLFNS
7913: # -------------------------
7914: # Replace existing portable implementations of several shell functions with
7915: # equivalent extended shell implementations where those features are available..
7916: m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7917: [if test x"$xsi_shell" = xyes; then
7918: _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7919: case ${1} in
7920: */*) func_dirname_result="${1%/*}${2}" ;;
7921: * ) func_dirname_result="${3}" ;;
7922: esac])
7923:
7924: _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7925: func_basename_result="${1##*/}"])
7926:
7927: _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7928: case ${1} in
7929: */*) func_dirname_result="${1%/*}${2}" ;;
7930: * ) func_dirname_result="${3}" ;;
7931: esac
7932: func_basename_result="${1##*/}"])
7933:
7934: _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7935: # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7936: # positional parameters, so assign one to ordinary parameter first.
7937: func_stripname_result=${3}
7938: func_stripname_result=${func_stripname_result#"${1}"}
7939: func_stripname_result=${func_stripname_result%"${2}"}])
7940:
7941: _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7942: func_split_long_opt_name=${1%%=*}
7943: func_split_long_opt_arg=${1#*=}])
7944:
7945: _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7946: func_split_short_opt_arg=${1#??}
7947: func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7948:
7949: _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7950: case ${1} in
7951: *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7952: *) func_lo2o_result=${1} ;;
7953: esac])
7954:
7955: _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7956:
7957: _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7958:
7959: _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7960: fi
7961:
7962: if test x"$lt_shell_append" = xyes; then
7963: _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7964:
7965: _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7966: func_quote_for_eval "${2}"
7967: dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7968: eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7969:
7970: # Save a `func_append' function call where possible by direct use of '+='
7971: sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7972: && mv -f "$cfgfile.tmp" "$cfgfile" \
7973: || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7974: test 0 -eq $? || _lt_function_replace_fail=:
7975: else
7976: # Save a `func_append' function call even when '+=' is not available
7977: sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7978: && mv -f "$cfgfile.tmp" "$cfgfile" \
7979: || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7980: test 0 -eq $? || _lt_function_replace_fail=:
7981: fi
7982:
7983: if test x"$_lt_function_replace_fail" = x":"; then
7984: AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7985: fi
7986: ])
7987:
7988: # _LT_PATH_CONVERSION_FUNCTIONS
7989: # -----------------------------
7990: # Determine which file name conversion functions should be used by
7991: # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
7992: # for certain cross-compile configurations and native mingw.
7993: m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7994: [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7995: AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7996: AC_MSG_CHECKING([how to convert $build file names to $host format])
7997: AC_CACHE_VAL(lt_cv_to_host_file_cmd,
7998: [case $host in
7999: *-*-mingw* )
8000: case $build in
8001: *-*-mingw* ) # actually msys
8002: lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8003: ;;
8004: *-*-cygwin* )
8005: lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8006: ;;
8007: * ) # otherwise, assume *nix
8008: lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8009: ;;
8010: esac
8011: ;;
8012: *-*-cygwin* )
8013: case $build in
8014: *-*-mingw* ) # actually msys
8015: lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8016: ;;
8017: *-*-cygwin* )
8018: lt_cv_to_host_file_cmd=func_convert_file_noop
8019: ;;
8020: * ) # otherwise, assume *nix
8021: lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8022: ;;
8023: esac
8024: ;;
8025: * ) # unhandled hosts (and "normal" native builds)
8026: lt_cv_to_host_file_cmd=func_convert_file_noop
8027: ;;
8028: esac
8029: ])
8030: to_host_file_cmd=$lt_cv_to_host_file_cmd
8031: AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8032: _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8033: [0], [convert $build file names to $host format])dnl
8034:
8035: AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8036: AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8037: [#assume ordinary cross tools, or native build.
8038: lt_cv_to_tool_file_cmd=func_convert_file_noop
8039: case $host in
8040: *-*-mingw* )
8041: case $build in
8042: *-*-mingw* ) # actually msys
8043: lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8044: ;;
8045: esac
8046: ;;
8047: esac
8048: ])
8049: to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8050: AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8051: _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8052: [0], [convert $build files to toolchain format])dnl
8053: ])# _LT_PATH_CONVERSION_FUNCTIONS
8054:
8055: # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
8056: #
8057: # Copyright (C) 1999-2006, 2007, 2008, 2011 Free Software Foundation, Inc.
8058: # Written by Thomas Tanner, 1999
8059: #
8060: # This file is free software; the Free Software Foundation gives
8061: # unlimited permission to copy and/or distribute it, with or without
8062: # modifications, as long as this notice is preserved.
8063:
8064: # serial 18 LTDL_INIT
8065:
8066: # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
8067: # ------------------------------------------
8068: # DIRECTORY contains the libltdl sources. It is okay to call this
8069: # function multiple times, as long as the same DIRECTORY is always given.
8070: AC_DEFUN([LT_CONFIG_LTDL_DIR],
8071: [AC_BEFORE([$0], [LTDL_INIT])
8072: _$0($*)
8073: ])# LT_CONFIG_LTDL_DIR
8074:
8075: # We break this out into a separate macro, so that we can call it safely
8076: # internally without being caught accidentally by the sed scan in libtoolize.
8077: m4_defun([_LT_CONFIG_LTDL_DIR],
8078: [dnl remove trailing slashes
8079: m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
8080: m4_case(_LTDL_DIR,
8081: [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
8082: m4_if(_ARG_DIR, [.],
8083: [],
8084: [m4_define([_LTDL_DIR], _ARG_DIR)
8085: _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
8086: [m4_if(_ARG_DIR, _LTDL_DIR,
8087: [],
8088: [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
8089: m4_popdef([_ARG_DIR])
8090: ])# _LT_CONFIG_LTDL_DIR
8091:
8092: # Initialise:
8093: m4_define([_LTDL_DIR], [])
8094:
8095:
8096: # _LT_BUILD_PREFIX
8097: # ----------------
8098: # If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
8099: # to `${top_builddir}/'.
8100: m4_define([_LT_BUILD_PREFIX],
8101: [m4_ifdef([AC_AUTOCONF_VERSION],
8102: [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
8103: [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
8104: [${top_build_prefix}],
8105: [${top_builddir}/])],
8106: [${top_build_prefix}])],
8107: [${top_builddir}/])[]dnl
8108: ])
8109:
8110:
8111: # LTDL_CONVENIENCE
8112: # ----------------
8113: # sets LIBLTDL to the link flags for the libltdl convenience library and
8114: # LTDLINCL to the include flags for the libltdl header and adds
8115: # --enable-ltdl-convenience to the configure arguments. Note that
8116: # AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
8117: # '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
8118: # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
8119: # quotes!). If your package is not flat and you're not using automake,
8120: # define top_build_prefix, top_builddir, and top_srcdir appropriately
8121: # in your Makefiles.
8122: AC_DEFUN([LTDL_CONVENIENCE],
8123: [AC_BEFORE([$0], [LTDL_INIT])dnl
8124: dnl Although the argument is deprecated and no longer documented,
8125: dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
8126: dnl here make sure it is the same as any other declaration of libltdl's
8127: dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
8128: dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8129: m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8130: _$0()
8131: ])# LTDL_CONVENIENCE
8132:
8133: # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
8134: # now we have LT_CONFIG_LTDL_DIR:
8135: AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
8136: [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8137: _LTDL_CONVENIENCE])
8138:
8139: dnl aclocal-1.4 backwards compatibility:
8140: dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
8141:
8142:
8143: # _LTDL_CONVENIENCE
8144: # -----------------
8145: # Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
8146: m4_defun([_LTDL_CONVENIENCE],
8147: [case $enable_ltdl_convenience in
8148: no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8149: "") enable_ltdl_convenience=yes
8150: ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8151: esac
8152: LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
8153: LTDLDEPS=$LIBLTDL
8154: LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8155:
8156: AC_SUBST([LIBLTDL])
8157: AC_SUBST([LTDLDEPS])
8158: AC_SUBST([LTDLINCL])
8159:
8160: # For backwards non-gettext consistent compatibility...
8161: INCLTDL="$LTDLINCL"
8162: AC_SUBST([INCLTDL])
8163: ])# _LTDL_CONVENIENCE
8164:
8165:
8166: # LTDL_INSTALLABLE
8167: # ----------------
8168: # sets LIBLTDL to the link flags for the libltdl installable library
8169: # and LTDLINCL to the include flags for the libltdl header and adds
8170: # --enable-ltdl-install to the configure arguments. Note that
8171: # AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
8172: # is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
8173: # available, otherwise with '${top_builddir}/', and LTDLINCL will be
8174: # prefixed with '${top_srcdir}/' (note the single quotes!). If your
8175: # package is not flat and you're not using automake, define top_build_prefix,
8176: # top_builddir, and top_srcdir appropriately in your Makefiles.
8177: # In the future, this macro may have to be called after LT_INIT.
8178: AC_DEFUN([LTDL_INSTALLABLE],
8179: [AC_BEFORE([$0], [LTDL_INIT])dnl
8180: dnl Although the argument is deprecated and no longer documented,
8181: dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
8182: dnl here make sure it is the same as any other declaration of libltdl's
8183: dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
8184: dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8185: m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8186: _$0()
8187: ])# LTDL_INSTALLABLE
8188:
8189: # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
8190: # now we have LT_CONFIG_LTDL_DIR:
8191: AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
8192: [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8193: _LTDL_INSTALLABLE])
8194:
8195: dnl aclocal-1.4 backwards compatibility:
8196: dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
8197:
8198:
8199: # _LTDL_INSTALLABLE
8200: # -----------------
8201: # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
8202: m4_defun([_LTDL_INSTALLABLE],
8203: [if test -f $prefix/lib/libltdl.la; then
8204: lt_save_LDFLAGS="$LDFLAGS"
8205: LDFLAGS="-L$prefix/lib $LDFLAGS"
8206: AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
8207: LDFLAGS="$lt_save_LDFLAGS"
8208: if test x"${lt_lib_ltdl-no}" = xyes; then
8209: if test x"$enable_ltdl_install" != xyes; then
8210: # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
8211: AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
8212: enable_ltdl_install=no
8213: fi
8214: elif test x"$enable_ltdl_install" = xno; then
8215: AC_MSG_WARN([libltdl not installed, but installation disabled])
8216: fi
8217: fi
8218:
8219: # If configure.ac declared an installable ltdl, and the user didn't override
8220: # with --disable-ltdl-install, we will install the shipped libltdl.
8221: case $enable_ltdl_install in
8222: no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8223: LIBLTDL="-lltdl"
8224: LTDLDEPS=
8225: LTDLINCL=
8226: ;;
8227: *) enable_ltdl_install=yes
8228: ac_configure_args="$ac_configure_args --enable-ltdl-install"
8229: LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
8230: LTDLDEPS=$LIBLTDL
8231: LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8232: ;;
8233: esac
8234:
8235: AC_SUBST([LIBLTDL])
8236: AC_SUBST([LTDLDEPS])
8237: AC_SUBST([LTDLINCL])
8238:
8239: # For backwards non-gettext consistent compatibility...
8240: INCLTDL="$LTDLINCL"
8241: AC_SUBST([INCLTDL])
8242: ])# LTDL_INSTALLABLE
8243:
8244:
8245: # _LTDL_MODE_DISPATCH
8246: # -------------------
8247: m4_define([_LTDL_MODE_DISPATCH],
8248: [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
8249: m4_if(_LTDL_DIR, [],
8250: [],
8251: dnl if _LTDL_MODE was not set already, the default value is `subproject':
8252: [m4_case(m4_default(_LTDL_MODE, [subproject]),
8253: [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
8254: _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
8255: [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
8256: [recursive], [],
8257: [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
8258: dnl Be careful not to expand twice:
8259: m4_define([$0], [])
8260: ])# _LTDL_MODE_DISPATCH
8261:
8262:
8263: # _LT_LIBOBJ(MODULE_NAME)
8264: # -----------------------
8265: # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
8266: # of into LIBOBJS.
8267: AC_DEFUN([_LT_LIBOBJ], [
8268: m4_pattern_allow([^_LT_LIBOBJS$])
8269: _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
8270: ])# _LT_LIBOBJS
8271:
8272:
8273: # LTDL_INIT([OPTIONS])
8274: # --------------------
8275: # Clients of libltdl can use this macro to allow the installer to
8276: # choose between a shipped copy of the ltdl sources or a preinstalled
8277: # version of the library. If the shipped ltdl sources are not in a
8278: # subdirectory named libltdl, the directory name must be given by
8279: # LT_CONFIG_LTDL_DIR.
8280: AC_DEFUN([LTDL_INIT],
8281: [dnl Parse OPTIONS
8282: _LT_SET_OPTIONS([$0], [$1])
8283:
8284: dnl We need to keep our own list of libobjs separate from our parent project,
8285: dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
8286: dnl we look for our own LIBOBJs.
8287: m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
8288: m4_pushdef([AC_LIBSOURCES])
8289:
8290: dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
8291: m4_if(_LTDL_MODE, [],
8292: [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
8293: m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
8294: [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
8295:
8296: AC_ARG_WITH([included_ltdl],
8297: [AS_HELP_STRING([--with-included-ltdl],
8298: [use the GNU ltdl sources included here])])
8299:
8300: if test "x$with_included_ltdl" != xyes; then
8301: # We are not being forced to use the included libltdl sources, so
8302: # decide whether there is a useful installed version we can use.
8303: AC_CHECK_HEADER([ltdl.h],
8304: [AC_CHECK_DECL([lt_dlinterface_register],
8305: [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
8306: [with_included_ltdl=no],
8307: [with_included_ltdl=yes])],
8308: [with_included_ltdl=yes],
8309: [AC_INCLUDES_DEFAULT
8310: #include <ltdl.h>])],
8311: [with_included_ltdl=yes],
8312: [AC_INCLUDES_DEFAULT]
8313: )
8314: fi
8315:
8316: dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
8317: dnl was called yet, then for old times' sake, we assume libltdl is in an
8318: dnl eponymous directory:
8319: AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
8320:
8321: AC_ARG_WITH([ltdl_include],
8322: [AS_HELP_STRING([--with-ltdl-include=DIR],
8323: [use the ltdl headers installed in DIR])])
8324:
8325: if test -n "$with_ltdl_include"; then
8326: if test -f "$with_ltdl_include/ltdl.h"; then :
8327: else
8328: AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
8329: fi
8330: else
8331: with_ltdl_include=no
8332: fi
8333:
8334: AC_ARG_WITH([ltdl_lib],
8335: [AS_HELP_STRING([--with-ltdl-lib=DIR],
8336: [use the libltdl.la installed in DIR])])
8337:
8338: if test -n "$with_ltdl_lib"; then
8339: if test -f "$with_ltdl_lib/libltdl.la"; then :
8340: else
8341: AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
8342: fi
8343: else
8344: with_ltdl_lib=no
8345: fi
8346:
8347: case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
8348: ,yes,no,no,)
8349: m4_case(m4_default(_LTDL_TYPE, [convenience]),
8350: [convenience], [_LTDL_CONVENIENCE],
8351: [installable], [_LTDL_INSTALLABLE],
8352: [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
8353: ;;
8354: ,no,no,no,)
8355: # If the included ltdl is not to be used, then use the
8356: # preinstalled libltdl we found.
8357: AC_DEFINE([HAVE_LTDL], [1],
8358: [Define this if a modern libltdl is already installed])
8359: LIBLTDL=-lltdl
8360: LTDLDEPS=
8361: LTDLINCL=
8362: ;;
8363: ,no*,no,*)
8364: AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
8365: ;;
8366: *) with_included_ltdl=no
8367: LIBLTDL="-L$with_ltdl_lib -lltdl"
8368: LTDLDEPS=
8369: LTDLINCL="-I$with_ltdl_include"
8370: ;;
8371: esac
8372: INCLTDL="$LTDLINCL"
8373:
8374: # Report our decision...
8375: AC_MSG_CHECKING([where to find libltdl headers])
8376: AC_MSG_RESULT([$LTDLINCL])
8377: AC_MSG_CHECKING([where to find libltdl library])
8378: AC_MSG_RESULT([$LIBLTDL])
8379:
8380: _LTDL_SETUP
8381:
8382: dnl restore autoconf definition.
8383: m4_popdef([AC_LIBOBJ])
8384: m4_popdef([AC_LIBSOURCES])
8385:
8386: AC_CONFIG_COMMANDS_PRE([
8387: _ltdl_libobjs=
8388: _ltdl_ltlibobjs=
8389: if test -n "$_LT_LIBOBJS"; then
8390: # Remove the extension.
8391: _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
8392: for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
8393: _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
8394: _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
8395: done
8396: fi
8397: AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
8398: AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
8399: ])
8400:
8401: # Only expand once:
8402: m4_define([LTDL_INIT])
8403: ])# LTDL_INIT
8404:
8405: # Old names:
8406: AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
8407: AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
8408: AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
8409: dnl aclocal-1.4 backwards compatibility:
8410: dnl AC_DEFUN([AC_LIB_LTDL], [])
8411: dnl AC_DEFUN([AC_WITH_LTDL], [])
8412: dnl AC_DEFUN([LT_WITH_LTDL], [])
8413:
8414:
8415: # _LTDL_SETUP
8416: # -----------
8417: # Perform all the checks necessary for compilation of the ltdl objects
8418: # -- including compiler checks and header checks. This is a public
8419: # interface mainly for the benefit of libltdl's own configure.ac, most
8420: # other users should call LTDL_INIT instead.
8421: AC_DEFUN([_LTDL_SETUP],
8422: [AC_REQUIRE([AC_PROG_CC])dnl
8423: AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
8424: AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
8425: AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
8426: AC_REQUIRE([LT_LIB_DLLOAD])dnl
8427: AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8428: AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
8429: AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
8430: AC_REQUIRE([gl_FUNC_ARGZ])dnl
8431:
8432: m4_require([_LT_CHECK_OBJDIR])dnl
8433: m4_require([_LT_HEADER_DLFCN])dnl
8434: m4_require([_LT_CHECK_DLPREOPEN])dnl
8435: m4_require([_LT_DECL_SED])dnl
8436:
8437: dnl Don't require this, or it will be expanded earlier than the code
8438: dnl that sets the variables it relies on:
8439: _LT_ENABLE_INSTALL
8440:
8441: dnl _LTDL_MODE specific code must be called at least once:
8442: _LTDL_MODE_DISPATCH
8443:
8444: # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
8445: # the user used. This is so that ltdl.h can pick up the parent projects
8446: # config.h file, The first file in AC_CONFIG_HEADERS must contain the
8447: # definitions required by ltdl.c.
8448: # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
8449: AC_CONFIG_COMMANDS_PRE([dnl
8450: m4_pattern_allow([^LT_CONFIG_H$])dnl
8451: m4_ifset([AH_HEADER],
8452: [LT_CONFIG_H=AH_HEADER],
8453: [m4_ifset([AC_LIST_HEADERS],
8454: [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
8455: [])])])
8456: AC_SUBST([LT_CONFIG_H])
8457:
8458: AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
8459: [], [], [AC_INCLUDES_DEFAULT])
8460:
8461: AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
8462: AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
8463:
8464: m4_pattern_allow([LT_LIBEXT])dnl
8465: AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
8466:
8467: name=
8468: eval "lt_libprefix=\"$libname_spec\""
8469: m4_pattern_allow([LT_LIBPREFIX])dnl
8470: AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
8471:
8472: name=ltdl
8473: eval "LTDLOPEN=\"$libname_spec\""
8474: AC_SUBST([LTDLOPEN])
8475: ])# _LTDL_SETUP
8476:
8477:
8478: # _LT_ENABLE_INSTALL
8479: # ------------------
8480: m4_define([_LT_ENABLE_INSTALL],
8481: [AC_ARG_ENABLE([ltdl-install],
8482: [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
8483:
8484: case ,${enable_ltdl_install},${enable_ltdl_convenience} in
8485: *yes*) ;;
8486: *) enable_ltdl_convenience=yes ;;
8487: esac
8488:
8489: m4_ifdef([AM_CONDITIONAL],
8490: [AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
8491: AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
8492: ])# _LT_ENABLE_INSTALL
8493:
8494:
8495: # LT_SYS_DLOPEN_DEPLIBS
8496: # ---------------------
8497: AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
8498: [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8499: AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
8500: [lt_cv_sys_dlopen_deplibs],
8501: [# PORTME does your system automatically load deplibs for dlopen?
8502: # or its logical equivalent (e.g. shl_load for HP-UX < 11)
8503: # For now, we just catch OSes we know something about -- in the
8504: # future, we'll try test this programmatically.
8505: lt_cv_sys_dlopen_deplibs=unknown
8506: case $host_os in
8507: aix3*|aix4.1.*|aix4.2.*)
8508: # Unknown whether this is true for these versions of AIX, but
8509: # we want this `case' here to explicitly catch those versions.
8510: lt_cv_sys_dlopen_deplibs=unknown
8511: ;;
8512: aix[[4-9]]*)
8513: lt_cv_sys_dlopen_deplibs=yes
8514: ;;
8515: amigaos*)
8516: case $host_cpu in
8517: powerpc)
8518: lt_cv_sys_dlopen_deplibs=no
8519: ;;
8520: esac
8521: ;;
8522: darwin*)
8523: # Assuming the user has installed a libdl from somewhere, this is true
8524: # If you are looking for one http://www.opendarwin.org/projects/dlcompat
8525: lt_cv_sys_dlopen_deplibs=yes
8526: ;;
8527: freebsd* | dragonfly*)
8528: lt_cv_sys_dlopen_deplibs=yes
8529: ;;
8530: gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
8531: # GNU and its variants, using gnu ld.so (Glibc)
8532: lt_cv_sys_dlopen_deplibs=yes
8533: ;;
8534: hpux10*|hpux11*)
8535: lt_cv_sys_dlopen_deplibs=yes
8536: ;;
8537: interix*)
8538: lt_cv_sys_dlopen_deplibs=yes
8539: ;;
8540: irix[[12345]]*|irix6.[[01]]*)
8541: # Catch all versions of IRIX before 6.2, and indicate that we don't
8542: # know how it worked for any of those versions.
8543: lt_cv_sys_dlopen_deplibs=unknown
8544: ;;
8545: irix*)
8546: # The case above catches anything before 6.2, and it's known that
8547: # at 6.2 and later dlopen does load deplibs.
8548: lt_cv_sys_dlopen_deplibs=yes
8549: ;;
8550: netbsd*)
8551: lt_cv_sys_dlopen_deplibs=yes
8552: ;;
8553: openbsd*)
8554: lt_cv_sys_dlopen_deplibs=yes
8555: ;;
8556: osf[[1234]]*)
8557: # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
8558: # it did *not* use an RPATH in a shared library to find objects the
8559: # library depends on, so we explicitly say `no'.
8560: lt_cv_sys_dlopen_deplibs=no
8561: ;;
8562: osf5.0|osf5.0a|osf5.1)
8563: # dlopen *does* load deplibs and with the right loader patch applied
8564: # it even uses RPATH in a shared library to search for shared objects
8565: # that the library depends on, but there's no easy way to know if that
8566: # patch is installed. Since this is the case, all we can really
8567: # say is unknown -- it depends on the patch being installed. If
8568: # it is, this changes to `yes'. Without it, it would be `no'.
8569: lt_cv_sys_dlopen_deplibs=unknown
8570: ;;
8571: osf*)
8572: # the two cases above should catch all versions of osf <= 5.1. Read
8573: # the comments above for what we know about them.
8574: # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
8575: # is used to find them so we can finally say `yes'.
8576: lt_cv_sys_dlopen_deplibs=yes
8577: ;;
8578: qnx*)
8579: lt_cv_sys_dlopen_deplibs=yes
8580: ;;
8581: solaris*)
8582: lt_cv_sys_dlopen_deplibs=yes
8583: ;;
8584: sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8585: libltdl_cv_sys_dlopen_deplibs=yes
8586: ;;
8587: esac
8588: ])
8589: if test "$lt_cv_sys_dlopen_deplibs" != yes; then
8590: AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
8591: [Define if the OS needs help to load dependent libraries for dlopen().])
8592: fi
8593: ])# LT_SYS_DLOPEN_DEPLIBS
8594:
8595: # Old name:
8596: AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
8597: dnl aclocal-1.4 backwards compatibility:
8598: dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
8599:
8600:
8601: # LT_SYS_MODULE_EXT
8602: # -----------------
8603: AC_DEFUN([LT_SYS_MODULE_EXT],
8604: [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8605: AC_CACHE_CHECK([which extension is used for runtime loadable modules],
8606: [libltdl_cv_shlibext],
8607: [
8608: module=yes
8609: eval libltdl_cv_shlibext=$shrext_cmds
8610: module=no
8611: eval libltdl_cv_shrext=$shrext_cmds
8612: ])
8613: if test -n "$libltdl_cv_shlibext"; then
8614: m4_pattern_allow([LT_MODULE_EXT])dnl
8615: AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
8616: [Define to the extension used for runtime loadable modules, say, ".so".])
8617: fi
8618: if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then
8619: m4_pattern_allow([LT_SHARED_EXT])dnl
8620: AC_DEFINE_UNQUOTED([LT_SHARED_EXT], ["$libltdl_cv_shrext"],
8621: [Define to the shared library suffix, say, ".dylib".])
8622: fi
8623: ])# LT_SYS_MODULE_EXT
8624:
8625: # Old name:
8626: AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
8627: dnl aclocal-1.4 backwards compatibility:
8628: dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
8629:
8630:
8631: # LT_SYS_MODULE_PATH
8632: # ------------------
8633: AC_DEFUN([LT_SYS_MODULE_PATH],
8634: [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8635: AC_CACHE_CHECK([which variable specifies run-time module search path],
8636: [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
8637: if test -n "$lt_cv_module_path_var"; then
8638: m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
8639: AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
8640: [Define to the name of the environment variable that determines the run-time module search path.])
8641: fi
8642: ])# LT_SYS_MODULE_PATH
8643:
8644: # Old name:
8645: AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
8646: dnl aclocal-1.4 backwards compatibility:
8647: dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
8648:
8649:
8650: # LT_SYS_DLSEARCH_PATH
8651: # --------------------
8652: AC_DEFUN([LT_SYS_DLSEARCH_PATH],
8653: [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8654: AC_CACHE_CHECK([for the default library search path],
8655: [lt_cv_sys_dlsearch_path],
8656: [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
8657: if test -n "$lt_cv_sys_dlsearch_path"; then
8658: sys_dlsearch_path=
8659: for dir in $lt_cv_sys_dlsearch_path; do
8660: if test -z "$sys_dlsearch_path"; then
8661: sys_dlsearch_path="$dir"
8662: else
8663: sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
8664: fi
8665: done
8666: m4_pattern_allow([LT_DLSEARCH_PATH])dnl
8667: AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
8668: [Define to the system default library search path.])
8669: fi
8670: ])# LT_SYS_DLSEARCH_PATH
8671:
8672: # Old name:
8673: AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
8674: dnl aclocal-1.4 backwards compatibility:
8675: dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
8676:
8677:
8678: # _LT_CHECK_DLPREOPEN
8679: # -------------------
8680: m4_defun([_LT_CHECK_DLPREOPEN],
8681: [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8682: AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
8683: [libltdl_cv_preloaded_symbols],
8684: [if test -n "$lt_cv_sys_global_symbol_pipe"; then
8685: libltdl_cv_preloaded_symbols=yes
8686: else
8687: libltdl_cv_preloaded_symbols=no
8688: fi
8689: ])
8690: if test x"$libltdl_cv_preloaded_symbols" = xyes; then
8691: AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
8692: [Define if libtool can extract symbol lists from object files.])
8693: fi
8694: ])# _LT_CHECK_DLPREOPEN
8695:
8696:
8697: # LT_LIB_DLLOAD
8698: # -------------
8699: AC_DEFUN([LT_LIB_DLLOAD],
8700: [m4_pattern_allow([^LT_DLLOADERS$])
8701: LT_DLLOADERS=
8702: AC_SUBST([LT_DLLOADERS])
8703:
8704: AC_LANG_PUSH([C])
8705:
8706: LIBADD_DLOPEN=
8707: AC_SEARCH_LIBS([dlopen], [dl],
8708: [AC_DEFINE([HAVE_LIBDL], [1],
8709: [Define if you have the libdl library or equivalent.])
8710: if test "$ac_cv_search_dlopen" != "none required" ; then
8711: LIBADD_DLOPEN="-ldl"
8712: fi
8713: libltdl_cv_lib_dl_dlopen="yes"
8714: LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8715: [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
8716: # include <dlfcn.h>
8717: #endif
8718: ]], [[dlopen(0, 0);]])],
8719: [AC_DEFINE([HAVE_LIBDL], [1],
8720: [Define if you have the libdl library or equivalent.])
8721: libltdl_cv_func_dlopen="yes"
8722: LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8723: [AC_CHECK_LIB([svld], [dlopen],
8724: [AC_DEFINE([HAVE_LIBDL], [1],
8725: [Define if you have the libdl library or equivalent.])
8726: LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
8727: LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
8728: if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
8729: then
8730: lt_save_LIBS="$LIBS"
8731: LIBS="$LIBS $LIBADD_DLOPEN"
8732: AC_CHECK_FUNCS([dlerror])
8733: LIBS="$lt_save_LIBS"
8734: fi
8735: AC_SUBST([LIBADD_DLOPEN])
8736:
8737: LIBADD_SHL_LOAD=
8738: AC_CHECK_FUNC([shl_load],
8739: [AC_DEFINE([HAVE_SHL_LOAD], [1],
8740: [Define if you have the shl_load function.])
8741: LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
8742: [AC_CHECK_LIB([dld], [shl_load],
8743: [AC_DEFINE([HAVE_SHL_LOAD], [1],
8744: [Define if you have the shl_load function.])
8745: LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
8746: LIBADD_SHL_LOAD="-ldld"])])
8747: AC_SUBST([LIBADD_SHL_LOAD])
8748:
8749: case $host_os in
8750: darwin[[1567]].*)
8751: # We only want this for pre-Mac OS X 10.4.
8752: AC_CHECK_FUNC([_dyld_func_lookup],
8753: [AC_DEFINE([HAVE_DYLD], [1],
8754: [Define if you have the _dyld_func_lookup function.])
8755: LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
8756: ;;
8757: beos*)
8758: LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
8759: ;;
8760: cygwin* | mingw* | os2* | pw32*)
8761: AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
8762: LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
8763: ;;
8764: esac
8765:
8766: AC_CHECK_LIB([dld], [dld_link],
8767: [AC_DEFINE([HAVE_DLD], [1],
8768: [Define if you have the GNU dld library.])
8769: LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
8770: AC_SUBST([LIBADD_DLD_LINK])
8771:
8772: m4_pattern_allow([^LT_DLPREOPEN$])
8773: LT_DLPREOPEN=
8774: if test -n "$LT_DLLOADERS"
8775: then
8776: for lt_loader in $LT_DLLOADERS; do
8777: LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
8778: done
8779: AC_DEFINE([HAVE_LIBDLLOADER], [1],
8780: [Define if libdlloader will be built on this platform])
8781: fi
8782: AC_SUBST([LT_DLPREOPEN])
8783:
8784: dnl This isn't used anymore, but set it for backwards compatibility
8785: LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
8786: AC_SUBST([LIBADD_DL])
8787:
8788: AC_LANG_POP
8789: ])# LT_LIB_DLLOAD
8790:
8791: # Old name:
8792: AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
8793: dnl aclocal-1.4 backwards compatibility:
8794: dnl AC_DEFUN([AC_LTDL_DLLIB], [])
8795:
8796:
8797: # LT_SYS_SYMBOL_USCORE
8798: # --------------------
8799: # does the compiler prefix global symbols with an underscore?
8800: AC_DEFUN([LT_SYS_SYMBOL_USCORE],
8801: [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8802: AC_CACHE_CHECK([for _ prefix in compiled symbols],
8803: [lt_cv_sys_symbol_underscore],
8804: [lt_cv_sys_symbol_underscore=no
8805: cat > conftest.$ac_ext <<_LT_EOF
8806: void nm_test_func(){}
8807: int main(){nm_test_func;return 0;}
8808: _LT_EOF
8809: if AC_TRY_EVAL(ac_compile); then
8810: # Now try to grab the symbols.
8811: ac_nlist=conftest.nm
8812: if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
8813: # See whether the symbols have a leading underscore.
8814: if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
8815: lt_cv_sys_symbol_underscore=yes
8816: else
8817: if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
8818: :
8819: else
8820: echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
8821: fi
8822: fi
8823: else
8824: echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
8825: fi
8826: else
8827: echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
8828: cat conftest.c >&AS_MESSAGE_LOG_FD
8829: fi
8830: rm -rf conftest*
8831: ])
8832: sys_symbol_underscore=$lt_cv_sys_symbol_underscore
8833: AC_SUBST([sys_symbol_underscore])
8834: ])# LT_SYS_SYMBOL_USCORE
8835:
8836: # Old name:
8837: AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
8838: dnl aclocal-1.4 backwards compatibility:
8839: dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
8840:
8841:
8842: # LT_FUNC_DLSYM_USCORE
8843: # --------------------
8844: AC_DEFUN([LT_FUNC_DLSYM_USCORE],
8845: [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8846: if test x"$lt_cv_sys_symbol_underscore" = xyes; then
8847: if test x"$libltdl_cv_func_dlopen" = xyes ||
8848: test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
8849: AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
8850: [libltdl_cv_need_uscore],
8851: [libltdl_cv_need_uscore=unknown
8852: save_LIBS="$LIBS"
8853: LIBS="$LIBS $LIBADD_DLOPEN"
8854: _LT_TRY_DLOPEN_SELF(
8855: [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
8856: [], [libltdl_cv_need_uscore=cross])
8857: LIBS="$save_LIBS"
8858: ])
8859: fi
8860: fi
8861:
8862: if test x"$libltdl_cv_need_uscore" = xyes; then
8863: AC_DEFINE([NEED_USCORE], [1],
8864: [Define if dlsym() requires a leading underscore in symbol names.])
8865: fi
8866: ])# LT_FUNC_DLSYM_USCORE
8867:
8868: # Old name:
8869: AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
8870: dnl aclocal-1.4 backwards compatibility:
8871: dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
8872:
8873: # Helper functions for option handling. -*- Autoconf -*-
8874: #
8875: # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8876: # Inc.
8877: # Written by Gary V. Vaughan, 2004
8878: #
8879: # This file is free software; the Free Software Foundation gives
8880: # unlimited permission to copy and/or distribute it, with or without
8881: # modifications, as long as this notice is preserved.
8882:
8883: # serial 7 ltoptions.m4
8884:
8885: # This is to help aclocal find these macros, as it can't see m4_define.
8886: AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8887:
8888:
8889: # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8890: # ------------------------------------------
8891: m4_define([_LT_MANGLE_OPTION],
8892: [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8893:
8894:
8895: # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8896: # ---------------------------------------
8897: # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8898: # matching handler defined, dispatch to it. Other OPTION-NAMEs are
8899: # saved as a flag.
8900: m4_define([_LT_SET_OPTION],
8901: [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8902: m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8903: _LT_MANGLE_DEFUN([$1], [$2]),
8904: [m4_warning([Unknown $1 option `$2'])])[]dnl
8905: ])
8906:
8907:
8908: # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8909: # ------------------------------------------------------------
8910: # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8911: m4_define([_LT_IF_OPTION],
8912: [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8913:
8914:
8915: # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8916: # -------------------------------------------------------
8917: # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8918: # are set.
8919: m4_define([_LT_UNLESS_OPTIONS],
8920: [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8921: [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8922: [m4_define([$0_found])])])[]dnl
8923: m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8924: ])[]dnl
8925: ])
8926:
8927:
8928: # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8929: # ----------------------------------------
8930: # OPTION-LIST is a space-separated list of Libtool options associated
8931: # with MACRO-NAME. If any OPTION has a matching handler declared with
8932: # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8933: # the unknown option and exit.
8934: m4_defun([_LT_SET_OPTIONS],
8935: [# Set options
8936: m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8937: [_LT_SET_OPTION([$1], _LT_Option)])
8938:
8939: m4_if([$1],[LT_INIT],[
8940: dnl
8941: dnl Simply set some default values (i.e off) if boolean options were not
8942: dnl specified:
8943: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8944: ])
8945: _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8946: ])
8947: dnl
8948: dnl If no reference was made to various pairs of opposing options, then
8949: dnl we run the default mode handler for the pair. For example, if neither
8950: dnl `shared' nor `disable-shared' was passed, we enable building of shared
8951: dnl archives by default:
8952: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8953: _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8954: _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8955: _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8956: [_LT_ENABLE_FAST_INSTALL])
8957: ])
8958: ])# _LT_SET_OPTIONS
8959:
8960:
8961:
8962: # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8963: # -----------------------------------------
8964: m4_define([_LT_MANGLE_DEFUN],
8965: [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8966:
8967:
8968: # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8969: # -----------------------------------------------
8970: m4_define([LT_OPTION_DEFINE],
8971: [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8972: ])# LT_OPTION_DEFINE
8973:
8974:
8975: # dlopen
8976: # ------
8977: LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8978: ])
8979:
8980: AU_DEFUN([AC_LIBTOOL_DLOPEN],
8981: [_LT_SET_OPTION([LT_INIT], [dlopen])
8982: AC_DIAGNOSE([obsolete],
8983: [$0: Remove this warning and the call to _LT_SET_OPTION when you
8984: put the `dlopen' option into LT_INIT's first parameter.])
8985: ])
8986:
8987: dnl aclocal-1.4 backwards compatibility:
8988: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8989:
8990:
8991: # win32-dll
8992: # ---------
8993: # Declare package support for building win32 dll's.
8994: LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8995: [enable_win32_dll=yes
8996:
8997: case $host in
8998: *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8999: AC_CHECK_TOOL(AS, as, false)
9000: AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9001: AC_CHECK_TOOL(OBJDUMP, objdump, false)
9002: ;;
9003: esac
9004:
9005: test -z "$AS" && AS=as
9006: _LT_DECL([], [AS], [1], [Assembler program])dnl
9007:
9008: test -z "$DLLTOOL" && DLLTOOL=dlltool
9009: _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9010:
9011: test -z "$OBJDUMP" && OBJDUMP=objdump
9012: _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9013: ])# win32-dll
9014:
9015: AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9016: [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9017: _LT_SET_OPTION([LT_INIT], [win32-dll])
9018: AC_DIAGNOSE([obsolete],
9019: [$0: Remove this warning and the call to _LT_SET_OPTION when you
9020: put the `win32-dll' option into LT_INIT's first parameter.])
9021: ])
9022:
9023: dnl aclocal-1.4 backwards compatibility:
9024: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9025:
9026:
9027: # _LT_ENABLE_SHARED([DEFAULT])
9028: # ----------------------------
9029: # implement the --enable-shared flag, and supports the `shared' and
9030: # `disable-shared' LT_INIT options.
9031: # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9032: m4_define([_LT_ENABLE_SHARED],
9033: [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9034: AC_ARG_ENABLE([shared],
9035: [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9036: [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9037: [p=${PACKAGE-default}
9038: case $enableval in
9039: yes) enable_shared=yes ;;
9040: no) enable_shared=no ;;
9041: *)
9042: enable_shared=no
9043: # Look at the argument we got. We use all the common list separators.
9044: lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9045: for pkg in $enableval; do
9046: IFS="$lt_save_ifs"
9047: if test "X$pkg" = "X$p"; then
9048: enable_shared=yes
9049: fi
9050: done
9051: IFS="$lt_save_ifs"
9052: ;;
9053: esac],
9054: [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9055:
9056: _LT_DECL([build_libtool_libs], [enable_shared], [0],
9057: [Whether or not to build shared libraries])
9058: ])# _LT_ENABLE_SHARED
9059:
9060: LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9061: LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9062:
9063: # Old names:
9064: AC_DEFUN([AC_ENABLE_SHARED],
9065: [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9066: ])
9067:
9068: AC_DEFUN([AC_DISABLE_SHARED],
9069: [_LT_SET_OPTION([LT_INIT], [disable-shared])
9070: ])
9071:
9072: AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9073: AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9074:
9075: dnl aclocal-1.4 backwards compatibility:
9076: dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9077: dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9078:
9079:
9080:
9081: # _LT_ENABLE_STATIC([DEFAULT])
9082: # ----------------------------
9083: # implement the --enable-static flag, and support the `static' and
9084: # `disable-static' LT_INIT options.
9085: # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9086: m4_define([_LT_ENABLE_STATIC],
9087: [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9088: AC_ARG_ENABLE([static],
9089: [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9090: [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9091: [p=${PACKAGE-default}
9092: case $enableval in
9093: yes) enable_static=yes ;;
9094: no) enable_static=no ;;
9095: *)
9096: enable_static=no
9097: # Look at the argument we got. We use all the common list separators.
9098: lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9099: for pkg in $enableval; do
9100: IFS="$lt_save_ifs"
9101: if test "X$pkg" = "X$p"; then
9102: enable_static=yes
9103: fi
9104: done
9105: IFS="$lt_save_ifs"
9106: ;;
9107: esac],
9108: [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9109:
9110: _LT_DECL([build_old_libs], [enable_static], [0],
9111: [Whether or not to build static libraries])
9112: ])# _LT_ENABLE_STATIC
9113:
9114: LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9115: LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9116:
9117: # Old names:
9118: AC_DEFUN([AC_ENABLE_STATIC],
9119: [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9120: ])
9121:
9122: AC_DEFUN([AC_DISABLE_STATIC],
9123: [_LT_SET_OPTION([LT_INIT], [disable-static])
9124: ])
9125:
9126: AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9127: AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9128:
9129: dnl aclocal-1.4 backwards compatibility:
9130: dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9131: dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9132:
9133:
9134:
9135: # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9136: # ----------------------------------
9137: # implement the --enable-fast-install flag, and support the `fast-install'
9138: # and `disable-fast-install' LT_INIT options.
9139: # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9140: m4_define([_LT_ENABLE_FAST_INSTALL],
9141: [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9142: AC_ARG_ENABLE([fast-install],
9143: [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9144: [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9145: [p=${PACKAGE-default}
9146: case $enableval in
9147: yes) enable_fast_install=yes ;;
9148: no) enable_fast_install=no ;;
9149: *)
9150: enable_fast_install=no
9151: # Look at the argument we got. We use all the common list separators.
9152: lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9153: for pkg in $enableval; do
9154: IFS="$lt_save_ifs"
9155: if test "X$pkg" = "X$p"; then
9156: enable_fast_install=yes
9157: fi
9158: done
9159: IFS="$lt_save_ifs"
9160: ;;
9161: esac],
9162: [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9163:
9164: _LT_DECL([fast_install], [enable_fast_install], [0],
9165: [Whether or not to optimize for fast installation])dnl
9166: ])# _LT_ENABLE_FAST_INSTALL
9167:
9168: LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9169: LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9170:
9171: # Old names:
9172: AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9173: [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9174: AC_DIAGNOSE([obsolete],
9175: [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9176: the `fast-install' option into LT_INIT's first parameter.])
9177: ])
9178:
9179: AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9180: [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9181: AC_DIAGNOSE([obsolete],
9182: [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9183: the `disable-fast-install' option into LT_INIT's first parameter.])
9184: ])
9185:
9186: dnl aclocal-1.4 backwards compatibility:
9187: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9188: dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9189:
9190:
9191: # _LT_WITH_PIC([MODE])
9192: # --------------------
9193: # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9194: # LT_INIT options.
9195: # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9196: m4_define([_LT_WITH_PIC],
9197: [AC_ARG_WITH([pic],
9198: [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9199: [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9200: [lt_p=${PACKAGE-default}
9201: case $withval in
9202: yes|no) pic_mode=$withval ;;
9203: *)
9204: pic_mode=default
9205: # Look at the argument we got. We use all the common list separators.
9206: lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9207: for lt_pkg in $withval; do
9208: IFS="$lt_save_ifs"
9209: if test "X$lt_pkg" = "X$lt_p"; then
9210: pic_mode=yes
9211: fi
9212: done
9213: IFS="$lt_save_ifs"
9214: ;;
9215: esac],
9216: [pic_mode=default])
9217:
9218: test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9219:
9220: _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9221: ])# _LT_WITH_PIC
9222:
9223: LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9224: LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9225:
9226: # Old name:
9227: AU_DEFUN([AC_LIBTOOL_PICMODE],
9228: [_LT_SET_OPTION([LT_INIT], [pic-only])
9229: AC_DIAGNOSE([obsolete],
9230: [$0: Remove this warning and the call to _LT_SET_OPTION when you
9231: put the `pic-only' option into LT_INIT's first parameter.])
9232: ])
9233:
9234: dnl aclocal-1.4 backwards compatibility:
9235: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9236:
9237:
9238: m4_define([_LTDL_MODE], [])
9239: LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9240: [m4_define([_LTDL_MODE], [nonrecursive])])
9241: LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9242: [m4_define([_LTDL_MODE], [recursive])])
9243: LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9244: [m4_define([_LTDL_MODE], [subproject])])
9245:
9246: m4_define([_LTDL_TYPE], [])
9247: LT_OPTION_DEFINE([LTDL_INIT], [installable],
9248: [m4_define([_LTDL_TYPE], [installable])])
9249: LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9250: [m4_define([_LTDL_TYPE], [convenience])])
9251:
9252: # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
9253: #
9254: # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9255: # Written by Gary V. Vaughan, 2004
9256: #
9257: # This file is free software; the Free Software Foundation gives
9258: # unlimited permission to copy and/or distribute it, with or without
9259: # modifications, as long as this notice is preserved.
9260:
9261: # serial 6 ltsugar.m4
9262:
9263: # This is to help aclocal find these macros, as it can't see m4_define.
9264: AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9265:
9266:
9267: # lt_join(SEP, ARG1, [ARG2...])
9268: # -----------------------------
9269: # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9270: # associated separator.
9271: # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9272: # versions in m4sugar had bugs.
9273: m4_define([lt_join],
9274: [m4_if([$#], [1], [],
9275: [$#], [2], [[$2]],
9276: [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9277: m4_define([_lt_join],
9278: [m4_if([$#$2], [2], [],
9279: [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9280:
9281:
9282: # lt_car(LIST)
9283: # lt_cdr(LIST)
9284: # ------------
9285: # Manipulate m4 lists.
9286: # These macros are necessary as long as will still need to support
9287: # Autoconf-2.59 which quotes differently.
9288: m4_define([lt_car], [[$1]])
9289: m4_define([lt_cdr],
9290: [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9291: [$#], 1, [],
9292: [m4_dquote(m4_shift($@))])])
9293: m4_define([lt_unquote], $1)
9294:
9295:
9296: # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9297: # ------------------------------------------
9298: # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9299: # Note that neither SEPARATOR nor STRING are expanded; they are appended
9300: # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9301: # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9302: # than defined and empty).
9303: #
9304: # This macro is needed until we can rely on Autoconf 2.62, since earlier
9305: # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9306: m4_define([lt_append],
9307: [m4_define([$1],
9308: m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9309:
9310:
9311:
9312: # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9313: # ----------------------------------------------------------
9314: # Produce a SEP delimited list of all paired combinations of elements of
9315: # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9316: # has the form PREFIXmINFIXSUFFIXn.
9317: # Needed until we can rely on m4_combine added in Autoconf 2.62.
9318: m4_define([lt_combine],
9319: [m4_if(m4_eval([$# > 3]), [1],
9320: [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9321: [[m4_foreach([_Lt_prefix], [$2],
9322: [m4_foreach([_Lt_suffix],
9323: ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9324: [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9325:
9326:
9327: # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9328: # -----------------------------------------------------------------------
9329: # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9330: # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9331: m4_define([lt_if_append_uniq],
9332: [m4_ifdef([$1],
9333: [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9334: [lt_append([$1], [$2], [$3])$4],
9335: [$5])],
9336: [lt_append([$1], [$2], [$3])$4])])
9337:
9338:
9339: # lt_dict_add(DICT, KEY, VALUE)
9340: # -----------------------------
9341: m4_define([lt_dict_add],
9342: [m4_define([$1($2)], [$3])])
9343:
9344:
9345: # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9346: # --------------------------------------------
9347: m4_define([lt_dict_add_subkey],
9348: [m4_define([$1($2:$3)], [$4])])
9349:
9350:
9351: # lt_dict_fetch(DICT, KEY, [SUBKEY])
9352: # ----------------------------------
9353: m4_define([lt_dict_fetch],
9354: [m4_ifval([$3],
9355: m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9356: m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9357:
9358:
9359: # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9360: # -----------------------------------------------------------------
9361: m4_define([lt_if_dict_fetch],
9362: [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9363: [$5],
9364: [$6])])
9365:
9366:
9367: # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9368: # --------------------------------------------------------------
9369: m4_define([lt_dict_filter],
9370: [m4_if([$5], [], [],
9371: [lt_join(m4_quote(m4_default([$4], [[, ]])),
9372: lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9373: [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9374: ])
9375:
9376: # ltversion.m4 -- version numbers -*- Autoconf -*-
9377: #
9378: # Copyright (C) 2004 Free Software Foundation, Inc.
9379: # Written by Scott James Remnant, 2004
9380: #
9381: # This file is free software; the Free Software Foundation gives
9382: # unlimited permission to copy and/or distribute it, with or without
9383: # modifications, as long as this notice is preserved.
9384:
9385: # @configure_input@
9386:
9387: # serial 3337 ltversion.m4
9388: # This file is part of GNU Libtool
9389:
9390: m4_define([LT_PACKAGE_VERSION], [2.4.2])
9391: m4_define([LT_PACKAGE_REVISION], [1.3337])
9392:
9393: AC_DEFUN([LTVERSION_VERSION],
9394: [macro_version='2.4.2'
9395: macro_revision='1.3337'
9396: _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9397: _LT_DECL(, macro_revision, 0)
9398: ])
9399:
9400: # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9401: #
9402: # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9403: # Written by Scott James Remnant, 2004.
9404: #
9405: # This file is free software; the Free Software Foundation gives
9406: # unlimited permission to copy and/or distribute it, with or without
9407: # modifications, as long as this notice is preserved.
9408:
9409: # serial 5 lt~obsolete.m4
9410:
9411: # These exist entirely to fool aclocal when bootstrapping libtool.
9412: #
9413: # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9414: # which have later been changed to m4_define as they aren't part of the
9415: # exported API, or moved to Autoconf or Automake where they belong.
9416: #
9417: # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
9418: # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9419: # using a macro with the same name in our local m4/libtool.m4 it'll
9420: # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9421: # and doesn't know about Autoconf macros at all.)
9422: #
9423: # So we provide this file, which has a silly filename so it's always
9424: # included after everything else. This provides aclocal with the
9425: # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9426: # because those macros already exist, or will be overwritten later.
9427: # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9428: #
9429: # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9430: # Yes, that means every name once taken will need to remain here until
9431: # we give up compatibility with versions before 1.7, at which point
9432: # we need to keep only those names which we still refer to.
9433:
9434: # This is to help aclocal find these macros, as it can't see m4_define.
9435: AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9436:
9437: m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9438: m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9439: m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9440: m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9441: m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9442: m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9443: m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9444: m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9445: m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9446: m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9447: m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9448: m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9449: m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9450: m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9451: m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9452: m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9453: m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9454: m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9455: m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9456: m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9457: m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9458: m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9459: m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9460: m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9461: m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9462: m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9463: m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9464: m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9465: m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9466: m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9467: m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9468: m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9469: m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9470: m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9471: m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9472: m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9473: m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9474: m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9475: m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9476: m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9477: m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9478: m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9479: m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9480: m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9481: m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9482: m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9483: m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9484: m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9485: m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9486: m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9487: m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9488: m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9489: m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9490: m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9491: m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9492: m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9493: m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9494: m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9495: m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
9496: m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
9497: m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
9498:
1.1 misha 9499: # -*- Autoconf -*-
9500: # Copyright (C) 2002, 2003 Free Software Foundation, Inc.
9501: # Generated from amversion.in; do not edit by hand.
9502:
9503: # This program is free software; you can redistribute it and/or modify
9504: # it under the terms of the GNU General Public License as published by
9505: # the Free Software Foundation; either version 2, or (at your option)
9506: # any later version.
9507:
9508: # This program is distributed in the hope that it will be useful,
9509: # but WITHOUT ANY WARRANTY; without even the implied warranty of
9510: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9511: # GNU General Public License for more details.
9512:
9513: # You should have received a copy of the GNU General Public License
9514: # along with this program; if not, write to the Free Software
9515: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
9516:
9517: # AM_AUTOMAKE_VERSION(VERSION)
9518: # ----------------------------
9519: # Automake X.Y traces this macro to ensure aclocal.m4 has been
9520: # generated from the m4 files accompanying Automake X.Y.
9521: AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
9522:
9523: # AM_SET_CURRENT_AUTOMAKE_VERSION
9524: # -------------------------------
9525: # Call AM_AUTOMAKE_VERSION so it can be traced.
9526: # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
9527: AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9528: [AM_AUTOMAKE_VERSION([1.9])])
9529:
9530: # AM_AUX_DIR_EXPAND
9531:
9532: # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
9533:
9534: # This program is free software; you can redistribute it and/or modify
9535: # it under the terms of the GNU General Public License as published by
9536: # the Free Software Foundation; either version 2, or (at your option)
9537: # any later version.
9538:
9539: # This program is distributed in the hope that it will be useful,
9540: # but WITHOUT ANY WARRANTY; without even the implied warranty of
9541: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9542: # GNU General Public License for more details.
9543:
9544: # You should have received a copy of the GNU General Public License
9545: # along with this program; if not, write to the Free Software
9546: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
9547: # 02111-1307, USA.
9548:
9549: # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9550: # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
9551: # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9552: #
9553: # Of course, Automake must honor this variable whenever it calls a
9554: # tool from the auxiliary directory. The problem is that $srcdir (and
9555: # therefore $ac_aux_dir as well) can be either absolute or relative,
9556: # depending on how configure is run. This is pretty annoying, since
9557: # it makes $ac_aux_dir quite unusable in subdirectories: in the top
9558: # source directory, any form will work fine, but in subdirectories a
9559: # relative path needs to be adjusted first.
9560: #
9561: # $ac_aux_dir/missing
9562: # fails when called from a subdirectory if $ac_aux_dir is relative
9563: # $top_srcdir/$ac_aux_dir/missing
9564: # fails if $ac_aux_dir is absolute,
9565: # fails when called from a subdirectory in a VPATH build with
9566: # a relative $ac_aux_dir
9567: #
9568: # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9569: # are both prefixed by $srcdir. In an in-source build this is usually
9570: # harmless because $srcdir is `.', but things will broke when you
9571: # start a VPATH build or use an absolute $srcdir.
9572: #
9573: # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9574: # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
9575: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9576: # and then we would define $MISSING as
9577: # MISSING="\${SHELL} $am_aux_dir/missing"
9578: # This will work as long as MISSING is not called from configure, because
9579: # unfortunately $(top_srcdir) has no meaning in configure.
9580: # However there are other variables, like CC, which are often used in
9581: # configure, and could therefore not use this "fixed" $ac_aux_dir.
9582: #
9583: # Another solution, used here, is to always expand $ac_aux_dir to an
9584: # absolute PATH. The drawback is that using absolute paths prevent a
9585: # configured tree to be moved without reconfiguration.
9586:
9587: AC_DEFUN([AM_AUX_DIR_EXPAND],
9588: [dnl Rely on autoconf to set up CDPATH properly.
9589: AC_PREREQ([2.50])dnl
9590: # expand $ac_aux_dir to an absolute path
9591: am_aux_dir=`cd $ac_aux_dir && pwd`
9592: ])
9593:
9594: # AM_CONDITIONAL -*- Autoconf -*-
9595:
9596: # Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
9597:
9598: # This program is free software; you can redistribute it and/or modify
9599: # it under the terms of the GNU General Public License as published by
9600: # the Free Software Foundation; either version 2, or (at your option)
9601: # any later version.
9602:
9603: # This program is distributed in the hope that it will be useful,
9604: # but WITHOUT ANY WARRANTY; without even the implied warranty of
9605: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9606: # GNU General Public License for more details.
9607:
9608: # You should have received a copy of the GNU General Public License
9609: # along with this program; if not, write to the Free Software
9610: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
9611: # 02111-1307, USA.
9612:
9613: # serial 6
9614:
9615: # AM_CONDITIONAL(NAME, SHELL-CONDITION)
9616: # -------------------------------------
9617: # Define a conditional.
9618: AC_DEFUN([AM_CONDITIONAL],
9619: [AC_PREREQ(2.52)dnl
9620: ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
9621: [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9622: AC_SUBST([$1_TRUE])
9623: AC_SUBST([$1_FALSE])
9624: if $2; then
9625: $1_TRUE=
9626: $1_FALSE='#'
9627: else
9628: $1_TRUE='#'
9629: $1_FALSE=
9630: fi
9631: AC_CONFIG_COMMANDS_PRE(
9632: [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9633: AC_MSG_ERROR([[conditional "$1" was never defined.
9634: Usually this means the macro was only invoked conditionally.]])
9635: fi])])
9636:
9637: # serial 7 -*- Autoconf -*-
9638:
9639: # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
9640: # Free Software Foundation, Inc.
9641:
9642: # This program is free software; you can redistribute it and/or modify
9643: # it under the terms of the GNU General Public License as published by
9644: # the Free Software Foundation; either version 2, or (at your option)
9645: # any later version.
9646:
9647: # This program is distributed in the hope that it will be useful,
9648: # but WITHOUT ANY WARRANTY; without even the implied warranty of
9649: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9650: # GNU General Public License for more details.
9651:
9652: # You should have received a copy of the GNU General Public License
9653: # along with this program; if not, write to the Free Software
9654: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
9655: # 02111-1307, USA.
9656:
9657:
9658: # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9659: # written in clear, in which case automake, when reading aclocal.m4,
9660: # will think it sees a *use*, and therefore will trigger all it's
9661: # C support machinery. Also note that it means that autoscan, seeing
9662: # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9663:
9664:
9665:
9666: # _AM_DEPENDENCIES(NAME)
9667: # ----------------------
9668: # See how the compiler implements dependency checking.
9669: # NAME is "CC", "CXX", "GCJ", or "OBJC".
9670: # We try a few techniques and use that to set a single cache variable.
9671: #
9672: # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9673: # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9674: # dependency, and given that the user is not expected to run this macro,
9675: # just rely on AC_PROG_CC.
9676: AC_DEFUN([_AM_DEPENDENCIES],
9677: [AC_REQUIRE([AM_SET_DEPDIR])dnl
9678: AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9679: AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9680: AC_REQUIRE([AM_DEP_TRACK])dnl
9681:
9682: ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
9683: [$1], CXX, [depcc="$CXX" am_compiler_list=],
9684: [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9685: [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
9686: [depcc="$$1" am_compiler_list=])
9687:
9688: AC_CACHE_CHECK([dependency style of $depcc],
9689: [am_cv_$1_dependencies_compiler_type],
9690: [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9691: # We make a subdir and do the tests there. Otherwise we can end up
9692: # making bogus files that we don't know about and never remove. For
9693: # instance it was reported that on HP-UX the gcc test will end up
9694: # making a dummy file named `D' -- because `-MD' means `put the output
9695: # in D'.
9696: mkdir conftest.dir
9697: # Copy depcomp to subdir because otherwise we won't find it if we're
9698: # using a relative directory.
9699: cp "$am_depcomp" conftest.dir
9700: cd conftest.dir
9701: # We will build objects and dependencies in a subdirectory because
9702: # it helps to detect inapplicable dependency modes. For instance
9703: # both Tru64's cc and ICC support -MD to output dependencies as a
9704: # side effect of compilation, but ICC will put the dependencies in
9705: # the current directory while Tru64 will put them in the object
9706: # directory.
9707: mkdir sub
9708:
9709: am_cv_$1_dependencies_compiler_type=none
9710: if test "$am_compiler_list" = ""; then
9711: am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9712: fi
9713: for depmode in $am_compiler_list; do
9714: # Setup a source with many dependencies, because some compilers
9715: # like to wrap large dependency lists on column 80 (with \), and
9716: # we should not choose a depcomp mode which is confused by this.
9717: #
9718: # We need to recreate these files for each test, as the compiler may
9719: # overwrite some of them when testing with obscure command lines.
9720: # This happens at least with the AIX C compiler.
9721: : > sub/conftest.c
9722: for i in 1 2 3 4 5 6; do
9723: echo '#include "conftst'$i'.h"' >> sub/conftest.c
9724: # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9725: # Solaris 8's {/usr,}/bin/sh.
9726: touch sub/conftst$i.h
9727: done
9728: echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9729:
9730: case $depmode in
9731: nosideeffect)
9732: # after this tag, mechanisms are not by side-effect, so they'll
9733: # only be used when explicitly requested
9734: if test "x$enable_dependency_tracking" = xyes; then
9735: continue
9736: else
9737: break
9738: fi
9739: ;;
9740: none) break ;;
9741: esac
9742: # We check with `-c' and `-o' for the sake of the "dashmstdout"
9743: # mode. It turns out that the SunPro C++ compiler does not properly
9744: # handle `-M -o', and we need to detect this.
9745: if depmode=$depmode \
9746: source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
9747: depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9748: $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
9749: >/dev/null 2>conftest.err &&
9750: grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9751: grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
9752: ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9753: # icc doesn't choke on unknown options, it will just issue warnings
9754: # or remarks (even with -Werror). So we grep stderr for any message
9755: # that says an option was ignored or not supported.
9756: # When given -MP, icc 7.0 and 7.1 complain thusly:
9757: # icc: Command line warning: ignoring option '-M'; no argument required
9758: # The diagnosis changed in icc 8.0:
9759: # icc: Command line remark: option '-MP' not supported
9760: if (grep 'ignoring option' conftest.err ||
9761: grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9762: am_cv_$1_dependencies_compiler_type=$depmode
9763: break
9764: fi
9765: fi
9766: done
9767:
9768: cd ..
9769: rm -rf conftest.dir
9770: else
9771: am_cv_$1_dependencies_compiler_type=none
9772: fi
9773: ])
9774: AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9775: AM_CONDITIONAL([am__fastdep$1], [
9776: test "x$enable_dependency_tracking" != xno \
9777: && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9778: ])
9779:
9780:
9781: # AM_SET_DEPDIR
9782: # -------------
9783: # Choose a directory name for dependency files.
9784: # This macro is AC_REQUIREd in _AM_DEPENDENCIES
9785: AC_DEFUN([AM_SET_DEPDIR],
9786: [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9787: AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9788: ])
9789:
9790:
9791: # AM_DEP_TRACK
9792: # ------------
9793: AC_DEFUN([AM_DEP_TRACK],
9794: [AC_ARG_ENABLE(dependency-tracking,
9795: [ --disable-dependency-tracking speeds up one-time build
9796: --enable-dependency-tracking do not reject slow dependency extractors])
9797: if test "x$enable_dependency_tracking" != xno; then
9798: am_depcomp="$ac_aux_dir/depcomp"
9799: AMDEPBACKSLASH='\'
9800: fi
9801: AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9802: AC_SUBST([AMDEPBACKSLASH])
9803: ])
9804:
9805: # Generate code to set up dependency tracking. -*- Autoconf -*-
9806:
9807: # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
9808: # Free Software Foundation, Inc.
9809:
9810: # This program is free software; you can redistribute it and/or modify
9811: # it under the terms of the GNU General Public License as published by
9812: # the Free Software Foundation; either version 2, or (at your option)
9813: # any later version.
9814:
9815: # This program is distributed in the hope that it will be useful,
9816: # but WITHOUT ANY WARRANTY; without even the implied warranty of
9817: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9818: # GNU General Public License for more details.
9819:
9820: # You should have received a copy of the GNU General Public License
9821: # along with this program; if not, write to the Free Software
9822: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
9823: # 02111-1307, USA.
9824:
9825: #serial 2
9826:
9827: # _AM_OUTPUT_DEPENDENCY_COMMANDS
9828: # ------------------------------
9829: AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9830: [for mf in $CONFIG_FILES; do
9831: # Strip MF so we end up with the name of the file.
9832: mf=`echo "$mf" | sed -e 's/:.*$//'`
9833: # Check whether this is an Automake generated Makefile or not.
9834: # We used to match only the files named `Makefile.in', but
9835: # some people rename them; so instead we look at the file content.
9836: # Grep'ing the first line is not enough: some people post-process
9837: # each Makefile.in and add a new line on top of each file to say so.
9838: # So let's grep whole file.
9839: if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
9840: dirpart=`AS_DIRNAME("$mf")`
9841: else
9842: continue
9843: fi
9844: # Extract the definition of DEPDIR, am__include, and am__quote
9845: # from the Makefile without running `make'.
9846: DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9847: test -z "$DEPDIR" && continue
9848: am__include=`sed -n 's/^am__include = //p' < "$mf"`
9849: test -z "am__include" && continue
9850: am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9851: # When using ansi2knr, U may be empty or an underscore; expand it
9852: U=`sed -n 's/^U = //p' < "$mf"`
9853: # Find all dependency output files, they are included files with
9854: # $(DEPDIR) in their names. We invoke sed twice because it is the
9855: # simplest approach to changing $(DEPDIR) to its actual value in the
9856: # expansion.
9857: for file in `sed -n "
9858: s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9859: sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9860: # Make sure the directory exists.
9861: test -f "$dirpart/$file" && continue
9862: fdir=`AS_DIRNAME(["$file"])`
9863: AS_MKDIR_P([$dirpart/$fdir])
9864: # echo "creating $dirpart/$file"
9865: echo '# dummy' > "$dirpart/$file"
9866: done
9867: done
9868: ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9869:
9870:
9871: # AM_OUTPUT_DEPENDENCY_COMMANDS
9872: # -----------------------------
9873: # This macro should only be invoked once -- use via AC_REQUIRE.
9874: #
9875: # This code is only required when automatic dependency tracking
9876: # is enabled. FIXME. This creates each `.P' file that we will
9877: # need in order to bootstrap the dependency handling code.
9878: AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9879: [AC_CONFIG_COMMANDS([depfiles],
9880: [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9881: [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9882: ])
9883:
9884: # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
9885:
9886: # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
9887:
9888: # This program is free software; you can redistribute it and/or modify
9889: # it under the terms of the GNU General Public License as published by
9890: # the Free Software Foundation; either version 2, or (at your option)
9891: # any later version.
9892:
9893: # This program is distributed in the hope that it will be useful,
9894: # but WITHOUT ANY WARRANTY; without even the implied warranty of
9895: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9896: # GNU General Public License for more details.
9897:
9898: # You should have received a copy of the GNU General Public License
9899: # along with this program; if not, write to the Free Software
9900: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
9901: # 02111-1307, USA.
9902:
9903: # serial 7
9904:
9905: # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
9906: AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9907:
9908: # Do all the work for Automake. -*- Autoconf -*-
9909:
9910: # This macro actually does too much some checks are only needed if
9911: # your package does certain things. But this isn't really a big deal.
9912:
9913: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
9914: # Free Software Foundation, Inc.
9915:
9916: # This program is free software; you can redistribute it and/or modify
9917: # it under the terms of the GNU General Public License as published by
9918: # the Free Software Foundation; either version 2, or (at your option)
9919: # any later version.
9920:
9921: # This program is distributed in the hope that it will be useful,
9922: # but WITHOUT ANY WARRANTY; without even the implied warranty of
9923: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9924: # GNU General Public License for more details.
9925:
9926: # You should have received a copy of the GNU General Public License
9927: # along with this program; if not, write to the Free Software
9928: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
9929: # 02111-1307, USA.
9930:
9931: # serial 11
9932:
9933: # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9934: # AM_INIT_AUTOMAKE([OPTIONS])
9935: # -----------------------------------------------
9936: # The call with PACKAGE and VERSION arguments is the old style
9937: # call (pre autoconf-2.50), which is being phased out. PACKAGE
9938: # and VERSION should now be passed to AC_INIT and removed from
9939: # the call to AM_INIT_AUTOMAKE.
9940: # We support both call styles for the transition. After
9941: # the next Automake release, Autoconf can make the AC_INIT
9942: # arguments mandatory, and then we can depend on a new Autoconf
9943: # release and drop the old call support.
9944: AC_DEFUN([AM_INIT_AUTOMAKE],
9945: [AC_PREREQ([2.58])dnl
9946: dnl Autoconf wants to disallow AM_ names. We explicitly allow
9947: dnl the ones we care about.
9948: m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9949: AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9950: AC_REQUIRE([AC_PROG_INSTALL])dnl
9951: # test to see if srcdir already configured
9952: if test "`cd $srcdir && pwd`" != "`pwd`" &&
9953: test -f $srcdir/config.status; then
9954: AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9955: fi
9956:
9957: # test whether we have cygpath
9958: if test -z "$CYGPATH_W"; then
9959: if (cygpath --version) >/dev/null 2>/dev/null; then
9960: CYGPATH_W='cygpath -w'
9961: else
9962: CYGPATH_W=echo
9963: fi
9964: fi
9965: AC_SUBST([CYGPATH_W])
9966:
9967: # Define the identity of the package.
9968: dnl Distinguish between old-style and new-style calls.
9969: m4_ifval([$2],
9970: [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9971: AC_SUBST([PACKAGE], [$1])dnl
9972: AC_SUBST([VERSION], [$2])],
9973: [_AM_SET_OPTIONS([$1])dnl
9974: AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9975: AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9976:
9977: _AM_IF_OPTION([no-define],,
9978: [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9979: AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9980:
9981: # Some tools Automake needs.
9982: AC_REQUIRE([AM_SANITY_CHECK])dnl
9983: AC_REQUIRE([AC_ARG_PROGRAM])dnl
9984: AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9985: AM_MISSING_PROG(AUTOCONF, autoconf)
9986: AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9987: AM_MISSING_PROG(AUTOHEADER, autoheader)
9988: AM_MISSING_PROG(MAKEINFO, makeinfo)
9989: AM_PROG_INSTALL_SH
9990: AM_PROG_INSTALL_STRIP
9991: AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9992: # We need awk for the "check" target. The system "awk" is bad on
9993: # some platforms.
9994: AC_REQUIRE([AC_PROG_AWK])dnl
9995: AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9996: AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9997: _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9998: [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9999: [_AM_PROG_TAR([v7])])])
10000: _AM_IF_OPTION([no-dependencies],,
10001: [AC_PROVIDE_IFELSE([AC_PROG_CC],
10002: [_AM_DEPENDENCIES(CC)],
10003: [define([AC_PROG_CC],
10004: defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
10005: AC_PROVIDE_IFELSE([AC_PROG_CXX],
10006: [_AM_DEPENDENCIES(CXX)],
10007: [define([AC_PROG_CXX],
10008: defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
10009: ])
10010: ])
10011:
10012:
10013: # When config.status generates a header, we must update the stamp-h file.
10014: # This file resides in the same directory as the config header
10015: # that is generated. The stamp files are numbered to have different names.
10016:
10017: # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10018: # loop where config.status creates the headers, so we can generate
10019: # our stamp files there.
10020: AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10021: [# Compute $1's index in $config_headers.
10022: _am_stamp_count=1
10023: for _am_header in $config_headers :; do
10024: case $_am_header in
10025: $1 | $1:* )
10026: break ;;
10027: * )
10028: _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10029: esac
10030: done
10031: echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
10032:
10033: # AM_PROG_INSTALL_SH
10034: # ------------------
10035: # Define $install_sh.
10036:
10037: # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
10038:
10039: # This program is free software; you can redistribute it and/or modify
10040: # it under the terms of the GNU General Public License as published by
10041: # the Free Software Foundation; either version 2, or (at your option)
10042: # any later version.
10043:
10044: # This program is distributed in the hope that it will be useful,
10045: # but WITHOUT ANY WARRANTY; without even the implied warranty of
10046: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10047: # GNU General Public License for more details.
10048:
10049: # You should have received a copy of the GNU General Public License
10050: # along with this program; if not, write to the Free Software
10051: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10052: # 02111-1307, USA.
10053:
10054: AC_DEFUN([AM_PROG_INSTALL_SH],
10055: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10056: install_sh=${install_sh-"$am_aux_dir/install-sh"}
10057: AC_SUBST(install_sh)])
10058:
10059: # -*- Autoconf -*-
10060: # Copyright (C) 2003 Free Software Foundation, Inc.
10061:
10062: # This program is free software; you can redistribute it and/or modify
10063: # it under the terms of the GNU General Public License as published by
10064: # the Free Software Foundation; either version 2, or (at your option)
10065: # any later version.
10066:
10067: # This program is distributed in the hope that it will be useful,
10068: # but WITHOUT ANY WARRANTY; without even the implied warranty of
10069: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10070: # GNU General Public License for more details.
10071:
10072: # You should have received a copy of the GNU General Public License
10073: # along with this program; if not, write to the Free Software
10074: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10075: # 02111-1307, USA.
10076:
10077: # serial 1
10078:
10079: # Check whether the underlying file-system supports filenames
10080: # with a leading dot. For instance MS-DOS doesn't.
10081: AC_DEFUN([AM_SET_LEADING_DOT],
10082: [rm -rf .tst 2>/dev/null
10083: mkdir .tst 2>/dev/null
10084: if test -d .tst; then
10085: am__leading_dot=.
10086: else
10087: am__leading_dot=_
10088: fi
10089: rmdir .tst 2>/dev/null
10090: AC_SUBST([am__leading_dot])])
10091:
10092: # Check to see how 'make' treats includes. -*- Autoconf -*-
10093:
10094: # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
10095:
10096: # This program is free software; you can redistribute it and/or modify
10097: # it under the terms of the GNU General Public License as published by
10098: # the Free Software Foundation; either version 2, or (at your option)
10099: # any later version.
10100:
10101: # This program is distributed in the hope that it will be useful,
10102: # but WITHOUT ANY WARRANTY; without even the implied warranty of
10103: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10104: # GNU General Public License for more details.
10105:
10106: # You should have received a copy of the GNU General Public License
10107: # along with this program; if not, write to the Free Software
10108: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10109: # 02111-1307, USA.
10110:
10111: # serial 2
10112:
10113: # AM_MAKE_INCLUDE()
10114: # -----------------
10115: # Check to see how make treats includes.
10116: AC_DEFUN([AM_MAKE_INCLUDE],
10117: [am_make=${MAKE-make}
10118: cat > confinc << 'END'
10119: am__doit:
10120: @echo done
10121: .PHONY: am__doit
10122: END
10123: # If we don't find an include directive, just comment out the code.
10124: AC_MSG_CHECKING([for style of include used by $am_make])
10125: am__include="#"
10126: am__quote=
10127: _am_result=none
10128: # First try GNU make style include.
10129: echo "include confinc" > confmf
10130: # We grep out `Entering directory' and `Leaving directory'
10131: # messages which can occur if `w' ends up in MAKEFLAGS.
10132: # In particular we don't look at `^make:' because GNU make might
10133: # be invoked under some other name (usually "gmake"), in which
10134: # case it prints its new name instead of `make'.
10135: if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
10136: am__include=include
10137: am__quote=
10138: _am_result=GNU
10139: fi
10140: # Now try BSD make style include.
10141: if test "$am__include" = "#"; then
10142: echo '.include "confinc"' > confmf
10143: if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
10144: am__include=.include
10145: am__quote="\""
10146: _am_result=BSD
10147: fi
10148: fi
10149: AC_SUBST([am__include])
10150: AC_SUBST([am__quote])
10151: AC_MSG_RESULT([$_am_result])
10152: rm -f confinc confmf
10153: ])
10154:
10155: # -*- Autoconf -*-
10156:
10157:
10158: # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
10159:
10160: # This program is free software; you can redistribute it and/or modify
10161: # it under the terms of the GNU General Public License as published by
10162: # the Free Software Foundation; either version 2, or (at your option)
10163: # any later version.
10164:
10165: # This program is distributed in the hope that it will be useful,
10166: # but WITHOUT ANY WARRANTY; without even the implied warranty of
10167: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10168: # GNU General Public License for more details.
10169:
10170: # You should have received a copy of the GNU General Public License
10171: # along with this program; if not, write to the Free Software
10172: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10173: # 02111-1307, USA.
10174:
10175: # serial 3
10176:
10177: # AM_MISSING_PROG(NAME, PROGRAM)
10178: # ------------------------------
10179: AC_DEFUN([AM_MISSING_PROG],
10180: [AC_REQUIRE([AM_MISSING_HAS_RUN])
10181: $1=${$1-"${am_missing_run}$2"}
10182: AC_SUBST($1)])
10183:
10184:
10185: # AM_MISSING_HAS_RUN
10186: # ------------------
10187: # Define MISSING if not defined so far and test if it supports --run.
10188: # If it does, set am_missing_run to use it, otherwise, to nothing.
10189: AC_DEFUN([AM_MISSING_HAS_RUN],
10190: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10191: test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
10192: # Use eval to expand $SHELL
10193: if eval "$MISSING --run true"; then
10194: am_missing_run="$MISSING --run "
10195: else
10196: am_missing_run=
10197: AC_MSG_WARN([`missing' script is too old or missing])
10198: fi
10199: ])
10200:
10201: # AM_PROG_MKDIR_P
10202: # ---------------
10203: # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
10204:
10205: # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
10206:
10207: # This program is free software; you can redistribute it and/or modify
10208: # it under the terms of the GNU General Public License as published by
10209: # the Free Software Foundation; either version 2, or (at your option)
10210: # any later version.
10211:
10212: # This program is distributed in the hope that it will be useful,
10213: # but WITHOUT ANY WARRANTY; without even the implied warranty of
10214: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10215: # GNU General Public License for more details.
10216:
10217: # You should have received a copy of the GNU General Public License
10218: # along with this program; if not, write to the Free Software
10219: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10220: # 02111-1307, USA.
10221:
10222: # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
10223: # created by `make install' are always world readable, even if the
10224: # installer happens to have an overly restrictive umask (e.g. 077).
10225: # This was a mistake. There are at least two reasons why we must not
10226: # use `-m 0755':
10227: # - it causes special bits like SGID to be ignored,
10228: # - it may be too restrictive (some setups expect 775 directories).
10229: #
10230: # Do not use -m 0755 and let people choose whatever they expect by
10231: # setting umask.
10232: #
10233: # We cannot accept any implementation of `mkdir' that recognizes `-p'.
10234: # Some implementations (such as Solaris 8's) are not thread-safe: if a
10235: # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
10236: # concurrently, both version can detect that a/ is missing, but only
10237: # one can create it and the other will error out. Consequently we
10238: # restrict ourselves to GNU make (using the --version option ensures
10239: # this.)
10240: AC_DEFUN([AM_PROG_MKDIR_P],
10241: [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
10242: # We used to keeping the `.' as first argument, in order to
10243: # allow $(mkdir_p) to be used without argument. As in
10244: # $(mkdir_p) $(somedir)
10245: # where $(somedir) is conditionally defined. However this is wrong
10246: # for two reasons:
10247: # 1. if the package is installed by a user who cannot write `.'
10248: # make install will fail,
10249: # 2. the above comment should most certainly read
10250: # $(mkdir_p) $(DESTDIR)$(somedir)
10251: # so it does not work when $(somedir) is undefined and
10252: # $(DESTDIR) is not.
10253: # To support the latter case, we have to write
10254: # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
10255: # so the `.' trick is pointless.
10256: mkdir_p='mkdir -p --'
10257: else
10258: # On NextStep and OpenStep, the `mkdir' command does not
10259: # recognize any option. It will interpret all options as
10260: # directories to create, and then abort because `.' already
10261: # exists.
10262: for d in ./-p ./--version;
10263: do
10264: test -d $d && rmdir $d
10265: done
10266: # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
10267: if test -f "$ac_aux_dir/mkinstalldirs"; then
10268: mkdir_p='$(mkinstalldirs)'
10269: else
10270: mkdir_p='$(install_sh) -d'
10271: fi
10272: fi
10273: AC_SUBST([mkdir_p])])
10274:
10275: # Helper functions for option handling. -*- Autoconf -*-
10276:
10277: # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
10278:
10279: # This program is free software; you can redistribute it and/or modify
10280: # it under the terms of the GNU General Public License as published by
10281: # the Free Software Foundation; either version 2, or (at your option)
10282: # any later version.
10283:
10284: # This program is distributed in the hope that it will be useful,
10285: # but WITHOUT ANY WARRANTY; without even the implied warranty of
10286: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10287: # GNU General Public License for more details.
10288:
10289: # You should have received a copy of the GNU General Public License
10290: # along with this program; if not, write to the Free Software
10291: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10292: # 02111-1307, USA.
10293:
10294: # serial 2
10295:
10296: # _AM_MANGLE_OPTION(NAME)
10297: # -----------------------
10298: AC_DEFUN([_AM_MANGLE_OPTION],
10299: [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10300:
10301: # _AM_SET_OPTION(NAME)
10302: # ------------------------------
10303: # Set option NAME. Presently that only means defining a flag for this option.
10304: AC_DEFUN([_AM_SET_OPTION],
10305: [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10306:
10307: # _AM_SET_OPTIONS(OPTIONS)
10308: # ----------------------------------
10309: # OPTIONS is a space-separated list of Automake options.
10310: AC_DEFUN([_AM_SET_OPTIONS],
10311: [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10312:
10313: # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10314: # -------------------------------------------
10315: # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10316: AC_DEFUN([_AM_IF_OPTION],
10317: [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10318:
10319: #
10320: # Check to make sure that the build environment is sane.
10321: #
10322:
10323: # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
10324:
10325: # This program is free software; you can redistribute it and/or modify
10326: # it under the terms of the GNU General Public License as published by
10327: # the Free Software Foundation; either version 2, or (at your option)
10328: # any later version.
10329:
10330: # This program is distributed in the hope that it will be useful,
10331: # but WITHOUT ANY WARRANTY; without even the implied warranty of
10332: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10333: # GNU General Public License for more details.
10334:
10335: # You should have received a copy of the GNU General Public License
10336: # along with this program; if not, write to the Free Software
10337: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10338: # 02111-1307, USA.
10339:
10340: # serial 3
10341:
10342: # AM_SANITY_CHECK
10343: # ---------------
10344: AC_DEFUN([AM_SANITY_CHECK],
10345: [AC_MSG_CHECKING([whether build environment is sane])
10346: # Just in case
10347: sleep 1
10348: echo timestamp > conftest.file
10349: # Do `set' in a subshell so we don't clobber the current shell's
10350: # arguments. Must try -L first in case configure is actually a
10351: # symlink; some systems play weird games with the mod time of symlinks
10352: # (eg FreeBSD returns the mod time of the symlink's containing
10353: # directory).
10354: if (
10355: set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
10356: if test "$[*]" = "X"; then
10357: # -L didn't work.
10358: set X `ls -t $srcdir/configure conftest.file`
10359: fi
10360: rm -f conftest.file
10361: if test "$[*]" != "X $srcdir/configure conftest.file" \
10362: && test "$[*]" != "X conftest.file $srcdir/configure"; then
10363:
10364: # If neither matched, then we have a broken ls. This can happen
10365: # if, for instance, CONFIG_SHELL is bash and it inherits a
10366: # broken ls alias from the environment. This has actually
10367: # happened. Such a system could not be considered "sane".
10368: AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
10369: alias in your environment])
10370: fi
10371:
10372: test "$[2]" = conftest.file
10373: )
10374: then
10375: # Ok.
10376: :
10377: else
10378: AC_MSG_ERROR([newly created file is older than distributed files!
10379: Check your system clock])
10380: fi
10381: AC_MSG_RESULT(yes)])
10382:
10383: # AM_PROG_INSTALL_STRIP
10384:
10385: # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
10386:
10387: # This program is free software; you can redistribute it and/or modify
10388: # it under the terms of the GNU General Public License as published by
10389: # the Free Software Foundation; either version 2, or (at your option)
10390: # any later version.
10391:
10392: # This program is distributed in the hope that it will be useful,
10393: # but WITHOUT ANY WARRANTY; without even the implied warranty of
10394: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10395: # GNU General Public License for more details.
10396:
10397: # You should have received a copy of the GNU General Public License
10398: # along with this program; if not, write to the Free Software
10399: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10400: # 02111-1307, USA.
10401:
10402: # One issue with vendor `install' (even GNU) is that you can't
10403: # specify the program used to strip binaries. This is especially
10404: # annoying in cross-compiling environments, where the build's strip
10405: # is unlikely to handle the host's binaries.
10406: # Fortunately install-sh will honor a STRIPPROG variable, so we
10407: # always use install-sh in `make install-strip', and initialize
10408: # STRIPPROG with the value of the STRIP variable (set by the user).
10409: AC_DEFUN([AM_PROG_INSTALL_STRIP],
10410: [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10411: # Installed binaries are usually stripped using `strip' when the user
10412: # run `make install-strip'. However `strip' might not be the right
10413: # tool to use in cross-compilation environments, therefore Automake
10414: # will honor the `STRIP' environment variable to overrule this program.
10415: dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10416: if test "$cross_compiling" != no; then
10417: AC_CHECK_TOOL([STRIP], [strip], :)
10418: fi
10419: INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
10420: AC_SUBST([INSTALL_STRIP_PROGRAM])])
10421:
10422: # Check how to create a tarball. -*- Autoconf -*-
10423:
10424: # Copyright (C) 2004 Free Software Foundation, Inc.
10425:
10426: # This program is free software; you can redistribute it and/or modify
10427: # it under the terms of the GNU General Public License as published by
10428: # the Free Software Foundation; either version 2, or (at your option)
10429: # any later version.
10430:
10431: # This program is distributed in the hope that it will be useful,
10432: # but WITHOUT ANY WARRANTY; without even the implied warranty of
10433: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10434: # GNU General Public License for more details.
10435:
10436: # You should have received a copy of the GNU General Public License
10437: # along with this program; if not, write to the Free Software
10438: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10439: # 02111-1307, USA.
10440:
10441: # serial 1
10442:
10443:
10444: # _AM_PROG_TAR(FORMAT)
10445: # --------------------
10446: # Check how to create a tarball in format FORMAT.
10447: # FORMAT should be one of `v7', `ustar', or `pax'.
10448: #
10449: # Substitute a variable $(am__tar) that is a command
10450: # writing to stdout a FORMAT-tarball containing the directory
10451: # $tardir.
10452: # tardir=directory && $(am__tar) > result.tar
10453: #
10454: # Substitute a variable $(am__untar) that extract such
10455: # a tarball read from stdin.
10456: # $(am__untar) < result.tar
10457: AC_DEFUN([_AM_PROG_TAR],
10458: [# Always define AMTAR for backward compatibility.
10459: AM_MISSING_PROG([AMTAR], [tar])
10460: m4_if([$1], [v7],
10461: [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
10462: [m4_case([$1], [ustar],, [pax],,
10463: [m4_fatal([Unknown tar format])])
10464: AC_MSG_CHECKING([how to create a $1 tar archive])
10465: # Loop over all known methods to create a tar archive until one works.
10466: _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10467: _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10468: # Do not fold the above two line into one, because Tru64 sh and
10469: # Solaris sh will not grok spaces in the rhs of `-'.
10470: for _am_tool in $_am_tools
10471: do
10472: case $_am_tool in
10473: gnutar)
10474: for _am_tar in tar gnutar gtar;
10475: do
10476: AM_RUN_LOG([$_am_tar --version]) && break
10477: done
10478: am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10479: am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10480: am__untar="$_am_tar -xf -"
10481: ;;
10482: plaintar)
10483: # Must skip GNU tar: if it does not support --format= it doesn't create
10484: # ustar tarball either.
10485: (tar --version) >/dev/null 2>&1 && continue
10486: am__tar='tar chf - "$$tardir"'
10487: am__tar_='tar chf - "$tardir"'
10488: am__untar='tar xf -'
10489: ;;
10490: pax)
10491: am__tar='pax -L -x $1 -w "$$tardir"'
10492: am__tar_='pax -L -x $1 -w "$tardir"'
10493: am__untar='pax -r'
10494: ;;
10495: cpio)
10496: am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10497: am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10498: am__untar='cpio -i -H $1 -d'
10499: ;;
10500: none)
10501: am__tar=false
10502: am__tar_=false
10503: am__untar=false
10504: ;;
10505: esac
10506:
10507: # If the value was cached, stop now. We just wanted to have am__tar
10508: # and am__untar set.
10509: test -n "${am_cv_prog_tar_$1}" && break
10510:
10511: # tar/untar a dummy directory, and stop if the command works
10512: rm -rf conftest.dir
10513: mkdir conftest.dir
10514: echo GrepMe > conftest.dir/file
10515: AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10516: rm -rf conftest.dir
10517: if test -s conftest.tar; then
10518: AM_RUN_LOG([$am__untar <conftest.tar])
10519: grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10520: fi
10521: done
10522: rm -rf conftest.dir
10523:
10524: AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10525: AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10526: AC_SUBST([am__tar])
10527: AC_SUBST([am__untar])
10528: ]) # _AM_PROG_TAR
10529:
E-mail: