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