ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/aclocal.m4
Revision: 1504
Committed: Thu Aug 16 18:03:00 2012 UTC (11 years, 7 months ago) by michael
Original Path: ircd-hybrid-8/aclocal.m4
File size: 375462 byte(s)
Log Message:
- automake 1.12.3

File Contents

# User Rev Content
1 michael 1504 # generated automatically by aclocal 1.12.3 -*- Autoconf -*-
2 michael 912
3 michael 1425 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
4    
5 michael 912 # This file is free software; the Free Software Foundation
6     # gives unlimited permission to copy and/or distribute it,
7     # with or without modifications, as long as this notice is preserved.
8    
9     # This program is distributed in the hope that it will be useful,
10     # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11     # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12     # PARTICULAR PURPOSE.
13    
14 db 941 m4_ifndef([AC_AUTOCONF_VERSION],
15     [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 michael 1373 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
17     [m4_warning([this file was generated for autoconf 2.69.
18 db 941 You have another version of autoconf. It may work, but is not guaranteed to.
19     If you have problems, you may need to regenerate the build system entirely.
20 michael 1373 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
21 michael 912
22 michael 945 # Portability macros for glibc argz. -*- Autoconf -*-
23     #
24     # Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
25     # Written by Gary V. Vaughan <gary@gnu.org>
26     #
27     # This file is free software; the Free Software Foundation gives
28     # unlimited permission to copy and/or distribute it, with or without
29     # modifications, as long as this notice is preserved.
30    
31     # serial 5 argz.m4
32    
33     AC_DEFUN([gl_FUNC_ARGZ],
34     [gl_PREREQ_ARGZ
35    
36     AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
37    
38     AC_CHECK_TYPES([error_t],
39     [],
40     [AC_DEFINE([error_t], [int],
41     [Define to a type to use for `error_t' if it is not otherwise available.])
42     AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
43     does not typedef error_t.])],
44     [#if defined(HAVE_ARGZ_H)
45     # include <argz.h>
46     #endif])
47    
48     ARGZ_H=
49     AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \
50     argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
51    
52     dnl if have system argz functions, allow forced use of
53     dnl libltdl-supplied implementation (and default to do so
54     dnl on "known bad" systems). Could use a runtime check, but
55     dnl (a) detecting malloc issues is notoriously unreliable
56     dnl (b) only known system that declares argz functions,
57     dnl provides them, yet they are broken, is cygwin
58     dnl releases prior to 16-Mar-2007 (1.5.24 and earlier)
59     dnl So, it's more straightforward simply to special case
60     dnl this for known bad systems.
61     AS_IF([test -z "$ARGZ_H"],
62     [AC_CACHE_CHECK(
63     [if argz actually works],
64     [lt_cv_sys_argz_works],
65     [[case $host_os in #(
66     *cygwin*)
67     lt_cv_sys_argz_works=no
68     if test "$cross_compiling" != no; then
69     lt_cv_sys_argz_works="guessing no"
70     else
71     lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
72     save_IFS=$IFS
73     IFS=-.
74     set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
75     IFS=$save_IFS
76     lt_os_major=${2-0}
77     lt_os_minor=${3-0}
78     lt_os_micro=${4-0}
79     if test "$lt_os_major" -gt 1 \
80     || { test "$lt_os_major" -eq 1 \
81     && { test "$lt_os_minor" -gt 5 \
82     || { test "$lt_os_minor" -eq 5 \
83     && test "$lt_os_micro" -gt 24; }; }; }; then
84     lt_cv_sys_argz_works=yes
85     fi
86     fi
87     ;; #(
88     *) lt_cv_sys_argz_works=yes ;;
89     esac]])
90 michael 1106 AS_IF([test "$lt_cv_sys_argz_works" = yes],
91 michael 945 [AC_DEFINE([HAVE_WORKING_ARGZ], 1,
92     [This value is set to 1 to indicate that the system argz facility works])],
93     [ARGZ_H=argz.h
94     AC_LIBOBJ([argz])])])
95    
96     AC_SUBST([ARGZ_H])
97     ])
98    
99     # Prerequisites of lib/argz.c.
100     AC_DEFUN([gl_PREREQ_ARGZ], [:])
101    
102 michael 912 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
103 michael 945 #
104     # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
105 michael 1257 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
106     # Foundation, Inc.
107 michael 945 # Written by Gordon Matzigkeit, 1996
108     #
109     # This file is free software; the Free Software Foundation gives
110     # unlimited permission to copy and/or distribute it, with or without
111     # modifications, as long as this notice is preserved.
112 michael 912
113 michael 945 m4_define([_LT_COPYING], [dnl
114     # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
115 michael 1257 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
116     # Foundation, Inc.
117 michael 945 # Written by Gordon Matzigkeit, 1996
118     #
119     # This file is part of GNU Libtool.
120     #
121     # GNU Libtool is free software; you can redistribute it and/or
122     # modify it under the terms of the GNU General Public License as
123     # published by the Free Software Foundation; either version 2 of
124     # the License, or (at your option) any later version.
125     #
126     # As a special exception to the GNU General Public License,
127     # if you distribute this file as part of a program or library that
128     # is built using GNU Libtool, you may include this file under the
129     # same distribution terms that you use for the rest of that program.
130     #
131     # GNU Libtool is distributed in the hope that it will be useful,
132     # but WITHOUT ANY WARRANTY; without even the implied warranty of
133     # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
134     # GNU General Public License for more details.
135     #
136     # You should have received a copy of the GNU General Public License
137     # along with GNU Libtool; see the file COPYING. If not, a copy
138     # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
139     # obtained by writing to the Free Software Foundation, Inc.,
140     # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
141     ])
142 michael 912
143 michael 1094 # serial 57 LT_INIT
144 michael 912
145    
146 michael 945 # LT_PREREQ(VERSION)
147     # ------------------
148     # Complain and exit if this libtool version is less that VERSION.
149     m4_defun([LT_PREREQ],
150     [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
151     [m4_default([$3],
152     [m4_fatal([Libtool version $1 or higher is required],
153     63)])],
154     [$2])])
155 michael 912
156    
157 michael 945 # _LT_CHECK_BUILDDIR
158     # ------------------
159     # Complain if the absolute build directory name contains unusual characters
160     m4_defun([_LT_CHECK_BUILDDIR],
161     [case `pwd` in
162     *\ * | *\ *)
163     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
164     esac
165     ])
166 michael 912
167    
168 michael 945 # LT_INIT([OPTIONS])
169     # ------------------
170     AC_DEFUN([LT_INIT],
171     [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
172 michael 1094 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
173 michael 945 AC_BEFORE([$0], [LT_LANG])dnl
174     AC_BEFORE([$0], [LT_OUTPUT])dnl
175     AC_BEFORE([$0], [LTDL_INIT])dnl
176     m4_require([_LT_CHECK_BUILDDIR])dnl
177 michael 912
178 michael 945 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
179     m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
180     m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
181     dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
182     dnl unless we require an AC_DEFUNed macro:
183     AC_REQUIRE([LTOPTIONS_VERSION])dnl
184     AC_REQUIRE([LTSUGAR_VERSION])dnl
185     AC_REQUIRE([LTVERSION_VERSION])dnl
186     AC_REQUIRE([LTOBSOLETE_VERSION])dnl
187     m4_require([_LT_PROG_LTMAIN])dnl
188    
189 michael 1094 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
190    
191 michael 945 dnl Parse OPTIONS
192     _LT_SET_OPTIONS([$0], [$1])
193    
194 michael 912 # This can be used to rebuild libtool when needed
195 michael 945 LIBTOOL_DEPS="$ltmain"
196 michael 912
197     # Always use our own libtool.
198     LIBTOOL='$(SHELL) $(top_builddir)/libtool'
199     AC_SUBST(LIBTOOL)dnl
200    
201 michael 945 _LT_SETUP
202 michael 912
203 michael 945 # Only expand once:
204     m4_define([LT_INIT])
205     ])# LT_INIT
206 michael 912
207 michael 945 # Old names:
208     AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
209     AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
210     dnl aclocal-1.4 backwards compatibility:
211     dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
212     dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
213    
214    
215     # _LT_CC_BASENAME(CC)
216     # -------------------
217     # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
218     m4_defun([_LT_CC_BASENAME],
219     [for cc_temp in $1""; do
220     case $cc_temp in
221     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
222     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
223     \-*) ;;
224     *) break;;
225     esac
226     done
227 michael 1094 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
228 michael 945 ])
229    
230    
231     # _LT_FILEUTILS_DEFAULTS
232     # ----------------------
233     # It is okay to use these file commands and assume they have been set
234     # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
235     m4_defun([_LT_FILEUTILS_DEFAULTS],
236     [: ${CP="cp -f"}
237     : ${MV="mv -f"}
238     : ${RM="rm -f"}
239     ])# _LT_FILEUTILS_DEFAULTS
240    
241    
242     # _LT_SETUP
243     # ---------
244     m4_defun([_LT_SETUP],
245     [AC_REQUIRE([AC_CANONICAL_HOST])dnl
246 michael 912 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
247 michael 1094 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
248     AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
249    
250 michael 1257 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
251     dnl
252 michael 945 _LT_DECL([], [host_alias], [0], [The host system])dnl
253     _LT_DECL([], [host], [0])dnl
254     _LT_DECL([], [host_os], [0])dnl
255     dnl
256     _LT_DECL([], [build_alias], [0], [The build system])dnl
257     _LT_DECL([], [build], [0])dnl
258     _LT_DECL([], [build_os], [0])dnl
259     dnl
260 michael 912 AC_REQUIRE([AC_PROG_CC])dnl
261 michael 945 AC_REQUIRE([LT_PATH_LD])dnl
262     AC_REQUIRE([LT_PATH_NM])dnl
263     dnl
264 michael 912 AC_REQUIRE([AC_PROG_LN_S])dnl
265 michael 945 test -z "$LN_S" && LN_S="ln -s"
266     _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
267 michael 912 dnl
268 michael 945 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
269     _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
270     _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
271     dnl
272     m4_require([_LT_FILEUTILS_DEFAULTS])dnl
273     m4_require([_LT_CHECK_SHELL_FEATURES])dnl
274 michael 1106 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
275 michael 945 m4_require([_LT_CMD_RELOAD])dnl
276     m4_require([_LT_CHECK_MAGIC_METHOD])dnl
277 michael 1106 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
278 michael 945 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
279     m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
280 michael 1106 m4_require([_LT_WITH_SYSROOT])dnl
281 michael 912
282 michael 945 _LT_CONFIG_LIBTOOL_INIT([
283     # See if we are running on zsh, and set the options which allow our
284     # commands through without removal of \ escapes INIT.
285     if test -n "\${ZSH_VERSION+set}" ; then
286     setopt NO_GLOB_SUBST
287     fi
288     ])
289     if test -n "${ZSH_VERSION+set}" ; then
290     setopt NO_GLOB_SUBST
291     fi
292 michael 912
293 michael 945 _LT_CHECK_OBJDIR
294    
295     m4_require([_LT_TAG_COMPILER])dnl
296    
297 michael 912 case $host_os in
298     aix3*)
299     # AIX sometimes has problems with the GCC collect2 program. For some
300     # reason, if we set the COLLECT_NAMES environment variable, the problems
301     # vanish in a puff of smoke.
302     if test "X${COLLECT_NAMES+set}" != Xset; then
303     COLLECT_NAMES=
304     export COLLECT_NAMES
305     fi
306     ;;
307     esac
308    
309     # Global variables:
310 michael 945 ofile=libtool
311 michael 912 can_build_shared=yes
312    
313     # All known linkers require a `.a' archive for static linking (except MSVC,
314     # which needs '.lib').
315     libext=a
316 michael 945
317 michael 912 with_gnu_ld="$lt_cv_prog_gnu_ld"
318    
319     old_CC="$CC"
320     old_CFLAGS="$CFLAGS"
321    
322     # Set sane defaults for various variables
323     test -z "$CC" && CC=cc
324     test -z "$LTCC" && LTCC=$CC
325     test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
326     test -z "$LD" && LD=ld
327     test -z "$ac_objext" && ac_objext=o
328    
329     _LT_CC_BASENAME([$compiler])
330    
331     # Only perform the check for file, if the check method requires it
332 michael 945 test -z "$MAGIC_CMD" && MAGIC_CMD=file
333 michael 912 case $deplibs_check_method in
334     file_magic*)
335     if test "$file_magic_cmd" = '$MAGIC_CMD'; then
336 michael 945 _LT_PATH_MAGIC
337 michael 912 fi
338     ;;
339     esac
340    
341 michael 945 # Use C for the default configuration in the libtool script
342     LT_SUPPORTED_TAG([CC])
343     _LT_LANG_C_CONFIG
344     _LT_LANG_DEFAULT_CONFIG
345     _LT_CONFIG_COMMANDS
346     ])# _LT_SETUP
347 db 941
348 michael 912
349 michael 1094 # _LT_PREPARE_SED_QUOTE_VARS
350     # --------------------------
351     # Define a few sed substitution that help us do robust quoting.
352     m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
353     [# Backslashify metacharacters that are still active within
354     # double-quoted strings.
355     sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
356    
357     # Same as above, but do not quote variable references.
358     double_quote_subst='s/\([["`\\]]\)/\\\1/g'
359    
360     # Sed substitution to delay expansion of an escaped shell variable in a
361     # double_quote_subst'ed string.
362     delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
363    
364     # Sed substitution to delay expansion of an escaped single quote.
365     delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
366    
367     # Sed substitution to avoid accidental globbing in evaled expressions
368     no_glob_subst='s/\*/\\\*/g'
369     ])
370    
371 michael 945 # _LT_PROG_LTMAIN
372     # ---------------
373     # Note that this code is called both from `configure', and `config.status'
374     # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
375     # `config.status' has no value for ac_aux_dir unless we are using Automake,
376     # so we pass a copy along to make sure it has a sensible value anyway.
377     m4_defun([_LT_PROG_LTMAIN],
378     [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
379     _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
380     ltmain="$ac_aux_dir/ltmain.sh"
381     ])# _LT_PROG_LTMAIN
382 michael 912
383    
384    
385 michael 945 # So that we can recreate a full libtool script including additional
386     # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
387     # in macros and then make a single call at the end using the `libtool'
388     # label.
389 michael 912
390 michael 945
391     # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
392     # ----------------------------------------
393     # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
394     m4_define([_LT_CONFIG_LIBTOOL_INIT],
395     [m4_ifval([$1],
396     [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
397     [$1
398     ])])])
399    
400     # Initialize.
401     m4_define([_LT_OUTPUT_LIBTOOL_INIT])
402    
403    
404     # _LT_CONFIG_LIBTOOL([COMMANDS])
405     # ------------------------------
406     # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
407     m4_define([_LT_CONFIG_LIBTOOL],
408     [m4_ifval([$1],
409     [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
410     [$1
411     ])])])
412    
413     # Initialize.
414     m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
415    
416    
417     # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
418     # -----------------------------------------------------
419     m4_defun([_LT_CONFIG_SAVE_COMMANDS],
420     [_LT_CONFIG_LIBTOOL([$1])
421     _LT_CONFIG_LIBTOOL_INIT([$2])
422     ])
423    
424    
425     # _LT_FORMAT_COMMENT([COMMENT])
426     # -----------------------------
427     # Add leading comment marks to the start of each line, and a trailing
428     # full-stop to the whole comment if one is not present already.
429     m4_define([_LT_FORMAT_COMMENT],
430     [m4_ifval([$1], [
431     m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
432     [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
433     )])
434    
435    
436    
437    
438    
439     # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
440     # -------------------------------------------------------------------
441     # CONFIGNAME is the name given to the value in the libtool script.
442     # VARNAME is the (base) name used in the configure script.
443     # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
444     # VARNAME. Any other value will be used directly.
445     m4_define([_LT_DECL],
446     [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
447     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
448     [m4_ifval([$1], [$1], [$2])])
449     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
450     m4_ifval([$4],
451     [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
452     lt_dict_add_subkey([lt_decl_dict], [$2],
453     [tagged?], [m4_ifval([$5], [yes], [no])])])
454     ])
455    
456    
457     # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
458     # --------------------------------------------------------
459     m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
460    
461    
462     # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
463     # ------------------------------------------------
464     m4_define([lt_decl_tag_varnames],
465     [_lt_decl_filter([tagged?], [yes], $@)])
466    
467    
468     # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
469     # ---------------------------------------------------------
470     m4_define([_lt_decl_filter],
471     [m4_case([$#],
472     [0], [m4_fatal([$0: too few arguments: $#])],
473     [1], [m4_fatal([$0: too few arguments: $#: $1])],
474     [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
475     [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
476     [lt_dict_filter([lt_decl_dict], $@)])[]dnl
477     ])
478    
479    
480     # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
481     # --------------------------------------------------
482     m4_define([lt_decl_quote_varnames],
483     [_lt_decl_filter([value], [1], $@)])
484    
485    
486     # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
487     # ---------------------------------------------------
488     m4_define([lt_decl_dquote_varnames],
489     [_lt_decl_filter([value], [2], $@)])
490    
491    
492     # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
493     # ---------------------------------------------------
494     m4_define([lt_decl_varnames_tagged],
495     [m4_assert([$# <= 2])dnl
496     _$0(m4_quote(m4_default([$1], [[, ]])),
497     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
498     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
499     m4_define([_lt_decl_varnames_tagged],
500     [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
501    
502    
503     # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
504     # ------------------------------------------------
505     m4_define([lt_decl_all_varnames],
506     [_$0(m4_quote(m4_default([$1], [[, ]])),
507     m4_if([$2], [],
508     m4_quote(lt_decl_varnames),
509     m4_quote(m4_shift($@))))[]dnl
510     ])
511     m4_define([_lt_decl_all_varnames],
512     [lt_join($@, lt_decl_varnames_tagged([$1],
513     lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
514     ])
515    
516    
517     # _LT_CONFIG_STATUS_DECLARE([VARNAME])
518     # ------------------------------------
519     # Quote a variable value, and forward it to `config.status' so that its
520     # declaration there will have the same value as in `configure'. VARNAME
521     # must have a single quote delimited value for this to work.
522     m4_define([_LT_CONFIG_STATUS_DECLARE],
523 michael 1094 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
524 michael 945
525    
526     # _LT_CONFIG_STATUS_DECLARATIONS
527     # ------------------------------
528     # We delimit libtool config variables with single quotes, so when
529     # we write them to config.status, we have to be sure to quote all
530     # embedded single quotes properly. In configure, this macro expands
531     # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
532     #
533 michael 1094 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
534 michael 945 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
535     [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
536     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
537    
538    
539     # _LT_LIBTOOL_TAGS
540     # ----------------
541     # Output comment and list of tags supported by the script
542     m4_defun([_LT_LIBTOOL_TAGS],
543     [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
544     available_tags="_LT_TAGS"dnl
545     ])
546    
547    
548     # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
549     # -----------------------------------
550     # Extract the dictionary values for VARNAME (optionally with TAG) and
551     # expand to a commented shell variable setting:
552     #
553     # # Some comment about what VAR is for.
554     # visible_name=$lt_internal_name
555     m4_define([_LT_LIBTOOL_DECLARE],
556     [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
557     [description])))[]dnl
558     m4_pushdef([_libtool_name],
559     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
560     m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
561     [0], [_libtool_name=[$]$1],
562     [1], [_libtool_name=$lt_[]$1],
563     [2], [_libtool_name=$lt_[]$1],
564     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
565     m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
566     ])
567    
568    
569     # _LT_LIBTOOL_CONFIG_VARS
570     # -----------------------
571     # Produce commented declarations of non-tagged libtool config variables
572     # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
573     # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
574     # section) are produced by _LT_LIBTOOL_TAG_VARS.
575     m4_defun([_LT_LIBTOOL_CONFIG_VARS],
576     [m4_foreach([_lt_var],
577     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
578     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
579    
580    
581     # _LT_LIBTOOL_TAG_VARS(TAG)
582     # -------------------------
583     m4_define([_LT_LIBTOOL_TAG_VARS],
584     [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
585     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
586    
587    
588     # _LT_TAGVAR(VARNAME, [TAGNAME])
589     # ------------------------------
590     m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
591    
592    
593     # _LT_CONFIG_COMMANDS
594 michael 912 # -------------------
595 michael 945 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
596     # variables for single and double quote escaping we saved from calls
597     # to _LT_DECL, we can put quote escaped variables declarations
598     # into `config.status', and then the shell code to quote escape them in
599     # for loops in `config.status'. Finally, any additional code accumulated
600     # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
601     m4_defun([_LT_CONFIG_COMMANDS],
602     [AC_PROVIDE_IFELSE([LT_OUTPUT],
603     dnl If the libtool generation code has been placed in $CONFIG_LT,
604     dnl instead of duplicating it all over again into config.status,
605     dnl then we will have config.status run $CONFIG_LT later, so it
606     dnl needs to know what name is stored there:
607     [AC_CONFIG_COMMANDS([libtool],
608     [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
609     dnl If the libtool generation code is destined for config.status,
610     dnl expand the accumulated commands and init code now:
611     [AC_CONFIG_COMMANDS([libtool],
612     [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
613     ])#_LT_CONFIG_COMMANDS
614    
615    
616     # Initialize.
617     m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
618     [
619    
620     # The HP-UX ksh and POSIX shell print the target directory to stdout
621     # if CDPATH is set.
622     (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
623    
624     sed_quote_subst='$sed_quote_subst'
625     double_quote_subst='$double_quote_subst'
626     delay_variable_subst='$delay_variable_subst'
627     _LT_CONFIG_STATUS_DECLARATIONS
628     LTCC='$LTCC'
629     LTCFLAGS='$LTCFLAGS'
630     compiler='$compiler_DEFAULT'
631    
632 michael 1094 # A function that is used when there is no print builtin or printf.
633     func_fallback_echo ()
634     {
635     eval 'cat <<_LTECHO_EOF
636     \$[]1
637     _LTECHO_EOF'
638     }
639    
640 michael 945 # Quote evaled strings.
641     for var in lt_decl_all_varnames([[ \
642     ]], lt_decl_quote_varnames); do
643 michael 1094 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
644 michael 945 *[[\\\\\\\`\\"\\\$]]*)
645 michael 1094 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
646 michael 945 ;;
647     *)
648     eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
649     ;;
650     esac
651     done
652    
653     # Double-quote double-evaled strings.
654     for var in lt_decl_all_varnames([[ \
655     ]], lt_decl_dquote_varnames); do
656 michael 1094 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
657 michael 945 *[[\\\\\\\`\\"\\\$]]*)
658 michael 1094 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
659 michael 945 ;;
660     *)
661     eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
662     ;;
663     esac
664     done
665    
666     _LT_OUTPUT_LIBTOOL_INIT
667     ])
668    
669 michael 1094 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
670     # ------------------------------------
671     # Generate a child script FILE with all initialization necessary to
672     # reuse the environment learned by the parent script, and make the
673     # file executable. If COMMENT is supplied, it is inserted after the
674     # `#!' sequence but before initialization text begins. After this
675     # macro, additional text can be appended to FILE to form the body of
676     # the child script. The macro ends with non-zero status if the
677     # file could not be fully written (such as if the disk is full).
678     m4_ifdef([AS_INIT_GENERATED],
679     [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
680     [m4_defun([_LT_GENERATED_FILE_INIT],
681     [m4_require([AS_PREPARE])]dnl
682     [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
683     [lt_write_fail=0
684     cat >$1 <<_ASEOF || lt_write_fail=1
685     #! $SHELL
686     # Generated by $as_me.
687     $2
688     SHELL=\${CONFIG_SHELL-$SHELL}
689     export SHELL
690     _ASEOF
691     cat >>$1 <<\_ASEOF || lt_write_fail=1
692     AS_SHELL_SANITIZE
693     _AS_PREPARE
694     exec AS_MESSAGE_FD>&1
695     _ASEOF
696     test $lt_write_fail = 0 && chmod +x $1[]dnl
697     m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
698 michael 945
699     # LT_OUTPUT
700     # ---------
701     # This macro allows early generation of the libtool script (before
702     # AC_OUTPUT is called), incase it is used in configure for compilation
703     # tests.
704     AC_DEFUN([LT_OUTPUT],
705     [: ${CONFIG_LT=./config.lt}
706     AC_MSG_NOTICE([creating $CONFIG_LT])
707 michael 1094 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
708     [# Run this file to recreate a libtool stub with the current configuration.])
709 michael 945
710 michael 1094 cat >>"$CONFIG_LT" <<\_LTEOF
711 michael 945 lt_cl_silent=false
712     exec AS_MESSAGE_LOG_FD>>config.log
713     {
714     echo
715     AS_BOX([Running $as_me.])
716     } >&AS_MESSAGE_LOG_FD
717    
718     lt_cl_help="\
719     \`$as_me' creates a local libtool stub from the current configuration,
720     for use in further configure time tests before the real libtool is
721     generated.
722    
723     Usage: $[0] [[OPTIONS]]
724    
725     -h, --help print this help, then exit
726     -V, --version print version number, then exit
727     -q, --quiet do not print progress messages
728     -d, --debug don't remove temporary files
729    
730     Report bugs to <bug-libtool@gnu.org>."
731    
732     lt_cl_version="\
733     m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
734     m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
735     configured by $[0], generated by m4_PACKAGE_STRING.
736    
737 michael 1257 Copyright (C) 2011 Free Software Foundation, Inc.
738 michael 945 This config.lt script is free software; the Free Software Foundation
739     gives unlimited permision to copy, distribute and modify it."
740    
741     while test $[#] != 0
742     do
743     case $[1] in
744     --version | --v* | -V )
745     echo "$lt_cl_version"; exit 0 ;;
746     --help | --h* | -h )
747     echo "$lt_cl_help"; exit 0 ;;
748     --debug | --d* | -d )
749     debug=: ;;
750     --quiet | --q* | --silent | --s* | -q )
751     lt_cl_silent=: ;;
752    
753     -*) AC_MSG_ERROR([unrecognized option: $[1]
754     Try \`$[0] --help' for more information.]) ;;
755    
756     *) AC_MSG_ERROR([unrecognized argument: $[1]
757     Try \`$[0] --help' for more information.]) ;;
758     esac
759     shift
760     done
761    
762     if $lt_cl_silent; then
763     exec AS_MESSAGE_FD>/dev/null
764     fi
765     _LTEOF
766    
767     cat >>"$CONFIG_LT" <<_LTEOF
768     _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
769     _LTEOF
770    
771     cat >>"$CONFIG_LT" <<\_LTEOF
772     AC_MSG_NOTICE([creating $ofile])
773     _LT_OUTPUT_LIBTOOL_COMMANDS
774     AS_EXIT(0)
775     _LTEOF
776     chmod +x "$CONFIG_LT"
777    
778     # configure is writing to config.log, but config.lt does its own redirection,
779     # appending to config.log, which fails on DOS, as config.log is still kept
780     # open by configure. Here we exec the FD to /dev/null, effectively closing
781     # config.log, so it can be properly (re)opened and appended to by config.lt.
782 michael 1094 lt_cl_success=:
783     test "$silent" = yes &&
784     lt_config_lt_args="$lt_config_lt_args --quiet"
785     exec AS_MESSAGE_LOG_FD>/dev/null
786     $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
787     exec AS_MESSAGE_LOG_FD>>config.log
788     $lt_cl_success || AS_EXIT(1)
789 michael 945 ])# LT_OUTPUT
790    
791    
792     # _LT_CONFIG(TAG)
793     # ---------------
794     # If TAG is the built-in tag, create an initial libtool script with a
795     # default configuration from the untagged config vars. Otherwise add code
796     # to config.status for appending the configuration named by TAG from the
797     # matching tagged config vars.
798     m4_defun([_LT_CONFIG],
799     [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
800     _LT_CONFIG_SAVE_COMMANDS([
801     m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
802     m4_if(_LT_TAG, [C], [
803     # See if we are running on zsh, and set the options which allow our
804     # commands through without removal of \ escapes.
805     if test -n "${ZSH_VERSION+set}" ; then
806     setopt NO_GLOB_SUBST
807     fi
808    
809     cfgfile="${ofile}T"
810     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
811     $RM "$cfgfile"
812    
813     cat <<_LT_EOF >> "$cfgfile"
814     #! $SHELL
815    
816     # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
817     # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
818     # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
819     # NOTE: Changes made to this file will be lost: look at ltmain.sh.
820     #
821     _LT_COPYING
822     _LT_LIBTOOL_TAGS
823    
824     # ### BEGIN LIBTOOL CONFIG
825     _LT_LIBTOOL_CONFIG_VARS
826     _LT_LIBTOOL_TAG_VARS
827     # ### END LIBTOOL CONFIG
828    
829     _LT_EOF
830    
831     case $host_os in
832     aix3*)
833     cat <<\_LT_EOF >> "$cfgfile"
834     # AIX sometimes has problems with the GCC collect2 program. For some
835     # reason, if we set the COLLECT_NAMES environment variable, the problems
836     # vanish in a puff of smoke.
837     if test "X${COLLECT_NAMES+set}" != Xset; then
838     COLLECT_NAMES=
839     export COLLECT_NAMES
840     fi
841     _LT_EOF
842     ;;
843     esac
844    
845     _LT_PROG_LTMAIN
846    
847     # We use sed instead of cat because bash on DJGPP gets confused if
848     # if finds mixed CR/LF and LF-only lines. Since sed operates in
849     # text mode, it properly converts lines to CR/LF. This bash problem
850     # is reportedly fixed, but why not run on old versions too?
851 michael 1106 sed '$q' "$ltmain" >> "$cfgfile" \
852     || (rm -f "$cfgfile"; exit 1)
853 michael 945
854 michael 1106 _LT_PROG_REPLACE_SHELLFNS
855 michael 945
856 michael 1106 mv -f "$cfgfile" "$ofile" ||
857 michael 945 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
858     chmod +x "$ofile"
859     ],
860     [cat <<_LT_EOF >> "$ofile"
861    
862     dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
863     dnl in a comment (ie after a #).
864     # ### BEGIN LIBTOOL TAG CONFIG: $1
865     _LT_LIBTOOL_TAG_VARS(_LT_TAG)
866     # ### END LIBTOOL TAG CONFIG: $1
867     _LT_EOF
868     ])dnl /m4_if
869     ],
870     [m4_if([$1], [], [
871     PACKAGE='$PACKAGE'
872     VERSION='$VERSION'
873     TIMESTAMP='$TIMESTAMP'
874     RM='$RM'
875     ofile='$ofile'], [])
876     ])dnl /_LT_CONFIG_SAVE_COMMANDS
877     ])# _LT_CONFIG
878    
879    
880     # LT_SUPPORTED_TAG(TAG)
881     # ---------------------
882     # Trace this macro to discover what tags are supported by the libtool
883     # --tag option, using:
884     # autoconf --trace 'LT_SUPPORTED_TAG:$1'
885     AC_DEFUN([LT_SUPPORTED_TAG], [])
886    
887    
888     # C support is built-in for now
889     m4_define([_LT_LANG_C_enabled], [])
890     m4_define([_LT_TAGS], [])
891    
892    
893     # LT_LANG(LANG)
894     # -------------
895     # Enable libtool support for the given language if not already enabled.
896     AC_DEFUN([LT_LANG],
897     [AC_BEFORE([$0], [LT_OUTPUT])dnl
898     m4_case([$1],
899     [C], [_LT_LANG(C)],
900     [C++], [_LT_LANG(CXX)],
901 michael 1257 [Go], [_LT_LANG(GO)],
902 michael 945 [Java], [_LT_LANG(GCJ)],
903     [Fortran 77], [_LT_LANG(F77)],
904     [Fortran], [_LT_LANG(FC)],
905     [Windows Resource], [_LT_LANG(RC)],
906     [m4_ifdef([_LT_LANG_]$1[_CONFIG],
907     [_LT_LANG($1)],
908     [m4_fatal([$0: unsupported language: "$1"])])])dnl
909     ])# LT_LANG
910    
911    
912     # _LT_LANG(LANGNAME)
913     # ------------------
914     m4_defun([_LT_LANG],
915     [m4_ifdef([_LT_LANG_]$1[_enabled], [],
916     [LT_SUPPORTED_TAG([$1])dnl
917     m4_append([_LT_TAGS], [$1 ])dnl
918     m4_define([_LT_LANG_]$1[_enabled], [])dnl
919     _LT_LANG_$1_CONFIG($1)])dnl
920     ])# _LT_LANG
921    
922    
923 michael 1257 m4_ifndef([AC_PROG_GO], [
924     # NOTE: This macro has been submitted for inclusion into #
925     # GNU Autoconf as AC_PROG_GO. When it is available in #
926     # a released version of Autoconf we should remove this #
927     # macro and use it instead. #
928     m4_defun([AC_PROG_GO],
929     [AC_LANG_PUSH(Go)dnl
930     AC_ARG_VAR([GOC], [Go compiler command])dnl
931     AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
932     _AC_ARG_VAR_LDFLAGS()dnl
933     AC_CHECK_TOOL(GOC, gccgo)
934     if test -z "$GOC"; then
935     if test -n "$ac_tool_prefix"; then
936     AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
937     fi
938     fi
939     if test -z "$GOC"; then
940     AC_CHECK_PROG(GOC, gccgo, gccgo, false)
941     fi
942     ])#m4_defun
943     ])#m4_ifndef
944    
945    
946 michael 945 # _LT_LANG_DEFAULT_CONFIG
947     # -----------------------
948     m4_defun([_LT_LANG_DEFAULT_CONFIG],
949     [AC_PROVIDE_IFELSE([AC_PROG_CXX],
950     [LT_LANG(CXX)],
951     [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
952    
953     AC_PROVIDE_IFELSE([AC_PROG_F77],
954     [LT_LANG(F77)],
955     [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
956    
957     AC_PROVIDE_IFELSE([AC_PROG_FC],
958     [LT_LANG(FC)],
959     [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
960    
961     dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
962     dnl pulling things in needlessly.
963     AC_PROVIDE_IFELSE([AC_PROG_GCJ],
964     [LT_LANG(GCJ)],
965     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
966     [LT_LANG(GCJ)],
967     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
968     [LT_LANG(GCJ)],
969     [m4_ifdef([AC_PROG_GCJ],
970     [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
971     m4_ifdef([A][M_PROG_GCJ],
972     [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
973     m4_ifdef([LT_PROG_GCJ],
974     [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
975    
976 michael 1257 AC_PROVIDE_IFELSE([AC_PROG_GO],
977     [LT_LANG(GO)],
978     [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
979    
980 michael 945 AC_PROVIDE_IFELSE([LT_PROG_RC],
981     [LT_LANG(RC)],
982     [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
983     ])# _LT_LANG_DEFAULT_CONFIG
984    
985     # Obsolete macros:
986     AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
987     AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
988     AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
989     AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
990 michael 1094 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
991 michael 945 dnl aclocal-1.4 backwards compatibility:
992     dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
993     dnl AC_DEFUN([AC_LIBTOOL_F77], [])
994     dnl AC_DEFUN([AC_LIBTOOL_FC], [])
995     dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
996 michael 1094 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
997 michael 945
998    
999     # _LT_TAG_COMPILER
1000     # ----------------
1001     m4_defun([_LT_TAG_COMPILER],
1002 michael 912 [AC_REQUIRE([AC_PROG_CC])dnl
1003    
1004 michael 945 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1005     _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1006     _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1007     _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1008    
1009 michael 912 # If no C compiler was specified, use CC.
1010     LTCC=${LTCC-"$CC"}
1011    
1012     # If no C compiler flags were specified, use CFLAGS.
1013     LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1014    
1015     # Allow CC to be a program name with arguments.
1016     compiler=$CC
1017 michael 945 ])# _LT_TAG_COMPILER
1018 michael 912
1019    
1020     # _LT_COMPILER_BOILERPLATE
1021     # ------------------------
1022     # Check for compiler boilerplate output or warnings with
1023     # the simple compiler test code.
1024 michael 945 m4_defun([_LT_COMPILER_BOILERPLATE],
1025     [m4_require([_LT_DECL_SED])dnl
1026 michael 912 ac_outfile=conftest.$ac_objext
1027     echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1028     eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1029     _lt_compiler_boilerplate=`cat conftest.err`
1030 michael 945 $RM conftest*
1031 michael 912 ])# _LT_COMPILER_BOILERPLATE
1032    
1033    
1034     # _LT_LINKER_BOILERPLATE
1035     # ----------------------
1036     # Check for linker boilerplate output or warnings with
1037     # the simple link test code.
1038 michael 945 m4_defun([_LT_LINKER_BOILERPLATE],
1039     [m4_require([_LT_DECL_SED])dnl
1040 michael 912 ac_outfile=conftest.$ac_objext
1041     echo "$lt_simple_link_test_code" >conftest.$ac_ext
1042     eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1043     _lt_linker_boilerplate=`cat conftest.err`
1044 michael 945 $RM -r conftest*
1045 michael 912 ])# _LT_LINKER_BOILERPLATE
1046    
1047 db 941 # _LT_REQUIRED_DARWIN_CHECKS
1048 michael 945 # -------------------------
1049     m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1050 db 941 case $host_os in
1051     rhapsody* | darwin*)
1052     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1053     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1054 michael 945 AC_CHECK_TOOL([LIPO], [lipo], [:])
1055     AC_CHECK_TOOL([OTOOL], [otool], [:])
1056     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1057     _LT_DECL([], [DSYMUTIL], [1],
1058     [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1059     _LT_DECL([], [NMEDIT], [1],
1060     [Tool to change global to local symbols on Mac OS X])
1061     _LT_DECL([], [LIPO], [1],
1062     [Tool to manipulate fat objects and archives on Mac OS X])
1063     _LT_DECL([], [OTOOL], [1],
1064     [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1065     _LT_DECL([], [OTOOL64], [1],
1066     [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1067 michael 912
1068 db 941 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1069     [lt_cv_apple_cc_single_mod=no
1070     if test -z "${LT_MULTI_MODULE}"; then
1071 michael 945 # By default we will add the -single_module flag. You can override
1072     # by either setting the environment variable LT_MULTI_MODULE
1073     # non-empty at configure time, or by adding -multi_module to the
1074     # link flags.
1075     rm -rf libconftest.dylib*
1076     echo "int foo(void){return 1;}" > conftest.c
1077     echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1078     -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1079     $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1080     -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1081     _lt_result=$?
1082 michael 1257 # If there is a non-empty error log, and "single_module"
1083     # appears in it, assume the flag caused a linker warning
1084     if test -s conftest.err && $GREP single_module conftest.err; then
1085     cat conftest.err >&AS_MESSAGE_LOG_FD
1086     # Otherwise, if the output was created with a 0 exit code from
1087     # the compiler, it worked.
1088     elif test -f libconftest.dylib && test $_lt_result -eq 0; then
1089 michael 945 lt_cv_apple_cc_single_mod=yes
1090     else
1091     cat conftest.err >&AS_MESSAGE_LOG_FD
1092     fi
1093     rm -rf libconftest.dylib*
1094     rm -f conftest.*
1095 db 941 fi])
1096 michael 1257
1097 db 941 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1098     [lt_cv_ld_exported_symbols_list],
1099     [lt_cv_ld_exported_symbols_list=no
1100     save_LDFLAGS=$LDFLAGS
1101     echo "_main" > conftest.sym
1102     LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1103     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1104 michael 945 [lt_cv_ld_exported_symbols_list=yes],
1105     [lt_cv_ld_exported_symbols_list=no])
1106     LDFLAGS="$save_LDFLAGS"
1107 db 941 ])
1108 michael 1257
1109 michael 1094 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1110     [lt_cv_ld_force_load=no
1111     cat > conftest.c << _LT_EOF
1112     int forced_loaded() { return 2;}
1113     _LT_EOF
1114     echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1115     $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1116     echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1117     $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1118     echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1119     $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1120     cat > conftest.c << _LT_EOF
1121     int main() { return 0;}
1122     _LT_EOF
1123     echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1124     $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1125     _lt_result=$?
1126 michael 1257 if test -s conftest.err && $GREP force_load conftest.err; then
1127     cat conftest.err >&AS_MESSAGE_LOG_FD
1128     elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1129 michael 1094 lt_cv_ld_force_load=yes
1130     else
1131     cat conftest.err >&AS_MESSAGE_LOG_FD
1132     fi
1133     rm -f conftest.err libconftest.a conftest conftest.c
1134     rm -rf conftest.dSYM
1135     ])
1136 db 941 case $host_os in
1137 michael 945 rhapsody* | darwin1.[[012]])
1138 db 941 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1139     darwin1.*)
1140 michael 945 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1141     darwin*) # darwin 5.x on
1142 db 941 # if running on 10.5 or later, the deployment target defaults
1143     # to the OS version, if on x86, and 10.4, the deployment
1144     # target defaults to 10.4. Don't you love it?
1145     case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1146 michael 945 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1147     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1148     10.[[012]]*)
1149     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1150     10.*)
1151     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1152 db 941 esac
1153     ;;
1154     esac
1155     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1156     _lt_dar_single_mod='$single_module'
1157     fi
1158     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1159     _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1160     else
1161 michael 945 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1162 db 941 fi
1163 michael 1094 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1164 michael 945 _lt_dsymutil='~$DSYMUTIL $lib || :'
1165 db 941 else
1166     _lt_dsymutil=
1167     fi
1168     ;;
1169     esac
1170     ])
1171    
1172 michael 945
1173 michael 1257 # _LT_DARWIN_LINKER_FEATURES([TAG])
1174     # ---------------------------------
1175 michael 945 # Checks for linker and compiler features on darwin
1176     m4_defun([_LT_DARWIN_LINKER_FEATURES],
1177     [
1178     m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1179     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1180     _LT_TAGVAR(hardcode_direct, $1)=no
1181     _LT_TAGVAR(hardcode_automatic, $1)=yes
1182     _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1183 michael 1094 if test "$lt_cv_ld_force_load" = "yes"; then
1184     _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1185 michael 1257 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1186     [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1187 michael 1094 else
1188     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1189     fi
1190 michael 945 _LT_TAGVAR(link_all_deplibs, $1)=yes
1191     _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1192     case $cc_basename in
1193     ifort*) _lt_dar_can_shared=yes ;;
1194     *) _lt_dar_can_shared=$GCC ;;
1195     esac
1196     if test "$_lt_dar_can_shared" = "yes"; then
1197 michael 1094 output_verbose_link_cmd=func_echo_all
1198 michael 945 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1199     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1200     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1201     _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1202     m4_if([$1], [CXX],
1203     [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1204     _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1205     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1206     fi
1207     ],[])
1208     else
1209     _LT_TAGVAR(ld_shlibs, $1)=no
1210     fi
1211     ])
1212    
1213 michael 1106 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1214     # ----------------------------------
1215 michael 912 # Links a minimal program and checks the executable
1216     # for the system default hardcoded library path. In most cases,
1217     # this is /usr/lib:/lib, but when the MPI compilers are used
1218     # the location of the communication and MPI libs are included too.
1219     # If we don't find anything, use the default library path according
1220     # to the aix ld manual.
1221 michael 1106 # Store the results from the different compilers for each TAGNAME.
1222     # Allow to override them for all tags through lt_cv_aix_libpath.
1223 michael 945 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1224     [m4_require([_LT_DECL_SED])dnl
1225 michael 1106 if test "${lt_cv_aix_libpath+set}" = set; then
1226     aix_libpath=$lt_cv_aix_libpath
1227     else
1228     AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1229     [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1230     lt_aix_libpath_sed='[
1231     /Import File Strings/,/^$/ {
1232     /^0/ {
1233     s/^0 *\([^ ]*\) *$/\1/
1234     p
1235     }
1236     }]'
1237     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1238     # Check for a 64-bit object if we didn't find anything.
1239     if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1240     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1241     fi],[])
1242     if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1243     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1244     fi
1245     ])
1246     aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1247     fi
1248 michael 945 ])# _LT_SYS_MODULE_PATH_AIX
1249 michael 912
1250    
1251 michael 945 # _LT_SHELL_INIT(ARG)
1252     # -------------------
1253     m4_define([_LT_SHELL_INIT],
1254 michael 1094 [m4_divert_text([M4SH-INIT], [$1
1255     ])])# _LT_SHELL_INIT
1256 michael 912
1257    
1258 michael 1094
1259 michael 945 # _LT_PROG_ECHO_BACKSLASH
1260     # -----------------------
1261 michael 1094 # Find how we can fake an echo command that does not interpret backslash.
1262     # In particular, with Autoconf 2.60 or later we add some code to the start
1263     # of the generated configure script which will find a shell with a builtin
1264     # printf (which we can use as an echo command).
1265 michael 945 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1266 michael 1094 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1267     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1268     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1269 michael 912
1270 michael 1094 AC_MSG_CHECKING([how to print strings])
1271     # Test print first, because it will be a builtin if present.
1272 michael 1106 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1273 michael 1094 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1274     ECHO='print -r --'
1275     elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1276     ECHO='printf %s\n'
1277 michael 912 else
1278 michael 1094 # Use this function as a fallback that always works.
1279     func_fallback_echo ()
1280     {
1281     eval 'cat <<_LTECHO_EOF
1282     $[]1
1283     _LTECHO_EOF'
1284     }
1285     ECHO='func_fallback_echo'
1286 michael 912 fi
1287    
1288 michael 1094 # func_echo_all arg...
1289     # Invoke $ECHO with all args, space-separated.
1290     func_echo_all ()
1291     {
1292     $ECHO "$*"
1293     }
1294 michael 912
1295 michael 1094 case "$ECHO" in
1296     printf*) AC_MSG_RESULT([printf]) ;;
1297     print*) AC_MSG_RESULT([print -r]) ;;
1298     *) AC_MSG_RESULT([cat]) ;;
1299     esac
1300 michael 912
1301 michael 1094 m4_ifdef([_AS_DETECT_SUGGESTED],
1302     [_AS_DETECT_SUGGESTED([
1303     test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1304     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1305     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1306     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1307     PATH=/empty FPATH=/empty; export PATH FPATH
1308     test "X`printf %s $ECHO`" = "X$ECHO" \
1309     || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1310 michael 912
1311 michael 945 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1312 michael 1094 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1313 michael 945 ])# _LT_PROG_ECHO_BACKSLASH
1314 michael 912
1315    
1316 michael 1106 # _LT_WITH_SYSROOT
1317     # ----------------
1318     AC_DEFUN([_LT_WITH_SYSROOT],
1319     [AC_MSG_CHECKING([for sysroot])
1320     AC_ARG_WITH([sysroot],
1321     [ --with-sysroot[=DIR] Search for dependent libraries within DIR
1322     (or the compiler's sysroot if not specified).],
1323     [], [with_sysroot=no])
1324    
1325     dnl lt_sysroot will always be passed unquoted. We quote it here
1326     dnl in case the user passed a directory name.
1327     lt_sysroot=
1328     case ${with_sysroot} in #(
1329     yes)
1330     if test "$GCC" = yes; then
1331     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1332     fi
1333     ;; #(
1334     /*)
1335     lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1336     ;; #(
1337     no|'')
1338     ;; #(
1339     *)
1340     AC_MSG_RESULT([${with_sysroot}])
1341     AC_MSG_ERROR([The sysroot must be an absolute path.])
1342     ;;
1343     esac
1344    
1345     AC_MSG_RESULT([${lt_sysroot:-no}])
1346     _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1347     [dependent libraries, and in which our libraries should be installed.])])
1348    
1349 michael 945 # _LT_ENABLE_LOCK
1350     # ---------------
1351     m4_defun([_LT_ENABLE_LOCK],
1352 michael 912 [AC_ARG_ENABLE([libtool-lock],
1353 michael 945 [AS_HELP_STRING([--disable-libtool-lock],
1354     [avoid locking (might break parallel builds)])])
1355 michael 912 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1356    
1357     # Some flags need to be propagated to the compiler or linker for good
1358     # libtool support.
1359     case $host in
1360     ia64-*-hpux*)
1361     # Find out which ABI we are using.
1362     echo 'int i;' > conftest.$ac_ext
1363     if AC_TRY_EVAL(ac_compile); then
1364     case `/usr/bin/file conftest.$ac_objext` in
1365 michael 945 *ELF-32*)
1366     HPUX_IA64_MODE="32"
1367     ;;
1368     *ELF-64*)
1369     HPUX_IA64_MODE="64"
1370     ;;
1371 michael 912 esac
1372     fi
1373     rm -rf conftest*
1374     ;;
1375     *-*-irix6*)
1376     # Find out which ABI we are using.
1377 michael 1094 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1378 michael 912 if AC_TRY_EVAL(ac_compile); then
1379 michael 945 if test "$lt_cv_prog_gnu_ld" = yes; then
1380     case `/usr/bin/file conftest.$ac_objext` in
1381     *32-bit*)
1382     LD="${LD-ld} -melf32bsmip"
1383     ;;
1384     *N32*)
1385     LD="${LD-ld} -melf32bmipn32"
1386     ;;
1387     *64-bit*)
1388     LD="${LD-ld} -melf64bmip"
1389     ;;
1390     esac
1391     else
1392     case `/usr/bin/file conftest.$ac_objext` in
1393     *32-bit*)
1394     LD="${LD-ld} -32"
1395     ;;
1396     *N32*)
1397     LD="${LD-ld} -n32"
1398     ;;
1399     *64-bit*)
1400     LD="${LD-ld} -64"
1401     ;;
1402     esac
1403     fi
1404 michael 912 fi
1405     rm -rf conftest*
1406     ;;
1407    
1408     x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1409 michael 945 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1410 michael 912 # Find out which ABI we are using.
1411     echo 'int i;' > conftest.$ac_ext
1412     if AC_TRY_EVAL(ac_compile); then
1413     case `/usr/bin/file conftest.o` in
1414 michael 945 *32-bit*)
1415     case $host in
1416     x86_64-*kfreebsd*-gnu)
1417     LD="${LD-ld} -m elf_i386_fbsd"
1418     ;;
1419     x86_64-*linux*)
1420     LD="${LD-ld} -m elf_i386"
1421     ;;
1422     ppc64-*linux*|powerpc64-*linux*)
1423     LD="${LD-ld} -m elf32ppclinux"
1424     ;;
1425     s390x-*linux*)
1426     LD="${LD-ld} -m elf_s390"
1427     ;;
1428     sparc64-*linux*)
1429     LD="${LD-ld} -m elf32_sparc"
1430     ;;
1431     esac
1432     ;;
1433     *64-bit*)
1434     case $host in
1435     x86_64-*kfreebsd*-gnu)
1436     LD="${LD-ld} -m elf_x86_64_fbsd"
1437     ;;
1438     x86_64-*linux*)
1439     LD="${LD-ld} -m elf_x86_64"
1440     ;;
1441     ppc*-*linux*|powerpc*-*linux*)
1442     LD="${LD-ld} -m elf64ppc"
1443     ;;
1444     s390*-*linux*|s390*-*tpf*)
1445     LD="${LD-ld} -m elf64_s390"
1446     ;;
1447     sparc*-*linux*)
1448     LD="${LD-ld} -m elf64_sparc"
1449     ;;
1450     esac
1451     ;;
1452 michael 912 esac
1453     fi
1454     rm -rf conftest*
1455     ;;
1456    
1457     *-*-sco3.2v5*)
1458     # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1459     SAVE_CFLAGS="$CFLAGS"
1460     CFLAGS="$CFLAGS -belf"
1461     AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1462     [AC_LANG_PUSH(C)
1463 michael 945 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1464 michael 912 AC_LANG_POP])
1465     if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1466     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1467     CFLAGS="$SAVE_CFLAGS"
1468     fi
1469     ;;
1470 michael 1257 *-*solaris*)
1471 michael 912 # Find out which ABI we are using.
1472     echo 'int i;' > conftest.$ac_ext
1473     if AC_TRY_EVAL(ac_compile); then
1474     case `/usr/bin/file conftest.o` in
1475     *64-bit*)
1476     case $lt_cv_prog_gnu_ld in
1477 michael 1257 yes*)
1478     case $host in
1479     i?86-*-solaris*)
1480     LD="${LD-ld} -m elf_x86_64"
1481     ;;
1482     sparc*-*-solaris*)
1483     LD="${LD-ld} -m elf64_sparc"
1484     ;;
1485     esac
1486     # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1487     if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1488     LD="${LD-ld}_sol2"
1489     fi
1490     ;;
1491 db 941 *)
1492 michael 945 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1493 db 941 LD="${LD-ld} -64"
1494     fi
1495     ;;
1496 michael 912 esac
1497     ;;
1498     esac
1499     fi
1500     rm -rf conftest*
1501     ;;
1502     esac
1503    
1504     need_locks="$enable_libtool_lock"
1505 michael 945 ])# _LT_ENABLE_LOCK
1506 michael 912
1507    
1508 michael 1106 # _LT_PROG_AR
1509     # -----------
1510     m4_defun([_LT_PROG_AR],
1511     [AC_CHECK_TOOLS(AR, [ar], false)
1512     : ${AR=ar}
1513     : ${AR_FLAGS=cru}
1514     _LT_DECL([], [AR], [1], [The archiver])
1515     _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1516    
1517     AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1518     [lt_cv_ar_at_file=no
1519     AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1520     [echo conftest.$ac_objext > conftest.lst
1521     lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1522     AC_TRY_EVAL([lt_ar_try])
1523     if test "$ac_status" -eq 0; then
1524     # Ensure the archiver fails upon bogus file names.
1525     rm -f conftest.$ac_objext libconftest.a
1526     AC_TRY_EVAL([lt_ar_try])
1527     if test "$ac_status" -ne 0; then
1528     lt_cv_ar_at_file=@
1529     fi
1530     fi
1531     rm -f conftest.* libconftest.a
1532     ])
1533     ])
1534    
1535     if test "x$lt_cv_ar_at_file" = xno; then
1536     archiver_list_spec=
1537     else
1538     archiver_list_spec=$lt_cv_ar_at_file
1539     fi
1540     _LT_DECL([], [archiver_list_spec], [1],
1541     [How to feed a file listing to the archiver])
1542     ])# _LT_PROG_AR
1543    
1544    
1545 michael 945 # _LT_CMD_OLD_ARCHIVE
1546     # -------------------
1547     m4_defun([_LT_CMD_OLD_ARCHIVE],
1548 michael 1106 [_LT_PROG_AR
1549 michael 912
1550 michael 945 AC_CHECK_TOOL(STRIP, strip, :)
1551     test -z "$STRIP" && STRIP=:
1552     _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1553    
1554     AC_CHECK_TOOL(RANLIB, ranlib, :)
1555     test -z "$RANLIB" && RANLIB=:
1556     _LT_DECL([], [RANLIB], [1],
1557     [Commands used to install an old-style archive])
1558    
1559     # Determine commands to create old-style static archives.
1560     old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1561     old_postinstall_cmds='chmod 644 $oldlib'
1562     old_postuninstall_cmds=
1563    
1564     if test -n "$RANLIB"; then
1565     case $host_os in
1566     openbsd*)
1567 michael 1257 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1568 michael 945 ;;
1569     *)
1570 michael 1257 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1571 michael 945 ;;
1572     esac
1573 michael 1257 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1574 michael 945 fi
1575 michael 1094
1576     case $host_os in
1577     darwin*)
1578     lock_old_archive_extraction=yes ;;
1579     *)
1580     lock_old_archive_extraction=no ;;
1581     esac
1582 michael 945 _LT_DECL([], [old_postinstall_cmds], [2])
1583     _LT_DECL([], [old_postuninstall_cmds], [2])
1584     _LT_TAGDECL([], [old_archive_cmds], [2],
1585     [Commands used to build an old-style archive])
1586 michael 1094 _LT_DECL([], [lock_old_archive_extraction], [0],
1587     [Whether to use a lock for old archive extraction])
1588 michael 945 ])# _LT_CMD_OLD_ARCHIVE
1589    
1590    
1591     # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1592 michael 912 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1593     # ----------------------------------------------------------------
1594     # Check whether the given compiler option works
1595 michael 945 AC_DEFUN([_LT_COMPILER_OPTION],
1596     [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1597     m4_require([_LT_DECL_SED])dnl
1598 michael 912 AC_CACHE_CHECK([$1], [$2],
1599     [$2=no
1600 michael 945 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1601 michael 912 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1602     lt_compiler_flag="$3"
1603     # Insert the option either (1) after the last *FLAGS variable, or
1604     # (2) before a word containing "conftest.", or (3) at the end.
1605     # Note that $ac_compile itself does not contain backslashes and begins
1606     # with a dollar sign (not a hyphen), so the echo should work correctly.
1607     # The option is referenced via a variable to avoid confusing sed.
1608     lt_compile=`echo "$ac_compile" | $SED \
1609     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1610     -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1611     -e 's:$: $lt_compiler_flag:'`
1612 michael 1094 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1613 michael 912 (eval "$lt_compile" 2>conftest.err)
1614     ac_status=$?
1615     cat conftest.err >&AS_MESSAGE_LOG_FD
1616 michael 1094 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1617 michael 912 if (exit $ac_status) && test -s "$ac_outfile"; then
1618     # The compiler can only warn and ignore the option if not recognized
1619     # So say no if there are warnings other than the usual output.
1620 michael 1094 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1621 michael 912 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1622     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1623     $2=yes
1624     fi
1625     fi
1626 michael 945 $RM conftest*
1627 michael 912 ])
1628    
1629     if test x"[$]$2" = xyes; then
1630 michael 945 m4_if([$5], , :, [$5])
1631 michael 912 else
1632 michael 945 m4_if([$6], , :, [$6])
1633 michael 912 fi
1634 michael 945 ])# _LT_COMPILER_OPTION
1635 michael 912
1636 michael 945 # Old name:
1637     AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1638     dnl aclocal-1.4 backwards compatibility:
1639     dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1640 michael 912
1641 michael 945
1642     # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1643     # [ACTION-SUCCESS], [ACTION-FAILURE])
1644     # ----------------------------------------------------
1645     # Check whether the given linker option works
1646     AC_DEFUN([_LT_LINKER_OPTION],
1647     [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1648     m4_require([_LT_DECL_SED])dnl
1649 michael 912 AC_CACHE_CHECK([$1], [$2],
1650     [$2=no
1651     save_LDFLAGS="$LDFLAGS"
1652     LDFLAGS="$LDFLAGS $3"
1653     echo "$lt_simple_link_test_code" > conftest.$ac_ext
1654     if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1655     # The linker can only warn and ignore the option if not recognized
1656     # So say no if there are warnings
1657     if test -s conftest.err; then
1658     # Append any errors to the config.log.
1659     cat conftest.err 1>&AS_MESSAGE_LOG_FD
1660 michael 1094 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1661 michael 912 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1662     if diff conftest.exp conftest.er2 >/dev/null; then
1663     $2=yes
1664     fi
1665     else
1666     $2=yes
1667     fi
1668     fi
1669 michael 945 $RM -r conftest*
1670 michael 912 LDFLAGS="$save_LDFLAGS"
1671     ])
1672    
1673     if test x"[$]$2" = xyes; then
1674 michael 945 m4_if([$4], , :, [$4])
1675 michael 912 else
1676 michael 945 m4_if([$5], , :, [$5])
1677 michael 912 fi
1678 michael 945 ])# _LT_LINKER_OPTION
1679 michael 912
1680 michael 945 # Old name:
1681     AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1682     dnl aclocal-1.4 backwards compatibility:
1683     dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1684 michael 912
1685 michael 945
1686     # LT_CMD_MAX_LEN
1687     #---------------
1688     AC_DEFUN([LT_CMD_MAX_LEN],
1689     [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1690     # find the maximum length of command line arguments
1691 michael 912 AC_MSG_CHECKING([the maximum length of command line arguments])
1692     AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1693     i=0
1694     teststring="ABCD"
1695    
1696     case $build_os in
1697     msdosdjgpp*)
1698     # On DJGPP, this test can blow up pretty badly due to problems in libc
1699     # (any single argument exceeding 2000 bytes causes a buffer overrun
1700     # during glob expansion). Even if it were fixed, the result of this
1701     # check would be larger than it should be.
1702     lt_cv_sys_max_cmd_len=12288; # 12K is about right
1703     ;;
1704    
1705     gnu*)
1706     # Under GNU Hurd, this test is not required because there is
1707     # no limit to the length of command line arguments.
1708     # Libtool will interpret -1 as no limit whatsoever
1709     lt_cv_sys_max_cmd_len=-1;
1710     ;;
1711    
1712 michael 945 cygwin* | mingw* | cegcc*)
1713 michael 912 # On Win9x/ME, this test blows up -- it succeeds, but takes
1714     # about 5 minutes as the teststring grows exponentially.
1715     # Worse, since 9x/ME are not pre-emptively multitasking,
1716     # you end up with a "frozen" computer, even though with patience
1717     # the test eventually succeeds (with a max line length of 256k).
1718     # Instead, let's just punt: use the minimum linelength reported by
1719     # all of the supported platforms: 8192 (on NT/2K/XP).
1720     lt_cv_sys_max_cmd_len=8192;
1721     ;;
1722    
1723 michael 1094 mint*)
1724     # On MiNT this can take a long time and run out of memory.
1725     lt_cv_sys_max_cmd_len=8192;
1726     ;;
1727    
1728 michael 912 amigaos*)
1729     # On AmigaOS with pdksh, this test takes hours, literally.
1730     # So we just punt and use a minimum line length of 8192.
1731     lt_cv_sys_max_cmd_len=8192;
1732     ;;
1733    
1734     netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1735     # This has been around since 386BSD, at least. Likely further.
1736     if test -x /sbin/sysctl; then
1737     lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1738     elif test -x /usr/sbin/sysctl; then
1739     lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1740     else
1741     lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1742     fi
1743     # And add a safety zone
1744     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1745     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1746     ;;
1747    
1748     interix*)
1749     # We know the value 262144 and hardcode it with a safety zone (like BSD)
1750     lt_cv_sys_max_cmd_len=196608
1751     ;;
1752    
1753 michael 1257 os2*)
1754     # The test takes a long time on OS/2.
1755     lt_cv_sys_max_cmd_len=8192
1756     ;;
1757    
1758 michael 912 osf*)
1759     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1760     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1761     # nice to cause kernel panics so lets avoid the loop below.
1762     # First set a reasonable default.
1763     lt_cv_sys_max_cmd_len=16384
1764     #
1765     if test -x /sbin/sysconfig; then
1766     case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1767     *1*) lt_cv_sys_max_cmd_len=-1 ;;
1768     esac
1769     fi
1770     ;;
1771     sco3.2v5*)
1772     lt_cv_sys_max_cmd_len=102400
1773     ;;
1774     sysv5* | sco5v6* | sysv4.2uw2*)
1775     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1776     if test -n "$kargmax"; then
1777 michael 945 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1778 michael 912 else
1779     lt_cv_sys_max_cmd_len=32768
1780     fi
1781     ;;
1782     *)
1783     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1784     if test -n "$lt_cv_sys_max_cmd_len"; then
1785     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1786     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1787     else
1788 michael 945 # Make teststring a little bigger before we do anything with it.
1789     # a 1K string should be a reasonable start.
1790     for i in 1 2 3 4 5 6 7 8 ; do
1791     teststring=$teststring$teststring
1792     done
1793 michael 912 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1794 michael 945 # If test is not a shell built-in, we'll probably end up computing a
1795     # maximum length that is only half of the actual maximum length, but
1796     # we can't tell.
1797 michael 1257 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1798 michael 1094 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1799 michael 912 test $i != 17 # 1/2 MB should be enough
1800     do
1801     i=`expr $i + 1`
1802     teststring=$teststring$teststring
1803     done
1804 michael 945 # Only check the string length outside the loop.
1805     lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1806 michael 912 teststring=
1807 michael 945 # Add a significant safety factor because C++ compilers can tack on
1808     # massive amounts of additional arguments before passing them to the
1809     # linker. It appears as though 1/2 is a usable value.
1810 michael 912 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1811     fi
1812     ;;
1813     esac
1814     ])
1815     if test -n $lt_cv_sys_max_cmd_len ; then
1816     AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1817     else
1818     AC_MSG_RESULT(none)
1819     fi
1820 michael 945 max_cmd_len=$lt_cv_sys_max_cmd_len
1821     _LT_DECL([], [max_cmd_len], [0],
1822     [What is the maximum length of a command?])
1823     ])# LT_CMD_MAX_LEN
1824 michael 912
1825 michael 945 # Old name:
1826     AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1827     dnl aclocal-1.4 backwards compatibility:
1828     dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1829 michael 912
1830    
1831 michael 945 # _LT_HEADER_DLFCN
1832     # ----------------
1833     m4_defun([_LT_HEADER_DLFCN],
1834     [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1835     ])# _LT_HEADER_DLFCN
1836 michael 912
1837 michael 945
1838     # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1839     # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1840     # ----------------------------------------------------------------
1841     m4_defun([_LT_TRY_DLOPEN_SELF],
1842     [m4_require([_LT_HEADER_DLFCN])dnl
1843 michael 912 if test "$cross_compiling" = yes; then :
1844     [$4]
1845     else
1846     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1847     lt_status=$lt_dlunknown
1848 michael 945 cat > conftest.$ac_ext <<_LT_EOF
1849 michael 1094 [#line $LINENO "configure"
1850 michael 912 #include "confdefs.h"
1851    
1852     #if HAVE_DLFCN_H
1853     #include <dlfcn.h>
1854     #endif
1855    
1856     #include <stdio.h>
1857    
1858     #ifdef RTLD_GLOBAL
1859     # define LT_DLGLOBAL RTLD_GLOBAL
1860     #else
1861     # ifdef DL_GLOBAL
1862     # define LT_DLGLOBAL DL_GLOBAL
1863     # else
1864     # define LT_DLGLOBAL 0
1865     # endif
1866     #endif
1867    
1868     /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1869     find out it does not work in some platform. */
1870     #ifndef LT_DLLAZY_OR_NOW
1871     # ifdef RTLD_LAZY
1872     # define LT_DLLAZY_OR_NOW RTLD_LAZY
1873     # else
1874     # ifdef DL_LAZY
1875     # define LT_DLLAZY_OR_NOW DL_LAZY
1876     # else
1877     # ifdef RTLD_NOW
1878     # define LT_DLLAZY_OR_NOW RTLD_NOW
1879     # else
1880     # ifdef DL_NOW
1881     # define LT_DLLAZY_OR_NOW DL_NOW
1882     # else
1883     # define LT_DLLAZY_OR_NOW 0
1884     # endif
1885     # endif
1886     # endif
1887     # endif
1888     #endif
1889    
1890 michael 1094 /* When -fvisbility=hidden is used, assume the code has been annotated
1891     correspondingly for the symbols needed. */
1892     #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1893 michael 1106 int fnord () __attribute__((visibility("default")));
1894 michael 1094 #endif
1895    
1896 michael 1106 int fnord () { return 42; }
1897 michael 912 int main ()
1898     {
1899     void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1900     int status = $lt_dlunknown;
1901    
1902     if (self)
1903     {
1904     if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1905 michael 1094 else
1906     {
1907     if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1908     else puts (dlerror ());
1909     }
1910 michael 912 /* dlclose (self); */
1911     }
1912     else
1913     puts (dlerror ());
1914    
1915 michael 945 return status;
1916 michael 912 }]
1917 michael 945 _LT_EOF
1918 michael 912 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1919     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1920     lt_status=$?
1921     case x$lt_status in
1922     x$lt_dlno_uscore) $1 ;;
1923     x$lt_dlneed_uscore) $2 ;;
1924     x$lt_dlunknown|x*) $3 ;;
1925     esac
1926     else :
1927     # compilation failed
1928     $3
1929     fi
1930     fi
1931     rm -fr conftest*
1932 michael 945 ])# _LT_TRY_DLOPEN_SELF
1933 michael 912
1934    
1935 michael 945 # LT_SYS_DLOPEN_SELF
1936     # ------------------
1937     AC_DEFUN([LT_SYS_DLOPEN_SELF],
1938     [m4_require([_LT_HEADER_DLFCN])dnl
1939 michael 912 if test "x$enable_dlopen" != xyes; then
1940     enable_dlopen=unknown
1941     enable_dlopen_self=unknown
1942     enable_dlopen_self_static=unknown
1943     else
1944     lt_cv_dlopen=no
1945     lt_cv_dlopen_libs=
1946    
1947     case $host_os in
1948     beos*)
1949     lt_cv_dlopen="load_add_on"
1950     lt_cv_dlopen_libs=
1951     lt_cv_dlopen_self=yes
1952     ;;
1953    
1954 michael 945 mingw* | pw32* | cegcc*)
1955 michael 912 lt_cv_dlopen="LoadLibrary"
1956     lt_cv_dlopen_libs=
1957 michael 945 ;;
1958 michael 912
1959     cygwin*)
1960     lt_cv_dlopen="dlopen"
1961     lt_cv_dlopen_libs=
1962 michael 945 ;;
1963 michael 912
1964     darwin*)
1965     # if libdl is installed we need to link against it
1966     AC_CHECK_LIB([dl], [dlopen],
1967     [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1968     lt_cv_dlopen="dyld"
1969     lt_cv_dlopen_libs=
1970     lt_cv_dlopen_self=yes
1971     ])
1972 michael 945 ;;
1973 michael 912
1974     *)
1975     AC_CHECK_FUNC([shl_load],
1976     [lt_cv_dlopen="shl_load"],
1977     [AC_CHECK_LIB([dld], [shl_load],
1978 db 941 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1979 michael 912 [AC_CHECK_FUNC([dlopen],
1980     [lt_cv_dlopen="dlopen"],
1981     [AC_CHECK_LIB([dl], [dlopen],
1982     [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1983     [AC_CHECK_LIB([svld], [dlopen],
1984     [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1985     [AC_CHECK_LIB([dld], [dld_link],
1986 db 941 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1987 michael 912 ])
1988     ])
1989     ])
1990     ])
1991     ])
1992     ;;
1993     esac
1994    
1995     if test "x$lt_cv_dlopen" != xno; then
1996     enable_dlopen=yes
1997     else
1998     enable_dlopen=no
1999     fi
2000    
2001     case $lt_cv_dlopen in
2002     dlopen)
2003     save_CPPFLAGS="$CPPFLAGS"
2004     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2005    
2006     save_LDFLAGS="$LDFLAGS"
2007     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2008    
2009     save_LIBS="$LIBS"
2010     LIBS="$lt_cv_dlopen_libs $LIBS"
2011    
2012     AC_CACHE_CHECK([whether a program can dlopen itself],
2013     lt_cv_dlopen_self, [dnl
2014 michael 945 _LT_TRY_DLOPEN_SELF(
2015 michael 912 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2016     lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2017     ])
2018    
2019     if test "x$lt_cv_dlopen_self" = xyes; then
2020     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2021     AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2022 michael 945 lt_cv_dlopen_self_static, [dnl
2023     _LT_TRY_DLOPEN_SELF(
2024 michael 912 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2025     lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2026     ])
2027     fi
2028    
2029     CPPFLAGS="$save_CPPFLAGS"
2030     LDFLAGS="$save_LDFLAGS"
2031     LIBS="$save_LIBS"
2032     ;;
2033     esac
2034    
2035     case $lt_cv_dlopen_self in
2036     yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2037     *) enable_dlopen_self=unknown ;;
2038     esac
2039    
2040     case $lt_cv_dlopen_self_static in
2041     yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2042     *) enable_dlopen_self_static=unknown ;;
2043     esac
2044     fi
2045 michael 945 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2046     [Whether dlopen is supported])
2047     _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2048     [Whether dlopen of programs is supported])
2049     _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2050     [Whether dlopen of statically linked programs is supported])
2051     ])# LT_SYS_DLOPEN_SELF
2052 michael 912
2053 michael 945 # Old name:
2054     AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2055     dnl aclocal-1.4 backwards compatibility:
2056     dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2057 michael 912
2058 michael 945
2059     # _LT_COMPILER_C_O([TAGNAME])
2060     # ---------------------------
2061     # Check to see if options -c and -o are simultaneously supported by compiler.
2062     # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2063     m4_defun([_LT_COMPILER_C_O],
2064     [m4_require([_LT_DECL_SED])dnl
2065     m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2066     m4_require([_LT_TAG_COMPILER])dnl
2067 michael 912 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2068 michael 945 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2069     [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2070     $RM -r conftest 2>/dev/null
2071 michael 912 mkdir conftest
2072     cd conftest
2073     mkdir out
2074     echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2075    
2076     lt_compiler_flag="-o out/conftest2.$ac_objext"
2077     # Insert the option either (1) after the last *FLAGS variable, or
2078     # (2) before a word containing "conftest.", or (3) at the end.
2079     # Note that $ac_compile itself does not contain backslashes and begins
2080     # with a dollar sign (not a hyphen), so the echo should work correctly.
2081     lt_compile=`echo "$ac_compile" | $SED \
2082     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2083     -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2084     -e 's:$: $lt_compiler_flag:'`
2085 michael 1094 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2086 michael 912 (eval "$lt_compile" 2>out/conftest.err)
2087     ac_status=$?
2088     cat out/conftest.err >&AS_MESSAGE_LOG_FD
2089 michael 1094 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2090 michael 912 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2091     then
2092     # The compiler can only warn and ignore the option if not recognized
2093     # So say no if there are warnings
2094 michael 1094 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2095 michael 912 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2096     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2097 michael 945 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2098 michael 912 fi
2099     fi
2100     chmod u+w . 2>&AS_MESSAGE_LOG_FD
2101 michael 945 $RM conftest*
2102 michael 912 # SGI C++ compiler will create directory out/ii_files/ for
2103     # template instantiation
2104 michael 945 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2105     $RM out/* && rmdir out
2106 michael 912 cd ..
2107 michael 945 $RM -r conftest
2108     $RM conftest*
2109 michael 912 ])
2110 michael 945 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2111     [Does compiler simultaneously support -c and -o options?])
2112     ])# _LT_COMPILER_C_O
2113 michael 912
2114    
2115 michael 945 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2116     # ----------------------------------
2117 michael 912 # Check to see if we can do hard links to lock some files if needed
2118 michael 945 m4_defun([_LT_COMPILER_FILE_LOCKS],
2119     [m4_require([_LT_ENABLE_LOCK])dnl
2120     m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2121     _LT_COMPILER_C_O([$1])
2122 michael 912
2123     hard_links="nottested"
2124 michael 945 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2125 michael 912 # do not overwrite the value of need_locks provided by the user
2126     AC_MSG_CHECKING([if we can lock with hard links])
2127     hard_links=yes
2128 michael 945 $RM conftest*
2129 michael 912 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2130     touch conftest.a
2131     ln conftest.a conftest.b 2>&5 || hard_links=no
2132     ln conftest.a conftest.b 2>/dev/null && hard_links=no
2133     AC_MSG_RESULT([$hard_links])
2134     if test "$hard_links" = no; then
2135     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2136     need_locks=warn
2137     fi
2138     else
2139     need_locks=no
2140     fi
2141 michael 945 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2142     ])# _LT_COMPILER_FILE_LOCKS
2143 michael 912
2144    
2145 michael 945 # _LT_CHECK_OBJDIR
2146     # ----------------
2147     m4_defun([_LT_CHECK_OBJDIR],
2148 michael 912 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2149     [rm -f .libs 2>/dev/null
2150     mkdir .libs 2>/dev/null
2151     if test -d .libs; then
2152     lt_cv_objdir=.libs
2153     else
2154     # MS-DOS does not allow filenames that begin with a dot.
2155     lt_cv_objdir=_libs
2156     fi
2157     rmdir .libs 2>/dev/null])
2158     objdir=$lt_cv_objdir
2159 michael 945 _LT_DECL([], [objdir], [0],
2160     [The name of the directory that contains temporary libtool files])dnl
2161     m4_pattern_allow([LT_OBJDIR])dnl
2162     AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2163     [Define to the sub-directory in which libtool stores uninstalled libraries.])
2164     ])# _LT_CHECK_OBJDIR
2165 michael 912
2166    
2167 michael 945 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2168     # --------------------------------------
2169 michael 912 # Check hardcoding attributes.
2170 michael 945 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2171 michael 912 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2172 michael 945 _LT_TAGVAR(hardcode_action, $1)=
2173     if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2174     test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2175     test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2176 michael 912
2177 michael 945 # We can hardcode non-existent directories.
2178     if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2179 michael 912 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2180     # have to relink, otherwise we might link with an installed library
2181     # when we should be linking with a yet-to-be-installed one
2182 michael 945 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2183     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2184 michael 912 # Linking always hardcodes the temporary library directory.
2185 michael 945 _LT_TAGVAR(hardcode_action, $1)=relink
2186 michael 912 else
2187     # We can link without hardcoding, and we can hardcode nonexisting dirs.
2188 michael 945 _LT_TAGVAR(hardcode_action, $1)=immediate
2189 michael 912 fi
2190     else
2191     # We cannot hardcode anything, or else we can only hardcode existing
2192     # directories.
2193 michael 945 _LT_TAGVAR(hardcode_action, $1)=unsupported
2194 michael 912 fi
2195 michael 945 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2196 michael 912
2197 michael 945 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2198     test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2199 michael 912 # Fast installation is not supported
2200     enable_fast_install=no
2201     elif test "$shlibpath_overrides_runpath" = yes ||
2202     test "$enable_shared" = no; then
2203     # Fast installation is not necessary
2204     enable_fast_install=needless
2205     fi
2206 michael 945 _LT_TAGDECL([], [hardcode_action], [0],
2207     [How to hardcode a shared library path into an executable])
2208     ])# _LT_LINKER_HARDCODE_LIBPATH
2209 michael 912
2210    
2211 michael 945 # _LT_CMD_STRIPLIB
2212     # ----------------
2213     m4_defun([_LT_CMD_STRIPLIB],
2214     [m4_require([_LT_DECL_EGREP])
2215     striplib=
2216 michael 912 old_striplib=
2217     AC_MSG_CHECKING([whether stripping libraries is possible])
2218 michael 945 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2219 michael 912 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2220     test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2221     AC_MSG_RESULT([yes])
2222     else
2223     # FIXME - insert some real tests, host_os isn't really good enough
2224     case $host_os in
2225 michael 945 darwin*)
2226     if test -n "$STRIP" ; then
2227     striplib="$STRIP -x"
2228     old_striplib="$STRIP -S"
2229     AC_MSG_RESULT([yes])
2230     else
2231     AC_MSG_RESULT([no])
2232     fi
2233 michael 912 ;;
2234 michael 945 *)
2235     AC_MSG_RESULT([no])
2236     ;;
2237 michael 912 esac
2238     fi
2239 michael 945 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2240     _LT_DECL([], [striplib], [1])
2241     ])# _LT_CMD_STRIPLIB
2242 michael 912
2243    
2244 michael 945 # _LT_SYS_DYNAMIC_LINKER([TAG])
2245 michael 912 # -----------------------------
2246     # PORTME Fill in your ld.so characteristics
2247 michael 945 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2248     [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2249     m4_require([_LT_DECL_EGREP])dnl
2250     m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2251     m4_require([_LT_DECL_OBJDUMP])dnl
2252     m4_require([_LT_DECL_SED])dnl
2253 michael 1094 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2254 michael 912 AC_MSG_CHECKING([dynamic linker characteristics])
2255 michael 945 m4_if([$1],
2256     [], [
2257 michael 912 if test "$GCC" = yes; then
2258     case $host_os in
2259     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2260     *) lt_awk_arg="/^libraries:/" ;;
2261     esac
2262 michael 1094 case $host_os in
2263     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2264     *) lt_sed_strip_eq="s,=/,/,g" ;;
2265     esac
2266     lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2267     case $lt_search_path_spec in
2268     *\;*)
2269 michael 912 # if the path contains ";" then we assume it to be the separator
2270     # otherwise default to the standard path separator (i.e. ":") - it is
2271     # assumed that no part of a normal pathname contains ";" but that should
2272     # okay in the real world where ";" in dirpaths is itself problematic.
2273 michael 1094 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2274     ;;
2275     *)
2276     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2277     ;;
2278     esac
2279 michael 912 # Ok, now we have the path, separated by spaces, we can step through it
2280     # and add multilib dir if necessary.
2281     lt_tmp_lt_search_path_spec=
2282     lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2283     for lt_sys_path in $lt_search_path_spec; do
2284     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2285     lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2286     else
2287     test -d "$lt_sys_path" && \
2288     lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2289     fi
2290     done
2291 michael 1094 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2292 michael 912 BEGIN {RS=" "; FS="/|\n";} {
2293     lt_foo="";
2294     lt_count=0;
2295     for (lt_i = NF; lt_i > 0; lt_i--) {
2296     if ($lt_i != "" && $lt_i != ".") {
2297     if ($lt_i == "..") {
2298     lt_count++;
2299     } else {
2300     if (lt_count == 0) {
2301     lt_foo="/" $lt_i lt_foo;
2302     } else {
2303     lt_count--;
2304     }
2305     }
2306     }
2307     }
2308     if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2309     if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2310     }'`
2311 michael 1094 # AWK program above erroneously prepends '/' to C:/dos/paths
2312     # for these hosts.
2313     case $host_os in
2314     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2315     $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2316     esac
2317     sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2318 michael 912 else
2319     sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2320     fi])
2321 michael 945 library_names_spec=
2322     libname_spec='lib$name'
2323     soname_spec=
2324     shrext_cmds=".so"
2325     postinstall_cmds=
2326     postuninstall_cmds=
2327     finish_cmds=
2328     finish_eval=
2329     shlibpath_var=
2330     shlibpath_overrides_runpath=unknown
2331     version_type=none
2332     dynamic_linker="$host_os ld.so"
2333     sys_lib_dlsearch_path_spec="/lib /usr/lib"
2334 michael 912 need_lib_prefix=unknown
2335     hardcode_into_libs=no
2336    
2337     # when you set need_version to no, make sure it does not cause -set_version
2338     # flags to be left without arguments
2339     need_version=unknown
2340    
2341     case $host_os in
2342     aix3*)
2343 michael 1257 version_type=linux # correct to gnu/linux during the next big refactor
2344 michael 912 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2345     shlibpath_var=LIBPATH
2346    
2347     # AIX 3 has no versioning support, so we append a major version to the name.
2348     soname_spec='${libname}${release}${shared_ext}$major'
2349     ;;
2350    
2351 db 941 aix[[4-9]]*)
2352 michael 1257 version_type=linux # correct to gnu/linux during the next big refactor
2353 michael 912 need_lib_prefix=no
2354     need_version=no
2355     hardcode_into_libs=yes
2356     if test "$host_cpu" = ia64; then
2357     # AIX 5 supports IA64
2358     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2359     shlibpath_var=LD_LIBRARY_PATH
2360     else
2361     # With GCC up to 2.95.x, collect2 would create an import file
2362     # for dependence libraries. The import file would start with
2363     # the line `#! .'. This would cause the generated library to
2364     # depend on `.', always an invalid library. This was fixed in
2365     # development snapshots of GCC prior to 3.0.
2366     case $host_os in
2367     aix4 | aix4.[[01]] | aix4.[[01]].*)
2368     if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2369     echo ' yes '
2370 michael 945 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2371 michael 912 :
2372     else
2373     can_build_shared=no
2374     fi
2375     ;;
2376     esac
2377     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2378     # soname into executable. Probably we can add versioning support to
2379     # collect2, so additional links can be useful in future.
2380     if test "$aix_use_runtimelinking" = yes; then
2381     # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2382     # instead of lib<name>.a to let people know that these are not
2383     # typical AIX shared libraries.
2384     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2385     else
2386     # We preserve .a as extension for shared libraries through AIX4.2
2387     # and later when we are not doing run time linking.
2388     library_names_spec='${libname}${release}.a $libname.a'
2389     soname_spec='${libname}${release}${shared_ext}$major'
2390     fi
2391     shlibpath_var=LIBPATH
2392     fi
2393     ;;
2394    
2395     amigaos*)
2396 michael 945 case $host_cpu in
2397     powerpc)
2398     # Since July 2007 AmigaOS4 officially supports .so libraries.
2399     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2400     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2401     ;;
2402     m68k)
2403     library_names_spec='$libname.ixlibrary $libname.a'
2404     # Create ${libname}_ixlibrary.a entries in /sys/libs.
2405 michael 1094 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2406 michael 945 ;;
2407     esac
2408 michael 912 ;;
2409    
2410     beos*)
2411     library_names_spec='${libname}${shared_ext}'
2412     dynamic_linker="$host_os ld.so"
2413     shlibpath_var=LIBRARY_PATH
2414     ;;
2415    
2416     bsdi[[45]]*)
2417 michael 1257 version_type=linux # correct to gnu/linux during the next big refactor
2418 michael 912 need_version=no
2419     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2420     soname_spec='${libname}${release}${shared_ext}$major'
2421     finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2422     shlibpath_var=LD_LIBRARY_PATH
2423     sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2424     sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2425     # the default ld.so.conf also contains /usr/contrib/lib and
2426     # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2427     # libtool to hard-code these into programs
2428     ;;
2429    
2430 michael 945 cygwin* | mingw* | pw32* | cegcc*)
2431 michael 912 version_type=windows
2432     shrext_cmds=".dll"
2433     need_version=no
2434     need_lib_prefix=no
2435    
2436 michael 1106 case $GCC,$cc_basename in
2437     yes,*)
2438     # gcc
2439 michael 912 library_names_spec='$libname.dll.a'
2440     # DLL is installed to $(libdir)/../bin by postinstall_cmds
2441     postinstall_cmds='base_file=`basename \${file}`~
2442 michael 945 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2443 michael 912 dldir=$destdir/`dirname \$dlpath`~
2444     test -d \$dldir || mkdir -p \$dldir~
2445     $install_prog $dir/$dlname \$dldir/$dlname~
2446 michael 945 chmod a+x \$dldir/$dlname~
2447     if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2448     eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2449     fi'
2450 michael 912 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2451     dlpath=$dir/\$dldll~
2452 michael 945 $RM \$dlpath'
2453 michael 912 shlibpath_overrides_runpath=yes
2454    
2455     case $host_os in
2456     cygwin*)
2457     # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2458     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2459 michael 1094 m4_if([$1], [],[
2460     sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2461 michael 912 ;;
2462 michael 945 mingw* | cegcc*)
2463 michael 912 # MinGW DLLs use traditional 'lib' prefix
2464     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2465     ;;
2466     pw32*)
2467     # pw32 DLLs use 'pw' prefix rather than 'lib'
2468     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2469     ;;
2470     esac
2471 michael 1106 dynamic_linker='Win32 ld.exe'
2472 michael 912 ;;
2473    
2474 michael 1106 *,cl*)
2475     # Native MSVC
2476     libname_spec='$name'
2477     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2478     library_names_spec='${libname}.dll.lib'
2479    
2480     case $build_os in
2481     mingw*)
2482     sys_lib_search_path_spec=
2483     lt_save_ifs=$IFS
2484     IFS=';'
2485     for lt_path in $LIB
2486     do
2487     IFS=$lt_save_ifs
2488     # Let DOS variable expansion print the short 8.3 style file name.
2489     lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2490     sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2491     done
2492     IFS=$lt_save_ifs
2493     # Convert to MSYS style.
2494     sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2495     ;;
2496     cygwin*)
2497     # Convert to unix form, then to dos form, then back to unix form
2498     # but this time dos style (no spaces!) so that the unix form looks
2499     # like /cygdrive/c/PROGRA~1:/cygdr...
2500     sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2501     sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2502     sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2503     ;;
2504     *)
2505     sys_lib_search_path_spec="$LIB"
2506     if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2507     # It is most probably a Windows format PATH.
2508     sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2509     else
2510     sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2511     fi
2512     # FIXME: find the short name or the path components, as spaces are
2513     # common. (e.g. "Program Files" -> "PROGRA~1")
2514     ;;
2515     esac
2516    
2517     # DLL is installed to $(libdir)/../bin by postinstall_cmds
2518     postinstall_cmds='base_file=`basename \${file}`~
2519     dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2520     dldir=$destdir/`dirname \$dlpath`~
2521     test -d \$dldir || mkdir -p \$dldir~
2522     $install_prog $dir/$dlname \$dldir/$dlname'
2523     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2524     dlpath=$dir/\$dldll~
2525     $RM \$dlpath'
2526     shlibpath_overrides_runpath=yes
2527     dynamic_linker='Win32 link.exe'
2528     ;;
2529    
2530 michael 912 *)
2531 michael 1106 # Assume MSVC wrapper
2532 michael 912 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2533 michael 1106 dynamic_linker='Win32 ld.exe'
2534 michael 912 ;;
2535     esac
2536     # FIXME: first we should search . and the directory the executable is in
2537     shlibpath_var=PATH
2538     ;;
2539    
2540     darwin* | rhapsody*)
2541     dynamic_linker="$host_os dyld"
2542     version_type=darwin
2543     need_lib_prefix=no
2544     need_version=no
2545 michael 945 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2546 michael 912 soname_spec='${libname}${release}${major}$shared_ext'
2547     shlibpath_overrides_runpath=yes
2548     shlibpath_var=DYLD_LIBRARY_PATH
2549     shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2550 michael 945 m4_if([$1], [],[
2551     sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2552 michael 912 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2553     ;;
2554    
2555     dgux*)
2556 michael 1257 version_type=linux # correct to gnu/linux during the next big refactor
2557 michael 912 need_lib_prefix=no
2558     need_version=no
2559     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2560     soname_spec='${libname}${release}${shared_ext}$major'
2561     shlibpath_var=LD_LIBRARY_PATH
2562     ;;
2563    
2564     freebsd* | dragonfly*)
2565     # DragonFly does not have aout. When/if they implement a new
2566     # versioning mechanism, adjust this.
2567     if test -x /usr/bin/objformat; then
2568     objformat=`/usr/bin/objformat`
2569     else
2570     case $host_os in
2571 michael 1257 freebsd[[23]].*) objformat=aout ;;
2572 michael 912 *) objformat=elf ;;
2573     esac
2574     fi
2575     version_type=freebsd-$objformat
2576     case $version_type in
2577     freebsd-elf*)
2578     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2579     need_version=no
2580     need_lib_prefix=no
2581     ;;
2582     freebsd-*)
2583     library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2584     need_version=yes
2585     ;;
2586     esac
2587     shlibpath_var=LD_LIBRARY_PATH
2588     case $host_os in
2589 michael 1257 freebsd2.*)
2590 michael 912 shlibpath_overrides_runpath=yes
2591     ;;
2592     freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2593     shlibpath_overrides_runpath=yes
2594     hardcode_into_libs=yes
2595     ;;
2596     freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2597     freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2598     shlibpath_overrides_runpath=no
2599     hardcode_into_libs=yes
2600     ;;
2601     *) # from 4.6 on, and DragonFly
2602     shlibpath_overrides_runpath=yes
2603     hardcode_into_libs=yes
2604     ;;
2605     esac
2606     ;;
2607    
2608     gnu*)
2609 michael 1257 version_type=linux # correct to gnu/linux during the next big refactor
2610 michael 912 need_lib_prefix=no
2611     need_version=no
2612     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2613     soname_spec='${libname}${release}${shared_ext}$major'
2614     shlibpath_var=LD_LIBRARY_PATH
2615 michael 1257 shlibpath_overrides_runpath=no
2616 michael 912 hardcode_into_libs=yes
2617     ;;
2618    
2619 michael 1094 haiku*)
2620 michael 1257 version_type=linux # correct to gnu/linux during the next big refactor
2621 michael 1094 need_lib_prefix=no
2622     need_version=no
2623     dynamic_linker="$host_os runtime_loader"
2624     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2625     soname_spec='${libname}${release}${shared_ext}$major'
2626     shlibpath_var=LIBRARY_PATH
2627     shlibpath_overrides_runpath=yes
2628     sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2629     hardcode_into_libs=yes
2630     ;;
2631    
2632 michael 912 hpux9* | hpux10* | hpux11*)
2633     # Give a soname corresponding to the major version so that dld.sl refuses to
2634     # link against other versions.
2635     version_type=sunos
2636     need_lib_prefix=no
2637     need_version=no
2638     case $host_cpu in
2639     ia64*)
2640     shrext_cmds='.so'
2641     hardcode_into_libs=yes
2642     dynamic_linker="$host_os dld.so"
2643     shlibpath_var=LD_LIBRARY_PATH
2644     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2645     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2646     soname_spec='${libname}${release}${shared_ext}$major'
2647     if test "X$HPUX_IA64_MODE" = X32; then
2648     sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2649     else
2650     sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2651     fi
2652     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2653     ;;
2654 michael 945 hppa*64*)
2655 michael 912 shrext_cmds='.sl'
2656 michael 945 hardcode_into_libs=yes
2657 michael 912 dynamic_linker="$host_os dld.sl"
2658 michael 945 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2659     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2660     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2661     soname_spec='${libname}${release}${shared_ext}$major'
2662     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2663     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2664     ;;
2665     *)
2666     shrext_cmds='.sl'
2667     dynamic_linker="$host_os dld.sl"
2668 michael 912 shlibpath_var=SHLIB_PATH
2669     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2670     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2671     soname_spec='${libname}${release}${shared_ext}$major'
2672     ;;
2673     esac
2674 michael 1094 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2675 michael 912 postinstall_cmds='chmod 555 $lib'
2676 michael 1094 # or fails outright, so override atomically:
2677     install_override_mode=555
2678 michael 912 ;;
2679    
2680     interix[[3-9]]*)
2681 michael 1257 version_type=linux # correct to gnu/linux during the next big refactor
2682 michael 912 need_lib_prefix=no
2683     need_version=no
2684     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2685     soname_spec='${libname}${release}${shared_ext}$major'
2686     dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2687     shlibpath_var=LD_LIBRARY_PATH
2688     shlibpath_overrides_runpath=no
2689     hardcode_into_libs=yes
2690     ;;
2691    
2692     irix5* | irix6* | nonstopux*)
2693     case $host_os in
2694     nonstopux*) version_type=nonstopux ;;
2695     *)
2696     if test "$lt_cv_prog_gnu_ld" = yes; then
2697 michael 1257 version_type=linux # correct to gnu/linux during the next big refactor
2698 michael 912 else
2699     version_type=irix
2700     fi ;;
2701     esac
2702     need_lib_prefix=no
2703     need_version=no
2704     soname_spec='${libname}${release}${shared_ext}$major'
2705     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2706     case $host_os in
2707     irix5* | nonstopux*)
2708     libsuff= shlibsuff=
2709     ;;
2710     *)
2711     case $LD in # libtool.m4 will add one of these switches to LD
2712     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2713     libsuff= shlibsuff= libmagic=32-bit;;
2714     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2715     libsuff=32 shlibsuff=N32 libmagic=N32;;
2716     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2717     libsuff=64 shlibsuff=64 libmagic=64-bit;;
2718     *) libsuff= shlibsuff= libmagic=never-match;;
2719     esac
2720     ;;
2721     esac
2722     shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2723     shlibpath_overrides_runpath=no
2724     sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2725     sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2726     hardcode_into_libs=yes
2727     ;;
2728    
2729     # No shared lib support for Linux oldld, aout, or coff.
2730     linux*oldld* | linux*aout* | linux*coff*)
2731     dynamic_linker=no
2732     ;;
2733    
2734 michael 1257 # This must be glibc/ELF.
2735 michael 1094 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2736 michael 1257 version_type=linux # correct to gnu/linux during the next big refactor
2737 michael 912 need_lib_prefix=no
2738     need_version=no
2739     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2740     soname_spec='${libname}${release}${shared_ext}$major'
2741     finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2742     shlibpath_var=LD_LIBRARY_PATH
2743     shlibpath_overrides_runpath=no
2744 michael 1094
2745 michael 945 # Some binutils ld are patched to set DT_RUNPATH
2746 michael 1094 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2747     [lt_cv_shlibpath_overrides_runpath=no
2748     save_LDFLAGS=$LDFLAGS
2749     save_libdir=$libdir
2750     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2751     LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2752     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2753     [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2754     [lt_cv_shlibpath_overrides_runpath=yes])])
2755     LDFLAGS=$save_LDFLAGS
2756     libdir=$save_libdir
2757     ])
2758     shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2759 michael 945
2760 michael 912 # This implies no fast_install, which is unacceptable.
2761     # Some rework will be needed to allow for fast_install
2762     # before this can be enabled.
2763     hardcode_into_libs=yes
2764    
2765     # Append ld.so.conf contents to the search path
2766     if test -f /etc/ld.so.conf; then
2767 michael 1094 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
2768 michael 1084 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2769 michael 912 fi
2770    
2771     # We used to test for /lib/ld.so.1 and disable shared libraries on
2772     # powerpc, because MkLinux only supported shared libraries with the
2773     # GNU dynamic linker. Since this was broken with cross compilers,
2774     # most powerpc-linux boxes support dynamic linking these days and
2775     # people can always --disable-shared, the test was removed, and we
2776     # assume the GNU/Linux dynamic linker is in use.
2777     dynamic_linker='GNU/Linux ld.so'
2778     ;;
2779    
2780     netbsd*)
2781     version_type=sunos
2782     need_lib_prefix=no
2783     need_version=no
2784 michael 945 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2785 michael 912 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2786     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2787     dynamic_linker='NetBSD (a.out) ld.so'
2788     else
2789     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2790     soname_spec='${libname}${release}${shared_ext}$major'
2791     dynamic_linker='NetBSD ld.elf_so'
2792     fi
2793     shlibpath_var=LD_LIBRARY_PATH
2794     shlibpath_overrides_runpath=yes
2795     hardcode_into_libs=yes
2796     ;;
2797    
2798     newsos6)
2799 michael 1257 version_type=linux # correct to gnu/linux during the next big refactor
2800 michael 912 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2801     shlibpath_var=LD_LIBRARY_PATH
2802     shlibpath_overrides_runpath=yes
2803     ;;
2804    
2805 michael 945 *nto* | *qnx*)
2806     version_type=qnx
2807 michael 912 need_lib_prefix=no
2808     need_version=no
2809     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2810     soname_spec='${libname}${release}${shared_ext}$major'
2811     shlibpath_var=LD_LIBRARY_PATH
2812 michael 945 shlibpath_overrides_runpath=no
2813     hardcode_into_libs=yes
2814     dynamic_linker='ldqnx.so'
2815 michael 912 ;;
2816    
2817     openbsd*)
2818     version_type=sunos
2819     sys_lib_dlsearch_path_spec="/usr/lib"
2820     need_lib_prefix=no
2821     # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2822     case $host_os in
2823 michael 945 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2824     *) need_version=no ;;
2825 michael 912 esac
2826     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2827     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2828     shlibpath_var=LD_LIBRARY_PATH
2829 michael 945 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2830 michael 912 case $host_os in
2831     openbsd2.[[89]] | openbsd2.[[89]].*)
2832     shlibpath_overrides_runpath=no
2833     ;;
2834     *)
2835     shlibpath_overrides_runpath=yes
2836     ;;
2837     esac
2838     else
2839     shlibpath_overrides_runpath=yes
2840     fi
2841     ;;
2842    
2843     os2*)
2844     libname_spec='$name'
2845     shrext_cmds=".dll"
2846     need_lib_prefix=no
2847     library_names_spec='$libname${shared_ext} $libname.a'
2848     dynamic_linker='OS/2 ld.exe'
2849     shlibpath_var=LIBPATH
2850     ;;
2851    
2852     osf3* | osf4* | osf5*)
2853     version_type=osf
2854     need_lib_prefix=no
2855     need_version=no
2856     soname_spec='${libname}${release}${shared_ext}$major'
2857     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2858     shlibpath_var=LD_LIBRARY_PATH
2859     sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2860     sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2861     ;;
2862    
2863     rdos*)
2864     dynamic_linker=no
2865     ;;
2866    
2867     solaris*)
2868 michael 1257 version_type=linux # correct to gnu/linux during the next big refactor
2869 michael 912 need_lib_prefix=no
2870     need_version=no
2871     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2872     soname_spec='${libname}${release}${shared_ext}$major'
2873     shlibpath_var=LD_LIBRARY_PATH
2874     shlibpath_overrides_runpath=yes
2875     hardcode_into_libs=yes
2876     # ldd complains unless libraries are executable
2877     postinstall_cmds='chmod +x $lib'
2878     ;;
2879    
2880     sunos4*)
2881     version_type=sunos
2882     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2883     finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2884     shlibpath_var=LD_LIBRARY_PATH
2885     shlibpath_overrides_runpath=yes
2886     if test "$with_gnu_ld" = yes; then
2887     need_lib_prefix=no
2888     fi
2889     need_version=yes
2890     ;;
2891    
2892     sysv4 | sysv4.3*)
2893 michael 1257 version_type=linux # correct to gnu/linux during the next big refactor
2894 michael 912 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2895     soname_spec='${libname}${release}${shared_ext}$major'
2896     shlibpath_var=LD_LIBRARY_PATH
2897     case $host_vendor in
2898     sni)
2899     shlibpath_overrides_runpath=no
2900     need_lib_prefix=no
2901     runpath_var=LD_RUN_PATH
2902     ;;
2903     siemens)
2904     need_lib_prefix=no
2905     ;;
2906     motorola)
2907     need_lib_prefix=no
2908     need_version=no
2909     shlibpath_overrides_runpath=no
2910     sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2911     ;;
2912     esac
2913     ;;
2914    
2915     sysv4*MP*)
2916     if test -d /usr/nec ;then
2917 michael 1257 version_type=linux # correct to gnu/linux during the next big refactor
2918 michael 912 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2919     soname_spec='$libname${shared_ext}.$major'
2920     shlibpath_var=LD_LIBRARY_PATH
2921     fi
2922     ;;
2923    
2924     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2925     version_type=freebsd-elf
2926     need_lib_prefix=no
2927     need_version=no
2928     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2929     soname_spec='${libname}${release}${shared_ext}$major'
2930     shlibpath_var=LD_LIBRARY_PATH
2931 michael 945 shlibpath_overrides_runpath=yes
2932 michael 912 hardcode_into_libs=yes
2933     if test "$with_gnu_ld" = yes; then
2934     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2935     else
2936     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2937     case $host_os in
2938     sco3.2v5*)
2939     sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2940     ;;
2941     esac
2942     fi
2943     sys_lib_dlsearch_path_spec='/usr/lib'
2944     ;;
2945    
2946 michael 945 tpf*)
2947     # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2948 michael 1257 version_type=linux # correct to gnu/linux during the next big refactor
2949 michael 945 need_lib_prefix=no
2950     need_version=no
2951     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2952     shlibpath_var=LD_LIBRARY_PATH
2953     shlibpath_overrides_runpath=no
2954     hardcode_into_libs=yes
2955     ;;
2956    
2957 michael 912 uts4*)
2958 michael 1257 version_type=linux # correct to gnu/linux during the next big refactor
2959 michael 912 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2960     soname_spec='${libname}${release}${shared_ext}$major'
2961     shlibpath_var=LD_LIBRARY_PATH
2962     ;;
2963    
2964     *)
2965     dynamic_linker=no
2966     ;;
2967     esac
2968     AC_MSG_RESULT([$dynamic_linker])
2969     test "$dynamic_linker" = no && can_build_shared=no
2970    
2971     variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2972     if test "$GCC" = yes; then
2973     variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2974     fi
2975    
2976 michael 945 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2977     sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2978 michael 912 fi
2979 michael 945 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2980     sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2981     fi
2982 michael 912
2983 michael 945 _LT_DECL([], [variables_saved_for_relink], [1],
2984     [Variables whose values should be saved in libtool wrapper scripts and
2985     restored at link time])
2986     _LT_DECL([], [need_lib_prefix], [0],
2987     [Do we need the "lib" prefix for modules?])
2988     _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2989     _LT_DECL([], [version_type], [0], [Library versioning type])
2990     _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2991     _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2992     _LT_DECL([], [shlibpath_overrides_runpath], [0],
2993     [Is shlibpath searched before the hard-coded library search path?])
2994     _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2995     _LT_DECL([], [library_names_spec], [1],
2996     [[List of archive names. First name is the real one, the rest are links.
2997     The last name is the one that the linker finds with -lNAME]])
2998     _LT_DECL([], [soname_spec], [1],
2999     [[The coded name of the library, if different from the real name]])
3000 michael 1094 _LT_DECL([], [install_override_mode], [1],
3001     [Permission mode override for installation of shared libraries])
3002 michael 945 _LT_DECL([], [postinstall_cmds], [2],
3003     [Command to use after installation of a shared archive])
3004     _LT_DECL([], [postuninstall_cmds], [2],
3005     [Command to use after uninstallation of a shared archive])
3006     _LT_DECL([], [finish_cmds], [2],
3007     [Commands used to finish a libtool library installation in a directory])
3008     _LT_DECL([], [finish_eval], [1],
3009     [[As "finish_cmds", except a single script fragment to be evaled but
3010     not shown]])
3011     _LT_DECL([], [hardcode_into_libs], [0],
3012     [Whether we should hardcode library paths into libraries])
3013     _LT_DECL([], [sys_lib_search_path_spec], [2],
3014     [Compile-time system search path for libraries])
3015     _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3016     [Run-time system search path for libraries])
3017     ])# _LT_SYS_DYNAMIC_LINKER
3018 michael 912
3019    
3020 michael 945 # _LT_PATH_TOOL_PREFIX(TOOL)
3021 michael 912 # --------------------------
3022     # find a file program which can recognize shared library
3023 michael 945 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3024     [m4_require([_LT_DECL_EGREP])dnl
3025 michael 912 AC_MSG_CHECKING([for $1])
3026     AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3027     [case $MAGIC_CMD in
3028     [[\\/*] | ?:[\\/]*])
3029     lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3030     ;;
3031     *)
3032     lt_save_MAGIC_CMD="$MAGIC_CMD"
3033     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3034     dnl $ac_dummy forces splitting on constant user-supplied paths.
3035     dnl POSIX.2 word splitting is done only on the output of word expansions,
3036     dnl not every word. This closes a longstanding sh security hole.
3037 michael 945 ac_dummy="m4_if([$2], , $PATH, [$2])"
3038 michael 912 for ac_dir in $ac_dummy; do
3039     IFS="$lt_save_ifs"
3040     test -z "$ac_dir" && ac_dir=.
3041     if test -f $ac_dir/$1; then
3042     lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3043     if test -n "$file_magic_test_file"; then
3044     case $deplibs_check_method in
3045     "file_magic "*)
3046     file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3047     MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3048     if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3049     $EGREP "$file_magic_regex" > /dev/null; then
3050     :
3051     else
3052 michael 945 cat <<_LT_EOF 1>&2
3053 michael 912
3054     *** Warning: the command libtool uses to detect shared libraries,
3055     *** $file_magic_cmd, produces output that libtool cannot recognize.
3056     *** The result is that libtool may fail to recognize shared libraries
3057     *** as such. This will affect the creation of libtool libraries that
3058     *** depend on shared libraries, but programs linked with such libtool
3059     *** libraries will work regardless of this problem. Nevertheless, you
3060     *** may want to report the problem to your system manager and/or to
3061     *** bug-libtool@gnu.org
3062    
3063 michael 945 _LT_EOF
3064 michael 912 fi ;;
3065     esac
3066     fi
3067     break
3068     fi
3069     done
3070     IFS="$lt_save_ifs"
3071     MAGIC_CMD="$lt_save_MAGIC_CMD"
3072     ;;
3073     esac])
3074     MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3075     if test -n "$MAGIC_CMD"; then
3076     AC_MSG_RESULT($MAGIC_CMD)
3077     else
3078     AC_MSG_RESULT(no)
3079     fi
3080 michael 945 _LT_DECL([], [MAGIC_CMD], [0],
3081     [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3082     ])# _LT_PATH_TOOL_PREFIX
3083 michael 912
3084 michael 945 # Old name:
3085     AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3086     dnl aclocal-1.4 backwards compatibility:
3087     dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3088 michael 912
3089 michael 945
3090     # _LT_PATH_MAGIC
3091     # --------------
3092 michael 912 # find a file program which can recognize a shared library
3093 michael 945 m4_defun([_LT_PATH_MAGIC],
3094     [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3095 michael 912 if test -z "$lt_cv_path_MAGIC_CMD"; then
3096     if test -n "$ac_tool_prefix"; then
3097 michael 945 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3098 michael 912 else
3099     MAGIC_CMD=:
3100     fi
3101     fi
3102 michael 945 ])# _LT_PATH_MAGIC
3103 michael 912
3104    
3105 michael 945 # LT_PATH_LD
3106 michael 912 # ----------
3107     # find the pathname to the GNU or non-GNU linker
3108 michael 945 AC_DEFUN([LT_PATH_LD],
3109     [AC_REQUIRE([AC_PROG_CC])dnl
3110     AC_REQUIRE([AC_CANONICAL_HOST])dnl
3111     AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3112     m4_require([_LT_DECL_SED])dnl
3113     m4_require([_LT_DECL_EGREP])dnl
3114 michael 1094 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3115 michael 945
3116     AC_ARG_WITH([gnu-ld],
3117     [AS_HELP_STRING([--with-gnu-ld],
3118 michael 912 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3119     [test "$withval" = no || with_gnu_ld=yes],
3120 michael 945 [with_gnu_ld=no])dnl
3121    
3122 michael 912 ac_prog=ld
3123     if test "$GCC" = yes; then
3124     # Check if gcc -print-prog-name=ld gives a path.
3125     AC_MSG_CHECKING([for ld used by $CC])
3126     case $host in
3127     *-*-mingw*)
3128     # gcc leaves a trailing carriage return which upsets mingw
3129     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3130     *)
3131     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3132     esac
3133     case $ac_prog in
3134     # Accept absolute paths.
3135     [[\\/]]* | ?:[[\\/]]*)
3136     re_direlt='/[[^/]][[^/]]*/\.\./'
3137     # Canonicalize the pathname of ld
3138 michael 945 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3139     while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3140     ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3141 michael 912 done
3142     test -z "$LD" && LD="$ac_prog"
3143     ;;
3144     "")
3145     # If it fails, then pretend we aren't using GCC.
3146     ac_prog=ld
3147     ;;
3148     *)
3149     # If it is relative, then search for the first ld in PATH.
3150     with_gnu_ld=unknown
3151     ;;
3152     esac
3153     elif test "$with_gnu_ld" = yes; then
3154     AC_MSG_CHECKING([for GNU ld])
3155     else
3156     AC_MSG_CHECKING([for non-GNU ld])
3157     fi
3158     AC_CACHE_VAL(lt_cv_path_LD,
3159     [if test -z "$LD"; then
3160     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3161     for ac_dir in $PATH; do
3162     IFS="$lt_save_ifs"
3163     test -z "$ac_dir" && ac_dir=.
3164     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3165     lt_cv_path_LD="$ac_dir/$ac_prog"
3166     # Check to see if the program is GNU ld. I'd rather use --version,
3167     # but apparently some variants of GNU ld only accept -v.
3168     # Break only if it was the GNU/non-GNU ld that we prefer.
3169     case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3170     *GNU* | *'with BFD'*)
3171     test "$with_gnu_ld" != no && break
3172     ;;
3173     *)
3174     test "$with_gnu_ld" != yes && break
3175     ;;
3176     esac
3177     fi
3178     done
3179     IFS="$lt_save_ifs"
3180     else
3181     lt_cv_path_LD="$LD" # Let the user override the test with a path.
3182     fi])
3183     LD="$lt_cv_path_LD"
3184     if test -n "$LD"; then
3185     AC_MSG_RESULT($LD)
3186     else
3187     AC_MSG_RESULT(no)
3188     fi
3189     test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3190 michael 945 _LT_PATH_LD_GNU
3191     AC_SUBST([LD])
3192 michael 912
3193 michael 945 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3194     ])# LT_PATH_LD
3195 michael 912
3196 michael 945 # Old names:
3197     AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3198     AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3199     dnl aclocal-1.4 backwards compatibility:
3200     dnl AC_DEFUN([AM_PROG_LD], [])
3201     dnl AC_DEFUN([AC_PROG_LD], [])
3202    
3203    
3204     # _LT_PATH_LD_GNU
3205     #- --------------
3206     m4_defun([_LT_PATH_LD_GNU],
3207     [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3208 michael 912 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3209     case `$LD -v 2>&1 </dev/null` in
3210     *GNU* | *'with BFD'*)
3211     lt_cv_prog_gnu_ld=yes
3212     ;;
3213     *)
3214     lt_cv_prog_gnu_ld=no
3215     ;;
3216     esac])
3217     with_gnu_ld=$lt_cv_prog_gnu_ld
3218 michael 945 ])# _LT_PATH_LD_GNU
3219 michael 912
3220    
3221 michael 945 # _LT_CMD_RELOAD
3222     # --------------
3223 michael 912 # find reload flag for linker
3224     # -- PORTME Some linkers may need a different reload flag.
3225 michael 945 m4_defun([_LT_CMD_RELOAD],
3226 michael 912 [AC_CACHE_CHECK([for $LD option to reload object files],
3227     lt_cv_ld_reload_flag,
3228     [lt_cv_ld_reload_flag='-r'])
3229     reload_flag=$lt_cv_ld_reload_flag
3230     case $reload_flag in
3231     "" | " "*) ;;
3232     *) reload_flag=" $reload_flag" ;;
3233     esac
3234     reload_cmds='$LD$reload_flag -o $output$reload_objs'
3235     case $host_os in
3236 michael 1106 cygwin* | mingw* | pw32* | cegcc*)
3237     if test "$GCC" != yes; then
3238     reload_cmds=false
3239     fi
3240     ;;
3241 michael 912 darwin*)
3242     if test "$GCC" = yes; then
3243     reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3244     else
3245     reload_cmds='$LD$reload_flag -o $output$reload_objs'
3246     fi
3247     ;;
3248     esac
3249 michael 1094 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3250     _LT_TAGDECL([], [reload_cmds], [2])dnl
3251 michael 945 ])# _LT_CMD_RELOAD
3252 michael 912
3253    
3254 michael 945 # _LT_CHECK_MAGIC_METHOD
3255     # ----------------------
3256 michael 912 # how to check for library dependencies
3257     # -- PORTME fill in with the dynamic library characteristics
3258 michael 945 m4_defun([_LT_CHECK_MAGIC_METHOD],
3259     [m4_require([_LT_DECL_EGREP])
3260     m4_require([_LT_DECL_OBJDUMP])
3261     AC_CACHE_CHECK([how to recognize dependent libraries],
3262 michael 912 lt_cv_deplibs_check_method,
3263     [lt_cv_file_magic_cmd='$MAGIC_CMD'
3264     lt_cv_file_magic_test_file=
3265     lt_cv_deplibs_check_method='unknown'
3266     # Need to set the preceding variable on all platforms that support
3267     # interlibrary dependencies.
3268     # 'none' -- dependencies not supported.
3269     # `unknown' -- same as none, but documents that we really don't know.
3270     # 'pass_all' -- all dependencies passed with no checks.
3271     # 'test_compile' -- check by making test program.
3272     # 'file_magic [[regex]]' -- check by looking for files in library path
3273     # which responds to the $file_magic_cmd with a given extended regex.
3274     # If you have `file' or equivalent on your system and you're not sure
3275     # whether `pass_all' will *always* work, you probably want this one.
3276    
3277     case $host_os in
3278 db 941 aix[[4-9]]*)
3279 michael 912 lt_cv_deplibs_check_method=pass_all
3280     ;;
3281    
3282     beos*)
3283     lt_cv_deplibs_check_method=pass_all
3284     ;;
3285    
3286     bsdi[[45]]*)
3287     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3288     lt_cv_file_magic_cmd='/usr/bin/file -L'
3289     lt_cv_file_magic_test_file=/shlib/libc.so
3290     ;;
3291    
3292     cygwin*)
3293     # func_win32_libid is a shell function defined in ltmain.sh
3294     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3295     lt_cv_file_magic_cmd='func_win32_libid'
3296     ;;
3297    
3298     mingw* | pw32*)
3299     # Base MSYS/MinGW do not provide the 'file' command needed by
3300     # func_win32_libid shell function, so use a weaker test based on 'objdump',
3301     # unless we find 'file', for example because we are cross-compiling.
3302 michael 1094 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3303     if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3304 michael 912 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3305     lt_cv_file_magic_cmd='func_win32_libid'
3306     else
3307 michael 1094 # Keep this pattern in sync with the one in func_win32_libid.
3308     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3309 michael 912 lt_cv_file_magic_cmd='$OBJDUMP -f'
3310     fi
3311     ;;
3312    
3313 michael 1094 cegcc*)
3314 michael 945 # use the weaker test based on 'objdump'. See mingw*.
3315     lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3316     lt_cv_file_magic_cmd='$OBJDUMP -f'
3317     ;;
3318    
3319 michael 912 darwin* | rhapsody*)
3320     lt_cv_deplibs_check_method=pass_all
3321     ;;
3322    
3323     freebsd* | dragonfly*)
3324 michael 945 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3325 michael 912 case $host_cpu in
3326     i*86 )
3327     # Not sure whether the presence of OpenBSD here was a mistake.
3328     # Let's accept both of them until this is cleared up.
3329     lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3330     lt_cv_file_magic_cmd=/usr/bin/file
3331     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3332     ;;
3333     esac
3334     else
3335     lt_cv_deplibs_check_method=pass_all
3336     fi
3337     ;;
3338    
3339     gnu*)
3340     lt_cv_deplibs_check_method=pass_all
3341     ;;
3342    
3343 michael 1094 haiku*)
3344     lt_cv_deplibs_check_method=pass_all
3345     ;;
3346    
3347 michael 912 hpux10.20* | hpux11*)
3348     lt_cv_file_magic_cmd=/usr/bin/file
3349     case $host_cpu in
3350     ia64*)
3351     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3352     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3353     ;;
3354     hppa*64*)
3355 michael 1094 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3356 michael 912 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3357     ;;
3358     *)
3359 michael 1094 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3360 michael 912 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3361     ;;
3362     esac
3363     ;;
3364    
3365     interix[[3-9]]*)
3366     # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3367     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3368     ;;
3369    
3370     irix5* | irix6* | nonstopux*)
3371     case $LD in
3372     *-32|*"-32 ") libmagic=32-bit;;
3373     *-n32|*"-n32 ") libmagic=N32;;
3374     *-64|*"-64 ") libmagic=64-bit;;
3375     *) libmagic=never-match;;
3376     esac
3377     lt_cv_deplibs_check_method=pass_all
3378     ;;
3379    
3380 michael 1257 # This must be glibc/ELF.
3381 michael 1094 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3382 michael 912 lt_cv_deplibs_check_method=pass_all
3383     ;;
3384    
3385     netbsd*)
3386 michael 945 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3387 michael 912 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3388     else
3389     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3390     fi
3391     ;;
3392    
3393     newos6*)
3394     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3395     lt_cv_file_magic_cmd=/usr/bin/file
3396     lt_cv_file_magic_test_file=/usr/lib/libnls.so
3397     ;;
3398    
3399 michael 945 *nto* | *qnx*)
3400     lt_cv_deplibs_check_method=pass_all
3401 michael 912 ;;
3402    
3403     openbsd*)
3404 michael 945 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3405 michael 912 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3406     else
3407     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3408     fi
3409     ;;
3410    
3411     osf3* | osf4* | osf5*)
3412     lt_cv_deplibs_check_method=pass_all
3413     ;;
3414    
3415     rdos*)
3416     lt_cv_deplibs_check_method=pass_all
3417     ;;
3418    
3419     solaris*)
3420     lt_cv_deplibs_check_method=pass_all
3421     ;;
3422    
3423 michael 945 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3424     lt_cv_deplibs_check_method=pass_all
3425     ;;
3426    
3427 michael 912 sysv4 | sysv4.3*)
3428     case $host_vendor in
3429     motorola)
3430     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3431     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3432     ;;
3433     ncr)
3434     lt_cv_deplibs_check_method=pass_all
3435     ;;
3436     sequent)
3437     lt_cv_file_magic_cmd='/bin/file'
3438     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3439     ;;
3440     sni)
3441     lt_cv_file_magic_cmd='/bin/file'
3442     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3443     lt_cv_file_magic_test_file=/lib/libc.so
3444     ;;
3445     siemens)
3446     lt_cv_deplibs_check_method=pass_all
3447     ;;
3448     pc)
3449     lt_cv_deplibs_check_method=pass_all
3450     ;;
3451     esac
3452     ;;
3453    
3454 michael 945 tpf*)
3455 michael 912 lt_cv_deplibs_check_method=pass_all
3456     ;;
3457     esac
3458     ])
3459 michael 1106
3460     file_magic_glob=
3461     want_nocaseglob=no
3462     if test "$build" = "$host"; then
3463     case $host_os in
3464     mingw* | pw32*)
3465     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3466     want_nocaseglob=yes
3467     else
3468     file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3469     fi
3470     ;;
3471     esac
3472     fi
3473    
3474 michael 912 file_magic_cmd=$lt_cv_file_magic_cmd
3475     deplibs_check_method=$lt_cv_deplibs_check_method
3476     test -z "$deplibs_check_method" && deplibs_check_method=unknown
3477    
3478 michael 945 _LT_DECL([], [deplibs_check_method], [1],
3479     [Method to check whether dependent libraries are shared objects])
3480     _LT_DECL([], [file_magic_cmd], [1],
3481 michael 1106 [Command to use when deplibs_check_method = "file_magic"])
3482     _LT_DECL([], [file_magic_glob], [1],
3483     [How to find potential files when deplibs_check_method = "file_magic"])
3484     _LT_DECL([], [want_nocaseglob], [1],
3485     [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3486 michael 945 ])# _LT_CHECK_MAGIC_METHOD
3487 michael 912
3488 michael 945
3489     # LT_PATH_NM
3490 michael 912 # ----------
3491 michael 945 # find the pathname to a BSD- or MS-compatible name lister
3492     AC_DEFUN([LT_PATH_NM],
3493     [AC_REQUIRE([AC_PROG_CC])dnl
3494     AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3495 michael 912 [if test -n "$NM"; then
3496     # Let the user override the test.
3497     lt_cv_path_NM="$NM"
3498     else
3499     lt_nm_to_check="${ac_tool_prefix}nm"
3500     if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3501     lt_nm_to_check="$lt_nm_to_check nm"
3502     fi
3503     for lt_tmp_nm in $lt_nm_to_check; do
3504     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3505     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3506     IFS="$lt_save_ifs"
3507     test -z "$ac_dir" && ac_dir=.
3508     tmp_nm="$ac_dir/$lt_tmp_nm"
3509     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3510     # Check to see if the nm accepts a BSD-compat flag.
3511     # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3512     # nm: unknown option "B" ignored
3513     # Tru64's nm complains that /dev/null is an invalid object file
3514     case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3515     */dev/null* | *'Invalid file or object type'*)
3516     lt_cv_path_NM="$tmp_nm -B"
3517     break
3518     ;;
3519     *)
3520     case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3521     */dev/null*)
3522     lt_cv_path_NM="$tmp_nm -p"
3523     break
3524     ;;
3525     *)
3526     lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3527     continue # so that we can try to find one that supports BSD flags
3528     ;;
3529     esac
3530     ;;
3531     esac
3532     fi
3533     done
3534     IFS="$lt_save_ifs"
3535     done
3536 michael 945 : ${lt_cv_path_NM=no}
3537 michael 912 fi])
3538 michael 945 if test "$lt_cv_path_NM" != "no"; then
3539     NM="$lt_cv_path_NM"
3540     else
3541     # Didn't find any BSD compatible name lister, look for dumpbin.
3542 michael 1094 if test -n "$DUMPBIN"; then :
3543     # Let the user override the test.
3544     else
3545     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3546     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3547     *COFF*)
3548     DUMPBIN="$DUMPBIN -symbols"
3549     ;;
3550     *)
3551     DUMPBIN=:
3552     ;;
3553     esac
3554     fi
3555 michael 945 AC_SUBST([DUMPBIN])
3556     if test "$DUMPBIN" != ":"; then
3557     NM="$DUMPBIN"
3558     fi
3559     fi
3560     test -z "$NM" && NM=nm
3561     AC_SUBST([NM])
3562     _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3563 michael 912
3564 michael 945 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3565     [lt_cv_nm_interface="BSD nm"
3566     echo "int some_variable = 0;" > conftest.$ac_ext
3567 michael 1094 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3568 michael 945 (eval "$ac_compile" 2>conftest.err)
3569     cat conftest.err >&AS_MESSAGE_LOG_FD
3570 michael 1094 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3571 michael 945 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3572     cat conftest.err >&AS_MESSAGE_LOG_FD
3573 michael 1094 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3574 michael 945 cat conftest.out >&AS_MESSAGE_LOG_FD
3575     if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3576     lt_cv_nm_interface="MS dumpbin"
3577     fi
3578     rm -f conftest*])
3579     ])# LT_PATH_NM
3580 michael 912
3581 michael 945 # Old names:
3582     AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3583     AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3584     dnl aclocal-1.4 backwards compatibility:
3585     dnl AC_DEFUN([AM_PROG_NM], [])
3586     dnl AC_DEFUN([AC_PROG_NM], [])
3587    
3588 michael 1106 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3589     # --------------------------------
3590     # how to determine the name of the shared library
3591     # associated with a specific link library.
3592     # -- PORTME fill in with the dynamic library characteristics
3593     m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3594     [m4_require([_LT_DECL_EGREP])
3595     m4_require([_LT_DECL_OBJDUMP])
3596     m4_require([_LT_DECL_DLLTOOL])
3597     AC_CACHE_CHECK([how to associate runtime and link libraries],
3598     lt_cv_sharedlib_from_linklib_cmd,
3599     [lt_cv_sharedlib_from_linklib_cmd='unknown'
3600 michael 945
3601 michael 1106 case $host_os in
3602     cygwin* | mingw* | pw32* | cegcc*)
3603     # two different shell functions defined in ltmain.sh
3604     # decide which to use based on capabilities of $DLLTOOL
3605     case `$DLLTOOL --help 2>&1` in
3606     *--identify-strict*)
3607     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3608     ;;
3609     *)
3610     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3611     ;;
3612     esac
3613     ;;
3614     *)
3615     # fallback: assume linklib IS sharedlib
3616     lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3617     ;;
3618     esac
3619     ])
3620     sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3621     test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3622    
3623     _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3624     [Command to associate shared and link libraries])
3625     ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3626    
3627    
3628     # _LT_PATH_MANIFEST_TOOL
3629     # ----------------------
3630     # locate the manifest tool
3631     m4_defun([_LT_PATH_MANIFEST_TOOL],
3632     [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3633     test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3634     AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3635     [lt_cv_path_mainfest_tool=no
3636     echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3637     $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3638     cat conftest.err >&AS_MESSAGE_LOG_FD
3639     if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3640     lt_cv_path_mainfest_tool=yes
3641     fi
3642     rm -f conftest*])
3643     if test "x$lt_cv_path_mainfest_tool" != xyes; then
3644     MANIFEST_TOOL=:
3645     fi
3646     _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3647     ])# _LT_PATH_MANIFEST_TOOL
3648    
3649    
3650 michael 945 # LT_LIB_M
3651     # --------
3652 michael 912 # check for math library
3653 michael 945 AC_DEFUN([LT_LIB_M],
3654 michael 912 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3655     LIBM=
3656     case $host in
3657 michael 1094 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3658 michael 912 # These system don't have libm, or don't need it
3659     ;;
3660     *-ncr-sysv4.3*)
3661     AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3662     AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3663     ;;
3664     *)
3665     AC_CHECK_LIB(m, cos, LIBM="-lm")
3666     ;;
3667     esac
3668 michael 945 AC_SUBST([LIBM])
3669     ])# LT_LIB_M
3670 michael 912
3671 michael 945 # Old name:
3672     AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3673     dnl aclocal-1.4 backwards compatibility:
3674     dnl AC_DEFUN([AC_CHECK_LIBM], [])
3675 michael 912
3676    
3677 michael 945 # _LT_COMPILER_NO_RTTI([TAGNAME])
3678     # -------------------------------
3679     m4_defun([_LT_COMPILER_NO_RTTI],
3680     [m4_require([_LT_TAG_COMPILER])dnl
3681 michael 912
3682 michael 945 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3683 michael 912
3684     if test "$GCC" = yes; then
3685 michael 1094 case $cc_basename in
3686     nvcc*)
3687     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3688     *)
3689     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3690     esac
3691 michael 912
3692 michael 945 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3693 michael 912 lt_cv_prog_compiler_rtti_exceptions,
3694     [-fno-rtti -fno-exceptions], [],
3695 michael 945 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3696 michael 912 fi
3697 michael 945 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3698     [Compiler flag to turn off builtin functions])
3699     ])# _LT_COMPILER_NO_RTTI
3700 michael 912
3701    
3702 michael 945 # _LT_CMD_GLOBAL_SYMBOLS
3703     # ----------------------
3704     m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3705     [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3706     AC_REQUIRE([AC_PROG_CC])dnl
3707 michael 1094 AC_REQUIRE([AC_PROG_AWK])dnl
3708 michael 945 AC_REQUIRE([LT_PATH_NM])dnl
3709     AC_REQUIRE([LT_PATH_LD])dnl
3710     m4_require([_LT_DECL_SED])dnl
3711     m4_require([_LT_DECL_EGREP])dnl
3712     m4_require([_LT_TAG_COMPILER])dnl
3713    
3714 michael 912 # Check for command to grab the raw symbol name followed by C symbol from nm.
3715     AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3716     AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3717     [
3718     # These are sane defaults that work on at least a few old systems.
3719     # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3720    
3721     # Character class describing NM global symbol codes.
3722     symcode='[[BCDEGRST]]'
3723    
3724     # Regexp to match symbols that can be accessed directly from C.
3725     sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3726    
3727     # Define system-specific variables.
3728     case $host_os in
3729     aix*)
3730     symcode='[[BCDT]]'
3731     ;;
3732 michael 945 cygwin* | mingw* | pw32* | cegcc*)
3733 michael 912 symcode='[[ABCDGISTW]]'
3734     ;;
3735 michael 945 hpux*)
3736 michael 912 if test "$host_cpu" = ia64; then
3737     symcode='[[ABCDEGRST]]'
3738     fi
3739     ;;
3740     irix* | nonstopux*)
3741     symcode='[[BCDEGRST]]'
3742     ;;
3743     osf*)
3744     symcode='[[BCDEGQRST]]'
3745     ;;
3746     solaris*)
3747     symcode='[[BDRT]]'
3748     ;;
3749     sco3.2v5*)
3750     symcode='[[DT]]'
3751     ;;
3752     sysv4.2uw2*)
3753     symcode='[[DT]]'
3754     ;;
3755     sysv5* | sco5v6* | unixware* | OpenUNIX*)
3756     symcode='[[ABDT]]'
3757     ;;
3758     sysv4)
3759     symcode='[[DFNSTU]]'
3760     ;;
3761     esac
3762    
3763 michael 945 # If we're using GNU nm, then use its standard symbol codes.
3764     case `$NM -V 2>&1` in
3765     *GNU* | *'with BFD'*)
3766     symcode='[[ABCDGIRSTW]]' ;;
3767     esac
3768    
3769     # Transform an extracted symbol line into a proper C declaration.
3770     # Some systems (esp. on ia64) link data and code symbols differently,
3771     # so use this general approach.
3772     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3773    
3774     # Transform an extracted symbol line into symbol name and symbol address
3775 michael 1106 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3776     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'"
3777 michael 945
3778 michael 912 # Handle CRLF in mingw tool chain
3779     opt_cr=
3780     case $build_os in
3781     mingw*)
3782 michael 945 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3783 michael 912 ;;
3784     esac
3785    
3786 michael 945 # Try without a prefix underscore, then with it.
3787 michael 912 for ac_symprfx in "" "_"; do
3788    
3789     # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3790     symxfrm="\\1 $ac_symprfx\\2 \\2"
3791    
3792     # Write the raw and C identifiers.
3793 michael 945 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3794     # Fake it for dumpbin and say T for any non-static function
3795     # and D for any global variable.
3796     # Also find C++ and __fastcall symbols from MSVC++,
3797     # which start with @ or ?.
3798     lt_cv_sys_global_symbol_pipe="$AWK ['"\
3799     " {last_section=section; section=\$ 3};"\
3800 michael 1257 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
3801 michael 945 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3802     " \$ 0!~/External *\|/{next};"\
3803     " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3804     " {if(hide[section]) next};"\
3805     " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3806     " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3807     " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3808     " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3809     " ' prfx=^$ac_symprfx]"
3810     else
3811     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3812     fi
3813 michael 1106 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3814 michael 912
3815     # Check to see that the pipe works correctly.
3816     pipe_works=no
3817    
3818     rm -f conftest*
3819 michael 945 cat > conftest.$ac_ext <<_LT_EOF
3820 michael 912 #ifdef __cplusplus
3821     extern "C" {
3822     #endif
3823     char nm_test_var;
3824 michael 945 void nm_test_func(void);
3825     void nm_test_func(void){}
3826 michael 912 #ifdef __cplusplus
3827     }
3828     #endif
3829     int main(){nm_test_var='a';nm_test_func();return(0);}
3830 michael 945 _LT_EOF
3831 michael 912
3832     if AC_TRY_EVAL(ac_compile); then
3833     # Now try to grab the symbols.
3834     nlist=conftest.nm
3835 michael 1094 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3836 michael 912 # Try sorting and uniquifying the output.
3837     if sort "$nlist" | uniq > "$nlist"T; then
3838     mv -f "$nlist"T "$nlist"
3839     else
3840     rm -f "$nlist"T
3841     fi
3842    
3843     # Make sure that we snagged all the symbols we need.
3844 michael 945 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3845     if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3846     cat <<_LT_EOF > conftest.$ac_ext
3847 michael 1106 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3848     #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3849     /* DATA imports from DLLs on WIN32 con't be const, because runtime
3850     relocations are performed -- see ld's documentation on pseudo-relocs. */
3851     # define LT@&t@_DLSYM_CONST
3852     #elif defined(__osf__)
3853     /* This system does not cope well with relocations in const data. */
3854     # define LT@&t@_DLSYM_CONST
3855     #else
3856     # define LT@&t@_DLSYM_CONST const
3857     #endif
3858    
3859 michael 912 #ifdef __cplusplus
3860     extern "C" {
3861     #endif
3862    
3863 michael 945 _LT_EOF
3864 michael 912 # Now generate the symbol file.
3865 michael 945 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3866 michael 912
3867 michael 945 cat <<_LT_EOF >> conftest.$ac_ext
3868 michael 912
3869 michael 945 /* The mapping between symbol names and symbols. */
3870 michael 1106 LT@&t@_DLSYM_CONST struct {
3871 michael 912 const char *name;
3872 michael 945 void *address;
3873 michael 912 }
3874 michael 945 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3875 michael 912 {
3876 michael 945 { "@PROGRAM@", (void *) 0 },
3877     _LT_EOF
3878     $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3879     cat <<\_LT_EOF >> conftest.$ac_ext
3880     {0, (void *) 0}
3881 michael 912 };
3882    
3883 michael 945 /* This works around a problem in FreeBSD linker */
3884     #ifdef FREEBSD_WORKAROUND
3885     static const void *lt_preloaded_setup() {
3886     return lt__PROGRAM__LTX_preloaded_symbols;
3887     }
3888     #endif
3889    
3890 michael 912 #ifdef __cplusplus
3891     }
3892     #endif
3893 michael 945 _LT_EOF
3894 michael 912 # Now try linking the two files.
3895     mv conftest.$ac_objext conftstm.$ac_objext
3896 michael 1106 lt_globsym_save_LIBS=$LIBS
3897     lt_globsym_save_CFLAGS=$CFLAGS
3898 michael 912 LIBS="conftstm.$ac_objext"
3899 michael 945 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3900 michael 912 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3901     pipe_works=yes
3902     fi
3903 michael 1106 LIBS=$lt_globsym_save_LIBS
3904     CFLAGS=$lt_globsym_save_CFLAGS
3905 michael 912 else
3906     echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3907     fi
3908     else
3909     echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3910     fi
3911     else
3912     echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3913     fi
3914     else
3915     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3916     cat conftest.$ac_ext >&5
3917     fi
3918 db 941 rm -rf conftest* conftst*
3919 michael 912
3920     # Do not use the global_symbol_pipe unless it works.
3921     if test "$pipe_works" = yes; then
3922     break
3923     else
3924     lt_cv_sys_global_symbol_pipe=
3925     fi
3926     done
3927     ])
3928     if test -z "$lt_cv_sys_global_symbol_pipe"; then
3929     lt_cv_sys_global_symbol_to_cdecl=
3930     fi
3931     if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3932     AC_MSG_RESULT(failed)
3933     else
3934     AC_MSG_RESULT(ok)
3935     fi
3936    
3937 michael 1106 # Response file support.
3938     if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3939     nm_file_list_spec='@'
3940     elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3941     nm_file_list_spec='@'
3942     fi
3943    
3944 michael 945 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3945     [Take the output of nm and produce a listing of raw symbols and C names])
3946     _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3947     [Transform the output of nm in a proper C declaration])
3948     _LT_DECL([global_symbol_to_c_name_address],
3949     [lt_cv_sys_global_symbol_to_c_name_address], [1],
3950     [Transform the output of nm in a C name address pair])
3951     _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3952     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3953     [Transform the output of nm in a C name address pair when lib prefix is needed])
3954 michael 1106 _LT_DECL([], [nm_file_list_spec], [1],
3955     [Specify filename containing input files for $NM])
3956 michael 945 ]) # _LT_CMD_GLOBAL_SYMBOLS
3957 michael 912
3958    
3959 michael 945 # _LT_COMPILER_PIC([TAGNAME])
3960     # ---------------------------
3961     m4_defun([_LT_COMPILER_PIC],
3962     [m4_require([_LT_TAG_COMPILER])dnl
3963     _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3964     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3965     _LT_TAGVAR(lt_prog_compiler_static, $1)=
3966    
3967     m4_if([$1], [CXX], [
3968 michael 912 # C++ specific cases for pic, static, wl, etc.
3969     if test "$GXX" = yes; then
3970 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3971     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3972 michael 912
3973     case $host_os in
3974     aix*)
3975     # All AIX code is PIC.
3976     if test "$host_cpu" = ia64; then
3977     # AIX 5 now supports IA64 processor
3978 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3979 michael 912 fi
3980     ;;
3981 michael 945
3982 michael 912 amigaos*)
3983 michael 945 case $host_cpu in
3984     powerpc)
3985     # see comment about AmigaOS4 .so support
3986     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3987     ;;
3988     m68k)
3989     # FIXME: we need at least 68020 code to build shared libraries, but
3990     # adding the `-m68020' flag to GCC prevents building anything better,
3991     # like `-m68040'.
3992     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3993     ;;
3994     esac
3995 michael 912 ;;
3996 michael 945
3997 michael 912 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3998     # PIC is the default for these OSes.
3999     ;;
4000 michael 945 mingw* | cygwin* | os2* | pw32* | cegcc*)
4001 michael 912 # This hack is so that the source file can tell whether it is being
4002     # built for inclusion in a dll (and should export symbols for example).
4003     # Although the cygwin gcc ignores -fPIC, still need this for old-style
4004     # (--disable-auto-import) libraries
4005 db 941 m4_if([$1], [GCJ], [],
4006 michael 945 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4007 michael 912 ;;
4008     darwin* | rhapsody*)
4009     # PIC is the default on this platform
4010     # Common symbols not allowed in MH_DYLIB files
4011 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4012 michael 912 ;;
4013     *djgpp*)
4014     # DJGPP does not support shared libraries at all
4015 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4016 michael 912 ;;
4017 michael 1094 haiku*)
4018     # PIC is the default for Haiku.
4019     # The "-static" flag exists, but is broken.
4020     _LT_TAGVAR(lt_prog_compiler_static, $1)=
4021     ;;
4022 michael 912 interix[[3-9]]*)
4023     # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4024     # Instead, we relocate shared libraries at runtime.
4025     ;;
4026     sysv4*MP*)
4027     if test -d /usr/nec; then
4028 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4029 michael 912 fi
4030     ;;
4031     hpux*)
4032 michael 945 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4033     # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4034     # sets the default TLS model and affects inlining.
4035 michael 912 case $host_cpu in
4036 michael 945 hppa*64*)
4037 michael 912 ;;
4038     *)
4039 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4040 michael 912 ;;
4041     esac
4042     ;;
4043 michael 945 *qnx* | *nto*)
4044     # QNX uses GNU C++, but need to define -shared option too, otherwise
4045     # it will coredump.
4046     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4047     ;;
4048 michael 912 *)
4049 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4050 michael 912 ;;
4051     esac
4052     else
4053     case $host_os in
4054 db 941 aix[[4-9]]*)
4055 michael 912 # All AIX code is PIC.
4056     if test "$host_cpu" = ia64; then
4057     # AIX 5 now supports IA64 processor
4058 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4059 michael 912 else
4060 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4061 michael 912 fi
4062     ;;
4063     chorus*)
4064     case $cc_basename in
4065     cxch68*)
4066     # Green Hills C++ Compiler
4067 michael 945 # _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"
4068 michael 912 ;;
4069     esac
4070     ;;
4071 michael 1106 mingw* | cygwin* | os2* | pw32* | cegcc*)
4072     # This hack is so that the source file can tell whether it is being
4073     # built for inclusion in a dll (and should export symbols for example).
4074     m4_if([$1], [GCJ], [],
4075     [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4076     ;;
4077 michael 912 dgux*)
4078     case $cc_basename in
4079     ec++*)
4080 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4081 michael 912 ;;
4082     ghcx*)
4083     # Green Hills C++ Compiler
4084 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4085 michael 912 ;;
4086     *)
4087     ;;
4088     esac
4089     ;;
4090     freebsd* | dragonfly*)
4091     # FreeBSD uses GNU C++
4092     ;;
4093     hpux9* | hpux10* | hpux11*)
4094     case $cc_basename in
4095     CC*)
4096 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4097     _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4098 michael 912 if test "$host_cpu" != ia64; then
4099 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4100 michael 912 fi
4101     ;;
4102     aCC*)
4103 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4104     _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4105 michael 912 case $host_cpu in
4106     hppa*64*|ia64*)
4107     # +Z the default
4108     ;;
4109     *)
4110 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4111 michael 912 ;;
4112     esac
4113     ;;
4114     *)
4115     ;;
4116     esac
4117     ;;
4118     interix*)
4119     # This is c89, which is MS Visual C++ (no shared libs)
4120     # Anyone wants to do a port?
4121     ;;
4122     irix5* | irix6* | nonstopux*)
4123     case $cc_basename in
4124     CC*)
4125 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4126     _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4127 michael 912 # CC pic flag -KPIC is the default.
4128     ;;
4129     *)
4130     ;;
4131     esac
4132     ;;
4133 michael 1094 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4134 michael 912 case $cc_basename in
4135     KCC*)
4136     # KAI C++ Compiler
4137 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4138     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4139 michael 912 ;;
4140 michael 945 ecpc* )
4141     # old Intel C++ for x86_64 which still supported -KPIC.
4142     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4143     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4144     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4145 michael 912 ;;
4146 michael 945 icpc* )
4147     # Intel C++, used to be incompatible with GCC.
4148     # ICC 10 doesn't accept -KPIC any more.
4149     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4150     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4151     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4152     ;;
4153 db 941 pgCC* | pgcpp*)
4154 michael 945 # Portland Group C++ compiler
4155     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4156     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4157     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4158 michael 912 ;;
4159     cxx*)
4160     # Compaq C++
4161     # Make sure the PIC flag is empty. It appears that all Alpha
4162     # Linux and Compaq Tru64 Unix objects are PIC.
4163 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4164     _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4165 michael 912 ;;
4166 michael 1094 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4167     # IBM XL 8.0, 9.0 on PPC and BlueGene
4168 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4169     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4170     _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4171     ;;
4172 michael 912 *)
4173     case `$CC -V 2>&1 | sed 5q` in
4174     *Sun\ C*)
4175     # Sun C++ 5.9
4176 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4177     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4178     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4179 michael 912 ;;
4180     esac
4181     ;;
4182     esac
4183     ;;
4184     lynxos*)
4185     ;;
4186     m88k*)
4187     ;;
4188     mvs*)
4189     case $cc_basename in
4190     cxx*)
4191 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4192 michael 912 ;;
4193     *)
4194     ;;
4195     esac
4196     ;;
4197     netbsd*)
4198     ;;
4199 michael 945 *qnx* | *nto*)
4200     # QNX uses GNU C++, but need to define -shared option too, otherwise
4201     # it will coredump.
4202     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4203     ;;
4204 michael 912 osf3* | osf4* | osf5*)
4205     case $cc_basename in
4206     KCC*)
4207 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4208 michael 912 ;;
4209     RCC*)
4210     # Rational C++ 2.4.1
4211 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4212 michael 912 ;;
4213     cxx*)
4214     # Digital/Compaq C++
4215 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4216 michael 912 # Make sure the PIC flag is empty. It appears that all Alpha
4217     # Linux and Compaq Tru64 Unix objects are PIC.
4218 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4219     _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4220 michael 912 ;;
4221     *)
4222     ;;
4223     esac
4224     ;;
4225     psos*)
4226     ;;
4227     solaris*)
4228     case $cc_basename in
4229 michael 1094 CC* | sunCC*)
4230 michael 912 # Sun C++ 4.2, 5.x and Centerline C++
4231 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4232     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4233     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4234 michael 912 ;;
4235     gcx*)
4236     # Green Hills C++ Compiler
4237 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4238 michael 912 ;;
4239     *)
4240     ;;
4241     esac
4242     ;;
4243     sunos4*)
4244     case $cc_basename in
4245     CC*)
4246     # Sun C++ 4.x
4247 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4248     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4249 michael 912 ;;
4250     lcc*)
4251     # Lucid
4252 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4253 michael 912 ;;
4254     *)
4255     ;;
4256     esac
4257     ;;
4258 michael 945 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4259     case $cc_basename in
4260     CC*)
4261     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4262     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4263     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4264     ;;
4265     esac
4266     ;;
4267 michael 912 tandem*)
4268     case $cc_basename in
4269     NCC*)
4270     # NonStop-UX NCC 3.20
4271 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4272 michael 912 ;;
4273     *)
4274     ;;
4275     esac
4276     ;;
4277     vxworks*)
4278     ;;
4279     *)
4280 michael 945 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4281 michael 912 ;;
4282     esac
4283     fi
4284     ],
4285     [
4286     if test "$GCC" = yes; then
4287 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4288     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4289 michael 912
4290     case $host_os in
4291     aix*)
4292     # All AIX code is PIC.
4293     if test "$host_cpu" = ia64; then
4294     # AIX 5 now supports IA64 processor
4295 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4296 michael 912 fi
4297     ;;
4298    
4299     amigaos*)
4300 michael 945 case $host_cpu in
4301     powerpc)
4302     # see comment about AmigaOS4 .so support
4303     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4304     ;;
4305     m68k)
4306     # FIXME: we need at least 68020 code to build shared libraries, but
4307     # adding the `-m68020' flag to GCC prevents building anything better,
4308     # like `-m68040'.
4309     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4310     ;;
4311     esac
4312 michael 912 ;;
4313    
4314     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4315     # PIC is the default for these OSes.
4316     ;;
4317    
4318 michael 945 mingw* | cygwin* | pw32* | os2* | cegcc*)
4319 michael 912 # This hack is so that the source file can tell whether it is being
4320     # built for inclusion in a dll (and should export symbols for example).
4321     # Although the cygwin gcc ignores -fPIC, still need this for old-style
4322     # (--disable-auto-import) libraries
4323 db 941 m4_if([$1], [GCJ], [],
4324 michael 945 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4325 michael 912 ;;
4326    
4327     darwin* | rhapsody*)
4328     # PIC is the default on this platform
4329     # Common symbols not allowed in MH_DYLIB files
4330 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4331 michael 912 ;;
4332    
4333 michael 1094 haiku*)
4334     # PIC is the default for Haiku.
4335     # The "-static" flag exists, but is broken.
4336     _LT_TAGVAR(lt_prog_compiler_static, $1)=
4337     ;;
4338    
4339 michael 945 hpux*)
4340     # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4341     # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4342     # sets the default TLS model and affects inlining.
4343     case $host_cpu in
4344     hppa*64*)
4345     # +Z the default
4346     ;;
4347     *)
4348     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4349     ;;
4350     esac
4351     ;;
4352    
4353 michael 912 interix[[3-9]]*)
4354     # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4355     # Instead, we relocate shared libraries at runtime.
4356     ;;
4357    
4358     msdosdjgpp*)
4359     # Just because we use GCC doesn't mean we suddenly get shared libraries
4360     # on systems that don't support them.
4361 michael 945 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4362 michael 912 enable_shared=no
4363     ;;
4364    
4365 michael 945 *nto* | *qnx*)
4366     # QNX uses GNU C++, but need to define -shared option too, otherwise
4367     # it will coredump.
4368     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4369     ;;
4370    
4371 michael 912 sysv4*MP*)
4372     if test -d /usr/nec; then
4373 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4374 michael 912 fi
4375     ;;
4376    
4377     *)
4378 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4379 michael 912 ;;
4380     esac
4381 michael 1094
4382     case $cc_basename in
4383     nvcc*) # Cuda Compiler Driver 2.2
4384     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4385 michael 1257 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4386     _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4387     fi
4388 michael 1094 ;;
4389     esac
4390 michael 912 else
4391     # PORTME Check for flag to pass linker flags through the system compiler.
4392     case $host_os in
4393     aix*)
4394 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4395 michael 912 if test "$host_cpu" = ia64; then
4396     # AIX 5 now supports IA64 processor
4397 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4398 michael 912 else
4399 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4400 michael 912 fi
4401     ;;
4402    
4403 michael 945 mingw* | cygwin* | pw32* | os2* | cegcc*)
4404 michael 912 # This hack is so that the source file can tell whether it is being
4405     # built for inclusion in a dll (and should export symbols for example).
4406 db 941 m4_if([$1], [GCJ], [],
4407 michael 945 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4408 michael 912 ;;
4409    
4410     hpux9* | hpux10* | hpux11*)
4411 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4412 michael 912 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4413     # not for PA HP-UX.
4414     case $host_cpu in
4415     hppa*64*|ia64*)
4416     # +Z the default
4417     ;;
4418     *)
4419 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4420 michael 912 ;;
4421     esac
4422     # Is there a better lt_prog_compiler_static that works with the bundled CC?
4423 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4424 michael 912 ;;
4425    
4426     irix5* | irix6* | nonstopux*)
4427 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4428 michael 912 # PIC (with -KPIC) is the default.
4429 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4430 michael 912 ;;
4431    
4432 michael 1094 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4433 michael 912 case $cc_basename in
4434 michael 945 # old Intel for x86_64 which still supported -KPIC.
4435     ecc*)
4436     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4437     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4438     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4439 michael 912 ;;
4440 michael 945 # icc used to be incompatible with GCC.
4441     # ICC 10 doesn't accept -KPIC any more.
4442     icc* | ifort*)
4443     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4444     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4445     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4446     ;;
4447     # Lahey Fortran 8.1.
4448     lf95*)
4449     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4450     _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4451     _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4452     ;;
4453 michael 1106 nagfor*)
4454     # NAG Fortran compiler
4455     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4456     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4457     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4458     ;;
4459 michael 1094 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4460 michael 912 # Portland Group compilers (*not* the Pentium gcc compiler,
4461     # which looks to be a dead project)
4462 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4463     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4464     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4465 michael 912 ;;
4466     ccc*)
4467 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4468 michael 912 # All Alpha code is PIC.
4469 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4470 michael 912 ;;
4471 michael 1094 xl* | bgxl* | bgf* | mpixl*)
4472     # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4473 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4474     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4475     _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4476     ;;
4477 michael 912 *)
4478 michael 945 case `$CC -V 2>&1 | sed 5q` in
4479 michael 1257 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4480 michael 1094 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4481     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4482     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4483     _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4484     ;;
4485 michael 1257 *Sun\ F* | *Sun*Fortran*)
4486     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4487     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4488     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4489     ;;
4490 michael 912 *Sun\ C*)
4491     # Sun C 5.9
4492 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4493     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4494     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4495 michael 912 ;;
4496 michael 1257 *Intel*\ [[CF]]*Compiler*)
4497     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4498     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4499     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4500     ;;
4501     *Portland\ Group*)
4502     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4503     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4504     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4505     ;;
4506 michael 912 esac
4507     ;;
4508     esac
4509     ;;
4510    
4511 michael 945 newsos6)
4512     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4513     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4514     ;;
4515    
4516     *nto* | *qnx*)
4517     # QNX uses GNU C++, but need to define -shared option too, otherwise
4518     # it will coredump.
4519     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4520     ;;
4521    
4522 michael 912 osf3* | osf4* | osf5*)
4523 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4524 michael 912 # All OSF/1 code is PIC.
4525 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4526 michael 912 ;;
4527    
4528     rdos*)
4529 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4530 michael 912 ;;
4531    
4532     solaris*)
4533 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4534     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4535 michael 912 case $cc_basename in
4536 michael 1094 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4537 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4538 michael 912 *)
4539 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4540 michael 912 esac
4541     ;;
4542    
4543     sunos4*)
4544 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4545     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4546     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4547 michael 912 ;;
4548    
4549     sysv4 | sysv4.2uw2* | sysv4.3*)
4550 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4551     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4552     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4553 michael 912 ;;
4554    
4555     sysv4*MP*)
4556     if test -d /usr/nec ;then
4557 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4558     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4559 michael 912 fi
4560     ;;
4561    
4562     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4563 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4564     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4565     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4566 michael 912 ;;
4567    
4568     unicos*)
4569 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4570     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4571 michael 912 ;;
4572    
4573     uts4*)
4574 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4575     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4576 michael 912 ;;
4577    
4578     *)
4579 michael 945 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4580 michael 912 ;;
4581     esac
4582     fi
4583     ])
4584     case $host_os in
4585     # For platforms which do not support PIC, -DPIC is meaningless:
4586     *djgpp*)
4587 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4588 michael 912 ;;
4589     *)
4590 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4591 michael 912 ;;
4592     esac
4593    
4594 michael 1106 AC_CACHE_CHECK([for $compiler option to produce PIC],
4595     [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4596     [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4597     _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4598    
4599 michael 912 #
4600 michael 945 # Check to make sure the PIC flag actually works.
4601     #
4602     if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4603     _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4604     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4605     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4606     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4607     "" | " "*) ;;
4608     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4609     esac],
4610     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4611     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4612     fi
4613     _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4614     [Additional compiler flags for building library objects])
4615    
4616 michael 1106 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4617     [How to pass a linker flag through the compiler])
4618 michael 945 #
4619 michael 912 # Check to make sure the static flag actually works.
4620     #
4621 michael 945 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4622     _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4623     _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4624 michael 912 $lt_tmp_static_flag,
4625     [],
4626 michael 945 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4627     _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4628     [Compiler flag to prevent dynamic linking])
4629     ])# _LT_COMPILER_PIC
4630 michael 912
4631    
4632 michael 945 # _LT_LINKER_SHLIBS([TAGNAME])
4633     # ----------------------------
4634 michael 912 # See if the linker supports building shared libraries.
4635 michael 945 m4_defun([_LT_LINKER_SHLIBS],
4636     [AC_REQUIRE([LT_PATH_LD])dnl
4637     AC_REQUIRE([LT_PATH_NM])dnl
4638 michael 1106 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4639 michael 945 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4640     m4_require([_LT_DECL_EGREP])dnl
4641     m4_require([_LT_DECL_SED])dnl
4642     m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4643     m4_require([_LT_TAG_COMPILER])dnl
4644 michael 912 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4645 michael 945 m4_if([$1], [CXX], [
4646     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4647 michael 1106 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4648 michael 912 case $host_os in
4649 db 941 aix[[4-9]]*)
4650 michael 912 # If we're using GNU nm, then we don't want the "-C" option.
4651     # -C means demangle to AIX nm, but means don't demangle with GNU nm
4652 michael 1094 # Also, AIX nm treats weak defined symbols like other global defined
4653     # symbols, whereas GNU nm marks them as "W".
4654 michael 945 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4655 michael 1094 _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'
4656 michael 912 else
4657 michael 945 _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'
4658 michael 912 fi
4659     ;;
4660     pw32*)
4661 michael 945 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4662 michael 1106 ;;
4663 michael 945 cygwin* | mingw* | cegcc*)
4664 michael 1106 case $cc_basename in
4665 michael 1257 cl*)
4666     _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4667     ;;
4668 michael 1106 *)
4669     _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'
4670     _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4671     ;;
4672     esac
4673     ;;
4674 michael 912 *)
4675 michael 945 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4676 michael 1106 ;;
4677 michael 912 esac
4678 michael 945 ], [
4679 michael 912 runpath_var=
4680 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)=
4681     _LT_TAGVAR(always_export_symbols, $1)=no
4682     _LT_TAGVAR(archive_cmds, $1)=
4683     _LT_TAGVAR(archive_expsym_cmds, $1)=
4684     _LT_TAGVAR(compiler_needs_object, $1)=no
4685     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4686     _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4687     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4688     _LT_TAGVAR(hardcode_automatic, $1)=no
4689     _LT_TAGVAR(hardcode_direct, $1)=no
4690     _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4691     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4692     _LT_TAGVAR(hardcode_libdir_separator, $1)=
4693     _LT_TAGVAR(hardcode_minus_L, $1)=no
4694     _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4695     _LT_TAGVAR(inherit_rpath, $1)=no
4696     _LT_TAGVAR(link_all_deplibs, $1)=unknown
4697     _LT_TAGVAR(module_cmds, $1)=
4698     _LT_TAGVAR(module_expsym_cmds, $1)=
4699     _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4700     _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4701     _LT_TAGVAR(thread_safe_flag_spec, $1)=
4702     _LT_TAGVAR(whole_archive_flag_spec, $1)=
4703 michael 912 # include_expsyms should be a list of space-separated symbols to be *always*
4704     # included in the symbol list
4705 michael 945 _LT_TAGVAR(include_expsyms, $1)=
4706 michael 912 # exclude_expsyms can be an extended regexp of symbols to exclude
4707     # it will be wrapped by ` (' and `)$', so one must not match beginning or
4708     # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4709     # as well as any symbol that contains `d'.
4710 michael 945 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4711 michael 912 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4712     # platforms (ab)use it in PIC code, but their linkers get confused if
4713     # the symbol is explicitly referenced. Since portable code cannot
4714     # rely on this symbol name, it's probably fine to never include it in
4715     # preloaded symbol tables.
4716 db 941 # Exclude shared library initialization/finalization symbols.
4717     dnl Note also adjust exclude_expsyms for C++ above.
4718 michael 912 extract_expsyms_cmds=
4719 michael 945
4720 michael 912 case $host_os in
4721 michael 945 cygwin* | mingw* | pw32* | cegcc*)
4722 michael 912 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4723     # When not using gcc, we currently assume that we are using
4724     # Microsoft Visual C++.
4725     if test "$GCC" != yes; then
4726     with_gnu_ld=no
4727     fi
4728     ;;
4729     interix*)
4730     # we just hope/assume this is gcc and not c89 (= MSVC++)
4731     with_gnu_ld=yes
4732     ;;
4733     openbsd*)
4734     with_gnu_ld=no
4735     ;;
4736     esac
4737    
4738 michael 945 _LT_TAGVAR(ld_shlibs, $1)=yes
4739 michael 1094
4740     # On some targets, GNU ld is compatible enough with the native linker
4741     # that we're better off using the native interface for both.
4742     lt_use_gnu_ld_interface=no
4743 michael 912 if test "$with_gnu_ld" = yes; then
4744 michael 1094 case $host_os in
4745     aix*)
4746     # The AIX port of GNU ld has always aspired to compatibility
4747     # with the native linker. However, as the warning in the GNU ld
4748     # block says, versions before 2.19.5* couldn't really create working
4749     # shared libraries, regardless of the interface used.
4750     case `$LD -v 2>&1` in
4751     *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4752     *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4753     *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4754     *)
4755     lt_use_gnu_ld_interface=yes
4756     ;;
4757     esac
4758     ;;
4759     *)
4760     lt_use_gnu_ld_interface=yes
4761     ;;
4762     esac
4763     fi
4764    
4765     if test "$lt_use_gnu_ld_interface" = yes; then
4766 michael 912 # If archive_cmds runs LD, not CC, wlarc should be empty
4767     wlarc='${wl}'
4768    
4769     # Set some defaults for GNU ld with shared library support. These
4770     # are reset later if shared libraries are not supported. Putting them
4771     # here allows them to be overridden if necessary.
4772     runpath_var=LD_RUN_PATH
4773 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4774     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4775 michael 912 # ancient GNU ld didn't support --whole-archive et. al.
4776 michael 945 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4777     _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4778     else
4779     _LT_TAGVAR(whole_archive_flag_spec, $1)=
4780 michael 912 fi
4781     supports_anon_versioning=no
4782 michael 945 case `$LD -v 2>&1` in
4783 michael 1094 *GNU\ gold*) supports_anon_versioning=yes ;;
4784 michael 912 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4785     *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4786     *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4787     *\ 2.11.*) ;; # other 2.11 versions
4788     *) supports_anon_versioning=yes ;;
4789     esac
4790    
4791     # See if GNU ld supports shared libraries.
4792     case $host_os in
4793 db 941 aix[[3-9]]*)
4794 michael 912 # On AIX/PPC, the GNU linker is very broken
4795     if test "$host_cpu" != ia64; then
4796 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
4797     cat <<_LT_EOF 1>&2
4798 michael 912
4799 michael 1094 *** Warning: the GNU linker, at least up to release 2.19, is reported
4800 michael 912 *** to be unable to reliably create shared libraries on AIX.
4801     *** Therefore, libtool is disabling shared libraries support. If you
4802 michael 1094 *** really care for shared libraries, you may want to install binutils
4803     *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4804     *** You will then need to restart the configuration process.
4805 michael 912
4806 michael 945 _LT_EOF
4807 michael 912 fi
4808     ;;
4809    
4810     amigaos*)
4811 michael 945 case $host_cpu in
4812     powerpc)
4813     # see comment about AmigaOS4 .so support
4814     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4815     _LT_TAGVAR(archive_expsym_cmds, $1)=''
4816     ;;
4817     m68k)
4818     _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)'
4819     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4820     _LT_TAGVAR(hardcode_minus_L, $1)=yes
4821     ;;
4822     esac
4823 michael 912 ;;
4824    
4825     beos*)
4826 michael 945 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4827     _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4828 michael 912 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4829     # support --undefined. This deserves some investigation. FIXME
4830 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4831 michael 912 else
4832 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
4833 michael 912 fi
4834     ;;
4835    
4836 michael 945 cygwin* | mingw* | pw32* | cegcc*)
4837     # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4838 michael 912 # as there is no search path for DLLs.
4839 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4840 michael 1094 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4841 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4842     _LT_TAGVAR(always_export_symbols, $1)=no
4843     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4844 michael 1106 _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'
4845     _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4846 michael 912
4847 michael 945 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4848     _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'
4849 michael 912 # If the export-symbols file already is a .def file (1st line
4850     # is EXPORTS), use it as is; otherwise, prepend...
4851 michael 945 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4852 michael 912 cp $export_symbols $output_objdir/$soname.def;
4853     else
4854     echo EXPORTS > $output_objdir/$soname.def;
4855     cat $export_symbols >> $output_objdir/$soname.def;
4856     fi~
4857     $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4858     else
4859 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
4860 michael 912 fi
4861     ;;
4862    
4863 michael 1094 haiku*)
4864     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4865     _LT_TAGVAR(link_all_deplibs, $1)=yes
4866     ;;
4867    
4868 michael 912 interix[[3-9]]*)
4869 michael 945 _LT_TAGVAR(hardcode_direct, $1)=no
4870     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4871     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4872     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4873 michael 912 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4874     # Instead, shared libraries are loaded at an image base (0x10000000 by
4875     # default) and relocated if they conflict, which is a slow very memory
4876     # consuming and fragmenting process. To avoid this, we pick a random,
4877     # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4878     # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4879 michael 945 _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'
4880     _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'
4881 michael 912 ;;
4882    
4883 michael 1094 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4884 michael 945 tmp_diet=no
4885     if test "$host_os" = linux-dietlibc; then
4886     case $cc_basename in
4887     diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4888     esac
4889     fi
4890     if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4891     && test "$tmp_diet" = no
4892     then
4893 michael 1106 tmp_addflag=' $pic_flag'
4894 michael 945 tmp_sharedflag='-shared'
4895 michael 912 case $cc_basename,$host_cpu in
4896 michael 945 pgcc*) # Portland Group C compiler
4897 michael 1094 _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'
4898 michael 912 tmp_addflag=' $pic_flag'
4899     ;;
4900 michael 1094 pgf77* | pgf90* | pgf95* | pgfortran*)
4901     # Portland Group f77 and f90 compilers
4902     _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'
4903 michael 912 tmp_addflag=' $pic_flag -Mnomain' ;;
4904 michael 945 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4905 michael 912 tmp_addflag=' -i_dynamic' ;;
4906     efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4907     tmp_addflag=' -i_dynamic -nofor_main' ;;
4908     ifc* | ifort*) # Intel Fortran compiler
4909     tmp_addflag=' -nofor_main' ;;
4910 michael 945 lf95*) # Lahey Fortran 8.1
4911     _LT_TAGVAR(whole_archive_flag_spec, $1)=
4912     tmp_sharedflag='--shared' ;;
4913 michael 1094 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4914 michael 945 tmp_sharedflag='-qmkshrobj'
4915     tmp_addflag= ;;
4916 michael 1094 nvcc*) # Cuda Compiler Driver 2.2
4917     _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'
4918     _LT_TAGVAR(compiler_needs_object, $1)=yes
4919     ;;
4920 michael 912 esac
4921     case `$CC -V 2>&1 | sed 5q` in
4922     *Sun\ C*) # Sun C 5.9
4923 michael 1094 _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'
4924 michael 945 _LT_TAGVAR(compiler_needs_object, $1)=yes
4925 michael 912 tmp_sharedflag='-G' ;;
4926     *Sun\ F*) # Sun Fortran 8.3
4927     tmp_sharedflag='-G' ;;
4928     esac
4929 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4930 michael 912
4931 michael 945 if test "x$supports_anon_versioning" = xyes; then
4932     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4933     cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4934     echo "local: *; };" >> $output_objdir/$libname.ver~
4935     $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4936     fi
4937    
4938     case $cc_basename in
4939 michael 1094 xlf* | bgf* | bgxlf* | mpixlf*)
4940 michael 945 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4941     _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4942 michael 1257 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4943 michael 1094 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4944 michael 945 if test "x$supports_anon_versioning" = xyes; then
4945     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4946     cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4947     echo "local: *; };" >> $output_objdir/$libname.ver~
4948 michael 1094 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4949 michael 945 fi
4950     ;;
4951     esac
4952 michael 912 else
4953 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
4954 michael 912 fi
4955     ;;
4956    
4957     netbsd*)
4958 michael 945 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4959     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4960 michael 912 wlarc=
4961     else
4962 michael 1106 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4963     _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'
4964 michael 912 fi
4965     ;;
4966    
4967     solaris*)
4968 michael 945 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4969     _LT_TAGVAR(ld_shlibs, $1)=no
4970     cat <<_LT_EOF 1>&2
4971 michael 912
4972     *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4973     *** create shared libraries on Solaris systems. Therefore, libtool
4974     *** is disabling shared libraries support. We urge you to upgrade GNU
4975     *** binutils to release 2.9.1 or newer. Another option is to modify
4976     *** your PATH or compiler configuration so that the native linker is
4977     *** used, and then restart.
4978    
4979 michael 945 _LT_EOF
4980     elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4981 michael 1106 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4982     _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'
4983 michael 912 else
4984 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
4985 michael 912 fi
4986     ;;
4987    
4988     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4989     case `$LD -v 2>&1` in
4990     *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4991 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
4992 michael 912 cat <<_LT_EOF 1>&2
4993    
4994     *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4995     *** reliably create shared libraries on SCO systems. Therefore, libtool
4996     *** is disabling shared libraries support. We urge you to upgrade GNU
4997     *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4998     *** your PATH or compiler configuration so that the native linker is
4999     *** used, and then restart.
5000    
5001     _LT_EOF
5002     ;;
5003     *)
5004 michael 945 # For security reasons, it is highly recommended that you always
5005     # use absolute paths for naming shared libraries, and exclude the
5006     # DT_RUNPATH tag from executables and libraries. But doing so
5007     # requires that you compile everything twice, which is a pain.
5008     if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5009     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5010     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5011     _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'
5012 michael 912 else
5013 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
5014 michael 912 fi
5015     ;;
5016     esac
5017     ;;
5018    
5019     sunos4*)
5020 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5021 michael 912 wlarc=
5022 michael 945 _LT_TAGVAR(hardcode_direct, $1)=yes
5023     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5024 michael 912 ;;
5025    
5026     *)
5027 michael 945 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5028 michael 1106 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5029     _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'
5030 michael 912 else
5031 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
5032 michael 912 fi
5033     ;;
5034     esac
5035    
5036 michael 945 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5037 michael 912 runpath_var=
5038 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5039     _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5040     _LT_TAGVAR(whole_archive_flag_spec, $1)=
5041 michael 912 fi
5042     else
5043     # PORTME fill in a description of your system's linker (not GNU ld)
5044     case $host_os in
5045     aix3*)
5046 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5047     _LT_TAGVAR(always_export_symbols, $1)=yes
5048     _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'
5049 michael 912 # Note: this linker hardcodes the directories in LIBPATH if there
5050     # are no directories specified by -L.
5051 michael 945 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5052 michael 912 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5053     # Neither direct hardcoding nor static linking is supported with a
5054     # broken collect2.
5055 michael 945 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5056 michael 912 fi
5057     ;;
5058    
5059 db 941 aix[[4-9]]*)
5060 michael 912 if test "$host_cpu" = ia64; then
5061     # On IA64, the linker does run time linking by default, so we don't
5062     # have to do anything special.
5063     aix_use_runtimelinking=no
5064     exp_sym_flag='-Bexport'
5065     no_entry_flag=""
5066     else
5067     # If we're using GNU nm, then we don't want the "-C" option.
5068     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5069 michael 1094 # Also, AIX nm treats weak defined symbols like other global
5070     # defined symbols, whereas GNU nm marks them as "W".
5071 michael 945 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5072 michael 1094 _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'
5073 michael 912 else
5074 michael 945 _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'
5075 michael 912 fi
5076     aix_use_runtimelinking=no
5077    
5078     # Test if we are trying to use run time linking or normal
5079     # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5080     # need to do runtime linking.
5081 db 941 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5082 michael 912 for ld_flag in $LDFLAGS; do
5083 michael 945 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5084     aix_use_runtimelinking=yes
5085     break
5086     fi
5087 michael 912 done
5088     ;;
5089     esac
5090    
5091     exp_sym_flag='-bexport'
5092     no_entry_flag='-bnoentry'
5093     fi
5094    
5095     # When large executables or shared objects are built, AIX ld can
5096     # have problems creating the table of contents. If linking a library
5097     # or program results in "error TOC overflow" add -mminimal-toc to
5098     # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5099     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5100    
5101 michael 945 _LT_TAGVAR(archive_cmds, $1)=''
5102     _LT_TAGVAR(hardcode_direct, $1)=yes
5103     _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5104     _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5105     _LT_TAGVAR(link_all_deplibs, $1)=yes
5106     _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5107 michael 912
5108     if test "$GCC" = yes; then
5109     case $host_os in aix4.[[012]]|aix4.[[012]].*)
5110     # We only want to do this on AIX 4.2 and lower, the check
5111     # below for broken collect2 doesn't work under 4.3+
5112     collect2name=`${CC} -print-prog-name=collect2`
5113 michael 945 if test -f "$collect2name" &&
5114     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5115 michael 912 then
5116 michael 945 # We have reworked collect2
5117     :
5118 michael 912 else
5119 michael 945 # We have old collect2
5120     _LT_TAGVAR(hardcode_direct, $1)=unsupported
5121     # It fails to find uninstalled libraries when the uninstalled
5122     # path is not listed in the libpath. Setting hardcode_minus_L
5123     # to unsupported forces relinking
5124     _LT_TAGVAR(hardcode_minus_L, $1)=yes
5125     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5126     _LT_TAGVAR(hardcode_libdir_separator, $1)=
5127 michael 912 fi
5128     ;;
5129     esac
5130     shared_flag='-shared'
5131     if test "$aix_use_runtimelinking" = yes; then
5132     shared_flag="$shared_flag "'${wl}-G'
5133     fi
5134     else
5135     # not using gcc
5136     if test "$host_cpu" = ia64; then
5137 michael 945 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5138     # chokes on -Wl,-G. The following line is correct:
5139 michael 912 shared_flag='-G'
5140     else
5141     if test "$aix_use_runtimelinking" = yes; then
5142     shared_flag='${wl}-G'
5143     else
5144     shared_flag='${wl}-bM:SRE'
5145     fi
5146     fi
5147     fi
5148    
5149 michael 945 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5150 michael 912 # It seems that -bexpall does not export symbols beginning with
5151     # underscore (_), so it is better to generate a list of symbols to export.
5152 michael 945 _LT_TAGVAR(always_export_symbols, $1)=yes
5153 michael 912 if test "$aix_use_runtimelinking" = yes; then
5154     # Warning - without using the other runtime loading flags (-brtl),
5155     # -berok will link without error, but may produce a broken library.
5156 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5157     # Determine the default libpath from the value encoded in an
5158     # empty executable.
5159 michael 1106 _LT_SYS_MODULE_PATH_AIX([$1])
5160 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5161 michael 1094 _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"
5162 michael 945 else
5163 michael 912 if test "$host_cpu" = ia64; then
5164 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5165     _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5166     _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"
5167 michael 912 else
5168 michael 945 # Determine the default libpath from the value encoded in an
5169     # empty executable.
5170 michael 1106 _LT_SYS_MODULE_PATH_AIX([$1])
5171 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5172 michael 912 # Warning - without using the other run time loading flags,
5173     # -berok will link without error, but may produce a broken library.
5174 michael 945 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5175     _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5176 michael 1094 if test "$with_gnu_ld" = yes; then
5177     # We only use this code for GNU lds that support --whole-archive.
5178     _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5179     else
5180     # Exported symbols can be pulled into shared objects from archives
5181     _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5182     fi
5183 michael 945 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5184 michael 912 # This is similar to how AIX traditionally builds its shared libraries.
5185 michael 945 _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'
5186 michael 912 fi
5187     fi
5188     ;;
5189    
5190     amigaos*)
5191 michael 945 case $host_cpu in
5192     powerpc)
5193     # see comment about AmigaOS4 .so support
5194     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5195     _LT_TAGVAR(archive_expsym_cmds, $1)=''
5196     ;;
5197     m68k)
5198     _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)'
5199     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5200     _LT_TAGVAR(hardcode_minus_L, $1)=yes
5201     ;;
5202     esac
5203 michael 912 ;;
5204    
5205     bsdi[[45]]*)
5206 michael 945 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5207 michael 912 ;;
5208    
5209 michael 945 cygwin* | mingw* | pw32* | cegcc*)
5210 michael 912 # When not using gcc, we currently assume that we are using
5211     # Microsoft Visual C++.
5212     # hardcode_libdir_flag_spec is actually meaningless, as there is
5213     # no search path for DLLs.
5214 michael 1106 case $cc_basename in
5215     cl*)
5216     # Native MSVC
5217     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5218     _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5219     _LT_TAGVAR(always_export_symbols, $1)=yes
5220     _LT_TAGVAR(file_list_spec, $1)='@'
5221     # Tell ltmain to make .lib files, not .a files.
5222     libext=lib
5223     # Tell ltmain to make .dll files, not .so files.
5224     shrext_cmds=".dll"
5225     # FIXME: Setting linknames here is a bad hack.
5226     _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5227     _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5228     sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5229     else
5230     sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5231     fi~
5232     $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5233     linknames='
5234     # The linker will not automatically build a static lib if we build a DLL.
5235     # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5236     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5237 michael 1257 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5238 michael 1106 _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'
5239     # Don't use ranlib
5240     _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5241     _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5242     lt_tool_outputfile="@TOOL_OUTPUT@"~
5243     case $lt_outputfile in
5244     *.exe|*.EXE) ;;
5245     *)
5246     lt_outputfile="$lt_outputfile.exe"
5247     lt_tool_outputfile="$lt_tool_outputfile.exe"
5248     ;;
5249     esac~
5250     if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5251     $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5252     $RM "$lt_outputfile.manifest";
5253     fi'
5254     ;;
5255     *)
5256     # Assume MSVC wrapper
5257     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5258     _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5259     # Tell ltmain to make .lib files, not .a files.
5260     libext=lib
5261     # Tell ltmain to make .dll files, not .so files.
5262     shrext_cmds=".dll"
5263     # FIXME: Setting linknames here is a bad hack.
5264     _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5265     # The linker will automatically build a .lib file if we build a DLL.
5266     _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5267     # FIXME: Should let the user specify the lib program.
5268     _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5269     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5270     ;;
5271     esac
5272 michael 912 ;;
5273    
5274     darwin* | rhapsody*)
5275 michael 945 _LT_DARWIN_LINKER_FEATURES($1)
5276 michael 912 ;;
5277    
5278     dgux*)
5279 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5280     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5281     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5282 michael 912 ;;
5283    
5284     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5285     # support. Future versions do this automatically, but an explicit c++rt0.o
5286     # does not break anything, and helps significantly (at the cost of a little
5287     # extra space).
5288     freebsd2.2*)
5289 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5290     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5291     _LT_TAGVAR(hardcode_direct, $1)=yes
5292     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5293 michael 912 ;;
5294    
5295     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5296 michael 1257 freebsd2.*)
5297 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5298     _LT_TAGVAR(hardcode_direct, $1)=yes
5299     _LT_TAGVAR(hardcode_minus_L, $1)=yes
5300     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5301 michael 912 ;;
5302    
5303     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5304     freebsd* | dragonfly*)
5305 michael 1106 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5306 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5307     _LT_TAGVAR(hardcode_direct, $1)=yes
5308     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5309 michael 912 ;;
5310    
5311     hpux9*)
5312     if test "$GCC" = yes; then
5313 michael 1106 _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'
5314 michael 912 else
5315 michael 945 _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'
5316 michael 912 fi
5317 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5318     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5319     _LT_TAGVAR(hardcode_direct, $1)=yes
5320 michael 912
5321     # hardcode_minus_L: Not really in the search PATH,
5322     # but as the default location of the library.
5323 michael 945 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5324     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5325 michael 912 ;;
5326    
5327     hpux10*)
5328 michael 1094 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5329 michael 1106 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5330 michael 912 else
5331 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5332 michael 912 fi
5333     if test "$with_gnu_ld" = no; then
5334 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5335     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5336     _LT_TAGVAR(hardcode_direct, $1)=yes
5337     _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5338     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5339 michael 912 # hardcode_minus_L: Not really in the search PATH,
5340     # but as the default location of the library.
5341 michael 945 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5342 michael 912 fi
5343     ;;
5344    
5345     hpux11*)
5346 michael 1094 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5347 michael 912 case $host_cpu in
5348     hppa*64*)
5349 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5350 michael 912 ;;
5351     ia64*)
5352 michael 1106 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5353 michael 912 ;;
5354     *)
5355 michael 1106 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5356 michael 912 ;;
5357     esac
5358     else
5359     case $host_cpu in
5360     hppa*64*)
5361 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5362 michael 912 ;;
5363     ia64*)
5364 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5365 michael 912 ;;
5366     *)
5367 michael 1094 m4_if($1, [], [
5368     # Older versions of the 11.00 compiler do not understand -b yet
5369     # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5370     _LT_LINKER_OPTION([if $CC understands -b],
5371     _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5372     [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5373     [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5374     [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5375 michael 912 ;;
5376     esac
5377     fi
5378     if test "$with_gnu_ld" = no; then
5379 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5380     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5381 michael 912
5382     case $host_cpu in
5383     hppa*64*|ia64*)
5384 michael 945 _LT_TAGVAR(hardcode_direct, $1)=no
5385     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5386 michael 912 ;;
5387     *)
5388 michael 945 _LT_TAGVAR(hardcode_direct, $1)=yes
5389     _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5390     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5391 michael 912
5392     # hardcode_minus_L: Not really in the search PATH,
5393     # but as the default location of the library.
5394 michael 945 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5395 michael 912 ;;
5396     esac
5397     fi
5398     ;;
5399    
5400     irix5* | irix6* | nonstopux*)
5401     if test "$GCC" = yes; then
5402 michael 1106 _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'
5403 michael 945 # Try to use the -exported_symbol ld option, if it does not
5404     # work, assume that -exports_file does not work either and
5405     # implicitly export all symbols.
5406 michael 1106 # This should be the same for all languages, so no per-tag cache variable.
5407     AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5408     [lt_cv_irix_exported_symbol],
5409     [save_LDFLAGS="$LDFLAGS"
5410     LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5411     AC_LINK_IFELSE(
5412     [AC_LANG_SOURCE(
5413     [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5414     [C++], [[int foo (void) { return 0; }]],
5415     [Fortran 77], [[
5416     subroutine foo
5417     end]],
5418     [Fortran], [[
5419     subroutine foo
5420     end]])])],
5421     [lt_cv_irix_exported_symbol=yes],
5422     [lt_cv_irix_exported_symbol=no])
5423     LDFLAGS="$save_LDFLAGS"])
5424     if test "$lt_cv_irix_exported_symbol" = yes; then
5425     _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'
5426     fi
5427 michael 912 else
5428 michael 1094 _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'
5429     _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'
5430 michael 912 fi
5431 michael 945 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5432     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5433     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5434     _LT_TAGVAR(inherit_rpath, $1)=yes
5435     _LT_TAGVAR(link_all_deplibs, $1)=yes
5436 michael 912 ;;
5437    
5438     netbsd*)
5439 michael 945 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5440     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5441 michael 912 else
5442 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5443 michael 912 fi
5444 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5445     _LT_TAGVAR(hardcode_direct, $1)=yes
5446     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5447 michael 912 ;;
5448    
5449     newsos6)
5450 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5451     _LT_TAGVAR(hardcode_direct, $1)=yes
5452     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5453     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5454     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5455 michael 912 ;;
5456    
5457 michael 945 *nto* | *qnx*)
5458     ;;
5459    
5460 michael 912 openbsd*)
5461     if test -f /usr/libexec/ld.so; then
5462 michael 945 _LT_TAGVAR(hardcode_direct, $1)=yes
5463     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5464     _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5465     if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5466     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5467     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5468     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5469     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5470 michael 912 else
5471     case $host_os in
5472     openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5473 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5474     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5475 michael 912 ;;
5476     *)
5477 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5478     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5479 michael 912 ;;
5480     esac
5481 michael 945 fi
5482 michael 912 else
5483 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
5484 michael 912 fi
5485     ;;
5486    
5487     os2*)
5488 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5489     _LT_TAGVAR(hardcode_minus_L, $1)=yes
5490     _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5491 michael 1094 _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'
5492 michael 945 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5493 michael 912 ;;
5494    
5495     osf3*)
5496     if test "$GCC" = yes; then
5497 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5498 michael 1094 _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'
5499 michael 912 else
5500 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5501 michael 1094 _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'
5502 michael 912 fi
5503 michael 945 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5504     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5505     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5506 michael 912 ;;
5507    
5508     osf4* | osf5*) # as osf3* with the addition of -msym flag
5509     if test "$GCC" = yes; then
5510 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5511 michael 1106 _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'
5512 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5513 michael 912 else
5514 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5515 michael 1094 _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'
5516 michael 945 _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~
5517 michael 1094 $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'
5518 michael 912
5519     # Both c and cxx compiler support -rpath directly
5520 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5521 michael 912 fi
5522 michael 945 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5523     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5524 michael 912 ;;
5525    
5526     solaris*)
5527 michael 945 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5528 michael 912 if test "$GCC" = yes; then
5529     wlarc='${wl}'
5530 michael 1106 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5531 michael 945 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5532 michael 1106 $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'
5533 michael 912 else
5534 michael 945 case `$CC -V 2>&1` in
5535     *"Compilers 5.0"*)
5536     wlarc=''
5537     _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5538     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5539     $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5540     ;;
5541     *)
5542     wlarc='${wl}'
5543     _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5544     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5545     $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5546     ;;
5547     esac
5548 michael 912 fi
5549 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5550     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5551 michael 912 case $host_os in
5552     solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5553     *)
5554     # The compiler driver will combine and reorder linker options,
5555     # but understands `-z linker_flag'. GCC discards it without `$wl',
5556     # but is careful enough not to reorder.
5557 michael 945 # Supported since Solaris 2.6 (maybe 2.5.1?)
5558 michael 912 if test "$GCC" = yes; then
5559 michael 945 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5560 michael 912 else
5561 michael 945 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5562 michael 912 fi
5563     ;;
5564     esac
5565 michael 945 _LT_TAGVAR(link_all_deplibs, $1)=yes
5566 michael 912 ;;
5567    
5568     sunos4*)
5569     if test "x$host_vendor" = xsequent; then
5570     # Use $CC to link under sequent, because it throws in some extra .o
5571     # files that make .init and .fini sections work.
5572 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5573 michael 912 else
5574 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5575 michael 912 fi
5576 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5577     _LT_TAGVAR(hardcode_direct, $1)=yes
5578     _LT_TAGVAR(hardcode_minus_L, $1)=yes
5579     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5580 michael 912 ;;
5581    
5582     sysv4)
5583     case $host_vendor in
5584     sni)
5585 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5586     _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5587 michael 912 ;;
5588     siemens)
5589     ## LD is ld it makes a PLAMLIB
5590     ## CC just makes a GrossModule.
5591 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5592     _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5593     _LT_TAGVAR(hardcode_direct, $1)=no
5594 michael 912 ;;
5595     motorola)
5596 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5597     _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5598 michael 912 ;;
5599     esac
5600     runpath_var='LD_RUN_PATH'
5601 michael 945 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5602 michael 912 ;;
5603    
5604     sysv4.3*)
5605 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5606     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5607     _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5608 michael 912 ;;
5609    
5610     sysv4*MP*)
5611     if test -d /usr/nec; then
5612 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5613     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5614 michael 912 runpath_var=LD_RUN_PATH
5615     hardcode_runpath_var=yes
5616 michael 945 _LT_TAGVAR(ld_shlibs, $1)=yes
5617 michael 912 fi
5618     ;;
5619    
5620     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5621 michael 945 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5622     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5623     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5624 michael 912 runpath_var='LD_RUN_PATH'
5625    
5626     if test "$GCC" = yes; then
5627 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5628     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5629 michael 912 else
5630 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5631     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5632 michael 912 fi
5633     ;;
5634    
5635     sysv5* | sco3.2v5* | sco5v6*)
5636     # Note: We can NOT use -z defs as we might desire, because we do not
5637     # link with -lc, and that would cause any symbols used from libc to
5638     # always be unresolved, which means just about no library would
5639     # ever link correctly. If we're not using GNU ld we use -z text
5640     # though, which does catch some bad symbols but isn't as heavy-handed
5641     # as -z defs.
5642 michael 945 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5643     _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5644     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5645     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5646     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5647     _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5648     _LT_TAGVAR(link_all_deplibs, $1)=yes
5649     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5650 michael 912 runpath_var='LD_RUN_PATH'
5651    
5652     if test "$GCC" = yes; then
5653 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5654     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5655 michael 912 else
5656 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5657     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5658 michael 912 fi
5659     ;;
5660    
5661     uts4*)
5662 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5663     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5664     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5665 michael 912 ;;
5666    
5667     *)
5668 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
5669 michael 912 ;;
5670     esac
5671 michael 945
5672     if test x$host_vendor = xsni; then
5673     case $host in
5674     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5675     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5676     ;;
5677     esac
5678     fi
5679 michael 912 fi
5680     ])
5681 michael 945 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5682     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5683 michael 912
5684 michael 945 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5685    
5686     _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5687     _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5688     _LT_DECL([], [extract_expsyms_cmds], [2],
5689     [The commands to extract the exported symbol list from a shared archive])
5690    
5691 michael 912 #
5692     # Do we need to explicitly link libc?
5693     #
5694 michael 945 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5695 michael 912 x|xyes)
5696     # Assume -lc should be added
5697 michael 945 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5698 michael 912
5699     if test "$enable_shared" = yes && test "$GCC" = yes; then
5700 michael 945 case $_LT_TAGVAR(archive_cmds, $1) in
5701 michael 912 *'~'*)
5702     # FIXME: we may have to deal with multi-command sequences.
5703     ;;
5704     '$CC '*)
5705     # Test whether the compiler implicitly links with -lc since on some
5706     # systems, -lgcc has to come before -lc. If gcc already passes -lc
5707     # to ld, don't add -lc before -lgcc.
5708 michael 1094 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5709     [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5710     [$RM conftest*
5711     echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5712 michael 912
5713 michael 1094 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5714     soname=conftest
5715     lib=conftest
5716     libobjs=conftest.$ac_objext
5717     deplibs=
5718     wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5719     pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5720     compiler_flags=-v
5721     linker_flags=-v
5722     verstring=
5723     output_objdir=.
5724     libname=conftest
5725     lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5726     _LT_TAGVAR(allow_undefined_flag, $1)=
5727     if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5728     then
5729     lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5730     else
5731     lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5732     fi
5733     _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5734     else
5735     cat conftest.err 1>&5
5736     fi
5737     $RM conftest*
5738     ])
5739     _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5740 michael 912 ;;
5741     esac
5742     fi
5743     ;;
5744     esac
5745    
5746 michael 945 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5747     [Whether or not to add -lc for building shared libraries])
5748     _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5749     [enable_shared_with_static_runtimes], [0],
5750     [Whether or not to disallow shared libs when runtime libs are static])
5751     _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5752     [Compiler flag to allow reflexive dlopens])
5753     _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5754     [Compiler flag to generate shared objects directly from archives])
5755     _LT_TAGDECL([], [compiler_needs_object], [1],
5756     [Whether the compiler copes with passing no objects directly])
5757     _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5758     [Create an old-style archive from a shared archive])
5759     _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5760     [Create a temporary old-style archive to link instead of a shared archive])
5761     _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5762     _LT_TAGDECL([], [archive_expsym_cmds], [2])
5763     _LT_TAGDECL([], [module_cmds], [2],
5764     [Commands used to build a loadable module if different from building
5765     a shared archive.])
5766     _LT_TAGDECL([], [module_expsym_cmds], [2])
5767     _LT_TAGDECL([], [with_gnu_ld], [1],
5768     [Whether we are building with GNU ld or not])
5769     _LT_TAGDECL([], [allow_undefined_flag], [1],
5770     [Flag that allows shared libraries with undefined symbols to be built])
5771     _LT_TAGDECL([], [no_undefined_flag], [1],
5772     [Flag that enforces no undefined symbols])
5773     _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5774     [Flag to hardcode $libdir into a binary during linking.
5775     This must work even if $libdir does not exist])
5776     _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5777     [Whether we need a single "-rpath" flag with a separated argument])
5778     _LT_TAGDECL([], [hardcode_direct], [0],
5779     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5780     DIR into the resulting binary])
5781     _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5782     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5783     DIR into the resulting binary and the resulting library dependency is
5784     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5785     library is relocated])
5786     _LT_TAGDECL([], [hardcode_minus_L], [0],
5787     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5788     into the resulting binary])
5789     _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5790     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5791     into the resulting binary])
5792     _LT_TAGDECL([], [hardcode_automatic], [0],
5793     [Set to "yes" if building a shared library automatically hardcodes DIR
5794     into the library and all subsequent libraries and executables linked
5795     against it])
5796     _LT_TAGDECL([], [inherit_rpath], [0],
5797     [Set to yes if linker adds runtime paths of dependent libraries
5798     to runtime path list])
5799     _LT_TAGDECL([], [link_all_deplibs], [0],
5800     [Whether libtool must link a program against all its dependency libraries])
5801     _LT_TAGDECL([], [always_export_symbols], [0],
5802     [Set to "yes" if exported symbols are required])
5803     _LT_TAGDECL([], [export_symbols_cmds], [2],
5804     [The commands to list exported symbols])
5805     _LT_TAGDECL([], [exclude_expsyms], [1],
5806     [Symbols that should not be listed in the preloaded symbols])
5807     _LT_TAGDECL([], [include_expsyms], [1],
5808     [Symbols that must always be exported])
5809     _LT_TAGDECL([], [prelink_cmds], [2],
5810     [Commands necessary for linking programs (against libraries) with templates])
5811 michael 1106 _LT_TAGDECL([], [postlink_cmds], [2],
5812     [Commands necessary for finishing linking programs])
5813 michael 945 _LT_TAGDECL([], [file_list_spec], [1],
5814     [Specify filename containing input files])
5815     dnl FIXME: Not yet implemented
5816     dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5817     dnl [Compiler flag to generate thread safe objects])
5818     ])# _LT_LINKER_SHLIBS
5819 michael 912
5820    
5821 michael 945 # _LT_LANG_C_CONFIG([TAG])
5822     # ------------------------
5823     # Ensure that the configuration variables for a C compiler are suitably
5824     # defined. These variables are subsequently used by _LT_CONFIG to write
5825     # the compiler configuration to `libtool'.
5826     m4_defun([_LT_LANG_C_CONFIG],
5827     [m4_require([_LT_DECL_EGREP])dnl
5828     lt_save_CC="$CC"
5829     AC_LANG_PUSH(C)
5830 michael 912
5831 michael 945 # Source file extension for C test sources.
5832     ac_ext=c
5833 michael 912
5834 michael 945 # Object file extension for compiled C test sources.
5835     objext=o
5836     _LT_TAGVAR(objext, $1)=$objext
5837 michael 912
5838 michael 945 # Code to be used in simple compile tests
5839     lt_simple_compile_test_code="int some_variable = 0;"
5840 michael 912
5841 michael 945 # Code to be used in simple link tests
5842     lt_simple_link_test_code='int main(){return(0);}'
5843 michael 912
5844 michael 945 _LT_TAG_COMPILER
5845     # Save the default compiler, since it gets overwritten when the other
5846     # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5847     compiler_DEFAULT=$CC
5848 michael 912
5849 michael 945 # save warnings/boilerplate of simple test code
5850     _LT_COMPILER_BOILERPLATE
5851     _LT_LINKER_BOILERPLATE
5852    
5853     if test -n "$compiler"; then
5854     _LT_COMPILER_NO_RTTI($1)
5855     _LT_COMPILER_PIC($1)
5856     _LT_COMPILER_C_O($1)
5857     _LT_COMPILER_FILE_LOCKS($1)
5858     _LT_LINKER_SHLIBS($1)
5859     _LT_SYS_DYNAMIC_LINKER($1)
5860     _LT_LINKER_HARDCODE_LIBPATH($1)
5861     LT_SYS_DLOPEN_SELF
5862     _LT_CMD_STRIPLIB
5863    
5864     # Report which library types will actually be built
5865     AC_MSG_CHECKING([if libtool supports shared libraries])
5866     AC_MSG_RESULT([$can_build_shared])
5867    
5868     AC_MSG_CHECKING([whether to build shared libraries])
5869     test "$can_build_shared" = "no" && enable_shared=no
5870    
5871     # On AIX, shared libraries and static libraries use the same namespace, and
5872     # are all built from PIC.
5873     case $host_os in
5874     aix3*)
5875     test "$enable_shared" = yes && enable_static=no
5876     if test -n "$RANLIB"; then
5877     archive_cmds="$archive_cmds~\$RANLIB \$lib"
5878     postinstall_cmds='$RANLIB $lib'
5879     fi
5880     ;;
5881    
5882     aix[[4-9]]*)
5883     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5884     test "$enable_shared" = yes && enable_static=no
5885     fi
5886     ;;
5887     esac
5888     AC_MSG_RESULT([$enable_shared])
5889    
5890     AC_MSG_CHECKING([whether to build static libraries])
5891     # Make sure either enable_shared or enable_static is yes.
5892     test "$enable_shared" = yes || enable_static=yes
5893     AC_MSG_RESULT([$enable_static])
5894    
5895     _LT_CONFIG($1)
5896     fi
5897     AC_LANG_POP
5898     CC="$lt_save_CC"
5899     ])# _LT_LANG_C_CONFIG
5900    
5901    
5902 michael 1094 # _LT_LANG_CXX_CONFIG([TAG])
5903     # --------------------------
5904     # Ensure that the configuration variables for a C++ compiler are suitably
5905     # defined. These variables are subsequently used by _LT_CONFIG to write
5906     # the compiler configuration to `libtool'.
5907     m4_defun([_LT_LANG_CXX_CONFIG],
5908     [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5909     m4_require([_LT_DECL_EGREP])dnl
5910 michael 1106 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5911 michael 945 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5912     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5913     (test "X$CXX" != "Xg++"))) ; then
5914     AC_PROG_CXXCPP
5915     else
5916     _lt_caught_CXX_error=yes
5917     fi
5918    
5919     AC_LANG_PUSH(C++)
5920     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5921     _LT_TAGVAR(allow_undefined_flag, $1)=
5922     _LT_TAGVAR(always_export_symbols, $1)=no
5923     _LT_TAGVAR(archive_expsym_cmds, $1)=
5924     _LT_TAGVAR(compiler_needs_object, $1)=no
5925     _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5926     _LT_TAGVAR(hardcode_direct, $1)=no
5927     _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5928     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5929     _LT_TAGVAR(hardcode_libdir_separator, $1)=
5930     _LT_TAGVAR(hardcode_minus_L, $1)=no
5931     _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5932     _LT_TAGVAR(hardcode_automatic, $1)=no
5933     _LT_TAGVAR(inherit_rpath, $1)=no
5934     _LT_TAGVAR(module_cmds, $1)=
5935     _LT_TAGVAR(module_expsym_cmds, $1)=
5936     _LT_TAGVAR(link_all_deplibs, $1)=unknown
5937     _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5938 michael 1094 _LT_TAGVAR(reload_flag, $1)=$reload_flag
5939     _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5940 michael 945 _LT_TAGVAR(no_undefined_flag, $1)=
5941     _LT_TAGVAR(whole_archive_flag_spec, $1)=
5942     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5943    
5944     # Source file extension for C++ test sources.
5945     ac_ext=cpp
5946    
5947     # Object file extension for compiled C++ test sources.
5948     objext=o
5949     _LT_TAGVAR(objext, $1)=$objext
5950    
5951     # No sense in running all these tests if we already determined that
5952     # the CXX compiler isn't working. Some variables (like enable_shared)
5953     # are currently assumed to apply to all compilers on this platform,
5954     # and will be corrupted by setting them based on a non-working compiler.
5955     if test "$_lt_caught_CXX_error" != yes; then
5956     # Code to be used in simple compile tests
5957     lt_simple_compile_test_code="int some_variable = 0;"
5958    
5959     # Code to be used in simple link tests
5960     lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5961    
5962     # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5963     _LT_TAG_COMPILER
5964    
5965     # save warnings/boilerplate of simple test code
5966     _LT_COMPILER_BOILERPLATE
5967     _LT_LINKER_BOILERPLATE
5968    
5969     # Allow CC to be a program name with arguments.
5970     lt_save_CC=$CC
5971 michael 1106 lt_save_CFLAGS=$CFLAGS
5972 michael 945 lt_save_LD=$LD
5973     lt_save_GCC=$GCC
5974     GCC=$GXX
5975     lt_save_with_gnu_ld=$with_gnu_ld
5976     lt_save_path_LD=$lt_cv_path_LD
5977     if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5978     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5979     else
5980     $as_unset lt_cv_prog_gnu_ld
5981     fi
5982     if test -n "${lt_cv_path_LDCXX+set}"; then
5983     lt_cv_path_LD=$lt_cv_path_LDCXX
5984     else
5985     $as_unset lt_cv_path_LD
5986     fi
5987     test -z "${LDCXX+set}" || LD=$LDCXX
5988     CC=${CXX-"c++"}
5989 michael 1106 CFLAGS=$CXXFLAGS
5990 michael 945 compiler=$CC
5991     _LT_TAGVAR(compiler, $1)=$CC
5992     _LT_CC_BASENAME([$compiler])
5993    
5994     if test -n "$compiler"; then
5995     # We don't want -fno-exception when compiling C++ code, so set the
5996     # no_builtin_flag separately
5997     if test "$GXX" = yes; then
5998     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5999     else
6000     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6001     fi
6002    
6003     if test "$GXX" = yes; then
6004     # Set up default GNU C++ configuration
6005    
6006     LT_PATH_LD
6007    
6008     # Check if GNU C++ uses GNU ld as the underlying linker, since the
6009     # archiving commands below assume that GNU ld is being used.
6010     if test "$with_gnu_ld" = yes; then
6011 michael 1106 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6012     _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'
6013 michael 945
6014     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6015     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6016    
6017     # If archive_cmds runs LD, not CC, wlarc should be empty
6018     # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6019     # investigate it a little bit more. (MM)
6020     wlarc='${wl}'
6021    
6022     # ancient GNU ld didn't support --whole-archive et. al.
6023     if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6024     $GREP 'no-whole-archive' > /dev/null; then
6025     _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6026     else
6027     _LT_TAGVAR(whole_archive_flag_spec, $1)=
6028     fi
6029     else
6030     with_gnu_ld=no
6031     wlarc=
6032    
6033     # A generic and very simple default shared library creation
6034     # command for GNU C++ for the case where it uses the native
6035     # linker, instead of GNU ld. If possible, this setting should
6036     # overridden to take advantage of the native linker features on
6037     # the platform it is being used on.
6038     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6039     fi
6040    
6041     # Commands to make compiler produce verbose output that lists
6042     # what "hidden" libraries, object files and flags are used when
6043     # linking a shared library.
6044 michael 1094 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6045 michael 945
6046     else
6047     GXX=no
6048     with_gnu_ld=no
6049     wlarc=
6050     fi
6051    
6052     # PORTME: fill in a description of your system's C++ link characteristics
6053     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6054     _LT_TAGVAR(ld_shlibs, $1)=yes
6055     case $host_os in
6056     aix3*)
6057     # FIXME: insert proper C++ library support
6058     _LT_TAGVAR(ld_shlibs, $1)=no
6059     ;;
6060     aix[[4-9]]*)
6061     if test "$host_cpu" = ia64; then
6062     # On IA64, the linker does run time linking by default, so we don't
6063     # have to do anything special.
6064     aix_use_runtimelinking=no
6065     exp_sym_flag='-Bexport'
6066     no_entry_flag=""
6067     else
6068     aix_use_runtimelinking=no
6069    
6070     # Test if we are trying to use run time linking or normal
6071     # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6072     # need to do runtime linking.
6073     case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6074     for ld_flag in $LDFLAGS; do
6075     case $ld_flag in
6076     *-brtl*)
6077     aix_use_runtimelinking=yes
6078     break
6079     ;;
6080     esac
6081     done
6082     ;;
6083     esac
6084    
6085     exp_sym_flag='-bexport'
6086     no_entry_flag='-bnoentry'
6087     fi
6088    
6089     # When large executables or shared objects are built, AIX ld can
6090     # have problems creating the table of contents. If linking a library
6091     # or program results in "error TOC overflow" add -mminimal-toc to
6092     # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6093     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6094    
6095     _LT_TAGVAR(archive_cmds, $1)=''
6096     _LT_TAGVAR(hardcode_direct, $1)=yes
6097     _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6098     _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6099     _LT_TAGVAR(link_all_deplibs, $1)=yes
6100     _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6101    
6102     if test "$GXX" = yes; then
6103     case $host_os in aix4.[[012]]|aix4.[[012]].*)
6104     # We only want to do this on AIX 4.2 and lower, the check
6105     # below for broken collect2 doesn't work under 4.3+
6106     collect2name=`${CC} -print-prog-name=collect2`
6107     if test -f "$collect2name" &&
6108     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6109     then
6110     # We have reworked collect2
6111     :
6112     else
6113     # We have old collect2
6114     _LT_TAGVAR(hardcode_direct, $1)=unsupported
6115     # It fails to find uninstalled libraries when the uninstalled
6116     # path is not listed in the libpath. Setting hardcode_minus_L
6117     # to unsupported forces relinking
6118     _LT_TAGVAR(hardcode_minus_L, $1)=yes
6119     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6120     _LT_TAGVAR(hardcode_libdir_separator, $1)=
6121     fi
6122     esac
6123     shared_flag='-shared'
6124     if test "$aix_use_runtimelinking" = yes; then
6125     shared_flag="$shared_flag "'${wl}-G'
6126     fi
6127     else
6128     # not using gcc
6129     if test "$host_cpu" = ia64; then
6130     # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6131     # chokes on -Wl,-G. The following line is correct:
6132     shared_flag='-G'
6133     else
6134     if test "$aix_use_runtimelinking" = yes; then
6135     shared_flag='${wl}-G'
6136     else
6137     shared_flag='${wl}-bM:SRE'
6138     fi
6139     fi
6140     fi
6141    
6142     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6143     # It seems that -bexpall does not export symbols beginning with
6144     # underscore (_), so it is better to generate a list of symbols to
6145     # export.
6146     _LT_TAGVAR(always_export_symbols, $1)=yes
6147     if test "$aix_use_runtimelinking" = yes; then
6148     # Warning - without using the other runtime loading flags (-brtl),
6149     # -berok will link without error, but may produce a broken library.
6150     _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6151     # Determine the default libpath from the value encoded in an empty
6152     # executable.
6153 michael 1106 _LT_SYS_MODULE_PATH_AIX([$1])
6154 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6155    
6156 michael 1094 _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"
6157 michael 945 else
6158     if test "$host_cpu" = ia64; then
6159     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6160     _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6161     _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"
6162     else
6163     # Determine the default libpath from the value encoded in an
6164     # empty executable.
6165 michael 1106 _LT_SYS_MODULE_PATH_AIX([$1])
6166 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6167     # Warning - without using the other run time loading flags,
6168     # -berok will link without error, but may produce a broken library.
6169     _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6170     _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6171 michael 1094 if test "$with_gnu_ld" = yes; then
6172     # We only use this code for GNU lds that support --whole-archive.
6173     _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6174     else
6175     # Exported symbols can be pulled into shared objects from archives
6176     _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6177     fi
6178 michael 945 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6179     # This is similar to how AIX traditionally builds its shared
6180     # libraries.
6181     _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'
6182     fi
6183     fi
6184     ;;
6185    
6186     beos*)
6187     if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6188     _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6189     # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6190     # support --undefined. This deserves some investigation. FIXME
6191     _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6192     else
6193     _LT_TAGVAR(ld_shlibs, $1)=no
6194     fi
6195     ;;
6196    
6197     chorus*)
6198     case $cc_basename in
6199     *)
6200     # FIXME: insert proper C++ library support
6201     _LT_TAGVAR(ld_shlibs, $1)=no
6202     ;;
6203     esac
6204     ;;
6205    
6206     cygwin* | mingw* | pw32* | cegcc*)
6207 michael 1106 case $GXX,$cc_basename in
6208     ,cl* | no,cl*)
6209     # Native MSVC
6210     # hardcode_libdir_flag_spec is actually meaningless, as there is
6211     # no search path for DLLs.
6212     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6213     _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6214     _LT_TAGVAR(always_export_symbols, $1)=yes
6215     _LT_TAGVAR(file_list_spec, $1)='@'
6216     # Tell ltmain to make .lib files, not .a files.
6217     libext=lib
6218     # Tell ltmain to make .dll files, not .so files.
6219     shrext_cmds=".dll"
6220     # FIXME: Setting linknames here is a bad hack.
6221     _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6222     _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6223     $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6224     else
6225     $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6226     fi~
6227     $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6228     linknames='
6229     # The linker will not automatically build a static lib if we build a DLL.
6230     # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6231     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6232     # Don't use ranlib
6233     _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6234     _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6235     lt_tool_outputfile="@TOOL_OUTPUT@"~
6236     case $lt_outputfile in
6237     *.exe|*.EXE) ;;
6238     *)
6239     lt_outputfile="$lt_outputfile.exe"
6240     lt_tool_outputfile="$lt_tool_outputfile.exe"
6241     ;;
6242     esac~
6243     func_to_tool_file "$lt_outputfile"~
6244     if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6245     $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6246     $RM "$lt_outputfile.manifest";
6247     fi'
6248     ;;
6249     *)
6250     # g++
6251     # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6252     # as there is no search path for DLLs.
6253     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6254     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6255     _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6256     _LT_TAGVAR(always_export_symbols, $1)=no
6257     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6258 michael 945
6259 michael 1106 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6260     _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'
6261     # If the export-symbols file already is a .def file (1st line
6262     # is EXPORTS), use it as is; otherwise, prepend...
6263     _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6264     cp $export_symbols $output_objdir/$soname.def;
6265     else
6266     echo EXPORTS > $output_objdir/$soname.def;
6267     cat $export_symbols >> $output_objdir/$soname.def;
6268     fi~
6269     $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'
6270     else
6271     _LT_TAGVAR(ld_shlibs, $1)=no
6272     fi
6273     ;;
6274     esac
6275     ;;
6276 michael 945 darwin* | rhapsody*)
6277     _LT_DARWIN_LINKER_FEATURES($1)
6278     ;;
6279    
6280     dgux*)
6281     case $cc_basename in
6282     ec++*)
6283     # FIXME: insert proper C++ library support
6284     _LT_TAGVAR(ld_shlibs, $1)=no
6285     ;;
6286     ghcx*)
6287     # Green Hills C++ Compiler
6288     # FIXME: insert proper C++ library support
6289     _LT_TAGVAR(ld_shlibs, $1)=no
6290     ;;
6291     *)
6292     # FIXME: insert proper C++ library support
6293     _LT_TAGVAR(ld_shlibs, $1)=no
6294     ;;
6295     esac
6296     ;;
6297    
6298 michael 1257 freebsd2.*)
6299 michael 945 # C++ shared libraries reported to be fairly broken before
6300     # switch to ELF
6301     _LT_TAGVAR(ld_shlibs, $1)=no
6302     ;;
6303    
6304     freebsd-elf*)
6305     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6306     ;;
6307    
6308     freebsd* | dragonfly*)
6309     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6310     # conventions
6311     _LT_TAGVAR(ld_shlibs, $1)=yes
6312     ;;
6313    
6314     gnu*)
6315     ;;
6316    
6317 michael 1094 haiku*)
6318     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6319     _LT_TAGVAR(link_all_deplibs, $1)=yes
6320     ;;
6321    
6322 michael 945 hpux9*)
6323     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6324     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6325     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6326     _LT_TAGVAR(hardcode_direct, $1)=yes
6327     _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6328     # but as the default
6329     # location of the library.
6330    
6331     case $cc_basename in
6332     CC*)
6333     # FIXME: insert proper C++ library support
6334     _LT_TAGVAR(ld_shlibs, $1)=no
6335     ;;
6336     aCC*)
6337     _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'
6338     # Commands to make compiler produce verbose output that lists
6339     # what "hidden" libraries, object files and flags are used when
6340     # linking a shared library.
6341     #
6342     # There doesn't appear to be a way to prevent this compiler from
6343     # explicitly linking system object files so we need to strip them
6344     # from the output so that they don't get included in the library
6345     # dependencies.
6346 michael 1094 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"'
6347 michael 945 ;;
6348     *)
6349     if test "$GXX" = yes; then
6350 michael 1106 _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'
6351 michael 945 else
6352     # FIXME: insert proper C++ library support
6353     _LT_TAGVAR(ld_shlibs, $1)=no
6354     fi
6355     ;;
6356     esac
6357     ;;
6358    
6359     hpux10*|hpux11*)
6360     if test $with_gnu_ld = no; then
6361     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6362     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6363    
6364     case $host_cpu in
6365     hppa*64*|ia64*)
6366     ;;
6367     *)
6368     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6369     ;;
6370     esac
6371     fi
6372     case $host_cpu in
6373     hppa*64*|ia64*)
6374     _LT_TAGVAR(hardcode_direct, $1)=no
6375     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6376     ;;
6377     *)
6378     _LT_TAGVAR(hardcode_direct, $1)=yes
6379     _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6380     _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6381     # but as the default
6382     # location of the library.
6383     ;;
6384     esac
6385    
6386     case $cc_basename in
6387     CC*)
6388     # FIXME: insert proper C++ library support
6389     _LT_TAGVAR(ld_shlibs, $1)=no
6390     ;;
6391     aCC*)
6392     case $host_cpu in
6393     hppa*64*)
6394     _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6395     ;;
6396     ia64*)
6397     _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6398     ;;
6399     *)
6400     _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'
6401     ;;
6402     esac
6403     # Commands to make compiler produce verbose output that lists
6404     # what "hidden" libraries, object files and flags are used when
6405     # linking a shared library.
6406     #
6407     # There doesn't appear to be a way to prevent this compiler from
6408     # explicitly linking system object files so we need to strip them
6409     # from the output so that they don't get included in the library
6410     # dependencies.
6411 michael 1094 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"'
6412 michael 945 ;;
6413     *)
6414     if test "$GXX" = yes; then
6415     if test $with_gnu_ld = no; then
6416     case $host_cpu in
6417     hppa*64*)
6418     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6419     ;;
6420     ia64*)
6421 michael 1106 _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'
6422 michael 945 ;;
6423     *)
6424 michael 1106 _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'
6425 michael 945 ;;
6426     esac
6427     fi
6428     else
6429     # FIXME: insert proper C++ library support
6430     _LT_TAGVAR(ld_shlibs, $1)=no
6431     fi
6432     ;;
6433     esac
6434     ;;
6435    
6436     interix[[3-9]]*)
6437     _LT_TAGVAR(hardcode_direct, $1)=no
6438     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6439     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6440     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6441     # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6442     # Instead, shared libraries are loaded at an image base (0x10000000 by
6443     # default) and relocated if they conflict, which is a slow very memory
6444     # consuming and fragmenting process. To avoid this, we pick a random,
6445     # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6446     # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6447     _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'
6448     _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'
6449     ;;
6450     irix5* | irix6*)
6451     case $cc_basename in
6452     CC*)
6453     # SGI C++
6454 michael 1094 _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'
6455 michael 945
6456     # Archives containing C++ object files must be created using
6457     # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6458     # necessary to make sure instantiated templates are included
6459     # in the archive.
6460     _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6461     ;;
6462     *)
6463     if test "$GXX" = yes; then
6464     if test "$with_gnu_ld" = no; then
6465 michael 1106 _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'
6466 michael 945 else
6467 michael 1106 _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'
6468 michael 945 fi
6469     fi
6470     _LT_TAGVAR(link_all_deplibs, $1)=yes
6471     ;;
6472     esac
6473     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6474     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6475     _LT_TAGVAR(inherit_rpath, $1)=yes
6476     ;;
6477    
6478 michael 1094 linux* | k*bsd*-gnu | kopensolaris*-gnu)
6479 michael 945 case $cc_basename in
6480     KCC*)
6481     # Kuck and Associates, Inc. (KAI) C++ Compiler
6482    
6483     # KCC will only create a shared library if the output file
6484     # ends with ".so" (or ".sl" for HP-UX), so rename the library
6485     # to its proper name (with version) after linking.
6486     _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'
6487     _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'
6488     # Commands to make compiler produce verbose output that lists
6489     # what "hidden" libraries, object files and flags are used when
6490     # linking a shared library.
6491     #
6492     # There doesn't appear to be a way to prevent this compiler from
6493     # explicitly linking system object files so we need to strip them
6494     # from the output so that they don't get included in the library
6495     # dependencies.
6496 michael 1094 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"'
6497 michael 945
6498     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6499     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6500    
6501     # Archives containing C++ object files must be created using
6502     # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6503     _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6504     ;;
6505     icpc* | ecpc* )
6506     # Intel C++
6507     with_gnu_ld=yes
6508     # version 8.0 and above of icpc choke on multiply defined symbols
6509     # if we add $predep_objects and $postdep_objects, however 7.1 and
6510     # earlier do not add the objects themselves.
6511     case `$CC -V 2>&1` in
6512     *"Version 7."*)
6513     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6514     _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'
6515     ;;
6516     *) # Version 8.0 or newer
6517     tmp_idyn=
6518     case $host_cpu in
6519     ia64*) tmp_idyn=' -i_dynamic';;
6520     esac
6521     _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6522     _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'
6523     ;;
6524     esac
6525     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6526     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6527     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6528     _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6529     ;;
6530     pgCC* | pgcpp*)
6531     # Portland Group C++ compiler
6532     case `$CC -V` in
6533 michael 1094 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6534 michael 945 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6535     rm -rf $tpldir~
6536     $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6537 michael 1094 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6538 michael 945 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6539     rm -rf $tpldir~
6540     $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6541 michael 1094 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6542 michael 945 $RANLIB $oldlib'
6543     _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6544     rm -rf $tpldir~
6545     $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6546 michael 1094 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6547 michael 945 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6548     rm -rf $tpldir~
6549     $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6550 michael 1094 $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'
6551 michael 945 ;;
6552 michael 1094 *) # Version 6 and above use weak symbols
6553 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6554     _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'
6555     ;;
6556     esac
6557    
6558     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6559     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6560 michael 1094 _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'
6561 michael 945 ;;
6562     cxx*)
6563     # Compaq C++
6564     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6565     _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'
6566    
6567     runpath_var=LD_RUN_PATH
6568     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6569     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6570    
6571     # Commands to make compiler produce verbose output that lists
6572     # what "hidden" libraries, object files and flags are used when
6573     # linking a shared library.
6574     #
6575     # There doesn't appear to be a way to prevent this compiler from
6576     # explicitly linking system object files so we need to strip them
6577     # from the output so that they don't get included in the library
6578     # dependencies.
6579 michael 1094 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'
6580 michael 945 ;;
6581 michael 1094 xl* | mpixl* | bgxl*)
6582 michael 945 # IBM XL 8.0 on PPC, with GNU ld
6583     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6584     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6585     _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6586     if test "x$supports_anon_versioning" = xyes; then
6587     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6588     cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6589     echo "local: *; };" >> $output_objdir/$libname.ver~
6590     $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6591     fi
6592     ;;
6593     *)
6594     case `$CC -V 2>&1 | sed 5q` in
6595     *Sun\ C*)
6596     # Sun C++ 5.9
6597     _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6598     _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6599     _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'
6600     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6601 michael 1094 _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'
6602 michael 945 _LT_TAGVAR(compiler_needs_object, $1)=yes
6603    
6604     # Not sure whether something based on
6605     # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6606     # would be better.
6607 michael 1094 output_verbose_link_cmd='func_echo_all'
6608 michael 945
6609     # Archives containing C++ object files must be created using
6610     # "CC -xar", where "CC" is the Sun C++ compiler. This is
6611     # necessary to make sure instantiated templates are included
6612     # in the archive.
6613     _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6614     ;;
6615     esac
6616     ;;
6617     esac
6618     ;;
6619    
6620     lynxos*)
6621     # FIXME: insert proper C++ library support
6622     _LT_TAGVAR(ld_shlibs, $1)=no
6623     ;;
6624    
6625     m88k*)
6626     # FIXME: insert proper C++ library support
6627     _LT_TAGVAR(ld_shlibs, $1)=no
6628     ;;
6629    
6630     mvs*)
6631     case $cc_basename in
6632     cxx*)
6633     # FIXME: insert proper C++ library support
6634     _LT_TAGVAR(ld_shlibs, $1)=no
6635     ;;
6636     *)
6637     # FIXME: insert proper C++ library support
6638     _LT_TAGVAR(ld_shlibs, $1)=no
6639     ;;
6640     esac
6641     ;;
6642    
6643     netbsd*)
6644     if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6645     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6646     wlarc=
6647     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6648     _LT_TAGVAR(hardcode_direct, $1)=yes
6649     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6650     fi
6651     # Workaround some broken pre-1.5 toolchains
6652     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6653     ;;
6654    
6655     *nto* | *qnx*)
6656     _LT_TAGVAR(ld_shlibs, $1)=yes
6657     ;;
6658    
6659     openbsd2*)
6660     # C++ shared libraries are fairly broken
6661     _LT_TAGVAR(ld_shlibs, $1)=no
6662     ;;
6663    
6664     openbsd*)
6665     if test -f /usr/libexec/ld.so; then
6666     _LT_TAGVAR(hardcode_direct, $1)=yes
6667     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6668     _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6669     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6670     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6671     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6672     _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'
6673     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6674     _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6675     fi
6676 michael 1094 output_verbose_link_cmd=func_echo_all
6677 michael 945 else
6678     _LT_TAGVAR(ld_shlibs, $1)=no
6679     fi
6680     ;;
6681    
6682     osf3* | osf4* | osf5*)
6683     case $cc_basename in
6684     KCC*)
6685     # Kuck and Associates, Inc. (KAI) C++ Compiler
6686    
6687     # KCC will only create a shared library if the output file
6688     # ends with ".so" (or ".sl" for HP-UX), so rename the library
6689     # to its proper name (with version) after linking.
6690     _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'
6691    
6692     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6693     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6694    
6695     # Archives containing C++ object files must be created using
6696     # the KAI C++ compiler.
6697     case $host in
6698     osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6699     *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6700     esac
6701     ;;
6702     RCC*)
6703     # Rational C++ 2.4.1
6704     # FIXME: insert proper C++ library support
6705     _LT_TAGVAR(ld_shlibs, $1)=no
6706     ;;
6707     cxx*)
6708     case $host in
6709     osf3*)
6710     _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6711 michael 1094 _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'
6712 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6713     ;;
6714     *)
6715     _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6716 michael 1094 _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'
6717 michael 945 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6718     echo "-hidden">> $lib.exp~
6719 michael 1094 $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~
6720 michael 945 $RM $lib.exp'
6721     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6722     ;;
6723     esac
6724    
6725     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6726    
6727     # Commands to make compiler produce verbose output that lists
6728     # what "hidden" libraries, object files and flags are used when
6729     # linking a shared library.
6730     #
6731     # There doesn't appear to be a way to prevent this compiler from
6732     # explicitly linking system object files so we need to strip them
6733     # from the output so that they don't get included in the library
6734     # dependencies.
6735 michael 1094 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"'
6736 michael 945 ;;
6737     *)
6738     if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6739     _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6740     case $host in
6741     osf3*)
6742 michael 1094 _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'
6743 michael 945 ;;
6744     *)
6745 michael 1106 _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'
6746 michael 945 ;;
6747     esac
6748    
6749     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6750     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6751    
6752     # Commands to make compiler produce verbose output that lists
6753     # what "hidden" libraries, object files and flags are used when
6754     # linking a shared library.
6755 michael 1094 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6756 michael 945
6757     else
6758     # FIXME: insert proper C++ library support
6759     _LT_TAGVAR(ld_shlibs, $1)=no
6760     fi
6761     ;;
6762     esac
6763     ;;
6764    
6765     psos*)
6766     # FIXME: insert proper C++ library support
6767     _LT_TAGVAR(ld_shlibs, $1)=no
6768     ;;
6769    
6770     sunos4*)
6771     case $cc_basename in
6772     CC*)
6773     # Sun C++ 4.x
6774     # FIXME: insert proper C++ library support
6775     _LT_TAGVAR(ld_shlibs, $1)=no
6776     ;;
6777     lcc*)
6778     # Lucid
6779     # FIXME: insert proper C++ library support
6780     _LT_TAGVAR(ld_shlibs, $1)=no
6781     ;;
6782     *)
6783     # FIXME: insert proper C++ library support
6784     _LT_TAGVAR(ld_shlibs, $1)=no
6785     ;;
6786     esac
6787     ;;
6788    
6789     solaris*)
6790     case $cc_basename in
6791 michael 1094 CC* | sunCC*)
6792 michael 945 # Sun C++ 4.2, 5.x and Centerline C++
6793     _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6794     _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6795     _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6796     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6797     $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'
6798    
6799     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6800     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6801     case $host_os in
6802     solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6803     *)
6804     # The compiler driver will combine and reorder linker options,
6805     # but understands `-z linker_flag'.
6806     # Supported since Solaris 2.6 (maybe 2.5.1?)
6807     _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6808     ;;
6809     esac
6810     _LT_TAGVAR(link_all_deplibs, $1)=yes
6811    
6812 michael 1094 output_verbose_link_cmd='func_echo_all'
6813 michael 945
6814     # Archives containing C++ object files must be created using
6815     # "CC -xar", where "CC" is the Sun C++ compiler. This is
6816     # necessary to make sure instantiated templates are included
6817     # in the archive.
6818     _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6819     ;;
6820     gcx*)
6821     # Green Hills C++ Compiler
6822     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6823    
6824     # The C++ compiler must be used to create the archive.
6825     _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6826     ;;
6827     *)
6828     # GNU C++ compiler with Solaris linker
6829     if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6830     _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6831     if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6832 michael 1106 _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'
6833 michael 945 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6834 michael 1106 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6835 michael 945
6836     # Commands to make compiler produce verbose output that lists
6837     # what "hidden" libraries, object files and flags are used when
6838     # linking a shared library.
6839 michael 1094 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6840 michael 945 else
6841     # g++ 2.7 appears to require `-G' NOT `-shared' on this
6842     # platform.
6843     _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6844     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6845     $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6846    
6847     # Commands to make compiler produce verbose output that lists
6848     # what "hidden" libraries, object files and flags are used when
6849     # linking a shared library.
6850 michael 1094 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6851 michael 945 fi
6852    
6853     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6854     case $host_os in
6855     solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6856     *)
6857     _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6858     ;;
6859     esac
6860     fi
6861     ;;
6862     esac
6863     ;;
6864    
6865     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6866     _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6867     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6868     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6869     runpath_var='LD_RUN_PATH'
6870    
6871     case $cc_basename in
6872     CC*)
6873     _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6874     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6875     ;;
6876     *)
6877     _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6878     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6879     ;;
6880     esac
6881     ;;
6882    
6883     sysv5* | sco3.2v5* | sco5v6*)
6884     # Note: We can NOT use -z defs as we might desire, because we do not
6885     # link with -lc, and that would cause any symbols used from libc to
6886     # always be unresolved, which means just about no library would
6887     # ever link correctly. If we're not using GNU ld we use -z text
6888     # though, which does catch some bad symbols but isn't as heavy-handed
6889     # as -z defs.
6890     _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6891     _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6892     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6893     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6894     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6895     _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6896     _LT_TAGVAR(link_all_deplibs, $1)=yes
6897     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6898     runpath_var='LD_RUN_PATH'
6899    
6900     case $cc_basename in
6901     CC*)
6902     _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6903     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6904 michael 1094 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6905     '"$_LT_TAGVAR(old_archive_cmds, $1)"
6906     _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6907     '"$_LT_TAGVAR(reload_cmds, $1)"
6908 michael 945 ;;
6909     *)
6910     _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6911     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6912     ;;
6913     esac
6914     ;;
6915    
6916     tandem*)
6917     case $cc_basename in
6918     NCC*)
6919     # NonStop-UX NCC 3.20
6920     # FIXME: insert proper C++ library support
6921     _LT_TAGVAR(ld_shlibs, $1)=no
6922     ;;
6923     *)
6924     # FIXME: insert proper C++ library support
6925     _LT_TAGVAR(ld_shlibs, $1)=no
6926     ;;
6927     esac
6928     ;;
6929    
6930     vxworks*)
6931     # FIXME: insert proper C++ library support
6932     _LT_TAGVAR(ld_shlibs, $1)=no
6933     ;;
6934    
6935     *)
6936     # FIXME: insert proper C++ library support
6937     _LT_TAGVAR(ld_shlibs, $1)=no
6938     ;;
6939     esac
6940    
6941     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6942     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6943    
6944     _LT_TAGVAR(GCC, $1)="$GXX"
6945     _LT_TAGVAR(LD, $1)="$LD"
6946    
6947     ## CAVEAT EMPTOR:
6948     ## There is no encapsulation within the following macros, do not change
6949     ## the running order or otherwise move them around unless you know exactly
6950     ## what you are doing...
6951     _LT_SYS_HIDDEN_LIBDEPS($1)
6952     _LT_COMPILER_PIC($1)
6953     _LT_COMPILER_C_O($1)
6954     _LT_COMPILER_FILE_LOCKS($1)
6955     _LT_LINKER_SHLIBS($1)
6956     _LT_SYS_DYNAMIC_LINKER($1)
6957     _LT_LINKER_HARDCODE_LIBPATH($1)
6958    
6959     _LT_CONFIG($1)
6960     fi # test -n "$compiler"
6961    
6962     CC=$lt_save_CC
6963 michael 1106 CFLAGS=$lt_save_CFLAGS
6964 michael 945 LDCXX=$LD
6965     LD=$lt_save_LD
6966     GCC=$lt_save_GCC
6967     with_gnu_ld=$lt_save_with_gnu_ld
6968     lt_cv_path_LDCXX=$lt_cv_path_LD
6969     lt_cv_path_LD=$lt_save_path_LD
6970     lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6971     lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6972     fi # test "$_lt_caught_CXX_error" != yes
6973    
6974     AC_LANG_POP
6975     ])# _LT_LANG_CXX_CONFIG
6976    
6977    
6978 michael 1106 # _LT_FUNC_STRIPNAME_CNF
6979     # ----------------------
6980     # func_stripname_cnf prefix suffix name
6981     # strip PREFIX and SUFFIX off of NAME.
6982     # PREFIX and SUFFIX must not contain globbing or regex special
6983     # characters, hashes, percent signs, but SUFFIX may contain a leading
6984     # dot (in which case that matches only a dot).
6985     #
6986     # This function is identical to the (non-XSI) version of func_stripname,
6987     # except this one can be used by m4 code that may be executed by configure,
6988     # rather than the libtool script.
6989     m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6990     AC_REQUIRE([_LT_DECL_SED])
6991     AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6992     func_stripname_cnf ()
6993     {
6994     case ${2} in
6995     .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6996     *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6997     esac
6998     } # func_stripname_cnf
6999     ])# _LT_FUNC_STRIPNAME_CNF
7000    
7001 michael 945 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7002     # ---------------------------------
7003     # Figure out "hidden" library dependencies from verbose
7004     # compiler output when linking a shared library.
7005     # Parse the compiler output and extract the necessary
7006     # objects, libraries and library flags.
7007     m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7008     [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7009 michael 1106 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7010 michael 945 # Dependencies to place before and after the object being linked:
7011     _LT_TAGVAR(predep_objects, $1)=
7012     _LT_TAGVAR(postdep_objects, $1)=
7013     _LT_TAGVAR(predeps, $1)=
7014     _LT_TAGVAR(postdeps, $1)=
7015     _LT_TAGVAR(compiler_lib_search_path, $1)=
7016    
7017     dnl we can't use the lt_simple_compile_test_code here,
7018     dnl because it contains code intended for an executable,
7019     dnl not a library. It's possible we should let each
7020     dnl tag define a new lt_????_link_test_code variable,
7021     dnl but it's only used here...
7022     m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7023     int a;
7024     void foo (void) { a = 0; }
7025     _LT_EOF
7026     ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7027     class Foo
7028     {
7029     public:
7030     Foo (void) { a = 0; }
7031     private:
7032     int a;
7033     };
7034     _LT_EOF
7035     ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7036     subroutine foo
7037     implicit none
7038     integer*4 a
7039     a=0
7040     return
7041     end
7042     _LT_EOF
7043     ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7044     subroutine foo
7045     implicit none
7046     integer a
7047     a=0
7048     return
7049     end
7050     _LT_EOF
7051     ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7052     public class foo {
7053     private int a;
7054     public void bar (void) {
7055     a = 0;
7056     }
7057     };
7058     _LT_EOF
7059 michael 1257 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7060     package foo
7061     func foo() {
7062     }
7063     _LT_EOF
7064 michael 912 ])
7065 michael 1106
7066     _lt_libdeps_save_CFLAGS=$CFLAGS
7067     case "$CC $CFLAGS " in #(
7068     *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7069     *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7070 michael 1257 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7071 michael 1106 esac
7072    
7073 michael 945 dnl Parse the compiler output and extract the necessary
7074     dnl objects, libraries and library flags.
7075     if AC_TRY_EVAL(ac_compile); then
7076     # Parse the compiler output and extract the necessary
7077     # objects, libraries and library flags.
7078 michael 912
7079 michael 945 # Sentinel used to keep track of whether or not we are before
7080     # the conftest object file.
7081     pre_test_object_deps_done=no
7082 michael 912
7083 michael 945 for p in `eval "$output_verbose_link_cmd"`; do
7084 michael 1106 case ${prev}${p} in
7085 michael 912
7086 michael 945 -L* | -R* | -l*)
7087     # Some compilers place space between "-{L,R}" and the path.
7088     # Remove the space.
7089     if test $p = "-L" ||
7090     test $p = "-R"; then
7091     prev=$p
7092     continue
7093     fi
7094    
7095 michael 1106 # Expand the sysroot to ease extracting the directories later.
7096     if test -z "$prev"; then
7097     case $p in
7098     -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7099     -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7100     -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7101     esac
7102     fi
7103     case $p in
7104     =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7105     esac
7106 michael 945 if test "$pre_test_object_deps_done" = no; then
7107 michael 1106 case ${prev} in
7108     -L | -R)
7109 michael 945 # Internal compiler library paths should come after those
7110     # provided the user. The postdeps already come after the
7111     # user supplied libs so there is no need to process them.
7112     if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7113     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7114     else
7115     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7116     fi
7117     ;;
7118     # The "-l" case would never come before the object being
7119     # linked, so don't bother handling this case.
7120     esac
7121     else
7122     if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7123     _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7124     else
7125     _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7126     fi
7127     fi
7128 michael 1106 prev=
7129 michael 945 ;;
7130    
7131 michael 1106 *.lto.$objext) ;; # Ignore GCC LTO objects
7132 michael 945 *.$objext)
7133     # This assumes that the test object file only shows up
7134     # once in the compiler output.
7135     if test "$p" = "conftest.$objext"; then
7136     pre_test_object_deps_done=yes
7137     continue
7138     fi
7139    
7140     if test "$pre_test_object_deps_done" = no; then
7141     if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7142     _LT_TAGVAR(predep_objects, $1)="$p"
7143     else
7144     _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7145     fi
7146     else
7147     if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7148     _LT_TAGVAR(postdep_objects, $1)="$p"
7149     else
7150     _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7151     fi
7152     fi
7153     ;;
7154    
7155     *) ;; # Ignore the rest.
7156    
7157     esac
7158     done
7159    
7160     # Clean up.
7161     rm -f a.out a.exe
7162 michael 912 else
7163 michael 945 echo "libtool.m4: error: problem compiling $1 test program"
7164 michael 912 fi
7165    
7166 michael 945 $RM -f confest.$objext
7167 michael 1106 CFLAGS=$_lt_libdeps_save_CFLAGS
7168 michael 912
7169 michael 945 # PORTME: override above test on systems where it is broken
7170     m4_if([$1], [CXX],
7171     [case $host_os in
7172     interix[[3-9]]*)
7173     # Interix 3.5 installs completely hosed .la files for C++, so rather than
7174     # hack all around it, let's just trust "g++" to DTRT.
7175     _LT_TAGVAR(predep_objects,$1)=
7176     _LT_TAGVAR(postdep_objects,$1)=
7177     _LT_TAGVAR(postdeps,$1)=
7178     ;;
7179    
7180     linux*)
7181     case `$CC -V 2>&1 | sed 5q` in
7182     *Sun\ C*)
7183     # Sun C++ 5.9
7184    
7185     # The more standards-conforming stlport4 library is
7186     # incompatible with the Cstd library. Avoid specifying
7187     # it if it's in CXXFLAGS. Ignore libCrun as
7188     # -library=stlport4 depends on it.
7189     case " $CXX $CXXFLAGS " in
7190     *" -library=stlport4 "*)
7191     solaris_use_stlport4=yes
7192     ;;
7193     esac
7194    
7195     if test "$solaris_use_stlport4" != yes; then
7196     _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7197     fi
7198     ;;
7199     esac
7200     ;;
7201    
7202     solaris*)
7203     case $cc_basename in
7204 michael 1094 CC* | sunCC*)
7205 michael 945 # The more standards-conforming stlport4 library is
7206     # incompatible with the Cstd library. Avoid specifying
7207     # it if it's in CXXFLAGS. Ignore libCrun as
7208     # -library=stlport4 depends on it.
7209     case " $CXX $CXXFLAGS " in
7210     *" -library=stlport4 "*)
7211     solaris_use_stlport4=yes
7212     ;;
7213     esac
7214    
7215     # Adding this requires a known-good setup of shared libraries for
7216     # Sun compiler versions before 5.6, else PIC objects from an old
7217     # archive will be linked into the output, leading to subtle bugs.
7218     if test "$solaris_use_stlport4" != yes; then
7219     _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7220     fi
7221     ;;
7222     esac
7223     ;;
7224     esac
7225     ])
7226    
7227     case " $_LT_TAGVAR(postdeps, $1) " in
7228     *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7229     esac
7230     _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7231     if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7232     _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7233     fi
7234     _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7235     [The directories searched by this compiler when creating a shared library])
7236     _LT_TAGDECL([], [predep_objects], [1],
7237     [Dependencies to place before and after the objects being linked to
7238     create a shared library])
7239     _LT_TAGDECL([], [postdep_objects], [1])
7240     _LT_TAGDECL([], [predeps], [1])
7241     _LT_TAGDECL([], [postdeps], [1])
7242     _LT_TAGDECL([], [compiler_lib_search_path], [1],
7243     [The library search path used internally by the compiler when linking
7244     a shared library])
7245     ])# _LT_SYS_HIDDEN_LIBDEPS
7246    
7247    
7248     # _LT_LANG_F77_CONFIG([TAG])
7249     # --------------------------
7250     # Ensure that the configuration variables for a Fortran 77 compiler are
7251     # suitably defined. These variables are subsequently used by _LT_CONFIG
7252     # to write the compiler configuration to `libtool'.
7253     m4_defun([_LT_LANG_F77_CONFIG],
7254 michael 1094 [AC_LANG_PUSH(Fortran 77)
7255     if test -z "$F77" || test "X$F77" = "Xno"; then
7256     _lt_disable_F77=yes
7257     fi
7258 michael 945
7259     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7260     _LT_TAGVAR(allow_undefined_flag, $1)=
7261     _LT_TAGVAR(always_export_symbols, $1)=no
7262     _LT_TAGVAR(archive_expsym_cmds, $1)=
7263     _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7264     _LT_TAGVAR(hardcode_direct, $1)=no
7265     _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7266     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7267     _LT_TAGVAR(hardcode_libdir_separator, $1)=
7268     _LT_TAGVAR(hardcode_minus_L, $1)=no
7269     _LT_TAGVAR(hardcode_automatic, $1)=no
7270     _LT_TAGVAR(inherit_rpath, $1)=no
7271     _LT_TAGVAR(module_cmds, $1)=
7272     _LT_TAGVAR(module_expsym_cmds, $1)=
7273     _LT_TAGVAR(link_all_deplibs, $1)=unknown
7274     _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7275 michael 1094 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7276     _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7277 michael 945 _LT_TAGVAR(no_undefined_flag, $1)=
7278     _LT_TAGVAR(whole_archive_flag_spec, $1)=
7279     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7280    
7281     # Source file extension for f77 test sources.
7282     ac_ext=f
7283    
7284     # Object file extension for compiled f77 test sources.
7285     objext=o
7286     _LT_TAGVAR(objext, $1)=$objext
7287    
7288     # No sense in running all these tests if we already determined that
7289     # the F77 compiler isn't working. Some variables (like enable_shared)
7290     # are currently assumed to apply to all compilers on this platform,
7291     # and will be corrupted by setting them based on a non-working compiler.
7292     if test "$_lt_disable_F77" != yes; then
7293     # Code to be used in simple compile tests
7294     lt_simple_compile_test_code="\
7295     subroutine t
7296     return
7297     end
7298     "
7299    
7300     # Code to be used in simple link tests
7301     lt_simple_link_test_code="\
7302     program t
7303     end
7304     "
7305    
7306     # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7307     _LT_TAG_COMPILER
7308    
7309     # save warnings/boilerplate of simple test code
7310     _LT_COMPILER_BOILERPLATE
7311     _LT_LINKER_BOILERPLATE
7312    
7313     # Allow CC to be a program name with arguments.
7314     lt_save_CC="$CC"
7315     lt_save_GCC=$GCC
7316 michael 1106 lt_save_CFLAGS=$CFLAGS
7317 michael 945 CC=${F77-"f77"}
7318 michael 1106 CFLAGS=$FFLAGS
7319 michael 945 compiler=$CC
7320     _LT_TAGVAR(compiler, $1)=$CC
7321     _LT_CC_BASENAME([$compiler])
7322     GCC=$G77
7323     if test -n "$compiler"; then
7324     AC_MSG_CHECKING([if libtool supports shared libraries])
7325     AC_MSG_RESULT([$can_build_shared])
7326    
7327     AC_MSG_CHECKING([whether to build shared libraries])
7328     test "$can_build_shared" = "no" && enable_shared=no
7329    
7330     # On AIX, shared libraries and static libraries use the same namespace, and
7331     # are all built from PIC.
7332     case $host_os in
7333     aix3*)
7334     test "$enable_shared" = yes && enable_static=no
7335     if test -n "$RANLIB"; then
7336     archive_cmds="$archive_cmds~\$RANLIB \$lib"
7337     postinstall_cmds='$RANLIB $lib'
7338     fi
7339     ;;
7340     aix[[4-9]]*)
7341     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7342     test "$enable_shared" = yes && enable_static=no
7343     fi
7344     ;;
7345     esac
7346     AC_MSG_RESULT([$enable_shared])
7347    
7348     AC_MSG_CHECKING([whether to build static libraries])
7349     # Make sure either enable_shared or enable_static is yes.
7350     test "$enable_shared" = yes || enable_static=yes
7351     AC_MSG_RESULT([$enable_static])
7352    
7353     _LT_TAGVAR(GCC, $1)="$G77"
7354     _LT_TAGVAR(LD, $1)="$LD"
7355    
7356     ## CAVEAT EMPTOR:
7357     ## There is no encapsulation within the following macros, do not change
7358     ## the running order or otherwise move them around unless you know exactly
7359     ## what you are doing...
7360     _LT_COMPILER_PIC($1)
7361     _LT_COMPILER_C_O($1)
7362     _LT_COMPILER_FILE_LOCKS($1)
7363     _LT_LINKER_SHLIBS($1)
7364     _LT_SYS_DYNAMIC_LINKER($1)
7365     _LT_LINKER_HARDCODE_LIBPATH($1)
7366    
7367     _LT_CONFIG($1)
7368     fi # test -n "$compiler"
7369    
7370     GCC=$lt_save_GCC
7371     CC="$lt_save_CC"
7372 michael 1106 CFLAGS="$lt_save_CFLAGS"
7373 michael 945 fi # test "$_lt_disable_F77" != yes
7374    
7375     AC_LANG_POP
7376     ])# _LT_LANG_F77_CONFIG
7377    
7378    
7379     # _LT_LANG_FC_CONFIG([TAG])
7380     # -------------------------
7381     # Ensure that the configuration variables for a Fortran compiler are
7382     # suitably defined. These variables are subsequently used by _LT_CONFIG
7383     # to write the compiler configuration to `libtool'.
7384     m4_defun([_LT_LANG_FC_CONFIG],
7385 michael 1094 [AC_LANG_PUSH(Fortran)
7386 michael 945
7387 michael 1094 if test -z "$FC" || test "X$FC" = "Xno"; then
7388     _lt_disable_FC=yes
7389     fi
7390    
7391 michael 945 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7392     _LT_TAGVAR(allow_undefined_flag, $1)=
7393     _LT_TAGVAR(always_export_symbols, $1)=no
7394     _LT_TAGVAR(archive_expsym_cmds, $1)=
7395     _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7396     _LT_TAGVAR(hardcode_direct, $1)=no
7397     _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7398     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7399     _LT_TAGVAR(hardcode_libdir_separator, $1)=
7400     _LT_TAGVAR(hardcode_minus_L, $1)=no
7401     _LT_TAGVAR(hardcode_automatic, $1)=no
7402     _LT_TAGVAR(inherit_rpath, $1)=no
7403     _LT_TAGVAR(module_cmds, $1)=
7404     _LT_TAGVAR(module_expsym_cmds, $1)=
7405     _LT_TAGVAR(link_all_deplibs, $1)=unknown
7406     _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7407 michael 1094 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7408     _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7409 michael 945 _LT_TAGVAR(no_undefined_flag, $1)=
7410     _LT_TAGVAR(whole_archive_flag_spec, $1)=
7411     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7412    
7413     # Source file extension for fc test sources.
7414     ac_ext=${ac_fc_srcext-f}
7415    
7416     # Object file extension for compiled fc test sources.
7417     objext=o
7418     _LT_TAGVAR(objext, $1)=$objext
7419    
7420     # No sense in running all these tests if we already determined that
7421     # the FC compiler isn't working. Some variables (like enable_shared)
7422     # are currently assumed to apply to all compilers on this platform,
7423     # and will be corrupted by setting them based on a non-working compiler.
7424     if test "$_lt_disable_FC" != yes; then
7425     # Code to be used in simple compile tests
7426     lt_simple_compile_test_code="\
7427     subroutine t
7428     return
7429     end
7430     "
7431    
7432     # Code to be used in simple link tests
7433     lt_simple_link_test_code="\
7434     program t
7435     end
7436     "
7437    
7438     # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7439     _LT_TAG_COMPILER
7440    
7441     # save warnings/boilerplate of simple test code
7442     _LT_COMPILER_BOILERPLATE
7443     _LT_LINKER_BOILERPLATE
7444    
7445     # Allow CC to be a program name with arguments.
7446     lt_save_CC="$CC"
7447     lt_save_GCC=$GCC
7448 michael 1106 lt_save_CFLAGS=$CFLAGS
7449 michael 945 CC=${FC-"f95"}
7450 michael 1106 CFLAGS=$FCFLAGS
7451 michael 945 compiler=$CC
7452     GCC=$ac_cv_fc_compiler_gnu
7453    
7454     _LT_TAGVAR(compiler, $1)=$CC
7455     _LT_CC_BASENAME([$compiler])
7456    
7457     if test -n "$compiler"; then
7458     AC_MSG_CHECKING([if libtool supports shared libraries])
7459     AC_MSG_RESULT([$can_build_shared])
7460    
7461     AC_MSG_CHECKING([whether to build shared libraries])
7462     test "$can_build_shared" = "no" && enable_shared=no
7463    
7464     # On AIX, shared libraries and static libraries use the same namespace, and
7465     # are all built from PIC.
7466     case $host_os in
7467     aix3*)
7468     test "$enable_shared" = yes && enable_static=no
7469     if test -n "$RANLIB"; then
7470     archive_cmds="$archive_cmds~\$RANLIB \$lib"
7471     postinstall_cmds='$RANLIB $lib'
7472     fi
7473     ;;
7474     aix[[4-9]]*)
7475     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7476     test "$enable_shared" = yes && enable_static=no
7477     fi
7478     ;;
7479     esac
7480     AC_MSG_RESULT([$enable_shared])
7481    
7482     AC_MSG_CHECKING([whether to build static libraries])
7483     # Make sure either enable_shared or enable_static is yes.
7484     test "$enable_shared" = yes || enable_static=yes
7485     AC_MSG_RESULT([$enable_static])
7486    
7487     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7488     _LT_TAGVAR(LD, $1)="$LD"
7489    
7490     ## CAVEAT EMPTOR:
7491     ## There is no encapsulation within the following macros, do not change
7492     ## the running order or otherwise move them around unless you know exactly
7493     ## what you are doing...
7494     _LT_SYS_HIDDEN_LIBDEPS($1)
7495     _LT_COMPILER_PIC($1)
7496     _LT_COMPILER_C_O($1)
7497     _LT_COMPILER_FILE_LOCKS($1)
7498     _LT_LINKER_SHLIBS($1)
7499     _LT_SYS_DYNAMIC_LINKER($1)
7500     _LT_LINKER_HARDCODE_LIBPATH($1)
7501    
7502     _LT_CONFIG($1)
7503     fi # test -n "$compiler"
7504    
7505     GCC=$lt_save_GCC
7506 michael 1106 CC=$lt_save_CC
7507     CFLAGS=$lt_save_CFLAGS
7508 michael 945 fi # test "$_lt_disable_FC" != yes
7509    
7510     AC_LANG_POP
7511     ])# _LT_LANG_FC_CONFIG
7512    
7513    
7514     # _LT_LANG_GCJ_CONFIG([TAG])
7515     # --------------------------
7516     # Ensure that the configuration variables for the GNU Java Compiler compiler
7517     # are suitably defined. These variables are subsequently used by _LT_CONFIG
7518     # to write the compiler configuration to `libtool'.
7519     m4_defun([_LT_LANG_GCJ_CONFIG],
7520     [AC_REQUIRE([LT_PROG_GCJ])dnl
7521     AC_LANG_SAVE
7522    
7523     # Source file extension for Java test sources.
7524     ac_ext=java
7525    
7526     # Object file extension for compiled Java test sources.
7527     objext=o
7528     _LT_TAGVAR(objext, $1)=$objext
7529    
7530     # Code to be used in simple compile tests
7531     lt_simple_compile_test_code="class foo {}"
7532    
7533     # Code to be used in simple link tests
7534     lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7535    
7536     # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7537     _LT_TAG_COMPILER
7538    
7539 michael 1072 # save warnings/boilerplate of simple test code
7540     _LT_COMPILER_BOILERPLATE
7541     _LT_LINKER_BOILERPLATE
7542    
7543 michael 945 # Allow CC to be a program name with arguments.
7544 michael 1106 lt_save_CC=$CC
7545     lt_save_CFLAGS=$CFLAGS
7546 michael 945 lt_save_GCC=$GCC
7547     GCC=yes
7548     CC=${GCJ-"gcj"}
7549 michael 1106 CFLAGS=$GCJFLAGS
7550 michael 945 compiler=$CC
7551     _LT_TAGVAR(compiler, $1)=$CC
7552     _LT_TAGVAR(LD, $1)="$LD"
7553     _LT_CC_BASENAME([$compiler])
7554    
7555     # GCJ did not exist at the time GCC didn't implicitly link libc in.
7556     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7557    
7558     _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7559 michael 1094 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7560     _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7561 michael 945
7562     if test -n "$compiler"; then
7563     _LT_COMPILER_NO_RTTI($1)
7564     _LT_COMPILER_PIC($1)
7565     _LT_COMPILER_C_O($1)
7566     _LT_COMPILER_FILE_LOCKS($1)
7567     _LT_LINKER_SHLIBS($1)
7568     _LT_LINKER_HARDCODE_LIBPATH($1)
7569    
7570     _LT_CONFIG($1)
7571     fi
7572    
7573     AC_LANG_RESTORE
7574    
7575     GCC=$lt_save_GCC
7576 michael 1106 CC=$lt_save_CC
7577     CFLAGS=$lt_save_CFLAGS
7578 michael 945 ])# _LT_LANG_GCJ_CONFIG
7579    
7580    
7581 michael 1257 # _LT_LANG_GO_CONFIG([TAG])
7582     # --------------------------
7583     # Ensure that the configuration variables for the GNU Go compiler
7584     # are suitably defined. These variables are subsequently used by _LT_CONFIG
7585     # to write the compiler configuration to `libtool'.
7586     m4_defun([_LT_LANG_GO_CONFIG],
7587     [AC_REQUIRE([LT_PROG_GO])dnl
7588     AC_LANG_SAVE
7589    
7590     # Source file extension for Go test sources.
7591     ac_ext=go
7592    
7593     # Object file extension for compiled Go test sources.
7594     objext=o
7595     _LT_TAGVAR(objext, $1)=$objext
7596    
7597     # Code to be used in simple compile tests
7598     lt_simple_compile_test_code="package main; func main() { }"
7599    
7600     # Code to be used in simple link tests
7601     lt_simple_link_test_code='package main; func main() { }'
7602    
7603     # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7604     _LT_TAG_COMPILER
7605    
7606     # save warnings/boilerplate of simple test code
7607     _LT_COMPILER_BOILERPLATE
7608     _LT_LINKER_BOILERPLATE
7609    
7610     # Allow CC to be a program name with arguments.
7611     lt_save_CC=$CC
7612     lt_save_CFLAGS=$CFLAGS
7613     lt_save_GCC=$GCC
7614     GCC=yes
7615     CC=${GOC-"gccgo"}
7616     CFLAGS=$GOFLAGS
7617     compiler=$CC
7618     _LT_TAGVAR(compiler, $1)=$CC
7619     _LT_TAGVAR(LD, $1)="$LD"
7620     _LT_CC_BASENAME([$compiler])
7621    
7622     # Go did not exist at the time GCC didn't implicitly link libc in.
7623     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7624    
7625     _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7626     _LT_TAGVAR(reload_flag, $1)=$reload_flag
7627     _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7628    
7629     if test -n "$compiler"; then
7630     _LT_COMPILER_NO_RTTI($1)
7631     _LT_COMPILER_PIC($1)
7632     _LT_COMPILER_C_O($1)
7633     _LT_COMPILER_FILE_LOCKS($1)
7634     _LT_LINKER_SHLIBS($1)
7635     _LT_LINKER_HARDCODE_LIBPATH($1)
7636    
7637     _LT_CONFIG($1)
7638     fi
7639    
7640     AC_LANG_RESTORE
7641    
7642     GCC=$lt_save_GCC
7643     CC=$lt_save_CC
7644     CFLAGS=$lt_save_CFLAGS
7645     ])# _LT_LANG_GO_CONFIG
7646    
7647    
7648 michael 945 # _LT_LANG_RC_CONFIG([TAG])
7649     # -------------------------
7650     # Ensure that the configuration variables for the Windows resource compiler
7651     # are suitably defined. These variables are subsequently used by _LT_CONFIG
7652     # to write the compiler configuration to `libtool'.
7653     m4_defun([_LT_LANG_RC_CONFIG],
7654     [AC_REQUIRE([LT_PROG_RC])dnl
7655     AC_LANG_SAVE
7656    
7657     # Source file extension for RC test sources.
7658     ac_ext=rc
7659    
7660     # Object file extension for compiled RC test sources.
7661     objext=o
7662     _LT_TAGVAR(objext, $1)=$objext
7663    
7664     # Code to be used in simple compile tests
7665     lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7666    
7667     # Code to be used in simple link tests
7668     lt_simple_link_test_code="$lt_simple_compile_test_code"
7669    
7670     # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7671     _LT_TAG_COMPILER
7672    
7673     # save warnings/boilerplate of simple test code
7674     _LT_COMPILER_BOILERPLATE
7675     _LT_LINKER_BOILERPLATE
7676    
7677     # Allow CC to be a program name with arguments.
7678     lt_save_CC="$CC"
7679 michael 1106 lt_save_CFLAGS=$CFLAGS
7680 michael 945 lt_save_GCC=$GCC
7681     GCC=
7682     CC=${RC-"windres"}
7683 michael 1106 CFLAGS=
7684 michael 945 compiler=$CC
7685     _LT_TAGVAR(compiler, $1)=$CC
7686     _LT_CC_BASENAME([$compiler])
7687     _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7688    
7689     if test -n "$compiler"; then
7690     :
7691     _LT_CONFIG($1)
7692     fi
7693    
7694     GCC=$lt_save_GCC
7695     AC_LANG_RESTORE
7696 michael 1106 CC=$lt_save_CC
7697     CFLAGS=$lt_save_CFLAGS
7698 michael 945 ])# _LT_LANG_RC_CONFIG
7699    
7700    
7701     # LT_PROG_GCJ
7702     # -----------
7703     AC_DEFUN([LT_PROG_GCJ],
7704     [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7705     [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7706     [AC_CHECK_TOOL(GCJ, gcj,)
7707     test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7708     AC_SUBST(GCJFLAGS)])])[]dnl
7709     ])
7710    
7711     # Old name:
7712     AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7713     dnl aclocal-1.4 backwards compatibility:
7714     dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7715    
7716    
7717 michael 1257 # LT_PROG_GO
7718     # ----------
7719     AC_DEFUN([LT_PROG_GO],
7720     [AC_CHECK_TOOL(GOC, gccgo,)
7721     ])
7722    
7723    
7724 michael 945 # LT_PROG_RC
7725     # ----------
7726     AC_DEFUN([LT_PROG_RC],
7727     [AC_CHECK_TOOL(RC, windres,)
7728     ])
7729    
7730     # Old name:
7731     AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7732     dnl aclocal-1.4 backwards compatibility:
7733     dnl AC_DEFUN([LT_AC_PROG_RC], [])
7734    
7735    
7736     # _LT_DECL_EGREP
7737     # --------------
7738     # If we don't have a new enough Autoconf to choose the best grep
7739     # available, choose the one first in the user's PATH.
7740     m4_defun([_LT_DECL_EGREP],
7741     [AC_REQUIRE([AC_PROG_EGREP])dnl
7742     AC_REQUIRE([AC_PROG_FGREP])dnl
7743     test -z "$GREP" && GREP=grep
7744     _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7745     _LT_DECL([], [EGREP], [1], [An ERE matcher])
7746     _LT_DECL([], [FGREP], [1], [A literal string matcher])
7747     dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7748     AC_SUBST([GREP])
7749     ])
7750    
7751    
7752     # _LT_DECL_OBJDUMP
7753     # --------------
7754     # If we don't have a new enough Autoconf to choose the best objdump
7755     # available, choose the one first in the user's PATH.
7756     m4_defun([_LT_DECL_OBJDUMP],
7757     [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7758     test -z "$OBJDUMP" && OBJDUMP=objdump
7759     _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7760     AC_SUBST([OBJDUMP])
7761     ])
7762    
7763 michael 1106 # _LT_DECL_DLLTOOL
7764     # ----------------
7765     # Ensure DLLTOOL variable is set.
7766     m4_defun([_LT_DECL_DLLTOOL],
7767     [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7768     test -z "$DLLTOOL" && DLLTOOL=dlltool
7769     _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7770     AC_SUBST([DLLTOOL])
7771     ])
7772 michael 945
7773     # _LT_DECL_SED
7774     # ------------
7775     # Check for a fully-functional sed program, that truncates
7776     # as few characters as possible. Prefer GNU sed if found.
7777     m4_defun([_LT_DECL_SED],
7778     [AC_PROG_SED
7779     test -z "$SED" && SED=sed
7780     Xsed="$SED -e 1s/^X//"
7781     _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7782     _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7783     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7784     ])# _LT_DECL_SED
7785    
7786     m4_ifndef([AC_PROG_SED], [
7787 michael 912 # NOTE: This macro has been submitted for inclusion into #
7788     # GNU Autoconf as AC_PROG_SED. When it is available in #
7789     # a released version of Autoconf we should remove this #
7790     # macro and use it instead. #
7791 michael 945
7792     m4_defun([AC_PROG_SED],
7793 michael 912 [AC_MSG_CHECKING([for a sed that does not truncate output])
7794     AC_CACHE_VAL(lt_cv_path_SED,
7795     [# Loop through the user's path and test for sed and gsed.
7796     # Then use that list of sed's as ones to test for truncation.
7797     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7798     for as_dir in $PATH
7799     do
7800     IFS=$as_save_IFS
7801     test -z "$as_dir" && as_dir=.
7802     for lt_ac_prog in sed gsed; do
7803     for ac_exec_ext in '' $ac_executable_extensions; do
7804 michael 945 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7805 michael 912 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7806     fi
7807     done
7808     done
7809     done
7810     IFS=$as_save_IFS
7811     lt_ac_max=0
7812     lt_ac_count=0
7813     # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7814     # along with /bin/sed that truncates output.
7815     for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7816     test ! -f $lt_ac_sed && continue
7817     cat /dev/null > conftest.in
7818     lt_ac_count=0
7819     echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7820     # Check for GNU sed and select it if it is found.
7821     if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7822     lt_cv_path_SED=$lt_ac_sed
7823     break
7824     fi
7825     while true; do
7826     cat conftest.in conftest.in >conftest.tmp
7827     mv conftest.tmp conftest.in
7828     cp conftest.in conftest.nl
7829     echo >>conftest.nl
7830     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7831     cmp -s conftest.out conftest.nl || break
7832     # 10000 chars as input seems more than enough
7833     test $lt_ac_count -gt 10 && break
7834     lt_ac_count=`expr $lt_ac_count + 1`
7835     if test $lt_ac_count -gt $lt_ac_max; then
7836     lt_ac_max=$lt_ac_count
7837     lt_cv_path_SED=$lt_ac_sed
7838     fi
7839     done
7840     done
7841     ])
7842     SED=$lt_cv_path_SED
7843     AC_SUBST([SED])
7844     AC_MSG_RESULT([$SED])
7845 michael 945 ])#AC_PROG_SED
7846     ])#m4_ifndef
7847    
7848     # Old name:
7849     AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7850     dnl aclocal-1.4 backwards compatibility:
7851     dnl AC_DEFUN([LT_AC_PROG_SED], [])
7852    
7853    
7854     # _LT_CHECK_SHELL_FEATURES
7855     # ------------------------
7856     # Find out whether the shell is Bourne or XSI compatible,
7857     # or has some other useful features.
7858     m4_defun([_LT_CHECK_SHELL_FEATURES],
7859     [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7860     # Try some XSI features
7861     xsi_shell=no
7862     ( _lt_dummy="a/b/c"
7863 michael 1106 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7864     = c,a/b,b/c, \
7865 michael 945 && eval 'test $(( 1 + 1 )) -eq 2 \
7866     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7867     && xsi_shell=yes
7868     AC_MSG_RESULT([$xsi_shell])
7869     _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7870    
7871     AC_MSG_CHECKING([whether the shell understands "+="])
7872     lt_shell_append=no
7873     ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7874     >/dev/null 2>&1 \
7875     && lt_shell_append=yes
7876     AC_MSG_RESULT([$lt_shell_append])
7877     _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7878    
7879     if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7880     lt_unset=unset
7881     else
7882     lt_unset=false
7883     fi
7884     _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7885    
7886     # test EBCDIC or ASCII
7887     case `echo X|tr X '\101'` in
7888     A) # ASCII based system
7889     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7890     lt_SP2NL='tr \040 \012'
7891     lt_NL2SP='tr \015\012 \040\040'
7892     ;;
7893     *) # EBCDIC based system
7894     lt_SP2NL='tr \100 \n'
7895     lt_NL2SP='tr \r\n \100\100'
7896     ;;
7897     esac
7898     _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7899     _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7900     ])# _LT_CHECK_SHELL_FEATURES
7901    
7902    
7903 michael 1106 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7904     # ------------------------------------------------------
7905     # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7906     # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7907     m4_defun([_LT_PROG_FUNCTION_REPLACE],
7908     [dnl {
7909     sed -e '/^$1 ()$/,/^} # $1 /c\
7910     $1 ()\
7911     {\
7912     m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7913     } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7914     && mv -f "$cfgfile.tmp" "$cfgfile" \
7915     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7916     test 0 -eq $? || _lt_function_replace_fail=:
7917     ])
7918 michael 945
7919    
7920 michael 1106 # _LT_PROG_REPLACE_SHELLFNS
7921     # -------------------------
7922     # Replace existing portable implementations of several shell functions with
7923     # equivalent extended shell implementations where those features are available..
7924     m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7925     [if test x"$xsi_shell" = xyes; then
7926     _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7927     case ${1} in
7928     */*) func_dirname_result="${1%/*}${2}" ;;
7929     * ) func_dirname_result="${3}" ;;
7930     esac])
7931 michael 945
7932 michael 1106 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7933     func_basename_result="${1##*/}"])
7934 michael 945
7935 michael 1106 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7936     case ${1} in
7937     */*) func_dirname_result="${1%/*}${2}" ;;
7938     * ) func_dirname_result="${3}" ;;
7939     esac
7940     func_basename_result="${1##*/}"])
7941 michael 945
7942 michael 1106 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7943     # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7944     # positional parameters, so assign one to ordinary parameter first.
7945     func_stripname_result=${3}
7946     func_stripname_result=${func_stripname_result#"${1}"}
7947     func_stripname_result=${func_stripname_result%"${2}"}])
7948 michael 945
7949 michael 1106 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7950     func_split_long_opt_name=${1%%=*}
7951     func_split_long_opt_arg=${1#*=}])
7952 michael 945
7953 michael 1106 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7954     func_split_short_opt_arg=${1#??}
7955     func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7956 michael 945
7957 michael 1106 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7958     case ${1} in
7959     *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7960     *) func_lo2o_result=${1} ;;
7961     esac])
7962 michael 945
7963 michael 1106 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7964 michael 945
7965 michael 1106 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7966 michael 945
7967 michael 1106 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7968     fi
7969 michael 945
7970 michael 1106 if test x"$lt_shell_append" = xyes; then
7971     _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7972 michael 945
7973 michael 1106 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7974     func_quote_for_eval "${2}"
7975     dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7976     eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7977 michael 945
7978 michael 1106 # Save a `func_append' function call where possible by direct use of '+='
7979     sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7980     && mv -f "$cfgfile.tmp" "$cfgfile" \
7981     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7982     test 0 -eq $? || _lt_function_replace_fail=:
7983     else
7984     # Save a `func_append' function call even when '+=' is not available
7985     sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7986     && mv -f "$cfgfile.tmp" "$cfgfile" \
7987     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7988     test 0 -eq $? || _lt_function_replace_fail=:
7989     fi
7990 michael 945
7991 michael 1106 if test x"$_lt_function_replace_fail" = x":"; then
7992     AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7993     fi
7994     ])
7995 michael 945
7996 michael 1106 # _LT_PATH_CONVERSION_FUNCTIONS
7997     # -----------------------------
7998     # Determine which file name conversion functions should be used by
7999     # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8000     # for certain cross-compile configurations and native mingw.
8001     m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8002     [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8003     AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8004     AC_MSG_CHECKING([how to convert $build file names to $host format])
8005     AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8006     [case $host in
8007     *-*-mingw* )
8008     case $build in
8009     *-*-mingw* ) # actually msys
8010     lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8011     ;;
8012     *-*-cygwin* )
8013     lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8014     ;;
8015     * ) # otherwise, assume *nix
8016     lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8017     ;;
8018     esac
8019     ;;
8020     *-*-cygwin* )
8021     case $build in
8022     *-*-mingw* ) # actually msys
8023     lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8024     ;;
8025     *-*-cygwin* )
8026     lt_cv_to_host_file_cmd=func_convert_file_noop
8027     ;;
8028     * ) # otherwise, assume *nix
8029     lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8030     ;;
8031     esac
8032     ;;
8033     * ) # unhandled hosts (and "normal" native builds)
8034     lt_cv_to_host_file_cmd=func_convert_file_noop
8035     ;;
8036 michael 945 esac
8037 michael 1106 ])
8038     to_host_file_cmd=$lt_cv_to_host_file_cmd
8039     AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8040     _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8041     [0], [convert $build file names to $host format])dnl
8042 michael 945
8043 michael 1106 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8044     AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8045     [#assume ordinary cross tools, or native build.
8046     lt_cv_to_tool_file_cmd=func_convert_file_noop
8047     case $host in
8048     *-*-mingw* )
8049     case $build in
8050     *-*-mingw* ) # actually msys
8051     lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8052     ;;
8053     esac
8054 michael 945 ;;
8055 michael 1106 esac
8056 michael 912 ])
8057 michael 1106 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8058     AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8059     _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8060     [0], [convert $build files to toolchain format])dnl
8061     ])# _LT_PATH_CONVERSION_FUNCTIONS
8062 michael 912
8063 michael 945 # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
8064 michael 912 #
8065 michael 1257 # Copyright (C) 1999-2006, 2007, 2008, 2011 Free Software Foundation, Inc.
8066 michael 945 # Written by Thomas Tanner, 1999
8067     #
8068     # This file is free software; the Free Software Foundation gives
8069     # unlimited permission to copy and/or distribute it, with or without
8070     # modifications, as long as this notice is preserved.
8071    
8072 michael 1094 # serial 18 LTDL_INIT
8073 michael 945
8074     # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
8075     # ------------------------------------------
8076     # DIRECTORY contains the libltdl sources. It is okay to call this
8077     # function multiple times, as long as the same DIRECTORY is always given.
8078     AC_DEFUN([LT_CONFIG_LTDL_DIR],
8079     [AC_BEFORE([$0], [LTDL_INIT])
8080     _$0($*)
8081     ])# LT_CONFIG_LTDL_DIR
8082    
8083     # We break this out into a separate macro, so that we can call it safely
8084     # internally without being caught accidentally by the sed scan in libtoolize.
8085     m4_defun([_LT_CONFIG_LTDL_DIR],
8086     [dnl remove trailing slashes
8087     m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
8088     m4_case(_LTDL_DIR,
8089     [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
8090     m4_if(_ARG_DIR, [.],
8091     [],
8092     [m4_define([_LTDL_DIR], _ARG_DIR)
8093     _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
8094     [m4_if(_ARG_DIR, _LTDL_DIR,
8095     [],
8096     [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
8097     m4_popdef([_ARG_DIR])
8098     ])# _LT_CONFIG_LTDL_DIR
8099    
8100     # Initialise:
8101     m4_define([_LTDL_DIR], [])
8102    
8103    
8104     # _LT_BUILD_PREFIX
8105     # ----------------
8106     # If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
8107     # to `${top_builddir}/'.
8108     m4_define([_LT_BUILD_PREFIX],
8109     [m4_ifdef([AC_AUTOCONF_VERSION],
8110     [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
8111     [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
8112     [${top_build_prefix}],
8113     [${top_builddir}/])],
8114     [${top_build_prefix}])],
8115     [${top_builddir}/])[]dnl
8116     ])
8117    
8118    
8119     # LTDL_CONVENIENCE
8120     # ----------------
8121     # sets LIBLTDL to the link flags for the libltdl convenience library and
8122     # LTDLINCL to the include flags for the libltdl header and adds
8123     # --enable-ltdl-convenience to the configure arguments. Note that
8124     # AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
8125     # '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
8126     # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
8127     # quotes!). If your package is not flat and you're not using automake,
8128     # define top_build_prefix, top_builddir, and top_srcdir appropriately
8129     # in your Makefiles.
8130     AC_DEFUN([LTDL_CONVENIENCE],
8131     [AC_BEFORE([$0], [LTDL_INIT])dnl
8132     dnl Although the argument is deprecated and no longer documented,
8133     dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
8134     dnl here make sure it is the same as any other declaration of libltdl's
8135     dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
8136     dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8137     m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8138     _$0()
8139     ])# LTDL_CONVENIENCE
8140    
8141     # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
8142     # now we have LT_CONFIG_LTDL_DIR:
8143     AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
8144     [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8145     _LTDL_CONVENIENCE])
8146    
8147     dnl aclocal-1.4 backwards compatibility:
8148     dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
8149    
8150    
8151     # _LTDL_CONVENIENCE
8152     # -----------------
8153     # Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
8154     m4_defun([_LTDL_CONVENIENCE],
8155     [case $enable_ltdl_convenience in
8156     no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8157     "") enable_ltdl_convenience=yes
8158     ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8159     esac
8160     LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
8161     LTDLDEPS=$LIBLTDL
8162     LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8163    
8164     AC_SUBST([LIBLTDL])
8165     AC_SUBST([LTDLDEPS])
8166     AC_SUBST([LTDLINCL])
8167    
8168     # For backwards non-gettext consistent compatibility...
8169     INCLTDL="$LTDLINCL"
8170     AC_SUBST([INCLTDL])
8171     ])# _LTDL_CONVENIENCE
8172    
8173    
8174     # LTDL_INSTALLABLE
8175     # ----------------
8176     # sets LIBLTDL to the link flags for the libltdl installable library
8177     # and LTDLINCL to the include flags for the libltdl header and adds
8178     # --enable-ltdl-install to the configure arguments. Note that
8179     # AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
8180     # is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
8181     # available, otherwise with '${top_builddir}/', and LTDLINCL will be
8182     # prefixed with '${top_srcdir}/' (note the single quotes!). If your
8183     # package is not flat and you're not using automake, define top_build_prefix,
8184     # top_builddir, and top_srcdir appropriately in your Makefiles.
8185     # In the future, this macro may have to be called after LT_INIT.
8186     AC_DEFUN([LTDL_INSTALLABLE],
8187     [AC_BEFORE([$0], [LTDL_INIT])dnl
8188     dnl Although the argument is deprecated and no longer documented,
8189     dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
8190     dnl here make sure it is the same as any other declaration of libltdl's
8191     dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
8192     dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8193     m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8194     _$0()
8195     ])# LTDL_INSTALLABLE
8196    
8197     # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
8198     # now we have LT_CONFIG_LTDL_DIR:
8199     AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
8200     [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8201     _LTDL_INSTALLABLE])
8202    
8203     dnl aclocal-1.4 backwards compatibility:
8204     dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
8205    
8206    
8207     # _LTDL_INSTALLABLE
8208     # -----------------
8209     # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
8210     m4_defun([_LTDL_INSTALLABLE],
8211 michael 1084 [if test -f $prefix/lib/libltdl.la; then
8212     lt_save_LDFLAGS="$LDFLAGS"
8213     LDFLAGS="-L$prefix/lib $LDFLAGS"
8214     AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
8215     LDFLAGS="$lt_save_LDFLAGS"
8216 michael 945 if test x"${lt_lib_ltdl-no}" = xyes; then
8217     if test x"$enable_ltdl_install" != xyes; then
8218 michael 1084 # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
8219     AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
8220 michael 945 enable_ltdl_install=no
8221     fi
8222     elif test x"$enable_ltdl_install" = xno; then
8223     AC_MSG_WARN([libltdl not installed, but installation disabled])
8224     fi
8225 michael 1084 fi
8226 michael 945
8227     # If configure.ac declared an installable ltdl, and the user didn't override
8228     # with --disable-ltdl-install, we will install the shipped libltdl.
8229     case $enable_ltdl_install in
8230     no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8231     LIBLTDL="-lltdl"
8232     LTDLDEPS=
8233     LTDLINCL=
8234     ;;
8235     *) enable_ltdl_install=yes
8236     ac_configure_args="$ac_configure_args --enable-ltdl-install"
8237     LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
8238     LTDLDEPS=$LIBLTDL
8239     LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8240     ;;
8241     esac
8242    
8243     AC_SUBST([LIBLTDL])
8244     AC_SUBST([LTDLDEPS])
8245     AC_SUBST([LTDLINCL])
8246    
8247     # For backwards non-gettext consistent compatibility...
8248     INCLTDL="$LTDLINCL"
8249     AC_SUBST([INCLTDL])
8250     ])# LTDL_INSTALLABLE
8251    
8252    
8253     # _LTDL_MODE_DISPATCH
8254     # -------------------
8255     m4_define([_LTDL_MODE_DISPATCH],
8256     [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
8257     m4_if(_LTDL_DIR, [],
8258     [],
8259     dnl if _LTDL_MODE was not set already, the default value is `subproject':
8260     [m4_case(m4_default(_LTDL_MODE, [subproject]),
8261     [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
8262     _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
8263     [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
8264     [recursive], [],
8265     [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
8266     dnl Be careful not to expand twice:
8267     m4_define([$0], [])
8268     ])# _LTDL_MODE_DISPATCH
8269    
8270    
8271     # _LT_LIBOBJ(MODULE_NAME)
8272     # -----------------------
8273     # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
8274     # of into LIBOBJS.
8275     AC_DEFUN([_LT_LIBOBJ], [
8276     m4_pattern_allow([^_LT_LIBOBJS$])
8277     _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
8278     ])# _LT_LIBOBJS
8279    
8280    
8281     # LTDL_INIT([OPTIONS])
8282     # --------------------
8283     # Clients of libltdl can use this macro to allow the installer to
8284     # choose between a shipped copy of the ltdl sources or a preinstalled
8285     # version of the library. If the shipped ltdl sources are not in a
8286     # subdirectory named libltdl, the directory name must be given by
8287     # LT_CONFIG_LTDL_DIR.
8288     AC_DEFUN([LTDL_INIT],
8289     [dnl Parse OPTIONS
8290     _LT_SET_OPTIONS([$0], [$1])
8291    
8292     dnl We need to keep our own list of libobjs separate from our parent project,
8293     dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
8294     dnl we look for our own LIBOBJs.
8295     m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
8296     m4_pushdef([AC_LIBSOURCES])
8297    
8298     dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
8299     m4_if(_LTDL_MODE, [],
8300     [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
8301     m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
8302     [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
8303    
8304     AC_ARG_WITH([included_ltdl],
8305     [AS_HELP_STRING([--with-included-ltdl],
8306     [use the GNU ltdl sources included here])])
8307    
8308     if test "x$with_included_ltdl" != xyes; then
8309     # We are not being forced to use the included libltdl sources, so
8310     # decide whether there is a useful installed version we can use.
8311     AC_CHECK_HEADER([ltdl.h],
8312     [AC_CHECK_DECL([lt_dlinterface_register],
8313     [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
8314     [with_included_ltdl=no],
8315     [with_included_ltdl=yes])],
8316     [with_included_ltdl=yes],
8317     [AC_INCLUDES_DEFAULT
8318     #include <ltdl.h>])],
8319     [with_included_ltdl=yes],
8320     [AC_INCLUDES_DEFAULT]
8321     )
8322     fi
8323    
8324     dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
8325     dnl was called yet, then for old times' sake, we assume libltdl is in an
8326     dnl eponymous directory:
8327     AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
8328    
8329     AC_ARG_WITH([ltdl_include],
8330     [AS_HELP_STRING([--with-ltdl-include=DIR],
8331     [use the ltdl headers installed in DIR])])
8332    
8333     if test -n "$with_ltdl_include"; then
8334     if test -f "$with_ltdl_include/ltdl.h"; then :
8335     else
8336     AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
8337     fi
8338     else
8339     with_ltdl_include=no
8340     fi
8341    
8342     AC_ARG_WITH([ltdl_lib],
8343     [AS_HELP_STRING([--with-ltdl-lib=DIR],
8344     [use the libltdl.la installed in DIR])])
8345    
8346     if test -n "$with_ltdl_lib"; then
8347     if test -f "$with_ltdl_lib/libltdl.la"; then :
8348     else
8349     AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
8350     fi
8351     else
8352     with_ltdl_lib=no
8353     fi
8354    
8355     case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
8356     ,yes,no,no,)
8357     m4_case(m4_default(_LTDL_TYPE, [convenience]),
8358     [convenience], [_LTDL_CONVENIENCE],
8359     [installable], [_LTDL_INSTALLABLE],
8360     [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
8361     ;;
8362     ,no,no,no,)
8363     # If the included ltdl is not to be used, then use the
8364     # preinstalled libltdl we found.
8365     AC_DEFINE([HAVE_LTDL], [1],
8366     [Define this if a modern libltdl is already installed])
8367     LIBLTDL=-lltdl
8368     LTDLDEPS=
8369     LTDLINCL=
8370     ;;
8371     ,no*,no,*)
8372     AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
8373     ;;
8374     *) with_included_ltdl=no
8375     LIBLTDL="-L$with_ltdl_lib -lltdl"
8376     LTDLDEPS=
8377     LTDLINCL="-I$with_ltdl_include"
8378     ;;
8379     esac
8380     INCLTDL="$LTDLINCL"
8381    
8382     # Report our decision...
8383     AC_MSG_CHECKING([where to find libltdl headers])
8384     AC_MSG_RESULT([$LTDLINCL])
8385     AC_MSG_CHECKING([where to find libltdl library])
8386     AC_MSG_RESULT([$LIBLTDL])
8387    
8388     _LTDL_SETUP
8389    
8390     dnl restore autoconf definition.
8391     m4_popdef([AC_LIBOBJ])
8392     m4_popdef([AC_LIBSOURCES])
8393    
8394     AC_CONFIG_COMMANDS_PRE([
8395     _ltdl_libobjs=
8396     _ltdl_ltlibobjs=
8397     if test -n "$_LT_LIBOBJS"; then
8398     # Remove the extension.
8399     _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
8400     for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
8401     _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
8402     _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
8403     done
8404     fi
8405     AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
8406     AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
8407     ])
8408    
8409     # Only expand once:
8410     m4_define([LTDL_INIT])
8411     ])# LTDL_INIT
8412    
8413     # Old names:
8414     AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
8415     AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
8416     AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
8417     dnl aclocal-1.4 backwards compatibility:
8418     dnl AC_DEFUN([AC_LIB_LTDL], [])
8419     dnl AC_DEFUN([AC_WITH_LTDL], [])
8420     dnl AC_DEFUN([LT_WITH_LTDL], [])
8421    
8422    
8423     # _LTDL_SETUP
8424     # -----------
8425     # Perform all the checks necessary for compilation of the ltdl objects
8426     # -- including compiler checks and header checks. This is a public
8427     # interface mainly for the benefit of libltdl's own configure.ac, most
8428     # other users should call LTDL_INIT instead.
8429     AC_DEFUN([_LTDL_SETUP],
8430     [AC_REQUIRE([AC_PROG_CC])dnl
8431     AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
8432     AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
8433     AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
8434     AC_REQUIRE([LT_LIB_DLLOAD])dnl
8435     AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8436     AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
8437     AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
8438     AC_REQUIRE([gl_FUNC_ARGZ])dnl
8439    
8440     m4_require([_LT_CHECK_OBJDIR])dnl
8441     m4_require([_LT_HEADER_DLFCN])dnl
8442     m4_require([_LT_CHECK_DLPREOPEN])dnl
8443     m4_require([_LT_DECL_SED])dnl
8444    
8445     dnl Don't require this, or it will be expanded earlier than the code
8446     dnl that sets the variables it relies on:
8447     _LT_ENABLE_INSTALL
8448    
8449     dnl _LTDL_MODE specific code must be called at least once:
8450     _LTDL_MODE_DISPATCH
8451    
8452     # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
8453     # the user used. This is so that ltdl.h can pick up the parent projects
8454     # config.h file, The first file in AC_CONFIG_HEADERS must contain the
8455     # definitions required by ltdl.c.
8456     # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
8457     AC_CONFIG_COMMANDS_PRE([dnl
8458     m4_pattern_allow([^LT_CONFIG_H$])dnl
8459     m4_ifset([AH_HEADER],
8460     [LT_CONFIG_H=AH_HEADER],
8461     [m4_ifset([AC_LIST_HEADERS],
8462     [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
8463     [])])])
8464     AC_SUBST([LT_CONFIG_H])
8465    
8466     AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
8467     [], [], [AC_INCLUDES_DEFAULT])
8468    
8469     AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
8470     AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
8471    
8472 michael 1094 m4_pattern_allow([LT_LIBEXT])dnl
8473 michael 945 AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
8474    
8475 michael 1106 name=
8476     eval "lt_libprefix=\"$libname_spec\""
8477     m4_pattern_allow([LT_LIBPREFIX])dnl
8478     AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
8479    
8480 michael 945 name=ltdl
8481 michael 1106 eval "LTDLOPEN=\"$libname_spec\""
8482 michael 945 AC_SUBST([LTDLOPEN])
8483     ])# _LTDL_SETUP
8484    
8485    
8486     # _LT_ENABLE_INSTALL
8487     # ------------------
8488     m4_define([_LT_ENABLE_INSTALL],
8489     [AC_ARG_ENABLE([ltdl-install],
8490     [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
8491    
8492     case ,${enable_ltdl_install},${enable_ltdl_convenience} in
8493     *yes*) ;;
8494     *) enable_ltdl_convenience=yes ;;
8495     esac
8496    
8497     m4_ifdef([AM_CONDITIONAL],
8498     [AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
8499     AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
8500     ])# _LT_ENABLE_INSTALL
8501    
8502    
8503     # LT_SYS_DLOPEN_DEPLIBS
8504     # ---------------------
8505     AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
8506     [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8507     AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
8508     [lt_cv_sys_dlopen_deplibs],
8509     [# PORTME does your system automatically load deplibs for dlopen?
8510     # or its logical equivalent (e.g. shl_load for HP-UX < 11)
8511     # For now, we just catch OSes we know something about -- in the
8512     # future, we'll try test this programmatically.
8513     lt_cv_sys_dlopen_deplibs=unknown
8514     case $host_os in
8515     aix3*|aix4.1.*|aix4.2.*)
8516     # Unknown whether this is true for these versions of AIX, but
8517     # we want this `case' here to explicitly catch those versions.
8518     lt_cv_sys_dlopen_deplibs=unknown
8519     ;;
8520     aix[[4-9]]*)
8521     lt_cv_sys_dlopen_deplibs=yes
8522     ;;
8523     amigaos*)
8524     case $host_cpu in
8525     powerpc)
8526     lt_cv_sys_dlopen_deplibs=no
8527     ;;
8528     esac
8529     ;;
8530     darwin*)
8531     # Assuming the user has installed a libdl from somewhere, this is true
8532     # If you are looking for one http://www.opendarwin.org/projects/dlcompat
8533     lt_cv_sys_dlopen_deplibs=yes
8534     ;;
8535     freebsd* | dragonfly*)
8536     lt_cv_sys_dlopen_deplibs=yes
8537     ;;
8538 michael 1094 gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
8539 michael 945 # GNU and its variants, using gnu ld.so (Glibc)
8540     lt_cv_sys_dlopen_deplibs=yes
8541     ;;
8542     hpux10*|hpux11*)
8543     lt_cv_sys_dlopen_deplibs=yes
8544     ;;
8545     interix*)
8546     lt_cv_sys_dlopen_deplibs=yes
8547     ;;
8548     irix[[12345]]*|irix6.[[01]]*)
8549     # Catch all versions of IRIX before 6.2, and indicate that we don't
8550     # know how it worked for any of those versions.
8551     lt_cv_sys_dlopen_deplibs=unknown
8552     ;;
8553     irix*)
8554     # The case above catches anything before 6.2, and it's known that
8555     # at 6.2 and later dlopen does load deplibs.
8556     lt_cv_sys_dlopen_deplibs=yes
8557     ;;
8558     netbsd*)
8559     lt_cv_sys_dlopen_deplibs=yes
8560     ;;
8561     openbsd*)
8562     lt_cv_sys_dlopen_deplibs=yes
8563     ;;
8564     osf[[1234]]*)
8565     # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
8566     # it did *not* use an RPATH in a shared library to find objects the
8567     # library depends on, so we explicitly say `no'.
8568     lt_cv_sys_dlopen_deplibs=no
8569     ;;
8570     osf5.0|osf5.0a|osf5.1)
8571     # dlopen *does* load deplibs and with the right loader patch applied
8572     # it even uses RPATH in a shared library to search for shared objects
8573     # that the library depends on, but there's no easy way to know if that
8574     # patch is installed. Since this is the case, all we can really
8575     # say is unknown -- it depends on the patch being installed. If
8576     # it is, this changes to `yes'. Without it, it would be `no'.
8577     lt_cv_sys_dlopen_deplibs=unknown
8578     ;;
8579     osf*)
8580     # the two cases above should catch all versions of osf <= 5.1. Read
8581     # the comments above for what we know about them.
8582     # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
8583     # is used to find them so we can finally say `yes'.
8584     lt_cv_sys_dlopen_deplibs=yes
8585     ;;
8586     qnx*)
8587     lt_cv_sys_dlopen_deplibs=yes
8588     ;;
8589     solaris*)
8590     lt_cv_sys_dlopen_deplibs=yes
8591     ;;
8592     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8593     libltdl_cv_sys_dlopen_deplibs=yes
8594     ;;
8595     esac
8596     ])
8597     if test "$lt_cv_sys_dlopen_deplibs" != yes; then
8598     AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
8599     [Define if the OS needs help to load dependent libraries for dlopen().])
8600     fi
8601     ])# LT_SYS_DLOPEN_DEPLIBS
8602    
8603     # Old name:
8604     AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
8605     dnl aclocal-1.4 backwards compatibility:
8606     dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
8607    
8608    
8609     # LT_SYS_MODULE_EXT
8610     # -----------------
8611     AC_DEFUN([LT_SYS_MODULE_EXT],
8612     [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8613     AC_CACHE_CHECK([which extension is used for runtime loadable modules],
8614     [libltdl_cv_shlibext],
8615     [
8616     module=yes
8617     eval libltdl_cv_shlibext=$shrext_cmds
8618 michael 1257 module=no
8619     eval libltdl_cv_shrext=$shrext_cmds
8620 michael 945 ])
8621     if test -n "$libltdl_cv_shlibext"; then
8622     m4_pattern_allow([LT_MODULE_EXT])dnl
8623     AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
8624     [Define to the extension used for runtime loadable modules, say, ".so".])
8625     fi
8626 michael 1257 if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then
8627     m4_pattern_allow([LT_SHARED_EXT])dnl
8628     AC_DEFINE_UNQUOTED([LT_SHARED_EXT], ["$libltdl_cv_shrext"],
8629     [Define to the shared library suffix, say, ".dylib".])
8630     fi
8631 michael 945 ])# LT_SYS_MODULE_EXT
8632    
8633     # Old name:
8634     AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
8635     dnl aclocal-1.4 backwards compatibility:
8636     dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
8637    
8638    
8639     # LT_SYS_MODULE_PATH
8640     # ------------------
8641     AC_DEFUN([LT_SYS_MODULE_PATH],
8642     [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8643     AC_CACHE_CHECK([which variable specifies run-time module search path],
8644     [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
8645     if test -n "$lt_cv_module_path_var"; then
8646     m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
8647     AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
8648     [Define to the name of the environment variable that determines the run-time module search path.])
8649     fi
8650     ])# LT_SYS_MODULE_PATH
8651    
8652     # Old name:
8653     AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
8654     dnl aclocal-1.4 backwards compatibility:
8655     dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
8656    
8657    
8658     # LT_SYS_DLSEARCH_PATH
8659     # --------------------
8660     AC_DEFUN([LT_SYS_DLSEARCH_PATH],
8661     [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8662     AC_CACHE_CHECK([for the default library search path],
8663     [lt_cv_sys_dlsearch_path],
8664     [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
8665     if test -n "$lt_cv_sys_dlsearch_path"; then
8666     sys_dlsearch_path=
8667     for dir in $lt_cv_sys_dlsearch_path; do
8668     if test -z "$sys_dlsearch_path"; then
8669     sys_dlsearch_path="$dir"
8670     else
8671     sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
8672     fi
8673     done
8674     m4_pattern_allow([LT_DLSEARCH_PATH])dnl
8675     AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
8676     [Define to the system default library search path.])
8677     fi
8678     ])# LT_SYS_DLSEARCH_PATH
8679    
8680     # Old name:
8681     AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
8682     dnl aclocal-1.4 backwards compatibility:
8683     dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
8684    
8685    
8686     # _LT_CHECK_DLPREOPEN
8687     # -------------------
8688     m4_defun([_LT_CHECK_DLPREOPEN],
8689     [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8690     AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
8691     [libltdl_cv_preloaded_symbols],
8692     [if test -n "$lt_cv_sys_global_symbol_pipe"; then
8693     libltdl_cv_preloaded_symbols=yes
8694     else
8695     libltdl_cv_preloaded_symbols=no
8696     fi
8697     ])
8698     if test x"$libltdl_cv_preloaded_symbols" = xyes; then
8699     AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
8700     [Define if libtool can extract symbol lists from object files.])
8701     fi
8702     ])# _LT_CHECK_DLPREOPEN
8703    
8704    
8705     # LT_LIB_DLLOAD
8706     # -------------
8707     AC_DEFUN([LT_LIB_DLLOAD],
8708     [m4_pattern_allow([^LT_DLLOADERS$])
8709     LT_DLLOADERS=
8710     AC_SUBST([LT_DLLOADERS])
8711    
8712     AC_LANG_PUSH([C])
8713    
8714     LIBADD_DLOPEN=
8715     AC_SEARCH_LIBS([dlopen], [dl],
8716     [AC_DEFINE([HAVE_LIBDL], [1],
8717     [Define if you have the libdl library or equivalent.])
8718     if test "$ac_cv_search_dlopen" != "none required" ; then
8719     LIBADD_DLOPEN="-ldl"
8720     fi
8721     libltdl_cv_lib_dl_dlopen="yes"
8722     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8723     [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
8724     # include <dlfcn.h>
8725     #endif
8726     ]], [[dlopen(0, 0);]])],
8727     [AC_DEFINE([HAVE_LIBDL], [1],
8728     [Define if you have the libdl library or equivalent.])
8729     libltdl_cv_func_dlopen="yes"
8730     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8731     [AC_CHECK_LIB([svld], [dlopen],
8732     [AC_DEFINE([HAVE_LIBDL], [1],
8733     [Define if you have the libdl library or equivalent.])
8734     LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
8735     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
8736     if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
8737     then
8738     lt_save_LIBS="$LIBS"
8739     LIBS="$LIBS $LIBADD_DLOPEN"
8740     AC_CHECK_FUNCS([dlerror])
8741     LIBS="$lt_save_LIBS"
8742     fi
8743     AC_SUBST([LIBADD_DLOPEN])
8744    
8745     LIBADD_SHL_LOAD=
8746     AC_CHECK_FUNC([shl_load],
8747     [AC_DEFINE([HAVE_SHL_LOAD], [1],
8748     [Define if you have the shl_load function.])
8749     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
8750     [AC_CHECK_LIB([dld], [shl_load],
8751     [AC_DEFINE([HAVE_SHL_LOAD], [1],
8752     [Define if you have the shl_load function.])
8753     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
8754     LIBADD_SHL_LOAD="-ldld"])])
8755     AC_SUBST([LIBADD_SHL_LOAD])
8756    
8757     case $host_os in
8758     darwin[[1567]].*)
8759     # We only want this for pre-Mac OS X 10.4.
8760     AC_CHECK_FUNC([_dyld_func_lookup],
8761     [AC_DEFINE([HAVE_DYLD], [1],
8762     [Define if you have the _dyld_func_lookup function.])
8763     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
8764     ;;
8765     beos*)
8766     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
8767     ;;
8768     cygwin* | mingw* | os2* | pw32*)
8769     AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
8770     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
8771     ;;
8772     esac
8773    
8774     AC_CHECK_LIB([dld], [dld_link],
8775     [AC_DEFINE([HAVE_DLD], [1],
8776     [Define if you have the GNU dld library.])
8777     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
8778     AC_SUBST([LIBADD_DLD_LINK])
8779    
8780     m4_pattern_allow([^LT_DLPREOPEN$])
8781     LT_DLPREOPEN=
8782     if test -n "$LT_DLLOADERS"
8783     then
8784     for lt_loader in $LT_DLLOADERS; do
8785     LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
8786     done
8787     AC_DEFINE([HAVE_LIBDLLOADER], [1],
8788     [Define if libdlloader will be built on this platform])
8789     fi
8790     AC_SUBST([LT_DLPREOPEN])
8791    
8792     dnl This isn't used anymore, but set it for backwards compatibility
8793     LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
8794     AC_SUBST([LIBADD_DL])
8795    
8796     AC_LANG_POP
8797     ])# LT_LIB_DLLOAD
8798    
8799     # Old name:
8800     AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
8801     dnl aclocal-1.4 backwards compatibility:
8802     dnl AC_DEFUN([AC_LTDL_DLLIB], [])
8803    
8804    
8805     # LT_SYS_SYMBOL_USCORE
8806     # --------------------
8807     # does the compiler prefix global symbols with an underscore?
8808     AC_DEFUN([LT_SYS_SYMBOL_USCORE],
8809     [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8810     AC_CACHE_CHECK([for _ prefix in compiled symbols],
8811     [lt_cv_sys_symbol_underscore],
8812     [lt_cv_sys_symbol_underscore=no
8813     cat > conftest.$ac_ext <<_LT_EOF
8814     void nm_test_func(){}
8815     int main(){nm_test_func;return 0;}
8816     _LT_EOF
8817     if AC_TRY_EVAL(ac_compile); then
8818     # Now try to grab the symbols.
8819     ac_nlist=conftest.nm
8820     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
8821     # See whether the symbols have a leading underscore.
8822     if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
8823     lt_cv_sys_symbol_underscore=yes
8824     else
8825     if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
8826     :
8827     else
8828     echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
8829     fi
8830     fi
8831     else
8832     echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
8833     fi
8834     else
8835     echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
8836     cat conftest.c >&AS_MESSAGE_LOG_FD
8837     fi
8838     rm -rf conftest*
8839     ])
8840     sys_symbol_underscore=$lt_cv_sys_symbol_underscore
8841     AC_SUBST([sys_symbol_underscore])
8842     ])# LT_SYS_SYMBOL_USCORE
8843    
8844     # Old name:
8845     AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
8846     dnl aclocal-1.4 backwards compatibility:
8847     dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
8848    
8849    
8850     # LT_FUNC_DLSYM_USCORE
8851     # --------------------
8852     AC_DEFUN([LT_FUNC_DLSYM_USCORE],
8853     [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8854     if test x"$lt_cv_sys_symbol_underscore" = xyes; then
8855     if test x"$libltdl_cv_func_dlopen" = xyes ||
8856     test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
8857     AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
8858     [libltdl_cv_need_uscore],
8859     [libltdl_cv_need_uscore=unknown
8860     save_LIBS="$LIBS"
8861     LIBS="$LIBS $LIBADD_DLOPEN"
8862     _LT_TRY_DLOPEN_SELF(
8863     [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
8864     [], [libltdl_cv_need_uscore=cross])
8865     LIBS="$save_LIBS"
8866     ])
8867     fi
8868     fi
8869    
8870     if test x"$libltdl_cv_need_uscore" = xyes; then
8871     AC_DEFINE([NEED_USCORE], [1],
8872     [Define if dlsym() requires a leading underscore in symbol names.])
8873     fi
8874     ])# LT_FUNC_DLSYM_USCORE
8875    
8876     # Old name:
8877     AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
8878     dnl aclocal-1.4 backwards compatibility:
8879     dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
8880    
8881     # Helper functions for option handling. -*- Autoconf -*-
8882     #
8883 michael 1094 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8884     # Inc.
8885 michael 945 # Written by Gary V. Vaughan, 2004
8886     #
8887     # This file is free software; the Free Software Foundation gives
8888     # unlimited permission to copy and/or distribute it, with or without
8889     # modifications, as long as this notice is preserved.
8890    
8891 michael 1094 # serial 7 ltoptions.m4
8892 michael 945
8893     # This is to help aclocal find these macros, as it can't see m4_define.
8894     AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8895    
8896    
8897     # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8898     # ------------------------------------------
8899     m4_define([_LT_MANGLE_OPTION],
8900     [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8901    
8902    
8903     # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8904     # ---------------------------------------
8905     # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8906     # matching handler defined, dispatch to it. Other OPTION-NAMEs are
8907     # saved as a flag.
8908     m4_define([_LT_SET_OPTION],
8909     [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8910     m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8911     _LT_MANGLE_DEFUN([$1], [$2]),
8912     [m4_warning([Unknown $1 option `$2'])])[]dnl
8913     ])
8914    
8915    
8916     # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8917     # ------------------------------------------------------------
8918     # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8919     m4_define([_LT_IF_OPTION],
8920     [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8921    
8922    
8923     # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8924     # -------------------------------------------------------
8925     # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8926     # are set.
8927     m4_define([_LT_UNLESS_OPTIONS],
8928     [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8929     [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8930     [m4_define([$0_found])])])[]dnl
8931     m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8932     ])[]dnl
8933     ])
8934    
8935    
8936     # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8937     # ----------------------------------------
8938     # OPTION-LIST is a space-separated list of Libtool options associated
8939     # with MACRO-NAME. If any OPTION has a matching handler declared with
8940     # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8941     # the unknown option and exit.
8942     m4_defun([_LT_SET_OPTIONS],
8943     [# Set options
8944     m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8945     [_LT_SET_OPTION([$1], _LT_Option)])
8946    
8947     m4_if([$1],[LT_INIT],[
8948     dnl
8949     dnl Simply set some default values (i.e off) if boolean options were not
8950     dnl specified:
8951     _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8952     ])
8953     _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8954     ])
8955     dnl
8956     dnl If no reference was made to various pairs of opposing options, then
8957     dnl we run the default mode handler for the pair. For example, if neither
8958     dnl `shared' nor `disable-shared' was passed, we enable building of shared
8959     dnl archives by default:
8960     _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8961     _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8962     _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8963     _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8964     [_LT_ENABLE_FAST_INSTALL])
8965     ])
8966     ])# _LT_SET_OPTIONS
8967    
8968    
8969    
8970     # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8971     # -----------------------------------------
8972     m4_define([_LT_MANGLE_DEFUN],
8973     [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8974    
8975    
8976     # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8977     # -----------------------------------------------
8978     m4_define([LT_OPTION_DEFINE],
8979     [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8980     ])# LT_OPTION_DEFINE
8981    
8982    
8983     # dlopen
8984     # ------
8985     LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8986     ])
8987    
8988     AU_DEFUN([AC_LIBTOOL_DLOPEN],
8989     [_LT_SET_OPTION([LT_INIT], [dlopen])
8990     AC_DIAGNOSE([obsolete],
8991     [$0: Remove this warning and the call to _LT_SET_OPTION when you
8992     put the `dlopen' option into LT_INIT's first parameter.])
8993     ])
8994    
8995     dnl aclocal-1.4 backwards compatibility:
8996     dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8997    
8998    
8999     # win32-dll
9000     # ---------
9001     # Declare package support for building win32 dll's.
9002     LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9003     [enable_win32_dll=yes
9004    
9005     case $host in
9006 michael 1094 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9007 michael 945 AC_CHECK_TOOL(AS, as, false)
9008     AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9009     AC_CHECK_TOOL(OBJDUMP, objdump, false)
9010     ;;
9011     esac
9012    
9013     test -z "$AS" && AS=as
9014 michael 1094 _LT_DECL([], [AS], [1], [Assembler program])dnl
9015 michael 945
9016     test -z "$DLLTOOL" && DLLTOOL=dlltool
9017 michael 1094 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9018 michael 945
9019     test -z "$OBJDUMP" && OBJDUMP=objdump
9020 michael 1094 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9021 michael 945 ])# win32-dll
9022    
9023     AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9024     [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9025     _LT_SET_OPTION([LT_INIT], [win32-dll])
9026     AC_DIAGNOSE([obsolete],
9027     [$0: Remove this warning and the call to _LT_SET_OPTION when you
9028     put the `win32-dll' option into LT_INIT's first parameter.])
9029     ])
9030    
9031     dnl aclocal-1.4 backwards compatibility:
9032     dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9033    
9034    
9035     # _LT_ENABLE_SHARED([DEFAULT])
9036     # ----------------------------
9037     # implement the --enable-shared flag, and supports the `shared' and
9038     # `disable-shared' LT_INIT options.
9039     # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9040     m4_define([_LT_ENABLE_SHARED],
9041     [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9042     AC_ARG_ENABLE([shared],
9043     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9044     [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9045     [p=${PACKAGE-default}
9046     case $enableval in
9047     yes) enable_shared=yes ;;
9048     no) enable_shared=no ;;
9049     *)
9050     enable_shared=no
9051     # Look at the argument we got. We use all the common list separators.
9052     lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9053     for pkg in $enableval; do
9054     IFS="$lt_save_ifs"
9055     if test "X$pkg" = "X$p"; then
9056     enable_shared=yes
9057     fi
9058     done
9059     IFS="$lt_save_ifs"
9060     ;;
9061     esac],
9062     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9063    
9064     _LT_DECL([build_libtool_libs], [enable_shared], [0],
9065     [Whether or not to build shared libraries])
9066     ])# _LT_ENABLE_SHARED
9067    
9068     LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9069     LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9070    
9071     # Old names:
9072     AC_DEFUN([AC_ENABLE_SHARED],
9073     [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9074     ])
9075    
9076     AC_DEFUN([AC_DISABLE_SHARED],
9077     [_LT_SET_OPTION([LT_INIT], [disable-shared])
9078     ])
9079    
9080     AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9081     AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9082    
9083     dnl aclocal-1.4 backwards compatibility:
9084     dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9085     dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9086    
9087    
9088    
9089     # _LT_ENABLE_STATIC([DEFAULT])
9090     # ----------------------------
9091     # implement the --enable-static flag, and support the `static' and
9092     # `disable-static' LT_INIT options.
9093     # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9094     m4_define([_LT_ENABLE_STATIC],
9095     [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9096     AC_ARG_ENABLE([static],
9097     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9098     [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9099     [p=${PACKAGE-default}
9100     case $enableval in
9101     yes) enable_static=yes ;;
9102     no) enable_static=no ;;
9103     *)
9104     enable_static=no
9105     # Look at the argument we got. We use all the common list separators.
9106     lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9107     for pkg in $enableval; do
9108     IFS="$lt_save_ifs"
9109     if test "X$pkg" = "X$p"; then
9110     enable_static=yes
9111     fi
9112     done
9113     IFS="$lt_save_ifs"
9114     ;;
9115     esac],
9116     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9117    
9118     _LT_DECL([build_old_libs], [enable_static], [0],
9119     [Whether or not to build static libraries])
9120     ])# _LT_ENABLE_STATIC
9121    
9122     LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9123     LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9124    
9125     # Old names:
9126     AC_DEFUN([AC_ENABLE_STATIC],
9127     [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9128     ])
9129    
9130     AC_DEFUN([AC_DISABLE_STATIC],
9131     [_LT_SET_OPTION([LT_INIT], [disable-static])
9132     ])
9133    
9134     AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9135     AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9136    
9137     dnl aclocal-1.4 backwards compatibility:
9138     dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9139     dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9140    
9141    
9142    
9143     # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9144     # ----------------------------------
9145     # implement the --enable-fast-install flag, and support the `fast-install'
9146     # and `disable-fast-install' LT_INIT options.
9147     # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9148     m4_define([_LT_ENABLE_FAST_INSTALL],
9149     [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9150     AC_ARG_ENABLE([fast-install],
9151     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9152     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9153     [p=${PACKAGE-default}
9154     case $enableval in
9155     yes) enable_fast_install=yes ;;
9156     no) enable_fast_install=no ;;
9157     *)
9158     enable_fast_install=no
9159     # Look at the argument we got. We use all the common list separators.
9160     lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9161     for pkg in $enableval; do
9162     IFS="$lt_save_ifs"
9163     if test "X$pkg" = "X$p"; then
9164     enable_fast_install=yes
9165     fi
9166     done
9167     IFS="$lt_save_ifs"
9168     ;;
9169     esac],
9170     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9171    
9172     _LT_DECL([fast_install], [enable_fast_install], [0],
9173     [Whether or not to optimize for fast installation])dnl
9174     ])# _LT_ENABLE_FAST_INSTALL
9175    
9176     LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9177     LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9178    
9179     # Old names:
9180     AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9181     [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9182     AC_DIAGNOSE([obsolete],
9183     [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9184     the `fast-install' option into LT_INIT's first parameter.])
9185     ])
9186    
9187     AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9188     [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9189     AC_DIAGNOSE([obsolete],
9190     [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9191     the `disable-fast-install' option into LT_INIT's first parameter.])
9192     ])
9193    
9194     dnl aclocal-1.4 backwards compatibility:
9195     dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9196     dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9197    
9198    
9199     # _LT_WITH_PIC([MODE])
9200     # --------------------
9201     # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9202     # LT_INIT options.
9203     # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9204     m4_define([_LT_WITH_PIC],
9205     [AC_ARG_WITH([pic],
9206 michael 1257 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9207 michael 945 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9208 michael 1257 [lt_p=${PACKAGE-default}
9209     case $withval in
9210     yes|no) pic_mode=$withval ;;
9211     *)
9212     pic_mode=default
9213     # Look at the argument we got. We use all the common list separators.
9214     lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9215     for lt_pkg in $withval; do
9216     IFS="$lt_save_ifs"
9217     if test "X$lt_pkg" = "X$lt_p"; then
9218     pic_mode=yes
9219     fi
9220     done
9221     IFS="$lt_save_ifs"
9222     ;;
9223     esac],
9224 michael 945 [pic_mode=default])
9225    
9226     test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9227    
9228     _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9229     ])# _LT_WITH_PIC
9230    
9231     LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9232     LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9233    
9234     # Old name:
9235     AU_DEFUN([AC_LIBTOOL_PICMODE],
9236     [_LT_SET_OPTION([LT_INIT], [pic-only])
9237     AC_DIAGNOSE([obsolete],
9238     [$0: Remove this warning and the call to _LT_SET_OPTION when you
9239     put the `pic-only' option into LT_INIT's first parameter.])
9240     ])
9241    
9242     dnl aclocal-1.4 backwards compatibility:
9243     dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9244    
9245    
9246     m4_define([_LTDL_MODE], [])
9247     LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9248     [m4_define([_LTDL_MODE], [nonrecursive])])
9249     LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9250     [m4_define([_LTDL_MODE], [recursive])])
9251     LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9252     [m4_define([_LTDL_MODE], [subproject])])
9253    
9254     m4_define([_LTDL_TYPE], [])
9255     LT_OPTION_DEFINE([LTDL_INIT], [installable],
9256     [m4_define([_LTDL_TYPE], [installable])])
9257     LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9258     [m4_define([_LTDL_TYPE], [convenience])])
9259    
9260     # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
9261     #
9262     # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9263     # Written by Gary V. Vaughan, 2004
9264     #
9265     # This file is free software; the Free Software Foundation gives
9266     # unlimited permission to copy and/or distribute it, with or without
9267     # modifications, as long as this notice is preserved.
9268    
9269     # serial 6 ltsugar.m4
9270    
9271     # This is to help aclocal find these macros, as it can't see m4_define.
9272     AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9273    
9274    
9275     # lt_join(SEP, ARG1, [ARG2...])
9276     # -----------------------------
9277     # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9278     # associated separator.
9279     # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9280     # versions in m4sugar had bugs.
9281     m4_define([lt_join],
9282     [m4_if([$#], [1], [],
9283     [$#], [2], [[$2]],
9284     [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9285     m4_define([_lt_join],
9286     [m4_if([$#$2], [2], [],
9287     [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9288    
9289    
9290     # lt_car(LIST)
9291     # lt_cdr(LIST)
9292     # ------------
9293     # Manipulate m4 lists.
9294     # These macros are necessary as long as will still need to support
9295     # Autoconf-2.59 which quotes differently.
9296     m4_define([lt_car], [[$1]])
9297     m4_define([lt_cdr],
9298     [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9299     [$#], 1, [],
9300     [m4_dquote(m4_shift($@))])])
9301     m4_define([lt_unquote], $1)
9302    
9303    
9304     # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9305     # ------------------------------------------
9306     # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9307     # Note that neither SEPARATOR nor STRING are expanded; they are appended
9308     # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9309     # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9310     # than defined and empty).
9311     #
9312     # This macro is needed until we can rely on Autoconf 2.62, since earlier
9313     # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9314     m4_define([lt_append],
9315     [m4_define([$1],
9316     m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9317    
9318    
9319    
9320     # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9321     # ----------------------------------------------------------
9322     # Produce a SEP delimited list of all paired combinations of elements of
9323     # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9324     # has the form PREFIXmINFIXSUFFIXn.
9325     # Needed until we can rely on m4_combine added in Autoconf 2.62.
9326     m4_define([lt_combine],
9327     [m4_if(m4_eval([$# > 3]), [1],
9328     [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9329     [[m4_foreach([_Lt_prefix], [$2],
9330     [m4_foreach([_Lt_suffix],
9331     ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9332     [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9333    
9334    
9335     # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9336     # -----------------------------------------------------------------------
9337     # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9338     # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9339     m4_define([lt_if_append_uniq],
9340     [m4_ifdef([$1],
9341     [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9342     [lt_append([$1], [$2], [$3])$4],
9343     [$5])],
9344     [lt_append([$1], [$2], [$3])$4])])
9345    
9346    
9347     # lt_dict_add(DICT, KEY, VALUE)
9348     # -----------------------------
9349     m4_define([lt_dict_add],
9350     [m4_define([$1($2)], [$3])])
9351    
9352    
9353     # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9354     # --------------------------------------------
9355     m4_define([lt_dict_add_subkey],
9356     [m4_define([$1($2:$3)], [$4])])
9357    
9358    
9359     # lt_dict_fetch(DICT, KEY, [SUBKEY])
9360     # ----------------------------------
9361     m4_define([lt_dict_fetch],
9362     [m4_ifval([$3],
9363     m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9364     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9365    
9366    
9367     # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9368     # -----------------------------------------------------------------
9369     m4_define([lt_if_dict_fetch],
9370     [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9371     [$5],
9372     [$6])])
9373    
9374    
9375     # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9376     # --------------------------------------------------------------
9377     m4_define([lt_dict_filter],
9378     [m4_if([$5], [], [],
9379     [lt_join(m4_quote(m4_default([$4], [[, ]])),
9380     lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9381     [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9382     ])
9383    
9384     # ltversion.m4 -- version numbers -*- Autoconf -*-
9385     #
9386     # Copyright (C) 2004 Free Software Foundation, Inc.
9387     # Written by Scott James Remnant, 2004
9388     #
9389     # This file is free software; the Free Software Foundation gives
9390     # unlimited permission to copy and/or distribute it, with or without
9391     # modifications, as long as this notice is preserved.
9392    
9393 michael 1106 # @configure_input@
9394 michael 945
9395 michael 1257 # serial 3337 ltversion.m4
9396 michael 945 # This file is part of GNU Libtool
9397    
9398 michael 1257 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9399     m4_define([LT_PACKAGE_REVISION], [1.3337])
9400 michael 945
9401     AC_DEFUN([LTVERSION_VERSION],
9402 michael 1257 [macro_version='2.4.2'
9403     macro_revision='1.3337'
9404 michael 945 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9405     _LT_DECL(, macro_revision, 0)
9406     ])
9407    
9408     # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9409     #
9410 michael 1094 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9411 michael 945 # Written by Scott James Remnant, 2004.
9412     #
9413     # This file is free software; the Free Software Foundation gives
9414     # unlimited permission to copy and/or distribute it, with or without
9415     # modifications, as long as this notice is preserved.
9416    
9417 michael 1094 # serial 5 lt~obsolete.m4
9418 michael 945
9419     # These exist entirely to fool aclocal when bootstrapping libtool.
9420     #
9421     # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9422     # which have later been changed to m4_define as they aren't part of the
9423     # exported API, or moved to Autoconf or Automake where they belong.
9424     #
9425     # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
9426     # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9427     # using a macro with the same name in our local m4/libtool.m4 it'll
9428     # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9429     # and doesn't know about Autoconf macros at all.)
9430     #
9431     # So we provide this file, which has a silly filename so it's always
9432     # included after everything else. This provides aclocal with the
9433     # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9434     # because those macros already exist, or will be overwritten later.
9435     # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9436     #
9437     # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9438     # Yes, that means every name once taken will need to remain here until
9439     # we give up compatibility with versions before 1.7, at which point
9440     # we need to keep only those names which we still refer to.
9441    
9442     # This is to help aclocal find these macros, as it can't see m4_define.
9443     AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9444    
9445     m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9446     m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9447     m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9448     m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9449     m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9450     m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9451     m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9452     m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9453     m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9454     m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9455     m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9456     m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9457     m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9458     m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9459     m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9460     m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9461     m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9462     m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9463     m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9464     m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9465     m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9466     m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9467     m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9468     m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9469     m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9470     m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9471     m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9472     m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9473     m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9474     m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9475     m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9476     m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9477     m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9478     m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9479     m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9480     m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9481     m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9482     m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9483     m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9484     m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9485     m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9486     m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9487     m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9488     m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9489     m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9490     m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9491     m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9492     m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9493     m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9494     m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9495     m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9496     m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9497     m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9498     m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9499 michael 1094 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9500     m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9501     m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9502     m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9503     m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
9504     m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
9505     m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
9506 michael 945
9507 michael 1373 # Copyright (C) 2002-2012 Free Software Foundation, Inc.
9508 michael 945 #
9509 michael 912 # This file is free software; the Free Software Foundation
9510     # gives unlimited permission to copy and/or distribute it,
9511     # with or without modifications, as long as this notice is preserved.
9512    
9513     # AM_AUTOMAKE_VERSION(VERSION)
9514     # ----------------------------
9515     # Automake X.Y traces this macro to ensure aclocal.m4 has been
9516     # generated from the m4 files accompanying Automake X.Y.
9517     # (This private macro should not be called outside this file.)
9518     AC_DEFUN([AM_AUTOMAKE_VERSION],
9519 michael 1373 [am__api_version='1.12'
9520 michael 912 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9521     dnl require some minimum version. Point them to the right macro.
9522 michael 1504 m4_if([$1], [1.12.3], [],
9523 michael 912 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9524     ])
9525    
9526     # _AM_AUTOCONF_VERSION(VERSION)
9527     # -----------------------------
9528     # aclocal traces this macro to find the Autoconf version.
9529     # This is a private macro too. Using m4_define simplifies
9530     # the logic in aclocal, which can simply ignore this definition.
9531     m4_define([_AM_AUTOCONF_VERSION], [])
9532    
9533     # AM_SET_CURRENT_AUTOMAKE_VERSION
9534     # -------------------------------
9535     # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9536 michael 945 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9537 michael 912 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9538 michael 1504 [AM_AUTOMAKE_VERSION([1.12.3])dnl
9539 db 941 m4_ifndef([AC_AUTOCONF_VERSION],
9540     [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9541 michael 945 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9542 michael 912
9543     # AM_AUX_DIR_EXPAND -*- Autoconf -*-
9544    
9545 michael 1373 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
9546 michael 912 #
9547     # This file is free software; the Free Software Foundation
9548     # gives unlimited permission to copy and/or distribute it,
9549     # with or without modifications, as long as this notice is preserved.
9550    
9551     # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9552 michael 1373 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
9553     # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
9554 michael 912 #
9555     # Of course, Automake must honor this variable whenever it calls a
9556     # tool from the auxiliary directory. The problem is that $srcdir (and
9557     # therefore $ac_aux_dir as well) can be either absolute or relative,
9558     # depending on how configure is run. This is pretty annoying, since
9559     # it makes $ac_aux_dir quite unusable in subdirectories: in the top
9560     # source directory, any form will work fine, but in subdirectories a
9561     # relative path needs to be adjusted first.
9562     #
9563     # $ac_aux_dir/missing
9564     # fails when called from a subdirectory if $ac_aux_dir is relative
9565     # $top_srcdir/$ac_aux_dir/missing
9566     # fails if $ac_aux_dir is absolute,
9567     # fails when called from a subdirectory in a VPATH build with
9568     # a relative $ac_aux_dir
9569     #
9570     # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9571     # are both prefixed by $srcdir. In an in-source build this is usually
9572 michael 1373 # harmless because $srcdir is '.', but things will broke when you
9573 michael 912 # start a VPATH build or use an absolute $srcdir.
9574     #
9575     # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9576     # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
9577     # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9578     # and then we would define $MISSING as
9579     # MISSING="\${SHELL} $am_aux_dir/missing"
9580     # This will work as long as MISSING is not called from configure, because
9581     # unfortunately $(top_srcdir) has no meaning in configure.
9582     # However there are other variables, like CC, which are often used in
9583     # configure, and could therefore not use this "fixed" $ac_aux_dir.
9584     #
9585     # Another solution, used here, is to always expand $ac_aux_dir to an
9586     # absolute PATH. The drawback is that using absolute paths prevent a
9587     # configured tree to be moved without reconfiguration.
9588    
9589     AC_DEFUN([AM_AUX_DIR_EXPAND],
9590     [dnl Rely on autoconf to set up CDPATH properly.
9591     AC_PREREQ([2.50])dnl
9592     # expand $ac_aux_dir to an absolute path
9593     am_aux_dir=`cd $ac_aux_dir && pwd`
9594     ])
9595    
9596     # AM_CONDITIONAL -*- Autoconf -*-
9597    
9598 michael 1373 # Copyright (C) 1997-2012 Free Software Foundation, Inc.
9599 michael 912 #
9600     # This file is free software; the Free Software Foundation
9601     # gives unlimited permission to copy and/or distribute it,
9602     # with or without modifications, as long as this notice is preserved.
9603    
9604     # AM_CONDITIONAL(NAME, SHELL-CONDITION)
9605     # -------------------------------------
9606     # Define a conditional.
9607     AC_DEFUN([AM_CONDITIONAL],
9608 michael 1373 [AC_PREREQ([2.52])dnl
9609     m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
9610     [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9611 michael 912 AC_SUBST([$1_TRUE])dnl
9612     AC_SUBST([$1_FALSE])dnl
9613     _AM_SUBST_NOTMAKE([$1_TRUE])dnl
9614     _AM_SUBST_NOTMAKE([$1_FALSE])dnl
9615 michael 945 m4_define([_AM_COND_VALUE_$1], [$2])dnl
9616 michael 912 if $2; then
9617     $1_TRUE=
9618     $1_FALSE='#'
9619     else
9620     $1_TRUE='#'
9621     $1_FALSE=
9622     fi
9623     AC_CONFIG_COMMANDS_PRE(
9624     [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9625     AC_MSG_ERROR([[conditional "$1" was never defined.
9626     Usually this means the macro was only invoked conditionally.]])
9627     fi])])
9628    
9629 michael 1373 # Copyright (C) 1999-2012 Free Software Foundation, Inc.
9630 michael 912 #
9631     # This file is free software; the Free Software Foundation
9632     # gives unlimited permission to copy and/or distribute it,
9633     # with or without modifications, as long as this notice is preserved.
9634    
9635    
9636 michael 1373 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
9637 michael 912 # written in clear, in which case automake, when reading aclocal.m4,
9638     # will think it sees a *use*, and therefore will trigger all it's
9639     # C support machinery. Also note that it means that autoscan, seeing
9640     # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9641    
9642    
9643     # _AM_DEPENDENCIES(NAME)
9644     # ----------------------
9645     # See how the compiler implements dependency checking.
9646 michael 1425 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
9647 michael 912 # We try a few techniques and use that to set a single cache variable.
9648     #
9649     # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9650     # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9651     # dependency, and given that the user is not expected to run this macro,
9652     # just rely on AC_PROG_CC.
9653     AC_DEFUN([_AM_DEPENDENCIES],
9654     [AC_REQUIRE([AM_SET_DEPDIR])dnl
9655     AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9656     AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9657     AC_REQUIRE([AM_DEP_TRACK])dnl
9658    
9659 michael 1373 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
9660     [$1], [CXX], [depcc="$CXX" am_compiler_list=],
9661     [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9662 michael 1425 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
9663 michael 1373 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
9664     [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
9665     [depcc="$$1" am_compiler_list=])
9666 michael 912
9667     AC_CACHE_CHECK([dependency style of $depcc],
9668     [am_cv_$1_dependencies_compiler_type],
9669     [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9670     # We make a subdir and do the tests there. Otherwise we can end up
9671     # making bogus files that we don't know about and never remove. For
9672     # instance it was reported that on HP-UX the gcc test will end up
9673 michael 1373 # making a dummy file named 'D' -- because '-MD' means "put the output
9674     # in D".
9675 michael 1257 rm -rf conftest.dir
9676 michael 912 mkdir conftest.dir
9677     # Copy depcomp to subdir because otherwise we won't find it if we're
9678     # using a relative directory.
9679     cp "$am_depcomp" conftest.dir
9680     cd conftest.dir
9681     # We will build objects and dependencies in a subdirectory because
9682     # it helps to detect inapplicable dependency modes. For instance
9683     # both Tru64's cc and ICC support -MD to output dependencies as a
9684     # side effect of compilation, but ICC will put the dependencies in
9685     # the current directory while Tru64 will put them in the object
9686     # directory.
9687     mkdir sub
9688    
9689     am_cv_$1_dependencies_compiler_type=none
9690     if test "$am_compiler_list" = ""; then
9691     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9692     fi
9693 michael 945 am__universal=false
9694     m4_case([$1], [CC],
9695     [case " $depcc " in #(
9696     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9697     esac],
9698     [CXX],
9699     [case " $depcc " in #(
9700     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9701     esac])
9702    
9703 michael 912 for depmode in $am_compiler_list; do
9704     # Setup a source with many dependencies, because some compilers
9705     # like to wrap large dependency lists on column 80 (with \), and
9706     # we should not choose a depcomp mode which is confused by this.
9707     #
9708     # We need to recreate these files for each test, as the compiler may
9709     # overwrite some of them when testing with obscure command lines.
9710     # This happens at least with the AIX C compiler.
9711     : > sub/conftest.c
9712     for i in 1 2 3 4 5 6; do
9713     echo '#include "conftst'$i'.h"' >> sub/conftest.c
9714 michael 1373 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
9715     # Solaris 10 /bin/sh.
9716     echo '/* dummy */' > sub/conftst$i.h
9717 michael 912 done
9718     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9719    
9720 michael 1373 # We check with '-c' and '-o' for the sake of the "dashmstdout"
9721 michael 945 # mode. It turns out that the SunPro C++ compiler does not properly
9722 michael 1373 # handle '-M -o', and we need to detect this. Also, some Intel
9723     # versions had trouble with output in subdirs.
9724 michael 945 am__obj=sub/conftest.${OBJEXT-o}
9725     am__minus_obj="-o $am__obj"
9726 michael 912 case $depmode in
9727 michael 945 gcc)
9728     # This depmode causes a compiler race in universal mode.
9729     test "$am__universal" = false || continue
9730     ;;
9731 michael 912 nosideeffect)
9732 michael 1373 # After this tag, mechanisms are not by side-effect, so they'll
9733     # only be used when explicitly requested.
9734 michael 912 if test "x$enable_dependency_tracking" = xyes; then
9735     continue
9736     else
9737     break
9738     fi
9739     ;;
9740 michael 1257 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
9741 michael 1373 # This compiler won't grok '-c -o', but also, the minuso test has
9742 michael 945 # not run yet. These depmodes are late enough in the game, and
9743     # so weak that their functioning should not be impacted.
9744     am__obj=conftest.${OBJEXT-o}
9745     am__minus_obj=
9746     ;;
9747 michael 912 none) break ;;
9748     esac
9749     if depmode=$depmode \
9750 michael 945 source=sub/conftest.c object=$am__obj \
9751 michael 912 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9752 michael 945 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9753 michael 912 >/dev/null 2>conftest.err &&
9754     grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9755     grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9756 michael 945 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9757 michael 912 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9758     # icc doesn't choke on unknown options, it will just issue warnings
9759     # or remarks (even with -Werror). So we grep stderr for any message
9760     # that says an option was ignored or not supported.
9761     # When given -MP, icc 7.0 and 7.1 complain thusly:
9762     # icc: Command line warning: ignoring option '-M'; no argument required
9763     # The diagnosis changed in icc 8.0:
9764     # icc: Command line remark: option '-MP' not supported
9765     if (grep 'ignoring option' conftest.err ||
9766     grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9767     am_cv_$1_dependencies_compiler_type=$depmode
9768     break
9769     fi
9770     fi
9771     done
9772    
9773     cd ..
9774     rm -rf conftest.dir
9775     else
9776     am_cv_$1_dependencies_compiler_type=none
9777     fi
9778     ])
9779     AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9780     AM_CONDITIONAL([am__fastdep$1], [
9781     test "x$enable_dependency_tracking" != xno \
9782     && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9783     ])
9784    
9785    
9786     # AM_SET_DEPDIR
9787     # -------------
9788     # Choose a directory name for dependency files.
9789 michael 1373 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
9790 michael 912 AC_DEFUN([AM_SET_DEPDIR],
9791     [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9792     AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9793     ])
9794    
9795    
9796     # AM_DEP_TRACK
9797     # ------------
9798     AC_DEFUN([AM_DEP_TRACK],
9799 michael 1373 [AC_ARG_ENABLE([dependency-tracking], [dnl
9800     AS_HELP_STRING(
9801     [--enable-dependency-tracking],
9802     [do not reject slow dependency extractors])
9803     AS_HELP_STRING(
9804     [--disable-dependency-tracking],
9805     [speeds up one-time build])])
9806 michael 912 if test "x$enable_dependency_tracking" != xno; then
9807     am_depcomp="$ac_aux_dir/depcomp"
9808     AMDEPBACKSLASH='\'
9809 michael 1257 am__nodep='_no'
9810 michael 912 fi
9811     AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9812     AC_SUBST([AMDEPBACKSLASH])dnl
9813     _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9814 michael 1257 AC_SUBST([am__nodep])dnl
9815     _AM_SUBST_NOTMAKE([am__nodep])dnl
9816 michael 912 ])
9817    
9818     # Generate code to set up dependency tracking. -*- Autoconf -*-
9819    
9820 michael 1373 # Copyright (C) 1999-2012 Free Software Foundation, Inc.
9821 michael 912 #
9822     # This file is free software; the Free Software Foundation
9823     # gives unlimited permission to copy and/or distribute it,
9824     # with or without modifications, as long as this notice is preserved.
9825    
9826    
9827     # _AM_OUTPUT_DEPENDENCY_COMMANDS
9828     # ------------------------------
9829     AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9830 michael 945 [{
9831     # Autoconf 2.62 quotes --file arguments for eval, but not when files
9832     # are listed without --file. Let's play safe and only enable the eval
9833     # if we detect the quoting.
9834     case $CONFIG_FILES in
9835     *\'*) eval set x "$CONFIG_FILES" ;;
9836     *) set x $CONFIG_FILES ;;
9837     esac
9838     shift
9839     for mf
9840     do
9841     # Strip MF so we end up with the name of the file.
9842     mf=`echo "$mf" | sed -e 's/:.*$//'`
9843     # Check whether this is an Automake generated Makefile or not.
9844 michael 1373 # We used to match only the files named 'Makefile.in', but
9845 michael 945 # some people rename them; so instead we look at the file content.
9846     # Grep'ing the first line is not enough: some people post-process
9847     # each Makefile.in and add a new line on top of each file to say so.
9848     # Grep'ing the whole file is not good either: AIX grep has a line
9849     # limit of 2048, but all sed's we know have understand at least 4000.
9850     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9851     dirpart=`AS_DIRNAME("$mf")`
9852     else
9853     continue
9854     fi
9855     # Extract the definition of DEPDIR, am__include, and am__quote
9856 michael 1373 # from the Makefile without running 'make'.
9857 michael 945 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9858     test -z "$DEPDIR" && continue
9859     am__include=`sed -n 's/^am__include = //p' < "$mf"`
9860     test -z "am__include" && continue
9861     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9862     # Find all dependency output files, they are included files with
9863     # $(DEPDIR) in their names. We invoke sed twice because it is the
9864     # simplest approach to changing $(DEPDIR) to its actual value in the
9865     # expansion.
9866     for file in `sed -n "
9867     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9868 michael 1373 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
9869 michael 945 # Make sure the directory exists.
9870     test -f "$dirpart/$file" && continue
9871     fdir=`AS_DIRNAME(["$file"])`
9872     AS_MKDIR_P([$dirpart/$fdir])
9873     # echo "creating $dirpart/$file"
9874     echo '# dummy' > "$dirpart/$file"
9875     done
9876 michael 912 done
9877 michael 945 }
9878 michael 912 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9879    
9880    
9881     # AM_OUTPUT_DEPENDENCY_COMMANDS
9882     # -----------------------------
9883     # This macro should only be invoked once -- use via AC_REQUIRE.
9884     #
9885     # This code is only required when automatic dependency tracking
9886 michael 1373 # is enabled. FIXME. This creates each '.P' file that we will
9887 michael 912 # need in order to bootstrap the dependency handling code.
9888     AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9889     [AC_CONFIG_COMMANDS([depfiles],
9890     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9891     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9892     ])
9893    
9894     # Do all the work for Automake. -*- Autoconf -*-
9895    
9896 michael 1373 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
9897 michael 912 #
9898     # This file is free software; the Free Software Foundation
9899     # gives unlimited permission to copy and/or distribute it,
9900     # with or without modifications, as long as this notice is preserved.
9901    
9902     # This macro actually does too much. Some checks are only needed if
9903     # your package does certain things. But this isn't really a big deal.
9904    
9905     # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9906     # AM_INIT_AUTOMAKE([OPTIONS])
9907     # -----------------------------------------------
9908     # The call with PACKAGE and VERSION arguments is the old style
9909     # call (pre autoconf-2.50), which is being phased out. PACKAGE
9910     # and VERSION should now be passed to AC_INIT and removed from
9911     # the call to AM_INIT_AUTOMAKE.
9912     # We support both call styles for the transition. After
9913     # the next Automake release, Autoconf can make the AC_INIT
9914     # arguments mandatory, and then we can depend on a new Autoconf
9915     # release and drop the old call support.
9916     AC_DEFUN([AM_INIT_AUTOMAKE],
9917 michael 945 [AC_PREREQ([2.62])dnl
9918 michael 912 dnl Autoconf wants to disallow AM_ names. We explicitly allow
9919     dnl the ones we care about.
9920     m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9921     AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9922     AC_REQUIRE([AC_PROG_INSTALL])dnl
9923     if test "`cd $srcdir && pwd`" != "`pwd`"; then
9924     # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9925     # is not polluted with repeated "-I."
9926     AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9927     # test to see if srcdir already configured
9928     if test -f $srcdir/config.status; then
9929     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9930     fi
9931     fi
9932    
9933     # test whether we have cygpath
9934     if test -z "$CYGPATH_W"; then
9935     if (cygpath --version) >/dev/null 2>/dev/null; then
9936     CYGPATH_W='cygpath -w'
9937     else
9938     CYGPATH_W=echo
9939     fi
9940     fi
9941     AC_SUBST([CYGPATH_W])
9942    
9943     # Define the identity of the package.
9944     dnl Distinguish between old-style and new-style calls.
9945     m4_ifval([$2],
9946 michael 1425 [AC_DIAGNOSE([obsolete],
9947     [$0: two- and three-arguments forms are deprecated. For more info, see:
9948     http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
9949     m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9950 michael 912 AC_SUBST([PACKAGE], [$1])dnl
9951     AC_SUBST([VERSION], [$2])],
9952     [_AM_SET_OPTIONS([$1])dnl
9953     dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9954 michael 1373 m4_if(
9955     m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
9956     [ok:ok],,
9957 michael 912 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9958     AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9959     AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9960    
9961     _AM_IF_OPTION([no-define],,
9962 michael 1373 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
9963     AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
9964 michael 912
9965     # Some tools Automake needs.
9966     AC_REQUIRE([AM_SANITY_CHECK])dnl
9967     AC_REQUIRE([AC_ARG_PROGRAM])dnl
9968 michael 1373 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
9969     AM_MISSING_PROG([AUTOCONF], [autoconf])
9970     AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
9971     AM_MISSING_PROG([AUTOHEADER], [autoheader])
9972     AM_MISSING_PROG([MAKEINFO], [makeinfo])
9973 michael 945 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9974     AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9975 michael 1425 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9976 michael 1462 # For better backward compatibility. To be removed once Automake 1.9.x
9977     # dies out for good. For more background, see:
9978     # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
9979     # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
9980     AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
9981 michael 912 # We need awk for the "check" target. The system "awk" is bad on
9982     # some platforms.
9983     AC_REQUIRE([AC_PROG_AWK])dnl
9984     AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9985     AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9986     _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9987 michael 945 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9988     [_AM_PROG_TAR([v7])])])
9989 michael 912 _AM_IF_OPTION([no-dependencies],,
9990     [AC_PROVIDE_IFELSE([AC_PROG_CC],
9991 michael 1373 [_AM_DEPENDENCIES([CC])],
9992 michael 1425 [m4_define([AC_PROG_CC],
9993     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
9994 michael 912 AC_PROVIDE_IFELSE([AC_PROG_CXX],
9995 michael 1373 [_AM_DEPENDENCIES([CXX])],
9996 michael 1425 [m4_define([AC_PROG_CXX],
9997     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
9998 michael 912 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9999 michael 1373 [_AM_DEPENDENCIES([OBJC])],
10000 michael 1425 [m4_define([AC_PROG_OBJC],
10001     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
10002     dnl Support for Objective C++ was only introduced in Autoconf 2.65,
10003     dnl but we still cater to Autoconf 2.62.
10004     m4_ifdef([AC_PROG_OBJCXX],
10005     [AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
10006     [_AM_DEPENDENCIES([OBJCXX])],
10007     [m4_define([AC_PROG_OBJCXX],
10008     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
10009 michael 912 ])
10010 michael 945 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
10011 michael 1373 dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
10012     dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
10013 michael 945 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
10014     AC_CONFIG_COMMANDS_PRE(dnl
10015     [m4_provide_if([_AM_COMPILER_EXEEXT],
10016     [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
10017 michael 912 ])
10018    
10019 michael 1373 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
10020 michael 945 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10021     dnl mangled by Autoconf and run in a shell conditional statement.
10022     m4_define([_AC_COMPILER_EXEEXT],
10023     m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10024 michael 912
10025 michael 945
10026 michael 912 # When config.status generates a header, we must update the stamp-h file.
10027     # This file resides in the same directory as the config header
10028     # that is generated. The stamp files are numbered to have different names.
10029    
10030     # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10031     # loop where config.status creates the headers, so we can generate
10032     # our stamp files there.
10033     AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10034     [# Compute $1's index in $config_headers.
10035 db 941 _am_arg=$1
10036 michael 912 _am_stamp_count=1
10037     for _am_header in $config_headers :; do
10038     case $_am_header in
10039 db 941 $_am_arg | $_am_arg:* )
10040 michael 912 break ;;
10041     * )
10042     _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10043     esac
10044     done
10045 db 941 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10046 michael 912
10047 michael 1373 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
10048 michael 912 #
10049     # This file is free software; the Free Software Foundation
10050     # gives unlimited permission to copy and/or distribute it,
10051     # with or without modifications, as long as this notice is preserved.
10052    
10053     # AM_PROG_INSTALL_SH
10054     # ------------------
10055     # Define $install_sh.
10056     AC_DEFUN([AM_PROG_INSTALL_SH],
10057     [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10058 michael 945 if test x"${install_sh}" != xset; then
10059     case $am_aux_dir in
10060     *\ * | *\ *)
10061     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10062     *)
10063     install_sh="\${SHELL} $am_aux_dir/install-sh"
10064     esac
10065     fi
10066 michael 1373 AC_SUBST([install_sh])])
10067 michael 912
10068 michael 1373 # Copyright (C) 2003-2012 Free Software Foundation, Inc.
10069 michael 912 #
10070     # This file is free software; the Free Software Foundation
10071     # gives unlimited permission to copy and/or distribute it,
10072     # with or without modifications, as long as this notice is preserved.
10073    
10074     # Check whether the underlying file-system supports filenames
10075     # with a leading dot. For instance MS-DOS doesn't.
10076     AC_DEFUN([AM_SET_LEADING_DOT],
10077     [rm -rf .tst 2>/dev/null
10078     mkdir .tst 2>/dev/null
10079     if test -d .tst; then
10080     am__leading_dot=.
10081     else
10082     am__leading_dot=_
10083     fi
10084     rmdir .tst 2>/dev/null
10085     AC_SUBST([am__leading_dot])])
10086    
10087 michael 1373 # Copyright (C) 1998-2012 Free Software Foundation, Inc.
10088 michael 912 #
10089     # This file is free software; the Free Software Foundation
10090     # gives unlimited permission to copy and/or distribute it,
10091     # with or without modifications, as long as this notice is preserved.
10092    
10093     # AM_PROG_LEX
10094     # -----------
10095     # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
10096     # "missing" invocation, for better error output.
10097     AC_DEFUN([AM_PROG_LEX],
10098 michael 1373 [AC_PREREQ([2.50])dnl
10099 michael 912 AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
10100     AC_REQUIRE([AC_PROG_LEX])dnl
10101     if test "$LEX" = :; then
10102     LEX=${am_missing_run}flex
10103     fi])
10104    
10105     # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
10106     # From Jim Meyering
10107    
10108 michael 1373 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
10109 michael 912 #
10110     # This file is free software; the Free Software Foundation
10111     # gives unlimited permission to copy and/or distribute it,
10112     # with or without modifications, as long as this notice is preserved.
10113    
10114 michael 945 # AM_MAINTAINER_MODE([DEFAULT-MODE])
10115     # ----------------------------------
10116     # Control maintainer-specific portions of Makefiles.
10117 michael 1373 # Default is to disable them, unless 'enable' is passed literally.
10118     # For symmetry, 'disable' may be passed as well. Anyway, the user
10119 michael 945 # can override the default with the --enable/--disable switch.
10120 michael 912 AC_DEFUN([AM_MAINTAINER_MODE],
10121 michael 945 [m4_case(m4_default([$1], [disable]),
10122     [enable], [m4_define([am_maintainer_other], [disable])],
10123     [disable], [m4_define([am_maintainer_other], [enable])],
10124     [m4_define([am_maintainer_other], [enable])
10125     m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
10126 michael 1257 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
10127 michael 945 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
10128     AC_ARG_ENABLE([maintainer-mode],
10129 michael 1373 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
10130     am_maintainer_other[ make rules and dependencies not useful
10131     (and sometimes confusing) to the casual installer])],
10132     [USE_MAINTAINER_MODE=$enableval],
10133     [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
10134 michael 912 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
10135 michael 945 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
10136 michael 912 MAINT=$MAINTAINER_MODE_TRUE
10137 michael 945 AC_SUBST([MAINT])dnl
10138 michael 912 ]
10139     )
10140    
10141     AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
10142    
10143     # Check to see how 'make' treats includes. -*- Autoconf -*-
10144    
10145 michael 1373 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
10146 michael 912 #
10147     # This file is free software; the Free Software Foundation
10148     # gives unlimited permission to copy and/or distribute it,
10149     # with or without modifications, as long as this notice is preserved.
10150    
10151     # AM_MAKE_INCLUDE()
10152     # -----------------
10153     # Check to see how make treats includes.
10154     AC_DEFUN([AM_MAKE_INCLUDE],
10155     [am_make=${MAKE-make}
10156     cat > confinc << 'END'
10157     am__doit:
10158 michael 945 @echo this is the am__doit target
10159 michael 912 .PHONY: am__doit
10160     END
10161     # If we don't find an include directive, just comment out the code.
10162     AC_MSG_CHECKING([for style of include used by $am_make])
10163     am__include="#"
10164     am__quote=
10165     _am_result=none
10166     # First try GNU make style include.
10167     echo "include confinc" > confmf
10168 michael 1373 # Ignore all kinds of additional output from 'make'.
10169 michael 945 case `$am_make -s -f confmf 2> /dev/null` in #(
10170     *the\ am__doit\ target*)
10171     am__include=include
10172     am__quote=
10173     _am_result=GNU
10174     ;;
10175     esac
10176 michael 912 # Now try BSD make style include.
10177     if test "$am__include" = "#"; then
10178     echo '.include "confinc"' > confmf
10179 michael 945 case `$am_make -s -f confmf 2> /dev/null` in #(
10180     *the\ am__doit\ target*)
10181     am__include=.include
10182     am__quote="\""
10183     _am_result=BSD
10184     ;;
10185     esac
10186 michael 912 fi
10187     AC_SUBST([am__include])
10188     AC_SUBST([am__quote])
10189     AC_MSG_RESULT([$_am_result])
10190     rm -f confinc confmf
10191     ])
10192    
10193     # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
10194    
10195 michael 1373 # Copyright (C) 1997-2012 Free Software Foundation, Inc.
10196 michael 912 #
10197     # This file is free software; the Free Software Foundation
10198     # gives unlimited permission to copy and/or distribute it,
10199     # with or without modifications, as long as this notice is preserved.
10200    
10201     # AM_MISSING_PROG(NAME, PROGRAM)
10202     # ------------------------------
10203     AC_DEFUN([AM_MISSING_PROG],
10204     [AC_REQUIRE([AM_MISSING_HAS_RUN])
10205     $1=${$1-"${am_missing_run}$2"}
10206     AC_SUBST($1)])
10207    
10208     # AM_MISSING_HAS_RUN
10209     # ------------------
10210     # Define MISSING if not defined so far and test if it supports --run.
10211     # If it does, set am_missing_run to use it, otherwise, to nothing.
10212     AC_DEFUN([AM_MISSING_HAS_RUN],
10213     [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10214     AC_REQUIRE_AUX_FILE([missing])dnl
10215 michael 945 if test x"${MISSING+set}" != xset; then
10216     case $am_aux_dir in
10217     *\ * | *\ *)
10218     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10219     *)
10220     MISSING="\${SHELL} $am_aux_dir/missing" ;;
10221     esac
10222     fi
10223 michael 912 # Use eval to expand $SHELL
10224     if eval "$MISSING --run true"; then
10225     am_missing_run="$MISSING --run "
10226     else
10227     am_missing_run=
10228 michael 1373 AC_MSG_WARN(['missing' script is too old or missing])
10229 michael 912 fi
10230     ])
10231    
10232     # Helper functions for option handling. -*- Autoconf -*-
10233    
10234 michael 1373 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
10235 michael 912 #
10236     # This file is free software; the Free Software Foundation
10237     # gives unlimited permission to copy and/or distribute it,
10238     # with or without modifications, as long as this notice is preserved.
10239    
10240     # _AM_MANGLE_OPTION(NAME)
10241     # -----------------------
10242     AC_DEFUN([_AM_MANGLE_OPTION],
10243     [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10244    
10245     # _AM_SET_OPTION(NAME)
10246 michael 1257 # --------------------
10247 michael 912 # Set option NAME. Presently that only means defining a flag for this option.
10248     AC_DEFUN([_AM_SET_OPTION],
10249 michael 1373 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
10250 michael 912
10251     # _AM_SET_OPTIONS(OPTIONS)
10252 michael 1257 # ------------------------
10253 michael 912 # OPTIONS is a space-separated list of Automake options.
10254     AC_DEFUN([_AM_SET_OPTIONS],
10255 michael 945 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10256 michael 912
10257     # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10258     # -------------------------------------------
10259     # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10260     AC_DEFUN([_AM_IF_OPTION],
10261     [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10262    
10263     # Check to make sure that the build environment is sane. -*- Autoconf -*-
10264    
10265 michael 1373 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
10266 michael 912 #
10267     # This file is free software; the Free Software Foundation
10268     # gives unlimited permission to copy and/or distribute it,
10269     # with or without modifications, as long as this notice is preserved.
10270    
10271     # AM_SANITY_CHECK
10272     # ---------------
10273     AC_DEFUN([AM_SANITY_CHECK],
10274     [AC_MSG_CHECKING([whether build environment is sane])
10275 michael 945 # Reject unsafe characters in $srcdir or the absolute working directory
10276     # name. Accept space and tab only in the latter.
10277     am_lf='
10278     '
10279     case `pwd` in
10280     *[[\\\"\#\$\&\'\`$am_lf]]*)
10281     AC_MSG_ERROR([unsafe absolute working directory name]);;
10282     esac
10283     case $srcdir in
10284     *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
10285 michael 1373 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
10286 michael 945 esac
10287    
10288 michael 1373 # Do 'set' in a subshell so we don't clobber the current shell's
10289 michael 912 # arguments. Must try -L first in case configure is actually a
10290     # symlink; some systems play weird games with the mod time of symlinks
10291     # (eg FreeBSD returns the mod time of the symlink's containing
10292     # directory).
10293     if (
10294 michael 1373 am_has_slept=no
10295     for am_try in 1 2; do
10296     echo "timestamp, slept: $am_has_slept" > conftest.file
10297     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10298     if test "$[*]" = "X"; then
10299     # -L didn't work.
10300     set X `ls -t "$srcdir/configure" conftest.file`
10301     fi
10302     if test "$[*]" != "X $srcdir/configure conftest.file" \
10303     && test "$[*]" != "X conftest.file $srcdir/configure"; then
10304 michael 912
10305 michael 1373 # If neither matched, then we have a broken ls. This can happen
10306     # if, for instance, CONFIG_SHELL is bash and it inherits a
10307     # broken ls alias from the environment. This has actually
10308     # happened. Such a system could not be considered "sane".
10309     AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
10310     alias in your environment])
10311     fi
10312     if test "$[2]" = conftest.file || test $am_try -eq 2; then
10313     break
10314     fi
10315     # Just in case.
10316     sleep 1
10317     am_has_slept=yes
10318     done
10319 michael 912 test "$[2]" = conftest.file
10320     )
10321     then
10322     # Ok.
10323     :
10324     else
10325     AC_MSG_ERROR([newly created file is older than distributed files!
10326     Check your system clock])
10327     fi
10328 michael 1373 AC_MSG_RESULT([yes])
10329     # If we didn't sleep, we still need to ensure time stamps of config.status and
10330     # generated files are strictly newer.
10331     am_sleep_pid=
10332     if grep 'slept: no' conftest.file >/dev/null 2>&1; then
10333     ( sleep 1 ) &
10334     am_sleep_pid=$!
10335     fi
10336     AC_CONFIG_COMMANDS_PRE(
10337     [AC_MSG_CHECKING([that generated files are newer than configure])
10338     if test -n "$am_sleep_pid"; then
10339     # Hide warnings about reused PIDs.
10340     wait $am_sleep_pid 2>/dev/null
10341     fi
10342     AC_MSG_RESULT([done])])
10343     rm -f conftest.file
10344     ])
10345 michael 912
10346 michael 1373 # Copyright (C) 2001-2012 Free Software Foundation, Inc.
10347 michael 912 #
10348     # This file is free software; the Free Software Foundation
10349     # gives unlimited permission to copy and/or distribute it,
10350     # with or without modifications, as long as this notice is preserved.
10351    
10352     # AM_PROG_INSTALL_STRIP
10353     # ---------------------
10354 michael 1373 # One issue with vendor 'install' (even GNU) is that you can't
10355 michael 912 # specify the program used to strip binaries. This is especially
10356     # annoying in cross-compiling environments, where the build's strip
10357     # is unlikely to handle the host's binaries.
10358     # Fortunately install-sh will honor a STRIPPROG variable, so we
10359 michael 1373 # always use install-sh in "make install-strip", and initialize
10360 michael 912 # STRIPPROG with the value of the STRIP variable (set by the user).
10361     AC_DEFUN([AM_PROG_INSTALL_STRIP],
10362     [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10363 michael 1373 # Installed binaries are usually stripped using 'strip' when the user
10364     # run "make install-strip". However 'strip' might not be the right
10365 michael 912 # tool to use in cross-compilation environments, therefore Automake
10366 michael 1373 # will honor the 'STRIP' environment variable to overrule this program.
10367     dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
10368 michael 912 if test "$cross_compiling" != no; then
10369     AC_CHECK_TOOL([STRIP], [strip], :)
10370     fi
10371     INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10372     AC_SUBST([INSTALL_STRIP_PROGRAM])])
10373    
10374 michael 1373 # Copyright (C) 2006-2012 Free Software Foundation, Inc.
10375 michael 912 #
10376     # This file is free software; the Free Software Foundation
10377     # gives unlimited permission to copy and/or distribute it,
10378     # with or without modifications, as long as this notice is preserved.
10379    
10380     # _AM_SUBST_NOTMAKE(VARIABLE)
10381     # ---------------------------
10382 db 941 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10383 michael 912 # This macro is traced by Automake.
10384     AC_DEFUN([_AM_SUBST_NOTMAKE])
10385    
10386 michael 945 # AM_SUBST_NOTMAKE(VARIABLE)
10387 michael 1257 # --------------------------
10388 michael 945 # Public sister of _AM_SUBST_NOTMAKE.
10389     AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10390    
10391 michael 912 # Check how to create a tarball. -*- Autoconf -*-
10392    
10393 michael 1373 # Copyright (C) 2004-2012 Free Software Foundation, Inc.
10394 michael 912 #
10395     # This file is free software; the Free Software Foundation
10396     # gives unlimited permission to copy and/or distribute it,
10397     # with or without modifications, as long as this notice is preserved.
10398    
10399     # _AM_PROG_TAR(FORMAT)
10400     # --------------------
10401     # Check how to create a tarball in format FORMAT.
10402 michael 1373 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
10403 michael 912 #
10404     # Substitute a variable $(am__tar) that is a command
10405     # writing to stdout a FORMAT-tarball containing the directory
10406     # $tardir.
10407     # tardir=directory && $(am__tar) > result.tar
10408     #
10409     # Substitute a variable $(am__untar) that extract such
10410     # a tarball read from stdin.
10411     # $(am__untar) < result.tar
10412     AC_DEFUN([_AM_PROG_TAR],
10413 michael 1291 [# Always define AMTAR for backward compatibility. Yes, it's still used
10414     # in the wild :-( We should find a proper way to deprecate it ...
10415     AC_SUBST([AMTAR], ['$${TAR-tar}'])
10416 michael 912 m4_if([$1], [v7],
10417 michael 1291 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
10418 michael 912 [m4_case([$1], [ustar],, [pax],,
10419     [m4_fatal([Unknown tar format])])
10420     AC_MSG_CHECKING([how to create a $1 tar archive])
10421     # Loop over all known methods to create a tar archive until one works.
10422     _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10423     _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10424     # Do not fold the above two line into one, because Tru64 sh and
10425 michael 1373 # Solaris sh will not grok spaces in the rhs of '-'.
10426 michael 912 for _am_tool in $_am_tools
10427     do
10428     case $_am_tool in
10429     gnutar)
10430     for _am_tar in tar gnutar gtar;
10431     do
10432     AM_RUN_LOG([$_am_tar --version]) && break
10433     done
10434     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10435     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10436     am__untar="$_am_tar -xf -"
10437     ;;
10438     plaintar)
10439     # Must skip GNU tar: if it does not support --format= it doesn't create
10440     # ustar tarball either.
10441     (tar --version) >/dev/null 2>&1 && continue
10442     am__tar='tar chf - "$$tardir"'
10443     am__tar_='tar chf - "$tardir"'
10444     am__untar='tar xf -'
10445     ;;
10446     pax)
10447     am__tar='pax -L -x $1 -w "$$tardir"'
10448     am__tar_='pax -L -x $1 -w "$tardir"'
10449     am__untar='pax -r'
10450     ;;
10451     cpio)
10452     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10453     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10454     am__untar='cpio -i -H $1 -d'
10455     ;;
10456     none)
10457     am__tar=false
10458     am__tar_=false
10459     am__untar=false
10460     ;;
10461     esac
10462    
10463     # If the value was cached, stop now. We just wanted to have am__tar
10464     # and am__untar set.
10465     test -n "${am_cv_prog_tar_$1}" && break
10466    
10467     # tar/untar a dummy directory, and stop if the command works
10468     rm -rf conftest.dir
10469     mkdir conftest.dir
10470     echo GrepMe > conftest.dir/file
10471     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10472     rm -rf conftest.dir
10473     if test -s conftest.tar; then
10474     AM_RUN_LOG([$am__untar <conftest.tar])
10475     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10476     fi
10477     done
10478     rm -rf conftest.dir
10479    
10480     AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10481     AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10482     AC_SUBST([am__tar])
10483     AC_SUBST([am__untar])
10484     ]) # _AM_PROG_TAR
10485    
10486     m4_include([acinclude.m4])