ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/aclocal.m4
Revision: 1094
Committed: Sun Jun 13 10:09:34 2010 UTC (13 years, 9 months ago) by michael
Original Path: ircd-hybrid-7.3/aclocal.m4
File size: 352355 byte(s)
Log Message:
- Updated ltdl to latest 2.2.10 release

File Contents

# User Rev Content
1 michael 1043 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2 michael 912
3     # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 michael 945 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
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 1033 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17     [m4_warning([this file was generated for autoconf 2.65.
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     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     AS_IF([test $lt_cv_sys_argz_works = yes],
91     [AC_DEFINE([HAVE_WORKING_ARGZ], 1,
92     [This value is set to 1 to indicate that the system argz facility works])],
93     [ARGZ_H=argz.h
94     AC_LIBOBJ([argz])])])
95    
96     AC_SUBST([ARGZ_H])
97     ])
98    
99     # Prerequisites of lib/argz.c.
100     AC_DEFUN([gl_PREREQ_ARGZ], [:])
101    
102 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 1094 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
106     # 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 1094 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
116     # 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 945 _LT_DECL([], [host_alias], [0], [The host system])dnl
251     _LT_DECL([], [host], [0])dnl
252     _LT_DECL([], [host_os], [0])dnl
253     dnl
254     _LT_DECL([], [build_alias], [0], [The build system])dnl
255     _LT_DECL([], [build], [0])dnl
256     _LT_DECL([], [build_os], [0])dnl
257     dnl
258 michael 912 AC_REQUIRE([AC_PROG_CC])dnl
259 michael 945 AC_REQUIRE([LT_PATH_LD])dnl
260     AC_REQUIRE([LT_PATH_NM])dnl
261     dnl
262 michael 912 AC_REQUIRE([AC_PROG_LN_S])dnl
263 michael 945 test -z "$LN_S" && LN_S="ln -s"
264     _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
265 michael 912 dnl
266 michael 945 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
267     _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
268     _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
269     dnl
270     m4_require([_LT_FILEUTILS_DEFAULTS])dnl
271     m4_require([_LT_CHECK_SHELL_FEATURES])dnl
272     m4_require([_LT_CMD_RELOAD])dnl
273     m4_require([_LT_CHECK_MAGIC_METHOD])dnl
274     m4_require([_LT_CMD_OLD_ARCHIVE])dnl
275     m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
276 michael 912
277 michael 945 _LT_CONFIG_LIBTOOL_INIT([
278     # See if we are running on zsh, and set the options which allow our
279     # commands through without removal of \ escapes INIT.
280     if test -n "\${ZSH_VERSION+set}" ; then
281     setopt NO_GLOB_SUBST
282     fi
283     ])
284     if test -n "${ZSH_VERSION+set}" ; then
285     setopt NO_GLOB_SUBST
286     fi
287 michael 912
288 michael 945 _LT_CHECK_OBJDIR
289    
290     m4_require([_LT_TAG_COMPILER])dnl
291    
292 michael 912 case $host_os in
293     aix3*)
294     # AIX sometimes has problems with the GCC collect2 program. For some
295     # reason, if we set the COLLECT_NAMES environment variable, the problems
296     # vanish in a puff of smoke.
297     if test "X${COLLECT_NAMES+set}" != Xset; then
298     COLLECT_NAMES=
299     export COLLECT_NAMES
300     fi
301     ;;
302     esac
303    
304     # Global variables:
305 michael 945 ofile=libtool
306 michael 912 can_build_shared=yes
307    
308     # All known linkers require a `.a' archive for static linking (except MSVC,
309     # which needs '.lib').
310     libext=a
311 michael 945
312 michael 912 with_gnu_ld="$lt_cv_prog_gnu_ld"
313    
314     old_CC="$CC"
315     old_CFLAGS="$CFLAGS"
316    
317     # Set sane defaults for various variables
318     test -z "$CC" && CC=cc
319     test -z "$LTCC" && LTCC=$CC
320     test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
321     test -z "$LD" && LD=ld
322     test -z "$ac_objext" && ac_objext=o
323    
324     _LT_CC_BASENAME([$compiler])
325    
326     # Only perform the check for file, if the check method requires it
327 michael 945 test -z "$MAGIC_CMD" && MAGIC_CMD=file
328 michael 912 case $deplibs_check_method in
329     file_magic*)
330     if test "$file_magic_cmd" = '$MAGIC_CMD'; then
331 michael 945 _LT_PATH_MAGIC
332 michael 912 fi
333     ;;
334     esac
335    
336 michael 945 # Use C for the default configuration in the libtool script
337     LT_SUPPORTED_TAG([CC])
338     _LT_LANG_C_CONFIG
339     _LT_LANG_DEFAULT_CONFIG
340     _LT_CONFIG_COMMANDS
341     ])# _LT_SETUP
342 db 941
343 michael 912
344 michael 1094 # _LT_PREPARE_SED_QUOTE_VARS
345     # --------------------------
346     # Define a few sed substitution that help us do robust quoting.
347     m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
348     [# Backslashify metacharacters that are still active within
349     # double-quoted strings.
350     sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
351    
352     # Same as above, but do not quote variable references.
353     double_quote_subst='s/\([["`\\]]\)/\\\1/g'
354    
355     # Sed substitution to delay expansion of an escaped shell variable in a
356     # double_quote_subst'ed string.
357     delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
358    
359     # Sed substitution to delay expansion of an escaped single quote.
360     delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
361    
362     # Sed substitution to avoid accidental globbing in evaled expressions
363     no_glob_subst='s/\*/\\\*/g'
364     ])
365    
366 michael 945 # _LT_PROG_LTMAIN
367     # ---------------
368     # Note that this code is called both from `configure', and `config.status'
369     # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
370     # `config.status' has no value for ac_aux_dir unless we are using Automake,
371     # so we pass a copy along to make sure it has a sensible value anyway.
372     m4_defun([_LT_PROG_LTMAIN],
373     [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
374     _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
375     ltmain="$ac_aux_dir/ltmain.sh"
376     ])# _LT_PROG_LTMAIN
377 michael 912
378    
379    
380 michael 945 # So that we can recreate a full libtool script including additional
381     # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
382     # in macros and then make a single call at the end using the `libtool'
383     # label.
384 michael 912
385 michael 945
386     # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
387     # ----------------------------------------
388     # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
389     m4_define([_LT_CONFIG_LIBTOOL_INIT],
390     [m4_ifval([$1],
391     [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
392     [$1
393     ])])])
394    
395     # Initialize.
396     m4_define([_LT_OUTPUT_LIBTOOL_INIT])
397    
398    
399     # _LT_CONFIG_LIBTOOL([COMMANDS])
400     # ------------------------------
401     # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
402     m4_define([_LT_CONFIG_LIBTOOL],
403     [m4_ifval([$1],
404     [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
405     [$1
406     ])])])
407    
408     # Initialize.
409     m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
410    
411    
412     # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
413     # -----------------------------------------------------
414     m4_defun([_LT_CONFIG_SAVE_COMMANDS],
415     [_LT_CONFIG_LIBTOOL([$1])
416     _LT_CONFIG_LIBTOOL_INIT([$2])
417     ])
418    
419    
420     # _LT_FORMAT_COMMENT([COMMENT])
421     # -----------------------------
422     # Add leading comment marks to the start of each line, and a trailing
423     # full-stop to the whole comment if one is not present already.
424     m4_define([_LT_FORMAT_COMMENT],
425     [m4_ifval([$1], [
426     m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
427     [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
428     )])
429    
430    
431    
432    
433    
434     # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
435     # -------------------------------------------------------------------
436     # CONFIGNAME is the name given to the value in the libtool script.
437     # VARNAME is the (base) name used in the configure script.
438     # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
439     # VARNAME. Any other value will be used directly.
440     m4_define([_LT_DECL],
441     [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
442     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
443     [m4_ifval([$1], [$1], [$2])])
444     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
445     m4_ifval([$4],
446     [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
447     lt_dict_add_subkey([lt_decl_dict], [$2],
448     [tagged?], [m4_ifval([$5], [yes], [no])])])
449     ])
450    
451    
452     # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
453     # --------------------------------------------------------
454     m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
455    
456    
457     # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
458     # ------------------------------------------------
459     m4_define([lt_decl_tag_varnames],
460     [_lt_decl_filter([tagged?], [yes], $@)])
461    
462    
463     # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
464     # ---------------------------------------------------------
465     m4_define([_lt_decl_filter],
466     [m4_case([$#],
467     [0], [m4_fatal([$0: too few arguments: $#])],
468     [1], [m4_fatal([$0: too few arguments: $#: $1])],
469     [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
470     [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
471     [lt_dict_filter([lt_decl_dict], $@)])[]dnl
472     ])
473    
474    
475     # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
476     # --------------------------------------------------
477     m4_define([lt_decl_quote_varnames],
478     [_lt_decl_filter([value], [1], $@)])
479    
480    
481     # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
482     # ---------------------------------------------------
483     m4_define([lt_decl_dquote_varnames],
484     [_lt_decl_filter([value], [2], $@)])
485    
486    
487     # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
488     # ---------------------------------------------------
489     m4_define([lt_decl_varnames_tagged],
490     [m4_assert([$# <= 2])dnl
491     _$0(m4_quote(m4_default([$1], [[, ]])),
492     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
493     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
494     m4_define([_lt_decl_varnames_tagged],
495     [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
496    
497    
498     # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
499     # ------------------------------------------------
500     m4_define([lt_decl_all_varnames],
501     [_$0(m4_quote(m4_default([$1], [[, ]])),
502     m4_if([$2], [],
503     m4_quote(lt_decl_varnames),
504     m4_quote(m4_shift($@))))[]dnl
505     ])
506     m4_define([_lt_decl_all_varnames],
507     [lt_join($@, lt_decl_varnames_tagged([$1],
508     lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
509     ])
510    
511    
512     # _LT_CONFIG_STATUS_DECLARE([VARNAME])
513     # ------------------------------------
514     # Quote a variable value, and forward it to `config.status' so that its
515     # declaration there will have the same value as in `configure'. VARNAME
516     # must have a single quote delimited value for this to work.
517     m4_define([_LT_CONFIG_STATUS_DECLARE],
518 michael 1094 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
519 michael 945
520    
521     # _LT_CONFIG_STATUS_DECLARATIONS
522     # ------------------------------
523     # We delimit libtool config variables with single quotes, so when
524     # we write them to config.status, we have to be sure to quote all
525     # embedded single quotes properly. In configure, this macro expands
526     # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
527     #
528 michael 1094 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
529 michael 945 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
530     [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
531     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
532    
533    
534     # _LT_LIBTOOL_TAGS
535     # ----------------
536     # Output comment and list of tags supported by the script
537     m4_defun([_LT_LIBTOOL_TAGS],
538     [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
539     available_tags="_LT_TAGS"dnl
540     ])
541    
542    
543     # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
544     # -----------------------------------
545     # Extract the dictionary values for VARNAME (optionally with TAG) and
546     # expand to a commented shell variable setting:
547     #
548     # # Some comment about what VAR is for.
549     # visible_name=$lt_internal_name
550     m4_define([_LT_LIBTOOL_DECLARE],
551     [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
552     [description])))[]dnl
553     m4_pushdef([_libtool_name],
554     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
555     m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
556     [0], [_libtool_name=[$]$1],
557     [1], [_libtool_name=$lt_[]$1],
558     [2], [_libtool_name=$lt_[]$1],
559     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
560     m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
561     ])
562    
563    
564     # _LT_LIBTOOL_CONFIG_VARS
565     # -----------------------
566     # Produce commented declarations of non-tagged libtool config variables
567     # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
568     # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
569     # section) are produced by _LT_LIBTOOL_TAG_VARS.
570     m4_defun([_LT_LIBTOOL_CONFIG_VARS],
571     [m4_foreach([_lt_var],
572     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
573     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
574    
575    
576     # _LT_LIBTOOL_TAG_VARS(TAG)
577     # -------------------------
578     m4_define([_LT_LIBTOOL_TAG_VARS],
579     [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
580     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
581    
582    
583     # _LT_TAGVAR(VARNAME, [TAGNAME])
584     # ------------------------------
585     m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
586    
587    
588     # _LT_CONFIG_COMMANDS
589 michael 912 # -------------------
590 michael 945 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
591     # variables for single and double quote escaping we saved from calls
592     # to _LT_DECL, we can put quote escaped variables declarations
593     # into `config.status', and then the shell code to quote escape them in
594     # for loops in `config.status'. Finally, any additional code accumulated
595     # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
596     m4_defun([_LT_CONFIG_COMMANDS],
597     [AC_PROVIDE_IFELSE([LT_OUTPUT],
598     dnl If the libtool generation code has been placed in $CONFIG_LT,
599     dnl instead of duplicating it all over again into config.status,
600     dnl then we will have config.status run $CONFIG_LT later, so it
601     dnl needs to know what name is stored there:
602     [AC_CONFIG_COMMANDS([libtool],
603     [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
604     dnl If the libtool generation code is destined for config.status,
605     dnl expand the accumulated commands and init code now:
606     [AC_CONFIG_COMMANDS([libtool],
607     [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
608     ])#_LT_CONFIG_COMMANDS
609    
610    
611     # Initialize.
612     m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
613     [
614    
615     # The HP-UX ksh and POSIX shell print the target directory to stdout
616     # if CDPATH is set.
617     (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
618    
619     sed_quote_subst='$sed_quote_subst'
620     double_quote_subst='$double_quote_subst'
621     delay_variable_subst='$delay_variable_subst'
622     _LT_CONFIG_STATUS_DECLARATIONS
623     LTCC='$LTCC'
624     LTCFLAGS='$LTCFLAGS'
625     compiler='$compiler_DEFAULT'
626    
627 michael 1094 # A function that is used when there is no print builtin or printf.
628     func_fallback_echo ()
629     {
630     eval 'cat <<_LTECHO_EOF
631     \$[]1
632     _LTECHO_EOF'
633     }
634    
635 michael 945 # Quote evaled strings.
636     for var in lt_decl_all_varnames([[ \
637     ]], lt_decl_quote_varnames); do
638 michael 1094 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
639 michael 945 *[[\\\\\\\`\\"\\\$]]*)
640 michael 1094 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
641 michael 945 ;;
642     *)
643     eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
644     ;;
645     esac
646     done
647    
648     # Double-quote double-evaled strings.
649     for var in lt_decl_all_varnames([[ \
650     ]], lt_decl_dquote_varnames); do
651 michael 1094 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
652 michael 945 *[[\\\\\\\`\\"\\\$]]*)
653 michael 1094 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
654 michael 945 ;;
655     *)
656     eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
657     ;;
658     esac
659     done
660    
661     _LT_OUTPUT_LIBTOOL_INIT
662     ])
663    
664 michael 1094 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
665     # ------------------------------------
666     # Generate a child script FILE with all initialization necessary to
667     # reuse the environment learned by the parent script, and make the
668     # file executable. If COMMENT is supplied, it is inserted after the
669     # `#!' sequence but before initialization text begins. After this
670     # macro, additional text can be appended to FILE to form the body of
671     # the child script. The macro ends with non-zero status if the
672     # file could not be fully written (such as if the disk is full).
673     m4_ifdef([AS_INIT_GENERATED],
674     [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
675     [m4_defun([_LT_GENERATED_FILE_INIT],
676     [m4_require([AS_PREPARE])]dnl
677     [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
678     [lt_write_fail=0
679     cat >$1 <<_ASEOF || lt_write_fail=1
680     #! $SHELL
681     # Generated by $as_me.
682     $2
683     SHELL=\${CONFIG_SHELL-$SHELL}
684     export SHELL
685     _ASEOF
686     cat >>$1 <<\_ASEOF || lt_write_fail=1
687     AS_SHELL_SANITIZE
688     _AS_PREPARE
689     exec AS_MESSAGE_FD>&1
690     _ASEOF
691     test $lt_write_fail = 0 && chmod +x $1[]dnl
692     m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
693 michael 945
694     # LT_OUTPUT
695     # ---------
696     # This macro allows early generation of the libtool script (before
697     # AC_OUTPUT is called), incase it is used in configure for compilation
698     # tests.
699     AC_DEFUN([LT_OUTPUT],
700     [: ${CONFIG_LT=./config.lt}
701     AC_MSG_NOTICE([creating $CONFIG_LT])
702 michael 1094 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
703     [# Run this file to recreate a libtool stub with the current configuration.])
704 michael 945
705 michael 1094 cat >>"$CONFIG_LT" <<\_LTEOF
706 michael 945 lt_cl_silent=false
707     exec AS_MESSAGE_LOG_FD>>config.log
708     {
709     echo
710     AS_BOX([Running $as_me.])
711     } >&AS_MESSAGE_LOG_FD
712    
713     lt_cl_help="\
714     \`$as_me' creates a local libtool stub from the current configuration,
715     for use in further configure time tests before the real libtool is
716     generated.
717    
718     Usage: $[0] [[OPTIONS]]
719    
720     -h, --help print this help, then exit
721     -V, --version print version number, then exit
722     -q, --quiet do not print progress messages
723     -d, --debug don't remove temporary files
724    
725     Report bugs to <bug-libtool@gnu.org>."
726    
727     lt_cl_version="\
728     m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
729     m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
730     configured by $[0], generated by m4_PACKAGE_STRING.
731    
732 michael 1094 Copyright (C) 2010 Free Software Foundation, Inc.
733 michael 945 This config.lt script is free software; the Free Software Foundation
734     gives unlimited permision to copy, distribute and modify it."
735    
736     while test $[#] != 0
737     do
738     case $[1] in
739     --version | --v* | -V )
740     echo "$lt_cl_version"; exit 0 ;;
741     --help | --h* | -h )
742     echo "$lt_cl_help"; exit 0 ;;
743     --debug | --d* | -d )
744     debug=: ;;
745     --quiet | --q* | --silent | --s* | -q )
746     lt_cl_silent=: ;;
747    
748     -*) AC_MSG_ERROR([unrecognized option: $[1]
749     Try \`$[0] --help' for more information.]) ;;
750    
751     *) AC_MSG_ERROR([unrecognized argument: $[1]
752     Try \`$[0] --help' for more information.]) ;;
753     esac
754     shift
755     done
756    
757     if $lt_cl_silent; then
758     exec AS_MESSAGE_FD>/dev/null
759     fi
760     _LTEOF
761    
762     cat >>"$CONFIG_LT" <<_LTEOF
763     _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
764     _LTEOF
765    
766     cat >>"$CONFIG_LT" <<\_LTEOF
767     AC_MSG_NOTICE([creating $ofile])
768     _LT_OUTPUT_LIBTOOL_COMMANDS
769     AS_EXIT(0)
770     _LTEOF
771     chmod +x "$CONFIG_LT"
772    
773     # configure is writing to config.log, but config.lt does its own redirection,
774     # appending to config.log, which fails on DOS, as config.log is still kept
775     # open by configure. Here we exec the FD to /dev/null, effectively closing
776     # config.log, so it can be properly (re)opened and appended to by config.lt.
777 michael 1094 lt_cl_success=:
778     test "$silent" = yes &&
779     lt_config_lt_args="$lt_config_lt_args --quiet"
780     exec AS_MESSAGE_LOG_FD>/dev/null
781     $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
782     exec AS_MESSAGE_LOG_FD>>config.log
783     $lt_cl_success || AS_EXIT(1)
784 michael 945 ])# LT_OUTPUT
785    
786    
787     # _LT_CONFIG(TAG)
788     # ---------------
789     # If TAG is the built-in tag, create an initial libtool script with a
790     # default configuration from the untagged config vars. Otherwise add code
791     # to config.status for appending the configuration named by TAG from the
792     # matching tagged config vars.
793     m4_defun([_LT_CONFIG],
794     [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
795     _LT_CONFIG_SAVE_COMMANDS([
796     m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
797     m4_if(_LT_TAG, [C], [
798     # See if we are running on zsh, and set the options which allow our
799     # commands through without removal of \ escapes.
800     if test -n "${ZSH_VERSION+set}" ; then
801     setopt NO_GLOB_SUBST
802     fi
803    
804     cfgfile="${ofile}T"
805     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
806     $RM "$cfgfile"
807    
808     cat <<_LT_EOF >> "$cfgfile"
809     #! $SHELL
810    
811     # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
812     # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
813     # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
814     # NOTE: Changes made to this file will be lost: look at ltmain.sh.
815     #
816     _LT_COPYING
817     _LT_LIBTOOL_TAGS
818    
819     # ### BEGIN LIBTOOL CONFIG
820     _LT_LIBTOOL_CONFIG_VARS
821     _LT_LIBTOOL_TAG_VARS
822     # ### END LIBTOOL CONFIG
823    
824     _LT_EOF
825    
826     case $host_os in
827     aix3*)
828     cat <<\_LT_EOF >> "$cfgfile"
829     # AIX sometimes has problems with the GCC collect2 program. For some
830     # reason, if we set the COLLECT_NAMES environment variable, the problems
831     # vanish in a puff of smoke.
832     if test "X${COLLECT_NAMES+set}" != Xset; then
833     COLLECT_NAMES=
834     export COLLECT_NAMES
835     fi
836     _LT_EOF
837     ;;
838     esac
839    
840     _LT_PROG_LTMAIN
841    
842     # We use sed instead of cat because bash on DJGPP gets confused if
843     # if finds mixed CR/LF and LF-only lines. Since sed operates in
844     # text mode, it properly converts lines to CR/LF. This bash problem
845     # is reportedly fixed, but why not run on old versions too?
846     sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
847     || (rm -f "$cfgfile"; exit 1)
848    
849     _LT_PROG_XSI_SHELLFNS
850    
851     sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
852     || (rm -f "$cfgfile"; exit 1)
853    
854     mv -f "$cfgfile" "$ofile" ||
855     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
856     chmod +x "$ofile"
857     ],
858     [cat <<_LT_EOF >> "$ofile"
859    
860     dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
861     dnl in a comment (ie after a #).
862     # ### BEGIN LIBTOOL TAG CONFIG: $1
863     _LT_LIBTOOL_TAG_VARS(_LT_TAG)
864     # ### END LIBTOOL TAG CONFIG: $1
865     _LT_EOF
866     ])dnl /m4_if
867     ],
868     [m4_if([$1], [], [
869     PACKAGE='$PACKAGE'
870     VERSION='$VERSION'
871     TIMESTAMP='$TIMESTAMP'
872     RM='$RM'
873     ofile='$ofile'], [])
874     ])dnl /_LT_CONFIG_SAVE_COMMANDS
875     ])# _LT_CONFIG
876    
877    
878     # LT_SUPPORTED_TAG(TAG)
879     # ---------------------
880     # Trace this macro to discover what tags are supported by the libtool
881     # --tag option, using:
882     # autoconf --trace 'LT_SUPPORTED_TAG:$1'
883     AC_DEFUN([LT_SUPPORTED_TAG], [])
884    
885    
886     # C support is built-in for now
887     m4_define([_LT_LANG_C_enabled], [])
888     m4_define([_LT_TAGS], [])
889    
890    
891     # LT_LANG(LANG)
892     # -------------
893     # Enable libtool support for the given language if not already enabled.
894     AC_DEFUN([LT_LANG],
895     [AC_BEFORE([$0], [LT_OUTPUT])dnl
896     m4_case([$1],
897     [C], [_LT_LANG(C)],
898     [C++], [_LT_LANG(CXX)],
899     [Java], [_LT_LANG(GCJ)],
900     [Fortran 77], [_LT_LANG(F77)],
901     [Fortran], [_LT_LANG(FC)],
902     [Windows Resource], [_LT_LANG(RC)],
903     [m4_ifdef([_LT_LANG_]$1[_CONFIG],
904     [_LT_LANG($1)],
905     [m4_fatal([$0: unsupported language: "$1"])])])dnl
906     ])# LT_LANG
907    
908    
909     # _LT_LANG(LANGNAME)
910     # ------------------
911     m4_defun([_LT_LANG],
912     [m4_ifdef([_LT_LANG_]$1[_enabled], [],
913     [LT_SUPPORTED_TAG([$1])dnl
914     m4_append([_LT_TAGS], [$1 ])dnl
915     m4_define([_LT_LANG_]$1[_enabled], [])dnl
916     _LT_LANG_$1_CONFIG($1)])dnl
917     ])# _LT_LANG
918    
919    
920     # _LT_LANG_DEFAULT_CONFIG
921     # -----------------------
922     m4_defun([_LT_LANG_DEFAULT_CONFIG],
923     [AC_PROVIDE_IFELSE([AC_PROG_CXX],
924     [LT_LANG(CXX)],
925     [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
926    
927     AC_PROVIDE_IFELSE([AC_PROG_F77],
928     [LT_LANG(F77)],
929     [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
930    
931     AC_PROVIDE_IFELSE([AC_PROG_FC],
932     [LT_LANG(FC)],
933     [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
934    
935     dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
936     dnl pulling things in needlessly.
937     AC_PROVIDE_IFELSE([AC_PROG_GCJ],
938     [LT_LANG(GCJ)],
939     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
940     [LT_LANG(GCJ)],
941     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
942     [LT_LANG(GCJ)],
943     [m4_ifdef([AC_PROG_GCJ],
944     [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
945     m4_ifdef([A][M_PROG_GCJ],
946     [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
947     m4_ifdef([LT_PROG_GCJ],
948     [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
949    
950     AC_PROVIDE_IFELSE([LT_PROG_RC],
951     [LT_LANG(RC)],
952     [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
953     ])# _LT_LANG_DEFAULT_CONFIG
954    
955     # Obsolete macros:
956     AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
957     AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
958     AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
959     AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
960 michael 1094 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
961 michael 945 dnl aclocal-1.4 backwards compatibility:
962     dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
963     dnl AC_DEFUN([AC_LIBTOOL_F77], [])
964     dnl AC_DEFUN([AC_LIBTOOL_FC], [])
965     dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
966 michael 1094 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
967 michael 945
968    
969     # _LT_TAG_COMPILER
970     # ----------------
971     m4_defun([_LT_TAG_COMPILER],
972 michael 912 [AC_REQUIRE([AC_PROG_CC])dnl
973    
974 michael 945 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
975     _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
976     _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
977     _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
978    
979 michael 912 # If no C compiler was specified, use CC.
980     LTCC=${LTCC-"$CC"}
981    
982     # If no C compiler flags were specified, use CFLAGS.
983     LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
984    
985     # Allow CC to be a program name with arguments.
986     compiler=$CC
987 michael 945 ])# _LT_TAG_COMPILER
988 michael 912
989    
990     # _LT_COMPILER_BOILERPLATE
991     # ------------------------
992     # Check for compiler boilerplate output or warnings with
993     # the simple compiler test code.
994 michael 945 m4_defun([_LT_COMPILER_BOILERPLATE],
995     [m4_require([_LT_DECL_SED])dnl
996 michael 912 ac_outfile=conftest.$ac_objext
997     echo "$lt_simple_compile_test_code" >conftest.$ac_ext
998     eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
999     _lt_compiler_boilerplate=`cat conftest.err`
1000 michael 945 $RM conftest*
1001 michael 912 ])# _LT_COMPILER_BOILERPLATE
1002    
1003    
1004     # _LT_LINKER_BOILERPLATE
1005     # ----------------------
1006     # Check for linker boilerplate output or warnings with
1007     # the simple link test code.
1008 michael 945 m4_defun([_LT_LINKER_BOILERPLATE],
1009     [m4_require([_LT_DECL_SED])dnl
1010 michael 912 ac_outfile=conftest.$ac_objext
1011     echo "$lt_simple_link_test_code" >conftest.$ac_ext
1012     eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1013     _lt_linker_boilerplate=`cat conftest.err`
1014 michael 945 $RM -r conftest*
1015 michael 912 ])# _LT_LINKER_BOILERPLATE
1016    
1017 db 941 # _LT_REQUIRED_DARWIN_CHECKS
1018 michael 945 # -------------------------
1019     m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1020 db 941 case $host_os in
1021     rhapsody* | darwin*)
1022     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1023     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1024 michael 945 AC_CHECK_TOOL([LIPO], [lipo], [:])
1025     AC_CHECK_TOOL([OTOOL], [otool], [:])
1026     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1027     _LT_DECL([], [DSYMUTIL], [1],
1028     [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1029     _LT_DECL([], [NMEDIT], [1],
1030     [Tool to change global to local symbols on Mac OS X])
1031     _LT_DECL([], [LIPO], [1],
1032     [Tool to manipulate fat objects and archives on Mac OS X])
1033     _LT_DECL([], [OTOOL], [1],
1034     [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1035     _LT_DECL([], [OTOOL64], [1],
1036     [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1037 michael 912
1038 db 941 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1039     [lt_cv_apple_cc_single_mod=no
1040     if test -z "${LT_MULTI_MODULE}"; then
1041 michael 945 # By default we will add the -single_module flag. You can override
1042     # by either setting the environment variable LT_MULTI_MODULE
1043     # non-empty at configure time, or by adding -multi_module to the
1044     # link flags.
1045     rm -rf libconftest.dylib*
1046     echo "int foo(void){return 1;}" > conftest.c
1047     echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1048     -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1049     $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1050     -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1051     _lt_result=$?
1052     if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1053     lt_cv_apple_cc_single_mod=yes
1054     else
1055     cat conftest.err >&AS_MESSAGE_LOG_FD
1056     fi
1057     rm -rf libconftest.dylib*
1058     rm -f conftest.*
1059 db 941 fi])
1060     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1061     [lt_cv_ld_exported_symbols_list],
1062     [lt_cv_ld_exported_symbols_list=no
1063     save_LDFLAGS=$LDFLAGS
1064     echo "_main" > conftest.sym
1065     LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1066     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1067 michael 945 [lt_cv_ld_exported_symbols_list=yes],
1068     [lt_cv_ld_exported_symbols_list=no])
1069     LDFLAGS="$save_LDFLAGS"
1070 db 941 ])
1071 michael 1094 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1072     [lt_cv_ld_force_load=no
1073     cat > conftest.c << _LT_EOF
1074     int forced_loaded() { return 2;}
1075     _LT_EOF
1076     echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1077     $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1078     echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1079     $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1080     echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1081     $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1082     cat > conftest.c << _LT_EOF
1083     int main() { return 0;}
1084     _LT_EOF
1085     echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1086     $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1087     _lt_result=$?
1088     if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
1089     lt_cv_ld_force_load=yes
1090     else
1091     cat conftest.err >&AS_MESSAGE_LOG_FD
1092     fi
1093     rm -f conftest.err libconftest.a conftest conftest.c
1094     rm -rf conftest.dSYM
1095     ])
1096 db 941 case $host_os in
1097 michael 945 rhapsody* | darwin1.[[012]])
1098 db 941 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1099     darwin1.*)
1100 michael 945 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1101     darwin*) # darwin 5.x on
1102 db 941 # if running on 10.5 or later, the deployment target defaults
1103     # to the OS version, if on x86, and 10.4, the deployment
1104     # target defaults to 10.4. Don't you love it?
1105     case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1106 michael 945 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1107     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1108     10.[[012]]*)
1109     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1110     10.*)
1111     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1112 db 941 esac
1113     ;;
1114     esac
1115     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1116     _lt_dar_single_mod='$single_module'
1117     fi
1118     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1119     _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1120     else
1121 michael 945 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1122 db 941 fi
1123 michael 1094 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1124 michael 945 _lt_dsymutil='~$DSYMUTIL $lib || :'
1125 db 941 else
1126     _lt_dsymutil=
1127     fi
1128     ;;
1129     esac
1130     ])
1131    
1132 michael 945
1133     # _LT_DARWIN_LINKER_FEATURES
1134     # --------------------------
1135     # Checks for linker and compiler features on darwin
1136     m4_defun([_LT_DARWIN_LINKER_FEATURES],
1137     [
1138     m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1139     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1140     _LT_TAGVAR(hardcode_direct, $1)=no
1141     _LT_TAGVAR(hardcode_automatic, $1)=yes
1142     _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1143 michael 1094 if test "$lt_cv_ld_force_load" = "yes"; then
1144     _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1145     else
1146     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1147     fi
1148 michael 945 _LT_TAGVAR(link_all_deplibs, $1)=yes
1149     _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1150     case $cc_basename in
1151     ifort*) _lt_dar_can_shared=yes ;;
1152     *) _lt_dar_can_shared=$GCC ;;
1153     esac
1154     if test "$_lt_dar_can_shared" = "yes"; then
1155 michael 1094 output_verbose_link_cmd=func_echo_all
1156 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}"
1157     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1158     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1159     _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1160     m4_if([$1], [CXX],
1161     [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1162     _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1163     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1164     fi
1165     ],[])
1166     else
1167     _LT_TAGVAR(ld_shlibs, $1)=no
1168     fi
1169     ])
1170    
1171     # _LT_SYS_MODULE_PATH_AIX
1172     # -----------------------
1173 michael 912 # Links a minimal program and checks the executable
1174     # for the system default hardcoded library path. In most cases,
1175     # this is /usr/lib:/lib, but when the MPI compilers are used
1176     # the location of the communication and MPI libs are included too.
1177     # If we don't find anything, use the default library path according
1178     # to the aix ld manual.
1179 michael 945 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1180     [m4_require([_LT_DECL_SED])dnl
1181 michael 912 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1182     lt_aix_libpath_sed='
1183     /Import File Strings/,/^$/ {
1184     /^0/ {
1185     s/^0 *\(.*\)$/\1/
1186     p
1187     }
1188     }'
1189     aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1190     # Check for a 64-bit object if we didn't find anything.
1191     if test -z "$aix_libpath"; then
1192     aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1193     fi],[])
1194     if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1195 michael 945 ])# _LT_SYS_MODULE_PATH_AIX
1196 michael 912
1197    
1198 michael 945 # _LT_SHELL_INIT(ARG)
1199     # -------------------
1200     m4_define([_LT_SHELL_INIT],
1201 michael 1094 [m4_divert_text([M4SH-INIT], [$1
1202     ])])# _LT_SHELL_INIT
1203 michael 912
1204    
1205 michael 1094
1206 michael 945 # _LT_PROG_ECHO_BACKSLASH
1207     # -----------------------
1208 michael 1094 # Find how we can fake an echo command that does not interpret backslash.
1209     # In particular, with Autoconf 2.60 or later we add some code to the start
1210     # of the generated configure script which will find a shell with a builtin
1211     # printf (which we can use as an echo command).
1212 michael 945 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1213 michael 1094 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1214     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1215     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1216 michael 912
1217 michael 1094 AC_MSG_CHECKING([how to print strings])
1218     # Test print first, because it will be a builtin if present.
1219     if test "X`print -r -- -n 2>/dev/null`" = X-n && \
1220     test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1221     ECHO='print -r --'
1222     elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1223     ECHO='printf %s\n'
1224 michael 912 else
1225 michael 1094 # Use this function as a fallback that always works.
1226     func_fallback_echo ()
1227     {
1228     eval 'cat <<_LTECHO_EOF
1229     $[]1
1230     _LTECHO_EOF'
1231     }
1232     ECHO='func_fallback_echo'
1233 michael 912 fi
1234    
1235 michael 1094 # func_echo_all arg...
1236     # Invoke $ECHO with all args, space-separated.
1237     func_echo_all ()
1238     {
1239     $ECHO "$*"
1240     }
1241 michael 912
1242 michael 1094 case "$ECHO" in
1243     printf*) AC_MSG_RESULT([printf]) ;;
1244     print*) AC_MSG_RESULT([print -r]) ;;
1245     *) AC_MSG_RESULT([cat]) ;;
1246     esac
1247 michael 912
1248 michael 1094 m4_ifdef([_AS_DETECT_SUGGESTED],
1249     [_AS_DETECT_SUGGESTED([
1250     test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1251     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1252     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1253     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1254     PATH=/empty FPATH=/empty; export PATH FPATH
1255     test "X`printf %s $ECHO`" = "X$ECHO" \
1256     || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1257 michael 912
1258 michael 945 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1259 michael 1094 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1260 michael 945 ])# _LT_PROG_ECHO_BACKSLASH
1261 michael 912
1262    
1263 michael 945 # _LT_ENABLE_LOCK
1264     # ---------------
1265     m4_defun([_LT_ENABLE_LOCK],
1266 michael 912 [AC_ARG_ENABLE([libtool-lock],
1267 michael 945 [AS_HELP_STRING([--disable-libtool-lock],
1268     [avoid locking (might break parallel builds)])])
1269 michael 912 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1270    
1271     # Some flags need to be propagated to the compiler or linker for good
1272     # libtool support.
1273     case $host in
1274     ia64-*-hpux*)
1275     # Find out which ABI we are using.
1276     echo 'int i;' > conftest.$ac_ext
1277     if AC_TRY_EVAL(ac_compile); then
1278     case `/usr/bin/file conftest.$ac_objext` in
1279 michael 945 *ELF-32*)
1280     HPUX_IA64_MODE="32"
1281     ;;
1282     *ELF-64*)
1283     HPUX_IA64_MODE="64"
1284     ;;
1285 michael 912 esac
1286     fi
1287     rm -rf conftest*
1288     ;;
1289     *-*-irix6*)
1290     # Find out which ABI we are using.
1291 michael 1094 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1292 michael 912 if AC_TRY_EVAL(ac_compile); then
1293 michael 945 if test "$lt_cv_prog_gnu_ld" = yes; then
1294     case `/usr/bin/file conftest.$ac_objext` in
1295     *32-bit*)
1296     LD="${LD-ld} -melf32bsmip"
1297     ;;
1298     *N32*)
1299     LD="${LD-ld} -melf32bmipn32"
1300     ;;
1301     *64-bit*)
1302     LD="${LD-ld} -melf64bmip"
1303     ;;
1304     esac
1305     else
1306     case `/usr/bin/file conftest.$ac_objext` in
1307     *32-bit*)
1308     LD="${LD-ld} -32"
1309     ;;
1310     *N32*)
1311     LD="${LD-ld} -n32"
1312     ;;
1313     *64-bit*)
1314     LD="${LD-ld} -64"
1315     ;;
1316     esac
1317     fi
1318 michael 912 fi
1319     rm -rf conftest*
1320     ;;
1321    
1322     x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1323 michael 945 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1324 michael 912 # Find out which ABI we are using.
1325     echo 'int i;' > conftest.$ac_ext
1326     if AC_TRY_EVAL(ac_compile); then
1327     case `/usr/bin/file conftest.o` in
1328 michael 945 *32-bit*)
1329     case $host in
1330     x86_64-*kfreebsd*-gnu)
1331     LD="${LD-ld} -m elf_i386_fbsd"
1332     ;;
1333     x86_64-*linux*)
1334     LD="${LD-ld} -m elf_i386"
1335     ;;
1336     ppc64-*linux*|powerpc64-*linux*)
1337     LD="${LD-ld} -m elf32ppclinux"
1338     ;;
1339     s390x-*linux*)
1340     LD="${LD-ld} -m elf_s390"
1341     ;;
1342     sparc64-*linux*)
1343     LD="${LD-ld} -m elf32_sparc"
1344     ;;
1345     esac
1346     ;;
1347     *64-bit*)
1348     case $host in
1349     x86_64-*kfreebsd*-gnu)
1350     LD="${LD-ld} -m elf_x86_64_fbsd"
1351     ;;
1352     x86_64-*linux*)
1353     LD="${LD-ld} -m elf_x86_64"
1354     ;;
1355     ppc*-*linux*|powerpc*-*linux*)
1356     LD="${LD-ld} -m elf64ppc"
1357     ;;
1358     s390*-*linux*|s390*-*tpf*)
1359     LD="${LD-ld} -m elf64_s390"
1360     ;;
1361     sparc*-*linux*)
1362     LD="${LD-ld} -m elf64_sparc"
1363     ;;
1364     esac
1365     ;;
1366 michael 912 esac
1367     fi
1368     rm -rf conftest*
1369     ;;
1370    
1371     *-*-sco3.2v5*)
1372     # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1373     SAVE_CFLAGS="$CFLAGS"
1374     CFLAGS="$CFLAGS -belf"
1375     AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1376     [AC_LANG_PUSH(C)
1377 michael 945 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1378 michael 912 AC_LANG_POP])
1379     if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1380     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1381     CFLAGS="$SAVE_CFLAGS"
1382     fi
1383     ;;
1384     sparc*-*solaris*)
1385     # Find out which ABI we are using.
1386     echo 'int i;' > conftest.$ac_ext
1387     if AC_TRY_EVAL(ac_compile); then
1388     case `/usr/bin/file conftest.o` in
1389     *64-bit*)
1390     case $lt_cv_prog_gnu_ld in
1391     yes*) LD="${LD-ld} -m elf64_sparc" ;;
1392 db 941 *)
1393 michael 945 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1394 db 941 LD="${LD-ld} -64"
1395     fi
1396     ;;
1397 michael 912 esac
1398     ;;
1399     esac
1400     fi
1401     rm -rf conftest*
1402     ;;
1403     esac
1404    
1405     need_locks="$enable_libtool_lock"
1406 michael 945 ])# _LT_ENABLE_LOCK
1407 michael 912
1408    
1409 michael 945 # _LT_CMD_OLD_ARCHIVE
1410     # -------------------
1411     m4_defun([_LT_CMD_OLD_ARCHIVE],
1412     [AC_CHECK_TOOL(AR, ar, false)
1413     test -z "$AR" && AR=ar
1414     test -z "$AR_FLAGS" && AR_FLAGS=cru
1415     _LT_DECL([], [AR], [1], [The archiver])
1416     _LT_DECL([], [AR_FLAGS], [1])
1417 michael 912
1418 michael 945 AC_CHECK_TOOL(STRIP, strip, :)
1419     test -z "$STRIP" && STRIP=:
1420     _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1421    
1422     AC_CHECK_TOOL(RANLIB, ranlib, :)
1423     test -z "$RANLIB" && RANLIB=:
1424     _LT_DECL([], [RANLIB], [1],
1425     [Commands used to install an old-style archive])
1426    
1427     # Determine commands to create old-style static archives.
1428     old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1429     old_postinstall_cmds='chmod 644 $oldlib'
1430     old_postuninstall_cmds=
1431    
1432     if test -n "$RANLIB"; then
1433     case $host_os in
1434     openbsd*)
1435     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1436     ;;
1437     *)
1438     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1439     ;;
1440     esac
1441     old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1442     fi
1443 michael 1094
1444     case $host_os in
1445     darwin*)
1446     lock_old_archive_extraction=yes ;;
1447     *)
1448     lock_old_archive_extraction=no ;;
1449     esac
1450 michael 945 _LT_DECL([], [old_postinstall_cmds], [2])
1451     _LT_DECL([], [old_postuninstall_cmds], [2])
1452     _LT_TAGDECL([], [old_archive_cmds], [2],
1453     [Commands used to build an old-style archive])
1454 michael 1094 _LT_DECL([], [lock_old_archive_extraction], [0],
1455     [Whether to use a lock for old archive extraction])
1456 michael 945 ])# _LT_CMD_OLD_ARCHIVE
1457    
1458    
1459     # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1460 michael 912 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1461     # ----------------------------------------------------------------
1462     # Check whether the given compiler option works
1463 michael 945 AC_DEFUN([_LT_COMPILER_OPTION],
1464     [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1465     m4_require([_LT_DECL_SED])dnl
1466 michael 912 AC_CACHE_CHECK([$1], [$2],
1467     [$2=no
1468 michael 945 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1469 michael 912 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1470     lt_compiler_flag="$3"
1471     # Insert the option either (1) after the last *FLAGS variable, or
1472     # (2) before a word containing "conftest.", or (3) at the end.
1473     # Note that $ac_compile itself does not contain backslashes and begins
1474     # with a dollar sign (not a hyphen), so the echo should work correctly.
1475     # The option is referenced via a variable to avoid confusing sed.
1476     lt_compile=`echo "$ac_compile" | $SED \
1477     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1478     -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1479     -e 's:$: $lt_compiler_flag:'`
1480 michael 1094 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1481 michael 912 (eval "$lt_compile" 2>conftest.err)
1482     ac_status=$?
1483     cat conftest.err >&AS_MESSAGE_LOG_FD
1484 michael 1094 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1485 michael 912 if (exit $ac_status) && test -s "$ac_outfile"; then
1486     # The compiler can only warn and ignore the option if not recognized
1487     # So say no if there are warnings other than the usual output.
1488 michael 1094 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1489 michael 912 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1490     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1491     $2=yes
1492     fi
1493     fi
1494 michael 945 $RM conftest*
1495 michael 912 ])
1496    
1497     if test x"[$]$2" = xyes; then
1498 michael 945 m4_if([$5], , :, [$5])
1499 michael 912 else
1500 michael 945 m4_if([$6], , :, [$6])
1501 michael 912 fi
1502 michael 945 ])# _LT_COMPILER_OPTION
1503 michael 912
1504 michael 945 # Old name:
1505     AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1506     dnl aclocal-1.4 backwards compatibility:
1507     dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1508 michael 912
1509 michael 945
1510     # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1511     # [ACTION-SUCCESS], [ACTION-FAILURE])
1512     # ----------------------------------------------------
1513     # Check whether the given linker option works
1514     AC_DEFUN([_LT_LINKER_OPTION],
1515     [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1516     m4_require([_LT_DECL_SED])dnl
1517 michael 912 AC_CACHE_CHECK([$1], [$2],
1518     [$2=no
1519     save_LDFLAGS="$LDFLAGS"
1520     LDFLAGS="$LDFLAGS $3"
1521     echo "$lt_simple_link_test_code" > conftest.$ac_ext
1522     if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1523     # The linker can only warn and ignore the option if not recognized
1524     # So say no if there are warnings
1525     if test -s conftest.err; then
1526     # Append any errors to the config.log.
1527     cat conftest.err 1>&AS_MESSAGE_LOG_FD
1528 michael 1094 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1529 michael 912 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1530     if diff conftest.exp conftest.er2 >/dev/null; then
1531     $2=yes
1532     fi
1533     else
1534     $2=yes
1535     fi
1536     fi
1537 michael 945 $RM -r conftest*
1538 michael 912 LDFLAGS="$save_LDFLAGS"
1539     ])
1540    
1541     if test x"[$]$2" = xyes; then
1542 michael 945 m4_if([$4], , :, [$4])
1543 michael 912 else
1544 michael 945 m4_if([$5], , :, [$5])
1545 michael 912 fi
1546 michael 945 ])# _LT_LINKER_OPTION
1547 michael 912
1548 michael 945 # Old name:
1549     AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1550     dnl aclocal-1.4 backwards compatibility:
1551     dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1552 michael 912
1553 michael 945
1554     # LT_CMD_MAX_LEN
1555     #---------------
1556     AC_DEFUN([LT_CMD_MAX_LEN],
1557     [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1558     # find the maximum length of command line arguments
1559 michael 912 AC_MSG_CHECKING([the maximum length of command line arguments])
1560     AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1561     i=0
1562     teststring="ABCD"
1563    
1564     case $build_os in
1565     msdosdjgpp*)
1566     # On DJGPP, this test can blow up pretty badly due to problems in libc
1567     # (any single argument exceeding 2000 bytes causes a buffer overrun
1568     # during glob expansion). Even if it were fixed, the result of this
1569     # check would be larger than it should be.
1570     lt_cv_sys_max_cmd_len=12288; # 12K is about right
1571     ;;
1572    
1573     gnu*)
1574     # Under GNU Hurd, this test is not required because there is
1575     # no limit to the length of command line arguments.
1576     # Libtool will interpret -1 as no limit whatsoever
1577     lt_cv_sys_max_cmd_len=-1;
1578     ;;
1579    
1580 michael 945 cygwin* | mingw* | cegcc*)
1581 michael 912 # On Win9x/ME, this test blows up -- it succeeds, but takes
1582     # about 5 minutes as the teststring grows exponentially.
1583     # Worse, since 9x/ME are not pre-emptively multitasking,
1584     # you end up with a "frozen" computer, even though with patience
1585     # the test eventually succeeds (with a max line length of 256k).
1586     # Instead, let's just punt: use the minimum linelength reported by
1587     # all of the supported platforms: 8192 (on NT/2K/XP).
1588     lt_cv_sys_max_cmd_len=8192;
1589     ;;
1590    
1591 michael 1094 mint*)
1592     # On MiNT this can take a long time and run out of memory.
1593     lt_cv_sys_max_cmd_len=8192;
1594     ;;
1595    
1596 michael 912 amigaos*)
1597     # On AmigaOS with pdksh, this test takes hours, literally.
1598     # So we just punt and use a minimum line length of 8192.
1599     lt_cv_sys_max_cmd_len=8192;
1600     ;;
1601    
1602     netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1603     # This has been around since 386BSD, at least. Likely further.
1604     if test -x /sbin/sysctl; then
1605     lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1606     elif test -x /usr/sbin/sysctl; then
1607     lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1608     else
1609     lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1610     fi
1611     # And add a safety zone
1612     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1613     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1614     ;;
1615    
1616     interix*)
1617     # We know the value 262144 and hardcode it with a safety zone (like BSD)
1618     lt_cv_sys_max_cmd_len=196608
1619     ;;
1620    
1621     osf*)
1622     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1623     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1624     # nice to cause kernel panics so lets avoid the loop below.
1625     # First set a reasonable default.
1626     lt_cv_sys_max_cmd_len=16384
1627     #
1628     if test -x /sbin/sysconfig; then
1629     case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1630     *1*) lt_cv_sys_max_cmd_len=-1 ;;
1631     esac
1632     fi
1633     ;;
1634     sco3.2v5*)
1635     lt_cv_sys_max_cmd_len=102400
1636     ;;
1637     sysv5* | sco5v6* | sysv4.2uw2*)
1638     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1639     if test -n "$kargmax"; then
1640 michael 945 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1641 michael 912 else
1642     lt_cv_sys_max_cmd_len=32768
1643     fi
1644     ;;
1645     *)
1646     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1647     if test -n "$lt_cv_sys_max_cmd_len"; then
1648     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1649     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1650     else
1651 michael 945 # Make teststring a little bigger before we do anything with it.
1652     # a 1K string should be a reasonable start.
1653     for i in 1 2 3 4 5 6 7 8 ; do
1654     teststring=$teststring$teststring
1655     done
1656 michael 912 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1657 michael 945 # If test is not a shell built-in, we'll probably end up computing a
1658     # maximum length that is only half of the actual maximum length, but
1659     # we can't tell.
1660 michael 1094 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
1661     = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1662 michael 912 test $i != 17 # 1/2 MB should be enough
1663     do
1664     i=`expr $i + 1`
1665     teststring=$teststring$teststring
1666     done
1667 michael 945 # Only check the string length outside the loop.
1668     lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1669 michael 912 teststring=
1670 michael 945 # Add a significant safety factor because C++ compilers can tack on
1671     # massive amounts of additional arguments before passing them to the
1672     # linker. It appears as though 1/2 is a usable value.
1673 michael 912 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1674     fi
1675     ;;
1676     esac
1677     ])
1678     if test -n $lt_cv_sys_max_cmd_len ; then
1679     AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1680     else
1681     AC_MSG_RESULT(none)
1682     fi
1683 michael 945 max_cmd_len=$lt_cv_sys_max_cmd_len
1684     _LT_DECL([], [max_cmd_len], [0],
1685     [What is the maximum length of a command?])
1686     ])# LT_CMD_MAX_LEN
1687 michael 912
1688 michael 945 # Old name:
1689     AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1690     dnl aclocal-1.4 backwards compatibility:
1691     dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1692 michael 912
1693    
1694 michael 945 # _LT_HEADER_DLFCN
1695     # ----------------
1696     m4_defun([_LT_HEADER_DLFCN],
1697     [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1698     ])# _LT_HEADER_DLFCN
1699 michael 912
1700 michael 945
1701     # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1702     # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1703     # ----------------------------------------------------------------
1704     m4_defun([_LT_TRY_DLOPEN_SELF],
1705     [m4_require([_LT_HEADER_DLFCN])dnl
1706 michael 912 if test "$cross_compiling" = yes; then :
1707     [$4]
1708     else
1709     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1710     lt_status=$lt_dlunknown
1711 michael 945 cat > conftest.$ac_ext <<_LT_EOF
1712 michael 1094 [#line $LINENO "configure"
1713 michael 912 #include "confdefs.h"
1714    
1715     #if HAVE_DLFCN_H
1716     #include <dlfcn.h>
1717     #endif
1718    
1719     #include <stdio.h>
1720    
1721     #ifdef RTLD_GLOBAL
1722     # define LT_DLGLOBAL RTLD_GLOBAL
1723     #else
1724     # ifdef DL_GLOBAL
1725     # define LT_DLGLOBAL DL_GLOBAL
1726     # else
1727     # define LT_DLGLOBAL 0
1728     # endif
1729     #endif
1730    
1731     /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1732     find out it does not work in some platform. */
1733     #ifndef LT_DLLAZY_OR_NOW
1734     # ifdef RTLD_LAZY
1735     # define LT_DLLAZY_OR_NOW RTLD_LAZY
1736     # else
1737     # ifdef DL_LAZY
1738     # define LT_DLLAZY_OR_NOW DL_LAZY
1739     # else
1740     # ifdef RTLD_NOW
1741     # define LT_DLLAZY_OR_NOW RTLD_NOW
1742     # else
1743     # ifdef DL_NOW
1744     # define LT_DLLAZY_OR_NOW DL_NOW
1745     # else
1746     # define LT_DLLAZY_OR_NOW 0
1747     # endif
1748     # endif
1749     # endif
1750     # endif
1751     #endif
1752    
1753 michael 1094 /* When -fvisbility=hidden is used, assume the code has been annotated
1754     correspondingly for the symbols needed. */
1755     #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1756     void fnord () __attribute__((visibility("default")));
1757     #endif
1758    
1759     void fnord () { int i=42; }
1760 michael 912 int main ()
1761     {
1762     void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1763     int status = $lt_dlunknown;
1764    
1765     if (self)
1766     {
1767     if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1768 michael 1094 else
1769     {
1770     if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1771     else puts (dlerror ());
1772     }
1773 michael 912 /* dlclose (self); */
1774     }
1775     else
1776     puts (dlerror ());
1777    
1778 michael 945 return status;
1779 michael 912 }]
1780 michael 945 _LT_EOF
1781 michael 912 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1782     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1783     lt_status=$?
1784     case x$lt_status in
1785     x$lt_dlno_uscore) $1 ;;
1786     x$lt_dlneed_uscore) $2 ;;
1787     x$lt_dlunknown|x*) $3 ;;
1788     esac
1789     else :
1790     # compilation failed
1791     $3
1792     fi
1793     fi
1794     rm -fr conftest*
1795 michael 945 ])# _LT_TRY_DLOPEN_SELF
1796 michael 912
1797    
1798 michael 945 # LT_SYS_DLOPEN_SELF
1799     # ------------------
1800     AC_DEFUN([LT_SYS_DLOPEN_SELF],
1801     [m4_require([_LT_HEADER_DLFCN])dnl
1802 michael 912 if test "x$enable_dlopen" != xyes; then
1803     enable_dlopen=unknown
1804     enable_dlopen_self=unknown
1805     enable_dlopen_self_static=unknown
1806     else
1807     lt_cv_dlopen=no
1808     lt_cv_dlopen_libs=
1809    
1810     case $host_os in
1811     beos*)
1812     lt_cv_dlopen="load_add_on"
1813     lt_cv_dlopen_libs=
1814     lt_cv_dlopen_self=yes
1815     ;;
1816    
1817 michael 945 mingw* | pw32* | cegcc*)
1818 michael 912 lt_cv_dlopen="LoadLibrary"
1819     lt_cv_dlopen_libs=
1820 michael 945 ;;
1821 michael 912
1822     cygwin*)
1823     lt_cv_dlopen="dlopen"
1824     lt_cv_dlopen_libs=
1825 michael 945 ;;
1826 michael 912
1827     darwin*)
1828     # if libdl is installed we need to link against it
1829     AC_CHECK_LIB([dl], [dlopen],
1830     [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1831     lt_cv_dlopen="dyld"
1832     lt_cv_dlopen_libs=
1833     lt_cv_dlopen_self=yes
1834     ])
1835 michael 945 ;;
1836 michael 912
1837     *)
1838     AC_CHECK_FUNC([shl_load],
1839     [lt_cv_dlopen="shl_load"],
1840     [AC_CHECK_LIB([dld], [shl_load],
1841 db 941 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1842 michael 912 [AC_CHECK_FUNC([dlopen],
1843     [lt_cv_dlopen="dlopen"],
1844     [AC_CHECK_LIB([dl], [dlopen],
1845     [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1846     [AC_CHECK_LIB([svld], [dlopen],
1847     [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1848     [AC_CHECK_LIB([dld], [dld_link],
1849 db 941 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1850 michael 912 ])
1851     ])
1852     ])
1853     ])
1854     ])
1855     ;;
1856     esac
1857    
1858     if test "x$lt_cv_dlopen" != xno; then
1859     enable_dlopen=yes
1860     else
1861     enable_dlopen=no
1862     fi
1863    
1864     case $lt_cv_dlopen in
1865     dlopen)
1866     save_CPPFLAGS="$CPPFLAGS"
1867     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1868    
1869     save_LDFLAGS="$LDFLAGS"
1870     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1871    
1872     save_LIBS="$LIBS"
1873     LIBS="$lt_cv_dlopen_libs $LIBS"
1874    
1875     AC_CACHE_CHECK([whether a program can dlopen itself],
1876     lt_cv_dlopen_self, [dnl
1877 michael 945 _LT_TRY_DLOPEN_SELF(
1878 michael 912 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1879     lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1880     ])
1881    
1882     if test "x$lt_cv_dlopen_self" = xyes; then
1883     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1884     AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1885 michael 945 lt_cv_dlopen_self_static, [dnl
1886     _LT_TRY_DLOPEN_SELF(
1887 michael 912 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1888     lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1889     ])
1890     fi
1891    
1892     CPPFLAGS="$save_CPPFLAGS"
1893     LDFLAGS="$save_LDFLAGS"
1894     LIBS="$save_LIBS"
1895     ;;
1896     esac
1897    
1898     case $lt_cv_dlopen_self in
1899     yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1900     *) enable_dlopen_self=unknown ;;
1901     esac
1902    
1903     case $lt_cv_dlopen_self_static in
1904     yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1905     *) enable_dlopen_self_static=unknown ;;
1906     esac
1907     fi
1908 michael 945 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1909     [Whether dlopen is supported])
1910     _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1911     [Whether dlopen of programs is supported])
1912     _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1913     [Whether dlopen of statically linked programs is supported])
1914     ])# LT_SYS_DLOPEN_SELF
1915 michael 912
1916 michael 945 # Old name:
1917     AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1918     dnl aclocal-1.4 backwards compatibility:
1919     dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1920 michael 912
1921 michael 945
1922     # _LT_COMPILER_C_O([TAGNAME])
1923     # ---------------------------
1924     # Check to see if options -c and -o are simultaneously supported by compiler.
1925     # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1926     m4_defun([_LT_COMPILER_C_O],
1927     [m4_require([_LT_DECL_SED])dnl
1928     m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1929     m4_require([_LT_TAG_COMPILER])dnl
1930 michael 912 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1931 michael 945 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1932     [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1933     $RM -r conftest 2>/dev/null
1934 michael 912 mkdir conftest
1935     cd conftest
1936     mkdir out
1937     echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1938    
1939     lt_compiler_flag="-o out/conftest2.$ac_objext"
1940     # Insert the option either (1) after the last *FLAGS variable, or
1941     # (2) before a word containing "conftest.", or (3) at the end.
1942     # Note that $ac_compile itself does not contain backslashes and begins
1943     # with a dollar sign (not a hyphen), so the echo should work correctly.
1944     lt_compile=`echo "$ac_compile" | $SED \
1945     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1946     -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1947     -e 's:$: $lt_compiler_flag:'`
1948 michael 1094 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1949 michael 912 (eval "$lt_compile" 2>out/conftest.err)
1950     ac_status=$?
1951     cat out/conftest.err >&AS_MESSAGE_LOG_FD
1952 michael 1094 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1953 michael 912 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1954     then
1955     # The compiler can only warn and ignore the option if not recognized
1956     # So say no if there are warnings
1957 michael 1094 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
1958 michael 912 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1959     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1960 michael 945 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1961 michael 912 fi
1962     fi
1963     chmod u+w . 2>&AS_MESSAGE_LOG_FD
1964 michael 945 $RM conftest*
1965 michael 912 # SGI C++ compiler will create directory out/ii_files/ for
1966     # template instantiation
1967 michael 945 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1968     $RM out/* && rmdir out
1969 michael 912 cd ..
1970 michael 945 $RM -r conftest
1971     $RM conftest*
1972 michael 912 ])
1973 michael 945 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1974     [Does compiler simultaneously support -c and -o options?])
1975     ])# _LT_COMPILER_C_O
1976 michael 912
1977    
1978 michael 945 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
1979     # ----------------------------------
1980 michael 912 # Check to see if we can do hard links to lock some files if needed
1981 michael 945 m4_defun([_LT_COMPILER_FILE_LOCKS],
1982     [m4_require([_LT_ENABLE_LOCK])dnl
1983     m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1984     _LT_COMPILER_C_O([$1])
1985 michael 912
1986     hard_links="nottested"
1987 michael 945 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1988 michael 912 # do not overwrite the value of need_locks provided by the user
1989     AC_MSG_CHECKING([if we can lock with hard links])
1990     hard_links=yes
1991 michael 945 $RM conftest*
1992 michael 912 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1993     touch conftest.a
1994     ln conftest.a conftest.b 2>&5 || hard_links=no
1995     ln conftest.a conftest.b 2>/dev/null && hard_links=no
1996     AC_MSG_RESULT([$hard_links])
1997     if test "$hard_links" = no; then
1998     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1999     need_locks=warn
2000     fi
2001     else
2002     need_locks=no
2003     fi
2004 michael 945 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2005     ])# _LT_COMPILER_FILE_LOCKS
2006 michael 912
2007    
2008 michael 945 # _LT_CHECK_OBJDIR
2009     # ----------------
2010     m4_defun([_LT_CHECK_OBJDIR],
2011 michael 912 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2012     [rm -f .libs 2>/dev/null
2013     mkdir .libs 2>/dev/null
2014     if test -d .libs; then
2015     lt_cv_objdir=.libs
2016     else
2017     # MS-DOS does not allow filenames that begin with a dot.
2018     lt_cv_objdir=_libs
2019     fi
2020     rmdir .libs 2>/dev/null])
2021     objdir=$lt_cv_objdir
2022 michael 945 _LT_DECL([], [objdir], [0],
2023     [The name of the directory that contains temporary libtool files])dnl
2024     m4_pattern_allow([LT_OBJDIR])dnl
2025     AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2026     [Define to the sub-directory in which libtool stores uninstalled libraries.])
2027     ])# _LT_CHECK_OBJDIR
2028 michael 912
2029    
2030 michael 945 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2031     # --------------------------------------
2032 michael 912 # Check hardcoding attributes.
2033 michael 945 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2034 michael 912 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2035 michael 945 _LT_TAGVAR(hardcode_action, $1)=
2036     if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2037     test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2038     test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2039 michael 912
2040 michael 945 # We can hardcode non-existent directories.
2041     if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2042 michael 912 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2043     # have to relink, otherwise we might link with an installed library
2044     # when we should be linking with a yet-to-be-installed one
2045 michael 945 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2046     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2047 michael 912 # Linking always hardcodes the temporary library directory.
2048 michael 945 _LT_TAGVAR(hardcode_action, $1)=relink
2049 michael 912 else
2050     # We can link without hardcoding, and we can hardcode nonexisting dirs.
2051 michael 945 _LT_TAGVAR(hardcode_action, $1)=immediate
2052 michael 912 fi
2053     else
2054     # We cannot hardcode anything, or else we can only hardcode existing
2055     # directories.
2056 michael 945 _LT_TAGVAR(hardcode_action, $1)=unsupported
2057 michael 912 fi
2058 michael 945 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2059 michael 912
2060 michael 945 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2061     test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2062 michael 912 # Fast installation is not supported
2063     enable_fast_install=no
2064     elif test "$shlibpath_overrides_runpath" = yes ||
2065     test "$enable_shared" = no; then
2066     # Fast installation is not necessary
2067     enable_fast_install=needless
2068     fi
2069 michael 945 _LT_TAGDECL([], [hardcode_action], [0],
2070     [How to hardcode a shared library path into an executable])
2071     ])# _LT_LINKER_HARDCODE_LIBPATH
2072 michael 912
2073    
2074 michael 945 # _LT_CMD_STRIPLIB
2075     # ----------------
2076     m4_defun([_LT_CMD_STRIPLIB],
2077     [m4_require([_LT_DECL_EGREP])
2078     striplib=
2079 michael 912 old_striplib=
2080     AC_MSG_CHECKING([whether stripping libraries is possible])
2081 michael 945 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2082 michael 912 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2083     test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2084     AC_MSG_RESULT([yes])
2085     else
2086     # FIXME - insert some real tests, host_os isn't really good enough
2087     case $host_os in
2088 michael 945 darwin*)
2089     if test -n "$STRIP" ; then
2090     striplib="$STRIP -x"
2091     old_striplib="$STRIP -S"
2092     AC_MSG_RESULT([yes])
2093     else
2094     AC_MSG_RESULT([no])
2095     fi
2096 michael 912 ;;
2097 michael 945 *)
2098     AC_MSG_RESULT([no])
2099     ;;
2100 michael 912 esac
2101     fi
2102 michael 945 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2103     _LT_DECL([], [striplib], [1])
2104     ])# _LT_CMD_STRIPLIB
2105 michael 912
2106    
2107 michael 945 # _LT_SYS_DYNAMIC_LINKER([TAG])
2108 michael 912 # -----------------------------
2109     # PORTME Fill in your ld.so characteristics
2110 michael 945 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2111     [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2112     m4_require([_LT_DECL_EGREP])dnl
2113     m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2114     m4_require([_LT_DECL_OBJDUMP])dnl
2115     m4_require([_LT_DECL_SED])dnl
2116 michael 1094 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2117 michael 912 AC_MSG_CHECKING([dynamic linker characteristics])
2118 michael 945 m4_if([$1],
2119     [], [
2120 michael 912 if test "$GCC" = yes; then
2121     case $host_os in
2122     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2123     *) lt_awk_arg="/^libraries:/" ;;
2124     esac
2125 michael 1094 case $host_os in
2126     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2127     *) lt_sed_strip_eq="s,=/,/,g" ;;
2128     esac
2129     lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2130     case $lt_search_path_spec in
2131     *\;*)
2132 michael 912 # if the path contains ";" then we assume it to be the separator
2133     # otherwise default to the standard path separator (i.e. ":") - it is
2134     # assumed that no part of a normal pathname contains ";" but that should
2135     # okay in the real world where ";" in dirpaths is itself problematic.
2136 michael 1094 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2137     ;;
2138     *)
2139     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2140     ;;
2141     esac
2142 michael 912 # Ok, now we have the path, separated by spaces, we can step through it
2143     # and add multilib dir if necessary.
2144     lt_tmp_lt_search_path_spec=
2145     lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2146     for lt_sys_path in $lt_search_path_spec; do
2147     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2148     lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2149     else
2150     test -d "$lt_sys_path" && \
2151     lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2152     fi
2153     done
2154 michael 1094 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2155 michael 912 BEGIN {RS=" "; FS="/|\n";} {
2156     lt_foo="";
2157     lt_count=0;
2158     for (lt_i = NF; lt_i > 0; lt_i--) {
2159     if ($lt_i != "" && $lt_i != ".") {
2160     if ($lt_i == "..") {
2161     lt_count++;
2162     } else {
2163     if (lt_count == 0) {
2164     lt_foo="/" $lt_i lt_foo;
2165     } else {
2166     lt_count--;
2167     }
2168     }
2169     }
2170     }
2171     if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2172     if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2173     }'`
2174 michael 1094 # AWK program above erroneously prepends '/' to C:/dos/paths
2175     # for these hosts.
2176     case $host_os in
2177     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2178     $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2179     esac
2180     sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2181 michael 912 else
2182     sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2183     fi])
2184 michael 945 library_names_spec=
2185     libname_spec='lib$name'
2186     soname_spec=
2187     shrext_cmds=".so"
2188     postinstall_cmds=
2189     postuninstall_cmds=
2190     finish_cmds=
2191     finish_eval=
2192     shlibpath_var=
2193     shlibpath_overrides_runpath=unknown
2194     version_type=none
2195     dynamic_linker="$host_os ld.so"
2196     sys_lib_dlsearch_path_spec="/lib /usr/lib"
2197 michael 912 need_lib_prefix=unknown
2198     hardcode_into_libs=no
2199    
2200     # when you set need_version to no, make sure it does not cause -set_version
2201     # flags to be left without arguments
2202     need_version=unknown
2203    
2204     case $host_os in
2205     aix3*)
2206     version_type=linux
2207     library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2208     shlibpath_var=LIBPATH
2209    
2210     # AIX 3 has no versioning support, so we append a major version to the name.
2211     soname_spec='${libname}${release}${shared_ext}$major'
2212     ;;
2213    
2214 db 941 aix[[4-9]]*)
2215 michael 912 version_type=linux
2216     need_lib_prefix=no
2217     need_version=no
2218     hardcode_into_libs=yes
2219     if test "$host_cpu" = ia64; then
2220     # AIX 5 supports IA64
2221     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2222     shlibpath_var=LD_LIBRARY_PATH
2223     else
2224     # With GCC up to 2.95.x, collect2 would create an import file
2225     # for dependence libraries. The import file would start with
2226     # the line `#! .'. This would cause the generated library to
2227     # depend on `.', always an invalid library. This was fixed in
2228     # development snapshots of GCC prior to 3.0.
2229     case $host_os in
2230     aix4 | aix4.[[01]] | aix4.[[01]].*)
2231     if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2232     echo ' yes '
2233 michael 945 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2234 michael 912 :
2235     else
2236     can_build_shared=no
2237     fi
2238     ;;
2239     esac
2240     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2241     # soname into executable. Probably we can add versioning support to
2242     # collect2, so additional links can be useful in future.
2243     if test "$aix_use_runtimelinking" = yes; then
2244     # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2245     # instead of lib<name>.a to let people know that these are not
2246     # typical AIX shared libraries.
2247     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2248     else
2249     # We preserve .a as extension for shared libraries through AIX4.2
2250     # and later when we are not doing run time linking.
2251     library_names_spec='${libname}${release}.a $libname.a'
2252     soname_spec='${libname}${release}${shared_ext}$major'
2253     fi
2254     shlibpath_var=LIBPATH
2255     fi
2256     ;;
2257    
2258     amigaos*)
2259 michael 945 case $host_cpu in
2260     powerpc)
2261     # Since July 2007 AmigaOS4 officially supports .so libraries.
2262     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2263     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2264     ;;
2265     m68k)
2266     library_names_spec='$libname.ixlibrary $libname.a'
2267     # Create ${libname}_ixlibrary.a entries in /sys/libs.
2268 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'
2269 michael 945 ;;
2270     esac
2271 michael 912 ;;
2272    
2273     beos*)
2274     library_names_spec='${libname}${shared_ext}'
2275     dynamic_linker="$host_os ld.so"
2276     shlibpath_var=LIBRARY_PATH
2277     ;;
2278    
2279     bsdi[[45]]*)
2280     version_type=linux
2281     need_version=no
2282     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2283     soname_spec='${libname}${release}${shared_ext}$major'
2284     finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2285     shlibpath_var=LD_LIBRARY_PATH
2286     sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2287     sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2288     # the default ld.so.conf also contains /usr/contrib/lib and
2289     # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2290     # libtool to hard-code these into programs
2291     ;;
2292    
2293 michael 945 cygwin* | mingw* | pw32* | cegcc*)
2294 michael 912 version_type=windows
2295     shrext_cmds=".dll"
2296     need_version=no
2297     need_lib_prefix=no
2298    
2299     case $GCC,$host_os in
2300 michael 945 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2301 michael 912 library_names_spec='$libname.dll.a'
2302     # DLL is installed to $(libdir)/../bin by postinstall_cmds
2303     postinstall_cmds='base_file=`basename \${file}`~
2304 michael 945 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2305 michael 912 dldir=$destdir/`dirname \$dlpath`~
2306     test -d \$dldir || mkdir -p \$dldir~
2307     $install_prog $dir/$dlname \$dldir/$dlname~
2308 michael 945 chmod a+x \$dldir/$dlname~
2309     if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2310     eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2311     fi'
2312 michael 912 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2313     dlpath=$dir/\$dldll~
2314 michael 945 $RM \$dlpath'
2315 michael 912 shlibpath_overrides_runpath=yes
2316    
2317     case $host_os in
2318     cygwin*)
2319     # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2320     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2321 michael 1094 m4_if([$1], [],[
2322     sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2323 michael 912 ;;
2324 michael 945 mingw* | cegcc*)
2325 michael 912 # MinGW DLLs use traditional 'lib' prefix
2326     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2327     ;;
2328     pw32*)
2329     # pw32 DLLs use 'pw' prefix rather than 'lib'
2330     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2331     ;;
2332     esac
2333     ;;
2334    
2335     *)
2336     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2337     ;;
2338     esac
2339     dynamic_linker='Win32 ld.exe'
2340     # FIXME: first we should search . and the directory the executable is in
2341     shlibpath_var=PATH
2342     ;;
2343    
2344     darwin* | rhapsody*)
2345     dynamic_linker="$host_os dyld"
2346     version_type=darwin
2347     need_lib_prefix=no
2348     need_version=no
2349 michael 945 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2350 michael 912 soname_spec='${libname}${release}${major}$shared_ext'
2351     shlibpath_overrides_runpath=yes
2352     shlibpath_var=DYLD_LIBRARY_PATH
2353     shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2354 michael 945 m4_if([$1], [],[
2355     sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2356 michael 912 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2357     ;;
2358    
2359     dgux*)
2360     version_type=linux
2361     need_lib_prefix=no
2362     need_version=no
2363     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2364     soname_spec='${libname}${release}${shared_ext}$major'
2365     shlibpath_var=LD_LIBRARY_PATH
2366     ;;
2367    
2368     freebsd1*)
2369     dynamic_linker=no
2370     ;;
2371    
2372     freebsd* | dragonfly*)
2373     # DragonFly does not have aout. When/if they implement a new
2374     # versioning mechanism, adjust this.
2375     if test -x /usr/bin/objformat; then
2376     objformat=`/usr/bin/objformat`
2377     else
2378     case $host_os in
2379     freebsd[[123]]*) objformat=aout ;;
2380     *) objformat=elf ;;
2381     esac
2382     fi
2383     version_type=freebsd-$objformat
2384     case $version_type in
2385     freebsd-elf*)
2386     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2387     need_version=no
2388     need_lib_prefix=no
2389     ;;
2390     freebsd-*)
2391     library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2392     need_version=yes
2393     ;;
2394     esac
2395     shlibpath_var=LD_LIBRARY_PATH
2396     case $host_os in
2397     freebsd2*)
2398     shlibpath_overrides_runpath=yes
2399     ;;
2400     freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2401     shlibpath_overrides_runpath=yes
2402     hardcode_into_libs=yes
2403     ;;
2404     freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2405     freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2406     shlibpath_overrides_runpath=no
2407     hardcode_into_libs=yes
2408     ;;
2409     *) # from 4.6 on, and DragonFly
2410     shlibpath_overrides_runpath=yes
2411     hardcode_into_libs=yes
2412     ;;
2413     esac
2414     ;;
2415    
2416     gnu*)
2417     version_type=linux
2418     need_lib_prefix=no
2419     need_version=no
2420     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2421     soname_spec='${libname}${release}${shared_ext}$major'
2422     shlibpath_var=LD_LIBRARY_PATH
2423     hardcode_into_libs=yes
2424     ;;
2425    
2426 michael 1094 haiku*)
2427     version_type=linux
2428     need_lib_prefix=no
2429     need_version=no
2430     dynamic_linker="$host_os runtime_loader"
2431     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2432     soname_spec='${libname}${release}${shared_ext}$major'
2433     shlibpath_var=LIBRARY_PATH
2434     shlibpath_overrides_runpath=yes
2435     sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2436     hardcode_into_libs=yes
2437     ;;
2438    
2439 michael 912 hpux9* | hpux10* | hpux11*)
2440     # Give a soname corresponding to the major version so that dld.sl refuses to
2441     # link against other versions.
2442     version_type=sunos
2443     need_lib_prefix=no
2444     need_version=no
2445     case $host_cpu in
2446     ia64*)
2447     shrext_cmds='.so'
2448     hardcode_into_libs=yes
2449     dynamic_linker="$host_os dld.so"
2450     shlibpath_var=LD_LIBRARY_PATH
2451     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2452     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2453     soname_spec='${libname}${release}${shared_ext}$major'
2454     if test "X$HPUX_IA64_MODE" = X32; then
2455     sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2456     else
2457     sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2458     fi
2459     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2460     ;;
2461 michael 945 hppa*64*)
2462 michael 912 shrext_cmds='.sl'
2463 michael 945 hardcode_into_libs=yes
2464 michael 912 dynamic_linker="$host_os dld.sl"
2465 michael 945 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2466     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2467     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2468     soname_spec='${libname}${release}${shared_ext}$major'
2469     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2470     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2471     ;;
2472     *)
2473     shrext_cmds='.sl'
2474     dynamic_linker="$host_os dld.sl"
2475 michael 912 shlibpath_var=SHLIB_PATH
2476     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2477     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2478     soname_spec='${libname}${release}${shared_ext}$major'
2479     ;;
2480     esac
2481 michael 1094 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2482 michael 912 postinstall_cmds='chmod 555 $lib'
2483 michael 1094 # or fails outright, so override atomically:
2484     install_override_mode=555
2485 michael 912 ;;
2486    
2487     interix[[3-9]]*)
2488     version_type=linux
2489     need_lib_prefix=no
2490     need_version=no
2491     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2492     soname_spec='${libname}${release}${shared_ext}$major'
2493     dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2494     shlibpath_var=LD_LIBRARY_PATH
2495     shlibpath_overrides_runpath=no
2496     hardcode_into_libs=yes
2497     ;;
2498    
2499     irix5* | irix6* | nonstopux*)
2500     case $host_os in
2501     nonstopux*) version_type=nonstopux ;;
2502     *)
2503     if test "$lt_cv_prog_gnu_ld" = yes; then
2504     version_type=linux
2505     else
2506     version_type=irix
2507     fi ;;
2508     esac
2509     need_lib_prefix=no
2510     need_version=no
2511     soname_spec='${libname}${release}${shared_ext}$major'
2512     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2513     case $host_os in
2514     irix5* | nonstopux*)
2515     libsuff= shlibsuff=
2516     ;;
2517     *)
2518     case $LD in # libtool.m4 will add one of these switches to LD
2519     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2520     libsuff= shlibsuff= libmagic=32-bit;;
2521     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2522     libsuff=32 shlibsuff=N32 libmagic=N32;;
2523     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2524     libsuff=64 shlibsuff=64 libmagic=64-bit;;
2525     *) libsuff= shlibsuff= libmagic=never-match;;
2526     esac
2527     ;;
2528     esac
2529     shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2530     shlibpath_overrides_runpath=no
2531     sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2532     sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2533     hardcode_into_libs=yes
2534     ;;
2535    
2536     # No shared lib support for Linux oldld, aout, or coff.
2537     linux*oldld* | linux*aout* | linux*coff*)
2538     dynamic_linker=no
2539     ;;
2540    
2541     # This must be Linux ELF.
2542 michael 1094 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2543 michael 912 version_type=linux
2544     need_lib_prefix=no
2545     need_version=no
2546     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2547     soname_spec='${libname}${release}${shared_ext}$major'
2548     finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2549     shlibpath_var=LD_LIBRARY_PATH
2550     shlibpath_overrides_runpath=no
2551 michael 1094
2552 michael 945 # Some binutils ld are patched to set DT_RUNPATH
2553 michael 1094 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2554     [lt_cv_shlibpath_overrides_runpath=no
2555     save_LDFLAGS=$LDFLAGS
2556     save_libdir=$libdir
2557     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2558     LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2559     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2560     [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2561     [lt_cv_shlibpath_overrides_runpath=yes])])
2562     LDFLAGS=$save_LDFLAGS
2563     libdir=$save_libdir
2564     ])
2565     shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2566 michael 945
2567 michael 912 # This implies no fast_install, which is unacceptable.
2568     # Some rework will be needed to allow for fast_install
2569     # before this can be enabled.
2570     hardcode_into_libs=yes
2571    
2572     # Append ld.so.conf contents to the search path
2573     if test -f /etc/ld.so.conf; then
2574 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' ' '`
2575 michael 1084 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2576 michael 912 fi
2577    
2578     # We used to test for /lib/ld.so.1 and disable shared libraries on
2579     # powerpc, because MkLinux only supported shared libraries with the
2580     # GNU dynamic linker. Since this was broken with cross compilers,
2581     # most powerpc-linux boxes support dynamic linking these days and
2582     # people can always --disable-shared, the test was removed, and we
2583     # assume the GNU/Linux dynamic linker is in use.
2584     dynamic_linker='GNU/Linux ld.so'
2585     ;;
2586    
2587     netbsd*)
2588     version_type=sunos
2589     need_lib_prefix=no
2590     need_version=no
2591 michael 945 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2592 michael 912 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2593     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2594     dynamic_linker='NetBSD (a.out) ld.so'
2595     else
2596     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2597     soname_spec='${libname}${release}${shared_ext}$major'
2598     dynamic_linker='NetBSD ld.elf_so'
2599     fi
2600     shlibpath_var=LD_LIBRARY_PATH
2601     shlibpath_overrides_runpath=yes
2602     hardcode_into_libs=yes
2603     ;;
2604    
2605     newsos6)
2606     version_type=linux
2607     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2608     shlibpath_var=LD_LIBRARY_PATH
2609     shlibpath_overrides_runpath=yes
2610     ;;
2611    
2612 michael 945 *nto* | *qnx*)
2613     version_type=qnx
2614 michael 912 need_lib_prefix=no
2615     need_version=no
2616     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2617     soname_spec='${libname}${release}${shared_ext}$major'
2618     shlibpath_var=LD_LIBRARY_PATH
2619 michael 945 shlibpath_overrides_runpath=no
2620     hardcode_into_libs=yes
2621     dynamic_linker='ldqnx.so'
2622 michael 912 ;;
2623    
2624     openbsd*)
2625     version_type=sunos
2626     sys_lib_dlsearch_path_spec="/usr/lib"
2627     need_lib_prefix=no
2628     # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2629     case $host_os in
2630 michael 945 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2631     *) need_version=no ;;
2632 michael 912 esac
2633     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2634     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2635     shlibpath_var=LD_LIBRARY_PATH
2636 michael 945 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2637 michael 912 case $host_os in
2638     openbsd2.[[89]] | openbsd2.[[89]].*)
2639     shlibpath_overrides_runpath=no
2640     ;;
2641     *)
2642     shlibpath_overrides_runpath=yes
2643     ;;
2644     esac
2645     else
2646     shlibpath_overrides_runpath=yes
2647     fi
2648     ;;
2649    
2650     os2*)
2651     libname_spec='$name'
2652     shrext_cmds=".dll"
2653     need_lib_prefix=no
2654     library_names_spec='$libname${shared_ext} $libname.a'
2655     dynamic_linker='OS/2 ld.exe'
2656     shlibpath_var=LIBPATH
2657     ;;
2658    
2659     osf3* | osf4* | osf5*)
2660     version_type=osf
2661     need_lib_prefix=no
2662     need_version=no
2663     soname_spec='${libname}${release}${shared_ext}$major'
2664     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2665     shlibpath_var=LD_LIBRARY_PATH
2666     sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2667     sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2668     ;;
2669    
2670     rdos*)
2671     dynamic_linker=no
2672     ;;
2673    
2674     solaris*)
2675     version_type=linux
2676     need_lib_prefix=no
2677     need_version=no
2678     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2679     soname_spec='${libname}${release}${shared_ext}$major'
2680     shlibpath_var=LD_LIBRARY_PATH
2681     shlibpath_overrides_runpath=yes
2682     hardcode_into_libs=yes
2683     # ldd complains unless libraries are executable
2684     postinstall_cmds='chmod +x $lib'
2685     ;;
2686    
2687     sunos4*)
2688     version_type=sunos
2689     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2690     finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2691     shlibpath_var=LD_LIBRARY_PATH
2692     shlibpath_overrides_runpath=yes
2693     if test "$with_gnu_ld" = yes; then
2694     need_lib_prefix=no
2695     fi
2696     need_version=yes
2697     ;;
2698    
2699     sysv4 | sysv4.3*)
2700     version_type=linux
2701     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2702     soname_spec='${libname}${release}${shared_ext}$major'
2703     shlibpath_var=LD_LIBRARY_PATH
2704     case $host_vendor in
2705     sni)
2706     shlibpath_overrides_runpath=no
2707     need_lib_prefix=no
2708     runpath_var=LD_RUN_PATH
2709     ;;
2710     siemens)
2711     need_lib_prefix=no
2712     ;;
2713     motorola)
2714     need_lib_prefix=no
2715     need_version=no
2716     shlibpath_overrides_runpath=no
2717     sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2718     ;;
2719     esac
2720     ;;
2721    
2722     sysv4*MP*)
2723     if test -d /usr/nec ;then
2724     version_type=linux
2725     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2726     soname_spec='$libname${shared_ext}.$major'
2727     shlibpath_var=LD_LIBRARY_PATH
2728     fi
2729     ;;
2730    
2731     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2732     version_type=freebsd-elf
2733     need_lib_prefix=no
2734     need_version=no
2735     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2736     soname_spec='${libname}${release}${shared_ext}$major'
2737     shlibpath_var=LD_LIBRARY_PATH
2738 michael 945 shlibpath_overrides_runpath=yes
2739 michael 912 hardcode_into_libs=yes
2740     if test "$with_gnu_ld" = yes; then
2741     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2742     else
2743     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2744     case $host_os in
2745     sco3.2v5*)
2746     sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2747     ;;
2748     esac
2749     fi
2750     sys_lib_dlsearch_path_spec='/usr/lib'
2751     ;;
2752    
2753 michael 945 tpf*)
2754     # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2755     version_type=linux
2756     need_lib_prefix=no
2757     need_version=no
2758     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2759     shlibpath_var=LD_LIBRARY_PATH
2760     shlibpath_overrides_runpath=no
2761     hardcode_into_libs=yes
2762     ;;
2763    
2764 michael 912 uts4*)
2765     version_type=linux
2766     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2767     soname_spec='${libname}${release}${shared_ext}$major'
2768     shlibpath_var=LD_LIBRARY_PATH
2769     ;;
2770    
2771     *)
2772     dynamic_linker=no
2773     ;;
2774     esac
2775     AC_MSG_RESULT([$dynamic_linker])
2776     test "$dynamic_linker" = no && can_build_shared=no
2777    
2778     variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2779     if test "$GCC" = yes; then
2780     variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2781     fi
2782    
2783 michael 945 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2784     sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2785 michael 912 fi
2786 michael 945 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2787     sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2788     fi
2789 michael 912
2790 michael 945 _LT_DECL([], [variables_saved_for_relink], [1],
2791     [Variables whose values should be saved in libtool wrapper scripts and
2792     restored at link time])
2793     _LT_DECL([], [need_lib_prefix], [0],
2794     [Do we need the "lib" prefix for modules?])
2795     _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2796     _LT_DECL([], [version_type], [0], [Library versioning type])
2797     _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2798     _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2799     _LT_DECL([], [shlibpath_overrides_runpath], [0],
2800     [Is shlibpath searched before the hard-coded library search path?])
2801     _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2802     _LT_DECL([], [library_names_spec], [1],
2803     [[List of archive names. First name is the real one, the rest are links.
2804     The last name is the one that the linker finds with -lNAME]])
2805     _LT_DECL([], [soname_spec], [1],
2806     [[The coded name of the library, if different from the real name]])
2807 michael 1094 _LT_DECL([], [install_override_mode], [1],
2808     [Permission mode override for installation of shared libraries])
2809 michael 945 _LT_DECL([], [postinstall_cmds], [2],
2810     [Command to use after installation of a shared archive])
2811     _LT_DECL([], [postuninstall_cmds], [2],
2812     [Command to use after uninstallation of a shared archive])
2813     _LT_DECL([], [finish_cmds], [2],
2814     [Commands used to finish a libtool library installation in a directory])
2815     _LT_DECL([], [finish_eval], [1],
2816     [[As "finish_cmds", except a single script fragment to be evaled but
2817     not shown]])
2818     _LT_DECL([], [hardcode_into_libs], [0],
2819     [Whether we should hardcode library paths into libraries])
2820     _LT_DECL([], [sys_lib_search_path_spec], [2],
2821     [Compile-time system search path for libraries])
2822     _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2823     [Run-time system search path for libraries])
2824     ])# _LT_SYS_DYNAMIC_LINKER
2825 michael 912
2826    
2827 michael 945 # _LT_PATH_TOOL_PREFIX(TOOL)
2828 michael 912 # --------------------------
2829     # find a file program which can recognize shared library
2830 michael 945 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2831     [m4_require([_LT_DECL_EGREP])dnl
2832 michael 912 AC_MSG_CHECKING([for $1])
2833     AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2834     [case $MAGIC_CMD in
2835     [[\\/*] | ?:[\\/]*])
2836     lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2837     ;;
2838     *)
2839     lt_save_MAGIC_CMD="$MAGIC_CMD"
2840     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2841     dnl $ac_dummy forces splitting on constant user-supplied paths.
2842     dnl POSIX.2 word splitting is done only on the output of word expansions,
2843     dnl not every word. This closes a longstanding sh security hole.
2844 michael 945 ac_dummy="m4_if([$2], , $PATH, [$2])"
2845 michael 912 for ac_dir in $ac_dummy; do
2846     IFS="$lt_save_ifs"
2847     test -z "$ac_dir" && ac_dir=.
2848     if test -f $ac_dir/$1; then
2849     lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2850     if test -n "$file_magic_test_file"; then
2851     case $deplibs_check_method in
2852     "file_magic "*)
2853     file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2854     MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2855     if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2856     $EGREP "$file_magic_regex" > /dev/null; then
2857     :
2858     else
2859 michael 945 cat <<_LT_EOF 1>&2
2860 michael 912
2861     *** Warning: the command libtool uses to detect shared libraries,
2862     *** $file_magic_cmd, produces output that libtool cannot recognize.
2863     *** The result is that libtool may fail to recognize shared libraries
2864     *** as such. This will affect the creation of libtool libraries that
2865     *** depend on shared libraries, but programs linked with such libtool
2866     *** libraries will work regardless of this problem. Nevertheless, you
2867     *** may want to report the problem to your system manager and/or to
2868     *** bug-libtool@gnu.org
2869    
2870 michael 945 _LT_EOF
2871 michael 912 fi ;;
2872     esac
2873     fi
2874     break
2875     fi
2876     done
2877     IFS="$lt_save_ifs"
2878     MAGIC_CMD="$lt_save_MAGIC_CMD"
2879     ;;
2880     esac])
2881     MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2882     if test -n "$MAGIC_CMD"; then
2883     AC_MSG_RESULT($MAGIC_CMD)
2884     else
2885     AC_MSG_RESULT(no)
2886     fi
2887 michael 945 _LT_DECL([], [MAGIC_CMD], [0],
2888     [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2889     ])# _LT_PATH_TOOL_PREFIX
2890 michael 912
2891 michael 945 # Old name:
2892     AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2893     dnl aclocal-1.4 backwards compatibility:
2894     dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2895 michael 912
2896 michael 945
2897     # _LT_PATH_MAGIC
2898     # --------------
2899 michael 912 # find a file program which can recognize a shared library
2900 michael 945 m4_defun([_LT_PATH_MAGIC],
2901     [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2902 michael 912 if test -z "$lt_cv_path_MAGIC_CMD"; then
2903     if test -n "$ac_tool_prefix"; then
2904 michael 945 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2905 michael 912 else
2906     MAGIC_CMD=:
2907     fi
2908     fi
2909 michael 945 ])# _LT_PATH_MAGIC
2910 michael 912
2911    
2912 michael 945 # LT_PATH_LD
2913 michael 912 # ----------
2914     # find the pathname to the GNU or non-GNU linker
2915 michael 945 AC_DEFUN([LT_PATH_LD],
2916     [AC_REQUIRE([AC_PROG_CC])dnl
2917     AC_REQUIRE([AC_CANONICAL_HOST])dnl
2918     AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2919     m4_require([_LT_DECL_SED])dnl
2920     m4_require([_LT_DECL_EGREP])dnl
2921 michael 1094 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
2922 michael 945
2923     AC_ARG_WITH([gnu-ld],
2924     [AS_HELP_STRING([--with-gnu-ld],
2925 michael 912 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2926     [test "$withval" = no || with_gnu_ld=yes],
2927 michael 945 [with_gnu_ld=no])dnl
2928    
2929 michael 912 ac_prog=ld
2930     if test "$GCC" = yes; then
2931     # Check if gcc -print-prog-name=ld gives a path.
2932     AC_MSG_CHECKING([for ld used by $CC])
2933     case $host in
2934     *-*-mingw*)
2935     # gcc leaves a trailing carriage return which upsets mingw
2936     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2937     *)
2938     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2939     esac
2940     case $ac_prog in
2941     # Accept absolute paths.
2942     [[\\/]]* | ?:[[\\/]]*)
2943     re_direlt='/[[^/]][[^/]]*/\.\./'
2944     # Canonicalize the pathname of ld
2945 michael 945 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2946     while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2947     ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2948 michael 912 done
2949     test -z "$LD" && LD="$ac_prog"
2950     ;;
2951     "")
2952     # If it fails, then pretend we aren't using GCC.
2953     ac_prog=ld
2954     ;;
2955     *)
2956     # If it is relative, then search for the first ld in PATH.
2957     with_gnu_ld=unknown
2958     ;;
2959     esac
2960     elif test "$with_gnu_ld" = yes; then
2961     AC_MSG_CHECKING([for GNU ld])
2962     else
2963     AC_MSG_CHECKING([for non-GNU ld])
2964     fi
2965     AC_CACHE_VAL(lt_cv_path_LD,
2966     [if test -z "$LD"; then
2967     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2968     for ac_dir in $PATH; do
2969     IFS="$lt_save_ifs"
2970     test -z "$ac_dir" && ac_dir=.
2971     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2972     lt_cv_path_LD="$ac_dir/$ac_prog"
2973     # Check to see if the program is GNU ld. I'd rather use --version,
2974     # but apparently some variants of GNU ld only accept -v.
2975     # Break only if it was the GNU/non-GNU ld that we prefer.
2976     case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2977     *GNU* | *'with BFD'*)
2978     test "$with_gnu_ld" != no && break
2979     ;;
2980     *)
2981     test "$with_gnu_ld" != yes && break
2982     ;;
2983     esac
2984     fi
2985     done
2986     IFS="$lt_save_ifs"
2987     else
2988     lt_cv_path_LD="$LD" # Let the user override the test with a path.
2989     fi])
2990     LD="$lt_cv_path_LD"
2991     if test -n "$LD"; then
2992     AC_MSG_RESULT($LD)
2993     else
2994     AC_MSG_RESULT(no)
2995     fi
2996     test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2997 michael 945 _LT_PATH_LD_GNU
2998     AC_SUBST([LD])
2999 michael 912
3000 michael 945 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3001     ])# LT_PATH_LD
3002 michael 912
3003 michael 945 # Old names:
3004     AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3005     AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3006     dnl aclocal-1.4 backwards compatibility:
3007     dnl AC_DEFUN([AM_PROG_LD], [])
3008     dnl AC_DEFUN([AC_PROG_LD], [])
3009    
3010    
3011     # _LT_PATH_LD_GNU
3012     #- --------------
3013     m4_defun([_LT_PATH_LD_GNU],
3014     [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3015 michael 912 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3016     case `$LD -v 2>&1 </dev/null` in
3017     *GNU* | *'with BFD'*)
3018     lt_cv_prog_gnu_ld=yes
3019     ;;
3020     *)
3021     lt_cv_prog_gnu_ld=no
3022     ;;
3023     esac])
3024     with_gnu_ld=$lt_cv_prog_gnu_ld
3025 michael 945 ])# _LT_PATH_LD_GNU
3026 michael 912
3027    
3028 michael 945 # _LT_CMD_RELOAD
3029     # --------------
3030 michael 912 # find reload flag for linker
3031     # -- PORTME Some linkers may need a different reload flag.
3032 michael 945 m4_defun([_LT_CMD_RELOAD],
3033 michael 912 [AC_CACHE_CHECK([for $LD option to reload object files],
3034     lt_cv_ld_reload_flag,
3035     [lt_cv_ld_reload_flag='-r'])
3036     reload_flag=$lt_cv_ld_reload_flag
3037     case $reload_flag in
3038     "" | " "*) ;;
3039     *) reload_flag=" $reload_flag" ;;
3040     esac
3041     reload_cmds='$LD$reload_flag -o $output$reload_objs'
3042     case $host_os in
3043     darwin*)
3044     if test "$GCC" = yes; then
3045     reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3046     else
3047     reload_cmds='$LD$reload_flag -o $output$reload_objs'
3048     fi
3049     ;;
3050     esac
3051 michael 1094 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3052     _LT_TAGDECL([], [reload_cmds], [2])dnl
3053 michael 945 ])# _LT_CMD_RELOAD
3054 michael 912
3055    
3056 michael 945 # _LT_CHECK_MAGIC_METHOD
3057     # ----------------------
3058 michael 912 # how to check for library dependencies
3059     # -- PORTME fill in with the dynamic library characteristics
3060 michael 945 m4_defun([_LT_CHECK_MAGIC_METHOD],
3061     [m4_require([_LT_DECL_EGREP])
3062     m4_require([_LT_DECL_OBJDUMP])
3063     AC_CACHE_CHECK([how to recognize dependent libraries],
3064 michael 912 lt_cv_deplibs_check_method,
3065     [lt_cv_file_magic_cmd='$MAGIC_CMD'
3066     lt_cv_file_magic_test_file=
3067     lt_cv_deplibs_check_method='unknown'
3068     # Need to set the preceding variable on all platforms that support
3069     # interlibrary dependencies.
3070     # 'none' -- dependencies not supported.
3071     # `unknown' -- same as none, but documents that we really don't know.
3072     # 'pass_all' -- all dependencies passed with no checks.
3073     # 'test_compile' -- check by making test program.
3074     # 'file_magic [[regex]]' -- check by looking for files in library path
3075     # which responds to the $file_magic_cmd with a given extended regex.
3076     # If you have `file' or equivalent on your system and you're not sure
3077     # whether `pass_all' will *always* work, you probably want this one.
3078    
3079     case $host_os in
3080 db 941 aix[[4-9]]*)
3081 michael 912 lt_cv_deplibs_check_method=pass_all
3082     ;;
3083    
3084     beos*)
3085     lt_cv_deplibs_check_method=pass_all
3086     ;;
3087    
3088     bsdi[[45]]*)
3089     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3090     lt_cv_file_magic_cmd='/usr/bin/file -L'
3091     lt_cv_file_magic_test_file=/shlib/libc.so
3092     ;;
3093    
3094     cygwin*)
3095     # func_win32_libid is a shell function defined in ltmain.sh
3096     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3097     lt_cv_file_magic_cmd='func_win32_libid'
3098     ;;
3099    
3100     mingw* | pw32*)
3101     # Base MSYS/MinGW do not provide the 'file' command needed by
3102     # func_win32_libid shell function, so use a weaker test based on 'objdump',
3103     # unless we find 'file', for example because we are cross-compiling.
3104 michael 1094 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3105     if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3106 michael 912 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3107     lt_cv_file_magic_cmd='func_win32_libid'
3108     else
3109 michael 1094 # Keep this pattern in sync with the one in func_win32_libid.
3110     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3111 michael 912 lt_cv_file_magic_cmd='$OBJDUMP -f'
3112     fi
3113     ;;
3114    
3115 michael 1094 cegcc*)
3116 michael 945 # use the weaker test based on 'objdump'. See mingw*.
3117     lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3118     lt_cv_file_magic_cmd='$OBJDUMP -f'
3119     ;;
3120    
3121 michael 912 darwin* | rhapsody*)
3122     lt_cv_deplibs_check_method=pass_all
3123     ;;
3124    
3125     freebsd* | dragonfly*)
3126 michael 945 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3127 michael 912 case $host_cpu in
3128     i*86 )
3129     # Not sure whether the presence of OpenBSD here was a mistake.
3130     # Let's accept both of them until this is cleared up.
3131     lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3132     lt_cv_file_magic_cmd=/usr/bin/file
3133     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3134     ;;
3135     esac
3136     else
3137     lt_cv_deplibs_check_method=pass_all
3138     fi
3139     ;;
3140    
3141     gnu*)
3142     lt_cv_deplibs_check_method=pass_all
3143     ;;
3144    
3145 michael 1094 haiku*)
3146     lt_cv_deplibs_check_method=pass_all
3147     ;;
3148    
3149 michael 912 hpux10.20* | hpux11*)
3150     lt_cv_file_magic_cmd=/usr/bin/file
3151     case $host_cpu in
3152     ia64*)
3153     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3154     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3155     ;;
3156     hppa*64*)
3157 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]']
3158 michael 912 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3159     ;;
3160     *)
3161 michael 1094 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3162 michael 912 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3163     ;;
3164     esac
3165     ;;
3166    
3167     interix[[3-9]]*)
3168     # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3169     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3170     ;;
3171    
3172     irix5* | irix6* | nonstopux*)
3173     case $LD in
3174     *-32|*"-32 ") libmagic=32-bit;;
3175     *-n32|*"-n32 ") libmagic=N32;;
3176     *-64|*"-64 ") libmagic=64-bit;;
3177     *) libmagic=never-match;;
3178     esac
3179     lt_cv_deplibs_check_method=pass_all
3180     ;;
3181    
3182     # This must be Linux ELF.
3183 michael 1094 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3184 michael 912 lt_cv_deplibs_check_method=pass_all
3185     ;;
3186    
3187     netbsd*)
3188 michael 945 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3189 michael 912 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3190     else
3191     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3192     fi
3193     ;;
3194    
3195     newos6*)
3196     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3197     lt_cv_file_magic_cmd=/usr/bin/file
3198     lt_cv_file_magic_test_file=/usr/lib/libnls.so
3199     ;;
3200    
3201 michael 945 *nto* | *qnx*)
3202     lt_cv_deplibs_check_method=pass_all
3203 michael 912 ;;
3204    
3205     openbsd*)
3206 michael 945 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3207 michael 912 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3208     else
3209     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3210     fi
3211     ;;
3212    
3213     osf3* | osf4* | osf5*)
3214     lt_cv_deplibs_check_method=pass_all
3215     ;;
3216    
3217     rdos*)
3218     lt_cv_deplibs_check_method=pass_all
3219     ;;
3220    
3221     solaris*)
3222     lt_cv_deplibs_check_method=pass_all
3223     ;;
3224    
3225 michael 945 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3226     lt_cv_deplibs_check_method=pass_all
3227     ;;
3228    
3229 michael 912 sysv4 | sysv4.3*)
3230     case $host_vendor in
3231     motorola)
3232     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]]'
3233     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3234     ;;
3235     ncr)
3236     lt_cv_deplibs_check_method=pass_all
3237     ;;
3238     sequent)
3239     lt_cv_file_magic_cmd='/bin/file'
3240     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3241     ;;
3242     sni)
3243     lt_cv_file_magic_cmd='/bin/file'
3244     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3245     lt_cv_file_magic_test_file=/lib/libc.so
3246     ;;
3247     siemens)
3248     lt_cv_deplibs_check_method=pass_all
3249     ;;
3250     pc)
3251     lt_cv_deplibs_check_method=pass_all
3252     ;;
3253     esac
3254     ;;
3255    
3256 michael 945 tpf*)
3257 michael 912 lt_cv_deplibs_check_method=pass_all
3258     ;;
3259     esac
3260     ])
3261     file_magic_cmd=$lt_cv_file_magic_cmd
3262     deplibs_check_method=$lt_cv_deplibs_check_method
3263     test -z "$deplibs_check_method" && deplibs_check_method=unknown
3264    
3265 michael 945 _LT_DECL([], [deplibs_check_method], [1],
3266     [Method to check whether dependent libraries are shared objects])
3267     _LT_DECL([], [file_magic_cmd], [1],
3268     [Command to use when deplibs_check_method == "file_magic"])
3269     ])# _LT_CHECK_MAGIC_METHOD
3270 michael 912
3271 michael 945
3272     # LT_PATH_NM
3273 michael 912 # ----------
3274 michael 945 # find the pathname to a BSD- or MS-compatible name lister
3275     AC_DEFUN([LT_PATH_NM],
3276     [AC_REQUIRE([AC_PROG_CC])dnl
3277     AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3278 michael 912 [if test -n "$NM"; then
3279     # Let the user override the test.
3280     lt_cv_path_NM="$NM"
3281     else
3282     lt_nm_to_check="${ac_tool_prefix}nm"
3283     if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3284     lt_nm_to_check="$lt_nm_to_check nm"
3285     fi
3286     for lt_tmp_nm in $lt_nm_to_check; do
3287     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3288     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3289     IFS="$lt_save_ifs"
3290     test -z "$ac_dir" && ac_dir=.
3291     tmp_nm="$ac_dir/$lt_tmp_nm"
3292     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3293     # Check to see if the nm accepts a BSD-compat flag.
3294     # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3295     # nm: unknown option "B" ignored
3296     # Tru64's nm complains that /dev/null is an invalid object file
3297     case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3298     */dev/null* | *'Invalid file or object type'*)
3299     lt_cv_path_NM="$tmp_nm -B"
3300     break
3301     ;;
3302     *)
3303     case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3304     */dev/null*)
3305     lt_cv_path_NM="$tmp_nm -p"
3306     break
3307     ;;
3308     *)
3309     lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3310     continue # so that we can try to find one that supports BSD flags
3311     ;;
3312     esac
3313     ;;
3314     esac
3315     fi
3316     done
3317     IFS="$lt_save_ifs"
3318     done
3319 michael 945 : ${lt_cv_path_NM=no}
3320 michael 912 fi])
3321 michael 945 if test "$lt_cv_path_NM" != "no"; then
3322     NM="$lt_cv_path_NM"
3323     else
3324     # Didn't find any BSD compatible name lister, look for dumpbin.
3325 michael 1094 if test -n "$DUMPBIN"; then :
3326     # Let the user override the test.
3327     else
3328     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3329     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3330     *COFF*)
3331     DUMPBIN="$DUMPBIN -symbols"
3332     ;;
3333     *)
3334     DUMPBIN=:
3335     ;;
3336     esac
3337     fi
3338 michael 945 AC_SUBST([DUMPBIN])
3339     if test "$DUMPBIN" != ":"; then
3340     NM="$DUMPBIN"
3341     fi
3342     fi
3343     test -z "$NM" && NM=nm
3344     AC_SUBST([NM])
3345     _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3346 michael 912
3347 michael 945 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3348     [lt_cv_nm_interface="BSD nm"
3349     echo "int some_variable = 0;" > conftest.$ac_ext
3350 michael 1094 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3351 michael 945 (eval "$ac_compile" 2>conftest.err)
3352     cat conftest.err >&AS_MESSAGE_LOG_FD
3353 michael 1094 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3354 michael 945 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3355     cat conftest.err >&AS_MESSAGE_LOG_FD
3356 michael 1094 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3357 michael 945 cat conftest.out >&AS_MESSAGE_LOG_FD
3358     if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3359     lt_cv_nm_interface="MS dumpbin"
3360     fi
3361     rm -f conftest*])
3362     ])# LT_PATH_NM
3363 michael 912
3364 michael 945 # Old names:
3365     AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3366     AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3367     dnl aclocal-1.4 backwards compatibility:
3368     dnl AC_DEFUN([AM_PROG_NM], [])
3369     dnl AC_DEFUN([AC_PROG_NM], [])
3370    
3371    
3372     # LT_LIB_M
3373     # --------
3374 michael 912 # check for math library
3375 michael 945 AC_DEFUN([LT_LIB_M],
3376 michael 912 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3377     LIBM=
3378     case $host in
3379 michael 1094 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3380 michael 912 # These system don't have libm, or don't need it
3381     ;;
3382     *-ncr-sysv4.3*)
3383     AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3384     AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3385     ;;
3386     *)
3387     AC_CHECK_LIB(m, cos, LIBM="-lm")
3388     ;;
3389     esac
3390 michael 945 AC_SUBST([LIBM])
3391     ])# LT_LIB_M
3392 michael 912
3393 michael 945 # Old name:
3394     AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3395     dnl aclocal-1.4 backwards compatibility:
3396     dnl AC_DEFUN([AC_CHECK_LIBM], [])
3397 michael 912
3398    
3399 michael 945 # _LT_COMPILER_NO_RTTI([TAGNAME])
3400     # -------------------------------
3401     m4_defun([_LT_COMPILER_NO_RTTI],
3402     [m4_require([_LT_TAG_COMPILER])dnl
3403 michael 912
3404 michael 945 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3405 michael 912
3406     if test "$GCC" = yes; then
3407 michael 1094 case $cc_basename in
3408     nvcc*)
3409     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3410     *)
3411     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3412     esac
3413 michael 912
3414 michael 945 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3415 michael 912 lt_cv_prog_compiler_rtti_exceptions,
3416     [-fno-rtti -fno-exceptions], [],
3417 michael 945 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3418 michael 912 fi
3419 michael 945 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3420     [Compiler flag to turn off builtin functions])
3421     ])# _LT_COMPILER_NO_RTTI
3422 michael 912
3423    
3424 michael 945 # _LT_CMD_GLOBAL_SYMBOLS
3425     # ----------------------
3426     m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3427     [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3428     AC_REQUIRE([AC_PROG_CC])dnl
3429 michael 1094 AC_REQUIRE([AC_PROG_AWK])dnl
3430 michael 945 AC_REQUIRE([LT_PATH_NM])dnl
3431     AC_REQUIRE([LT_PATH_LD])dnl
3432     m4_require([_LT_DECL_SED])dnl
3433     m4_require([_LT_DECL_EGREP])dnl
3434     m4_require([_LT_TAG_COMPILER])dnl
3435    
3436 michael 912 # Check for command to grab the raw symbol name followed by C symbol from nm.
3437     AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3438     AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3439     [
3440     # These are sane defaults that work on at least a few old systems.
3441     # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3442    
3443     # Character class describing NM global symbol codes.
3444     symcode='[[BCDEGRST]]'
3445    
3446     # Regexp to match symbols that can be accessed directly from C.
3447     sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3448    
3449     # Define system-specific variables.
3450     case $host_os in
3451     aix*)
3452     symcode='[[BCDT]]'
3453     ;;
3454 michael 945 cygwin* | mingw* | pw32* | cegcc*)
3455 michael 912 symcode='[[ABCDGISTW]]'
3456     ;;
3457 michael 945 hpux*)
3458 michael 912 if test "$host_cpu" = ia64; then
3459     symcode='[[ABCDEGRST]]'
3460     fi
3461     ;;
3462     irix* | nonstopux*)
3463     symcode='[[BCDEGRST]]'
3464     ;;
3465     osf*)
3466     symcode='[[BCDEGQRST]]'
3467     ;;
3468     solaris*)
3469     symcode='[[BDRT]]'
3470     ;;
3471     sco3.2v5*)
3472     symcode='[[DT]]'
3473     ;;
3474     sysv4.2uw2*)
3475     symcode='[[DT]]'
3476     ;;
3477     sysv5* | sco5v6* | unixware* | OpenUNIX*)
3478     symcode='[[ABDT]]'
3479     ;;
3480     sysv4)
3481     symcode='[[DFNSTU]]'
3482     ;;
3483     esac
3484    
3485 michael 945 # If we're using GNU nm, then use its standard symbol codes.
3486     case `$NM -V 2>&1` in
3487     *GNU* | *'with BFD'*)
3488     symcode='[[ABCDGIRSTW]]' ;;
3489     esac
3490    
3491     # Transform an extracted symbol line into a proper C declaration.
3492     # Some systems (esp. on ia64) link data and code symbols differently,
3493     # so use this general approach.
3494     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3495    
3496     # Transform an extracted symbol line into symbol name and symbol address
3497     lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3498     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'"
3499    
3500 michael 912 # Handle CRLF in mingw tool chain
3501     opt_cr=
3502     case $build_os in
3503     mingw*)
3504 michael 945 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3505 michael 912 ;;
3506     esac
3507    
3508 michael 945 # Try without a prefix underscore, then with it.
3509 michael 912 for ac_symprfx in "" "_"; do
3510    
3511     # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3512     symxfrm="\\1 $ac_symprfx\\2 \\2"
3513    
3514     # Write the raw and C identifiers.
3515 michael 945 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3516     # Fake it for dumpbin and say T for any non-static function
3517     # and D for any global variable.
3518     # Also find C++ and __fastcall symbols from MSVC++,
3519     # which start with @ or ?.
3520     lt_cv_sys_global_symbol_pipe="$AWK ['"\
3521     " {last_section=section; section=\$ 3};"\
3522     " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3523     " \$ 0!~/External *\|/{next};"\
3524     " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3525     " {if(hide[section]) next};"\
3526     " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3527     " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3528     " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3529     " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3530     " ' prfx=^$ac_symprfx]"
3531     else
3532     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3533     fi
3534 michael 912
3535     # Check to see that the pipe works correctly.
3536     pipe_works=no
3537    
3538     rm -f conftest*
3539 michael 945 cat > conftest.$ac_ext <<_LT_EOF
3540 michael 912 #ifdef __cplusplus
3541     extern "C" {
3542     #endif
3543     char nm_test_var;
3544 michael 945 void nm_test_func(void);
3545     void nm_test_func(void){}
3546 michael 912 #ifdef __cplusplus
3547     }
3548     #endif
3549     int main(){nm_test_var='a';nm_test_func();return(0);}
3550 michael 945 _LT_EOF
3551 michael 912
3552     if AC_TRY_EVAL(ac_compile); then
3553     # Now try to grab the symbols.
3554     nlist=conftest.nm
3555 michael 1094 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3556 michael 912 # Try sorting and uniquifying the output.
3557     if sort "$nlist" | uniq > "$nlist"T; then
3558     mv -f "$nlist"T "$nlist"
3559     else
3560     rm -f "$nlist"T
3561     fi
3562    
3563     # Make sure that we snagged all the symbols we need.
3564 michael 945 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3565     if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3566     cat <<_LT_EOF > conftest.$ac_ext
3567 michael 912 #ifdef __cplusplus
3568     extern "C" {
3569     #endif
3570    
3571 michael 945 _LT_EOF
3572 michael 912 # Now generate the symbol file.
3573 michael 945 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3574 michael 912
3575 michael 945 cat <<_LT_EOF >> conftest.$ac_ext
3576 michael 912
3577 michael 945 /* The mapping between symbol names and symbols. */
3578 michael 912 const struct {
3579     const char *name;
3580 michael 945 void *address;
3581 michael 912 }
3582 michael 945 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3583 michael 912 {
3584 michael 945 { "@PROGRAM@", (void *) 0 },
3585     _LT_EOF
3586     $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3587     cat <<\_LT_EOF >> conftest.$ac_ext
3588     {0, (void *) 0}
3589 michael 912 };
3590    
3591 michael 945 /* This works around a problem in FreeBSD linker */
3592     #ifdef FREEBSD_WORKAROUND
3593     static const void *lt_preloaded_setup() {
3594     return lt__PROGRAM__LTX_preloaded_symbols;
3595     }
3596     #endif
3597    
3598 michael 912 #ifdef __cplusplus
3599     }
3600     #endif
3601 michael 945 _LT_EOF
3602 michael 912 # Now try linking the two files.
3603     mv conftest.$ac_objext conftstm.$ac_objext
3604     lt_save_LIBS="$LIBS"
3605     lt_save_CFLAGS="$CFLAGS"
3606     LIBS="conftstm.$ac_objext"
3607 michael 945 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3608 michael 912 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3609     pipe_works=yes
3610     fi
3611     LIBS="$lt_save_LIBS"
3612     CFLAGS="$lt_save_CFLAGS"
3613     else
3614     echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3615     fi
3616     else
3617     echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3618     fi
3619     else
3620     echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3621     fi
3622     else
3623     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3624     cat conftest.$ac_ext >&5
3625     fi
3626 db 941 rm -rf conftest* conftst*
3627 michael 912
3628     # Do not use the global_symbol_pipe unless it works.
3629     if test "$pipe_works" = yes; then
3630     break
3631     else
3632     lt_cv_sys_global_symbol_pipe=
3633     fi
3634     done
3635     ])
3636     if test -z "$lt_cv_sys_global_symbol_pipe"; then
3637     lt_cv_sys_global_symbol_to_cdecl=
3638     fi
3639     if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3640     AC_MSG_RESULT(failed)
3641     else
3642     AC_MSG_RESULT(ok)
3643     fi
3644    
3645 michael 945 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3646     [Take the output of nm and produce a listing of raw symbols and C names])
3647     _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3648     [Transform the output of nm in a proper C declaration])
3649     _LT_DECL([global_symbol_to_c_name_address],
3650     [lt_cv_sys_global_symbol_to_c_name_address], [1],
3651     [Transform the output of nm in a C name address pair])
3652     _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3653     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3654     [Transform the output of nm in a C name address pair when lib prefix is needed])
3655     ]) # _LT_CMD_GLOBAL_SYMBOLS
3656 michael 912
3657    
3658 michael 945 # _LT_COMPILER_PIC([TAGNAME])
3659     # ---------------------------
3660     m4_defun([_LT_COMPILER_PIC],
3661     [m4_require([_LT_TAG_COMPILER])dnl
3662     _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3663     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3664     _LT_TAGVAR(lt_prog_compiler_static, $1)=
3665    
3666 michael 912 AC_MSG_CHECKING([for $compiler option to produce PIC])
3667 michael 945 m4_if([$1], [CXX], [
3668 michael 912 # C++ specific cases for pic, static, wl, etc.
3669     if test "$GXX" = yes; then
3670 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3671     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3672 michael 912
3673     case $host_os in
3674     aix*)
3675     # All AIX code is PIC.
3676     if test "$host_cpu" = ia64; then
3677     # AIX 5 now supports IA64 processor
3678 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3679 michael 912 fi
3680     ;;
3681 michael 945
3682 michael 912 amigaos*)
3683 michael 945 case $host_cpu in
3684     powerpc)
3685     # see comment about AmigaOS4 .so support
3686     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3687     ;;
3688     m68k)
3689     # FIXME: we need at least 68020 code to build shared libraries, but
3690     # adding the `-m68020' flag to GCC prevents building anything better,
3691     # like `-m68040'.
3692     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3693     ;;
3694     esac
3695 michael 912 ;;
3696 michael 945
3697 michael 912 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3698     # PIC is the default for these OSes.
3699     ;;
3700 michael 945 mingw* | cygwin* | os2* | pw32* | cegcc*)
3701 michael 912 # This hack is so that the source file can tell whether it is being
3702     # built for inclusion in a dll (and should export symbols for example).
3703     # Although the cygwin gcc ignores -fPIC, still need this for old-style
3704     # (--disable-auto-import) libraries
3705 db 941 m4_if([$1], [GCJ], [],
3706 michael 945 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3707 michael 912 ;;
3708     darwin* | rhapsody*)
3709     # PIC is the default on this platform
3710     # Common symbols not allowed in MH_DYLIB files
3711 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3712 michael 912 ;;
3713     *djgpp*)
3714     # DJGPP does not support shared libraries at all
3715 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3716 michael 912 ;;
3717 michael 1094 haiku*)
3718     # PIC is the default for Haiku.
3719     # The "-static" flag exists, but is broken.
3720     _LT_TAGVAR(lt_prog_compiler_static, $1)=
3721     ;;
3722 michael 912 interix[[3-9]]*)
3723     # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3724     # Instead, we relocate shared libraries at runtime.
3725     ;;
3726     sysv4*MP*)
3727     if test -d /usr/nec; then
3728 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3729 michael 912 fi
3730     ;;
3731     hpux*)
3732 michael 945 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3733     # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3734     # sets the default TLS model and affects inlining.
3735 michael 912 case $host_cpu in
3736 michael 945 hppa*64*)
3737 michael 912 ;;
3738     *)
3739 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3740 michael 912 ;;
3741     esac
3742     ;;
3743 michael 945 *qnx* | *nto*)
3744     # QNX uses GNU C++, but need to define -shared option too, otherwise
3745     # it will coredump.
3746     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3747     ;;
3748 michael 912 *)
3749 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3750 michael 912 ;;
3751     esac
3752     else
3753     case $host_os in
3754 db 941 aix[[4-9]]*)
3755 michael 912 # All AIX code is PIC.
3756     if test "$host_cpu" = ia64; then
3757     # AIX 5 now supports IA64 processor
3758 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3759 michael 912 else
3760 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3761 michael 912 fi
3762     ;;
3763     chorus*)
3764     case $cc_basename in
3765     cxch68*)
3766     # Green Hills C++ Compiler
3767 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"
3768 michael 912 ;;
3769     esac
3770     ;;
3771     dgux*)
3772     case $cc_basename in
3773     ec++*)
3774 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3775 michael 912 ;;
3776     ghcx*)
3777     # Green Hills C++ Compiler
3778 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3779 michael 912 ;;
3780     *)
3781     ;;
3782     esac
3783     ;;
3784     freebsd* | dragonfly*)
3785     # FreeBSD uses GNU C++
3786     ;;
3787     hpux9* | hpux10* | hpux11*)
3788     case $cc_basename in
3789     CC*)
3790 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3791     _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3792 michael 912 if test "$host_cpu" != ia64; then
3793 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3794 michael 912 fi
3795     ;;
3796     aCC*)
3797 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3798     _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3799 michael 912 case $host_cpu in
3800     hppa*64*|ia64*)
3801     # +Z the default
3802     ;;
3803     *)
3804 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3805 michael 912 ;;
3806     esac
3807     ;;
3808     *)
3809     ;;
3810     esac
3811     ;;
3812     interix*)
3813     # This is c89, which is MS Visual C++ (no shared libs)
3814     # Anyone wants to do a port?
3815     ;;
3816     irix5* | irix6* | nonstopux*)
3817     case $cc_basename in
3818     CC*)
3819 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3820     _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3821 michael 912 # CC pic flag -KPIC is the default.
3822     ;;
3823     *)
3824     ;;
3825     esac
3826     ;;
3827 michael 1094 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3828 michael 912 case $cc_basename in
3829     KCC*)
3830     # KAI C++ Compiler
3831 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3832     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3833 michael 912 ;;
3834 michael 945 ecpc* )
3835     # old Intel C++ for x86_64 which still supported -KPIC.
3836     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3837     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3838     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3839 michael 912 ;;
3840 michael 945 icpc* )
3841     # Intel C++, used to be incompatible with GCC.
3842     # ICC 10 doesn't accept -KPIC any more.
3843     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3844     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3845     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3846     ;;
3847 db 941 pgCC* | pgcpp*)
3848 michael 945 # Portland Group C++ compiler
3849     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3850     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3851     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3852 michael 912 ;;
3853     cxx*)
3854     # Compaq C++
3855     # Make sure the PIC flag is empty. It appears that all Alpha
3856     # Linux and Compaq Tru64 Unix objects are PIC.
3857 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3858     _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3859 michael 912 ;;
3860 michael 1094 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
3861     # IBM XL 8.0, 9.0 on PPC and BlueGene
3862 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3863     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3864     _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3865     ;;
3866 michael 912 *)
3867     case `$CC -V 2>&1 | sed 5q` in
3868     *Sun\ C*)
3869     # Sun C++ 5.9
3870 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3871     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3872     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3873 michael 912 ;;
3874     esac
3875     ;;
3876     esac
3877     ;;
3878     lynxos*)
3879     ;;
3880     m88k*)
3881     ;;
3882     mvs*)
3883     case $cc_basename in
3884     cxx*)
3885 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3886 michael 912 ;;
3887     *)
3888     ;;
3889     esac
3890     ;;
3891     netbsd*)
3892     ;;
3893 michael 945 *qnx* | *nto*)
3894     # QNX uses GNU C++, but need to define -shared option too, otherwise
3895     # it will coredump.
3896     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3897     ;;
3898 michael 912 osf3* | osf4* | osf5*)
3899     case $cc_basename in
3900     KCC*)
3901 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3902 michael 912 ;;
3903     RCC*)
3904     # Rational C++ 2.4.1
3905 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3906 michael 912 ;;
3907     cxx*)
3908     # Digital/Compaq C++
3909 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3910 michael 912 # Make sure the PIC flag is empty. It appears that all Alpha
3911     # Linux and Compaq Tru64 Unix objects are PIC.
3912 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3913     _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3914 michael 912 ;;
3915     *)
3916     ;;
3917     esac
3918     ;;
3919     psos*)
3920     ;;
3921     solaris*)
3922     case $cc_basename in
3923 michael 1094 CC* | sunCC*)
3924 michael 912 # Sun C++ 4.2, 5.x and Centerline C++
3925 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3926     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3927     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3928 michael 912 ;;
3929     gcx*)
3930     # Green Hills C++ Compiler
3931 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3932 michael 912 ;;
3933     *)
3934     ;;
3935     esac
3936     ;;
3937     sunos4*)
3938     case $cc_basename in
3939     CC*)
3940     # Sun C++ 4.x
3941 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3942     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3943 michael 912 ;;
3944     lcc*)
3945     # Lucid
3946 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3947 michael 912 ;;
3948     *)
3949     ;;
3950     esac
3951     ;;
3952 michael 945 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3953     case $cc_basename in
3954     CC*)
3955     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3956     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3957     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3958     ;;
3959     esac
3960     ;;
3961 michael 912 tandem*)
3962     case $cc_basename in
3963     NCC*)
3964     # NonStop-UX NCC 3.20
3965 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3966 michael 912 ;;
3967     *)
3968     ;;
3969     esac
3970     ;;
3971     vxworks*)
3972     ;;
3973     *)
3974 michael 945 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3975 michael 912 ;;
3976     esac
3977     fi
3978     ],
3979     [
3980     if test "$GCC" = yes; then
3981 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3982     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3983 michael 912
3984     case $host_os in
3985     aix*)
3986     # All AIX code is PIC.
3987     if test "$host_cpu" = ia64; then
3988     # AIX 5 now supports IA64 processor
3989 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3990 michael 912 fi
3991     ;;
3992    
3993     amigaos*)
3994 michael 945 case $host_cpu in
3995     powerpc)
3996     # see comment about AmigaOS4 .so support
3997     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3998     ;;
3999     m68k)
4000     # FIXME: we need at least 68020 code to build shared libraries, but
4001     # adding the `-m68020' flag to GCC prevents building anything better,
4002     # like `-m68040'.
4003     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4004     ;;
4005     esac
4006 michael 912 ;;
4007    
4008     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4009     # PIC is the default for these OSes.
4010     ;;
4011    
4012 michael 945 mingw* | cygwin* | pw32* | os2* | cegcc*)
4013 michael 912 # This hack is so that the source file can tell whether it is being
4014     # built for inclusion in a dll (and should export symbols for example).
4015     # Although the cygwin gcc ignores -fPIC, still need this for old-style
4016     # (--disable-auto-import) libraries
4017 db 941 m4_if([$1], [GCJ], [],
4018 michael 945 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4019 michael 912 ;;
4020    
4021     darwin* | rhapsody*)
4022     # PIC is the default on this platform
4023     # Common symbols not allowed in MH_DYLIB files
4024 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4025 michael 912 ;;
4026    
4027 michael 1094 haiku*)
4028     # PIC is the default for Haiku.
4029     # The "-static" flag exists, but is broken.
4030     _LT_TAGVAR(lt_prog_compiler_static, $1)=
4031     ;;
4032    
4033 michael 945 hpux*)
4034     # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4035     # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4036     # sets the default TLS model and affects inlining.
4037     case $host_cpu in
4038     hppa*64*)
4039     # +Z the default
4040     ;;
4041     *)
4042     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4043     ;;
4044     esac
4045     ;;
4046    
4047 michael 912 interix[[3-9]]*)
4048     # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4049     # Instead, we relocate shared libraries at runtime.
4050     ;;
4051    
4052     msdosdjgpp*)
4053     # Just because we use GCC doesn't mean we suddenly get shared libraries
4054     # on systems that don't support them.
4055 michael 945 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4056 michael 912 enable_shared=no
4057     ;;
4058    
4059 michael 945 *nto* | *qnx*)
4060     # QNX uses GNU C++, but need to define -shared option too, otherwise
4061     # it will coredump.
4062     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4063     ;;
4064    
4065 michael 912 sysv4*MP*)
4066     if test -d /usr/nec; then
4067 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4068 michael 912 fi
4069     ;;
4070    
4071     *)
4072 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4073 michael 912 ;;
4074     esac
4075 michael 1094
4076     case $cc_basename in
4077     nvcc*) # Cuda Compiler Driver 2.2
4078     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4079     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
4080     ;;
4081     esac
4082 michael 912 else
4083     # PORTME Check for flag to pass linker flags through the system compiler.
4084     case $host_os in
4085     aix*)
4086 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4087 michael 912 if test "$host_cpu" = ia64; then
4088     # AIX 5 now supports IA64 processor
4089 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4090 michael 912 else
4091 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4092 michael 912 fi
4093     ;;
4094    
4095 michael 945 mingw* | cygwin* | pw32* | os2* | cegcc*)
4096 michael 912 # This hack is so that the source file can tell whether it is being
4097     # built for inclusion in a dll (and should export symbols for example).
4098 db 941 m4_if([$1], [GCJ], [],
4099 michael 945 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4100 michael 912 ;;
4101    
4102     hpux9* | hpux10* | hpux11*)
4103 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4104 michael 912 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4105     # not for PA HP-UX.
4106     case $host_cpu in
4107     hppa*64*|ia64*)
4108     # +Z the default
4109     ;;
4110     *)
4111 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4112 michael 912 ;;
4113     esac
4114     # Is there a better lt_prog_compiler_static that works with the bundled CC?
4115 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4116 michael 912 ;;
4117    
4118     irix5* | irix6* | nonstopux*)
4119 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4120 michael 912 # PIC (with -KPIC) is the default.
4121 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4122 michael 912 ;;
4123    
4124 michael 1094 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4125 michael 912 case $cc_basename in
4126 michael 945 # old Intel for x86_64 which still supported -KPIC.
4127     ecc*)
4128     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4129     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4130     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4131 michael 912 ;;
4132 michael 945 # icc used to be incompatible with GCC.
4133     # ICC 10 doesn't accept -KPIC any more.
4134     icc* | ifort*)
4135     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4136     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4137     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4138     ;;
4139     # Lahey Fortran 8.1.
4140     lf95*)
4141     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4142     _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4143     _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4144     ;;
4145 michael 1094 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4146 michael 912 # Portland Group compilers (*not* the Pentium gcc compiler,
4147     # which looks to be a dead project)
4148 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4149     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4150     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4151 michael 912 ;;
4152     ccc*)
4153 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4154 michael 912 # All Alpha code is PIC.
4155 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4156 michael 912 ;;
4157 michael 1094 xl* | bgxl* | bgf* | mpixl*)
4158     # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4159 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4160     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4161     _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4162     ;;
4163 michael 912 *)
4164 michael 945 case `$CC -V 2>&1 | sed 5q` in
4165 michael 1094 *Sun\ F* | *Sun*Fortran*)
4166     # Sun Fortran 8.3 passes all unrecognized flags to the linker
4167     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4168     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4169     _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4170     ;;
4171 michael 912 *Sun\ C*)
4172     # Sun C 5.9
4173 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4174     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4175     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4176 michael 912 ;;
4177     esac
4178     ;;
4179     esac
4180     ;;
4181    
4182 michael 945 newsos6)
4183     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4184     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4185     ;;
4186    
4187     *nto* | *qnx*)
4188     # QNX uses GNU C++, but need to define -shared option too, otherwise
4189     # it will coredump.
4190     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4191     ;;
4192    
4193 michael 912 osf3* | osf4* | osf5*)
4194 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4195 michael 912 # All OSF/1 code is PIC.
4196 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4197 michael 912 ;;
4198    
4199     rdos*)
4200 michael 945 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4201 michael 912 ;;
4202    
4203     solaris*)
4204 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4205     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4206 michael 912 case $cc_basename in
4207 michael 1094 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4208 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4209 michael 912 *)
4210 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4211 michael 912 esac
4212     ;;
4213    
4214     sunos4*)
4215 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4216     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4217     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4218 michael 912 ;;
4219    
4220     sysv4 | sysv4.2uw2* | sysv4.3*)
4221 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4222     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4223     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4224 michael 912 ;;
4225    
4226     sysv4*MP*)
4227     if test -d /usr/nec ;then
4228 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4229     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4230 michael 912 fi
4231     ;;
4232    
4233     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4234 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4235     _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4236     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4237 michael 912 ;;
4238    
4239     unicos*)
4240 michael 945 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4241     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4242 michael 912 ;;
4243    
4244     uts4*)
4245 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4246     _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4247 michael 912 ;;
4248    
4249     *)
4250 michael 945 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4251 michael 912 ;;
4252     esac
4253     fi
4254     ])
4255     case $host_os in
4256     # For platforms which do not support PIC, -DPIC is meaningless:
4257     *djgpp*)
4258 michael 945 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4259 michael 912 ;;
4260     *)
4261 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],[])])"
4262 michael 912 ;;
4263     esac
4264 michael 945 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4265     _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4266     [How to pass a linker flag through the compiler])
4267 michael 912
4268     #
4269 michael 945 # Check to make sure the PIC flag actually works.
4270     #
4271     if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4272     _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4273     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4274     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4275     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4276     "" | " "*) ;;
4277     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4278     esac],
4279     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4280     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4281     fi
4282     _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4283     [Additional compiler flags for building library objects])
4284    
4285     #
4286 michael 912 # Check to make sure the static flag actually works.
4287     #
4288 michael 945 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4289     _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4290     _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4291 michael 912 $lt_tmp_static_flag,
4292     [],
4293 michael 945 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4294     _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4295     [Compiler flag to prevent dynamic linking])
4296     ])# _LT_COMPILER_PIC
4297 michael 912
4298    
4299 michael 945 # _LT_LINKER_SHLIBS([TAGNAME])
4300     # ----------------------------
4301 michael 912 # See if the linker supports building shared libraries.
4302 michael 945 m4_defun([_LT_LINKER_SHLIBS],
4303     [AC_REQUIRE([LT_PATH_LD])dnl
4304     AC_REQUIRE([LT_PATH_NM])dnl
4305     m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4306     m4_require([_LT_DECL_EGREP])dnl
4307     m4_require([_LT_DECL_SED])dnl
4308     m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4309     m4_require([_LT_TAG_COMPILER])dnl
4310 michael 912 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4311 michael 945 m4_if([$1], [CXX], [
4312     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4313 michael 912 case $host_os in
4314 db 941 aix[[4-9]]*)
4315 michael 912 # If we're using GNU nm, then we don't want the "-C" option.
4316     # -C means demangle to AIX nm, but means don't demangle with GNU nm
4317 michael 1094 # Also, AIX nm treats weak defined symbols like other global defined
4318     # symbols, whereas GNU nm marks them as "W".
4319 michael 945 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4320 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'
4321 michael 912 else
4322 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'
4323 michael 912 fi
4324     ;;
4325     pw32*)
4326 michael 945 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4327 michael 912 ;;
4328 michael 945 cygwin* | mingw* | cegcc*)
4329     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4330 michael 912 ;;
4331     *)
4332 michael 945 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4333 michael 912 ;;
4334     esac
4335 michael 945 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4336     ], [
4337 michael 912 runpath_var=
4338 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)=
4339     _LT_TAGVAR(always_export_symbols, $1)=no
4340     _LT_TAGVAR(archive_cmds, $1)=
4341     _LT_TAGVAR(archive_expsym_cmds, $1)=
4342     _LT_TAGVAR(compiler_needs_object, $1)=no
4343     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4344     _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4345     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4346     _LT_TAGVAR(hardcode_automatic, $1)=no
4347     _LT_TAGVAR(hardcode_direct, $1)=no
4348     _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4349     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4350     _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4351     _LT_TAGVAR(hardcode_libdir_separator, $1)=
4352     _LT_TAGVAR(hardcode_minus_L, $1)=no
4353     _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4354     _LT_TAGVAR(inherit_rpath, $1)=no
4355     _LT_TAGVAR(link_all_deplibs, $1)=unknown
4356     _LT_TAGVAR(module_cmds, $1)=
4357     _LT_TAGVAR(module_expsym_cmds, $1)=
4358     _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4359     _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4360     _LT_TAGVAR(thread_safe_flag_spec, $1)=
4361     _LT_TAGVAR(whole_archive_flag_spec, $1)=
4362 michael 912 # include_expsyms should be a list of space-separated symbols to be *always*
4363     # included in the symbol list
4364 michael 945 _LT_TAGVAR(include_expsyms, $1)=
4365 michael 912 # exclude_expsyms can be an extended regexp of symbols to exclude
4366     # it will be wrapped by ` (' and `)$', so one must not match beginning or
4367     # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4368     # as well as any symbol that contains `d'.
4369 michael 945 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4370 michael 912 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4371     # platforms (ab)use it in PIC code, but their linkers get confused if
4372     # the symbol is explicitly referenced. Since portable code cannot
4373     # rely on this symbol name, it's probably fine to never include it in
4374     # preloaded symbol tables.
4375 db 941 # Exclude shared library initialization/finalization symbols.
4376     dnl Note also adjust exclude_expsyms for C++ above.
4377 michael 912 extract_expsyms_cmds=
4378 michael 945
4379 michael 912 case $host_os in
4380 michael 945 cygwin* | mingw* | pw32* | cegcc*)
4381 michael 912 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4382     # When not using gcc, we currently assume that we are using
4383     # Microsoft Visual C++.
4384     if test "$GCC" != yes; then
4385     with_gnu_ld=no
4386     fi
4387     ;;
4388     interix*)
4389     # we just hope/assume this is gcc and not c89 (= MSVC++)
4390     with_gnu_ld=yes
4391     ;;
4392     openbsd*)
4393     with_gnu_ld=no
4394     ;;
4395     esac
4396    
4397 michael 945 _LT_TAGVAR(ld_shlibs, $1)=yes
4398 michael 1094
4399     # On some targets, GNU ld is compatible enough with the native linker
4400     # that we're better off using the native interface for both.
4401     lt_use_gnu_ld_interface=no
4402 michael 912 if test "$with_gnu_ld" = yes; then
4403 michael 1094 case $host_os in
4404     aix*)
4405     # The AIX port of GNU ld has always aspired to compatibility
4406     # with the native linker. However, as the warning in the GNU ld
4407     # block says, versions before 2.19.5* couldn't really create working
4408     # shared libraries, regardless of the interface used.
4409     case `$LD -v 2>&1` in
4410     *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4411     *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4412     *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4413     *)
4414     lt_use_gnu_ld_interface=yes
4415     ;;
4416     esac
4417     ;;
4418     *)
4419     lt_use_gnu_ld_interface=yes
4420     ;;
4421     esac
4422     fi
4423    
4424     if test "$lt_use_gnu_ld_interface" = yes; then
4425 michael 912 # If archive_cmds runs LD, not CC, wlarc should be empty
4426     wlarc='${wl}'
4427    
4428     # Set some defaults for GNU ld with shared library support. These
4429     # are reset later if shared libraries are not supported. Putting them
4430     # here allows them to be overridden if necessary.
4431     runpath_var=LD_RUN_PATH
4432 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4433     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4434 michael 912 # ancient GNU ld didn't support --whole-archive et. al.
4435 michael 945 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4436     _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4437     else
4438     _LT_TAGVAR(whole_archive_flag_spec, $1)=
4439 michael 912 fi
4440     supports_anon_versioning=no
4441 michael 945 case `$LD -v 2>&1` in
4442 michael 1094 *GNU\ gold*) supports_anon_versioning=yes ;;
4443 michael 912 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4444     *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4445     *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4446     *\ 2.11.*) ;; # other 2.11 versions
4447     *) supports_anon_versioning=yes ;;
4448     esac
4449    
4450     # See if GNU ld supports shared libraries.
4451     case $host_os in
4452 db 941 aix[[3-9]]*)
4453 michael 912 # On AIX/PPC, the GNU linker is very broken
4454     if test "$host_cpu" != ia64; then
4455 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
4456     cat <<_LT_EOF 1>&2
4457 michael 912
4458 michael 1094 *** Warning: the GNU linker, at least up to release 2.19, is reported
4459 michael 912 *** to be unable to reliably create shared libraries on AIX.
4460     *** Therefore, libtool is disabling shared libraries support. If you
4461 michael 1094 *** really care for shared libraries, you may want to install binutils
4462     *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4463     *** You will then need to restart the configuration process.
4464 michael 912
4465 michael 945 _LT_EOF
4466 michael 912 fi
4467     ;;
4468    
4469     amigaos*)
4470 michael 945 case $host_cpu in
4471     powerpc)
4472     # see comment about AmigaOS4 .so support
4473     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4474     _LT_TAGVAR(archive_expsym_cmds, $1)=''
4475     ;;
4476     m68k)
4477     _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)'
4478     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4479     _LT_TAGVAR(hardcode_minus_L, $1)=yes
4480     ;;
4481     esac
4482 michael 912 ;;
4483    
4484     beos*)
4485 michael 945 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4486     _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4487 michael 912 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4488     # support --undefined. This deserves some investigation. FIXME
4489 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4490 michael 912 else
4491 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
4492 michael 912 fi
4493     ;;
4494    
4495 michael 945 cygwin* | mingw* | pw32* | cegcc*)
4496     # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4497 michael 912 # as there is no search path for DLLs.
4498 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4499 michael 1094 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4500 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4501     _LT_TAGVAR(always_export_symbols, $1)=no
4502     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4503     _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'
4504 michael 912
4505 michael 945 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4506     _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'
4507 michael 912 # If the export-symbols file already is a .def file (1st line
4508     # is EXPORTS), use it as is; otherwise, prepend...
4509 michael 945 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4510 michael 912 cp $export_symbols $output_objdir/$soname.def;
4511     else
4512     echo EXPORTS > $output_objdir/$soname.def;
4513     cat $export_symbols >> $output_objdir/$soname.def;
4514     fi~
4515     $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4516     else
4517 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
4518 michael 912 fi
4519     ;;
4520    
4521 michael 1094 haiku*)
4522     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4523     _LT_TAGVAR(link_all_deplibs, $1)=yes
4524     ;;
4525    
4526 michael 912 interix[[3-9]]*)
4527 michael 945 _LT_TAGVAR(hardcode_direct, $1)=no
4528     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4529     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4530     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4531 michael 912 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4532     # Instead, shared libraries are loaded at an image base (0x10000000 by
4533     # default) and relocated if they conflict, which is a slow very memory
4534     # consuming and fragmenting process. To avoid this, we pick a random,
4535     # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4536     # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4537 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'
4538     _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'
4539 michael 912 ;;
4540    
4541 michael 1094 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4542 michael 945 tmp_diet=no
4543     if test "$host_os" = linux-dietlibc; then
4544     case $cc_basename in
4545     diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4546     esac
4547     fi
4548     if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4549     && test "$tmp_diet" = no
4550     then
4551 michael 912 tmp_addflag=
4552 michael 945 tmp_sharedflag='-shared'
4553 michael 912 case $cc_basename,$host_cpu in
4554 michael 945 pgcc*) # Portland Group C compiler
4555 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'
4556 michael 912 tmp_addflag=' $pic_flag'
4557     ;;
4558 michael 1094 pgf77* | pgf90* | pgf95* | pgfortran*)
4559     # Portland Group f77 and f90 compilers
4560     _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'
4561 michael 912 tmp_addflag=' $pic_flag -Mnomain' ;;
4562 michael 945 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4563 michael 912 tmp_addflag=' -i_dynamic' ;;
4564     efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4565     tmp_addflag=' -i_dynamic -nofor_main' ;;
4566     ifc* | ifort*) # Intel Fortran compiler
4567     tmp_addflag=' -nofor_main' ;;
4568 michael 945 lf95*) # Lahey Fortran 8.1
4569     _LT_TAGVAR(whole_archive_flag_spec, $1)=
4570     tmp_sharedflag='--shared' ;;
4571 michael 1094 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4572 michael 945 tmp_sharedflag='-qmkshrobj'
4573     tmp_addflag= ;;
4574 michael 1094 nvcc*) # Cuda Compiler Driver 2.2
4575     _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'
4576     _LT_TAGVAR(compiler_needs_object, $1)=yes
4577     ;;
4578 michael 912 esac
4579     case `$CC -V 2>&1 | sed 5q` in
4580     *Sun\ C*) # Sun C 5.9
4581 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'
4582 michael 945 _LT_TAGVAR(compiler_needs_object, $1)=yes
4583 michael 912 tmp_sharedflag='-G' ;;
4584     *Sun\ F*) # Sun Fortran 8.3
4585     tmp_sharedflag='-G' ;;
4586     esac
4587 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4588 michael 912
4589 michael 945 if test "x$supports_anon_versioning" = xyes; then
4590     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4591     cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4592     echo "local: *; };" >> $output_objdir/$libname.ver~
4593     $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4594     fi
4595    
4596     case $cc_basename in
4597 michael 1094 xlf* | bgf* | bgxlf* | mpixlf*)
4598 michael 945 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4599     _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4600     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4601     _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4602 michael 1094 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4603 michael 945 if test "x$supports_anon_versioning" = xyes; then
4604     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4605     cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4606     echo "local: *; };" >> $output_objdir/$libname.ver~
4607 michael 1094 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4608 michael 945 fi
4609     ;;
4610     esac
4611 michael 912 else
4612 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
4613 michael 912 fi
4614     ;;
4615    
4616     netbsd*)
4617 michael 945 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4618     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4619 michael 912 wlarc=
4620     else
4621 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4622     _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'
4623 michael 912 fi
4624     ;;
4625    
4626     solaris*)
4627 michael 945 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4628     _LT_TAGVAR(ld_shlibs, $1)=no
4629     cat <<_LT_EOF 1>&2
4630 michael 912
4631     *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4632     *** create shared libraries on Solaris systems. Therefore, libtool
4633     *** is disabling shared libraries support. We urge you to upgrade GNU
4634     *** binutils to release 2.9.1 or newer. Another option is to modify
4635     *** your PATH or compiler configuration so that the native linker is
4636     *** used, and then restart.
4637    
4638 michael 945 _LT_EOF
4639     elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4640     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4641     _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'
4642 michael 912 else
4643 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
4644 michael 912 fi
4645     ;;
4646    
4647     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4648     case `$LD -v 2>&1` in
4649     *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4650 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
4651 michael 912 cat <<_LT_EOF 1>&2
4652    
4653     *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4654     *** reliably create shared libraries on SCO systems. Therefore, libtool
4655     *** is disabling shared libraries support. We urge you to upgrade GNU
4656     *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4657     *** your PATH or compiler configuration so that the native linker is
4658     *** used, and then restart.
4659    
4660     _LT_EOF
4661     ;;
4662     *)
4663 michael 945 # For security reasons, it is highly recommended that you always
4664     # use absolute paths for naming shared libraries, and exclude the
4665     # DT_RUNPATH tag from executables and libraries. But doing so
4666     # requires that you compile everything twice, which is a pain.
4667     if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4668     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4669     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4670     _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'
4671 michael 912 else
4672 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
4673 michael 912 fi
4674     ;;
4675     esac
4676     ;;
4677    
4678     sunos4*)
4679 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4680 michael 912 wlarc=
4681 michael 945 _LT_TAGVAR(hardcode_direct, $1)=yes
4682     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4683 michael 912 ;;
4684    
4685     *)
4686 michael 945 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4687     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4688     _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'
4689 michael 912 else
4690 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
4691 michael 912 fi
4692     ;;
4693     esac
4694    
4695 michael 945 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4696 michael 912 runpath_var=
4697 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4698     _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4699     _LT_TAGVAR(whole_archive_flag_spec, $1)=
4700 michael 912 fi
4701     else
4702     # PORTME fill in a description of your system's linker (not GNU ld)
4703     case $host_os in
4704     aix3*)
4705 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4706     _LT_TAGVAR(always_export_symbols, $1)=yes
4707     _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'
4708 michael 912 # Note: this linker hardcodes the directories in LIBPATH if there
4709     # are no directories specified by -L.
4710 michael 945 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4711 michael 912 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4712     # Neither direct hardcoding nor static linking is supported with a
4713     # broken collect2.
4714 michael 945 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4715 michael 912 fi
4716     ;;
4717    
4718 db 941 aix[[4-9]]*)
4719 michael 912 if test "$host_cpu" = ia64; then
4720     # On IA64, the linker does run time linking by default, so we don't
4721     # have to do anything special.
4722     aix_use_runtimelinking=no
4723     exp_sym_flag='-Bexport'
4724     no_entry_flag=""
4725     else
4726     # If we're using GNU nm, then we don't want the "-C" option.
4727     # -C means demangle to AIX nm, but means don't demangle with GNU nm
4728 michael 1094 # Also, AIX nm treats weak defined symbols like other global
4729     # defined symbols, whereas GNU nm marks them as "W".
4730 michael 945 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4731 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'
4732 michael 912 else
4733 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'
4734 michael 912 fi
4735     aix_use_runtimelinking=no
4736    
4737     # Test if we are trying to use run time linking or normal
4738     # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4739     # need to do runtime linking.
4740 db 941 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4741 michael 912 for ld_flag in $LDFLAGS; do
4742 michael 945 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4743     aix_use_runtimelinking=yes
4744     break
4745     fi
4746 michael 912 done
4747     ;;
4748     esac
4749    
4750     exp_sym_flag='-bexport'
4751     no_entry_flag='-bnoentry'
4752     fi
4753    
4754     # When large executables or shared objects are built, AIX ld can
4755     # have problems creating the table of contents. If linking a library
4756     # or program results in "error TOC overflow" add -mminimal-toc to
4757     # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4758     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4759    
4760 michael 945 _LT_TAGVAR(archive_cmds, $1)=''
4761     _LT_TAGVAR(hardcode_direct, $1)=yes
4762     _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4763     _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4764     _LT_TAGVAR(link_all_deplibs, $1)=yes
4765     _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4766 michael 912
4767     if test "$GCC" = yes; then
4768     case $host_os in aix4.[[012]]|aix4.[[012]].*)
4769     # We only want to do this on AIX 4.2 and lower, the check
4770     # below for broken collect2 doesn't work under 4.3+
4771     collect2name=`${CC} -print-prog-name=collect2`
4772 michael 945 if test -f "$collect2name" &&
4773     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4774 michael 912 then
4775 michael 945 # We have reworked collect2
4776     :
4777 michael 912 else
4778 michael 945 # We have old collect2
4779     _LT_TAGVAR(hardcode_direct, $1)=unsupported
4780     # It fails to find uninstalled libraries when the uninstalled
4781     # path is not listed in the libpath. Setting hardcode_minus_L
4782     # to unsupported forces relinking
4783     _LT_TAGVAR(hardcode_minus_L, $1)=yes
4784     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4785     _LT_TAGVAR(hardcode_libdir_separator, $1)=
4786 michael 912 fi
4787     ;;
4788     esac
4789     shared_flag='-shared'
4790     if test "$aix_use_runtimelinking" = yes; then
4791     shared_flag="$shared_flag "'${wl}-G'
4792     fi
4793     else
4794     # not using gcc
4795     if test "$host_cpu" = ia64; then
4796 michael 945 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4797     # chokes on -Wl,-G. The following line is correct:
4798 michael 912 shared_flag='-G'
4799     else
4800     if test "$aix_use_runtimelinking" = yes; then
4801     shared_flag='${wl}-G'
4802     else
4803     shared_flag='${wl}-bM:SRE'
4804     fi
4805     fi
4806     fi
4807    
4808 michael 945 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4809 michael 912 # It seems that -bexpall does not export symbols beginning with
4810     # underscore (_), so it is better to generate a list of symbols to export.
4811 michael 945 _LT_TAGVAR(always_export_symbols, $1)=yes
4812 michael 912 if test "$aix_use_runtimelinking" = yes; then
4813     # Warning - without using the other runtime loading flags (-brtl),
4814     # -berok will link without error, but may produce a broken library.
4815 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4816     # Determine the default libpath from the value encoded in an
4817     # empty executable.
4818     _LT_SYS_MODULE_PATH_AIX
4819     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4820 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"
4821 michael 945 else
4822 michael 912 if test "$host_cpu" = ia64; then
4823 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4824     _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4825     _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"
4826 michael 912 else
4827 michael 945 # Determine the default libpath from the value encoded in an
4828     # empty executable.
4829     _LT_SYS_MODULE_PATH_AIX
4830     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4831 michael 912 # Warning - without using the other run time loading flags,
4832     # -berok will link without error, but may produce a broken library.
4833 michael 945 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4834     _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4835 michael 1094 if test "$with_gnu_ld" = yes; then
4836     # We only use this code for GNU lds that support --whole-archive.
4837     _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4838     else
4839     # Exported symbols can be pulled into shared objects from archives
4840     _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4841     fi
4842 michael 945 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4843 michael 912 # This is similar to how AIX traditionally builds its shared libraries.
4844 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'
4845 michael 912 fi
4846     fi
4847     ;;
4848    
4849     amigaos*)
4850 michael 945 case $host_cpu in
4851     powerpc)
4852     # see comment about AmigaOS4 .so support
4853     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4854     _LT_TAGVAR(archive_expsym_cmds, $1)=''
4855     ;;
4856     m68k)
4857     _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)'
4858     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4859     _LT_TAGVAR(hardcode_minus_L, $1)=yes
4860     ;;
4861     esac
4862 michael 912 ;;
4863    
4864     bsdi[[45]]*)
4865 michael 945 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4866 michael 912 ;;
4867    
4868 michael 945 cygwin* | mingw* | pw32* | cegcc*)
4869 michael 912 # When not using gcc, we currently assume that we are using
4870     # Microsoft Visual C++.
4871     # hardcode_libdir_flag_spec is actually meaningless, as there is
4872     # no search path for DLLs.
4873 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4874     _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4875 michael 912 # Tell ltmain to make .lib files, not .a files.
4876     libext=lib
4877     # Tell ltmain to make .dll files, not .so files.
4878     shrext_cmds=".dll"
4879     # FIXME: Setting linknames here is a bad hack.
4880 michael 1094 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
4881 michael 912 # The linker will automatically build a .lib file if we build a DLL.
4882 michael 945 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4883 michael 912 # FIXME: Should let the user specify the lib program.
4884 michael 945 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4885     _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4886     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4887 michael 912 ;;
4888    
4889     darwin* | rhapsody*)
4890 michael 945 _LT_DARWIN_LINKER_FEATURES($1)
4891 michael 912 ;;
4892    
4893     dgux*)
4894 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4895     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4896     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4897 michael 912 ;;
4898    
4899     freebsd1*)
4900 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
4901 michael 912 ;;
4902    
4903     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4904     # support. Future versions do this automatically, but an explicit c++rt0.o
4905     # does not break anything, and helps significantly (at the cost of a little
4906     # extra space).
4907     freebsd2.2*)
4908 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4909     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4910     _LT_TAGVAR(hardcode_direct, $1)=yes
4911     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4912 michael 912 ;;
4913    
4914     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4915     freebsd2*)
4916 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4917     _LT_TAGVAR(hardcode_direct, $1)=yes
4918     _LT_TAGVAR(hardcode_minus_L, $1)=yes
4919     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4920 michael 912 ;;
4921    
4922     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4923     freebsd* | dragonfly*)
4924 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4925     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4926     _LT_TAGVAR(hardcode_direct, $1)=yes
4927     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4928 michael 912 ;;
4929    
4930     hpux9*)
4931     if test "$GCC" = yes; then
4932 michael 945 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4933 michael 912 else
4934 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'
4935 michael 912 fi
4936 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4937     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4938     _LT_TAGVAR(hardcode_direct, $1)=yes
4939 michael 912
4940     # hardcode_minus_L: Not really in the search PATH,
4941     # but as the default location of the library.
4942 michael 945 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4943     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4944 michael 912 ;;
4945    
4946     hpux10*)
4947 michael 1094 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
4948 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4949 michael 912 else
4950 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4951 michael 912 fi
4952     if test "$with_gnu_ld" = no; then
4953 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4954     _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4955     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4956     _LT_TAGVAR(hardcode_direct, $1)=yes
4957     _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4958     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4959 michael 912 # hardcode_minus_L: Not really in the search PATH,
4960     # but as the default location of the library.
4961 michael 945 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4962 michael 912 fi
4963     ;;
4964    
4965     hpux11*)
4966 michael 1094 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
4967 michael 912 case $host_cpu in
4968     hppa*64*)
4969 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4970 michael 912 ;;
4971     ia64*)
4972 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4973 michael 912 ;;
4974     *)
4975 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4976 michael 912 ;;
4977     esac
4978     else
4979     case $host_cpu in
4980     hppa*64*)
4981 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4982 michael 912 ;;
4983     ia64*)
4984 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4985 michael 912 ;;
4986     *)
4987 michael 1094 m4_if($1, [], [
4988     # Older versions of the 11.00 compiler do not understand -b yet
4989     # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
4990     _LT_LINKER_OPTION([if $CC understands -b],
4991     _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
4992     [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
4993     [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
4994     [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
4995 michael 912 ;;
4996     esac
4997     fi
4998     if test "$with_gnu_ld" = no; then
4999 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5000     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5001 michael 912
5002     case $host_cpu in
5003     hppa*64*|ia64*)
5004 michael 945 _LT_TAGVAR(hardcode_direct, $1)=no
5005     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5006 michael 912 ;;
5007     *)
5008 michael 945 _LT_TAGVAR(hardcode_direct, $1)=yes
5009     _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5010     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5011 michael 912
5012     # hardcode_minus_L: Not really in the search PATH,
5013     # but as the default location of the library.
5014 michael 945 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5015 michael 912 ;;
5016     esac
5017     fi
5018     ;;
5019    
5020     irix5* | irix6* | nonstopux*)
5021     if test "$GCC" = yes; then
5022 michael 1094 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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'
5023 michael 945 # Try to use the -exported_symbol ld option, if it does not
5024     # work, assume that -exports_file does not work either and
5025     # implicitly export all symbols.
5026     save_LDFLAGS="$LDFLAGS"
5027     LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5028     AC_LINK_IFELSE(int foo(void) {},
5029 michael 1094 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $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'
5030 michael 945 )
5031     LDFLAGS="$save_LDFLAGS"
5032 michael 912 else
5033 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'
5034     _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'
5035 michael 912 fi
5036 michael 945 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5037     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5038     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5039     _LT_TAGVAR(inherit_rpath, $1)=yes
5040     _LT_TAGVAR(link_all_deplibs, $1)=yes
5041 michael 912 ;;
5042    
5043     netbsd*)
5044 michael 945 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5045     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5046 michael 912 else
5047 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5048 michael 912 fi
5049 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5050     _LT_TAGVAR(hardcode_direct, $1)=yes
5051     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5052 michael 912 ;;
5053    
5054     newsos6)
5055 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5056     _LT_TAGVAR(hardcode_direct, $1)=yes
5057     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5058     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5059     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5060 michael 912 ;;
5061    
5062 michael 945 *nto* | *qnx*)
5063     ;;
5064    
5065 michael 912 openbsd*)
5066     if test -f /usr/libexec/ld.so; then
5067 michael 945 _LT_TAGVAR(hardcode_direct, $1)=yes
5068     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5069     _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5070     if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5071     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5072     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5073     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5074     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5075 michael 912 else
5076     case $host_os in
5077     openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5078 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5079     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5080 michael 912 ;;
5081     *)
5082 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5083     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5084 michael 912 ;;
5085     esac
5086 michael 945 fi
5087 michael 912 else
5088 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
5089 michael 912 fi
5090     ;;
5091    
5092     os2*)
5093 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5094     _LT_TAGVAR(hardcode_minus_L, $1)=yes
5095     _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5096 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'
5097 michael 945 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5098 michael 912 ;;
5099    
5100     osf3*)
5101     if test "$GCC" = yes; then
5102 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5103 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'
5104 michael 912 else
5105 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5106 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'
5107 michael 912 fi
5108 michael 945 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5109     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5110     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5111 michael 912 ;;
5112    
5113     osf4* | osf5*) # as osf3* with the addition of -msym flag
5114     if test "$GCC" = yes; then
5115 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5116 michael 1094 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_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'
5117 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5118 michael 912 else
5119 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5120 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'
5121 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~
5122 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'
5123 michael 912
5124     # Both c and cxx compiler support -rpath directly
5125 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5126 michael 912 fi
5127 michael 945 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5128     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5129 michael 912 ;;
5130    
5131     solaris*)
5132 michael 945 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5133 michael 912 if test "$GCC" = yes; then
5134     wlarc='${wl}'
5135 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5136     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5137     $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5138 michael 912 else
5139 michael 945 case `$CC -V 2>&1` in
5140     *"Compilers 5.0"*)
5141     wlarc=''
5142     _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5143     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5144     $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5145     ;;
5146     *)
5147     wlarc='${wl}'
5148     _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5149     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5150     $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5151     ;;
5152     esac
5153 michael 912 fi
5154 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5155     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5156 michael 912 case $host_os in
5157     solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5158     *)
5159     # The compiler driver will combine and reorder linker options,
5160     # but understands `-z linker_flag'. GCC discards it without `$wl',
5161     # but is careful enough not to reorder.
5162 michael 945 # Supported since Solaris 2.6 (maybe 2.5.1?)
5163 michael 912 if test "$GCC" = yes; then
5164 michael 945 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5165 michael 912 else
5166 michael 945 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5167 michael 912 fi
5168     ;;
5169     esac
5170 michael 945 _LT_TAGVAR(link_all_deplibs, $1)=yes
5171 michael 912 ;;
5172    
5173     sunos4*)
5174     if test "x$host_vendor" = xsequent; then
5175     # Use $CC to link under sequent, because it throws in some extra .o
5176     # files that make .init and .fini sections work.
5177 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5178 michael 912 else
5179 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5180 michael 912 fi
5181 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5182     _LT_TAGVAR(hardcode_direct, $1)=yes
5183     _LT_TAGVAR(hardcode_minus_L, $1)=yes
5184     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5185 michael 912 ;;
5186    
5187     sysv4)
5188     case $host_vendor in
5189     sni)
5190 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5191     _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5192 michael 912 ;;
5193     siemens)
5194     ## LD is ld it makes a PLAMLIB
5195     ## CC just makes a GrossModule.
5196 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5197     _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5198     _LT_TAGVAR(hardcode_direct, $1)=no
5199 michael 912 ;;
5200     motorola)
5201 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5202     _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5203 michael 912 ;;
5204     esac
5205     runpath_var='LD_RUN_PATH'
5206 michael 945 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5207 michael 912 ;;
5208    
5209     sysv4.3*)
5210 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5211     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5212     _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5213 michael 912 ;;
5214    
5215     sysv4*MP*)
5216     if test -d /usr/nec; then
5217 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5218     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5219 michael 912 runpath_var=LD_RUN_PATH
5220     hardcode_runpath_var=yes
5221 michael 945 _LT_TAGVAR(ld_shlibs, $1)=yes
5222 michael 912 fi
5223     ;;
5224    
5225     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5226 michael 945 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5227     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5228     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5229 michael 912 runpath_var='LD_RUN_PATH'
5230    
5231     if test "$GCC" = yes; then
5232 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5233     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5234 michael 912 else
5235 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5236     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5237 michael 912 fi
5238     ;;
5239    
5240     sysv5* | sco3.2v5* | sco5v6*)
5241     # Note: We can NOT use -z defs as we might desire, because we do not
5242     # link with -lc, and that would cause any symbols used from libc to
5243     # always be unresolved, which means just about no library would
5244     # ever link correctly. If we're not using GNU ld we use -z text
5245     # though, which does catch some bad symbols but isn't as heavy-handed
5246     # as -z defs.
5247 michael 945 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5248     _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5249     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5250     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5251     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5252     _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5253     _LT_TAGVAR(link_all_deplibs, $1)=yes
5254     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5255 michael 912 runpath_var='LD_RUN_PATH'
5256    
5257     if test "$GCC" = yes; then
5258 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5259     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5260 michael 912 else
5261 michael 945 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5262     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5263 michael 912 fi
5264     ;;
5265    
5266     uts4*)
5267 michael 945 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5268     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5269     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5270 michael 912 ;;
5271    
5272     *)
5273 michael 945 _LT_TAGVAR(ld_shlibs, $1)=no
5274 michael 912 ;;
5275     esac
5276 michael 945
5277     if test x$host_vendor = xsni; then
5278     case $host in
5279     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5280     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5281     ;;
5282     esac
5283     fi
5284 michael 912 fi
5285     ])
5286 michael 945 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5287     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5288 michael 912
5289 michael 945 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5290    
5291     _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5292     _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5293     _LT_DECL([], [extract_expsyms_cmds], [2],
5294     [The commands to extract the exported symbol list from a shared archive])
5295    
5296 michael 912 #
5297     # Do we need to explicitly link libc?
5298     #
5299 michael 945 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5300 michael 912 x|xyes)
5301     # Assume -lc should be added
5302 michael 945 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5303 michael 912
5304     if test "$enable_shared" = yes && test "$GCC" = yes; then
5305 michael 945 case $_LT_TAGVAR(archive_cmds, $1) in
5306 michael 912 *'~'*)
5307     # FIXME: we may have to deal with multi-command sequences.
5308     ;;
5309     '$CC '*)
5310     # Test whether the compiler implicitly links with -lc since on some
5311     # systems, -lgcc has to come before -lc. If gcc already passes -lc
5312     # to ld, don't add -lc before -lgcc.
5313 michael 1094 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5314     [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5315     [$RM conftest*
5316     echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5317 michael 912
5318 michael 1094 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5319     soname=conftest
5320     lib=conftest
5321     libobjs=conftest.$ac_objext
5322     deplibs=
5323     wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5324     pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5325     compiler_flags=-v
5326     linker_flags=-v
5327     verstring=
5328     output_objdir=.
5329     libname=conftest
5330     lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5331     _LT_TAGVAR(allow_undefined_flag, $1)=
5332     if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5333     then
5334     lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5335     else
5336     lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5337     fi
5338     _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5339     else
5340     cat conftest.err 1>&5
5341     fi
5342     $RM conftest*
5343     ])
5344     _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5345 michael 912 ;;
5346     esac
5347     fi
5348     ;;
5349     esac
5350    
5351 michael 945 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5352     [Whether or not to add -lc for building shared libraries])
5353     _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5354     [enable_shared_with_static_runtimes], [0],
5355     [Whether or not to disallow shared libs when runtime libs are static])
5356     _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5357     [Compiler flag to allow reflexive dlopens])
5358     _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5359     [Compiler flag to generate shared objects directly from archives])
5360     _LT_TAGDECL([], [compiler_needs_object], [1],
5361     [Whether the compiler copes with passing no objects directly])
5362     _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5363     [Create an old-style archive from a shared archive])
5364     _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5365     [Create a temporary old-style archive to link instead of a shared archive])
5366     _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5367     _LT_TAGDECL([], [archive_expsym_cmds], [2])
5368     _LT_TAGDECL([], [module_cmds], [2],
5369     [Commands used to build a loadable module if different from building
5370     a shared archive.])
5371     _LT_TAGDECL([], [module_expsym_cmds], [2])
5372     _LT_TAGDECL([], [with_gnu_ld], [1],
5373     [Whether we are building with GNU ld or not])
5374     _LT_TAGDECL([], [allow_undefined_flag], [1],
5375     [Flag that allows shared libraries with undefined symbols to be built])
5376     _LT_TAGDECL([], [no_undefined_flag], [1],
5377     [Flag that enforces no undefined symbols])
5378     _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5379     [Flag to hardcode $libdir into a binary during linking.
5380     This must work even if $libdir does not exist])
5381     _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5382     [[If ld is used when linking, flag to hardcode $libdir into a binary
5383     during linking. This must work even if $libdir does not exist]])
5384     _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5385     [Whether we need a single "-rpath" flag with a separated argument])
5386     _LT_TAGDECL([], [hardcode_direct], [0],
5387     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5388     DIR into the resulting binary])
5389     _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5390     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5391     DIR into the resulting binary and the resulting library dependency is
5392     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5393     library is relocated])
5394     _LT_TAGDECL([], [hardcode_minus_L], [0],
5395     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5396     into the resulting binary])
5397     _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5398     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5399     into the resulting binary])
5400     _LT_TAGDECL([], [hardcode_automatic], [0],
5401     [Set to "yes" if building a shared library automatically hardcodes DIR
5402     into the library and all subsequent libraries and executables linked
5403     against it])
5404     _LT_TAGDECL([], [inherit_rpath], [0],
5405     [Set to yes if linker adds runtime paths of dependent libraries
5406     to runtime path list])
5407     _LT_TAGDECL([], [link_all_deplibs], [0],
5408     [Whether libtool must link a program against all its dependency libraries])
5409     _LT_TAGDECL([], [fix_srcfile_path], [1],
5410     [Fix the shell variable $srcfile for the compiler])
5411     _LT_TAGDECL([], [always_export_symbols], [0],
5412     [Set to "yes" if exported symbols are required])
5413     _LT_TAGDECL([], [export_symbols_cmds], [2],
5414     [The commands to list exported symbols])
5415     _LT_TAGDECL([], [exclude_expsyms], [1],
5416     [Symbols that should not be listed in the preloaded symbols])
5417     _LT_TAGDECL([], [include_expsyms], [1],
5418     [Symbols that must always be exported])
5419     _LT_TAGDECL([], [prelink_cmds], [2],
5420     [Commands necessary for linking programs (against libraries) with templates])
5421     _LT_TAGDECL([], [file_list_spec], [1],
5422     [Specify filename containing input files])
5423     dnl FIXME: Not yet implemented
5424     dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5425     dnl [Compiler flag to generate thread safe objects])
5426     ])# _LT_LINKER_SHLIBS
5427 michael 912
5428    
5429 michael 945 # _LT_LANG_C_CONFIG([TAG])
5430     # ------------------------
5431     # Ensure that the configuration variables for a C compiler are suitably
5432     # defined. These variables are subsequently used by _LT_CONFIG to write
5433     # the compiler configuration to `libtool'.
5434     m4_defun([_LT_LANG_C_CONFIG],
5435     [m4_require([_LT_DECL_EGREP])dnl
5436     lt_save_CC="$CC"
5437     AC_LANG_PUSH(C)
5438 michael 912
5439 michael 945 # Source file extension for C test sources.
5440     ac_ext=c
5441 michael 912
5442 michael 945 # Object file extension for compiled C test sources.
5443     objext=o
5444     _LT_TAGVAR(objext, $1)=$objext
5445 michael 912
5446 michael 945 # Code to be used in simple compile tests
5447     lt_simple_compile_test_code="int some_variable = 0;"
5448 michael 912
5449 michael 945 # Code to be used in simple link tests
5450     lt_simple_link_test_code='int main(){return(0);}'
5451 michael 912
5452 michael 945 _LT_TAG_COMPILER
5453     # Save the default compiler, since it gets overwritten when the other
5454     # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5455     compiler_DEFAULT=$CC
5456 michael 912
5457 michael 945 # save warnings/boilerplate of simple test code
5458     _LT_COMPILER_BOILERPLATE
5459     _LT_LINKER_BOILERPLATE
5460    
5461     if test -n "$compiler"; then
5462     _LT_COMPILER_NO_RTTI($1)
5463     _LT_COMPILER_PIC($1)
5464     _LT_COMPILER_C_O($1)
5465     _LT_COMPILER_FILE_LOCKS($1)
5466     _LT_LINKER_SHLIBS($1)
5467     _LT_SYS_DYNAMIC_LINKER($1)
5468     _LT_LINKER_HARDCODE_LIBPATH($1)
5469     LT_SYS_DLOPEN_SELF
5470     _LT_CMD_STRIPLIB
5471    
5472     # Report which library types will actually be built
5473     AC_MSG_CHECKING([if libtool supports shared libraries])
5474     AC_MSG_RESULT([$can_build_shared])
5475    
5476     AC_MSG_CHECKING([whether to build shared libraries])
5477     test "$can_build_shared" = "no" && enable_shared=no
5478    
5479     # On AIX, shared libraries and static libraries use the same namespace, and
5480     # are all built from PIC.
5481     case $host_os in
5482     aix3*)
5483     test "$enable_shared" = yes && enable_static=no
5484     if test -n "$RANLIB"; then
5485     archive_cmds="$archive_cmds~\$RANLIB \$lib"
5486     postinstall_cmds='$RANLIB $lib'
5487     fi
5488     ;;
5489    
5490     aix[[4-9]]*)
5491     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5492     test "$enable_shared" = yes && enable_static=no
5493     fi
5494     ;;
5495     esac
5496     AC_MSG_RESULT([$enable_shared])
5497    
5498     AC_MSG_CHECKING([whether to build static libraries])
5499     # Make sure either enable_shared or enable_static is yes.
5500     test "$enable_shared" = yes || enable_static=yes
5501     AC_MSG_RESULT([$enable_static])
5502    
5503     _LT_CONFIG($1)
5504     fi
5505     AC_LANG_POP
5506     CC="$lt_save_CC"
5507     ])# _LT_LANG_C_CONFIG
5508    
5509    
5510 michael 1094 # _LT_LANG_CXX_CONFIG([TAG])
5511     # --------------------------
5512     # Ensure that the configuration variables for a C++ compiler are suitably
5513     # defined. These variables are subsequently used by _LT_CONFIG to write
5514     # the compiler configuration to `libtool'.
5515     m4_defun([_LT_LANG_CXX_CONFIG],
5516     [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5517     m4_require([_LT_DECL_EGREP])dnl
5518 michael 945 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5519     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5520     (test "X$CXX" != "Xg++"))) ; then
5521     AC_PROG_CXXCPP
5522     else
5523     _lt_caught_CXX_error=yes
5524     fi
5525    
5526     AC_LANG_PUSH(C++)
5527     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5528     _LT_TAGVAR(allow_undefined_flag, $1)=
5529     _LT_TAGVAR(always_export_symbols, $1)=no
5530     _LT_TAGVAR(archive_expsym_cmds, $1)=
5531     _LT_TAGVAR(compiler_needs_object, $1)=no
5532     _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5533     _LT_TAGVAR(hardcode_direct, $1)=no
5534     _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5535     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5536     _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5537     _LT_TAGVAR(hardcode_libdir_separator, $1)=
5538     _LT_TAGVAR(hardcode_minus_L, $1)=no
5539     _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5540     _LT_TAGVAR(hardcode_automatic, $1)=no
5541     _LT_TAGVAR(inherit_rpath, $1)=no
5542     _LT_TAGVAR(module_cmds, $1)=
5543     _LT_TAGVAR(module_expsym_cmds, $1)=
5544     _LT_TAGVAR(link_all_deplibs, $1)=unknown
5545     _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5546 michael 1094 _LT_TAGVAR(reload_flag, $1)=$reload_flag
5547     _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5548 michael 945 _LT_TAGVAR(no_undefined_flag, $1)=
5549     _LT_TAGVAR(whole_archive_flag_spec, $1)=
5550     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5551    
5552     # Source file extension for C++ test sources.
5553     ac_ext=cpp
5554    
5555     # Object file extension for compiled C++ test sources.
5556     objext=o
5557     _LT_TAGVAR(objext, $1)=$objext
5558    
5559     # No sense in running all these tests if we already determined that
5560     # the CXX compiler isn't working. Some variables (like enable_shared)
5561     # are currently assumed to apply to all compilers on this platform,
5562     # and will be corrupted by setting them based on a non-working compiler.
5563     if test "$_lt_caught_CXX_error" != yes; then
5564     # Code to be used in simple compile tests
5565     lt_simple_compile_test_code="int some_variable = 0;"
5566    
5567     # Code to be used in simple link tests
5568     lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5569    
5570     # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5571     _LT_TAG_COMPILER
5572    
5573     # save warnings/boilerplate of simple test code
5574     _LT_COMPILER_BOILERPLATE
5575     _LT_LINKER_BOILERPLATE
5576    
5577     # Allow CC to be a program name with arguments.
5578     lt_save_CC=$CC
5579     lt_save_LD=$LD
5580     lt_save_GCC=$GCC
5581     GCC=$GXX
5582     lt_save_with_gnu_ld=$with_gnu_ld
5583     lt_save_path_LD=$lt_cv_path_LD
5584     if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5585     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5586     else
5587     $as_unset lt_cv_prog_gnu_ld
5588     fi
5589     if test -n "${lt_cv_path_LDCXX+set}"; then
5590     lt_cv_path_LD=$lt_cv_path_LDCXX
5591     else
5592     $as_unset lt_cv_path_LD
5593     fi
5594     test -z "${LDCXX+set}" || LD=$LDCXX
5595     CC=${CXX-"c++"}
5596     compiler=$CC
5597     _LT_TAGVAR(compiler, $1)=$CC
5598     _LT_CC_BASENAME([$compiler])
5599    
5600     if test -n "$compiler"; then
5601     # We don't want -fno-exception when compiling C++ code, so set the
5602     # no_builtin_flag separately
5603     if test "$GXX" = yes; then
5604     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5605     else
5606     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5607     fi
5608    
5609     if test "$GXX" = yes; then
5610     # Set up default GNU C++ configuration
5611    
5612     LT_PATH_LD
5613    
5614     # Check if GNU C++ uses GNU ld as the underlying linker, since the
5615     # archiving commands below assume that GNU ld is being used.
5616     if test "$with_gnu_ld" = yes; then
5617     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5618     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5619    
5620     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5621     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5622    
5623     # If archive_cmds runs LD, not CC, wlarc should be empty
5624     # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5625     # investigate it a little bit more. (MM)
5626     wlarc='${wl}'
5627    
5628     # ancient GNU ld didn't support --whole-archive et. al.
5629     if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5630     $GREP 'no-whole-archive' > /dev/null; then
5631     _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5632     else
5633     _LT_TAGVAR(whole_archive_flag_spec, $1)=
5634     fi
5635     else
5636     with_gnu_ld=no
5637     wlarc=
5638    
5639     # A generic and very simple default shared library creation
5640     # command for GNU C++ for the case where it uses the native
5641     # linker, instead of GNU ld. If possible, this setting should
5642     # overridden to take advantage of the native linker features on
5643     # the platform it is being used on.
5644     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5645     fi
5646    
5647     # Commands to make compiler produce verbose output that lists
5648     # what "hidden" libraries, object files and flags are used when
5649     # linking a shared library.
5650 michael 1094 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
5651 michael 945
5652     else
5653     GXX=no
5654     with_gnu_ld=no
5655     wlarc=
5656     fi
5657    
5658     # PORTME: fill in a description of your system's C++ link characteristics
5659     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5660     _LT_TAGVAR(ld_shlibs, $1)=yes
5661     case $host_os in
5662     aix3*)
5663     # FIXME: insert proper C++ library support
5664     _LT_TAGVAR(ld_shlibs, $1)=no
5665     ;;
5666     aix[[4-9]]*)
5667     if test "$host_cpu" = ia64; then
5668     # On IA64, the linker does run time linking by default, so we don't
5669     # have to do anything special.
5670     aix_use_runtimelinking=no
5671     exp_sym_flag='-Bexport'
5672     no_entry_flag=""
5673     else
5674     aix_use_runtimelinking=no
5675    
5676     # Test if we are trying to use run time linking or normal
5677     # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5678     # need to do runtime linking.
5679     case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5680     for ld_flag in $LDFLAGS; do
5681     case $ld_flag in
5682     *-brtl*)
5683     aix_use_runtimelinking=yes
5684     break
5685     ;;
5686     esac
5687     done
5688     ;;
5689     esac
5690    
5691     exp_sym_flag='-bexport'
5692     no_entry_flag='-bnoentry'
5693     fi
5694    
5695     # When large executables or shared objects are built, AIX ld can
5696     # have problems creating the table of contents. If linking a library
5697     # or program results in "error TOC overflow" add -mminimal-toc to
5698     # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5699     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5700    
5701     _LT_TAGVAR(archive_cmds, $1)=''
5702     _LT_TAGVAR(hardcode_direct, $1)=yes
5703     _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5704     _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5705     _LT_TAGVAR(link_all_deplibs, $1)=yes
5706     _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5707    
5708     if test "$GXX" = yes; then
5709     case $host_os in aix4.[[012]]|aix4.[[012]].*)
5710     # We only want to do this on AIX 4.2 and lower, the check
5711     # below for broken collect2 doesn't work under 4.3+
5712     collect2name=`${CC} -print-prog-name=collect2`
5713     if test -f "$collect2name" &&
5714     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5715     then
5716     # We have reworked collect2
5717     :
5718     else
5719     # We have old collect2
5720     _LT_TAGVAR(hardcode_direct, $1)=unsupported
5721     # It fails to find uninstalled libraries when the uninstalled
5722     # path is not listed in the libpath. Setting hardcode_minus_L
5723     # to unsupported forces relinking
5724     _LT_TAGVAR(hardcode_minus_L, $1)=yes
5725     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5726     _LT_TAGVAR(hardcode_libdir_separator, $1)=
5727     fi
5728     esac
5729     shared_flag='-shared'
5730     if test "$aix_use_runtimelinking" = yes; then
5731     shared_flag="$shared_flag "'${wl}-G'
5732     fi
5733     else
5734     # not using gcc
5735     if test "$host_cpu" = ia64; then
5736     # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5737     # chokes on -Wl,-G. The following line is correct:
5738     shared_flag='-G'
5739     else
5740     if test "$aix_use_runtimelinking" = yes; then
5741     shared_flag='${wl}-G'
5742     else
5743     shared_flag='${wl}-bM:SRE'
5744     fi
5745     fi
5746     fi
5747    
5748     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5749     # It seems that -bexpall does not export symbols beginning with
5750     # underscore (_), so it is better to generate a list of symbols to
5751     # export.
5752     _LT_TAGVAR(always_export_symbols, $1)=yes
5753     if test "$aix_use_runtimelinking" = yes; then
5754     # Warning - without using the other runtime loading flags (-brtl),
5755     # -berok will link without error, but may produce a broken library.
5756     _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5757     # Determine the default libpath from the value encoded in an empty
5758     # executable.
5759     _LT_SYS_MODULE_PATH_AIX
5760     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5761    
5762 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"
5763 michael 945 else
5764     if test "$host_cpu" = ia64; then
5765     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5766     _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5767     _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"
5768     else
5769     # Determine the default libpath from the value encoded in an
5770     # empty executable.
5771     _LT_SYS_MODULE_PATH_AIX
5772     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5773     # Warning - without using the other run time loading flags,
5774     # -berok will link without error, but may produce a broken library.
5775     _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5776     _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5777 michael 1094 if test "$with_gnu_ld" = yes; then
5778     # We only use this code for GNU lds that support --whole-archive.
5779     _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5780     else
5781     # Exported symbols can be pulled into shared objects from archives
5782     _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5783     fi
5784 michael 945 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5785     # This is similar to how AIX traditionally builds its shared
5786     # libraries.
5787     _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'
5788     fi
5789     fi
5790     ;;
5791    
5792     beos*)
5793     if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5794     _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5795     # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5796     # support --undefined. This deserves some investigation. FIXME
5797     _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5798     else
5799     _LT_TAGVAR(ld_shlibs, $1)=no
5800     fi
5801     ;;
5802    
5803     chorus*)
5804     case $cc_basename in
5805     *)
5806     # FIXME: insert proper C++ library support
5807     _LT_TAGVAR(ld_shlibs, $1)=no
5808     ;;
5809     esac
5810     ;;
5811    
5812     cygwin* | mingw* | pw32* | cegcc*)
5813     # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5814     # as there is no search path for DLLs.
5815     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5816 michael 1094 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5817 michael 945 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5818     _LT_TAGVAR(always_export_symbols, $1)=no
5819     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5820    
5821     if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5822     _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'
5823     # If the export-symbols file already is a .def file (1st line
5824     # is EXPORTS), use it as is; otherwise, prepend...
5825     _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5826     cp $export_symbols $output_objdir/$soname.def;
5827     else
5828     echo EXPORTS > $output_objdir/$soname.def;
5829     cat $export_symbols >> $output_objdir/$soname.def;
5830     fi~
5831     $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'
5832     else
5833     _LT_TAGVAR(ld_shlibs, $1)=no
5834     fi
5835     ;;
5836     darwin* | rhapsody*)
5837     _LT_DARWIN_LINKER_FEATURES($1)
5838     ;;
5839    
5840     dgux*)
5841     case $cc_basename in
5842     ec++*)
5843     # FIXME: insert proper C++ library support
5844     _LT_TAGVAR(ld_shlibs, $1)=no
5845     ;;
5846     ghcx*)
5847     # Green Hills C++ Compiler
5848     # FIXME: insert proper C++ library support
5849     _LT_TAGVAR(ld_shlibs, $1)=no
5850     ;;
5851     *)
5852     # FIXME: insert proper C++ library support
5853     _LT_TAGVAR(ld_shlibs, $1)=no
5854     ;;
5855     esac
5856     ;;
5857    
5858     freebsd[[12]]*)
5859     # C++ shared libraries reported to be fairly broken before
5860     # switch to ELF
5861     _LT_TAGVAR(ld_shlibs, $1)=no
5862     ;;
5863    
5864     freebsd-elf*)
5865     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5866     ;;
5867    
5868     freebsd* | dragonfly*)
5869     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5870     # conventions
5871     _LT_TAGVAR(ld_shlibs, $1)=yes
5872     ;;
5873    
5874     gnu*)
5875     ;;
5876    
5877 michael 1094 haiku*)
5878     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5879     _LT_TAGVAR(link_all_deplibs, $1)=yes
5880     ;;
5881    
5882 michael 945 hpux9*)
5883     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5884     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5885     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5886     _LT_TAGVAR(hardcode_direct, $1)=yes
5887     _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5888     # but as the default
5889     # location of the library.
5890    
5891     case $cc_basename in
5892     CC*)
5893     # FIXME: insert proper C++ library support
5894     _LT_TAGVAR(ld_shlibs, $1)=no
5895     ;;
5896     aCC*)
5897     _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'
5898     # Commands to make compiler produce verbose output that lists
5899     # what "hidden" libraries, object files and flags are used when
5900     # linking a shared library.
5901     #
5902     # There doesn't appear to be a way to prevent this compiler from
5903     # explicitly linking system object files so we need to strip them
5904     # from the output so that they don't get included in the library
5905     # dependencies.
5906 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"'
5907 michael 945 ;;
5908     *)
5909     if test "$GXX" = yes; then
5910     _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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'
5911     else
5912     # FIXME: insert proper C++ library support
5913     _LT_TAGVAR(ld_shlibs, $1)=no
5914     fi
5915     ;;
5916     esac
5917     ;;
5918    
5919     hpux10*|hpux11*)
5920     if test $with_gnu_ld = no; then
5921     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5922     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5923    
5924     case $host_cpu in
5925     hppa*64*|ia64*)
5926     ;;
5927     *)
5928     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5929     ;;
5930     esac
5931     fi
5932     case $host_cpu in
5933     hppa*64*|ia64*)
5934     _LT_TAGVAR(hardcode_direct, $1)=no
5935     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5936     ;;
5937     *)
5938     _LT_TAGVAR(hardcode_direct, $1)=yes
5939     _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5940     _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5941     # but as the default
5942     # location of the library.
5943     ;;
5944     esac
5945    
5946     case $cc_basename in
5947     CC*)
5948     # FIXME: insert proper C++ library support
5949     _LT_TAGVAR(ld_shlibs, $1)=no
5950     ;;
5951     aCC*)
5952     case $host_cpu in
5953     hppa*64*)
5954     _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5955     ;;
5956     ia64*)
5957     _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5958     ;;
5959     *)
5960     _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'
5961     ;;
5962     esac
5963     # Commands to make compiler produce verbose output that lists
5964     # what "hidden" libraries, object files and flags are used when
5965     # linking a shared library.
5966     #
5967     # There doesn't appear to be a way to prevent this compiler from
5968     # explicitly linking system object files so we need to strip them
5969     # from the output so that they don't get included in the library
5970     # dependencies.
5971 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"'
5972 michael 945 ;;
5973     *)
5974     if test "$GXX" = yes; then
5975     if test $with_gnu_ld = no; then
5976     case $host_cpu in
5977     hppa*64*)
5978     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5979     ;;
5980     ia64*)
5981     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5982     ;;
5983     *)
5984     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5985     ;;
5986     esac
5987     fi
5988     else
5989     # FIXME: insert proper C++ library support
5990     _LT_TAGVAR(ld_shlibs, $1)=no
5991     fi
5992     ;;
5993     esac
5994     ;;
5995    
5996     interix[[3-9]]*)
5997     _LT_TAGVAR(hardcode_direct, $1)=no
5998     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5999     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6000     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6001     # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6002     # Instead, shared libraries are loaded at an image base (0x10000000 by
6003     # default) and relocated if they conflict, which is a slow very memory
6004     # consuming and fragmenting process. To avoid this, we pick a random,
6005     # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6006     # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6007     _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'
6008     _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'
6009     ;;
6010     irix5* | irix6*)
6011     case $cc_basename in
6012     CC*)
6013     # SGI C++
6014 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'
6015 michael 945
6016     # Archives containing C++ object files must be created using
6017     # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6018     # necessary to make sure instantiated templates are included
6019     # in the archive.
6020     _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6021     ;;
6022     *)
6023     if test "$GXX" = yes; then
6024     if test "$with_gnu_ld" = no; then
6025 michael 1094 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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'
6026 michael 945 else
6027 michael 1094 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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'
6028 michael 945 fi
6029     fi
6030     _LT_TAGVAR(link_all_deplibs, $1)=yes
6031     ;;
6032     esac
6033     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6034     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6035     _LT_TAGVAR(inherit_rpath, $1)=yes
6036     ;;
6037    
6038 michael 1094 linux* | k*bsd*-gnu | kopensolaris*-gnu)
6039 michael 945 case $cc_basename in
6040     KCC*)
6041     # Kuck and Associates, Inc. (KAI) C++ Compiler
6042    
6043     # KCC will only create a shared library if the output file
6044     # ends with ".so" (or ".sl" for HP-UX), so rename the library
6045     # to its proper name (with version) after linking.
6046     _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'
6047     _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'
6048     # Commands to make compiler produce verbose output that lists
6049     # what "hidden" libraries, object files and flags are used when
6050     # linking a shared library.
6051     #
6052     # There doesn't appear to be a way to prevent this compiler from
6053     # explicitly linking system object files so we need to strip them
6054     # from the output so that they don't get included in the library
6055     # dependencies.
6056 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"'
6057 michael 945
6058     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6059     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6060    
6061     # Archives containing C++ object files must be created using
6062     # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6063     _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6064     ;;
6065     icpc* | ecpc* )
6066     # Intel C++
6067     with_gnu_ld=yes
6068     # version 8.0 and above of icpc choke on multiply defined symbols
6069     # if we add $predep_objects and $postdep_objects, however 7.1 and
6070     # earlier do not add the objects themselves.
6071     case `$CC -V 2>&1` in
6072     *"Version 7."*)
6073     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6074     _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'
6075     ;;
6076     *) # Version 8.0 or newer
6077     tmp_idyn=
6078     case $host_cpu in
6079     ia64*) tmp_idyn=' -i_dynamic';;
6080     esac
6081     _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6082     _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'
6083     ;;
6084     esac
6085     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6086     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6087     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6088     _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6089     ;;
6090     pgCC* | pgcpp*)
6091     # Portland Group C++ compiler
6092     case `$CC -V` in
6093 michael 1094 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6094 michael 945 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6095     rm -rf $tpldir~
6096     $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6097 michael 1094 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6098 michael 945 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6099     rm -rf $tpldir~
6100     $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6101 michael 1094 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6102 michael 945 $RANLIB $oldlib'
6103     _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6104     rm -rf $tpldir~
6105     $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6106 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'
6107 michael 945 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6108     rm -rf $tpldir~
6109     $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6110 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'
6111 michael 945 ;;
6112 michael 1094 *) # Version 6 and above use weak symbols
6113 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'
6114     _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'
6115     ;;
6116     esac
6117    
6118     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6119     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6120 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'
6121 michael 945 ;;
6122     cxx*)
6123     # Compaq C++
6124     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6125     _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'
6126    
6127     runpath_var=LD_RUN_PATH
6128     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6129     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6130    
6131     # Commands to make compiler produce verbose output that lists
6132     # what "hidden" libraries, object files and flags are used when
6133     # linking a shared library.
6134     #
6135     # There doesn't appear to be a way to prevent this compiler from
6136     # explicitly linking system object files so we need to strip them
6137     # from the output so that they don't get included in the library
6138     # dependencies.
6139 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'
6140 michael 945 ;;
6141 michael 1094 xl* | mpixl* | bgxl*)
6142 michael 945 # IBM XL 8.0 on PPC, with GNU ld
6143     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6144     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6145     _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6146     if test "x$supports_anon_versioning" = xyes; then
6147     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6148     cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6149     echo "local: *; };" >> $output_objdir/$libname.ver~
6150     $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6151     fi
6152     ;;
6153     *)
6154     case `$CC -V 2>&1 | sed 5q` in
6155     *Sun\ C*)
6156     # Sun C++ 5.9
6157     _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6158     _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6159     _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'
6160     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6161 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'
6162 michael 945 _LT_TAGVAR(compiler_needs_object, $1)=yes
6163    
6164     # Not sure whether something based on
6165     # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6166     # would be better.
6167 michael 1094 output_verbose_link_cmd='func_echo_all'
6168 michael 945
6169     # Archives containing C++ object files must be created using
6170     # "CC -xar", where "CC" is the Sun C++ compiler. This is
6171     # necessary to make sure instantiated templates are included
6172     # in the archive.
6173     _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6174     ;;
6175     esac
6176     ;;
6177     esac
6178     ;;
6179    
6180     lynxos*)
6181     # FIXME: insert proper C++ library support
6182     _LT_TAGVAR(ld_shlibs, $1)=no
6183     ;;
6184    
6185     m88k*)
6186     # FIXME: insert proper C++ library support
6187     _LT_TAGVAR(ld_shlibs, $1)=no
6188     ;;
6189    
6190     mvs*)
6191     case $cc_basename in
6192     cxx*)
6193     # FIXME: insert proper C++ library support
6194     _LT_TAGVAR(ld_shlibs, $1)=no
6195     ;;
6196     *)
6197     # FIXME: insert proper C++ library support
6198     _LT_TAGVAR(ld_shlibs, $1)=no
6199     ;;
6200     esac
6201     ;;
6202    
6203     netbsd*)
6204     if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6205     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6206     wlarc=
6207     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6208     _LT_TAGVAR(hardcode_direct, $1)=yes
6209     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6210     fi
6211     # Workaround some broken pre-1.5 toolchains
6212     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6213     ;;
6214    
6215     *nto* | *qnx*)
6216     _LT_TAGVAR(ld_shlibs, $1)=yes
6217     ;;
6218    
6219     openbsd2*)
6220     # C++ shared libraries are fairly broken
6221     _LT_TAGVAR(ld_shlibs, $1)=no
6222     ;;
6223    
6224     openbsd*)
6225     if test -f /usr/libexec/ld.so; then
6226     _LT_TAGVAR(hardcode_direct, $1)=yes
6227     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6228     _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6229     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6230     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6231     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6232     _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'
6233     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6234     _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6235     fi
6236 michael 1094 output_verbose_link_cmd=func_echo_all
6237 michael 945 else
6238     _LT_TAGVAR(ld_shlibs, $1)=no
6239     fi
6240     ;;
6241    
6242     osf3* | osf4* | osf5*)
6243     case $cc_basename in
6244     KCC*)
6245     # Kuck and Associates, Inc. (KAI) C++ Compiler
6246    
6247     # KCC will only create a shared library if the output file
6248     # ends with ".so" (or ".sl" for HP-UX), so rename the library
6249     # to its proper name (with version) after linking.
6250     _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'
6251    
6252     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6253     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6254    
6255     # Archives containing C++ object files must be created using
6256     # the KAI C++ compiler.
6257     case $host in
6258     osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6259     *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6260     esac
6261     ;;
6262     RCC*)
6263     # Rational C++ 2.4.1
6264     # FIXME: insert proper C++ library support
6265     _LT_TAGVAR(ld_shlibs, $1)=no
6266     ;;
6267     cxx*)
6268     case $host in
6269     osf3*)
6270     _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6271 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'
6272 michael 945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6273     ;;
6274     *)
6275     _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6276 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'
6277 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~
6278     echo "-hidden">> $lib.exp~
6279 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~
6280 michael 945 $RM $lib.exp'
6281     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6282     ;;
6283     esac
6284    
6285     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6286    
6287     # Commands to make compiler produce verbose output that lists
6288     # what "hidden" libraries, object files and flags are used when
6289     # linking a shared library.
6290     #
6291     # There doesn't appear to be a way to prevent this compiler from
6292     # explicitly linking system object files so we need to strip them
6293     # from the output so that they don't get included in the library
6294     # dependencies.
6295 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"'
6296 michael 945 ;;
6297     *)
6298     if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6299     _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6300     case $host in
6301     osf3*)
6302 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'
6303 michael 945 ;;
6304     *)
6305 michael 1094 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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'
6306 michael 945 ;;
6307     esac
6308    
6309     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6310     _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6311    
6312     # Commands to make compiler produce verbose output that lists
6313     # what "hidden" libraries, object files and flags are used when
6314     # linking a shared library.
6315 michael 1094 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6316 michael 945
6317     else
6318     # FIXME: insert proper C++ library support
6319     _LT_TAGVAR(ld_shlibs, $1)=no
6320     fi
6321     ;;
6322     esac
6323     ;;
6324    
6325     psos*)
6326     # FIXME: insert proper C++ library support
6327     _LT_TAGVAR(ld_shlibs, $1)=no
6328     ;;
6329    
6330     sunos4*)
6331     case $cc_basename in
6332     CC*)
6333     # Sun C++ 4.x
6334     # FIXME: insert proper C++ library support
6335     _LT_TAGVAR(ld_shlibs, $1)=no
6336     ;;
6337     lcc*)
6338     # Lucid
6339     # FIXME: insert proper C++ library support
6340     _LT_TAGVAR(ld_shlibs, $1)=no
6341     ;;
6342     *)
6343     # FIXME: insert proper C++ library support
6344     _LT_TAGVAR(ld_shlibs, $1)=no
6345     ;;
6346     esac
6347     ;;
6348    
6349     solaris*)
6350     case $cc_basename in
6351 michael 1094 CC* | sunCC*)
6352 michael 945 # Sun C++ 4.2, 5.x and Centerline C++
6353     _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6354     _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6355     _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6356     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6357     $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'
6358    
6359     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6360     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6361     case $host_os in
6362     solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6363     *)
6364     # The compiler driver will combine and reorder linker options,
6365     # but understands `-z linker_flag'.
6366     # Supported since Solaris 2.6 (maybe 2.5.1?)
6367     _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6368     ;;
6369     esac
6370     _LT_TAGVAR(link_all_deplibs, $1)=yes
6371    
6372 michael 1094 output_verbose_link_cmd='func_echo_all'
6373 michael 945
6374     # Archives containing C++ object files must be created using
6375     # "CC -xar", where "CC" is the Sun C++ compiler. This is
6376     # necessary to make sure instantiated templates are included
6377     # in the archive.
6378     _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6379     ;;
6380     gcx*)
6381     # Green Hills C++ Compiler
6382     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6383    
6384     # The C++ compiler must be used to create the archive.
6385     _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6386     ;;
6387     *)
6388     # GNU C++ compiler with Solaris linker
6389     if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6390     _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6391     if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6392     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6393     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6394     $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6395    
6396     # Commands to make compiler produce verbose output that lists
6397     # what "hidden" libraries, object files and flags are used when
6398     # linking a shared library.
6399 michael 1094 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6400 michael 945 else
6401     # g++ 2.7 appears to require `-G' NOT `-shared' on this
6402     # platform.
6403     _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6404     _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6405     $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6406    
6407     # Commands to make compiler produce verbose output that lists
6408     # what "hidden" libraries, object files and flags are used when
6409     # linking a shared library.
6410 michael 1094 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6411 michael 945 fi
6412    
6413     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6414     case $host_os in
6415     solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6416     *)
6417     _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6418     ;;
6419     esac
6420     fi
6421     ;;
6422     esac
6423     ;;
6424    
6425     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6426     _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6427     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6428     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6429     runpath_var='LD_RUN_PATH'
6430    
6431     case $cc_basename in
6432     CC*)
6433     _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6434     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6435     ;;
6436     *)
6437     _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6438     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6439     ;;
6440     esac
6441     ;;
6442    
6443     sysv5* | sco3.2v5* | sco5v6*)
6444     # Note: We can NOT use -z defs as we might desire, because we do not
6445     # link with -lc, and that would cause any symbols used from libc to
6446     # always be unresolved, which means just about no library would
6447     # ever link correctly. If we're not using GNU ld we use -z text
6448     # though, which does catch some bad symbols but isn't as heavy-handed
6449     # as -z defs.
6450     _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6451     _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6452     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6453     _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6454     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6455     _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6456     _LT_TAGVAR(link_all_deplibs, $1)=yes
6457     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6458     runpath_var='LD_RUN_PATH'
6459    
6460     case $cc_basename in
6461     CC*)
6462     _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6463     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6464 michael 1094 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6465     '"$_LT_TAGVAR(old_archive_cmds, $1)"
6466     _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6467     '"$_LT_TAGVAR(reload_cmds, $1)"
6468 michael 945 ;;
6469     *)
6470     _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6471     _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6472     ;;
6473     esac
6474     ;;
6475    
6476     tandem*)
6477     case $cc_basename in
6478     NCC*)
6479     # NonStop-UX NCC 3.20
6480     # FIXME: insert proper C++ library support
6481     _LT_TAGVAR(ld_shlibs, $1)=no
6482     ;;
6483     *)
6484     # FIXME: insert proper C++ library support
6485     _LT_TAGVAR(ld_shlibs, $1)=no
6486     ;;
6487     esac
6488     ;;
6489    
6490     vxworks*)
6491     # FIXME: insert proper C++ library support
6492     _LT_TAGVAR(ld_shlibs, $1)=no
6493     ;;
6494    
6495     *)
6496     # FIXME: insert proper C++ library support
6497     _LT_TAGVAR(ld_shlibs, $1)=no
6498     ;;
6499     esac
6500    
6501     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6502     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6503    
6504     _LT_TAGVAR(GCC, $1)="$GXX"
6505     _LT_TAGVAR(LD, $1)="$LD"
6506    
6507     ## CAVEAT EMPTOR:
6508     ## There is no encapsulation within the following macros, do not change
6509     ## the running order or otherwise move them around unless you know exactly
6510     ## what you are doing...
6511     _LT_SYS_HIDDEN_LIBDEPS($1)
6512     _LT_COMPILER_PIC($1)
6513     _LT_COMPILER_C_O($1)
6514     _LT_COMPILER_FILE_LOCKS($1)
6515     _LT_LINKER_SHLIBS($1)
6516     _LT_SYS_DYNAMIC_LINKER($1)
6517     _LT_LINKER_HARDCODE_LIBPATH($1)
6518    
6519     _LT_CONFIG($1)
6520     fi # test -n "$compiler"
6521    
6522     CC=$lt_save_CC
6523     LDCXX=$LD
6524     LD=$lt_save_LD
6525     GCC=$lt_save_GCC
6526     with_gnu_ld=$lt_save_with_gnu_ld
6527     lt_cv_path_LDCXX=$lt_cv_path_LD
6528     lt_cv_path_LD=$lt_save_path_LD
6529     lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6530     lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6531     fi # test "$_lt_caught_CXX_error" != yes
6532    
6533     AC_LANG_POP
6534     ])# _LT_LANG_CXX_CONFIG
6535    
6536    
6537     # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6538     # ---------------------------------
6539     # Figure out "hidden" library dependencies from verbose
6540     # compiler output when linking a shared library.
6541     # Parse the compiler output and extract the necessary
6542     # objects, libraries and library flags.
6543     m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6544     [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6545     # Dependencies to place before and after the object being linked:
6546     _LT_TAGVAR(predep_objects, $1)=
6547     _LT_TAGVAR(postdep_objects, $1)=
6548     _LT_TAGVAR(predeps, $1)=
6549     _LT_TAGVAR(postdeps, $1)=
6550     _LT_TAGVAR(compiler_lib_search_path, $1)=
6551    
6552     dnl we can't use the lt_simple_compile_test_code here,
6553     dnl because it contains code intended for an executable,
6554     dnl not a library. It's possible we should let each
6555     dnl tag define a new lt_????_link_test_code variable,
6556     dnl but it's only used here...
6557     m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6558     int a;
6559     void foo (void) { a = 0; }
6560     _LT_EOF
6561     ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6562     class Foo
6563     {
6564     public:
6565     Foo (void) { a = 0; }
6566     private:
6567     int a;
6568     };
6569     _LT_EOF
6570     ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6571     subroutine foo
6572     implicit none
6573     integer*4 a
6574     a=0
6575     return
6576     end
6577     _LT_EOF
6578     ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6579     subroutine foo
6580     implicit none
6581     integer a
6582     a=0
6583     return
6584     end
6585     _LT_EOF
6586     ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6587     public class foo {
6588     private int a;
6589     public void bar (void) {
6590     a = 0;
6591     }
6592     };
6593     _LT_EOF
6594 michael 912 ])
6595 michael 945 dnl Parse the compiler output and extract the necessary
6596     dnl objects, libraries and library flags.
6597     if AC_TRY_EVAL(ac_compile); then
6598     # Parse the compiler output and extract the necessary
6599     # objects, libraries and library flags.
6600 michael 912
6601 michael 945 # Sentinel used to keep track of whether or not we are before
6602     # the conftest object file.
6603     pre_test_object_deps_done=no
6604 michael 912
6605 michael 945 for p in `eval "$output_verbose_link_cmd"`; do
6606     case $p in
6607 michael 912
6608 michael 945 -L* | -R* | -l*)
6609     # Some compilers place space between "-{L,R}" and the path.
6610     # Remove the space.
6611     if test $p = "-L" ||
6612     test $p = "-R"; then
6613     prev=$p
6614     continue
6615     else
6616     prev=
6617     fi
6618    
6619     if test "$pre_test_object_deps_done" = no; then
6620     case $p in
6621     -L* | -R*)
6622     # Internal compiler library paths should come after those
6623     # provided the user. The postdeps already come after the
6624     # user supplied libs so there is no need to process them.
6625     if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6626     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6627     else
6628     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6629     fi
6630     ;;
6631     # The "-l" case would never come before the object being
6632     # linked, so don't bother handling this case.
6633     esac
6634     else
6635     if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6636     _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6637     else
6638     _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6639     fi
6640     fi
6641     ;;
6642    
6643     *.$objext)
6644     # This assumes that the test object file only shows up
6645     # once in the compiler output.
6646     if test "$p" = "conftest.$objext"; then
6647     pre_test_object_deps_done=yes
6648     continue
6649     fi
6650    
6651     if test "$pre_test_object_deps_done" = no; then
6652     if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6653     _LT_TAGVAR(predep_objects, $1)="$p"
6654     else
6655     _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6656     fi
6657     else
6658     if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6659     _LT_TAGVAR(postdep_objects, $1)="$p"
6660     else
6661     _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6662     fi
6663     fi
6664     ;;
6665    
6666     *) ;; # Ignore the rest.
6667    
6668     esac
6669     done
6670    
6671     # Clean up.
6672     rm -f a.out a.exe
6673 michael 912 else
6674 michael 945 echo "libtool.m4: error: problem compiling $1 test program"
6675 michael 912 fi
6676    
6677 michael 945 $RM -f confest.$objext
6678 michael 912
6679 michael 945 # PORTME: override above test on systems where it is broken
6680     m4_if([$1], [CXX],
6681     [case $host_os in
6682     interix[[3-9]]*)
6683     # Interix 3.5 installs completely hosed .la files for C++, so rather than
6684     # hack all around it, let's just trust "g++" to DTRT.
6685     _LT_TAGVAR(predep_objects,$1)=
6686     _LT_TAGVAR(postdep_objects,$1)=
6687     _LT_TAGVAR(postdeps,$1)=
6688     ;;
6689    
6690     linux*)
6691     case `$CC -V 2>&1 | sed 5q` in
6692     *Sun\ C*)
6693     # Sun C++ 5.9
6694    
6695     # The more standards-conforming stlport4 library is
6696     # incompatible with the Cstd library. Avoid specifying
6697     # it if it's in CXXFLAGS. Ignore libCrun as
6698     # -library=stlport4 depends on it.
6699     case " $CXX $CXXFLAGS " in
6700     *" -library=stlport4 "*)
6701     solaris_use_stlport4=yes
6702     ;;
6703     esac
6704    
6705     if test "$solaris_use_stlport4" != yes; then
6706     _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6707     fi
6708     ;;
6709     esac
6710     ;;
6711    
6712     solaris*)
6713     case $cc_basename in
6714 michael 1094 CC* | sunCC*)
6715 michael 945 # The more standards-conforming stlport4 library is
6716     # incompatible with the Cstd library. Avoid specifying
6717     # it if it's in CXXFLAGS. Ignore libCrun as
6718     # -library=stlport4 depends on it.
6719     case " $CXX $CXXFLAGS " in
6720     *" -library=stlport4 "*)
6721     solaris_use_stlport4=yes
6722     ;;
6723     esac
6724    
6725     # Adding this requires a known-good setup of shared libraries for
6726     # Sun compiler versions before 5.6, else PIC objects from an old
6727     # archive will be linked into the output, leading to subtle bugs.
6728     if test "$solaris_use_stlport4" != yes; then
6729     _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6730     fi
6731     ;;
6732     esac
6733     ;;
6734     esac
6735     ])
6736    
6737     case " $_LT_TAGVAR(postdeps, $1) " in
6738     *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6739     esac
6740     _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6741     if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6742     _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6743     fi
6744     _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6745     [The directories searched by this compiler when creating a shared library])
6746     _LT_TAGDECL([], [predep_objects], [1],
6747     [Dependencies to place before and after the objects being linked to
6748     create a shared library])
6749     _LT_TAGDECL([], [postdep_objects], [1])
6750     _LT_TAGDECL([], [predeps], [1])
6751     _LT_TAGDECL([], [postdeps], [1])
6752     _LT_TAGDECL([], [compiler_lib_search_path], [1],
6753     [The library search path used internally by the compiler when linking
6754     a shared library])
6755     ])# _LT_SYS_HIDDEN_LIBDEPS
6756    
6757    
6758     # _LT_LANG_F77_CONFIG([TAG])
6759     # --------------------------
6760     # Ensure that the configuration variables for a Fortran 77 compiler are
6761     # suitably defined. These variables are subsequently used by _LT_CONFIG
6762     # to write the compiler configuration to `libtool'.
6763     m4_defun([_LT_LANG_F77_CONFIG],
6764 michael 1094 [AC_LANG_PUSH(Fortran 77)
6765     if test -z "$F77" || test "X$F77" = "Xno"; then
6766     _lt_disable_F77=yes
6767     fi
6768 michael 945
6769     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6770     _LT_TAGVAR(allow_undefined_flag, $1)=
6771     _LT_TAGVAR(always_export_symbols, $1)=no
6772     _LT_TAGVAR(archive_expsym_cmds, $1)=
6773     _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6774     _LT_TAGVAR(hardcode_direct, $1)=no
6775     _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6776     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6777     _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6778     _LT_TAGVAR(hardcode_libdir_separator, $1)=
6779     _LT_TAGVAR(hardcode_minus_L, $1)=no
6780     _LT_TAGVAR(hardcode_automatic, $1)=no
6781     _LT_TAGVAR(inherit_rpath, $1)=no
6782     _LT_TAGVAR(module_cmds, $1)=
6783     _LT_TAGVAR(module_expsym_cmds, $1)=
6784     _LT_TAGVAR(link_all_deplibs, $1)=unknown
6785     _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6786 michael 1094 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6787     _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6788 michael 945 _LT_TAGVAR(no_undefined_flag, $1)=
6789     _LT_TAGVAR(whole_archive_flag_spec, $1)=
6790     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6791    
6792     # Source file extension for f77 test sources.
6793     ac_ext=f
6794    
6795     # Object file extension for compiled f77 test sources.
6796     objext=o
6797     _LT_TAGVAR(objext, $1)=$objext
6798    
6799     # No sense in running all these tests if we already determined that
6800     # the F77 compiler isn't working. Some variables (like enable_shared)
6801     # are currently assumed to apply to all compilers on this platform,
6802     # and will be corrupted by setting them based on a non-working compiler.
6803     if test "$_lt_disable_F77" != yes; then
6804     # Code to be used in simple compile tests
6805     lt_simple_compile_test_code="\
6806     subroutine t
6807     return
6808     end
6809     "
6810    
6811     # Code to be used in simple link tests
6812     lt_simple_link_test_code="\
6813     program t
6814     end
6815     "
6816    
6817     # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6818     _LT_TAG_COMPILER
6819    
6820     # save warnings/boilerplate of simple test code
6821     _LT_COMPILER_BOILERPLATE
6822     _LT_LINKER_BOILERPLATE
6823    
6824     # Allow CC to be a program name with arguments.
6825     lt_save_CC="$CC"
6826     lt_save_GCC=$GCC
6827     CC=${F77-"f77"}
6828     compiler=$CC
6829     _LT_TAGVAR(compiler, $1)=$CC
6830     _LT_CC_BASENAME([$compiler])
6831     GCC=$G77
6832     if test -n "$compiler"; then
6833     AC_MSG_CHECKING([if libtool supports shared libraries])
6834     AC_MSG_RESULT([$can_build_shared])
6835    
6836     AC_MSG_CHECKING([whether to build shared libraries])
6837     test "$can_build_shared" = "no" && enable_shared=no
6838    
6839     # On AIX, shared libraries and static libraries use the same namespace, and
6840     # are all built from PIC.
6841     case $host_os in
6842     aix3*)
6843     test "$enable_shared" = yes && enable_static=no
6844     if test -n "$RANLIB"; then
6845     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6846     postinstall_cmds='$RANLIB $lib'
6847     fi
6848     ;;
6849     aix[[4-9]]*)
6850     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6851     test "$enable_shared" = yes && enable_static=no
6852     fi
6853     ;;
6854     esac
6855     AC_MSG_RESULT([$enable_shared])
6856    
6857     AC_MSG_CHECKING([whether to build static libraries])
6858     # Make sure either enable_shared or enable_static is yes.
6859     test "$enable_shared" = yes || enable_static=yes
6860     AC_MSG_RESULT([$enable_static])
6861    
6862     _LT_TAGVAR(GCC, $1)="$G77"
6863     _LT_TAGVAR(LD, $1)="$LD"
6864    
6865     ## CAVEAT EMPTOR:
6866     ## There is no encapsulation within the following macros, do not change
6867     ## the running order or otherwise move them around unless you know exactly
6868     ## what you are doing...
6869     _LT_COMPILER_PIC($1)
6870     _LT_COMPILER_C_O($1)
6871     _LT_COMPILER_FILE_LOCKS($1)
6872     _LT_LINKER_SHLIBS($1)
6873     _LT_SYS_DYNAMIC_LINKER($1)
6874     _LT_LINKER_HARDCODE_LIBPATH($1)
6875    
6876     _LT_CONFIG($1)
6877     fi # test -n "$compiler"
6878    
6879     GCC=$lt_save_GCC
6880     CC="$lt_save_CC"
6881     fi # test "$_lt_disable_F77" != yes
6882    
6883     AC_LANG_POP
6884     ])# _LT_LANG_F77_CONFIG
6885    
6886    
6887     # _LT_LANG_FC_CONFIG([TAG])
6888     # -------------------------
6889     # Ensure that the configuration variables for a Fortran compiler are
6890     # suitably defined. These variables are subsequently used by _LT_CONFIG
6891     # to write the compiler configuration to `libtool'.
6892     m4_defun([_LT_LANG_FC_CONFIG],
6893 michael 1094 [AC_LANG_PUSH(Fortran)
6894 michael 945
6895 michael 1094 if test -z "$FC" || test "X$FC" = "Xno"; then
6896     _lt_disable_FC=yes
6897     fi
6898    
6899 michael 945 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6900     _LT_TAGVAR(allow_undefined_flag, $1)=
6901     _LT_TAGVAR(always_export_symbols, $1)=no
6902     _LT_TAGVAR(archive_expsym_cmds, $1)=
6903     _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6904     _LT_TAGVAR(hardcode_direct, $1)=no
6905     _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6906     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6907     _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6908     _LT_TAGVAR(hardcode_libdir_separator, $1)=
6909     _LT_TAGVAR(hardcode_minus_L, $1)=no
6910     _LT_TAGVAR(hardcode_automatic, $1)=no
6911     _LT_TAGVAR(inherit_rpath, $1)=no
6912     _LT_TAGVAR(module_cmds, $1)=
6913     _LT_TAGVAR(module_expsym_cmds, $1)=
6914     _LT_TAGVAR(link_all_deplibs, $1)=unknown
6915     _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6916 michael 1094 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6917     _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6918 michael 945 _LT_TAGVAR(no_undefined_flag, $1)=
6919     _LT_TAGVAR(whole_archive_flag_spec, $1)=
6920     _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6921    
6922     # Source file extension for fc test sources.
6923     ac_ext=${ac_fc_srcext-f}
6924    
6925     # Object file extension for compiled fc test sources.
6926     objext=o
6927     _LT_TAGVAR(objext, $1)=$objext
6928    
6929     # No sense in running all these tests if we already determined that
6930     # the FC compiler isn't working. Some variables (like enable_shared)
6931     # are currently assumed to apply to all compilers on this platform,
6932     # and will be corrupted by setting them based on a non-working compiler.
6933     if test "$_lt_disable_FC" != yes; then
6934     # Code to be used in simple compile tests
6935     lt_simple_compile_test_code="\
6936     subroutine t
6937     return
6938     end
6939     "
6940    
6941     # Code to be used in simple link tests
6942     lt_simple_link_test_code="\
6943     program t
6944     end
6945     "
6946    
6947     # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6948     _LT_TAG_COMPILER
6949    
6950     # save warnings/boilerplate of simple test code
6951     _LT_COMPILER_BOILERPLATE
6952     _LT_LINKER_BOILERPLATE
6953    
6954     # Allow CC to be a program name with arguments.
6955     lt_save_CC="$CC"
6956     lt_save_GCC=$GCC
6957     CC=${FC-"f95"}
6958     compiler=$CC
6959     GCC=$ac_cv_fc_compiler_gnu
6960    
6961     _LT_TAGVAR(compiler, $1)=$CC
6962     _LT_CC_BASENAME([$compiler])
6963    
6964     if test -n "$compiler"; then
6965     AC_MSG_CHECKING([if libtool supports shared libraries])
6966     AC_MSG_RESULT([$can_build_shared])
6967    
6968     AC_MSG_CHECKING([whether to build shared libraries])
6969     test "$can_build_shared" = "no" && enable_shared=no
6970    
6971     # On AIX, shared libraries and static libraries use the same namespace, and
6972     # are all built from PIC.
6973     case $host_os in
6974     aix3*)
6975     test "$enable_shared" = yes && enable_static=no
6976     if test -n "$RANLIB"; then
6977     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6978     postinstall_cmds='$RANLIB $lib'
6979     fi
6980     ;;
6981     aix[[4-9]]*)
6982     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6983     test "$enable_shared" = yes && enable_static=no
6984     fi
6985     ;;
6986     esac
6987     AC_MSG_RESULT([$enable_shared])
6988    
6989     AC_MSG_CHECKING([whether to build static libraries])
6990     # Make sure either enable_shared or enable_static is yes.
6991     test "$enable_shared" = yes || enable_static=yes
6992     AC_MSG_RESULT([$enable_static])
6993    
6994     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6995     _LT_TAGVAR(LD, $1)="$LD"
6996    
6997     ## CAVEAT EMPTOR:
6998     ## There is no encapsulation within the following macros, do not change
6999     ## the running order or otherwise move them around unless you know exactly
7000     ## what you are doing...
7001     _LT_SYS_HIDDEN_LIBDEPS($1)
7002     _LT_COMPILER_PIC($1)
7003     _LT_COMPILER_C_O($1)
7004     _LT_COMPILER_FILE_LOCKS($1)
7005     _LT_LINKER_SHLIBS($1)
7006     _LT_SYS_DYNAMIC_LINKER($1)
7007     _LT_LINKER_HARDCODE_LIBPATH($1)
7008    
7009     _LT_CONFIG($1)
7010     fi # test -n "$compiler"
7011    
7012     GCC=$lt_save_GCC
7013     CC="$lt_save_CC"
7014     fi # test "$_lt_disable_FC" != yes
7015    
7016     AC_LANG_POP
7017     ])# _LT_LANG_FC_CONFIG
7018    
7019    
7020     # _LT_LANG_GCJ_CONFIG([TAG])
7021     # --------------------------
7022     # Ensure that the configuration variables for the GNU Java Compiler compiler
7023     # are suitably defined. These variables are subsequently used by _LT_CONFIG
7024     # to write the compiler configuration to `libtool'.
7025     m4_defun([_LT_LANG_GCJ_CONFIG],
7026     [AC_REQUIRE([LT_PROG_GCJ])dnl
7027     AC_LANG_SAVE
7028    
7029     # Source file extension for Java test sources.
7030     ac_ext=java
7031    
7032     # Object file extension for compiled Java test sources.
7033     objext=o
7034     _LT_TAGVAR(objext, $1)=$objext
7035    
7036     # Code to be used in simple compile tests
7037     lt_simple_compile_test_code="class foo {}"
7038    
7039     # Code to be used in simple link tests
7040     lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7041    
7042     # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7043     _LT_TAG_COMPILER
7044    
7045 michael 1072 # save warnings/boilerplate of simple test code
7046     _LT_COMPILER_BOILERPLATE
7047     _LT_LINKER_BOILERPLATE
7048    
7049 michael 945 # Allow CC to be a program name with arguments.
7050     lt_save_CC="$CC"
7051     lt_save_GCC=$GCC
7052     GCC=yes
7053     CC=${GCJ-"gcj"}
7054     compiler=$CC
7055     _LT_TAGVAR(compiler, $1)=$CC
7056     _LT_TAGVAR(LD, $1)="$LD"
7057     _LT_CC_BASENAME([$compiler])
7058    
7059     # GCJ did not exist at the time GCC didn't implicitly link libc in.
7060     _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7061    
7062     _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7063 michael 1094 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7064     _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7065 michael 945
7066     if test -n "$compiler"; then
7067     _LT_COMPILER_NO_RTTI($1)
7068     _LT_COMPILER_PIC($1)
7069     _LT_COMPILER_C_O($1)
7070     _LT_COMPILER_FILE_LOCKS($1)
7071     _LT_LINKER_SHLIBS($1)
7072     _LT_LINKER_HARDCODE_LIBPATH($1)
7073    
7074     _LT_CONFIG($1)
7075     fi
7076    
7077     AC_LANG_RESTORE
7078    
7079     GCC=$lt_save_GCC
7080     CC="$lt_save_CC"
7081     ])# _LT_LANG_GCJ_CONFIG
7082    
7083    
7084     # _LT_LANG_RC_CONFIG([TAG])
7085     # -------------------------
7086     # Ensure that the configuration variables for the Windows resource compiler
7087     # are suitably defined. These variables are subsequently used by _LT_CONFIG
7088     # to write the compiler configuration to `libtool'.
7089     m4_defun([_LT_LANG_RC_CONFIG],
7090     [AC_REQUIRE([LT_PROG_RC])dnl
7091     AC_LANG_SAVE
7092    
7093     # Source file extension for RC test sources.
7094     ac_ext=rc
7095    
7096     # Object file extension for compiled RC test sources.
7097     objext=o
7098     _LT_TAGVAR(objext, $1)=$objext
7099    
7100     # Code to be used in simple compile tests
7101     lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7102    
7103     # Code to be used in simple link tests
7104     lt_simple_link_test_code="$lt_simple_compile_test_code"
7105    
7106     # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7107     _LT_TAG_COMPILER
7108    
7109     # save warnings/boilerplate of simple test code
7110     _LT_COMPILER_BOILERPLATE
7111     _LT_LINKER_BOILERPLATE
7112    
7113     # Allow CC to be a program name with arguments.
7114     lt_save_CC="$CC"
7115     lt_save_GCC=$GCC
7116     GCC=
7117     CC=${RC-"windres"}
7118     compiler=$CC
7119     _LT_TAGVAR(compiler, $1)=$CC
7120     _LT_CC_BASENAME([$compiler])
7121     _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7122    
7123     if test -n "$compiler"; then
7124     :
7125     _LT_CONFIG($1)
7126     fi
7127    
7128     GCC=$lt_save_GCC
7129     AC_LANG_RESTORE
7130     CC="$lt_save_CC"
7131     ])# _LT_LANG_RC_CONFIG
7132    
7133    
7134     # LT_PROG_GCJ
7135     # -----------
7136     AC_DEFUN([LT_PROG_GCJ],
7137     [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7138     [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7139     [AC_CHECK_TOOL(GCJ, gcj,)
7140     test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7141     AC_SUBST(GCJFLAGS)])])[]dnl
7142     ])
7143    
7144     # Old name:
7145     AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7146     dnl aclocal-1.4 backwards compatibility:
7147     dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7148    
7149    
7150     # LT_PROG_RC
7151     # ----------
7152     AC_DEFUN([LT_PROG_RC],
7153     [AC_CHECK_TOOL(RC, windres,)
7154     ])
7155    
7156     # Old name:
7157     AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7158     dnl aclocal-1.4 backwards compatibility:
7159     dnl AC_DEFUN([LT_AC_PROG_RC], [])
7160    
7161    
7162     # _LT_DECL_EGREP
7163     # --------------
7164     # If we don't have a new enough Autoconf to choose the best grep
7165     # available, choose the one first in the user's PATH.
7166     m4_defun([_LT_DECL_EGREP],
7167     [AC_REQUIRE([AC_PROG_EGREP])dnl
7168     AC_REQUIRE([AC_PROG_FGREP])dnl
7169     test -z "$GREP" && GREP=grep
7170     _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7171     _LT_DECL([], [EGREP], [1], [An ERE matcher])
7172     _LT_DECL([], [FGREP], [1], [A literal string matcher])
7173     dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7174     AC_SUBST([GREP])
7175     ])
7176    
7177    
7178     # _LT_DECL_OBJDUMP
7179     # --------------
7180     # If we don't have a new enough Autoconf to choose the best objdump
7181     # available, choose the one first in the user's PATH.
7182     m4_defun([_LT_DECL_OBJDUMP],
7183     [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7184     test -z "$OBJDUMP" && OBJDUMP=objdump
7185     _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7186     AC_SUBST([OBJDUMP])
7187     ])
7188    
7189    
7190     # _LT_DECL_SED
7191     # ------------
7192     # Check for a fully-functional sed program, that truncates
7193     # as few characters as possible. Prefer GNU sed if found.
7194     m4_defun([_LT_DECL_SED],
7195     [AC_PROG_SED
7196     test -z "$SED" && SED=sed
7197     Xsed="$SED -e 1s/^X//"
7198     _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7199     _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7200     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7201     ])# _LT_DECL_SED
7202    
7203     m4_ifndef([AC_PROG_SED], [
7204 michael 912 # NOTE: This macro has been submitted for inclusion into #
7205     # GNU Autoconf as AC_PROG_SED. When it is available in #
7206     # a released version of Autoconf we should remove this #
7207     # macro and use it instead. #
7208 michael 945
7209     m4_defun([AC_PROG_SED],
7210 michael 912 [AC_MSG_CHECKING([for a sed that does not truncate output])
7211     AC_CACHE_VAL(lt_cv_path_SED,
7212     [# Loop through the user's path and test for sed and gsed.
7213     # Then use that list of sed's as ones to test for truncation.
7214     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7215     for as_dir in $PATH
7216     do
7217     IFS=$as_save_IFS
7218     test -z "$as_dir" && as_dir=.
7219     for lt_ac_prog in sed gsed; do
7220     for ac_exec_ext in '' $ac_executable_extensions; do
7221 michael 945 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7222 michael 912 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7223     fi
7224     done
7225     done
7226     done
7227     IFS=$as_save_IFS
7228     lt_ac_max=0
7229     lt_ac_count=0
7230     # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7231     # along with /bin/sed that truncates output.
7232     for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7233     test ! -f $lt_ac_sed && continue
7234     cat /dev/null > conftest.in
7235     lt_ac_count=0
7236     echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7237     # Check for GNU sed and select it if it is found.
7238     if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7239     lt_cv_path_SED=$lt_ac_sed
7240     break
7241     fi
7242     while true; do
7243     cat conftest.in conftest.in >conftest.tmp
7244     mv conftest.tmp conftest.in
7245     cp conftest.in conftest.nl
7246     echo >>conftest.nl
7247     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7248     cmp -s conftest.out conftest.nl || break
7249     # 10000 chars as input seems more than enough
7250     test $lt_ac_count -gt 10 && break
7251     lt_ac_count=`expr $lt_ac_count + 1`
7252     if test $lt_ac_count -gt $lt_ac_max; then
7253     lt_ac_max=$lt_ac_count
7254     lt_cv_path_SED=$lt_ac_sed
7255     fi
7256     done
7257     done
7258     ])
7259     SED=$lt_cv_path_SED
7260     AC_SUBST([SED])
7261     AC_MSG_RESULT([$SED])
7262 michael 945 ])#AC_PROG_SED
7263     ])#m4_ifndef
7264    
7265     # Old name:
7266     AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7267     dnl aclocal-1.4 backwards compatibility:
7268     dnl AC_DEFUN([LT_AC_PROG_SED], [])
7269    
7270    
7271     # _LT_CHECK_SHELL_FEATURES
7272     # ------------------------
7273     # Find out whether the shell is Bourne or XSI compatible,
7274     # or has some other useful features.
7275     m4_defun([_LT_CHECK_SHELL_FEATURES],
7276     [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7277     # Try some XSI features
7278     xsi_shell=no
7279     ( _lt_dummy="a/b/c"
7280     test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7281     = c,a/b,, \
7282     && eval 'test $(( 1 + 1 )) -eq 2 \
7283     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7284     && xsi_shell=yes
7285     AC_MSG_RESULT([$xsi_shell])
7286     _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7287    
7288     AC_MSG_CHECKING([whether the shell understands "+="])
7289     lt_shell_append=no
7290     ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7291     >/dev/null 2>&1 \
7292     && lt_shell_append=yes
7293     AC_MSG_RESULT([$lt_shell_append])
7294     _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7295    
7296     if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7297     lt_unset=unset
7298     else
7299     lt_unset=false
7300     fi
7301     _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7302    
7303     # test EBCDIC or ASCII
7304     case `echo X|tr X '\101'` in
7305     A) # ASCII based system
7306     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7307     lt_SP2NL='tr \040 \012'
7308     lt_NL2SP='tr \015\012 \040\040'
7309     ;;
7310     *) # EBCDIC based system
7311     lt_SP2NL='tr \100 \n'
7312     lt_NL2SP='tr \r\n \100\100'
7313     ;;
7314     esac
7315     _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7316     _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7317     ])# _LT_CHECK_SHELL_FEATURES
7318    
7319    
7320     # _LT_PROG_XSI_SHELLFNS
7321     # ---------------------
7322     # Bourne and XSI compatible variants of some useful shell functions.
7323     m4_defun([_LT_PROG_XSI_SHELLFNS],
7324     [case $xsi_shell in
7325     yes)
7326     cat << \_LT_EOF >> "$cfgfile"
7327    
7328     # func_dirname file append nondir_replacement
7329     # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7330     # otherwise set result to NONDIR_REPLACEMENT.
7331     func_dirname ()
7332     {
7333     case ${1} in
7334     */*) func_dirname_result="${1%/*}${2}" ;;
7335     * ) func_dirname_result="${3}" ;;
7336     esac
7337     }
7338    
7339     # func_basename file
7340     func_basename ()
7341     {
7342     func_basename_result="${1##*/}"
7343     }
7344    
7345     # func_dirname_and_basename file append nondir_replacement
7346     # perform func_basename and func_dirname in a single function
7347     # call:
7348     # dirname: Compute the dirname of FILE. If nonempty,
7349     # add APPEND to the result, otherwise set result
7350     # to NONDIR_REPLACEMENT.
7351     # value returned in "$func_dirname_result"
7352     # basename: Compute filename of FILE.
7353     # value retuned in "$func_basename_result"
7354     # Implementation must be kept synchronized with func_dirname
7355     # and func_basename. For efficiency, we do not delegate to
7356     # those functions but instead duplicate the functionality here.
7357     func_dirname_and_basename ()
7358     {
7359     case ${1} in
7360     */*) func_dirname_result="${1%/*}${2}" ;;
7361     * ) func_dirname_result="${3}" ;;
7362     esac
7363     func_basename_result="${1##*/}"
7364     }
7365    
7366     # func_stripname prefix suffix name
7367     # strip PREFIX and SUFFIX off of NAME.
7368     # PREFIX and SUFFIX must not contain globbing or regex special
7369     # characters, hashes, percent signs, but SUFFIX may contain a leading
7370     # dot (in which case that matches only a dot).
7371     func_stripname ()
7372     {
7373     # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7374     # positional parameters, so assign one to ordinary parameter first.
7375     func_stripname_result=${3}
7376     func_stripname_result=${func_stripname_result#"${1}"}
7377     func_stripname_result=${func_stripname_result%"${2}"}
7378     }
7379    
7380     # func_opt_split
7381     func_opt_split ()
7382     {
7383     func_opt_split_opt=${1%%=*}
7384     func_opt_split_arg=${1#*=}
7385     }
7386    
7387     # func_lo2o object
7388     func_lo2o ()
7389     {
7390     case ${1} in
7391     *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7392     *) func_lo2o_result=${1} ;;
7393     esac
7394     }
7395    
7396     # func_xform libobj-or-source
7397     func_xform ()
7398     {
7399     func_xform_result=${1%.*}.lo
7400     }
7401    
7402     # func_arith arithmetic-term...
7403     func_arith ()
7404     {
7405     func_arith_result=$(( $[*] ))
7406     }
7407    
7408     # func_len string
7409     # STRING may not start with a hyphen.
7410     func_len ()
7411     {
7412     func_len_result=${#1}
7413     }
7414    
7415     _LT_EOF
7416     ;;
7417     *) # Bourne compatible functions.
7418     cat << \_LT_EOF >> "$cfgfile"
7419    
7420     # func_dirname file append nondir_replacement
7421     # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7422     # otherwise set result to NONDIR_REPLACEMENT.
7423     func_dirname ()
7424     {
7425     # Extract subdirectory from the argument.
7426 michael 1094 func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
7427 michael 945 if test "X$func_dirname_result" = "X${1}"; then
7428     func_dirname_result="${3}"
7429     else
7430     func_dirname_result="$func_dirname_result${2}"
7431     fi
7432     }
7433    
7434     # func_basename file
7435     func_basename ()
7436     {
7437 michael 1094 func_basename_result=`$ECHO "${1}" | $SED "$basename"`
7438 michael 945 }
7439    
7440     dnl func_dirname_and_basename
7441     dnl A portable version of this function is already defined in general.m4sh
7442     dnl so there is no need for it here.
7443    
7444     # func_stripname prefix suffix name
7445     # strip PREFIX and SUFFIX off of NAME.
7446     # PREFIX and SUFFIX must not contain globbing or regex special
7447     # characters, hashes, percent signs, but SUFFIX may contain a leading
7448     # dot (in which case that matches only a dot).
7449     # func_strip_suffix prefix name
7450     func_stripname ()
7451     {
7452     case ${2} in
7453 michael 1094 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7454     *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7455 michael 945 esac
7456     }
7457    
7458     # sed scripts:
7459     my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7460     my_sed_long_arg='1s/^-[[^=]]*=//'
7461    
7462     # func_opt_split
7463     func_opt_split ()
7464     {
7465 michael 1094 func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
7466     func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
7467 michael 945 }
7468    
7469     # func_lo2o object
7470     func_lo2o ()
7471     {
7472 michael 1094 func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
7473 michael 945 }
7474    
7475     # func_xform libobj-or-source
7476     func_xform ()
7477     {
7478 michael 1094 func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
7479 michael 945 }
7480    
7481     # func_arith arithmetic-term...
7482     func_arith ()
7483     {
7484     func_arith_result=`expr "$[@]"`
7485     }
7486    
7487     # func_len string
7488     # STRING may not start with a hyphen.
7489     func_len ()
7490     {
7491     func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7492     }
7493    
7494     _LT_EOF
7495     esac
7496    
7497     case $lt_shell_append in
7498     yes)
7499     cat << \_LT_EOF >> "$cfgfile"
7500    
7501     # func_append var value
7502     # Append VALUE to the end of shell variable VAR.
7503     func_append ()
7504     {
7505     eval "$[1]+=\$[2]"
7506     }
7507     _LT_EOF
7508     ;;
7509     *)
7510     cat << \_LT_EOF >> "$cfgfile"
7511    
7512     # func_append var value
7513     # Append VALUE to the end of shell variable VAR.
7514     func_append ()
7515     {
7516     eval "$[1]=\$$[1]\$[2]"
7517     }
7518    
7519     _LT_EOF
7520     ;;
7521     esac
7522 michael 912 ])
7523    
7524 michael 945 # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
7525 michael 912 #
7526 michael 945 # Copyright (C) 1999-2006, 2007, 2008 Free Software Foundation, Inc.
7527     # Written by Thomas Tanner, 1999
7528     #
7529     # This file is free software; the Free Software Foundation gives
7530     # unlimited permission to copy and/or distribute it, with or without
7531     # modifications, as long as this notice is preserved.
7532    
7533 michael 1094 # serial 18 LTDL_INIT
7534 michael 945
7535     # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
7536     # ------------------------------------------
7537     # DIRECTORY contains the libltdl sources. It is okay to call this
7538     # function multiple times, as long as the same DIRECTORY is always given.
7539     AC_DEFUN([LT_CONFIG_LTDL_DIR],
7540     [AC_BEFORE([$0], [LTDL_INIT])
7541     _$0($*)
7542     ])# LT_CONFIG_LTDL_DIR
7543    
7544     # We break this out into a separate macro, so that we can call it safely
7545     # internally without being caught accidentally by the sed scan in libtoolize.
7546     m4_defun([_LT_CONFIG_LTDL_DIR],
7547     [dnl remove trailing slashes
7548     m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
7549     m4_case(_LTDL_DIR,
7550     [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
7551     m4_if(_ARG_DIR, [.],
7552     [],
7553     [m4_define([_LTDL_DIR], _ARG_DIR)
7554     _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
7555     [m4_if(_ARG_DIR, _LTDL_DIR,
7556     [],
7557     [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
7558     m4_popdef([_ARG_DIR])
7559     ])# _LT_CONFIG_LTDL_DIR
7560    
7561     # Initialise:
7562     m4_define([_LTDL_DIR], [])
7563    
7564    
7565     # _LT_BUILD_PREFIX
7566     # ----------------
7567     # If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
7568     # to `${top_builddir}/'.
7569     m4_define([_LT_BUILD_PREFIX],
7570     [m4_ifdef([AC_AUTOCONF_VERSION],
7571     [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
7572     [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
7573     [${top_build_prefix}],
7574     [${top_builddir}/])],
7575     [${top_build_prefix}])],
7576     [${top_builddir}/])[]dnl
7577     ])
7578    
7579    
7580     # LTDL_CONVENIENCE
7581     # ----------------
7582     # sets LIBLTDL to the link flags for the libltdl convenience library and
7583     # LTDLINCL to the include flags for the libltdl header and adds
7584     # --enable-ltdl-convenience to the configure arguments. Note that
7585     # AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
7586     # '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
7587     # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
7588     # quotes!). If your package is not flat and you're not using automake,
7589     # define top_build_prefix, top_builddir, and top_srcdir appropriately
7590     # in your Makefiles.
7591     AC_DEFUN([LTDL_CONVENIENCE],
7592     [AC_BEFORE([$0], [LTDL_INIT])dnl
7593     dnl Although the argument is deprecated and no longer documented,
7594     dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
7595     dnl here make sure it is the same as any other declaration of libltdl's
7596     dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
7597     dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
7598     m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
7599     _$0()
7600     ])# LTDL_CONVENIENCE
7601    
7602     # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
7603     # now we have LT_CONFIG_LTDL_DIR:
7604     AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
7605     [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
7606     _LTDL_CONVENIENCE])
7607    
7608     dnl aclocal-1.4 backwards compatibility:
7609     dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
7610    
7611    
7612     # _LTDL_CONVENIENCE
7613     # -----------------
7614     # Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
7615     m4_defun([_LTDL_CONVENIENCE],
7616     [case $enable_ltdl_convenience in
7617     no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
7618     "") enable_ltdl_convenience=yes
7619     ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
7620     esac
7621     LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
7622     LTDLDEPS=$LIBLTDL
7623     LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
7624    
7625     AC_SUBST([LIBLTDL])
7626     AC_SUBST([LTDLDEPS])
7627     AC_SUBST([LTDLINCL])
7628    
7629     # For backwards non-gettext consistent compatibility...
7630     INCLTDL="$LTDLINCL"
7631     AC_SUBST([INCLTDL])
7632     ])# _LTDL_CONVENIENCE
7633    
7634    
7635     # LTDL_INSTALLABLE
7636     # ----------------
7637     # sets LIBLTDL to the link flags for the libltdl installable library
7638     # and LTDLINCL to the include flags for the libltdl header and adds
7639     # --enable-ltdl-install to the configure arguments. Note that
7640     # AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
7641     # is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
7642     # available, otherwise with '${top_builddir}/', and LTDLINCL will be
7643     # prefixed with '${top_srcdir}/' (note the single quotes!). If your
7644     # package is not flat and you're not using automake, define top_build_prefix,
7645     # top_builddir, and top_srcdir appropriately in your Makefiles.
7646     # In the future, this macro may have to be called after LT_INIT.
7647     AC_DEFUN([LTDL_INSTALLABLE],
7648     [AC_BEFORE([$0], [LTDL_INIT])dnl
7649     dnl Although the argument is deprecated and no longer documented,
7650     dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
7651     dnl here make sure it is the same as any other declaration of libltdl's
7652     dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
7653     dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
7654     m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
7655     _$0()
7656     ])# LTDL_INSTALLABLE
7657    
7658     # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
7659     # now we have LT_CONFIG_LTDL_DIR:
7660     AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
7661     [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
7662     _LTDL_INSTALLABLE])
7663    
7664     dnl aclocal-1.4 backwards compatibility:
7665     dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
7666    
7667    
7668     # _LTDL_INSTALLABLE
7669     # -----------------
7670     # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
7671     m4_defun([_LTDL_INSTALLABLE],
7672 michael 1084 [if test -f $prefix/lib/libltdl.la; then
7673     lt_save_LDFLAGS="$LDFLAGS"
7674     LDFLAGS="-L$prefix/lib $LDFLAGS"
7675     AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
7676     LDFLAGS="$lt_save_LDFLAGS"
7677 michael 945 if test x"${lt_lib_ltdl-no}" = xyes; then
7678     if test x"$enable_ltdl_install" != xyes; then
7679 michael 1084 # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
7680     AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
7681 michael 945 enable_ltdl_install=no
7682     fi
7683     elif test x"$enable_ltdl_install" = xno; then
7684     AC_MSG_WARN([libltdl not installed, but installation disabled])
7685     fi
7686 michael 1084 fi
7687 michael 945
7688     # If configure.ac declared an installable ltdl, and the user didn't override
7689     # with --disable-ltdl-install, we will install the shipped libltdl.
7690     case $enable_ltdl_install in
7691     no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
7692     LIBLTDL="-lltdl"
7693     LTDLDEPS=
7694     LTDLINCL=
7695     ;;
7696     *) enable_ltdl_install=yes
7697     ac_configure_args="$ac_configure_args --enable-ltdl-install"
7698     LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
7699     LTDLDEPS=$LIBLTDL
7700     LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
7701     ;;
7702     esac
7703    
7704     AC_SUBST([LIBLTDL])
7705     AC_SUBST([LTDLDEPS])
7706     AC_SUBST([LTDLINCL])
7707    
7708     # For backwards non-gettext consistent compatibility...
7709     INCLTDL="$LTDLINCL"
7710     AC_SUBST([INCLTDL])
7711     ])# LTDL_INSTALLABLE
7712    
7713    
7714     # _LTDL_MODE_DISPATCH
7715     # -------------------
7716     m4_define([_LTDL_MODE_DISPATCH],
7717     [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
7718     m4_if(_LTDL_DIR, [],
7719     [],
7720     dnl if _LTDL_MODE was not set already, the default value is `subproject':
7721     [m4_case(m4_default(_LTDL_MODE, [subproject]),
7722     [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
7723     _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
7724     [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
7725     [recursive], [],
7726     [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
7727     dnl Be careful not to expand twice:
7728     m4_define([$0], [])
7729     ])# _LTDL_MODE_DISPATCH
7730    
7731    
7732     # _LT_LIBOBJ(MODULE_NAME)
7733     # -----------------------
7734     # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
7735     # of into LIBOBJS.
7736     AC_DEFUN([_LT_LIBOBJ], [
7737     m4_pattern_allow([^_LT_LIBOBJS$])
7738     _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
7739     ])# _LT_LIBOBJS
7740    
7741    
7742     # LTDL_INIT([OPTIONS])
7743     # --------------------
7744     # Clients of libltdl can use this macro to allow the installer to
7745     # choose between a shipped copy of the ltdl sources or a preinstalled
7746     # version of the library. If the shipped ltdl sources are not in a
7747     # subdirectory named libltdl, the directory name must be given by
7748     # LT_CONFIG_LTDL_DIR.
7749     AC_DEFUN([LTDL_INIT],
7750     [dnl Parse OPTIONS
7751     _LT_SET_OPTIONS([$0], [$1])
7752    
7753     dnl We need to keep our own list of libobjs separate from our parent project,
7754     dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
7755     dnl we look for our own LIBOBJs.
7756     m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
7757     m4_pushdef([AC_LIBSOURCES])
7758    
7759     dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
7760     m4_if(_LTDL_MODE, [],
7761     [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
7762     m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
7763     [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
7764    
7765     AC_ARG_WITH([included_ltdl],
7766     [AS_HELP_STRING([--with-included-ltdl],
7767     [use the GNU ltdl sources included here])])
7768    
7769     if test "x$with_included_ltdl" != xyes; then
7770     # We are not being forced to use the included libltdl sources, so
7771     # decide whether there is a useful installed version we can use.
7772     AC_CHECK_HEADER([ltdl.h],
7773     [AC_CHECK_DECL([lt_dlinterface_register],
7774     [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
7775     [with_included_ltdl=no],
7776     [with_included_ltdl=yes])],
7777     [with_included_ltdl=yes],
7778     [AC_INCLUDES_DEFAULT
7779     #include <ltdl.h>])],
7780     [with_included_ltdl=yes],
7781     [AC_INCLUDES_DEFAULT]
7782     )
7783     fi
7784    
7785     dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
7786     dnl was called yet, then for old times' sake, we assume libltdl is in an
7787     dnl eponymous directory:
7788     AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
7789    
7790     AC_ARG_WITH([ltdl_include],
7791     [AS_HELP_STRING([--with-ltdl-include=DIR],
7792     [use the ltdl headers installed in DIR])])
7793    
7794     if test -n "$with_ltdl_include"; then
7795     if test -f "$with_ltdl_include/ltdl.h"; then :
7796     else
7797     AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
7798     fi
7799     else
7800     with_ltdl_include=no
7801     fi
7802    
7803     AC_ARG_WITH([ltdl_lib],
7804     [AS_HELP_STRING([--with-ltdl-lib=DIR],
7805     [use the libltdl.la installed in DIR])])
7806    
7807     if test -n "$with_ltdl_lib"; then
7808     if test -f "$with_ltdl_lib/libltdl.la"; then :
7809     else
7810     AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
7811     fi
7812     else
7813     with_ltdl_lib=no
7814     fi
7815    
7816     case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
7817     ,yes,no,no,)
7818     m4_case(m4_default(_LTDL_TYPE, [convenience]),
7819     [convenience], [_LTDL_CONVENIENCE],
7820     [installable], [_LTDL_INSTALLABLE],
7821     [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
7822     ;;
7823     ,no,no,no,)
7824     # If the included ltdl is not to be used, then use the
7825     # preinstalled libltdl we found.
7826     AC_DEFINE([HAVE_LTDL], [1],
7827     [Define this if a modern libltdl is already installed])
7828     LIBLTDL=-lltdl
7829     LTDLDEPS=
7830     LTDLINCL=
7831     ;;
7832     ,no*,no,*)
7833     AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
7834     ;;
7835     *) with_included_ltdl=no
7836     LIBLTDL="-L$with_ltdl_lib -lltdl"
7837     LTDLDEPS=
7838     LTDLINCL="-I$with_ltdl_include"
7839     ;;
7840     esac
7841     INCLTDL="$LTDLINCL"
7842    
7843     # Report our decision...
7844     AC_MSG_CHECKING([where to find libltdl headers])
7845     AC_MSG_RESULT([$LTDLINCL])
7846     AC_MSG_CHECKING([where to find libltdl library])
7847     AC_MSG_RESULT([$LIBLTDL])
7848    
7849     _LTDL_SETUP
7850    
7851     dnl restore autoconf definition.
7852     m4_popdef([AC_LIBOBJ])
7853     m4_popdef([AC_LIBSOURCES])
7854    
7855     AC_CONFIG_COMMANDS_PRE([
7856     _ltdl_libobjs=
7857     _ltdl_ltlibobjs=
7858     if test -n "$_LT_LIBOBJS"; then
7859     # Remove the extension.
7860     _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
7861     for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
7862     _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
7863     _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
7864     done
7865     fi
7866     AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
7867     AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
7868     ])
7869    
7870     # Only expand once:
7871     m4_define([LTDL_INIT])
7872     ])# LTDL_INIT
7873    
7874     # Old names:
7875     AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
7876     AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
7877     AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
7878     dnl aclocal-1.4 backwards compatibility:
7879     dnl AC_DEFUN([AC_LIB_LTDL], [])
7880     dnl AC_DEFUN([AC_WITH_LTDL], [])
7881     dnl AC_DEFUN([LT_WITH_LTDL], [])
7882    
7883    
7884     # _LTDL_SETUP
7885     # -----------
7886     # Perform all the checks necessary for compilation of the ltdl objects
7887     # -- including compiler checks and header checks. This is a public
7888     # interface mainly for the benefit of libltdl's own configure.ac, most
7889     # other users should call LTDL_INIT instead.
7890     AC_DEFUN([_LTDL_SETUP],
7891     [AC_REQUIRE([AC_PROG_CC])dnl
7892     AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
7893     AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
7894     AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
7895     AC_REQUIRE([LT_LIB_DLLOAD])dnl
7896     AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
7897     AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
7898     AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
7899     AC_REQUIRE([gl_FUNC_ARGZ])dnl
7900    
7901     m4_require([_LT_CHECK_OBJDIR])dnl
7902     m4_require([_LT_HEADER_DLFCN])dnl
7903     m4_require([_LT_CHECK_DLPREOPEN])dnl
7904     m4_require([_LT_DECL_SED])dnl
7905    
7906     dnl Don't require this, or it will be expanded earlier than the code
7907     dnl that sets the variables it relies on:
7908     _LT_ENABLE_INSTALL
7909    
7910     dnl _LTDL_MODE specific code must be called at least once:
7911     _LTDL_MODE_DISPATCH
7912    
7913     # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
7914     # the user used. This is so that ltdl.h can pick up the parent projects
7915     # config.h file, The first file in AC_CONFIG_HEADERS must contain the
7916     # definitions required by ltdl.c.
7917     # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
7918     AC_CONFIG_COMMANDS_PRE([dnl
7919     m4_pattern_allow([^LT_CONFIG_H$])dnl
7920     m4_ifset([AH_HEADER],
7921     [LT_CONFIG_H=AH_HEADER],
7922     [m4_ifset([AC_LIST_HEADERS],
7923     [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
7924     [])])])
7925     AC_SUBST([LT_CONFIG_H])
7926    
7927     AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
7928     [], [], [AC_INCLUDES_DEFAULT])
7929    
7930     AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
7931     AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
7932    
7933 michael 1094 m4_pattern_allow([LT_LIBEXT])dnl
7934 michael 945 AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
7935    
7936     name=ltdl
7937     LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`
7938     AC_SUBST([LTDLOPEN])
7939     ])# _LTDL_SETUP
7940    
7941    
7942     # _LT_ENABLE_INSTALL
7943     # ------------------
7944     m4_define([_LT_ENABLE_INSTALL],
7945     [AC_ARG_ENABLE([ltdl-install],
7946     [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
7947    
7948     case ,${enable_ltdl_install},${enable_ltdl_convenience} in
7949     *yes*) ;;
7950     *) enable_ltdl_convenience=yes ;;
7951     esac
7952    
7953     m4_ifdef([AM_CONDITIONAL],
7954     [AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
7955     AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
7956     ])# _LT_ENABLE_INSTALL
7957    
7958    
7959     # LT_SYS_DLOPEN_DEPLIBS
7960     # ---------------------
7961     AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
7962     [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7963     AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
7964     [lt_cv_sys_dlopen_deplibs],
7965     [# PORTME does your system automatically load deplibs for dlopen?
7966     # or its logical equivalent (e.g. shl_load for HP-UX < 11)
7967     # For now, we just catch OSes we know something about -- in the
7968     # future, we'll try test this programmatically.
7969     lt_cv_sys_dlopen_deplibs=unknown
7970     case $host_os in
7971     aix3*|aix4.1.*|aix4.2.*)
7972     # Unknown whether this is true for these versions of AIX, but
7973     # we want this `case' here to explicitly catch those versions.
7974     lt_cv_sys_dlopen_deplibs=unknown
7975     ;;
7976     aix[[4-9]]*)
7977     lt_cv_sys_dlopen_deplibs=yes
7978     ;;
7979     amigaos*)
7980     case $host_cpu in
7981     powerpc)
7982     lt_cv_sys_dlopen_deplibs=no
7983     ;;
7984     esac
7985     ;;
7986     darwin*)
7987     # Assuming the user has installed a libdl from somewhere, this is true
7988     # If you are looking for one http://www.opendarwin.org/projects/dlcompat
7989     lt_cv_sys_dlopen_deplibs=yes
7990     ;;
7991     freebsd* | dragonfly*)
7992     lt_cv_sys_dlopen_deplibs=yes
7993     ;;
7994 michael 1094 gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
7995 michael 945 # GNU and its variants, using gnu ld.so (Glibc)
7996     lt_cv_sys_dlopen_deplibs=yes
7997     ;;
7998     hpux10*|hpux11*)
7999     lt_cv_sys_dlopen_deplibs=yes
8000     ;;
8001     interix*)
8002     lt_cv_sys_dlopen_deplibs=yes
8003     ;;
8004     irix[[12345]]*|irix6.[[01]]*)
8005     # Catch all versions of IRIX before 6.2, and indicate that we don't
8006     # know how it worked for any of those versions.
8007     lt_cv_sys_dlopen_deplibs=unknown
8008     ;;
8009     irix*)
8010     # The case above catches anything before 6.2, and it's known that
8011     # at 6.2 and later dlopen does load deplibs.
8012     lt_cv_sys_dlopen_deplibs=yes
8013     ;;
8014     netbsd*)
8015     lt_cv_sys_dlopen_deplibs=yes
8016     ;;
8017     openbsd*)
8018     lt_cv_sys_dlopen_deplibs=yes
8019     ;;
8020     osf[[1234]]*)
8021     # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
8022     # it did *not* use an RPATH in a shared library to find objects the
8023     # library depends on, so we explicitly say `no'.
8024     lt_cv_sys_dlopen_deplibs=no
8025     ;;
8026     osf5.0|osf5.0a|osf5.1)
8027     # dlopen *does* load deplibs and with the right loader patch applied
8028     # it even uses RPATH in a shared library to search for shared objects
8029     # that the library depends on, but there's no easy way to know if that
8030     # patch is installed. Since this is the case, all we can really
8031     # say is unknown -- it depends on the patch being installed. If
8032     # it is, this changes to `yes'. Without it, it would be `no'.
8033     lt_cv_sys_dlopen_deplibs=unknown
8034     ;;
8035     osf*)
8036     # the two cases above should catch all versions of osf <= 5.1. Read
8037     # the comments above for what we know about them.
8038     # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
8039     # is used to find them so we can finally say `yes'.
8040     lt_cv_sys_dlopen_deplibs=yes
8041     ;;
8042     qnx*)
8043     lt_cv_sys_dlopen_deplibs=yes
8044     ;;
8045     solaris*)
8046     lt_cv_sys_dlopen_deplibs=yes
8047     ;;
8048     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8049     libltdl_cv_sys_dlopen_deplibs=yes
8050     ;;
8051     esac
8052     ])
8053     if test "$lt_cv_sys_dlopen_deplibs" != yes; then
8054     AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
8055     [Define if the OS needs help to load dependent libraries for dlopen().])
8056     fi
8057     ])# LT_SYS_DLOPEN_DEPLIBS
8058    
8059     # Old name:
8060     AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
8061     dnl aclocal-1.4 backwards compatibility:
8062     dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
8063    
8064    
8065     # LT_SYS_MODULE_EXT
8066     # -----------------
8067     AC_DEFUN([LT_SYS_MODULE_EXT],
8068     [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8069     AC_CACHE_CHECK([which extension is used for runtime loadable modules],
8070     [libltdl_cv_shlibext],
8071     [
8072     module=yes
8073     eval libltdl_cv_shlibext=$shrext_cmds
8074     ])
8075     if test -n "$libltdl_cv_shlibext"; then
8076     m4_pattern_allow([LT_MODULE_EXT])dnl
8077     AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
8078     [Define to the extension used for runtime loadable modules, say, ".so".])
8079     fi
8080     ])# LT_SYS_MODULE_EXT
8081    
8082     # Old name:
8083     AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
8084     dnl aclocal-1.4 backwards compatibility:
8085     dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
8086    
8087    
8088     # LT_SYS_MODULE_PATH
8089     # ------------------
8090     AC_DEFUN([LT_SYS_MODULE_PATH],
8091     [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8092     AC_CACHE_CHECK([which variable specifies run-time module search path],
8093     [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
8094     if test -n "$lt_cv_module_path_var"; then
8095     m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
8096     AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
8097     [Define to the name of the environment variable that determines the run-time module search path.])
8098     fi
8099     ])# LT_SYS_MODULE_PATH
8100    
8101     # Old name:
8102     AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
8103     dnl aclocal-1.4 backwards compatibility:
8104     dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
8105    
8106    
8107     # LT_SYS_DLSEARCH_PATH
8108     # --------------------
8109     AC_DEFUN([LT_SYS_DLSEARCH_PATH],
8110     [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8111     AC_CACHE_CHECK([for the default library search path],
8112     [lt_cv_sys_dlsearch_path],
8113     [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
8114     if test -n "$lt_cv_sys_dlsearch_path"; then
8115     sys_dlsearch_path=
8116     for dir in $lt_cv_sys_dlsearch_path; do
8117     if test -z "$sys_dlsearch_path"; then
8118     sys_dlsearch_path="$dir"
8119     else
8120     sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
8121     fi
8122     done
8123     m4_pattern_allow([LT_DLSEARCH_PATH])dnl
8124     AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
8125     [Define to the system default library search path.])
8126     fi
8127     ])# LT_SYS_DLSEARCH_PATH
8128    
8129     # Old name:
8130     AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
8131     dnl aclocal-1.4 backwards compatibility:
8132     dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
8133    
8134    
8135     # _LT_CHECK_DLPREOPEN
8136     # -------------------
8137     m4_defun([_LT_CHECK_DLPREOPEN],
8138     [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8139     AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
8140     [libltdl_cv_preloaded_symbols],
8141     [if test -n "$lt_cv_sys_global_symbol_pipe"; then
8142     libltdl_cv_preloaded_symbols=yes
8143     else
8144     libltdl_cv_preloaded_symbols=no
8145     fi
8146     ])
8147     if test x"$libltdl_cv_preloaded_symbols" = xyes; then
8148     AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
8149     [Define if libtool can extract symbol lists from object files.])
8150     fi
8151     ])# _LT_CHECK_DLPREOPEN
8152    
8153    
8154     # LT_LIB_DLLOAD
8155     # -------------
8156     AC_DEFUN([LT_LIB_DLLOAD],
8157     [m4_pattern_allow([^LT_DLLOADERS$])
8158     LT_DLLOADERS=
8159     AC_SUBST([LT_DLLOADERS])
8160    
8161     AC_LANG_PUSH([C])
8162    
8163     LIBADD_DLOPEN=
8164     AC_SEARCH_LIBS([dlopen], [dl],
8165     [AC_DEFINE([HAVE_LIBDL], [1],
8166     [Define if you have the libdl library or equivalent.])
8167     if test "$ac_cv_search_dlopen" != "none required" ; then
8168     LIBADD_DLOPEN="-ldl"
8169     fi
8170     libltdl_cv_lib_dl_dlopen="yes"
8171     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8172     [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
8173     # include <dlfcn.h>
8174     #endif
8175     ]], [[dlopen(0, 0);]])],
8176     [AC_DEFINE([HAVE_LIBDL], [1],
8177     [Define if you have the libdl library or equivalent.])
8178     libltdl_cv_func_dlopen="yes"
8179     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8180     [AC_CHECK_LIB([svld], [dlopen],
8181     [AC_DEFINE([HAVE_LIBDL], [1],
8182     [Define if you have the libdl library or equivalent.])
8183     LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
8184     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
8185     if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
8186     then
8187     lt_save_LIBS="$LIBS"
8188     LIBS="$LIBS $LIBADD_DLOPEN"
8189     AC_CHECK_FUNCS([dlerror])
8190     LIBS="$lt_save_LIBS"
8191     fi
8192     AC_SUBST([LIBADD_DLOPEN])
8193    
8194     LIBADD_SHL_LOAD=
8195     AC_CHECK_FUNC([shl_load],
8196     [AC_DEFINE([HAVE_SHL_LOAD], [1],
8197     [Define if you have the shl_load function.])
8198     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
8199     [AC_CHECK_LIB([dld], [shl_load],
8200     [AC_DEFINE([HAVE_SHL_LOAD], [1],
8201     [Define if you have the shl_load function.])
8202     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
8203     LIBADD_SHL_LOAD="-ldld"])])
8204     AC_SUBST([LIBADD_SHL_LOAD])
8205    
8206     case $host_os in
8207     darwin[[1567]].*)
8208     # We only want this for pre-Mac OS X 10.4.
8209     AC_CHECK_FUNC([_dyld_func_lookup],
8210     [AC_DEFINE([HAVE_DYLD], [1],
8211     [Define if you have the _dyld_func_lookup function.])
8212     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
8213     ;;
8214     beos*)
8215     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
8216     ;;
8217     cygwin* | mingw* | os2* | pw32*)
8218     AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
8219     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
8220     ;;
8221     esac
8222    
8223     AC_CHECK_LIB([dld], [dld_link],
8224     [AC_DEFINE([HAVE_DLD], [1],
8225     [Define if you have the GNU dld library.])
8226     LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
8227     AC_SUBST([LIBADD_DLD_LINK])
8228    
8229     m4_pattern_allow([^LT_DLPREOPEN$])
8230     LT_DLPREOPEN=
8231     if test -n "$LT_DLLOADERS"
8232     then
8233     for lt_loader in $LT_DLLOADERS; do
8234     LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
8235     done
8236     AC_DEFINE([HAVE_LIBDLLOADER], [1],
8237     [Define if libdlloader will be built on this platform])
8238     fi
8239     AC_SUBST([LT_DLPREOPEN])
8240    
8241     dnl This isn't used anymore, but set it for backwards compatibility
8242     LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
8243     AC_SUBST([LIBADD_DL])
8244    
8245     AC_LANG_POP
8246     ])# LT_LIB_DLLOAD
8247    
8248     # Old name:
8249     AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
8250     dnl aclocal-1.4 backwards compatibility:
8251     dnl AC_DEFUN([AC_LTDL_DLLIB], [])
8252    
8253    
8254     # LT_SYS_SYMBOL_USCORE
8255     # --------------------
8256     # does the compiler prefix global symbols with an underscore?
8257     AC_DEFUN([LT_SYS_SYMBOL_USCORE],
8258     [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8259     AC_CACHE_CHECK([for _ prefix in compiled symbols],
8260     [lt_cv_sys_symbol_underscore],
8261     [lt_cv_sys_symbol_underscore=no
8262     cat > conftest.$ac_ext <<_LT_EOF
8263     void nm_test_func(){}
8264     int main(){nm_test_func;return 0;}
8265     _LT_EOF
8266     if AC_TRY_EVAL(ac_compile); then
8267     # Now try to grab the symbols.
8268     ac_nlist=conftest.nm
8269     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
8270     # See whether the symbols have a leading underscore.
8271     if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
8272     lt_cv_sys_symbol_underscore=yes
8273     else
8274     if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
8275     :
8276     else
8277     echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
8278     fi
8279     fi
8280     else
8281     echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
8282     fi
8283     else
8284     echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
8285     cat conftest.c >&AS_MESSAGE_LOG_FD
8286     fi
8287     rm -rf conftest*
8288     ])
8289     sys_symbol_underscore=$lt_cv_sys_symbol_underscore
8290     AC_SUBST([sys_symbol_underscore])
8291     ])# LT_SYS_SYMBOL_USCORE
8292    
8293     # Old name:
8294     AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
8295     dnl aclocal-1.4 backwards compatibility:
8296     dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
8297    
8298    
8299     # LT_FUNC_DLSYM_USCORE
8300     # --------------------
8301     AC_DEFUN([LT_FUNC_DLSYM_USCORE],
8302     [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8303     if test x"$lt_cv_sys_symbol_underscore" = xyes; then
8304     if test x"$libltdl_cv_func_dlopen" = xyes ||
8305     test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
8306     AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
8307     [libltdl_cv_need_uscore],
8308     [libltdl_cv_need_uscore=unknown
8309     save_LIBS="$LIBS"
8310     LIBS="$LIBS $LIBADD_DLOPEN"
8311     _LT_TRY_DLOPEN_SELF(
8312     [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
8313     [], [libltdl_cv_need_uscore=cross])
8314     LIBS="$save_LIBS"
8315     ])
8316     fi
8317     fi
8318    
8319     if test x"$libltdl_cv_need_uscore" = xyes; then
8320     AC_DEFINE([NEED_USCORE], [1],
8321     [Define if dlsym() requires a leading underscore in symbol names.])
8322     fi
8323     ])# LT_FUNC_DLSYM_USCORE
8324    
8325     # Old name:
8326     AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
8327     dnl aclocal-1.4 backwards compatibility:
8328     dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
8329    
8330     # Helper functions for option handling. -*- Autoconf -*-
8331     #
8332 michael 1094 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8333     # Inc.
8334 michael 945 # Written by Gary V. Vaughan, 2004
8335     #
8336     # This file is free software; the Free Software Foundation gives
8337     # unlimited permission to copy and/or distribute it, with or without
8338     # modifications, as long as this notice is preserved.
8339    
8340 michael 1094 # serial 7 ltoptions.m4
8341 michael 945
8342     # This is to help aclocal find these macros, as it can't see m4_define.
8343     AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8344    
8345    
8346     # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8347     # ------------------------------------------
8348     m4_define([_LT_MANGLE_OPTION],
8349     [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8350    
8351    
8352     # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8353     # ---------------------------------------
8354     # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8355     # matching handler defined, dispatch to it. Other OPTION-NAMEs are
8356     # saved as a flag.
8357     m4_define([_LT_SET_OPTION],
8358     [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8359     m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8360     _LT_MANGLE_DEFUN([$1], [$2]),
8361     [m4_warning([Unknown $1 option `$2'])])[]dnl
8362     ])
8363    
8364    
8365     # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8366     # ------------------------------------------------------------
8367     # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8368     m4_define([_LT_IF_OPTION],
8369     [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8370    
8371    
8372     # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8373     # -------------------------------------------------------
8374     # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8375     # are set.
8376     m4_define([_LT_UNLESS_OPTIONS],
8377     [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8378     [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8379     [m4_define([$0_found])])])[]dnl
8380     m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8381     ])[]dnl
8382     ])
8383    
8384    
8385     # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8386     # ----------------------------------------
8387     # OPTION-LIST is a space-separated list of Libtool options associated
8388     # with MACRO-NAME. If any OPTION has a matching handler declared with
8389     # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8390     # the unknown option and exit.
8391     m4_defun([_LT_SET_OPTIONS],
8392     [# Set options
8393     m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8394     [_LT_SET_OPTION([$1], _LT_Option)])
8395    
8396     m4_if([$1],[LT_INIT],[
8397     dnl
8398     dnl Simply set some default values (i.e off) if boolean options were not
8399     dnl specified:
8400     _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8401     ])
8402     _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8403     ])
8404     dnl
8405     dnl If no reference was made to various pairs of opposing options, then
8406     dnl we run the default mode handler for the pair. For example, if neither
8407     dnl `shared' nor `disable-shared' was passed, we enable building of shared
8408     dnl archives by default:
8409     _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8410     _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8411     _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8412     _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8413     [_LT_ENABLE_FAST_INSTALL])
8414     ])
8415     ])# _LT_SET_OPTIONS
8416    
8417    
8418    
8419     # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8420     # -----------------------------------------
8421     m4_define([_LT_MANGLE_DEFUN],
8422     [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8423    
8424    
8425     # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8426     # -----------------------------------------------
8427     m4_define([LT_OPTION_DEFINE],
8428     [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8429     ])# LT_OPTION_DEFINE
8430    
8431    
8432     # dlopen
8433     # ------
8434     LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8435     ])
8436    
8437     AU_DEFUN([AC_LIBTOOL_DLOPEN],
8438     [_LT_SET_OPTION([LT_INIT], [dlopen])
8439     AC_DIAGNOSE([obsolete],
8440     [$0: Remove this warning and the call to _LT_SET_OPTION when you
8441     put the `dlopen' option into LT_INIT's first parameter.])
8442     ])
8443    
8444     dnl aclocal-1.4 backwards compatibility:
8445     dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8446    
8447    
8448     # win32-dll
8449     # ---------
8450     # Declare package support for building win32 dll's.
8451     LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8452     [enable_win32_dll=yes
8453    
8454     case $host in
8455 michael 1094 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8456 michael 945 AC_CHECK_TOOL(AS, as, false)
8457     AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8458     AC_CHECK_TOOL(OBJDUMP, objdump, false)
8459     ;;
8460     esac
8461    
8462     test -z "$AS" && AS=as
8463 michael 1094 _LT_DECL([], [AS], [1], [Assembler program])dnl
8464 michael 945
8465     test -z "$DLLTOOL" && DLLTOOL=dlltool
8466 michael 1094 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8467 michael 945
8468     test -z "$OBJDUMP" && OBJDUMP=objdump
8469 michael 1094 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8470 michael 945 ])# win32-dll
8471    
8472     AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8473     [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8474     _LT_SET_OPTION([LT_INIT], [win32-dll])
8475     AC_DIAGNOSE([obsolete],
8476     [$0: Remove this warning and the call to _LT_SET_OPTION when you
8477     put the `win32-dll' option into LT_INIT's first parameter.])
8478     ])
8479    
8480     dnl aclocal-1.4 backwards compatibility:
8481     dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8482    
8483    
8484     # _LT_ENABLE_SHARED([DEFAULT])
8485     # ----------------------------
8486     # implement the --enable-shared flag, and supports the `shared' and
8487     # `disable-shared' LT_INIT options.
8488     # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8489     m4_define([_LT_ENABLE_SHARED],
8490     [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8491     AC_ARG_ENABLE([shared],
8492     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8493     [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8494     [p=${PACKAGE-default}
8495     case $enableval in
8496     yes) enable_shared=yes ;;
8497     no) enable_shared=no ;;
8498     *)
8499     enable_shared=no
8500     # Look at the argument we got. We use all the common list separators.
8501     lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8502     for pkg in $enableval; do
8503     IFS="$lt_save_ifs"
8504     if test "X$pkg" = "X$p"; then
8505     enable_shared=yes
8506     fi
8507     done
8508     IFS="$lt_save_ifs"
8509     ;;
8510     esac],
8511     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8512    
8513     _LT_DECL([build_libtool_libs], [enable_shared], [0],
8514     [Whether or not to build shared libraries])
8515     ])# _LT_ENABLE_SHARED
8516    
8517     LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8518     LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8519    
8520     # Old names:
8521     AC_DEFUN([AC_ENABLE_SHARED],
8522     [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8523     ])
8524    
8525     AC_DEFUN([AC_DISABLE_SHARED],
8526     [_LT_SET_OPTION([LT_INIT], [disable-shared])
8527     ])
8528    
8529     AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8530     AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8531    
8532     dnl aclocal-1.4 backwards compatibility:
8533     dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8534     dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8535    
8536    
8537    
8538     # _LT_ENABLE_STATIC([DEFAULT])
8539     # ----------------------------
8540     # implement the --enable-static flag, and support the `static' and
8541     # `disable-static' LT_INIT options.
8542     # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8543     m4_define([_LT_ENABLE_STATIC],
8544     [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8545     AC_ARG_ENABLE([static],
8546     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8547     [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8548     [p=${PACKAGE-default}
8549     case $enableval in
8550     yes) enable_static=yes ;;
8551     no) enable_static=no ;;
8552     *)
8553     enable_static=no
8554     # Look at the argument we got. We use all the common list separators.
8555     lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8556     for pkg in $enableval; do
8557     IFS="$lt_save_ifs"
8558     if test "X$pkg" = "X$p"; then
8559     enable_static=yes
8560     fi
8561     done
8562     IFS="$lt_save_ifs"
8563     ;;
8564     esac],
8565     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8566    
8567     _LT_DECL([build_old_libs], [enable_static], [0],
8568     [Whether or not to build static libraries])
8569     ])# _LT_ENABLE_STATIC
8570    
8571     LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8572     LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8573    
8574     # Old names:
8575     AC_DEFUN([AC_ENABLE_STATIC],
8576     [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8577     ])
8578    
8579     AC_DEFUN([AC_DISABLE_STATIC],
8580     [_LT_SET_OPTION([LT_INIT], [disable-static])
8581     ])
8582    
8583     AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8584     AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8585    
8586     dnl aclocal-1.4 backwards compatibility:
8587     dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8588     dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8589    
8590    
8591    
8592     # _LT_ENABLE_FAST_INSTALL([DEFAULT])
8593     # ----------------------------------
8594     # implement the --enable-fast-install flag, and support the `fast-install'
8595     # and `disable-fast-install' LT_INIT options.
8596     # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8597     m4_define([_LT_ENABLE_FAST_INSTALL],
8598     [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8599     AC_ARG_ENABLE([fast-install],
8600     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8601     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8602     [p=${PACKAGE-default}
8603     case $enableval in
8604     yes) enable_fast_install=yes ;;
8605     no) enable_fast_install=no ;;
8606     *)
8607     enable_fast_install=no
8608     # Look at the argument we got. We use all the common list separators.
8609     lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8610     for pkg in $enableval; do
8611     IFS="$lt_save_ifs"
8612     if test "X$pkg" = "X$p"; then
8613     enable_fast_install=yes
8614     fi
8615     done
8616     IFS="$lt_save_ifs"
8617     ;;
8618     esac],
8619     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8620    
8621     _LT_DECL([fast_install], [enable_fast_install], [0],
8622     [Whether or not to optimize for fast installation])dnl
8623     ])# _LT_ENABLE_FAST_INSTALL
8624    
8625     LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8626     LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8627    
8628     # Old names:
8629     AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8630     [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8631     AC_DIAGNOSE([obsolete],
8632     [$0: Remove this warning and the call to _LT_SET_OPTION when you put
8633     the `fast-install' option into LT_INIT's first parameter.])
8634     ])
8635    
8636     AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8637     [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8638     AC_DIAGNOSE([obsolete],
8639     [$0: Remove this warning and the call to _LT_SET_OPTION when you put
8640     the `disable-fast-install' option into LT_INIT's first parameter.])
8641     ])
8642    
8643     dnl aclocal-1.4 backwards compatibility:
8644     dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8645     dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8646    
8647    
8648     # _LT_WITH_PIC([MODE])
8649     # --------------------
8650     # implement the --with-pic flag, and support the `pic-only' and `no-pic'
8651     # LT_INIT options.
8652     # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
8653     m4_define([_LT_WITH_PIC],
8654     [AC_ARG_WITH([pic],
8655     [AS_HELP_STRING([--with-pic],
8656     [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8657     [pic_mode="$withval"],
8658     [pic_mode=default])
8659    
8660     test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8661    
8662     _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8663     ])# _LT_WITH_PIC
8664    
8665     LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8666     LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8667    
8668     # Old name:
8669     AU_DEFUN([AC_LIBTOOL_PICMODE],
8670     [_LT_SET_OPTION([LT_INIT], [pic-only])
8671     AC_DIAGNOSE([obsolete],
8672     [$0: Remove this warning and the call to _LT_SET_OPTION when you
8673     put the `pic-only' option into LT_INIT's first parameter.])
8674     ])
8675    
8676     dnl aclocal-1.4 backwards compatibility:
8677     dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8678    
8679    
8680     m4_define([_LTDL_MODE], [])
8681     LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8682     [m4_define([_LTDL_MODE], [nonrecursive])])
8683     LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8684     [m4_define([_LTDL_MODE], [recursive])])
8685     LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8686     [m4_define([_LTDL_MODE], [subproject])])
8687    
8688     m4_define([_LTDL_TYPE], [])
8689     LT_OPTION_DEFINE([LTDL_INIT], [installable],
8690     [m4_define([_LTDL_TYPE], [installable])])
8691     LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8692     [m4_define([_LTDL_TYPE], [convenience])])
8693    
8694     # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
8695     #
8696     # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8697     # Written by Gary V. Vaughan, 2004
8698     #
8699     # This file is free software; the Free Software Foundation gives
8700     # unlimited permission to copy and/or distribute it, with or without
8701     # modifications, as long as this notice is preserved.
8702    
8703     # serial 6 ltsugar.m4
8704    
8705     # This is to help aclocal find these macros, as it can't see m4_define.
8706     AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8707    
8708    
8709     # lt_join(SEP, ARG1, [ARG2...])
8710     # -----------------------------
8711     # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8712     # associated separator.
8713     # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8714     # versions in m4sugar had bugs.
8715     m4_define([lt_join],
8716     [m4_if([$#], [1], [],
8717     [$#], [2], [[$2]],
8718     [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8719     m4_define([_lt_join],
8720     [m4_if([$#$2], [2], [],
8721     [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8722    
8723    
8724     # lt_car(LIST)
8725     # lt_cdr(LIST)
8726     # ------------
8727     # Manipulate m4 lists.
8728     # These macros are necessary as long as will still need to support
8729     # Autoconf-2.59 which quotes differently.
8730     m4_define([lt_car], [[$1]])
8731     m4_define([lt_cdr],
8732     [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8733     [$#], 1, [],
8734     [m4_dquote(m4_shift($@))])])
8735     m4_define([lt_unquote], $1)
8736    
8737    
8738     # lt_append(MACRO-NAME, STRING, [SEPARATOR])
8739     # ------------------------------------------
8740     # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8741     # Note that neither SEPARATOR nor STRING are expanded; they are appended
8742     # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8743     # No SEPARATOR is output if MACRO-NAME was previously undefined (different
8744     # than defined and empty).
8745     #
8746     # This macro is needed until we can rely on Autoconf 2.62, since earlier
8747     # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8748     m4_define([lt_append],
8749     [m4_define([$1],
8750     m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8751    
8752    
8753    
8754     # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8755     # ----------------------------------------------------------
8756     # Produce a SEP delimited list of all paired combinations of elements of
8757     # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
8758     # has the form PREFIXmINFIXSUFFIXn.
8759     # Needed until we can rely on m4_combine added in Autoconf 2.62.
8760     m4_define([lt_combine],
8761     [m4_if(m4_eval([$# > 3]), [1],
8762     [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8763     [[m4_foreach([_Lt_prefix], [$2],
8764     [m4_foreach([_Lt_suffix],
8765     ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8766     [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8767    
8768    
8769     # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8770     # -----------------------------------------------------------------------
8771     # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8772     # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8773     m4_define([lt_if_append_uniq],
8774     [m4_ifdef([$1],
8775     [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8776     [lt_append([$1], [$2], [$3])$4],
8777     [$5])],
8778     [lt_append([$1], [$2], [$3])$4])])
8779    
8780    
8781     # lt_dict_add(DICT, KEY, VALUE)
8782     # -----------------------------
8783     m4_define([lt_dict_add],
8784     [m4_define([$1($2)], [$3])])
8785    
8786    
8787     # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8788     # --------------------------------------------
8789     m4_define([lt_dict_add_subkey],
8790     [m4_define([$1($2:$3)], [$4])])
8791    
8792    
8793     # lt_dict_fetch(DICT, KEY, [SUBKEY])
8794     # ----------------------------------
8795     m4_define([lt_dict_fetch],
8796     [m4_ifval([$3],
8797     m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8798     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8799    
8800    
8801     # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8802     # -----------------------------------------------------------------
8803     m4_define([lt_if_dict_fetch],
8804     [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8805     [$5],
8806     [$6])])
8807    
8808    
8809     # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8810     # --------------------------------------------------------------
8811     m4_define([lt_dict_filter],
8812     [m4_if([$5], [], [],
8813     [lt_join(m4_quote(m4_default([$4], [[, ]])),
8814     lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8815     [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8816     ])
8817    
8818     # ltversion.m4 -- version numbers -*- Autoconf -*-
8819     #
8820     # Copyright (C) 2004 Free Software Foundation, Inc.
8821     # Written by Scott James Remnant, 2004
8822     #
8823     # This file is free software; the Free Software Foundation gives
8824     # unlimited permission to copy and/or distribute it, with or without
8825     # modifications, as long as this notice is preserved.
8826    
8827     # Generated from ltversion.in.
8828    
8829 michael 1094 # serial 3175 ltversion.m4
8830 michael 945 # This file is part of GNU Libtool
8831    
8832 michael 1094 m4_define([LT_PACKAGE_VERSION], [2.2.10])
8833     m4_define([LT_PACKAGE_REVISION], [1.3175])
8834 michael 945
8835     AC_DEFUN([LTVERSION_VERSION],
8836 michael 1094 [macro_version='2.2.10'
8837     macro_revision='1.3175'
8838 michael 945 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8839     _LT_DECL(, macro_revision, 0)
8840     ])
8841    
8842     # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
8843     #
8844 michael 1094 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
8845 michael 945 # Written by Scott James Remnant, 2004.
8846     #
8847     # This file is free software; the Free Software Foundation gives
8848     # unlimited permission to copy and/or distribute it, with or without
8849     # modifications, as long as this notice is preserved.
8850    
8851 michael 1094 # serial 5 lt~obsolete.m4
8852 michael 945
8853     # These exist entirely to fool aclocal when bootstrapping libtool.
8854     #
8855     # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8856     # which have later been changed to m4_define as they aren't part of the
8857     # exported API, or moved to Autoconf or Automake where they belong.
8858     #
8859     # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
8860     # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8861     # using a macro with the same name in our local m4/libtool.m4 it'll
8862     # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8863     # and doesn't know about Autoconf macros at all.)
8864     #
8865     # So we provide this file, which has a silly filename so it's always
8866     # included after everything else. This provides aclocal with the
8867     # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8868     # because those macros already exist, or will be overwritten later.
8869     # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
8870     #
8871     # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8872     # Yes, that means every name once taken will need to remain here until
8873     # we give up compatibility with versions before 1.7, at which point
8874     # we need to keep only those names which we still refer to.
8875    
8876     # This is to help aclocal find these macros, as it can't see m4_define.
8877     AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8878    
8879     m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8880     m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
8881     m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8882     m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
8883     m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8884     m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
8885     m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
8886     m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8887     m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
8888     m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
8889     m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
8890     m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8891     m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8892     m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8893     m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8894     m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8895     m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
8896     m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8897     m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8898     m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
8899     m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
8900     m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8901     m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8902     m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8903     m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8904     m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8905     m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8906     m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8907     m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
8908     m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
8909     m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
8910     m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8911     m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8912     m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
8913     m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
8914     m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8915     m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8916     m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
8917     m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8918     m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
8919     m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
8920     m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
8921     m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8922     m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8923     m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8924     m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8925     m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8926     m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8927     m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8928     m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8929     m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8930     m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8931     m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
8932     m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8933 michael 1094 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
8934     m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
8935     m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
8936     m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
8937     m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
8938     m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
8939     m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
8940 michael 945
8941     # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
8942     #
8943 michael 912 # This file is free software; the Free Software Foundation
8944     # gives unlimited permission to copy and/or distribute it,
8945     # with or without modifications, as long as this notice is preserved.
8946    
8947     # AM_AUTOMAKE_VERSION(VERSION)
8948     # ----------------------------
8949     # Automake X.Y traces this macro to ensure aclocal.m4 has been
8950     # generated from the m4 files accompanying Automake X.Y.
8951     # (This private macro should not be called outside this file.)
8952     AC_DEFUN([AM_AUTOMAKE_VERSION],
8953 michael 945 [am__api_version='1.11'
8954 michael 912 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8955     dnl require some minimum version. Point them to the right macro.
8956 michael 1043 m4_if([$1], [1.11.1], [],
8957 michael 912 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8958     ])
8959    
8960     # _AM_AUTOCONF_VERSION(VERSION)
8961     # -----------------------------
8962     # aclocal traces this macro to find the Autoconf version.
8963     # This is a private macro too. Using m4_define simplifies
8964     # the logic in aclocal, which can simply ignore this definition.
8965     m4_define([_AM_AUTOCONF_VERSION], [])
8966    
8967     # AM_SET_CURRENT_AUTOMAKE_VERSION
8968     # -------------------------------
8969     # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8970 michael 945 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8971 michael 912 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8972 michael 1043 [AM_AUTOMAKE_VERSION([1.11.1])dnl
8973 db 941 m4_ifndef([AC_AUTOCONF_VERSION],
8974     [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8975 michael 945 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8976 michael 912
8977     # AM_AUX_DIR_EXPAND -*- Autoconf -*-
8978    
8979     # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
8980     #
8981     # This file is free software; the Free Software Foundation
8982     # gives unlimited permission to copy and/or distribute it,
8983     # with or without modifications, as long as this notice is preserved.
8984    
8985     # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8986     # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
8987     # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8988     #
8989     # Of course, Automake must honor this variable whenever it calls a
8990     # tool from the auxiliary directory. The problem is that $srcdir (and
8991     # therefore $ac_aux_dir as well) can be either absolute or relative,
8992     # depending on how configure is run. This is pretty annoying, since
8993     # it makes $ac_aux_dir quite unusable in subdirectories: in the top
8994     # source directory, any form will work fine, but in subdirectories a
8995     # relative path needs to be adjusted first.
8996     #
8997     # $ac_aux_dir/missing
8998     # fails when called from a subdirectory if $ac_aux_dir is relative
8999     # $top_srcdir/$ac_aux_dir/missing
9000     # fails if $ac_aux_dir is absolute,
9001     # fails when called from a subdirectory in a VPATH build with
9002     # a relative $ac_aux_dir
9003     #
9004     # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9005     # are both prefixed by $srcdir. In an in-source build this is usually
9006     # harmless because $srcdir is `.', but things will broke when you
9007     # start a VPATH build or use an absolute $srcdir.
9008     #
9009     # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9010     # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
9011     # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9012     # and then we would define $MISSING as
9013     # MISSING="\${SHELL} $am_aux_dir/missing"
9014     # This will work as long as MISSING is not called from configure, because
9015     # unfortunately $(top_srcdir) has no meaning in configure.
9016     # However there are other variables, like CC, which are often used in
9017     # configure, and could therefore not use this "fixed" $ac_aux_dir.
9018     #
9019     # Another solution, used here, is to always expand $ac_aux_dir to an
9020     # absolute PATH. The drawback is that using absolute paths prevent a
9021     # configured tree to be moved without reconfiguration.
9022    
9023     AC_DEFUN([AM_AUX_DIR_EXPAND],
9024     [dnl Rely on autoconf to set up CDPATH properly.
9025     AC_PREREQ([2.50])dnl
9026     # expand $ac_aux_dir to an absolute path
9027     am_aux_dir=`cd $ac_aux_dir && pwd`
9028     ])
9029    
9030     # AM_CONDITIONAL -*- Autoconf -*-
9031    
9032 michael 945 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9033 michael 912 # Free Software Foundation, Inc.
9034     #
9035     # This file is free software; the Free Software Foundation
9036     # gives unlimited permission to copy and/or distribute it,
9037     # with or without modifications, as long as this notice is preserved.
9038    
9039 michael 945 # serial 9
9040 michael 912
9041     # AM_CONDITIONAL(NAME, SHELL-CONDITION)
9042     # -------------------------------------
9043     # Define a conditional.
9044     AC_DEFUN([AM_CONDITIONAL],
9045     [AC_PREREQ(2.52)dnl
9046     ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
9047     [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9048     AC_SUBST([$1_TRUE])dnl
9049     AC_SUBST([$1_FALSE])dnl
9050     _AM_SUBST_NOTMAKE([$1_TRUE])dnl
9051     _AM_SUBST_NOTMAKE([$1_FALSE])dnl
9052 michael 945 m4_define([_AM_COND_VALUE_$1], [$2])dnl
9053 michael 912 if $2; then
9054     $1_TRUE=
9055     $1_FALSE='#'
9056     else
9057     $1_TRUE='#'
9058     $1_FALSE=
9059     fi
9060     AC_CONFIG_COMMANDS_PRE(
9061     [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9062     AC_MSG_ERROR([[conditional "$1" was never defined.
9063     Usually this means the macro was only invoked conditionally.]])
9064     fi])])
9065    
9066 michael 945 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9067 michael 912 # Free Software Foundation, Inc.
9068     #
9069     # This file is free software; the Free Software Foundation
9070     # gives unlimited permission to copy and/or distribute it,
9071     # with or without modifications, as long as this notice is preserved.
9072    
9073 michael 945 # serial 10
9074 michael 912
9075     # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9076     # written in clear, in which case automake, when reading aclocal.m4,
9077     # will think it sees a *use*, and therefore will trigger all it's
9078     # C support machinery. Also note that it means that autoscan, seeing
9079     # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9080    
9081    
9082     # _AM_DEPENDENCIES(NAME)
9083     # ----------------------
9084     # See how the compiler implements dependency checking.
9085     # NAME is "CC", "CXX", "GCJ", or "OBJC".
9086     # We try a few techniques and use that to set a single cache variable.
9087     #
9088     # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9089     # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9090     # dependency, and given that the user is not expected to run this macro,
9091     # just rely on AC_PROG_CC.
9092     AC_DEFUN([_AM_DEPENDENCIES],
9093     [AC_REQUIRE([AM_SET_DEPDIR])dnl
9094     AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9095     AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9096     AC_REQUIRE([AM_DEP_TRACK])dnl
9097    
9098     ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
9099     [$1], CXX, [depcc="$CXX" am_compiler_list=],
9100     [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9101     [$1], UPC, [depcc="$UPC" am_compiler_list=],
9102     [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
9103     [depcc="$$1" am_compiler_list=])
9104    
9105     AC_CACHE_CHECK([dependency style of $depcc],
9106     [am_cv_$1_dependencies_compiler_type],
9107     [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9108     # We make a subdir and do the tests there. Otherwise we can end up
9109     # making bogus files that we don't know about and never remove. For
9110     # instance it was reported that on HP-UX the gcc test will end up
9111     # making a dummy file named `D' -- because `-MD' means `put the output
9112     # in D'.
9113     mkdir conftest.dir
9114     # Copy depcomp to subdir because otherwise we won't find it if we're
9115     # using a relative directory.
9116     cp "$am_depcomp" conftest.dir
9117     cd conftest.dir
9118     # We will build objects and dependencies in a subdirectory because
9119     # it helps to detect inapplicable dependency modes. For instance
9120     # both Tru64's cc and ICC support -MD to output dependencies as a
9121     # side effect of compilation, but ICC will put the dependencies in
9122     # the current directory while Tru64 will put them in the object
9123     # directory.
9124     mkdir sub
9125    
9126     am_cv_$1_dependencies_compiler_type=none
9127     if test "$am_compiler_list" = ""; then
9128     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9129     fi
9130 michael 945 am__universal=false
9131     m4_case([$1], [CC],
9132     [case " $depcc " in #(
9133     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9134     esac],
9135     [CXX],
9136     [case " $depcc " in #(
9137     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9138     esac])
9139    
9140 michael 912 for depmode in $am_compiler_list; do
9141     # Setup a source with many dependencies, because some compilers
9142     # like to wrap large dependency lists on column 80 (with \), and
9143     # we should not choose a depcomp mode which is confused by this.
9144     #
9145     # We need to recreate these files for each test, as the compiler may
9146     # overwrite some of them when testing with obscure command lines.
9147     # This happens at least with the AIX C compiler.
9148     : > sub/conftest.c
9149     for i in 1 2 3 4 5 6; do
9150     echo '#include "conftst'$i'.h"' >> sub/conftest.c
9151     # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9152     # Solaris 8's {/usr,}/bin/sh.
9153     touch sub/conftst$i.h
9154     done
9155     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9156    
9157 michael 945 # We check with `-c' and `-o' for the sake of the "dashmstdout"
9158     # mode. It turns out that the SunPro C++ compiler does not properly
9159     # handle `-M -o', and we need to detect this. Also, some Intel
9160     # versions had trouble with output in subdirs
9161     am__obj=sub/conftest.${OBJEXT-o}
9162     am__minus_obj="-o $am__obj"
9163 michael 912 case $depmode in
9164 michael 945 gcc)
9165     # This depmode causes a compiler race in universal mode.
9166     test "$am__universal" = false || continue
9167     ;;
9168 michael 912 nosideeffect)
9169     # after this tag, mechanisms are not by side-effect, so they'll
9170     # only be used when explicitly requested
9171     if test "x$enable_dependency_tracking" = xyes; then
9172     continue
9173     else
9174     break
9175     fi
9176     ;;
9177 michael 945 msvisualcpp | msvcmsys)
9178     # This compiler won't grok `-c -o', but also, the minuso test has
9179     # not run yet. These depmodes are late enough in the game, and
9180     # so weak that their functioning should not be impacted.
9181     am__obj=conftest.${OBJEXT-o}
9182     am__minus_obj=
9183     ;;
9184 michael 912 none) break ;;
9185     esac
9186     if depmode=$depmode \
9187 michael 945 source=sub/conftest.c object=$am__obj \
9188 michael 912 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9189 michael 945 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9190 michael 912 >/dev/null 2>conftest.err &&
9191     grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9192     grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9193 michael 945 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9194 michael 912 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9195     # icc doesn't choke on unknown options, it will just issue warnings
9196     # or remarks (even with -Werror). So we grep stderr for any message
9197     # that says an option was ignored or not supported.
9198     # When given -MP, icc 7.0 and 7.1 complain thusly:
9199     # icc: Command line warning: ignoring option '-M'; no argument required
9200     # The diagnosis changed in icc 8.0:
9201     # icc: Command line remark: option '-MP' not supported
9202     if (grep 'ignoring option' conftest.err ||
9203     grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9204     am_cv_$1_dependencies_compiler_type=$depmode
9205     break
9206     fi
9207     fi
9208     done
9209    
9210     cd ..
9211     rm -rf conftest.dir
9212     else
9213     am_cv_$1_dependencies_compiler_type=none
9214     fi
9215     ])
9216     AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9217     AM_CONDITIONAL([am__fastdep$1], [
9218     test "x$enable_dependency_tracking" != xno \
9219     && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9220     ])
9221    
9222    
9223     # AM_SET_DEPDIR
9224     # -------------
9225     # Choose a directory name for dependency files.
9226     # This macro is AC_REQUIREd in _AM_DEPENDENCIES
9227     AC_DEFUN([AM_SET_DEPDIR],
9228     [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9229     AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9230     ])
9231    
9232    
9233     # AM_DEP_TRACK
9234     # ------------
9235     AC_DEFUN([AM_DEP_TRACK],
9236     [AC_ARG_ENABLE(dependency-tracking,
9237     [ --disable-dependency-tracking speeds up one-time build
9238     --enable-dependency-tracking do not reject slow dependency extractors])
9239     if test "x$enable_dependency_tracking" != xno; then
9240     am_depcomp="$ac_aux_dir/depcomp"
9241     AMDEPBACKSLASH='\'
9242     fi
9243     AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9244     AC_SUBST([AMDEPBACKSLASH])dnl
9245     _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9246     ])
9247    
9248     # Generate code to set up dependency tracking. -*- Autoconf -*-
9249    
9250 michael 945 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9251 michael 912 # Free Software Foundation, Inc.
9252     #
9253     # This file is free software; the Free Software Foundation
9254     # gives unlimited permission to copy and/or distribute it,
9255     # with or without modifications, as long as this notice is preserved.
9256    
9257 michael 945 #serial 5
9258 michael 912
9259     # _AM_OUTPUT_DEPENDENCY_COMMANDS
9260     # ------------------------------
9261     AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9262 michael 945 [{
9263     # Autoconf 2.62 quotes --file arguments for eval, but not when files
9264     # are listed without --file. Let's play safe and only enable the eval
9265     # if we detect the quoting.
9266     case $CONFIG_FILES in
9267     *\'*) eval set x "$CONFIG_FILES" ;;
9268     *) set x $CONFIG_FILES ;;
9269     esac
9270     shift
9271     for mf
9272     do
9273     # Strip MF so we end up with the name of the file.
9274     mf=`echo "$mf" | sed -e 's/:.*$//'`
9275     # Check whether this is an Automake generated Makefile or not.
9276     # We used to match only the files named `Makefile.in', but
9277     # some people rename them; so instead we look at the file content.
9278     # Grep'ing the first line is not enough: some people post-process
9279     # each Makefile.in and add a new line on top of each file to say so.
9280     # Grep'ing the whole file is not good either: AIX grep has a line
9281     # limit of 2048, but all sed's we know have understand at least 4000.
9282     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9283     dirpart=`AS_DIRNAME("$mf")`
9284     else
9285     continue
9286     fi
9287     # Extract the definition of DEPDIR, am__include, and am__quote
9288     # from the Makefile without running `make'.
9289     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9290     test -z "$DEPDIR" && continue
9291     am__include=`sed -n 's/^am__include = //p' < "$mf"`
9292     test -z "am__include" && continue
9293     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9294     # When using ansi2knr, U may be empty or an underscore; expand it
9295     U=`sed -n 's/^U = //p' < "$mf"`
9296     # Find all dependency output files, they are included files with
9297     # $(DEPDIR) in their names. We invoke sed twice because it is the
9298     # simplest approach to changing $(DEPDIR) to its actual value in the
9299     # expansion.
9300     for file in `sed -n "
9301     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9302     sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9303     # Make sure the directory exists.
9304     test -f "$dirpart/$file" && continue
9305     fdir=`AS_DIRNAME(["$file"])`
9306     AS_MKDIR_P([$dirpart/$fdir])
9307     # echo "creating $dirpart/$file"
9308     echo '# dummy' > "$dirpart/$file"
9309     done
9310 michael 912 done
9311 michael 945 }
9312 michael 912 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9313    
9314    
9315     # AM_OUTPUT_DEPENDENCY_COMMANDS
9316     # -----------------------------
9317     # This macro should only be invoked once -- use via AC_REQUIRE.
9318     #
9319     # This code is only required when automatic dependency tracking
9320     # is enabled. FIXME. This creates each `.P' file that we will
9321     # need in order to bootstrap the dependency handling code.
9322     AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9323     [AC_CONFIG_COMMANDS([depfiles],
9324     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9325     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9326     ])
9327    
9328     # Do all the work for Automake. -*- Autoconf -*-
9329    
9330     # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9331 michael 945 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9332 michael 912 #
9333     # This file is free software; the Free Software Foundation
9334     # gives unlimited permission to copy and/or distribute it,
9335     # with or without modifications, as long as this notice is preserved.
9336    
9337 michael 945 # serial 16
9338 michael 912
9339     # This macro actually does too much. Some checks are only needed if
9340     # your package does certain things. But this isn't really a big deal.
9341    
9342     # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9343     # AM_INIT_AUTOMAKE([OPTIONS])
9344     # -----------------------------------------------
9345     # The call with PACKAGE and VERSION arguments is the old style
9346     # call (pre autoconf-2.50), which is being phased out. PACKAGE
9347     # and VERSION should now be passed to AC_INIT and removed from
9348     # the call to AM_INIT_AUTOMAKE.
9349     # We support both call styles for the transition. After
9350     # the next Automake release, Autoconf can make the AC_INIT
9351     # arguments mandatory, and then we can depend on a new Autoconf
9352     # release and drop the old call support.
9353     AC_DEFUN([AM_INIT_AUTOMAKE],
9354 michael 945 [AC_PREREQ([2.62])dnl
9355 michael 912 dnl Autoconf wants to disallow AM_ names. We explicitly allow
9356     dnl the ones we care about.
9357     m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9358     AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9359     AC_REQUIRE([AC_PROG_INSTALL])dnl
9360     if test "`cd $srcdir && pwd`" != "`pwd`"; then
9361     # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9362     # is not polluted with repeated "-I."
9363     AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9364     # test to see if srcdir already configured
9365     if test -f $srcdir/config.status; then
9366     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9367     fi
9368     fi
9369    
9370     # test whether we have cygpath
9371     if test -z "$CYGPATH_W"; then
9372     if (cygpath --version) >/dev/null 2>/dev/null; then
9373     CYGPATH_W='cygpath -w'
9374     else
9375     CYGPATH_W=echo
9376     fi
9377     fi
9378     AC_SUBST([CYGPATH_W])
9379    
9380     # Define the identity of the package.
9381     dnl Distinguish between old-style and new-style calls.
9382     m4_ifval([$2],
9383     [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9384     AC_SUBST([PACKAGE], [$1])dnl
9385     AC_SUBST([VERSION], [$2])],
9386     [_AM_SET_OPTIONS([$1])dnl
9387     dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9388     m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9389     [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9390     AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9391     AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9392    
9393     _AM_IF_OPTION([no-define],,
9394     [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9395     AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9396    
9397     # Some tools Automake needs.
9398     AC_REQUIRE([AM_SANITY_CHECK])dnl
9399     AC_REQUIRE([AC_ARG_PROGRAM])dnl
9400     AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9401     AM_MISSING_PROG(AUTOCONF, autoconf)
9402     AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9403     AM_MISSING_PROG(AUTOHEADER, autoheader)
9404     AM_MISSING_PROG(MAKEINFO, makeinfo)
9405 michael 945 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9406     AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9407 michael 912 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9408     # We need awk for the "check" target. The system "awk" is bad on
9409     # some platforms.
9410     AC_REQUIRE([AC_PROG_AWK])dnl
9411     AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9412     AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9413     _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9414 michael 945 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9415     [_AM_PROG_TAR([v7])])])
9416 michael 912 _AM_IF_OPTION([no-dependencies],,
9417     [AC_PROVIDE_IFELSE([AC_PROG_CC],
9418 michael 945 [_AM_DEPENDENCIES(CC)],
9419     [define([AC_PROG_CC],
9420     defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9421 michael 912 AC_PROVIDE_IFELSE([AC_PROG_CXX],
9422 michael 945 [_AM_DEPENDENCIES(CXX)],
9423     [define([AC_PROG_CXX],
9424     defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9425 michael 912 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9426 michael 945 [_AM_DEPENDENCIES(OBJC)],
9427     [define([AC_PROG_OBJC],
9428     defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9429 michael 912 ])
9430 michael 945 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9431     dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9432     dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
9433     dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9434     AC_CONFIG_COMMANDS_PRE(dnl
9435     [m4_provide_if([_AM_COMPILER_EXEEXT],
9436     [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9437 michael 912 ])
9438    
9439 michael 945 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
9440     dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9441     dnl mangled by Autoconf and run in a shell conditional statement.
9442     m4_define([_AC_COMPILER_EXEEXT],
9443     m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9444 michael 912
9445 michael 945
9446 michael 912 # When config.status generates a header, we must update the stamp-h file.
9447     # This file resides in the same directory as the config header
9448     # that is generated. The stamp files are numbered to have different names.
9449    
9450     # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9451     # loop where config.status creates the headers, so we can generate
9452     # our stamp files there.
9453     AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9454     [# Compute $1's index in $config_headers.
9455 db 941 _am_arg=$1
9456 michael 912 _am_stamp_count=1
9457     for _am_header in $config_headers :; do
9458     case $_am_header in
9459 db 941 $_am_arg | $_am_arg:* )
9460 michael 912 break ;;
9461     * )
9462     _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9463     esac
9464     done
9465 db 941 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9466 michael 912
9467 michael 945 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
9468 michael 912 #
9469     # This file is free software; the Free Software Foundation
9470     # gives unlimited permission to copy and/or distribute it,
9471     # with or without modifications, as long as this notice is preserved.
9472    
9473     # AM_PROG_INSTALL_SH
9474     # ------------------
9475     # Define $install_sh.
9476     AC_DEFUN([AM_PROG_INSTALL_SH],
9477     [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9478 michael 945 if test x"${install_sh}" != xset; then
9479     case $am_aux_dir in
9480     *\ * | *\ *)
9481     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9482     *)
9483     install_sh="\${SHELL} $am_aux_dir/install-sh"
9484     esac
9485     fi
9486 michael 912 AC_SUBST(install_sh)])
9487    
9488     # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
9489     #
9490     # This file is free software; the Free Software Foundation
9491     # gives unlimited permission to copy and/or distribute it,
9492     # with or without modifications, as long as this notice is preserved.
9493    
9494     # serial 2
9495    
9496     # Check whether the underlying file-system supports filenames
9497     # with a leading dot. For instance MS-DOS doesn't.
9498     AC_DEFUN([AM_SET_LEADING_DOT],
9499     [rm -rf .tst 2>/dev/null
9500     mkdir .tst 2>/dev/null
9501     if test -d .tst; then
9502     am__leading_dot=.
9503     else
9504     am__leading_dot=_
9505     fi
9506     rmdir .tst 2>/dev/null
9507     AC_SUBST([am__leading_dot])])
9508    
9509     # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
9510     # Free Software Foundation, Inc.
9511     #
9512     # This file is free software; the Free Software Foundation
9513     # gives unlimited permission to copy and/or distribute it,
9514     # with or without modifications, as long as this notice is preserved.
9515    
9516     # serial 5
9517    
9518     # AM_PROG_LEX
9519     # -----------
9520     # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
9521     # "missing" invocation, for better error output.
9522     AC_DEFUN([AM_PROG_LEX],
9523     [AC_PREREQ(2.50)dnl
9524     AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
9525     AC_REQUIRE([AC_PROG_LEX])dnl
9526     if test "$LEX" = :; then
9527     LEX=${am_missing_run}flex
9528     fi])
9529    
9530     # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
9531     # From Jim Meyering
9532    
9533 michael 945 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9534 michael 912 # Free Software Foundation, Inc.
9535     #
9536     # This file is free software; the Free Software Foundation
9537     # gives unlimited permission to copy and/or distribute it,
9538     # with or without modifications, as long as this notice is preserved.
9539    
9540 michael 945 # serial 5
9541 michael 912
9542 michael 945 # AM_MAINTAINER_MODE([DEFAULT-MODE])
9543     # ----------------------------------
9544     # Control maintainer-specific portions of Makefiles.
9545     # Default is to disable them, unless `enable' is passed literally.
9546     # For symmetry, `disable' may be passed as well. Anyway, the user
9547     # can override the default with the --enable/--disable switch.
9548 michael 912 AC_DEFUN([AM_MAINTAINER_MODE],
9549 michael 945 [m4_case(m4_default([$1], [disable]),
9550     [enable], [m4_define([am_maintainer_other], [disable])],
9551     [disable], [m4_define([am_maintainer_other], [enable])],
9552     [m4_define([am_maintainer_other], [enable])
9553     m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
9554     AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
9555     dnl maintainer-mode's default is 'disable' unless 'enable' is passed
9556     AC_ARG_ENABLE([maintainer-mode],
9557     [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
9558 michael 912 (and sometimes confusing) to the casual installer],
9559 michael 945 [USE_MAINTAINER_MODE=$enableval],
9560     [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
9561 michael 912 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
9562 michael 945 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
9563 michael 912 MAINT=$MAINTAINER_MODE_TRUE
9564 michael 945 AC_SUBST([MAINT])dnl
9565 michael 912 ]
9566     )
9567    
9568     AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9569    
9570     # Check to see how 'make' treats includes. -*- Autoconf -*-
9571    
9572 michael 945 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
9573 michael 912 #
9574     # This file is free software; the Free Software Foundation
9575     # gives unlimited permission to copy and/or distribute it,
9576     # with or without modifications, as long as this notice is preserved.
9577    
9578 michael 945 # serial 4
9579 michael 912
9580     # AM_MAKE_INCLUDE()
9581     # -----------------
9582     # Check to see how make treats includes.
9583     AC_DEFUN([AM_MAKE_INCLUDE],
9584     [am_make=${MAKE-make}
9585     cat > confinc << 'END'
9586     am__doit:
9587 michael 945 @echo this is the am__doit target
9588 michael 912 .PHONY: am__doit
9589     END
9590     # If we don't find an include directive, just comment out the code.
9591     AC_MSG_CHECKING([for style of include used by $am_make])
9592     am__include="#"
9593     am__quote=
9594     _am_result=none
9595     # First try GNU make style include.
9596     echo "include confinc" > confmf
9597 michael 945 # Ignore all kinds of additional output from `make'.
9598     case `$am_make -s -f confmf 2> /dev/null` in #(
9599     *the\ am__doit\ target*)
9600     am__include=include
9601     am__quote=
9602     _am_result=GNU
9603     ;;
9604     esac
9605 michael 912 # Now try BSD make style include.
9606     if test "$am__include" = "#"; then
9607     echo '.include "confinc"' > confmf
9608 michael 945 case `$am_make -s -f confmf 2> /dev/null` in #(
9609     *the\ am__doit\ target*)
9610     am__include=.include
9611     am__quote="\""
9612     _am_result=BSD
9613     ;;
9614     esac
9615 michael 912 fi
9616     AC_SUBST([am__include])
9617     AC_SUBST([am__quote])
9618     AC_MSG_RESULT([$_am_result])
9619     rm -f confinc confmf
9620     ])
9621    
9622     # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
9623    
9624 michael 945 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
9625 michael 912 # Free Software Foundation, Inc.
9626     #
9627     # This file is free software; the Free Software Foundation
9628     # gives unlimited permission to copy and/or distribute it,
9629     # with or without modifications, as long as this notice is preserved.
9630    
9631 michael 945 # serial 6
9632 michael 912
9633     # AM_MISSING_PROG(NAME, PROGRAM)
9634     # ------------------------------
9635     AC_DEFUN([AM_MISSING_PROG],
9636     [AC_REQUIRE([AM_MISSING_HAS_RUN])
9637     $1=${$1-"${am_missing_run}$2"}
9638     AC_SUBST($1)])
9639    
9640    
9641     # AM_MISSING_HAS_RUN
9642     # ------------------
9643     # Define MISSING if not defined so far and test if it supports --run.
9644     # If it does, set am_missing_run to use it, otherwise, to nothing.
9645     AC_DEFUN([AM_MISSING_HAS_RUN],
9646     [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9647     AC_REQUIRE_AUX_FILE([missing])dnl
9648 michael 945 if test x"${MISSING+set}" != xset; then
9649     case $am_aux_dir in
9650     *\ * | *\ *)
9651     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
9652     *)
9653     MISSING="\${SHELL} $am_aux_dir/missing" ;;
9654     esac
9655     fi
9656 michael 912 # Use eval to expand $SHELL
9657     if eval "$MISSING --run true"; then
9658     am_missing_run="$MISSING --run "
9659     else
9660     am_missing_run=
9661     AC_MSG_WARN([`missing' script is too old or missing])
9662     fi
9663     ])
9664    
9665     # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
9666     #
9667     # This file is free software; the Free Software Foundation
9668     # gives unlimited permission to copy and/or distribute it,
9669     # with or without modifications, as long as this notice is preserved.
9670    
9671     # AM_PROG_MKDIR_P
9672     # ---------------
9673     # Check for `mkdir -p'.
9674     AC_DEFUN([AM_PROG_MKDIR_P],
9675     [AC_PREREQ([2.60])dnl
9676     AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9677     dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
9678     dnl while keeping a definition of mkdir_p for backward compatibility.
9679     dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9680     dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9681     dnl Makefile.ins that do not define MKDIR_P, so we do our own
9682     dnl adjustment using top_builddir (which is defined more often than
9683     dnl MKDIR_P).
9684     AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9685     case $mkdir_p in
9686     [[\\/$]]* | ?:[[\\/]]*) ;;
9687     */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9688     esac
9689     ])
9690    
9691     # Helper functions for option handling. -*- Autoconf -*-
9692    
9693 michael 945 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
9694 michael 912 #
9695     # This file is free software; the Free Software Foundation
9696     # gives unlimited permission to copy and/or distribute it,
9697     # with or without modifications, as long as this notice is preserved.
9698    
9699 michael 945 # serial 4
9700 michael 912
9701     # _AM_MANGLE_OPTION(NAME)
9702     # -----------------------
9703     AC_DEFUN([_AM_MANGLE_OPTION],
9704     [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9705    
9706     # _AM_SET_OPTION(NAME)
9707     # ------------------------------
9708     # Set option NAME. Presently that only means defining a flag for this option.
9709     AC_DEFUN([_AM_SET_OPTION],
9710     [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9711    
9712     # _AM_SET_OPTIONS(OPTIONS)
9713     # ----------------------------------
9714     # OPTIONS is a space-separated list of Automake options.
9715     AC_DEFUN([_AM_SET_OPTIONS],
9716 michael 945 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9717 michael 912
9718     # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9719     # -------------------------------------------
9720     # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9721     AC_DEFUN([_AM_IF_OPTION],
9722     [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9723    
9724     # Check to make sure that the build environment is sane. -*- Autoconf -*-
9725    
9726 michael 945 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
9727 michael 912 # Free Software Foundation, Inc.
9728     #
9729     # This file is free software; the Free Software Foundation
9730     # gives unlimited permission to copy and/or distribute it,
9731     # with or without modifications, as long as this notice is preserved.
9732    
9733 michael 945 # serial 5
9734 michael 912
9735     # AM_SANITY_CHECK
9736     # ---------------
9737     AC_DEFUN([AM_SANITY_CHECK],
9738     [AC_MSG_CHECKING([whether build environment is sane])
9739     # Just in case
9740     sleep 1
9741     echo timestamp > conftest.file
9742 michael 945 # Reject unsafe characters in $srcdir or the absolute working directory
9743     # name. Accept space and tab only in the latter.
9744     am_lf='
9745     '
9746     case `pwd` in
9747     *[[\\\"\#\$\&\'\`$am_lf]]*)
9748     AC_MSG_ERROR([unsafe absolute working directory name]);;
9749     esac
9750     case $srcdir in
9751     *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
9752     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
9753     esac
9754    
9755 michael 912 # Do `set' in a subshell so we don't clobber the current shell's
9756     # arguments. Must try -L first in case configure is actually a
9757     # symlink; some systems play weird games with the mod time of symlinks
9758     # (eg FreeBSD returns the mod time of the symlink's containing
9759     # directory).
9760     if (
9761 michael 945 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
9762 michael 912 if test "$[*]" = "X"; then
9763     # -L didn't work.
9764 michael 945 set X `ls -t "$srcdir/configure" conftest.file`
9765 michael 912 fi
9766     rm -f conftest.file
9767     if test "$[*]" != "X $srcdir/configure conftest.file" \
9768     && test "$[*]" != "X conftest.file $srcdir/configure"; then
9769    
9770     # If neither matched, then we have a broken ls. This can happen
9771     # if, for instance, CONFIG_SHELL is bash and it inherits a
9772     # broken ls alias from the environment. This has actually
9773     # happened. Such a system could not be considered "sane".
9774     AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
9775     alias in your environment])
9776     fi
9777    
9778     test "$[2]" = conftest.file
9779     )
9780     then
9781     # Ok.
9782     :
9783     else
9784     AC_MSG_ERROR([newly created file is older than distributed files!
9785     Check your system clock])
9786     fi
9787     AC_MSG_RESULT(yes)])
9788    
9789     # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9790     #
9791     # This file is free software; the Free Software Foundation
9792     # gives unlimited permission to copy and/or distribute it,
9793     # with or without modifications, as long as this notice is preserved.
9794    
9795     # AM_PROG_INSTALL_STRIP
9796     # ---------------------
9797     # One issue with vendor `install' (even GNU) is that you can't
9798     # specify the program used to strip binaries. This is especially
9799     # annoying in cross-compiling environments, where the build's strip
9800     # is unlikely to handle the host's binaries.
9801     # Fortunately install-sh will honor a STRIPPROG variable, so we
9802     # always use install-sh in `make install-strip', and initialize
9803     # STRIPPROG with the value of the STRIP variable (set by the user).
9804     AC_DEFUN([AM_PROG_INSTALL_STRIP],
9805     [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9806     # Installed binaries are usually stripped using `strip' when the user
9807     # run `make install-strip'. However `strip' might not be the right
9808     # tool to use in cross-compilation environments, therefore Automake
9809     # will honor the `STRIP' environment variable to overrule this program.
9810     dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9811     if test "$cross_compiling" != no; then
9812     AC_CHECK_TOOL([STRIP], [strip], :)
9813     fi
9814     INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9815     AC_SUBST([INSTALL_STRIP_PROGRAM])])
9816    
9817 michael 945 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
9818 michael 912 #
9819     # This file is free software; the Free Software Foundation
9820     # gives unlimited permission to copy and/or distribute it,
9821     # with or without modifications, as long as this notice is preserved.
9822    
9823 michael 945 # serial 2
9824    
9825 michael 912 # _AM_SUBST_NOTMAKE(VARIABLE)
9826     # ---------------------------
9827 db 941 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9828 michael 912 # This macro is traced by Automake.
9829     AC_DEFUN([_AM_SUBST_NOTMAKE])
9830    
9831 michael 945 # AM_SUBST_NOTMAKE(VARIABLE)
9832     # ---------------------------
9833     # Public sister of _AM_SUBST_NOTMAKE.
9834     AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9835    
9836 michael 912 # Check how to create a tarball. -*- Autoconf -*-
9837    
9838     # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
9839     #
9840     # This file is free software; the Free Software Foundation
9841     # gives unlimited permission to copy and/or distribute it,
9842     # with or without modifications, as long as this notice is preserved.
9843    
9844     # serial 2
9845    
9846     # _AM_PROG_TAR(FORMAT)
9847     # --------------------
9848     # Check how to create a tarball in format FORMAT.
9849     # FORMAT should be one of `v7', `ustar', or `pax'.
9850     #
9851     # Substitute a variable $(am__tar) that is a command
9852     # writing to stdout a FORMAT-tarball containing the directory
9853     # $tardir.
9854     # tardir=directory && $(am__tar) > result.tar
9855     #
9856     # Substitute a variable $(am__untar) that extract such
9857     # a tarball read from stdin.
9858     # $(am__untar) < result.tar
9859     AC_DEFUN([_AM_PROG_TAR],
9860     [# Always define AMTAR for backward compatibility.
9861     AM_MISSING_PROG([AMTAR], [tar])
9862     m4_if([$1], [v7],
9863     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9864     [m4_case([$1], [ustar],, [pax],,
9865     [m4_fatal([Unknown tar format])])
9866     AC_MSG_CHECKING([how to create a $1 tar archive])
9867     # Loop over all known methods to create a tar archive until one works.
9868     _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9869     _am_tools=${am_cv_prog_tar_$1-$_am_tools}
9870     # Do not fold the above two line into one, because Tru64 sh and
9871     # Solaris sh will not grok spaces in the rhs of `-'.
9872     for _am_tool in $_am_tools
9873     do
9874     case $_am_tool in
9875     gnutar)
9876     for _am_tar in tar gnutar gtar;
9877     do
9878     AM_RUN_LOG([$_am_tar --version]) && break
9879     done
9880     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9881     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9882     am__untar="$_am_tar -xf -"
9883     ;;
9884     plaintar)
9885     # Must skip GNU tar: if it does not support --format= it doesn't create
9886     # ustar tarball either.
9887     (tar --version) >/dev/null 2>&1 && continue
9888     am__tar='tar chf - "$$tardir"'
9889     am__tar_='tar chf - "$tardir"'
9890     am__untar='tar xf -'
9891     ;;
9892     pax)
9893     am__tar='pax -L -x $1 -w "$$tardir"'
9894     am__tar_='pax -L -x $1 -w "$tardir"'
9895     am__untar='pax -r'
9896     ;;
9897     cpio)
9898     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9899     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9900     am__untar='cpio -i -H $1 -d'
9901     ;;
9902     none)
9903     am__tar=false
9904     am__tar_=false
9905     am__untar=false
9906     ;;
9907     esac
9908    
9909     # If the value was cached, stop now. We just wanted to have am__tar
9910     # and am__untar set.
9911     test -n "${am_cv_prog_tar_$1}" && break
9912    
9913     # tar/untar a dummy directory, and stop if the command works
9914     rm -rf conftest.dir
9915     mkdir conftest.dir
9916     echo GrepMe > conftest.dir/file
9917     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9918     rm -rf conftest.dir
9919     if test -s conftest.tar; then
9920     AM_RUN_LOG([$am__untar <conftest.tar])
9921     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9922     fi
9923     done
9924     rm -rf conftest.dir
9925    
9926     AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9927     AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9928     AC_SUBST([am__tar])
9929     AC_SUBST([am__untar])
9930     ]) # _AM_PROG_TAR
9931    
9932     m4_include([acinclude.m4])