1# $MirOS: src/gnu/share/libtool.m4,v 1.16 2008/05/03 22:27:06 tg Exp $
2# $miros: contrib/gnu/libtool/libtool.m4,v 1.66 2008/05/03 21:52:43 tg Exp $
3#-
4# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
6## 2008  Free Software Foundation, Inc.
7## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8## MirLibtool patches contributed 2004, 2005, 2006, 2008 by
9## Thorsten Glaser <tg@66h.42h.de> for the MirOS Project
10##
11## This file is free software; the Free Software Foundation gives
12## unlimited permission to copy and/or distribute it, with or without
13## modifications, as long as this notice is preserved.
14
15# serial 52 AC_PROG_LIBTOOL
16
17
18dnl Protect against multiple inclusion
19dnl ----------------------------------
20ifdef([LT_MIRLIBTOOL_LOADED], [], [
21
22dnl Enable overwriting autoconf'd functions without aclocal bringing them in
23dnl ------------------------------------------------------------------------
24builtin([define], [NOACLOCAL_DEFUN], defn([AC_DEFUN]))dnl
25
26dnl Support using MirLibtool with Autoconf 2.13 and 2.6x
27dnl This requires using the MirPorts autoconf-* versions
28dnl ----------------------------------------------------
29ifelse(AC_AUTOCONF_VERSION, [2.13],
30[dnl Autoconf 2.13
31dnl  =============
32dnl
33sinclude([m4salt.inc])dnl
34dnl
35dnl This is originally from Autoconf 2.59
36dnl but modified due to us not having autom4te
37dnl
38# AC_HELP_STRING(LHS, RHS, [COLUMN])
39# ----------------------------------
40#
41# Format a help string so that it looks pretty when
42# the user executes "script --help".  This macro takes three
43# arguments, a "left hand side" (LHS), a "right hand side" (RHS), and
44# the COLUMN which is a string of white spaces which leads to the
45# the RHS column (default: 26 white spaces).
46#
47# The resulting string is suitable for use in other macros that require
48# a help string (e.g. AC_ARG_WITH).
49#
50# Here is the sample string from the Autoconf manual (Node: External
51# Software) which shows the proper spacing for help strings.
52#
53#    --with-readline         support fancy command line editing
54#  ^ ^                       ^
55#  | |                       |
56#  | column 2                column 26
57#  |
58#  column 0
59#
60# A help string is made up of a "left hand side" (LHS) and a "right
61# hand side" (RHS).  In the example above, the LHS is
62# "--with-readline", while the RHS is "support fancy command line
63# editing".
64#
65# If the LHS is contains more than (COLUMN - 3) characters, then the LHS
66# is terminated with a newline so that the RHS starts on a line of its
67# own beginning with COLUMN.  In the default case, this corresponds to
68# an LHS with more than 23 characters.
69#
70# Therefore, in the example, if the LHS were instead
71# "--with-readline-blah-blah-blah", then the AS_HELP_STRING macro would
72# expand into:
73#
74#
75#    --with-readline-blah-blah-blah
76#  ^ ^                       support fancy command line editing
77#  | |                       ^
78#  | column 2                |
79#  column 0                  column 26
80#
81m4_define([AS_PadLeft],
82	   [m4_if(m4_eval([$1] > [$2]),1,[[ ]AS_PadLeft([$1]-1,[$2])])])
83m4_define([MIRLIBTOOL_unquote],
84[patsubst(patsubst(patsubst(patsubst([$1], [@<:@], [{]), [@:>@], [}]), [@S|@], [$$]), [@%:@], [#])])dnl
85m4_define([AC_HELP_STRING],
86[m4_pushdef([AS_Prefix], m4_default([$3], [                          ]))dnl
87m4_text_wrap(MIRLIBTOOL_unquote([$2]), AS_Prefix, MIRLIBTOOL_unquote([  $1]AS_PadLeft(m4_len(AS_Prefix),m4_len(MIRLIBTOOL_unquote([$1]))+2)))dnl
88m4_popdef([AS_Prefix])dnl
89])
90
91dnl This is from Autoconf 2.13
92dnl but with s/[$1]/$1/ to allow calling
93dnl
94builtin([undefine], [AC_DIVERT_HELP])dnl
95define(AC_DIVERT_HELP,
96[AC_DIVERT_PUSH(AC_DIVERSION_HELP)dnl
97ifelse(ac_help_count,0,[--enable and --with options recognized:
98])dnl
99define([ac_help_count], builtin(eval, ac_help_count + 1))dnl
100$1
101ifelse(ac_help_count,13,[EOF
102cat <<\EOF
103define([ac_help_count], 1)dnl
104])dnl
105AC_DIVERT_POP()dnl
106])
107
108dnl  End of Autoconf switch (2.13)
109dnl  ====================== ------
110],
111[dnl Autoconf 2.6x
112dnl  =============
113
114dnl This is originally from Autoconf 2.59
115dnl but modified to find our cpp as well
116dnl
117# AC_PROG_CXXCPP
118# --------------
119# Find a working C++ preprocessor.
120# We shouldn't have to require AC_PROG_CC, but this is due to the concurrency
121# between the AC_LANG_COMPILER_REQUIRE family and that of AC_PROG_CXX.
122builtin([undefine], [AC_PROG_CXXCPP])dnl
123NOACLOCAL_DEFUN([AC_PROG_CXXCPP],
124[AC_REQUIRE([AC_PROG_CXX])dnl
125AC_ARG_VAR([CXXCPP],   [C++ preprocessor])dnl
126_AC_ARG_VAR_CPPFLAGS()dnl
127AC_LANG([C++])dnl
128AC_MSG_CHECKING([how to run the C++ preprocessor])
129if test -z "$CXXCPP"; then
130  AC_CACHE_VAL(ac_cv_prog_CXXCPP,
131  [dnl
132    # Double quotes because CXXCPP needs to be expanded
133    for CXXCPP in "$CXX -E" "$CC -E" "/usr/libexec/cpp" "/lib/cpp"
134    do
135      _AC_PROG_PREPROC_WORKS_IFELSE([break])
136    done
137    ac_cv_prog_CXXCPP=$CXXCPP
138  ])dnl
139  CXXCPP=$ac_cv_prog_CXXCPP
140else
141  ac_cv_prog_CXXCPP=$CXXCPP
142fi
143AC_MSG_RESULT([$CXXCPP])
144_AC_PROG_PREPROC_WORKS_IFELSE([],
145	  [AC_MSG_WARN([C++ preprocessor "$CXXCPP" fails sanity check])])
146AC_SUBST(CXXCPP)dnl
147AC_LANG([C])dnl
148])# AC_PROG_CXXCPP
149
150dnl  End of Autoconf switch (2.60)
151dnl  ====================== ------
152])dnl
153
154dnl Protect against multiple inclusion
155dnl ----------------------------------
156define([LT_MIRLIBTOOL_LOADED], [])dnl
157
158
159dnl Here it goes
160dnl ------------
161
162
163# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
164# -----------------------------------------------------------
165# If this macro is not defined by Autoconf, define it here.
166m4_ifdef([AC_PROVIDE_IFELSE],
167         [],
168         [m4_define([AC_PROVIDE_IFELSE],
169	         [m4_ifdef([AC_PROVIDE_$1],
170		           [$2], [$3])])])
171
172
173# AC_PROG_LIBTOOL
174# ---------------
175AC_DEFUN([AC_PROG_LIBTOOL],
176[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
177dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
178dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
179  AC_PROVIDE_IFELSE([AC_PROG_CXX],
180    [AC_LIBTOOL_CXX],
181    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
182  ])])
183dnl And a similar setup for Fortran 77 support
184  AC_PROVIDE_IFELSE([AC_PROG_F77],
185    [AC_LIBTOOL_F77],
186    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
187])])
188
189dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
190dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
191dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
192  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
193    [AC_LIBTOOL_GCJ],
194    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
195      [AC_LIBTOOL_GCJ],
196      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
197	[AC_LIBTOOL_GCJ],
198      [ifdef([AC_PROG_GCJ],
199	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
200       ifdef([A][M_PROG_GCJ],
201	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
202       ifdef([LT_AC_PROG_GCJ],
203	     [define([LT_AC_PROG_GCJ],
204		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
205])])# AC_PROG_LIBTOOL
206
207
208# _AC_PROG_LIBTOOL
209# ----------------
210AC_DEFUN([_AC_PROG_LIBTOOL],
211[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
212AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
213AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
214AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
215
216# This can be used to rebuild libtool when needed
217LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
218
219# Always use our own libtool.
220LIBTOOL='$(SHELL) $(top_builddir)/libtool'
221AC_SUBST(LIBTOOL)dnl
222
223# Prevent multiple expansion
224define([AC_PROG_LIBTOOL], [])
225])# _AC_PROG_LIBTOOL
226
227
228# AC_LIBTOOL_SETUP
229# ----------------
230AC_DEFUN([AC_LIBTOOL_SETUP],
231[AC_PREREQ(2.13)dnl
232AC_REQUIRE([AC_ENABLE_SHARED])dnl
233AC_REQUIRE([AC_ENABLE_STATIC])dnl
234AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
235AC_REQUIRE([AC_CANONICAL_HOST])dnl
236AC_REQUIRE([AC_CANONICAL_BUILD])dnl
237AC_REQUIRE([AC_PROG_CC])dnl
238AC_REQUIRE([AC_PROG_LD])dnl
239AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
240AC_REQUIRE([AC_PROG_NM])dnl
241
242AC_REQUIRE([AC_PROG_LN_S])dnl
243AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
244# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
245AC_REQUIRE([AC_OBJEXT])dnl
246AC_REQUIRE([AC_EXEEXT])dnl
247dnl
248AC_LIBTOOL_SYS_MAX_CMD_LEN
249AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
250AC_LIBTOOL_OBJDIR
251
252AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
253_LT_AC_PROG_ECHO_BACKSLASH
254
255ifelse(AC_AUTOCONF_VERSION, [2.13], [
256dnl From Autoconf 2.61
257if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
258  as_unset=unset
259else
260  as_unset=false
261fi
262])dnl
263
264case $host_os in
265aix3*)
266  # AIX sometimes has problems with the GCC collect2 program.  For some
267  # reason, if we set the COLLECT_NAMES environment variable, the problems
268  # vanish in a puff of smoke.
269  if test "X${COLLECT_NAMES+set}" != Xset; then
270    COLLECT_NAMES=
271    export COLLECT_NAMES
272  fi
273  ;;
274esac
275
276# Sed substitution that helps us do robust quoting.  It backslashifies
277# metacharacters that are still active within double-quoted strings.
278Xsed='sed -e 1s/^X//'
279[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
280
281# Same as above, but do not quote variable references.
282[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
283
284# Sed substitution to delay expansion of an escaped shell variable in a
285# double_quote_subst'ed string.
286delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
287
288# Sed substitution to avoid accidental globbing in evaled expressions
289no_glob_subst='s/\*/\\\*/g'
290
291# Constants:
292rm="rm -f"
293
294# Global variables:
295default_ofile=libtool
296can_build_shared=yes
297
298# All known linkers require a `.a' archive for static linking (except MSVC,
299# which needs '.lib').
300libext=a
301ltmain="$ac_aux_dir/ltmain.sh"
302ofile="$default_ofile"
303with_gnu_ld="$lt_cv_prog_gnu_ld"
304
305AC_CHECK_TOOL(AR, ar, false)
306AC_CHECK_TOOL(RANLIB, ranlib, :)
307AC_CHECK_TOOL(STRIP, strip, :)
308
309old_CC="$CC"
310old_CFLAGS="$CFLAGS"
311
312# Set sane defaults for various variables
313test -z "$AR" && AR=ar
314test -z "$AR_FLAGS" && AR_FLAGS=cru
315test -z "$AS" && AS=as
316test -z "$CC" && CC=cc
317test -z "$LTCC" && LTCC=$CC
318test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
319test -z "$DLLTOOL" && DLLTOOL=dlltool
320test -z "$LD" && LD=ld
321test -z "$LN_S" && LN_S="ln -s"
322test -z "$MAGIC_CMD" && MAGIC_CMD=file
323test -z "$NM" && NM=nm
324test -z "$SED" && SED=sed
325test -z "$OBJDUMP" && OBJDUMP=objdump
326test -z "$RANLIB" && RANLIB=:
327test -z "$STRIP" && STRIP=:
328test -z "$ac_objext" && ac_objext=o
329
330# Determine commands to create old-style static archives.
331old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
332old_postinstall_cmds='chmod 644 $oldlib'
333old_postuninstall_cmds=
334
335_lt_gnu_ar=no
336case $host_os in
337mirbsd*)
338  _lt_gnu_ar=yes
339  ;;
340esac
341
342test $_lt_gnu_ar = no && if test -n "$RANLIB"; then
343  case $host_os in
344  openbsd*)
345    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
346    ;;
347  *)
348    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
349    ;;
350  esac
351  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
352fi
353
354_LT_CC_BASENAME([$compiler])
355
356# Only perform the check for file, if the check method requires it
357case $deplibs_check_method in
358file_magic*)
359  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
360    AC_PATH_MAGIC
361  fi
362  ;;
363esac
364
365_LT_REQUIRED_DARWIN_CHECKS
366
367AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
368AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
369enable_win32_dll=yes, enable_win32_dll=no)
370
371AC_ARG_ENABLE([libtool-lock],
372    [AC_HELP_STRING([--disable-libtool-lock],
373	[avoid locking (might break parallel builds)])])
374test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
375
376AC_ARG_WITH([pic],
377    [AC_HELP_STRING([--with-pic],
378	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
379    [pic_mode="$withval"],
380    [pic_mode=default])
381test -z "$pic_mode" && pic_mode=default
382
383# Use C for the default configuration in the libtool script
384tagname=
385AC_LIBTOOL_LANG_C_CONFIG
386_LT_AC_TAGCONFIG
387])# AC_LIBTOOL_SETUP
388
389
390# _LT_AC_SYS_COMPILER
391# -------------------
392AC_DEFUN([_LT_AC_SYS_COMPILER],
393[AC_REQUIRE([AC_PROG_CC])dnl
394
395# If no C compiler was specified, use CC.
396LTCC=${LTCC-"$CC"}
397
398# If no C compiler flags were specified, use CFLAGS.
399LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
400
401# Allow CC to be a program name with arguments.
402compiler=$CC
403])# _LT_AC_SYS_COMPILER
404
405
406# _LT_CC_BASENAME(CC)
407# -------------------
408# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
409AC_DEFUN([_LT_CC_BASENAME],
410[for cc_temp in $1""; do
411  case $cc_temp in
412    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
413    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
414    \-*) ;;
415    *) break;;
416  esac
417done
418cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
419])
420
421
422# _LT_COMPILER_BOILERPLATE
423# ------------------------
424# Check for compiler boilerplate output or warnings with
425# the simple compiler test code.
426AC_DEFUN([_LT_COMPILER_BOILERPLATE],
427[AC_REQUIRE([LT_AC_PROG_SED])dnl
428ac_outfile=conftest.$ac_objext
429echo "$lt_simple_compile_test_code" >conftest.$ac_ext
430eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
431_lt_compiler_boilerplate=`cat conftest.err`
432$rm conftest*
433])# _LT_COMPILER_BOILERPLATE
434
435
436# _LT_LINKER_BOILERPLATE
437# ----------------------
438# Check for linker boilerplate output or warnings with
439# the simple link test code.
440AC_DEFUN([_LT_LINKER_BOILERPLATE],
441[AC_REQUIRE([LT_AC_PROG_SED])dnl
442ac_outfile=conftest.$ac_objext
443echo "$lt_simple_link_test_code" >conftest.$ac_ext
444eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
445_lt_linker_boilerplate=`cat conftest.err`
446$rm -r conftest*
447])# _LT_LINKER_BOILERPLATE
448
449# _LT_REQUIRED_DARWIN_CHECKS
450# --------------------------
451# Check for some things on darwin
452AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
453  case $host_os in
454    rhapsody* | darwin*)
455    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
456    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
457
458    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
459      [lt_cv_apple_cc_single_mod=no
460      if test -z "${LT_MULTI_MODULE}"; then
461   # By default we will add the -single_module flag. You can override
462   # by either setting the environment variable LT_MULTI_MODULE
463   # non-empty at configure time, or by adding -multi_module to the
464   # link flags.
465   echo "int foo(void){return 1;}" > conftest.c
466   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
467     -dynamiclib ${wl}-single_module conftest.c
468   if test -f libconftest.dylib; then
469     lt_cv_apple_cc_single_mod=yes
470     rm -rf libconftest.dylib*
471   fi
472   rm conftest.c
473      fi])
474    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
475      [lt_cv_ld_exported_symbols_list],
476      [lt_cv_ld_exported_symbols_list=no
477ifelse(AC_AUTOCONF_VERSION, [2.13], [], [
478      save_LDFLAGS=$LDFLAGS
479      echo "_main" > conftest.sym
480      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
481      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
482   [lt_cv_ld_exported_symbols_list=yes],
483   [lt_cv_ld_exported_symbols_list=no])
484   LDFLAGS="$save_LDFLAGS"
485])
486    ])
487    case $host_os in
488    rhapsody* | darwin1.[[0123]])
489      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
490    darwin1.*)
491     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
492    darwin*)
493      # if running on 10.5 or later, the deployment target defaults
494      # to the OS version, if on x86, and 10.4, the deployment
495      # target defaults to 10.4. Don't you love it?
496      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
497   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
498     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
499   10.[[012]]*)
500     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
501   10.*)
502     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
503      esac
504    ;;
505  esac
506    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
507      _lt_dar_single_mod='$single_module'
508    fi
509    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
510      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
511    else
512      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
513    fi
514    if test "$DSYMUTIL" != ":"; then
515      _lt_dsymutil="~$DSYMUTIL \$lib || :"
516    else
517      _lt_dsymutil=
518    fi
519    ;;
520  esac
521])
522
523# _LT_AC_SYS_LIBPATH_AIX
524# ----------------------
525# Links a minimal program and checks the executable
526# for the system default hardcoded library path. In most cases,
527# this is /usr/lib:/lib, but when the MPI compilers are used
528# the location of the communication and MPI libs are included too.
529# If we don't find anything, use the default library path according
530# to the aix ld manual.
531AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
532[AC_REQUIRE([LT_AC_PROG_SED])dnl
533ifelse(AC_AUTOCONF_VERSION, [2.13], [aix_libpath="/usr/lib:/lib"], [
534AC_LINK_IFELSE(AC_LANG_PROGRAM,[
535lt_aix_libpath_sed='
536    /Import File Strings/,/^$/ {
537	/^0/ {
538	    s/^0  *\(.*\)$/\1/
539	    p
540	}
541    }'
542aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
543# Check for a 64-bit object if we didn't find anything.
544if test -z "$aix_libpath"; then
545  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
546fi],[])
547if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
548])
549])# _LT_AC_SYS_LIBPATH_AIX
550
551
552# _LT_AC_SHELL_INIT(ARG)
553# ----------------------
554AC_DEFUN([_LT_AC_SHELL_INIT],
555[ifdef([AC_DIVERSION_NOTICE],
556	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
557	 [AC_DIVERT_PUSH(NOTICE)])
558$1
559AC_DIVERT_POP
560])# _LT_AC_SHELL_INIT
561
562
563dnl From Autoconf 2.59
564dnl m4_defun -> AC_DEFUN and renamed
565# _LT_AS_PATH_SEPARATOR_PREPARE
566# --------------------------
567# Compute the path separator.
568AC_DEFUN([_LT_AS_PATH_SEPARATOR_PREPARE],
569[# The user is always right.
570if test "${PATH_SEPARATOR+set}" != set; then
571  echo "#! /bin/sh" >conf$$.sh
572  echo  "exit 0"   >>conf$$.sh
573  chmod +x conf$$.sh
574  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
575    PATH_SEPARATOR=';'
576  else
577    PATH_SEPARATOR=:
578  fi
579  rm -f conf$$.sh
580fi
581])# _LT_AS_PATH_SEPARATOR_PREPARE
582
583
584# _LT_AC_PROG_ECHO_BACKSLASH
585# --------------------------
586# Add some code to the start of the generated configure script which
587# will find an echo command which doesn't interpret backslashes.
588AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
589[_LT_AC_SHELL_INIT([
590AC_REQUIRE([_LT_AS_PATH_SEPARATOR_PREPARE])
591# Check that we are running under the correct shell.
592SHELL=${CONFIG_SHELL-/bin/sh}
593
594case X$ECHO in
595X*--fallback-echo)
596  # Remove one level of quotation (which was required for Make).
597  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
598  ;;
599esac
600
601echo=${ECHO-echo}
602if test "X[$]1" = X--no-reexec; then
603  # Discard the --no-reexec flag, and continue.
604  shift
605elif test "X[$]1" = X--fallback-echo; then
606  # Avoid inline document here, it may be left over
607  :
608elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
609  # Yippee, $echo works!
610  :
611else
612  # Restart under the correct shell.
613  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
614fi
615
616if test "X[$]1" = X--fallback-echo; then
617  # used as fallback echo
618  shift
619  cat <<EOF
620[$]*
621EOF
622  exit 0
623fi
624
625# The HP-UX ksh and POSIX shell print the target directory to stdout
626# if CDPATH is set.
627(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
628
629if test -z "$ECHO"; then
630if test "X${echo_test_string+set}" != Xset; then
631# find a string as large as possible, as long as the shell can cope with it
632  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
633    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
634    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
635       echo_test_string=`eval $cmd` &&
636       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
637    then
638      break
639    fi
640  done
641fi
642
643if test -n "$KSH_VERSION" &&
644   test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
645   echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
646   test "X$echo_testing_string" = "X$echo_test_string"; then
647  # This shell has a builtin print -r that does the trick.
648  #XXX append -- ?
649  echo='print -r'
650elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
651   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
652   test "X$echo_testing_string" = "X$echo_test_string"; then
653  :
654else
655  # The Solaris, AIX, and Digital Unix default echo programs unquote
656  # backslashes.  This makes it impossible to quote backslashes using
657  #   echo "$something" | sed 's/\\/\\\\/g'
658  #
659  # So, first we look for a working echo in the user's PATH.
660
661  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
662  for dir in $PATH /usr/ucb; do
663    IFS="$lt_save_ifs"
664    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
665       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
666       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
667       test "X$echo_testing_string" = "X$echo_test_string"; then
668      echo="$dir/echo"
669      break
670    fi
671  done
672  IFS="$lt_save_ifs"
673
674  if test "X$echo" = Xecho; then
675    # We didn't find a better echo, so look for alternatives.
676    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
677       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
678       test "X$echo_testing_string" = "X$echo_test_string"; then
679      # This shell has a builtin print -r that does the trick.
680      echo='print -r'
681    elif test -f ${MKSH-/bin/mksh} &&
682	 test "X$CONFIG_SHELL" != X${MKSH-/bin/mksh}; then
683      # If we have mksh, try running configure again with it.
684      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
685      export ORIGINAL_CONFIG_SHELL
686      CONFIG_SHELL=${MKSH-/bin/mksh}
687      export CONFIG_SHELL
688      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
689    elif test "X`${MKSH-mksh} -c 'print found' 2>/dev/null`" = Xfound; then
690      # If we have mksh, try running configure again with it.
691      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
692      export ORIGINAL_CONFIG_SHELL
693      # Find out where we have mksh
694      CONFIG_SHELL=${MKSH-mksh}
695      export CONFIG_SHELL
696      MKSH=`$CONFIG_SHELL -c 'x=$(whence -p mksh); print -- ${x:-$CONFIG_SHELL}'`
697      export MKSH
698      CONFIG_SHELL=$MKSH
699      export CONFIG_SHELL
700      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
701    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
702	 test "X$CONFIG_SHELL" != X/bin/ksh; then
703      # If we have ksh, try running configure again with it.
704      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
705      export ORIGINAL_CONFIG_SHELL
706      CONFIG_SHELL=/bin/ksh
707      export CONFIG_SHELL
708      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
709    else
710      # Try using printf.
711      echo='printf %s\n'
712      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
713	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
714	 test "X$echo_testing_string" = "X$echo_test_string"; then
715	# Cool, printf works
716	:
717      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
718	   test "X$echo_testing_string" = 'X\t' &&
719	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
720	   test "X$echo_testing_string" = "X$echo_test_string"; then
721	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
722	export CONFIG_SHELL
723	SHELL="$CONFIG_SHELL"
724	export SHELL
725	echo="$CONFIG_SHELL [$]0 --fallback-echo"
726      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
727	   test "X$echo_testing_string" = 'X\t' &&
728	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
729	   test "X$echo_testing_string" = "X$echo_test_string"; then
730	echo="$CONFIG_SHELL [$]0 --fallback-echo"
731      else
732	# maybe with a smaller string...
733	prev=:
734
735	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
736	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
737	  then
738	    break
739	  fi
740	  prev="$cmd"
741	done
742
743	if test "$prev" != 'sed 50q "[$]0"'; then
744	  echo_test_string=`eval $prev`
745	  export echo_test_string
746	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
747	else
748	  # Oops.  We lost completely, so just stick with echo.
749	  echo=echo
750	fi
751      fi
752    fi
753  fi
754fi
755fi
756
757# Copy echo and quote the copy suitably for passing to libtool from
758# the Makefile, instead of quoting the original, which is used later.
759ECHO=$echo
760if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
761   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
762fi
763
764AC_SUBST(ECHO)
765])])# _LT_AC_PROG_ECHO_BACKSLASH
766
767
768# _LT_AC_LOCK
769# -----------
770AC_DEFUN([_LT_AC_LOCK],
771[AC_ARG_ENABLE([libtool-lock],
772    [AC_HELP_STRING([--disable-libtool-lock],
773	[avoid locking (might break parallel builds)])])
774test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
775
776# Some flags need to be propagated to the compiler or linker for good
777# libtool support.
778case $host in
779ia64-*-hpux*)
780  # Find out which ABI we are using.
781  echo 'int i;' > conftest.$ac_ext
782  if AC_TRY_EVAL(ac_compile); then
783    case `/usr/bin/file conftest.$ac_objext` in
784    *ELF-32*)
785      HPUX_IA64_MODE="32"
786      ;;
787    *ELF-64*)
788      HPUX_IA64_MODE="64"
789      ;;
790    esac
791  fi
792  rm -rf conftest*
793  ;;
794*-*-irix6*)
795  # Find out which ABI we are using.
796  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
797  if AC_TRY_EVAL(ac_compile); then
798   if test "$lt_cv_prog_gnu_ld" = yes; then
799    case `/usr/bin/file conftest.$ac_objext` in
800    *32-bit*)
801      LD="${LD-ld} -melf32bsmip"
802      ;;
803    *N32*)
804      LD="${LD-ld} -melf32bmipn32"
805      ;;
806    *64-bit*)
807      LD="${LD-ld} -melf64bmip"
808      ;;
809    esac
810   else
811    case `/usr/bin/file conftest.$ac_objext` in
812    *32-bit*)
813      LD="${LD-ld} -32"
814      ;;
815    *N32*)
816      LD="${LD-ld} -n32"
817      ;;
818    *64-bit*)
819      LD="${LD-ld} -64"
820      ;;
821    esac
822   fi
823  fi
824  rm -rf conftest*
825  ;;
826
827x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
828s390*-*linux*|sparc*-*linux*)
829  # Find out which ABI we are using.
830  echo 'int i;' > conftest.$ac_ext
831  if AC_TRY_EVAL(ac_compile); then
832    case `/usr/bin/file conftest.o` in
833    *32-bit*)
834      case $host in
835        x86_64-*kfreebsd*-gnu)
836          LD="${LD-ld} -m elf_i386_fbsd"
837          ;;
838        x86_64-*linux*)
839          LD="${LD-ld} -m elf_i386"
840          ;;
841        ppc64-*linux*|powerpc64-*linux*)
842          LD="${LD-ld} -m elf32ppclinux"
843          ;;
844        s390x-*linux*)
845          LD="${LD-ld} -m elf_s390"
846          ;;
847        sparc64-*linux*)
848          LD="${LD-ld} -m elf32_sparc"
849          ;;
850      esac
851      ;;
852    *64-bit*)
853      case $host in
854        x86_64-*kfreebsd*-gnu)
855          LD="${LD-ld} -m elf_x86_64_fbsd"
856          ;;
857        x86_64-*linux*)
858          LD="${LD-ld} -m elf_x86_64"
859          ;;
860        ppc*-*linux*|powerpc*-*linux*)
861          LD="${LD-ld} -m elf64ppc"
862          ;;
863        s390*-*linux*)
864          LD="${LD-ld} -m elf64_s390"
865          ;;
866        sparc*-*linux*)
867          LD="${LD-ld} -m elf64_sparc"
868          ;;
869      esac
870      ;;
871    esac
872  fi
873  rm -rf conftest*
874  ;;
875
876*-*-sco3.2v5*)
877  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
878  SAVE_CFLAGS="$CFLAGS"
879  CFLAGS="$CFLAGS -belf"
880  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
881    [AC_LANG_PUSH(C)
882     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
883     AC_LANG_POP])
884  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
885    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
886    CFLAGS="$SAVE_CFLAGS"
887  fi
888  ;;
889sparc*-*solaris*)
890  # Find out which ABI we are using.
891  echo 'int i;' > conftest.$ac_ext
892  if AC_TRY_EVAL(ac_compile); then
893    case `/usr/bin/file conftest.o` in
894    *64-bit*)
895      case $lt_cv_prog_gnu_ld in
896      yes*) LD="${LD-ld} -m elf64_sparc" ;;
897      *)
898        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
899	  LD="${LD-ld} -64"
900	fi
901	;;
902      esac
903      ;;
904    esac
905  fi
906  rm -rf conftest*
907  ;;
908
909AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
910[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
911  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
912  AC_CHECK_TOOL(AS, as, false)
913  AC_CHECK_TOOL(OBJDUMP, objdump, false)
914  ;;
915  ])
916esac
917
918need_locks="$enable_libtool_lock"
919
920])# _LT_AC_LOCK
921
922
923# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
924#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
925# ----------------------------------------------------------------
926# Check whether the given compiler option works
927AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
928[AC_REQUIRE([LT_AC_PROG_SED])
929AC_CACHE_CHECK([$1], [$2],
930  [$2=no
931  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
932   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
933   lt_compiler_flag="$3"
934   # Insert the option either (1) after the last *FLAGS variable, or
935   # (2) before a word containing "conftest.", or (3) at the end.
936   # Note that $ac_compile itself does not contain backslashes and begins
937   # with a dollar sign (not a hyphen), so the echo should work correctly.
938   # The option is referenced via a variable to avoid confusing sed.
939   lt_compile=`echo "$ac_compile" | $SED \
940   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
941   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
942   -e 's:$: $lt_compiler_flag:'`
943   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
944   (eval "$lt_compile" 2>conftest.err)
945   ac_status=$?
946   cat conftest.err >&AS_MESSAGE_LOG_FD
947   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
948   if (exit $ac_status) && test -s "$ac_outfile"; then
949     # The compiler can only warn and ignore the option if not recognized
950     # So say no if there are warnings other than the usual output.
951     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
952     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
953     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
954       $2=yes
955     fi
956   fi
957   $rm conftest*
958])
959
960if test x"[$]$2" = xyes; then
961    ifelse([$5], , :, [$5])
962else
963    ifelse([$6], , :, [$6])
964fi
965])# AC_LIBTOOL_COMPILER_OPTION
966
967
968# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
969#                          [ACTION-SUCCESS], [ACTION-FAILURE])
970# ------------------------------------------------------------
971# Check whether the given compiler option works
972AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
973[AC_REQUIRE([LT_AC_PROG_SED])dnl
974AC_CACHE_CHECK([$1], [$2],
975  [$2=no
976   save_LDFLAGS="$LDFLAGS"
977   LDFLAGS="$LDFLAGS $3"
978   echo "$lt_simple_link_test_code" > conftest.$ac_ext
979   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
980     # The linker can only warn and ignore the option if not recognized
981     # So say no if there are warnings
982     if test -s conftest.err; then
983       # Append any errors to the config.log.
984       cat conftest.err 1>&AS_MESSAGE_LOG_FD
985       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
986       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
987       if diff conftest.exp conftest.er2 >/dev/null; then
988         $2=yes
989       fi
990     else
991       $2=yes
992     fi
993   fi
994   $rm -r conftest*
995   LDFLAGS="$save_LDFLAGS"
996])
997
998if test x"[$]$2" = xyes; then
999    ifelse([$4], , :, [$4])
1000else
1001    ifelse([$5], , :, [$5])
1002fi
1003])# AC_LIBTOOL_LINKER_OPTION
1004
1005
1006# AC_LIBTOOL_SYS_MAX_CMD_LEN
1007# --------------------------
1008AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1009[# find the maximum length of command line arguments
1010AC_MSG_CHECKING([the maximum length of command line arguments])
1011AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1012  i=0
1013  teststring="ABCD"
1014
1015  case $build_os in
1016  msdosdjgpp*)
1017    # On DJGPP, this test can blow up pretty badly due to problems in libc
1018    # (any single argument exceeding 2000 bytes causes a buffer overrun
1019    # during glob expansion).  Even if it were fixed, the result of this
1020    # check would be larger than it should be.
1021    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1022    ;;
1023
1024  gnu*)
1025    # Under GNU Hurd, this test is not required because there is
1026    # no limit to the length of command line arguments.
1027    # Libtool will interpret -1 as no limit whatsoever
1028    lt_cv_sys_max_cmd_len=-1;
1029    ;;
1030
1031  cygwin* | mingw*)
1032    # On Win9x/ME, this test blows up -- it succeeds, but takes
1033    # about 5 minutes as the teststring grows exponentially.
1034    # Worse, since 9x/ME are not pre-emptively multitasking,
1035    # you end up with a "frozen" computer, even though with patience
1036    # the test eventually succeeds (with a max line length of 256k).
1037    # Instead, let's just punt: use the minimum linelength reported by
1038    # all of the supported platforms: 8192 (on NT/2K/XP).
1039    lt_cv_sys_max_cmd_len=8192;
1040    ;;
1041
1042  amigaos*)
1043    # On AmigaOS with pdksh, this test takes hours, literally.
1044    # So we just punt and use a minimum line length of 8192.
1045    lt_cv_sys_max_cmd_len=8192;
1046    ;;
1047
1048  darwin* | dragonfly* | freebsd* | midnightbsd* | mirbsd* | netbsd* | openbsd*)
1049    # This has been around since 386BSD, at least.  Likely further.
1050    if test -x /sbin/sysctl; then
1051      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1052    elif test -x /usr/sbin/sysctl; then
1053      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1054    else
1055      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1056    fi
1057    # And add a safety zone
1058    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1059    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1060    ;;
1061
1062  interix*)
1063    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1064    lt_cv_sys_max_cmd_len=196608
1065    ;;
1066
1067  osf*)
1068    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1069    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1070    # nice to cause kernel panics so lets avoid the loop below.
1071    # First set a reasonable default.
1072    lt_cv_sys_max_cmd_len=16384
1073    #
1074    if test -x /sbin/sysconfig; then
1075      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1076        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1077      esac
1078    fi
1079    ;;
1080  sco3.2v5*)
1081    lt_cv_sys_max_cmd_len=102400
1082    ;;
1083  sysv5* | sco5v6* | sysv4.2uw2*)
1084    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1085    if test -n "$kargmax"; then
1086      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
1087    else
1088      lt_cv_sys_max_cmd_len=32768
1089    fi
1090    ;;
1091  *)
1092    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1093    if test -n "$lt_cv_sys_max_cmd_len"; then
1094      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1095      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1096    else
1097      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1098      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1099	       = "XX$teststring") >/dev/null 2>&1 &&
1100	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
1101	      lt_cv_sys_max_cmd_len=$new_result &&
1102	      test $i != 17 # 1/2 MB should be enough
1103      do
1104        i=`expr $i + 1`
1105        teststring=$teststring$teststring
1106      done
1107      teststring=
1108      # Add a significant safety factor because C++ compilers can tack on massive
1109      # amounts of additional arguments before passing them to the linker.
1110      # It appears as though 1/2 is a usable value.
1111      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1112    fi
1113    ;;
1114  esac
1115])
1116if test -n $lt_cv_sys_max_cmd_len ; then
1117  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1118else
1119  AC_MSG_RESULT(none)
1120fi
1121])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1122
1123
1124# _LT_AC_CHECK_DLFCN
1125# ------------------
1126AC_DEFUN([_LT_AC_CHECK_DLFCN],
1127[AC_CHECK_HEADERS(dlfcn.h)dnl
1128])# _LT_AC_CHECK_DLFCN
1129
1130
1131# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1132#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1133# ---------------------------------------------------------------------
1134AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1135[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1136if test "$cross_compiling" = yes; then :
1137  [$4]
1138else
1139  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1140  lt_status=$lt_dlunknown
1141  cat > conftest.$ac_ext <<EOF
1142[#line __oline__ "configure"
1143#include "confdefs.h"
1144
1145#if HAVE_DLFCN_H
1146#include <dlfcn.h>
1147#endif
1148
1149#include <stdio.h>
1150
1151#ifdef RTLD_GLOBAL
1152#  define LT_DLGLOBAL		RTLD_GLOBAL
1153#else
1154#  ifdef DL_GLOBAL
1155#    define LT_DLGLOBAL		DL_GLOBAL
1156#  else
1157#    define LT_DLGLOBAL		0
1158#  endif
1159#endif
1160
1161/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1162   find out it does not work in some platform. */
1163#ifndef LT_DLLAZY_OR_NOW
1164#  ifdef RTLD_LAZY
1165#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1166#  else
1167#    ifdef DL_LAZY
1168#      define LT_DLLAZY_OR_NOW		DL_LAZY
1169#    else
1170#      ifdef RTLD_NOW
1171#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1172#      else
1173#        ifdef DL_NOW
1174#          define LT_DLLAZY_OR_NOW	DL_NOW
1175#        else
1176#          define LT_DLLAZY_OR_NOW	0
1177#        endif
1178#      endif
1179#    endif
1180#  endif
1181#endif
1182
1183#ifdef __cplusplus
1184extern "C" void exit (int);
1185#endif
1186
1187void fnord() { int i=42;}
1188int main ()
1189{
1190  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1191  int status = $lt_dlunknown;
1192
1193  if (self)
1194    {
1195      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1196      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1197      /* dlclose (self); */
1198    }
1199  else
1200    puts (dlerror ());
1201
1202    exit (status);
1203}]
1204EOF
1205  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1206    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1207    lt_status=$?
1208    case x$lt_status in
1209      x$lt_dlno_uscore) $1 ;;
1210      x$lt_dlneed_uscore) $2 ;;
1211      x$lt_dlunknown|x*) $3 ;;
1212    esac
1213  else :
1214    # compilation failed
1215    $3
1216  fi
1217fi
1218rm -fr conftest*
1219])# _LT_AC_TRY_DLOPEN_SELF
1220
1221
1222# AC_LIBTOOL_DLOPEN_SELF
1223# ----------------------
1224AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1225[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1226if test "x$enable_dlopen" != xyes; then
1227  enable_dlopen=unknown
1228  enable_dlopen_self=unknown
1229  enable_dlopen_self_static=unknown
1230else
1231  lt_cv_dlopen=no
1232  lt_cv_dlopen_libs=
1233
1234  case $host_os in
1235  beos*)
1236    lt_cv_dlopen="load_add_on"
1237    lt_cv_dlopen_libs=
1238    lt_cv_dlopen_self=yes
1239    ;;
1240
1241  mingw* | pw32*)
1242    lt_cv_dlopen="LoadLibrary"
1243    lt_cv_dlopen_libs=
1244   ;;
1245
1246  cygwin*)
1247    lt_cv_dlopen="dlopen"
1248    lt_cv_dlopen_libs=
1249   ;;
1250
1251  darwin*)
1252  # if libdl is installed we need to link against it
1253    AC_CHECK_LIB([dl], [dlopen],
1254		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1255    lt_cv_dlopen="dyld"
1256    lt_cv_dlopen_libs=
1257    lt_cv_dlopen_self=yes
1258    ])
1259   ;;
1260
1261  *)
1262    AC_CHECK_FUNC([shl_load],
1263	  [lt_cv_dlopen="shl_load"],
1264      [AC_CHECK_LIB([dld], [shl_load],
1265	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1266	[AC_CHECK_FUNC([dlopen],
1267	      [lt_cv_dlopen="dlopen"],
1268	  [AC_CHECK_LIB([dl], [dlopen],
1269		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1270	    [AC_CHECK_LIB([svld], [dlopen],
1271		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1272	      [AC_CHECK_LIB([dld], [dld_link],
1273		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1274	      ])
1275	    ])
1276	  ])
1277	])
1278      ])
1279    ;;
1280  esac
1281
1282  if test "x$lt_cv_dlopen" != xno; then
1283    enable_dlopen=yes
1284  else
1285    enable_dlopen=no
1286  fi
1287
1288  case $lt_cv_dlopen in
1289  dlopen)
1290    save_CPPFLAGS="$CPPFLAGS"
1291    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1292
1293    save_LDFLAGS="$LDFLAGS"
1294    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1295
1296    save_LIBS="$LIBS"
1297    LIBS="$lt_cv_dlopen_libs $LIBS"
1298
1299    AC_CACHE_CHECK([whether a program can dlopen itself],
1300	  lt_cv_dlopen_self, [dnl
1301	  _LT_AC_TRY_DLOPEN_SELF(
1302	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1303	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1304    ])
1305
1306    if test "x$lt_cv_dlopen_self" = xyes; then
1307      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1308      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1309    	  lt_cv_dlopen_self_static, [dnl
1310	  _LT_AC_TRY_DLOPEN_SELF(
1311	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1312	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1313      ])
1314    fi
1315
1316    CPPFLAGS="$save_CPPFLAGS"
1317    LDFLAGS="$save_LDFLAGS"
1318    LIBS="$save_LIBS"
1319    ;;
1320  esac
1321
1322  case $lt_cv_dlopen_self in
1323  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1324  *) enable_dlopen_self=unknown ;;
1325  esac
1326
1327  case $lt_cv_dlopen_self_static in
1328  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1329  *) enable_dlopen_self_static=unknown ;;
1330  esac
1331fi
1332])# AC_LIBTOOL_DLOPEN_SELF
1333
1334
1335# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1336# ---------------------------------
1337# Check to see if options -c and -o are simultaneously supported by compiler
1338AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1339[AC_REQUIRE([LT_AC_PROG_SED])dnl
1340AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1341AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1342  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1343  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1344   $rm -r conftest 2>/dev/null
1345   mkdir conftest
1346   cd conftest
1347   mkdir out
1348   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1349
1350   lt_compiler_flag="-o out/conftest2.$ac_objext"
1351   # Insert the option either (1) after the last *FLAGS variable, or
1352   # (2) before a word containing "conftest.", or (3) at the end.
1353   # Note that $ac_compile itself does not contain backslashes and begins
1354   # with a dollar sign (not a hyphen), so the echo should work correctly.
1355   lt_compile=`echo "$ac_compile" | $SED \
1356   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1357   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1358   -e 's:$: $lt_compiler_flag:'`
1359   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1360   (eval "$lt_compile" 2>out/conftest.err)
1361   ac_status=$?
1362   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1363   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1364   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1365   then
1366     # The compiler can only warn and ignore the option if not recognized
1367     # So say no if there are warnings
1368     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1369     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1370     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1371       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1372     fi
1373   fi
1374   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1375   $rm conftest*
1376   # SGI C++ compiler will create directory out/ii_files/ for
1377   # template instantiation
1378   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1379   $rm out/* && rmdir out
1380   cd ..
1381   rmdir conftest
1382   $rm conftest*
1383])
1384])# AC_LIBTOOL_PROG_CC_C_O
1385
1386
1387# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1388# -----------------------------------------
1389# Check to see if we can do hard links to lock some files if needed
1390AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1391[AC_REQUIRE([_LT_AC_LOCK])dnl
1392
1393hard_links="nottested"
1394if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1395  # do not overwrite the value of need_locks provided by the user
1396  AC_MSG_CHECKING([if we can lock with hard links])
1397  hard_links=yes
1398  $rm conftest*
1399  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1400  touch conftest.a
1401  ln conftest.a conftest.b 2>&5 || hard_links=no
1402  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1403  AC_MSG_RESULT([$hard_links])
1404  if test "$hard_links" = no; then
1405    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
1406    need_locks=warn
1407  fi
1408else
1409  need_locks=no
1410fi
1411])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1412
1413
1414# AC_LIBTOOL_OBJDIR
1415# -----------------
1416AC_DEFUN([AC_LIBTOOL_OBJDIR],
1417[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1418[rm -f .libs 2>/dev/null
1419mkdir .libs 2>/dev/null
1420if test -d .libs; then
1421  lt_cv_objdir=.libs
1422else
1423  # MS-DOS does not allow filenames that begin with a dot.
1424  lt_cv_objdir=_libs
1425fi
1426rmdir .libs 2>/dev/null])
1427objdir=$lt_cv_objdir
1428])# AC_LIBTOOL_OBJDIR
1429
1430
1431# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1432# ----------------------------------------------
1433# Check hardcoding attributes.
1434AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1435[AC_MSG_CHECKING([how to hardcode library paths into programs])
1436_LT_AC_TAGVAR(hardcode_action, $1)=
1437if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1438   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1439   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1440
1441  # We can hardcode non-existant directories.
1442  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1443     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1444     # have to relink, otherwise we might link with an installed library
1445     # when we should be linking with a yet-to-be-installed one
1446     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1447     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1448    # Linking always hardcodes the temporary library directory.
1449    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1450  else
1451    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1452    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1453  fi
1454else
1455  # We cannot hardcode anything, or else we can only hardcode existing
1456  # directories.
1457  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1458fi
1459AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1460
1461if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1462  # Fast installation is not supported
1463  enable_fast_install=no
1464elif test "$shlibpath_overrides_runpath" = yes ||
1465     test "$enable_shared" = no; then
1466  # Fast installation is not necessary
1467  enable_fast_install=needless
1468fi
1469])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1470
1471
1472# AC_LIBTOOL_SYS_LIB_STRIP
1473# ------------------------
1474AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1475[striplib=
1476old_striplib=
1477AC_MSG_CHECKING([whether stripping libraries is possible])
1478if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1479  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1480  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1481  AC_MSG_RESULT([yes])
1482else
1483# FIXME - insert some real tests, host_os isn't really good enough
1484  case $host_os in
1485   darwin*)
1486       if test -n "$STRIP" ; then
1487         striplib="$STRIP -x"
1488         old_striplib="$STRIP -S"
1489         AC_MSG_RESULT([yes])
1490       else
1491  AC_MSG_RESULT([no])
1492fi
1493       ;;
1494   *)
1495  AC_MSG_RESULT([no])
1496    ;;
1497  esac
1498fi
1499])# AC_LIBTOOL_SYS_LIB_STRIP
1500
1501
1502# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1503# -----------------------------
1504# PORTME Fill in your ld.so characteristics
1505AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1506[AC_REQUIRE([LT_AC_PROG_SED])dnl
1507AC_MSG_CHECKING([dynamic linker characteristics])
1508library_names_spec=
1509libname_spec='lib$name'
1510soname_spec=
1511shrext_cmds=".so"
1512postinstall_cmds=
1513postuninstall_cmds=
1514finish_cmds=
1515finish_eval=
1516shlibpath_var=
1517shlibpath_overrides_runpath=unknown
1518version_type=none
1519dynamic_linker="$host_os ld.so"
1520sys_lib_dlsearch_path_spec="/lib /usr/lib"
1521m4_if($1,[],[
1522if test "$GCC" = yes; then
1523  case $host_os in
1524    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1525    *) lt_awk_arg="/^libraries:/" ;;
1526  esac
1527  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1528  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
1529    # if the path contains ";" then we assume it to be the separator
1530    # otherwise default to the standard path separator (i.e. ":") - it is
1531    # assumed that no part of a normal pathname contains ";" but that should
1532    # okay in the real world where ";" in dirpaths is itself problematic.
1533    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1534  else
1535    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1536  fi
1537  # Ok, now we have the path, separated by spaces, we can step through it
1538  # and add multilib dir if necessary.
1539  lt_tmp_lt_search_path_spec=
1540  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1541  for lt_sys_path in $lt_search_path_spec; do
1542    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1543      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1544    else
1545      test -d "$lt_sys_path" && \
1546	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1547    fi
1548  done
1549  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
1550BEGIN {RS=" "; FS="/|\n";} {
1551  lt_foo="";
1552  lt_count=0;
1553  for (lt_i = NF; lt_i > 0; lt_i--) {
1554    if ($lt_i != "" && $lt_i != ".") {
1555      if ($lt_i == "..") {
1556        lt_count++;
1557      } else {
1558        if (lt_count == 0) {
1559          lt_foo="/" $lt_i lt_foo;
1560        } else {
1561          lt_count--;
1562        }
1563      }
1564    }
1565  }
1566  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1567  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1568}'`
1569  sys_lib_search_path_spec=`echo $lt_search_path_spec`
1570else
1571  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1572fi])
1573need_lib_prefix=unknown
1574hardcode_into_libs=no
1575
1576# when you set need_version to no, make sure it does not cause -set_version
1577# flags to be left without arguments
1578need_version=unknown
1579
1580case $host_os in
1581aix3*)
1582  version_type=linux
1583  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1584  shlibpath_var=LIBPATH
1585
1586  # AIX 3 has no versioning support, so we append a major version to the name.
1587  soname_spec='${libname}${release}${shared_ext}$major'
1588  ;;
1589
1590aix[[4-9]]*)
1591  version_type=linux
1592  need_lib_prefix=no
1593  need_version=no
1594  hardcode_into_libs=yes
1595  if test "$host_cpu" = ia64; then
1596    # AIX 5 supports IA64
1597    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1598    shlibpath_var=LD_LIBRARY_PATH
1599  else
1600    # With GCC up to 2.95.x, collect2 would create an import file
1601    # for dependence libraries.  The import file would start with
1602    # the line `#! .'.  This would cause the generated library to
1603    # depend on `.', always an invalid library.  This was fixed in
1604    # development snapshots of GCC prior to 3.0.
1605    case $host_os in
1606      aix4 | aix4.[[01]] | aix4.[[01]].*)
1607      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1608	   echo ' yes '
1609	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1610	:
1611      else
1612	can_build_shared=no
1613      fi
1614      ;;
1615    esac
1616    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1617    # soname into executable. Probably we can add versioning support to
1618    # collect2, so additional links can be useful in future.
1619    if test "$aix_use_runtimelinking" = yes; then
1620      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1621      # instead of lib<name>.a to let people know that these are not
1622      # typical AIX shared libraries.
1623      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1624    else
1625      # We preserve .a as extension for shared libraries through AIX4.2
1626      # and later when we are not doing run time linking.
1627      library_names_spec='${libname}${release}.a $libname.a'
1628      soname_spec='${libname}${release}${shared_ext}$major'
1629    fi
1630    shlibpath_var=LIBPATH
1631  fi
1632  ;;
1633
1634amigaos*)
1635  library_names_spec='$libname.ixlibrary $libname.a'
1636  # Create ${libname}_ixlibrary.a entries in /sys/libs.
1637  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'
1638  ;;
1639
1640beos*)
1641  library_names_spec='${libname}${shared_ext}'
1642  dynamic_linker="$host_os ld.so"
1643  shlibpath_var=LIBRARY_PATH
1644  ;;
1645
1646bsdi[[45]]*)
1647  version_type=linux
1648  need_version=no
1649  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1650  soname_spec='${libname}${release}${shared_ext}$major'
1651  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1652  shlibpath_var=LD_LIBRARY_PATH
1653  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1654  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1655  # the default ld.so.conf also contains /usr/contrib/lib and
1656  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1657  # libtool to hard-code these into programs
1658  ;;
1659
1660cygwin* | mingw* | pw32*)
1661  version_type=windows
1662  shrext_cmds=".dll"
1663  need_version=no
1664  need_lib_prefix=no
1665
1666  case $GCC,$host_os in
1667  yes,cygwin* | yes,mingw* | yes,pw32*)
1668    library_names_spec='$libname.dll.a'
1669    # DLL is installed to $(libdir)/../bin by postinstall_cmds
1670    postinstall_cmds='base_file=`basename \${file}`~
1671      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1672      dldir=$destdir/`dirname \$dlpath`~
1673      test -d \$dldir || mkdir -p \$dldir~
1674      $install_prog $dir/$dlname \$dldir/$dlname~
1675      chmod a+x \$dldir/$dlname'
1676    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1677      dlpath=$dir/\$dldll~
1678       $rm \$dlpath'
1679    shlibpath_overrides_runpath=yes
1680
1681    case $host_os in
1682    cygwin*)
1683      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1684      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1685      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1686      ;;
1687    mingw*)
1688      # MinGW DLLs use traditional 'lib' prefix
1689      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1690      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1691      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1692        # It is most probably a Windows format PATH printed by
1693        # mingw gcc, but we are running on Cygwin. Gcc prints its search
1694        # path with ; separators, and with drive letters. We can handle the
1695        # drive letters (cygwin fileutils understands them), so leave them,
1696        # especially as we might pass files found there to a mingw objdump,
1697        # which wouldn't understand a cygwinified path. Ahh.
1698        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1699      else
1700        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1701      fi
1702      ;;
1703    pw32*)
1704      # pw32 DLLs use 'pw' prefix rather than 'lib'
1705      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1706      ;;
1707    esac
1708    ;;
1709
1710  *)
1711    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1712    ;;
1713  esac
1714  dynamic_linker='Win32 ld.exe'
1715  # FIXME: first we should search . and the directory the executable is in
1716  shlibpath_var=PATH
1717  ;;
1718
1719darwin* | rhapsody*)
1720  dynamic_linker="$host_os dyld"
1721  version_type=darwin
1722  need_lib_prefix=no
1723  need_version=no
1724  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1725  soname_spec='${libname}${release}${major}$shared_ext'
1726  shlibpath_overrides_runpath=yes
1727  shlibpath_var=DYLD_LIBRARY_PATH
1728  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1729  m4_if([$1], [],[
1730  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
1731  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1732  ;;
1733
1734dgux*)
1735  version_type=linux
1736  need_lib_prefix=no
1737  need_version=no
1738  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1739  soname_spec='${libname}${release}${shared_ext}$major'
1740  shlibpath_var=LD_LIBRARY_PATH
1741  ;;
1742
1743freebsd1*)
1744  dynamic_linker=no
1745  ;;
1746
1747freebsd* | dragonfly*)
1748  # DragonFly does not have aout.  When/if they implement a new
1749  # versioning mechanism, adjust this.
1750  if test -x /usr/bin/objformat; then
1751    objformat=`/usr/bin/objformat`
1752  else
1753    case $host_os in
1754    freebsd[[123]]*) objformat=aout ;;
1755    *) objformat=elf ;;
1756    esac
1757  fi
1758  version_type=freebsd-$objformat
1759  case $version_type in
1760    freebsd-elf*)
1761      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1762      need_version=no
1763      need_lib_prefix=no
1764      ;;
1765    freebsd-*)
1766      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1767      need_version=yes
1768      ;;
1769  esac
1770  shlibpath_var=LD_LIBRARY_PATH
1771  case $host_os in
1772  freebsd2*)
1773    shlibpath_overrides_runpath=yes
1774    ;;
1775  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1776    shlibpath_overrides_runpath=yes
1777    hardcode_into_libs=yes
1778    ;;
1779  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1780  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1781    shlibpath_overrides_runpath=no
1782    hardcode_into_libs=yes
1783    ;;
1784  *) # from 4.6 on, and DragonFly
1785    shlibpath_overrides_runpath=yes
1786    hardcode_into_libs=yes
1787    ;;
1788  esac
1789  ;;
1790
1791gnu*)
1792  version_type=linux
1793  need_lib_prefix=no
1794  need_version=no
1795  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1796  soname_spec='${libname}${release}${shared_ext}$major'
1797  shlibpath_var=LD_LIBRARY_PATH
1798  hardcode_into_libs=yes
1799  ;;
1800
1801hpux9* | hpux10* | hpux11*)
1802  # Give a soname corresponding to the major version so that dld.sl refuses to
1803  # link against other versions.
1804  version_type=sunos
1805  need_lib_prefix=no
1806  need_version=no
1807  case $host_cpu in
1808  ia64*)
1809    shrext_cmds='.so'
1810    hardcode_into_libs=yes
1811    dynamic_linker="$host_os dld.so"
1812    shlibpath_var=LD_LIBRARY_PATH
1813    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1814    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1815    soname_spec='${libname}${release}${shared_ext}$major'
1816    if test "X$HPUX_IA64_MODE" = X32; then
1817      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1818    else
1819      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1820    fi
1821    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1822    ;;
1823   hppa*64*)
1824     shrext_cmds='.sl'
1825     hardcode_into_libs=yes
1826     dynamic_linker="$host_os dld.sl"
1827     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1828     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1829     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1830     soname_spec='${libname}${release}${shared_ext}$major'
1831     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1832     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1833     ;;
1834   *)
1835    shrext_cmds='.sl'
1836    dynamic_linker="$host_os dld.sl"
1837    shlibpath_var=SHLIB_PATH
1838    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1839    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1840    soname_spec='${libname}${release}${shared_ext}$major'
1841    ;;
1842  esac
1843  # HP-UX runs *really* slowly unless shared libraries are mode 555.
1844  postinstall_cmds='chmod 555 $lib'
1845  ;;
1846
1847interix[[3-9]]*)
1848  version_type=linux
1849  need_lib_prefix=no
1850  need_version=no
1851  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1852  soname_spec='${libname}${release}${shared_ext}$major'
1853  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1854  shlibpath_var=LD_LIBRARY_PATH
1855  shlibpath_overrides_runpath=no
1856  hardcode_into_libs=yes
1857  ;;
1858
1859irix5* | irix6* | nonstopux*)
1860  case $host_os in
1861    nonstopux*) version_type=nonstopux ;;
1862    *)
1863	if test "$lt_cv_prog_gnu_ld" = yes; then
1864		version_type=linux
1865	else
1866		version_type=irix
1867	fi ;;
1868  esac
1869  need_lib_prefix=no
1870  need_version=no
1871  soname_spec='${libname}${release}${shared_ext}$major'
1872  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1873  case $host_os in
1874  irix5* | nonstopux*)
1875    libsuff= shlibsuff=
1876    ;;
1877  *)
1878    case $LD in # libtool.m4 will add one of these switches to LD
1879    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1880      libsuff= shlibsuff= libmagic=32-bit;;
1881    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1882      libsuff=32 shlibsuff=N32 libmagic=N32;;
1883    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1884      libsuff=64 shlibsuff=64 libmagic=64-bit;;
1885    *) libsuff= shlibsuff= libmagic=never-match;;
1886    esac
1887    ;;
1888  esac
1889  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1890  shlibpath_overrides_runpath=no
1891  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1892  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1893  hardcode_into_libs=yes
1894  ;;
1895
1896# No shared lib support for Linux oldld, aout, or coff.
1897linux*oldld* | linux*aout* | linux*coff*)
1898  dynamic_linker=no
1899  ;;
1900
1901# This must be Linux ELF.
1902linux* | k*bsd*-gnu)
1903  version_type=linux
1904  need_lib_prefix=no
1905  need_version=no
1906  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1907  soname_spec='${libname}${release}${shared_ext}$major'
1908  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1909  shlibpath_var=LD_LIBRARY_PATH
1910  shlibpath_overrides_runpath=no
1911  # This implies no fast_install, which is unacceptable.
1912  # Some rework will be needed to allow for fast_install
1913  # before this can be enabled.
1914  hardcode_into_libs=yes
1915
1916  # Append ld.so.conf contents to the search path
1917  if test -f /etc/ld.so.conf; then
1918    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' ' '`
1919    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1920  fi
1921
1922  # We used to test for /lib/ld.so.1 and disable shared libraries on
1923  # powerpc, because MkLinux only supported shared libraries with the
1924  # GNU dynamic linker.  Since this was broken with cross compilers,
1925  # most powerpc-linux boxes support dynamic linking these days and
1926  # people can always --disable-shared, the test was removed, and we
1927  # assume the GNU/Linux dynamic linker is in use.
1928  dynamic_linker='GNU/Linux ld.so'
1929  ;;
1930
1931midnightbsd*)
1932  version_type=linux
1933  need_lib_prefix=no
1934  need_version=no
1935  library_names_spec='${libname}${release}${shared_ext}$versuffix2 ${libname}${release}${shared_ext} $libname${shared_ext}'
1936  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1937  shlibpath_var=LD_LIBRARY_PATH
1938  shlibpath_overrides_runpath=yes
1939  hardcode_into_libs=yes
1940  ;;
1941
1942mirbsd*)
1943  version_type=linux
1944  sys_lib_search_path_spec="/usr/lib"
1945  sys_lib_dlsearch_path_spec="/usr/lib"
1946  need_lib_prefix=no
1947  need_version=no
1948  library_names_spec='${libname}${release}${shared_ext}$versuffix2 ${libname}${shared_ext}$versuffix2'
1949  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1950  shlibpath_var=LD_LIBRARY_PATH
1951  shlibpath_overrides_runpath=yes
1952  ;;
1953
1954netbsd*)
1955  version_type=sunos
1956  need_lib_prefix=no
1957  need_version=no
1958  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1959    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1960    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1961    dynamic_linker='NetBSD (a.out) ld.so'
1962  else
1963    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1964    soname_spec='${libname}${release}${shared_ext}$major'
1965    dynamic_linker='NetBSD ld.elf_so'
1966  fi
1967  shlibpath_var=LD_LIBRARY_PATH
1968  shlibpath_overrides_runpath=yes
1969  hardcode_into_libs=yes
1970  ;;
1971
1972newsos6)
1973  version_type=linux
1974  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1975  shlibpath_var=LD_LIBRARY_PATH
1976  shlibpath_overrides_runpath=yes
1977  ;;
1978
1979nto-qnx*)
1980  version_type=linux
1981  need_lib_prefix=no
1982  need_version=no
1983  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1984  soname_spec='${libname}${release}${shared_ext}$major'
1985  shlibpath_var=LD_LIBRARY_PATH
1986  shlibpath_overrides_runpath=yes
1987  ;;
1988
1989openbsd*)
1990  version_type=linux
1991  sys_lib_dlsearch_path_spec="/usr/lib"
1992  need_lib_prefix=no
1993  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1994  case $host_os in
1995    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1996    *)                         need_version=no  ;;
1997  esac
1998  library_names_spec='${libname}${release}${shared_ext}$versuffix2 ${libname}${shared_ext}$versuffix2'
1999  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2000  shlibpath_var=LD_LIBRARY_PATH
2001  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2002    case $host_os in
2003      openbsd2.[[89]] | openbsd2.[[89]].*)
2004	shlibpath_overrides_runpath=no
2005	;;
2006      *)
2007	shlibpath_overrides_runpath=yes
2008	;;
2009      esac
2010  else
2011    shlibpath_overrides_runpath=yes
2012  fi
2013  ;;
2014
2015os2*)
2016  libname_spec='$name'
2017  shrext_cmds=".dll"
2018  need_lib_prefix=no
2019  library_names_spec='$libname${shared_ext} $libname.a'
2020  dynamic_linker='OS/2 ld.exe'
2021  shlibpath_var=LIBPATH
2022  ;;
2023
2024osf3* | osf4* | osf5*)
2025  version_type=osf
2026  need_lib_prefix=no
2027  need_version=no
2028  soname_spec='${libname}${release}${shared_ext}$major'
2029  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2030  shlibpath_var=LD_LIBRARY_PATH
2031  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2032  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2033  ;;
2034
2035rdos*)
2036  dynamic_linker=no
2037  ;;
2038
2039solaris*)
2040  version_type=linux
2041  need_lib_prefix=no
2042  need_version=no
2043  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2044  soname_spec='${libname}${release}${shared_ext}$major'
2045  shlibpath_var=LD_LIBRARY_PATH
2046  shlibpath_overrides_runpath=yes
2047  hardcode_into_libs=yes
2048  # ldd complains unless libraries are executable
2049  postinstall_cmds='chmod +x $lib'
2050  ;;
2051
2052sunos4*)
2053  version_type=sunos
2054  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2055  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2056  shlibpath_var=LD_LIBRARY_PATH
2057  shlibpath_overrides_runpath=yes
2058  if test "$with_gnu_ld" = yes; then
2059    need_lib_prefix=no
2060  fi
2061  need_version=yes
2062  ;;
2063
2064sysv4 | sysv4.3*)
2065  version_type=linux
2066  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2067  soname_spec='${libname}${release}${shared_ext}$major'
2068  shlibpath_var=LD_LIBRARY_PATH
2069  case $host_vendor in
2070    sni)
2071      shlibpath_overrides_runpath=no
2072      need_lib_prefix=no
2073      export_dynamic_flag_spec='${wl}-Blargedynsym'
2074      runpath_var=LD_RUN_PATH
2075      ;;
2076    siemens)
2077      need_lib_prefix=no
2078      ;;
2079    motorola)
2080      need_lib_prefix=no
2081      need_version=no
2082      shlibpath_overrides_runpath=no
2083      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2084      ;;
2085  esac
2086  ;;
2087
2088sysv4*MP*)
2089  if test -d /usr/nec ;then
2090    version_type=linux
2091    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2092    soname_spec='$libname${shared_ext}.$major'
2093    shlibpath_var=LD_LIBRARY_PATH
2094  fi
2095  ;;
2096
2097sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2098  version_type=freebsd-elf
2099  need_lib_prefix=no
2100  need_version=no
2101  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2102  soname_spec='${libname}${release}${shared_ext}$major'
2103  shlibpath_var=LD_LIBRARY_PATH
2104  hardcode_into_libs=yes
2105  if test "$with_gnu_ld" = yes; then
2106    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2107    shlibpath_overrides_runpath=no
2108  else
2109    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2110    shlibpath_overrides_runpath=yes
2111    case $host_os in
2112      sco3.2v5*)
2113        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2114	;;
2115    esac
2116  fi
2117  sys_lib_dlsearch_path_spec='/usr/lib'
2118  ;;
2119
2120uts4*)
2121  version_type=linux
2122  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2123  soname_spec='${libname}${release}${shared_ext}$major'
2124  shlibpath_var=LD_LIBRARY_PATH
2125  ;;
2126
2127*)
2128  dynamic_linker=no
2129  ;;
2130esac
2131AC_MSG_RESULT([$dynamic_linker])
2132test "$dynamic_linker" = no && can_build_shared=no
2133
2134if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2135  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2136fi
2137if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2138  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2139fi
2140
2141variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2142if test "$GCC" = yes; then
2143  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2144fi
2145])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2146
2147
2148# _LT_AC_TAGCONFIG
2149# ----------------
2150AC_DEFUN([_LT_AC_TAGCONFIG],
2151[AC_REQUIRE([LT_AC_PROG_SED])dnl
2152AC_ARG_WITH([tags],
2153    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2154        [include additional configurations @<:@automatic@:>@])],
2155    [tagnames="$withval"])
2156
2157if test -f "$ltmain" && test -n "$tagnames"; then
2158  if test ! -f "${ofile}"; then
2159    AC_MSG_WARN([output file '$ofile' does not exist])
2160  fi
2161
2162  if test -z "$LTCC"; then
2163    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2164    if test -z "$LTCC"; then
2165      AC_MSG_WARN([output file '$ofile' does not look like a libtool script])
2166    else
2167      AC_MSG_WARN([using 'LTCC=$LTCC', extracted from '$ofile'])
2168    fi
2169  fi
2170  if test -z "$LTCFLAGS"; then
2171    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2172  fi
2173
2174  # Extract list of available tagged configurations in $ofile.
2175  # Note that this assumes the entire list is on one line.
2176  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2177
2178  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2179  for tagname in $tagnames; do
2180    IFS="$lt_save_ifs"
2181    # Check whether tagname contains only valid characters
2182    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2183    "") ;;
2184    *)  AC_MSG_ERROR([invalid tag name: $tagname])
2185	;;
2186    esac
2187
2188    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2189    then
2190      AC_MSG_ERROR([tag name \"$tagname\" already exists])
2191    fi
2192
2193    # Update the list of available tags.
2194    if test -n "$tagname"; then
2195      echo appending configuration tag \"$tagname\" to $ofile
2196
2197      case $tagname in
2198      CXX)
2199	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2200	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2201	    (test "X$CXX" != "Xg++"))) ; then
2202	  AC_LIBTOOL_LANG_CXX_CONFIG
2203	else
2204	  tagname=""
2205	fi
2206	;;
2207
2208      F77)
2209	if test -n "$F77" && test "X$F77" != "Xno"; then
2210	  AC_LIBTOOL_LANG_F77_CONFIG
2211	else
2212	  tagname=""
2213	fi
2214	;;
2215
2216      GCJ)
2217	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2218	  AC_LIBTOOL_LANG_GCJ_CONFIG
2219	else
2220	  tagname=""
2221	fi
2222	;;
2223
2224      RC)
2225	AC_LIBTOOL_LANG_RC_CONFIG
2226	;;
2227
2228      *)
2229	AC_MSG_ERROR([Unsupported tag name: $tagname])
2230	;;
2231      esac
2232
2233      # Append the new tag name to the list of available tags.
2234      if test -n "$tagname" ; then
2235      available_tags="$available_tags $tagname"
2236    fi
2237    fi
2238  done
2239  IFS="$lt_save_ifs"
2240
2241  # Now substitute the updated list of available tags.
2242  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2243    mv "${ofile}T" "$ofile"
2244    chmod +x "$ofile"
2245  else
2246    rm -f "${ofile}T"
2247    AC_MSG_ERROR([unable to update list of available tagged configurations.])
2248  fi
2249fi
2250])# _LT_AC_TAGCONFIG
2251
2252
2253# AC_LIBTOOL_DLOPEN
2254# -----------------
2255# enable checks for dlopen support
2256AC_DEFUN([AC_LIBTOOL_DLOPEN],
2257 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2258])# AC_LIBTOOL_DLOPEN
2259
2260
2261# AC_LIBTOOL_WIN32_DLL
2262# --------------------
2263# declare package support for building win32 DLLs
2264AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2265[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2266])# AC_LIBTOOL_WIN32_DLL
2267
2268
2269# AC_ENABLE_SHARED([DEFAULT])
2270# ---------------------------
2271# implement the --enable-shared flag
2272# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2273AC_DEFUN([AC_ENABLE_SHARED],
2274[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2275AC_ARG_ENABLE([shared],
2276    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2277	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2278    [p=${PACKAGE-default}
2279    case $enableval in
2280    yes) enable_shared=yes ;;
2281    no) enable_shared=no ;;
2282    *)
2283      enable_shared=no
2284      # Look at the argument we got.  We use all the common list separators.
2285      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2286      for pkg in $enableval; do
2287	IFS="$lt_save_ifs"
2288	if test "X$pkg" = "X$p"; then
2289	  enable_shared=yes
2290	fi
2291      done
2292      IFS="$lt_save_ifs"
2293      ;;
2294    esac],
2295    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2296])# AC_ENABLE_SHARED
2297
2298
2299# AC_DISABLE_SHARED
2300# -----------------
2301# set the default shared flag to --disable-shared
2302AC_DEFUN([AC_DISABLE_SHARED],
2303[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2304AC_ENABLE_SHARED(no)
2305])# AC_DISABLE_SHARED
2306
2307
2308# AC_ENABLE_STATIC([DEFAULT])
2309# ---------------------------
2310# implement the --enable-static flag
2311# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2312AC_DEFUN([AC_ENABLE_STATIC],
2313[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2314AC_ARG_ENABLE([static],
2315    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2316	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2317    [p=${PACKAGE-default}
2318    case $enableval in
2319    yes) enable_static=yes ;;
2320    no) enable_static=no ;;
2321    *)
2322     enable_static=no
2323      # Look at the argument we got.  We use all the common list separators.
2324      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2325      for pkg in $enableval; do
2326	IFS="$lt_save_ifs"
2327	if test "X$pkg" = "X$p"; then
2328	  enable_static=yes
2329	fi
2330      done
2331      IFS="$lt_save_ifs"
2332      ;;
2333    esac],
2334    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2335])# AC_ENABLE_STATIC
2336
2337
2338# AC_DISABLE_STATIC
2339# -----------------
2340# set the default static flag to --disable-static
2341AC_DEFUN([AC_DISABLE_STATIC],
2342[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2343AC_ENABLE_STATIC(no)
2344])# AC_DISABLE_STATIC
2345
2346
2347# AC_ENABLE_FAST_INSTALL([DEFAULT])
2348# ---------------------------------
2349# implement the --enable-fast-install flag
2350# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2351AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2352[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2353AC_ARG_ENABLE([fast-install],
2354    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2355    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2356    [p=${PACKAGE-default}
2357    case $enableval in
2358    yes) enable_fast_install=yes ;;
2359    no) enable_fast_install=no ;;
2360    *)
2361      enable_fast_install=no
2362      # Look at the argument we got.  We use all the common list separators.
2363      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2364      for pkg in $enableval; do
2365	IFS="$lt_save_ifs"
2366	if test "X$pkg" = "X$p"; then
2367	  enable_fast_install=yes
2368	fi
2369      done
2370      IFS="$lt_save_ifs"
2371      ;;
2372    esac],
2373    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2374])# AC_ENABLE_FAST_INSTALL
2375
2376
2377# AC_DISABLE_FAST_INSTALL
2378# -----------------------
2379# set the default to --disable-fast-install
2380AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2381[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2382AC_ENABLE_FAST_INSTALL(no)
2383])# AC_DISABLE_FAST_INSTALL
2384
2385
2386# AC_LIBTOOL_PICMODE([MODE])
2387# --------------------------
2388# implement the --with-pic flag
2389# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2390AC_DEFUN([AC_LIBTOOL_PICMODE],
2391[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2392pic_mode=ifelse($#,1,$1,default)
2393])# AC_LIBTOOL_PICMODE
2394
2395
2396# AC_PROG_EGREP
2397# -------------
2398# This is predefined starting with Autoconf 2.54, so this conditional
2399# definition can be removed once we require Autoconf 2.54 or later.
2400m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2401[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2402   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2403    then ac_cv_prog_egrep='grep -E'
2404    else ac_cv_prog_egrep='egrep'
2405    fi])
2406 EGREP=$ac_cv_prog_egrep
2407 AC_SUBST([EGREP])
2408])])
2409
2410
2411# AC_PATH_TOOL_PREFIX
2412# -------------------
2413# find a file program which can recognize shared library
2414AC_DEFUN([AC_PATH_TOOL_PREFIX],
2415[AC_REQUIRE([AC_PROG_EGREP])dnl
2416AC_MSG_CHECKING([for $1])
2417AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2418[case $MAGIC_CMD in
2419[[\\/*] |  ?:[\\/]*])
2420  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2421  ;;
2422*)
2423  lt_save_MAGIC_CMD="$MAGIC_CMD"
2424  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2425dnl $ac_dummy forces splitting on constant user-supplied paths.
2426dnl POSIX.2 word splitting is done only on the output of word expansions,
2427dnl not every word.  This closes a longstanding sh security hole.
2428  ac_dummy="ifelse([$2], , $PATH, [$2])"
2429  for ac_dir in $ac_dummy; do
2430    IFS="$lt_save_ifs"
2431    test -z "$ac_dir" && ac_dir=.
2432    if test -f $ac_dir/$1; then
2433      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2434      if test -n "$file_magic_test_file"; then
2435	case $deplibs_check_method in
2436	"file_magic "*)
2437	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2438	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2439	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2440	    $EGREP "$file_magic_regex" > /dev/null; then
2441	    :
2442	  else
2443	    cat <<EOF 1>&2
2444
2445*** Warning: the command libtool uses to detect shared libraries,
2446*** $file_magic_cmd, produces output that libtool cannot recognize.
2447*** The result is that libtool may fail to recognize shared libraries
2448*** as such.  This will affect the creation of libtool libraries that
2449*** depend on shared libraries, but programs linked with such libtool
2450*** libraries will work regardless of this problem.  Nevertheless, you
2451*** may want to report the problem to your system manager and/or to
2452*** bug-libtool@gnu.org
2453
2454EOF
2455	  fi ;;
2456	esac
2457      fi
2458      break
2459    fi
2460  done
2461  IFS="$lt_save_ifs"
2462  MAGIC_CMD="$lt_save_MAGIC_CMD"
2463  ;;
2464esac])
2465MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2466if test -n "$MAGIC_CMD"; then
2467  AC_MSG_RESULT($MAGIC_CMD)
2468else
2469  AC_MSG_RESULT(no)
2470fi
2471])# AC_PATH_TOOL_PREFIX
2472
2473
2474# AC_PATH_MAGIC
2475# -------------
2476# find a file program which can recognize a shared library
2477AC_DEFUN([AC_PATH_MAGIC],
2478[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2479if test -z "$lt_cv_path_MAGIC_CMD"; then
2480  if test -n "$ac_tool_prefix"; then
2481    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2482  else
2483    MAGIC_CMD=:
2484  fi
2485fi
2486])# AC_PATH_MAGIC
2487
2488
2489# AC_PROG_LD
2490# ----------
2491# find the pathname to the GNU or non-GNU linker
2492AC_DEFUN([AC_PROG_LD],
2493[AC_ARG_WITH([gnu-ld],
2494    [AC_HELP_STRING([--with-gnu-ld],
2495	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2496    [test "$withval" = no || with_gnu_ld=yes],
2497    [with_gnu_ld=no])
2498AC_REQUIRE([LT_AC_PROG_SED])dnl
2499AC_REQUIRE([AC_PROG_CC])dnl
2500AC_REQUIRE([AC_CANONICAL_HOST])dnl
2501AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2502ac_prog=ld
2503if test "$GCC" = yes; then
2504  # Check if gcc -print-prog-name=ld gives a path.
2505  AC_MSG_CHECKING([for ld used by $CC])
2506  case $host in
2507  *-*-mingw*)
2508    # gcc leaves a trailing carriage return which upsets mingw
2509    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2510  *)
2511    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2512  esac
2513  case $ac_prog in
2514    # Accept absolute paths.
2515    [[\\/]]* | ?:[[\\/]]*)
2516      re_direlt='/[[^/]][[^/]]*/\.\./'
2517      # Canonicalize the pathname of ld
2518      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2519      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2520	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2521      done
2522      test -z "$LD" && LD="$ac_prog"
2523      ;;
2524  "")
2525    # If it fails, then pretend we aren't using GCC.
2526    ac_prog=ld
2527    ;;
2528  *)
2529    # If it is relative, then search for the first ld in PATH.
2530    with_gnu_ld=unknown
2531    ;;
2532  esac
2533elif test "$with_gnu_ld" = yes; then
2534  AC_MSG_CHECKING([for GNU ld])
2535else
2536  AC_MSG_CHECKING([for non-GNU ld])
2537fi
2538AC_CACHE_VAL(lt_cv_path_LD,
2539[if test -z "$LD"; then
2540  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2541  for ac_dir in $PATH; do
2542    IFS="$lt_save_ifs"
2543    test -z "$ac_dir" && ac_dir=.
2544    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2545      lt_cv_path_LD="$ac_dir/$ac_prog"
2546      # Check to see if the program is GNU ld.  I'd rather use --version,
2547      # but apparently some variants of GNU ld only accept -v.
2548      # Break only if it was the GNU/non-GNU ld that we prefer.
2549      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2550      *GNU* | *'with BFD'*)
2551	test "$with_gnu_ld" != no && break
2552	;;
2553      *)
2554	test "$with_gnu_ld" != yes && break
2555	;;
2556      esac
2557    fi
2558  done
2559  IFS="$lt_save_ifs"
2560else
2561  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2562fi])
2563LD="$lt_cv_path_LD"
2564if test -n "$LD"; then
2565  AC_MSG_RESULT($LD)
2566else
2567  AC_MSG_RESULT(no)
2568fi
2569test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2570AC_PROG_LD_GNU
2571])# AC_PROG_LD
2572
2573
2574# AC_PROG_LD_GNU
2575# --------------
2576AC_DEFUN([AC_PROG_LD_GNU],
2577[AC_REQUIRE([AC_PROG_EGREP])dnl
2578AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2579[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2580case `$LD -v 2>&1 </dev/null` in
2581*GNU* | *'with BFD'*)
2582  lt_cv_prog_gnu_ld=yes
2583  ;;
2584*)
2585  lt_cv_prog_gnu_ld=no
2586  ;;
2587esac])
2588with_gnu_ld=$lt_cv_prog_gnu_ld
2589])# AC_PROG_LD_GNU
2590
2591
2592# AC_PROG_LD_RELOAD_FLAG
2593# ----------------------
2594# find reload flag for linker
2595#   -- PORTME Some linkers may need a different reload flag.
2596AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2597[AC_CACHE_CHECK([for $LD option to reload object files],
2598  lt_cv_ld_reload_flag,
2599  [lt_cv_ld_reload_flag='-r'])
2600reload_flag=$lt_cv_ld_reload_flag
2601case $reload_flag in
2602"" | " "*) ;;
2603*) reload_flag=" $reload_flag" ;;
2604esac
2605reload_cmds='$LD$reload_flag -o $output$reload_objs'
2606case $host_os in
2607  darwin*)
2608    if test "$GCC" = yes; then
2609      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2610    else
2611      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2612    fi
2613    ;;
2614esac
2615])# AC_PROG_LD_RELOAD_FLAG
2616
2617
2618# AC_DEPLIBS_CHECK_METHOD
2619# -----------------------
2620# how to check for library dependencies
2621#  -- PORTME fill in with the dynamic library characteristics
2622AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2623[AC_CACHE_CHECK([how to recognize dependent libraries],
2624lt_cv_deplibs_check_method,
2625[lt_cv_file_magic_cmd='$MAGIC_CMD'
2626lt_cv_file_magic_test_file=
2627lt_cv_deplibs_check_method='unknown'
2628# Need to set the preceding variable on all platforms that support
2629# interlibrary dependencies.
2630# 'none' -- dependencies not supported.
2631# `unknown' -- same as none, but documents that we really don't know.
2632# 'pass_all' -- all dependencies passed with no checks.
2633# 'test_compile' -- check by making test program.
2634# 'file_magic [[regex]]' -- check by looking for files in library path
2635# which responds to the $file_magic_cmd with a given extended regex.
2636# If you have `file' or equivalent on your system and you're not sure
2637# whether `pass_all' will *always* work, you probably want this one.
2638
2639case $host_os in
2640aix[[4-9]]*)
2641  lt_cv_deplibs_check_method=pass_all
2642  ;;
2643
2644beos*)
2645  lt_cv_deplibs_check_method=pass_all
2646  ;;
2647
2648bsdi[[45]]*)
2649  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2650  lt_cv_file_magic_cmd='/usr/bin/file -L'
2651  lt_cv_file_magic_test_file=/shlib/libc.so
2652  ;;
2653
2654cygwin*)
2655  # func_win32_libid is a shell function defined in ltmain.sh
2656  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2657  lt_cv_file_magic_cmd='func_win32_libid'
2658  ;;
2659
2660mingw* | pw32*)
2661  # Base MSYS/MinGW do not provide the 'file' command needed by
2662  # func_win32_libid shell function, so use a weaker test based on 'objdump',
2663  # unless we find 'file', for example because we are cross-compiling.
2664  if ( file / ) >/dev/null 2>&1; then
2665    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2666    lt_cv_file_magic_cmd='func_win32_libid'
2667  else
2668    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2669    lt_cv_file_magic_cmd='$OBJDUMP -f'
2670  fi
2671  ;;
2672
2673darwin* | rhapsody*)
2674  lt_cv_deplibs_check_method=pass_all
2675  ;;
2676
2677freebsd* | dragonfly*)
2678  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2679    case $host_cpu in
2680    i*86 )
2681      # Not sure whether the presence of OpenBSD here was a mistake.
2682      # Let's accept both of them until this is cleared up.
2683      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2684      lt_cv_file_magic_cmd=/usr/bin/file
2685      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2686      ;;
2687    esac
2688  else
2689    lt_cv_deplibs_check_method=pass_all
2690  fi
2691  ;;
2692
2693gnu*)
2694  lt_cv_deplibs_check_method=pass_all
2695  ;;
2696
2697hpux10.20* | hpux11*)
2698  lt_cv_file_magic_cmd=/usr/bin/file
2699  case $host_cpu in
2700  ia64*)
2701    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2702    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2703    ;;
2704  hppa*64*)
2705    [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]']
2706    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2707    ;;
2708  *)
2709    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2710    lt_cv_file_magic_test_file=/usr/lib/libc.sl
2711    ;;
2712  esac
2713  ;;
2714
2715interix[[3-9]]*)
2716  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2717  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2718  ;;
2719
2720irix5* | irix6* | nonstopux*)
2721  case $LD in
2722  *-32|*"-32 ") libmagic=32-bit;;
2723  *-n32|*"-n32 ") libmagic=N32;;
2724  *-64|*"-64 ") libmagic=64-bit;;
2725  *) libmagic=never-match;;
2726  esac
2727  lt_cv_deplibs_check_method=pass_all
2728  ;;
2729
2730# This must be Linux ELF.
2731linux* | k*bsd*-gnu)
2732  lt_cv_deplibs_check_method=pass_all
2733  ;;
2734
2735midnightbsd*)
2736  # might to use match_pattern like MirBSD, but there is no well-defined
2737  # naming scheme for libraries yet, as the current one is deprecated, and
2738  # the new one in a state of flux especially between mports and MirPorts
2739  lt_cv_deplibs_check_method=pass_all
2740  ;;
2741
2742mirbsd*)
2743  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2744  ;;
2745
2746netbsd*)
2747  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2748    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2749  else
2750    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2751  fi
2752  ;;
2753
2754newos6*)
2755  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2756  lt_cv_file_magic_cmd=/usr/bin/file
2757  lt_cv_file_magic_test_file=/usr/lib/libnls.so
2758  ;;
2759
2760nto-qnx*)
2761  lt_cv_deplibs_check_method=unknown
2762  ;;
2763
2764openbsd*)
2765  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2766    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2767  else
2768    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2769  fi
2770  ;;
2771
2772osf3* | osf4* | osf5*)
2773  lt_cv_deplibs_check_method=pass_all
2774  ;;
2775
2776rdos*)
2777  lt_cv_deplibs_check_method=pass_all
2778  ;;
2779
2780solaris*)
2781  lt_cv_deplibs_check_method=pass_all
2782  ;;
2783
2784sysv4 | sysv4.3*)
2785  case $host_vendor in
2786  motorola)
2787    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]]'
2788    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2789    ;;
2790  ncr)
2791    lt_cv_deplibs_check_method=pass_all
2792    ;;
2793  sequent)
2794    lt_cv_file_magic_cmd='/bin/file'
2795    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2796    ;;
2797  sni)
2798    lt_cv_file_magic_cmd='/bin/file'
2799    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2800    lt_cv_file_magic_test_file=/lib/libc.so
2801    ;;
2802  siemens)
2803    lt_cv_deplibs_check_method=pass_all
2804    ;;
2805  pc)
2806    lt_cv_deplibs_check_method=pass_all
2807    ;;
2808  esac
2809  ;;
2810
2811sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2812  lt_cv_deplibs_check_method=pass_all
2813  ;;
2814esac
2815])
2816file_magic_cmd=$lt_cv_file_magic_cmd
2817deplibs_check_method=$lt_cv_deplibs_check_method
2818test -z "$deplibs_check_method" && deplibs_check_method=unknown
2819])# AC_DEPLIBS_CHECK_METHOD
2820
2821
2822# AC_PROG_NM
2823# ----------
2824# find the pathname to a BSD-compatible name lister
2825AC_DEFUN([AC_PROG_NM],
2826[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2827[if test -n "$NM"; then
2828  # Let the user override the test.
2829  lt_cv_path_NM="$NM"
2830else
2831  lt_nm_to_check="${ac_tool_prefix}nm"
2832  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2833    lt_nm_to_check="$lt_nm_to_check nm"
2834  fi
2835  for lt_tmp_nm in $lt_nm_to_check; do
2836    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2837    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2838      IFS="$lt_save_ifs"
2839      test -z "$ac_dir" && ac_dir=.
2840      tmp_nm="$ac_dir/$lt_tmp_nm"
2841      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2842	# Check to see if the nm accepts a BSD-compat flag.
2843	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2844	#   nm: unknown option "B" ignored
2845	# Tru64's nm complains that /dev/null is an invalid object file
2846	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2847	*/dev/null* | *'Invalid file or object type'*)
2848	  lt_cv_path_NM="$tmp_nm -B"
2849	  break
2850	  ;;
2851	*)
2852	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2853	  */dev/null*)
2854	    lt_cv_path_NM="$tmp_nm -p"
2855	    break
2856	    ;;
2857	  *)
2858	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2859	    continue # so that we can try to find one that supports BSD flags
2860	    ;;
2861	  esac
2862	  ;;
2863	esac
2864      fi
2865    done
2866    IFS="$lt_save_ifs"
2867  done
2868  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2869fi])
2870NM="$lt_cv_path_NM"
2871])# AC_PROG_NM
2872
2873
2874# AC_CHECK_LIBM
2875# -------------
2876# check for math library
2877AC_DEFUN([AC_CHECK_LIBM],
2878[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2879LIBM=
2880case $host in
2881*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2882  # These system don't have libm, or don't need it
2883  ;;
2884*-ncr-sysv4.3*)
2885  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2886  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2887  ;;
2888*)
2889  AC_CHECK_LIB(m, cos, LIBM="-lm")
2890  ;;
2891esac
2892])# AC_CHECK_LIBM
2893
2894
2895# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2896# -----------------------------------
2897# sets LIBLTDL to the link flags for the libltdl convenience library and
2898# LTDLINCL to the include flags for the libltdl header and adds
2899# --enable-ltdl-convenience to the configure arguments.  Note that
2900# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2901# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
2902# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2903# (note the single quotes!).  If your package is not flat and you're not
2904# using automake, define top_builddir and top_srcdir appropriately in
2905# the Makefiles.
2906AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2907[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2908  case $enable_ltdl_convenience in
2909  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2910  "") enable_ltdl_convenience=yes
2911      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2912  esac
2913  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2914  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2915  # For backwards non-gettext consistent compatibility...
2916  INCLTDL="$LTDLINCL"
2917])# AC_LIBLTDL_CONVENIENCE
2918
2919
2920# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2921# -----------------------------------
2922# sets LIBLTDL to the link flags for the libltdl installable library and
2923# LTDLINCL to the include flags for the libltdl header and adds
2924# --enable-ltdl-install to the configure arguments.  Note that
2925# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2926# and an installed libltdl is not found, it is assumed to be `libltdl'.
2927# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2928# '${top_srcdir}/' (note the single quotes!).  If your package is not
2929# flat and you're not using automake, define top_builddir and top_srcdir
2930# appropriately in the Makefiles.
2931# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2932AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2933[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2934  AC_CHECK_LIB(ltdl, lt_dlinit,
2935  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2936  [if test x"$enable_ltdl_install" = xno; then
2937     AC_MSG_WARN([libltdl not installed, but installation disabled])
2938   else
2939     enable_ltdl_install=yes
2940   fi
2941  ])
2942  if test x"$enable_ltdl_install" = x"yes"; then
2943    ac_configure_args="$ac_configure_args --enable-ltdl-install"
2944    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2945    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2946  else
2947    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2948    LIBLTDL="-lltdl"
2949    LTDLINCL=
2950  fi
2951  # For backwards non-gettext consistent compatibility...
2952  INCLTDL="$LTDLINCL"
2953])# AC_LIBLTDL_INSTALLABLE
2954
2955
2956# AC_LIBTOOL_CXX
2957# --------------
2958# enable support for C++ libraries
2959AC_DEFUN([AC_LIBTOOL_CXX],
2960[AC_REQUIRE([_LT_AC_LANG_CXX])
2961])# AC_LIBTOOL_CXX
2962
2963
2964# _LT_AC_LANG_CXX
2965# ---------------
2966# with a little hack for autoconf 2.13 in case g++ is not installed
2967AC_DEFUN([_LT_AC_LANG_CXX],
2968[pushdef([AC_MSG_ERROR], [CXX=false])
2969AC_REQUIRE([AC_PROG_CXX])
2970popdef([AC_MSG_ERROR])
2971AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2972_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2973])# _LT_AC_LANG_CXX
2974
2975# _LT_AC_PROG_CXXCPP
2976# ------------------
2977# with a little hack for autoconf 2.13 in case g++ is not installed
2978AC_DEFUN([_LT_AC_PROG_CXXCPP],
2979[pushdef([AC_MSG_ERROR], [CXX=false])
2980AC_REQUIRE([AC_PROG_CXX])
2981popdef([AC_MSG_ERROR])
2982if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2983    test x"$CXX" != x"false" &&
2984    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2985    (test "X$CXX" != "Xg++"))) ; then
2986  AC_PROG_CXXCPP
2987fi
2988])# _LT_AC_PROG_CXXCPP
2989
2990# AC_LIBTOOL_F77
2991# --------------
2992# enable support for Fortran 77 libraries
2993AC_DEFUN([AC_LIBTOOL_F77],
2994[AC_REQUIRE([_LT_AC_LANG_F77])
2995])# AC_LIBTOOL_F77
2996
2997
2998# _LT_AC_LANG_F77
2999# ---------------
3000# with a little hack for autoconf 2.13 in case g77 is not installed
3001AC_DEFUN([_LT_AC_LANG_F77],
3002[pushdef([AC_MSG_ERROR], [F77=false])
3003AC_REQUIRE([AC_PROG_F77])
3004popdef([AC_MSG_ERROR])
3005_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3006])# _LT_AC_LANG_F77
3007
3008
3009# AC_LIBTOOL_GCJ
3010# --------------
3011# enable support for GCJ libraries
3012AC_DEFUN([AC_LIBTOOL_GCJ],
3013[AC_REQUIRE([_LT_AC_LANG_GCJ])
3014])# AC_LIBTOOL_GCJ
3015
3016
3017# _LT_AC_LANG_GCJ
3018# ---------------
3019AC_DEFUN([_LT_AC_LANG_GCJ],
3020[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3021  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3022    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3023      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3024	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3025	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3026_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3027])# _LT_AC_LANG_GCJ
3028
3029
3030# AC_LIBTOOL_RC
3031# -------------
3032# enable support for Windows resource files
3033AC_DEFUN([AC_LIBTOOL_RC],
3034[AC_REQUIRE([LT_AC_PROG_RC])
3035_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3036])# AC_LIBTOOL_RC
3037
3038
3039# AC_LIBTOOL_LANG_C_CONFIG
3040# ------------------------
3041# Ensure that the configuration vars for the C compiler are
3042# suitably defined.  Those variables are subsequently used by
3043# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3044AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3045AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3046[lt_save_CC="$CC"
3047AC_LANG_PUSH(C)
3048
3049# Source file extension for C test sources.
3050ac_ext=c
3051
3052# Object file extension for compiled C test sources.
3053objext=o
3054_LT_AC_TAGVAR(objext, $1)=$objext
3055
3056# Code to be used in simple compile tests
3057lt_simple_compile_test_code="int some_variable = 0;"
3058
3059# Code to be used in simple link tests
3060lt_simple_link_test_code='int main(){return(0);}'
3061
3062_LT_AC_SYS_COMPILER
3063
3064# save warnings/boilerplate of simple test code
3065_LT_COMPILER_BOILERPLATE
3066_LT_LINKER_BOILERPLATE
3067
3068## CAVEAT EMPTOR:
3069## There is no encapsulation within the following macros, do not change
3070## the running order or otherwise move them around unless you know exactly
3071## what you are doing...
3072AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3073AC_LIBTOOL_PROG_COMPILER_PIC($1)
3074AC_LIBTOOL_PROG_CC_C_O($1)
3075AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3076AC_LIBTOOL_PROG_LD_SHLIBS($1)
3077AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3078AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3079AC_LIBTOOL_SYS_LIB_STRIP
3080AC_LIBTOOL_DLOPEN_SELF
3081
3082# Report which library types will actually be built
3083AC_MSG_CHECKING([if libtool supports shared libraries])
3084AC_MSG_RESULT([$can_build_shared])
3085
3086AC_MSG_CHECKING([whether to build shared libraries])
3087test "$can_build_shared" = "no" && enable_shared=no
3088
3089# On AIX, shared libraries and static libraries use the same namespace, and
3090# are all built from PIC.
3091case $host_os in
3092aix3*)
3093  test "$enable_shared" = yes && enable_static=no
3094  if test -n "$RANLIB"; then
3095    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3096    postinstall_cmds='$RANLIB $lib'
3097  fi
3098  ;;
3099
3100aix[[4-9]]*)
3101  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3102    test "$enable_shared" = yes && enable_static=no
3103  fi
3104    ;;
3105esac
3106AC_MSG_RESULT([$enable_shared])
3107
3108AC_MSG_CHECKING([whether to build static libraries])
3109# Make sure either enable_shared or enable_static is yes.
3110test "$enable_shared" = yes || enable_static=yes
3111AC_MSG_RESULT([$enable_static])
3112
3113AC_LIBTOOL_CONFIG($1)
3114
3115AC_LANG_POP
3116CC="$lt_save_CC"
3117])# AC_LIBTOOL_LANG_C_CONFIG
3118
3119
3120# AC_LIBTOOL_LANG_CXX_CONFIG
3121# --------------------------
3122# Ensure that the configuration vars for the C compiler are
3123# suitably defined.  Those variables are subsequently used by
3124# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3125AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3126AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3127[AC_LANG_PUSH(C++)
3128pushdef([AC_MSG_ERROR], [CXX=false])
3129AC_REQUIRE([AC_PROG_CXX])
3130popdef([AC_MSG_ERROR])
3131AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3132
3133_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3134_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3135_LT_AC_TAGVAR(always_export_symbols, $1)=no
3136_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3137_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3138_LT_AC_TAGVAR(hardcode_direct, $1)=no
3139_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3140_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3141_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3142_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3143_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3144_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3145_LT_AC_TAGVAR(module_cmds, $1)=
3146_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3147_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3148_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3149_LT_AC_TAGVAR(no_undefined_flag, $1)=
3150_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3151_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3152
3153# Dependencies to place before and after the object being linked:
3154_LT_AC_TAGVAR(predep_objects, $1)=
3155_LT_AC_TAGVAR(postdep_objects, $1)=
3156_LT_AC_TAGVAR(predeps, $1)=
3157_LT_AC_TAGVAR(postdeps, $1)=
3158_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3159_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
3160
3161# Source file extension for C++ test sources.
3162ac_ext=cpp
3163
3164# Object file extension for compiled C++ test sources.
3165objext=o
3166_LT_AC_TAGVAR(objext, $1)=$objext
3167
3168# Code to be used in simple compile tests
3169lt_simple_compile_test_code="int some_variable = 0;"
3170
3171# Code to be used in simple link tests
3172lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
3173
3174# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3175_LT_AC_SYS_COMPILER
3176
3177# save warnings/boilerplate of simple test code
3178_LT_COMPILER_BOILERPLATE
3179_LT_LINKER_BOILERPLATE
3180
3181# Allow CC to be a program name with arguments.
3182lt_save_CC=$CC
3183lt_save_LD=$LD
3184lt_save_GCC=$GCC
3185GCC=$GXX
3186lt_save_with_gnu_ld=$with_gnu_ld
3187lt_save_path_LD=$lt_cv_path_LD
3188if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3189  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3190else
3191  $as_unset lt_cv_prog_gnu_ld
3192fi
3193if test -n "${lt_cv_path_LDCXX+set}"; then
3194  lt_cv_path_LD=$lt_cv_path_LDCXX
3195else
3196  $as_unset lt_cv_path_LD
3197fi
3198test -z "${LDCXX+set}" || LD=$LDCXX
3199CC=${CXX-"c++"}
3200compiler=$CC
3201_LT_AC_TAGVAR(compiler, $1)=$CC
3202_LT_CC_BASENAME([$compiler])
3203
3204# We don't want -fno-exception wen compiling C++ code, so set the
3205# no_builtin_flag separately
3206if test "$GXX" = yes; then
3207  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3208else
3209  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3210fi
3211
3212if test "$GXX" = yes; then
3213  # Set up default GNU C++ configuration
3214
3215  AC_PROG_LD
3216
3217  # Check if GNU C++ uses GNU ld as the underlying linker, since the
3218  # archiving commands below assume that GNU ld is being used.
3219  if test "$with_gnu_ld" = yes; then
3220    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3221    _LT_AC_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'
3222
3223    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3224    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3225
3226    # If archive_cmds runs LD, not CC, wlarc should be empty
3227    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3228    #     investigate it a little bit more. (MM)
3229    wlarc='${wl}'
3230
3231    # ancient GNU ld didn't support --whole-archive et. al.
3232    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3233	grep 'no-whole-archive' > /dev/null; then
3234      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3235    else
3236      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3237    fi
3238  else
3239    with_gnu_ld=no
3240    wlarc=
3241
3242    # A generic and very simple default shared library creation
3243    # command for GNU C++ for the case where it uses the native
3244    # linker, instead of GNU ld.  If possible, this setting should
3245    # overridden to take advantage of the native linker features on
3246    # the platform it is being used on.
3247    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3248  fi
3249
3250  # Commands to make compiler produce verbose output that lists
3251  # what "hidden" libraries, object files and flags are used when
3252  # linking a shared library.
3253  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3254
3255else
3256  GXX=no
3257  with_gnu_ld=no
3258  wlarc=
3259fi
3260
3261# PORTME: fill in a description of your system's C++ link characteristics
3262AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3263_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3264case $host_os in
3265  aix3*)
3266    # FIXME: insert proper C++ library support
3267    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3268    ;;
3269  aix[[4-9]]*)
3270    if test "$host_cpu" = ia64; then
3271      # On IA64, the linker does run time linking by default, so we don't
3272      # have to do anything special.
3273      aix_use_runtimelinking=no
3274      exp_sym_flag='-Bexport'
3275      no_entry_flag=""
3276    else
3277      aix_use_runtimelinking=no
3278
3279      # Test if we are trying to use run time linking or normal
3280      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3281      # need to do runtime linking.
3282      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
3283	for ld_flag in $LDFLAGS; do
3284	  case $ld_flag in
3285	  *-brtl*)
3286	    aix_use_runtimelinking=yes
3287	    break
3288	    ;;
3289	  esac
3290	done
3291	;;
3292      esac
3293
3294      exp_sym_flag='-bexport'
3295      no_entry_flag='-bnoentry'
3296    fi
3297
3298    # When large executables or shared objects are built, AIX ld can
3299    # have problems creating the table of contents.  If linking a library
3300    # or program results in "error TOC overflow" add -mminimal-toc to
3301    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3302    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3303
3304    _LT_AC_TAGVAR(archive_cmds, $1)=''
3305    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3306    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3307    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3308
3309    if test "$GXX" = yes; then
3310      case $host_os in aix4.[[012]]|aix4.[[012]].*)
3311      # We only want to do this on AIX 4.2 and lower, the check
3312      # below for broken collect2 doesn't work under 4.3+
3313	collect2name=`${CC} -print-prog-name=collect2`
3314	if test -f "$collect2name" && \
3315	   strings "$collect2name" | grep resolve_lib_name >/dev/null
3316	then
3317	  # We have reworked collect2
3318	  :
3319	else
3320	  # We have old collect2
3321	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3322	  # It fails to find uninstalled libraries when the uninstalled
3323	  # path is not listed in the libpath.  Setting hardcode_minus_L
3324	  # to unsupported forces relinking
3325	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3326	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3327	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3328	fi
3329	;;
3330      esac
3331      shared_flag='-shared'
3332      if test "$aix_use_runtimelinking" = yes; then
3333	shared_flag="$shared_flag "'${wl}-G'
3334      fi
3335    else
3336      # not using gcc
3337      if test "$host_cpu" = ia64; then
3338	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3339	# chokes on -Wl,-G. The following line is correct:
3340	shared_flag='-G'
3341      else
3342	if test "$aix_use_runtimelinking" = yes; then
3343	  shared_flag='${wl}-G'
3344	else
3345	  shared_flag='${wl}-bM:SRE'
3346	fi
3347      fi
3348    fi
3349
3350    # It seems that -bexpall does not export symbols beginning with
3351    # underscore (_), so it is better to generate a list of symbols to export.
3352    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3353    if test "$aix_use_runtimelinking" = yes; then
3354      # Warning - without using the other runtime loading flags (-brtl),
3355      # -berok will link without error, but may produce a broken library.
3356      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3357      # Determine the default libpath from the value encoded in an empty executable.
3358      _LT_AC_SYS_LIBPATH_AIX
3359      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3360
3361      _LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3362     else
3363      if test "$host_cpu" = ia64; then
3364	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3365	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3366	_LT_AC_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"
3367      else
3368	# Determine the default libpath from the value encoded in an empty executable.
3369	_LT_AC_SYS_LIBPATH_AIX
3370	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3371	# Warning - without using the other run time loading flags,
3372	# -berok will link without error, but may produce a broken library.
3373	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3374	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3375	# Exported symbols can be pulled into shared objects from archives
3376	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3377	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3378	# This is similar to how AIX traditionally builds its shared libraries.
3379	_LT_AC_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'
3380      fi
3381    fi
3382    ;;
3383
3384  beos*)
3385    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3386      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3387      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3388      # support --undefined.  This deserves some investigation.  FIXME
3389      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3390    else
3391      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3392    fi
3393    ;;
3394
3395  chorus*)
3396    case $cc_basename in
3397      *)
3398	# FIXME: insert proper C++ library support
3399	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3400	;;
3401    esac
3402    ;;
3403
3404  cygwin* | mingw* | pw32*)
3405    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3406    # as there is no search path for DLLs.
3407    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3408    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3409    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3410    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3411
3412    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3413      _LT_AC_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'
3414      # If the export-symbols file already is a .def file (1st line
3415      # is EXPORTS), use it as is; otherwise, prepend...
3416      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3417	cp $export_symbols $output_objdir/$soname.def;
3418      else
3419	echo EXPORTS > $output_objdir/$soname.def;
3420	cat $export_symbols >> $output_objdir/$soname.def;
3421      fi~
3422      $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'
3423    else
3424      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3425    fi
3426  ;;
3427      darwin* | rhapsody*)
3428      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3429      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3430      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3431      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3432      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3433      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3434      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3435      if test "$GXX" = yes ; then
3436      output_verbose_link_cmd='echo'
3437      _LT_AC_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}"
3438      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3439      _LT_AC_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}"
3440      _LT_AC_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}"
3441      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3442        _LT_AC_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}"
3443        _LT_AC_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}"
3444      fi
3445      else
3446      case $cc_basename in
3447        xlc*)
3448         output_verbose_link_cmd='echo'
3449          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
3450          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3451          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3452          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3453          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3454          ;;
3455       *)
3456         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3457          ;;
3458      esac
3459      fi
3460        ;;
3461
3462  dgux*)
3463    case $cc_basename in
3464      ec++*)
3465	# FIXME: insert proper C++ library support
3466	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3467	;;
3468      ghcx*)
3469	# Green Hills C++ Compiler
3470	# FIXME: insert proper C++ library support
3471	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3472	;;
3473      *)
3474	# FIXME: insert proper C++ library support
3475	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3476	;;
3477    esac
3478    ;;
3479  freebsd[[12]]*)
3480    # C++ shared libraries reported to be fairly broken before switch to ELF
3481    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3482    ;;
3483  freebsd-elf*)
3484    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3485    ;;
3486  freebsd* | dragonfly* | midnightbsd*)
3487    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3488    # conventions
3489    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3490    ;;
3491  gnu*)
3492    ;;
3493  hpux9*)
3494    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3495    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3496    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3497    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3498    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3499				# but as the default
3500				# location of the library.
3501
3502    case $cc_basename in
3503    CC*)
3504      # FIXME: insert proper C++ library support
3505      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3506      ;;
3507    aCC*)
3508      _LT_AC_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'
3509      # Commands to make compiler produce verbose output that lists
3510      # what "hidden" libraries, object files and flags are used when
3511      # linking a shared library.
3512      #
3513      # There doesn't appear to be a way to prevent this compiler from
3514      # explicitly linking system object files so we need to strip them
3515      # from the output so that they don't get included in the library
3516      # dependencies.
3517      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 $list'
3518      ;;
3519    *)
3520      if test "$GXX" = yes; then
3521        _LT_AC_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'
3522      else
3523        # FIXME: insert proper C++ library support
3524        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3525      fi
3526      ;;
3527    esac
3528    ;;
3529  hpux10*|hpux11*)
3530    if test $with_gnu_ld = no; then
3531      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3532      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3533
3534      case $host_cpu in
3535      hppa*64*|ia64*) ;;
3536      *)
3537	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3538        ;;
3539      esac
3540    fi
3541    case $host_cpu in
3542    hppa*64*|ia64*)
3543      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3544      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3545      ;;
3546    *)
3547      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3548      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3549					      # but as the default
3550					      # location of the library.
3551      ;;
3552    esac
3553
3554    case $cc_basename in
3555      CC*)
3556	# FIXME: insert proper C++ library support
3557	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3558	;;
3559      aCC*)
3560	case $host_cpu in
3561	hppa*64*)
3562	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3563	  ;;
3564	ia64*)
3565	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3566	  ;;
3567	*)
3568	  _LT_AC_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'
3569	  ;;
3570	esac
3571	# Commands to make compiler produce verbose output that lists
3572	# what "hidden" libraries, object files and flags are used when
3573	# linking a shared library.
3574	#
3575	# There doesn't appear to be a way to prevent this compiler from
3576	# explicitly linking system object files so we need to strip them
3577	# from the output so that they don't get included in the library
3578	# dependencies.
3579	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 $list'
3580	;;
3581      *)
3582	if test "$GXX" = yes; then
3583	  if test $with_gnu_ld = no; then
3584	    case $host_cpu in
3585	    hppa*64*)
3586	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3587	      ;;
3588	    ia64*)
3589	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3590	      ;;
3591	    *)
3592	      _LT_AC_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'
3593	      ;;
3594	    esac
3595	  fi
3596	else
3597	  # FIXME: insert proper C++ library support
3598	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3599	fi
3600	;;
3601    esac
3602    ;;
3603  interix[[3-9]]*)
3604    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3605    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3606    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3607    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3608    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3609    # Instead, shared libraries are loaded at an image base (0x10000000 by
3610    # default) and relocated if they conflict, which is a slow very memory
3611    # consuming and fragmenting process.  To avoid this, we pick a random,
3612    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3613    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
3614    _LT_AC_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'
3615    _LT_AC_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'
3616    ;;
3617  irix5* | irix6*)
3618    case $cc_basename in
3619      CC*)
3620	# SGI C++
3621	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3622
3623	# Archives containing C++ object files must be created using
3624	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3625	# necessary to make sure instantiated templates are included
3626	# in the archive.
3627	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3628	;;
3629      *)
3630	if test "$GXX" = yes; then
3631	  if test "$with_gnu_ld" = no; then
3632	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3633	  else
3634	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3635	  fi
3636	fi
3637	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3638	;;
3639    esac
3640    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3641    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3642    ;;
3643  linux* | k*bsd*-gnu)
3644    case $cc_basename in
3645      KCC*)
3646	# Kuck and Associates, Inc. (KAI) C++ Compiler
3647
3648	# KCC will only create a shared library if the output file
3649	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3650	# to its proper name (with version) after linking.
3651	_LT_AC_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'
3652	_LT_AC_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'
3653	# Commands to make compiler produce verbose output that lists
3654	# what "hidden" libraries, object files and flags are used when
3655	# linking a shared library.
3656	#
3657	# There doesn't appear to be a way to prevent this compiler from
3658	# explicitly linking system object files so we need to strip them
3659	# from the output so that they don't get included in the library
3660	# dependencies.
3661	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 $list'
3662
3663	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3664	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3665
3666	# Archives containing C++ object files must be created using
3667	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3668	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3669	;;
3670      icpc*)
3671	# Intel C++
3672	with_gnu_ld=yes
3673	# version 8.0 and above of icpc choke on multiply defined symbols
3674	# if we add $predep_objects and $postdep_objects, however 7.1 and
3675	# earlier do not add the objects themselves.
3676	case `$CC -V 2>&1` in
3677	*"Version 7."*)
3678  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3679  	  _LT_AC_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'
3680	  ;;
3681	*)  # Version 8.0 or newer
3682	  tmp_idyn=
3683	  case $host_cpu in
3684	    ia64*) tmp_idyn=' -i_dynamic';;
3685	  esac
3686  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3687	  _LT_AC_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'
3688	  ;;
3689	esac
3690	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3691	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3692	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3693	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3694	;;
3695      pgCC* | pgcpp*)
3696        # Portland Group C++ compiler
3697	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3698  	_LT_AC_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'
3699
3700	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3701	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3702	_LT_AC_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'
3703        ;;
3704      cxx*)
3705	# Compaq C++
3706	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3707	_LT_AC_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'
3708
3709	runpath_var=LD_RUN_PATH
3710	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3711	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3712
3713	# Commands to make compiler produce verbose output that lists
3714	# what "hidden" libraries, object files and flags are used when
3715	# linking a shared library.
3716	#
3717	# There doesn't appear to be a way to prevent this compiler from
3718	# explicitly linking system object files so we need to strip them
3719	# from the output so that they don't get included in the library
3720	# dependencies.
3721	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3722	;;
3723      *)
3724	case `$CC -V 2>&1 | sed 5q` in
3725	*Sun\ C*)
3726	  # Sun C++ 5.9
3727	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3728	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3729	  _LT_AC_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'
3730	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3731	  _LT_AC_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'
3732
3733	  # Not sure whether something based on
3734	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
3735	  # would be better.
3736	  output_verbose_link_cmd='echo'
3737
3738	  # Archives containing C++ object files must be created using
3739	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
3740	  # necessary to make sure instantiated templates are included
3741	  # in the archive.
3742	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3743	  ;;
3744	esac
3745	;;
3746    esac
3747    ;;
3748  lynxos*)
3749    # FIXME: insert proper C++ library support
3750    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3751    ;;
3752  m88k*)
3753    # FIXME: insert proper C++ library support
3754    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3755    ;;
3756  mirbsd*)
3757    if test -f /usr/libexec/ld.so; then
3758      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3759      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3760      _LT_AC_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'
3761      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3762      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3763      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3764      output_verbose_link_cmd='echo'
3765    else
3766      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3767    fi
3768    ;;
3769  mvs*)
3770    case $cc_basename in
3771      cxx*)
3772	# FIXME: insert proper C++ library support
3773	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3774	;;
3775      *)
3776	# FIXME: insert proper C++ library support
3777	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3778	;;
3779    esac
3780    ;;
3781  netbsd*)
3782    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3783      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3784      wlarc=
3785      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3786      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3787      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3788    fi
3789    # Workaround some broken pre-1.5 toolchains
3790    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3791    ;;
3792  openbsd2*)
3793    # C++ shared libraries are fairly broken
3794    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3795    ;;
3796  openbsd*)
3797    if test -f /usr/libexec/ld.so; then
3798      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3799      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3800      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3801      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3802      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3803	_LT_AC_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'
3804	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3805	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3806      fi
3807      output_verbose_link_cmd='echo'
3808    else
3809      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3810    fi
3811    ;;
3812  osf3*)
3813    case $cc_basename in
3814      KCC*)
3815	# Kuck and Associates, Inc. (KAI) C++ Compiler
3816
3817	# KCC will only create a shared library if the output file
3818	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3819	# to its proper name (with version) after linking.
3820	_LT_AC_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'
3821
3822	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3823	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3824
3825	# Archives containing C++ object files must be created using
3826	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3827	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3828
3829	;;
3830      RCC*)
3831	# Rational C++ 2.4.1
3832	# FIXME: insert proper C++ library support
3833	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3834	;;
3835      cxx*)
3836	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3837	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3838
3839	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3840	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3841
3842	# Commands to make compiler produce verbose output that lists
3843	# what "hidden" libraries, object files and flags are used when
3844	# linking a shared library.
3845	#
3846	# There doesn't appear to be a way to prevent this compiler from
3847	# explicitly linking system object files so we need to strip them
3848	# from the output so that they don't get included in the library
3849	# dependencies.
3850	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3851	;;
3852      *)
3853	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3854	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3855	  _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3856
3857	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3858	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3859
3860	  # Commands to make compiler produce verbose output that lists
3861	  # what "hidden" libraries, object files and flags are used when
3862	  # linking a shared library.
3863	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3864
3865	else
3866	  # FIXME: insert proper C++ library support
3867	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3868	fi
3869	;;
3870    esac
3871    ;;
3872  osf4* | osf5*)
3873    case $cc_basename in
3874      KCC*)
3875	# Kuck and Associates, Inc. (KAI) C++ Compiler
3876
3877	# KCC will only create a shared library if the output file
3878	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3879	# to its proper name (with version) after linking.
3880	_LT_AC_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'
3881
3882	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3883	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3884
3885	# Archives containing C++ object files must be created using
3886	# the KAI C++ compiler.
3887	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3888	;;
3889      RCC*)
3890	# Rational C++ 2.4.1
3891	# FIXME: insert proper C++ library support
3892	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3893	;;
3894      cxx*)
3895	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3896	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3897	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3898	  echo "-hidden">> $lib.exp~
3899	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
3900	  $rm $lib.exp'
3901
3902	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3903	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3904
3905	# Commands to make compiler produce verbose output that lists
3906	# what "hidden" libraries, object files and flags are used when
3907	# linking a shared library.
3908	#
3909	# There doesn't appear to be a way to prevent this compiler from
3910	# explicitly linking system object files so we need to strip them
3911	# from the output so that they don't get included in the library
3912	# dependencies.
3913	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3914	;;
3915      *)
3916	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3917	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3918	 _LT_AC_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` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3919
3920	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3921	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3922
3923	  # Commands to make compiler produce verbose output that lists
3924	  # what "hidden" libraries, object files and flags are used when
3925	  # linking a shared library.
3926	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3927
3928	else
3929	  # FIXME: insert proper C++ library support
3930	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3931	fi
3932	;;
3933    esac
3934    ;;
3935  psos*)
3936    # FIXME: insert proper C++ library support
3937    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3938    ;;
3939  sunos4*)
3940    case $cc_basename in
3941      CC*)
3942	# Sun C++ 4.x
3943	# FIXME: insert proper C++ library support
3944	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3945	;;
3946      lcc*)
3947	# Lucid
3948	# FIXME: insert proper C++ library support
3949	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3950	;;
3951      *)
3952	# FIXME: insert proper C++ library support
3953	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3954	;;
3955    esac
3956    ;;
3957  solaris*)
3958    case $cc_basename in
3959      CC*)
3960	# Sun C++ 4.2, 5.x and Centerline C++
3961        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3962	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3963	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3964	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3965	$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'
3966
3967	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3968	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3969	case $host_os in
3970	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3971	  *)
3972	    # The compiler driver will combine and reorder linker options,
3973	    # but understands `-z linker_flag'.
3974	    # Supported since Solaris 2.6 (maybe 2.5.1?)
3975	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
3976	    ;;
3977	esac
3978	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3979
3980	output_verbose_link_cmd='echo'
3981
3982	# Archives containing C++ object files must be created using
3983	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
3984	# necessary to make sure instantiated templates are included
3985	# in the archive.
3986	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3987	;;
3988      gcx*)
3989	# Green Hills C++ Compiler
3990	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3991
3992	# The C++ compiler must be used to create the archive.
3993	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3994	;;
3995      *)
3996	# GNU C++ compiler with Solaris linker
3997	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3998	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3999	  if $CC --version | grep -v '^2\.7' > /dev/null; then
4000	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4001	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4002		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4003
4004	    # Commands to make compiler produce verbose output that lists
4005	    # what "hidden" libraries, object files and flags are used when
4006	    # linking a shared library.
4007	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4008	  else
4009	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
4010	    # platform.
4011	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4012	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4013		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4014
4015	    # Commands to make compiler produce verbose output that lists
4016	    # what "hidden" libraries, object files and flags are used when
4017	    # linking a shared library.
4018	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4019	  fi
4020
4021	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4022	  case $host_os in
4023	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4024	  *)
4025	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4026	    ;;
4027	  esac
4028	fi
4029	;;
4030    esac
4031    ;;
4032  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4033    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4034    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4035    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4036    runpath_var='LD_RUN_PATH'
4037
4038    case $cc_basename in
4039      CC*)
4040	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4041	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4042	;;
4043      *)
4044	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4045	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4046	;;
4047    esac
4048    ;;
4049  sysv5* | sco3.2v5* | sco5v6*)
4050    # Note: We can NOT use -z defs as we might desire, because we do not
4051    # link with -lc, and that would cause any symbols used from libc to
4052    # always be unresolved, which means just about no library would
4053    # ever link correctly.  If we're not using GNU ld we use -z text
4054    # though, which does catch some bad symbols but isn't as heavy-handed
4055    # as -z defs.
4056    # For security reasons, it is highly recommended that you always
4057    # use absolute paths for naming shared libraries, and exclude the
4058    # DT_RUNPATH tag from executables and libraries.  But doing so
4059    # requires that you compile everything twice, which is a pain.
4060    # So that behaviour is only enabled if SCOABSPATH is set to a
4061    # non-empty value in the environment.  Most likely only useful for
4062    # creating official distributions of packages.
4063    # This is a hack until libtool officially supports absolute path
4064    # names for shared libraries.
4065    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4066    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4067    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4068    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4069    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4070    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4071    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4072    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4073    runpath_var='LD_RUN_PATH'
4074
4075    case $cc_basename in
4076      CC*)
4077	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4078	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4079	;;
4080      *)
4081	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4082	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4083	;;
4084    esac
4085    ;;
4086  tandem*)
4087    case $cc_basename in
4088      NCC*)
4089	# NonStop-UX NCC 3.20
4090	# FIXME: insert proper C++ library support
4091	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4092	;;
4093      *)
4094	# FIXME: insert proper C++ library support
4095	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4096	;;
4097    esac
4098    ;;
4099  vxworks*)
4100    # FIXME: insert proper C++ library support
4101    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4102    ;;
4103  *)
4104    # FIXME: insert proper C++ library support
4105    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4106    ;;
4107esac
4108AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4109test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4110
4111_LT_AC_TAGVAR(GCC, $1)="$GXX"
4112_LT_AC_TAGVAR(LD, $1)="$LD"
4113
4114## CAVEAT EMPTOR:
4115## There is no encapsulation within the following macros, do not change
4116## the running order or otherwise move them around unless you know exactly
4117## what you are doing...
4118AC_LIBTOOL_POSTDEP_PREDEP($1)
4119AC_LIBTOOL_PROG_COMPILER_PIC($1)
4120AC_LIBTOOL_PROG_CC_C_O($1)
4121AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4122AC_LIBTOOL_PROG_LD_SHLIBS($1)
4123AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4124AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4125
4126AC_LIBTOOL_CONFIG($1)
4127
4128AC_LANG_POP
4129CC=$lt_save_CC
4130LDCXX=$LD
4131LD=$lt_save_LD
4132GCC=$lt_save_GCC
4133with_gnu_ldcxx=$with_gnu_ld
4134with_gnu_ld=$lt_save_with_gnu_ld
4135lt_cv_path_LDCXX=$lt_cv_path_LD
4136lt_cv_path_LD=$lt_save_path_LD
4137lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4138lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4139])# AC_LIBTOOL_LANG_CXX_CONFIG
4140
4141# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4142# ------------------------------------
4143# Figure out "hidden" library dependencies from verbose
4144# compiler output when linking a shared library.
4145# Parse the compiler output and extract the necessary
4146# objects, libraries and library flags.
4147AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
4148[AC_REQUIRE([LT_AC_PROG_SED])dnl
4149dnl we can't use the lt_simple_compile_test_code here,
4150dnl because it contains code intended for an executable,
4151dnl not a library.  It's possible we should let each
4152dnl tag define a new lt_????_link_test_code variable,
4153dnl but it's only used here...
4154ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4155int a;
4156void foo (void) { a = 0; }
4157EOF
4158],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4159class Foo
4160{
4161public:
4162  Foo (void) { a = 0; }
4163private:
4164  int a;
4165};
4166EOF
4167],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4168      subroutine foo
4169      implicit none
4170      integer*4 a
4171      a=0
4172      return
4173      end
4174EOF
4175],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4176public class foo {
4177  private int a;
4178  public void bar (void) {
4179    a = 0;
4180  }
4181};
4182EOF
4183])
4184dnl Parse the compiler output and extract the necessary
4185dnl objects, libraries and library flags.
4186if AC_TRY_EVAL(ac_compile); then
4187  # Parse the compiler output and extract the necessary
4188  # objects, libraries and library flags.
4189
4190  # Sentinel used to keep track of whether or not we are before
4191  # the conftest object file.
4192  pre_test_object_deps_done=no
4193
4194  # The `*' in the case matches for architectures that use `case' in
4195  # $output_verbose_cmd can trigger glob expansion during the loop
4196  # eval without this substitution.
4197  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4198
4199  for p in `eval $output_verbose_link_cmd`; do
4200    case $p in
4201
4202    -L* | -R* | -l*)
4203       # Some compilers place space between "-{L,R}" and the path.
4204       # Remove the space.
4205       if test $p = "-L" \
4206	  || test $p = "-R"; then
4207	 prev=$p
4208	 continue
4209       else
4210	 prev=
4211       fi
4212
4213       if test "$pre_test_object_deps_done" = no; then
4214	 case $p in
4215	 -L* | -R*)
4216	   # Internal compiler library paths should come after those
4217	   # provided the user.  The postdeps already come after the
4218	   # user supplied libs so there is no need to process them.
4219	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4220	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4221	   else
4222	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4223	   fi
4224	   ;;
4225	 # The "-l" case would never come before the object being
4226	 # linked, so don't bother handling this case.
4227	 esac
4228       else
4229	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4230	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4231	 else
4232	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4233	 fi
4234       fi
4235       ;;
4236
4237    *.$objext)
4238       # This assumes that the test object file only shows up
4239       # once in the compiler output.
4240       if test "$p" = "conftest.$objext"; then
4241	 pre_test_object_deps_done=yes
4242	 continue
4243       fi
4244
4245       if test "$pre_test_object_deps_done" = no; then
4246	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4247	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
4248	 else
4249	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4250	 fi
4251       else
4252	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4253	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4254	 else
4255	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4256	 fi
4257       fi
4258       ;;
4259
4260    *) ;; # Ignore the rest.
4261
4262    esac
4263  done
4264
4265  # Clean up.
4266  rm -f a.out a.exe
4267else
4268  echo "libtool.m4: error: problem compiling $1 test program"
4269fi
4270
4271$rm -f confest.$objext
4272
4273_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
4274if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4275  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
4276fi
4277
4278# PORTME: override above test on systems where it is broken
4279ifelse([$1],[CXX],
4280[case $host_os in
4281interix[[3-9]]*)
4282  # Interix 3.5 installs completely hosed .la files for C++, so rather than
4283  # hack all around it, let's just trust "g++" to DTRT.
4284  _LT_AC_TAGVAR(predep_objects,$1)=
4285  _LT_AC_TAGVAR(postdep_objects,$1)=
4286  _LT_AC_TAGVAR(postdeps,$1)=
4287  ;;
4288
4289linux*)
4290  case `$CC -V 2>&1 | sed 5q` in
4291  *Sun\ C*)
4292    # Sun C++ 5.9
4293    #
4294    # The more standards-conforming stlport4 library is
4295    # incompatible with the Cstd library. Avoid specifying
4296    # it if it's in CXXFLAGS. Ignore libCrun as
4297    # -library=stlport4 depends on it.
4298    case " $CXX $CXXFLAGS " in
4299    *" -library=stlport4 "*)
4300      solaris_use_stlport4=yes
4301      ;;
4302    esac
4303    if test "$solaris_use_stlport4" != yes; then
4304      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4305    fi
4306    ;;
4307  esac
4308  ;;
4309
4310solaris*)
4311  case $cc_basename in
4312  CC*)
4313    # The more standards-conforming stlport4 library is
4314    # incompatible with the Cstd library. Avoid specifying
4315    # it if it's in CXXFLAGS. Ignore libCrun as
4316    # -library=stlport4 depends on it.
4317    case " $CXX $CXXFLAGS " in
4318    *" -library=stlport4 "*)
4319      solaris_use_stlport4=yes
4320      ;;
4321    esac
4322
4323    # Adding this requires a known-good setup of shared libraries for
4324    # Sun compiler versions before 5.6, else PIC objects from an old
4325    # archive will be linked into the output, leading to subtle bugs.
4326    if test "$solaris_use_stlport4" != yes; then
4327      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4328    fi
4329    ;;
4330  esac
4331  ;;
4332esac
4333])
4334case " $_LT_AC_TAGVAR(postdeps, $1) " in
4335*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4336esac
4337])# AC_LIBTOOL_POSTDEP_PREDEP
4338
4339# AC_LIBTOOL_LANG_F77_CONFIG
4340# --------------------------
4341# Ensure that the configuration vars for the C compiler are
4342# suitably defined.  Those variables are subsequently used by
4343# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4344AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4345AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4346[pushdef([AC_MSG_ERROR], [F77=false])
4347AC_REQUIRE([AC_PROG_F77])
4348popdef([AC_MSG_ERROR])
4349AC_LANG_PUSH(Fortran 77)
4350
4351_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4352_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4353_LT_AC_TAGVAR(always_export_symbols, $1)=no
4354_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4355_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4356_LT_AC_TAGVAR(hardcode_direct, $1)=no
4357_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4358_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4359_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4360_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4361_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4362_LT_AC_TAGVAR(module_cmds, $1)=
4363_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4364_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4365_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4366_LT_AC_TAGVAR(no_undefined_flag, $1)=
4367_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4368_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4369
4370# Source file extension for f77 test sources.
4371ac_ext=f
4372
4373# Object file extension for compiled f77 test sources.
4374objext=o
4375_LT_AC_TAGVAR(objext, $1)=$objext
4376
4377# Code to be used in simple compile tests
4378lt_simple_compile_test_code="\
4379      subroutine t
4380      return
4381      end
4382"
4383
4384# Code to be used in simple link tests
4385lt_simple_link_test_code="\
4386      program t
4387      end
4388"
4389
4390# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4391_LT_AC_SYS_COMPILER
4392
4393# save warnings/boilerplate of simple test code
4394_LT_COMPILER_BOILERPLATE
4395_LT_LINKER_BOILERPLATE
4396
4397# Allow CC to be a program name with arguments.
4398lt_save_CC="$CC"
4399CC=${F77-"f77"}
4400compiler=$CC
4401_LT_AC_TAGVAR(compiler, $1)=$CC
4402_LT_CC_BASENAME([$compiler])
4403
4404AC_MSG_CHECKING([if libtool supports shared libraries])
4405AC_MSG_RESULT([$can_build_shared])
4406
4407AC_MSG_CHECKING([whether to build shared libraries])
4408test "$can_build_shared" = "no" && enable_shared=no
4409
4410# On AIX, shared libraries and static libraries use the same namespace, and
4411# are all built from PIC.
4412case $host_os in
4413aix3*)
4414  test "$enable_shared" = yes && enable_static=no
4415  if test -n "$RANLIB"; then
4416    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4417    postinstall_cmds='$RANLIB $lib'
4418  fi
4419  ;;
4420aix[[4-9]]*)
4421  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4422    test "$enable_shared" = yes && enable_static=no
4423  fi
4424  ;;
4425esac
4426AC_MSG_RESULT([$enable_shared])
4427
4428AC_MSG_CHECKING([whether to build static libraries])
4429# Make sure either enable_shared or enable_static is yes.
4430test "$enable_shared" = yes || enable_static=yes
4431AC_MSG_RESULT([$enable_static])
4432
4433_LT_AC_TAGVAR(GCC, $1)="$G77"
4434_LT_AC_TAGVAR(LD, $1)="$LD"
4435
4436AC_LIBTOOL_PROG_COMPILER_PIC($1)
4437AC_LIBTOOL_PROG_CC_C_O($1)
4438AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4439AC_LIBTOOL_PROG_LD_SHLIBS($1)
4440AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4441AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4442
4443AC_LIBTOOL_CONFIG($1)
4444
4445AC_LANG_POP
4446CC="$lt_save_CC"
4447])# AC_LIBTOOL_LANG_F77_CONFIG
4448
4449
4450# AC_LIBTOOL_LANG_GCJ_CONFIG
4451# --------------------------
4452# Ensure that the configuration vars for the C compiler are
4453# suitably defined.  Those variables are subsequently used by
4454# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4455AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4456AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4457[AC_LANG_SAVE
4458
4459# Source file extension for Java test sources.
4460ac_ext=java
4461
4462# Object file extension for compiled Java test sources.
4463objext=o
4464_LT_AC_TAGVAR(objext, $1)=$objext
4465
4466# Code to be used in simple compile tests
4467lt_simple_compile_test_code="class foo {}"
4468
4469# Code to be used in simple link tests
4470lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
4471
4472# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4473_LT_AC_SYS_COMPILER
4474
4475# save warnings/boilerplate of simple test code
4476_LT_COMPILER_BOILERPLATE
4477_LT_LINKER_BOILERPLATE
4478
4479# Allow CC to be a program name with arguments.
4480lt_save_CC="$CC"
4481CC=${GCJ-"gcj"}
4482compiler=$CC
4483_LT_AC_TAGVAR(compiler, $1)=$CC
4484_LT_CC_BASENAME([$compiler])
4485
4486# GCJ did not exist at the time GCC didn't implicitly link libc in.
4487_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4488
4489_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4490
4491## CAVEAT EMPTOR:
4492## There is no encapsulation within the following macros, do not change
4493## the running order or otherwise move them around unless you know exactly
4494## what you are doing...
4495AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4496AC_LIBTOOL_PROG_COMPILER_PIC($1)
4497AC_LIBTOOL_PROG_CC_C_O($1)
4498AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4499AC_LIBTOOL_PROG_LD_SHLIBS($1)
4500AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4501AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4502
4503AC_LIBTOOL_CONFIG($1)
4504
4505AC_LANG_RESTORE
4506CC="$lt_save_CC"
4507])# AC_LIBTOOL_LANG_GCJ_CONFIG
4508
4509
4510# AC_LIBTOOL_LANG_RC_CONFIG
4511# -------------------------
4512# Ensure that the configuration vars for the Windows resource compiler are
4513# suitably defined.  Those variables are subsequently used by
4514# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4515AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4516AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4517[AC_LANG_SAVE
4518
4519# Source file extension for RC test sources.
4520ac_ext=rc
4521
4522# Object file extension for compiled RC test sources.
4523objext=o
4524_LT_AC_TAGVAR(objext, $1)=$objext
4525
4526# Code to be used in simple compile tests
4527lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
4528
4529# Code to be used in simple link tests
4530lt_simple_link_test_code="$lt_simple_compile_test_code"
4531
4532# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4533_LT_AC_SYS_COMPILER
4534
4535# save warnings/boilerplate of simple test code
4536_LT_COMPILER_BOILERPLATE
4537_LT_LINKER_BOILERPLATE
4538
4539# Allow CC to be a program name with arguments.
4540lt_save_CC="$CC"
4541CC=${RC-"windres"}
4542compiler=$CC
4543_LT_AC_TAGVAR(compiler, $1)=$CC
4544_LT_CC_BASENAME([$compiler])
4545_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4546
4547AC_LIBTOOL_CONFIG($1)
4548
4549AC_LANG_RESTORE
4550CC="$lt_save_CC"
4551])# AC_LIBTOOL_LANG_RC_CONFIG
4552
4553
4554# AC_LIBTOOL_CONFIG([TAGNAME])
4555# ----------------------------
4556# If TAGNAME is not passed, then create an initial libtool script
4557# with a default configuration from the untagged config vars.  Otherwise
4558# add code to config.status for appending the configuration named by
4559# TAGNAME from the matching tagged config vars.
4560AC_DEFUN([AC_LIBTOOL_CONFIG],
4561[# The else clause should only fire when bootstrapping the
4562# libtool distribution, otherwise you forgot to ship ltmain.sh
4563# with your package, and you will get complaints that there are
4564# no rules to generate ltmain.sh.
4565if test -f "$ltmain"; then
4566  # See if we are running on zsh, and set the options which allow our commands through
4567  # without removal of \ escapes.
4568  if test -n "${ZSH_VERSION+set}" ; then
4569    setopt NO_GLOB_SUBST
4570  fi
4571  # Now quote all the things that may contain metacharacters while being
4572  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4573  # variables and quote the copies for generation of the libtool script.
4574  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4575    SED SHELL STRIP \
4576    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4577    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4578    deplibs_check_method reload_flag reload_cmds need_locks \
4579    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4580    lt_cv_sys_global_symbol_to_c_name_address \
4581    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4582    old_postinstall_cmds old_postuninstall_cmds \
4583    _LT_AC_TAGVAR(compiler, $1) \
4584    _LT_AC_TAGVAR(CC, $1) \
4585    _LT_AC_TAGVAR(LD, $1) \
4586    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4587    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4588    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4589    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4590    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4591    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4592    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4593    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4594    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4595    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4596    _LT_AC_TAGVAR(predep_objects, $1) \
4597    _LT_AC_TAGVAR(postdep_objects, $1) \
4598    _LT_AC_TAGVAR(predeps, $1) \
4599    _LT_AC_TAGVAR(postdeps, $1) \
4600    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4601    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
4602    _LT_AC_TAGVAR(archive_cmds, $1) \
4603    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4604    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4605    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4606    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4607    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4608    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4609    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4610    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4611    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4612    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4613    _LT_AC_TAGVAR(hardcode_automatic, $1) \
4614    _LT_AC_TAGVAR(module_cmds, $1) \
4615    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4616    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4617    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
4618    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4619    _LT_AC_TAGVAR(include_expsyms, $1); do
4620
4621    case $var in
4622    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4623    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4624    _LT_AC_TAGVAR(archive_cmds, $1) | \
4625    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4626    _LT_AC_TAGVAR(module_cmds, $1) | \
4627    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4628    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4629    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4630    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4631    postinstall_cmds | postuninstall_cmds | \
4632    old_postinstall_cmds | old_postuninstall_cmds | \
4633    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4634      # Double-quote double-evaled strings.
4635      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4636      ;;
4637    *)
4638      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4639      ;;
4640    esac
4641  done
4642
4643  case $lt_echo in
4644  *'\[$]0 --fallback-echo"')
4645    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4646    ;;
4647  esac
4648
4649ifelse([$1], [],
4650  [cfgfile="${ofile}T"
4651  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4652  $rm -f "$cfgfile"
4653  echo "$as_me:__oline__: creating $ofile" >&AS_MESSAGE_LOG_FD
4654  echo "$as_me: creating $ofile" >&6],
4655  [cfgfile="$ofile"])
4656
4657  cat <<__EOF__ >> "$cfgfile"
4658ifelse([$1], [],
4659[#! $SHELL
4660
4661# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4662# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4663# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4664#
4665# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
4666# Free Software Foundation, Inc.
4667#
4668# This file is part of MirLibtool, by The MirOS Project.
4669# It is derived from GNU Libtool:
4670# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4671#
4672# This program is free software; you can redistribute it and/or modify
4673# it under the terms of the GNU General Public License as published by
4674# the Free Software Foundation; either version 2 of the License, or
4675# (at your option) any later version.
4676#
4677# This program is distributed in the hope that it will be useful, but
4678# WITHOUT ANY WARRANTY; without even the implied warranty of
4679# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4680# General Public License for more details.
4681#
4682# You should have received a copy of the GNU General Public License
4683# along with this program; if not, write to the Free Software
4684# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4685#
4686# As a special exception to the GNU General Public License, if you
4687# distribute this file as part of a program that contains a
4688# configuration script generated by Autoconf, you may include it under
4689# the same distribution terms that you use for the rest of that program.
4690
4691# A sed program that does not truncate output.
4692SED=$lt_SED
4693
4694# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4695Xsed="$SED -e 1s/^X//"
4696
4697# The HP-UX ksh and POSIX shell print the target directory to stdout
4698# if CDPATH is set.
4699(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4700
4701# The names of the tagged configurations supported by this script.
4702available_tags=
4703
4704# ### BEGIN LIBTOOL CONFIG],
4705[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4706
4707# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4708
4709# Shell to use when invoking shell scripts.
4710SHELL=$lt_SHELL
4711
4712# Whether or not to build shared libraries.
4713build_libtool_libs=$enable_shared
4714
4715# Whether or not to build static libraries.
4716build_old_libs=$enable_static
4717
4718# Whether or not to add -lc for building shared libraries.
4719build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4720
4721# Whether or not to disallow shared libs when runtime libs are static
4722allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4723
4724# Whether or not to optimize for fast installation.
4725fast_install=$enable_fast_install
4726
4727# The host system.
4728host_alias=$host_alias
4729host=$host
4730host_os=$host_os
4731
4732# The build system.
4733build_alias=$build_alias
4734build=$build
4735build_os=$build_os
4736
4737# An echo program that does not interpret backslashes.
4738echo=$lt_echo
4739
4740# The archiver.
4741AR=$lt_AR
4742AR_FLAGS=$lt_AR_FLAGS
4743
4744# A C compiler.
4745LTCC=$lt_LTCC
4746
4747# LTCC compiler flags.
4748LTCFLAGS=$lt_LTCFLAGS
4749
4750# A language-specific compiler.
4751CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4752
4753# Is the compiler the GNU C compiler?
4754with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4755
4756# An ERE matcher.
4757EGREP=$lt_EGREP
4758
4759# The linker used to build libraries.
4760LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4761
4762# Whether we need hard or soft links.
4763LN_S=$lt_LN_S
4764
4765# A BSD-compatible nm program.
4766NM=$lt_NM
4767
4768# A symbol stripping program
4769STRIP=$lt_STRIP
4770
4771# Used to examine libraries when file_magic_cmd begins "file"
4772MAGIC_CMD=$MAGIC_CMD
4773
4774# Used on cygwin: DLL creation program.
4775DLLTOOL="$DLLTOOL"
4776
4777# Used on cygwin: object dumper.
4778OBJDUMP="$OBJDUMP"
4779
4780# Used on cygwin: assembler.
4781AS="$AS"
4782
4783# The name of the directory that contains temporary libtool files.
4784objdir=$objdir
4785
4786# How to create reloadable object files.
4787reload_flag=$lt_reload_flag
4788reload_cmds=$lt_reload_cmds
4789
4790# How to pass a linker flag through the compiler.
4791wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4792
4793# Object file suffix (normally "o").
4794objext="$ac_objext"
4795
4796# Old archive suffix (normally "a").
4797libext="$libext"
4798
4799# Shared library suffix (normally ".so").
4800shrext_cmds='$shrext_cmds'
4801
4802# Executable file suffix (normally "").
4803exeext="$exeext"
4804
4805# Additional compiler flags for building library objects.
4806pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4807pic_mode=$pic_mode
4808
4809# What is the maximum length of a command?
4810max_cmd_len=$lt_cv_sys_max_cmd_len
4811
4812# Does compiler simultaneously support -c and -o options?
4813compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4814
4815# Must we lock files when doing compilation?
4816need_locks=$lt_need_locks
4817
4818# Do we need the lib prefix for modules?
4819need_lib_prefix=$need_lib_prefix
4820
4821# Do we need a version for libraries?
4822need_version=$need_version
4823
4824# Whether dlopen is supported.
4825dlopen_support=$enable_dlopen
4826
4827# Whether dlopen of programs is supported.
4828dlopen_self=$enable_dlopen_self
4829
4830# Whether dlopen of statically linked programs is supported.
4831dlopen_self_static=$enable_dlopen_self_static
4832
4833# Compiler flag to prevent dynamic linking.
4834link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4835
4836# Compiler flag to turn off builtin functions.
4837no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4838
4839# Compiler flag to allow reflexive dlopens.
4840export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4841
4842# Compiler flag to generate shared objects directly from archives.
4843whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4844
4845# Compiler flag to generate thread-safe objects.
4846thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4847
4848# Library versioning type.
4849version_type=$version_type
4850
4851# Format of library name prefix.
4852libname_spec=$lt_libname_spec
4853
4854# List of archive names.  First name is the real one, the rest are links.
4855# The last name is the one that the linker finds with -lNAME.
4856library_names_spec=$lt_library_names_spec
4857
4858# The coded name of the library, if different from the real name.
4859soname_spec=$lt_soname_spec
4860
4861# Commands used to build and install an old-style archive.
4862RANLIB=$lt_RANLIB
4863old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4864old_postinstall_cmds=$lt_old_postinstall_cmds
4865old_postuninstall_cmds=$lt_old_postuninstall_cmds
4866
4867# Create an old-style archive from a shared archive.
4868old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4869
4870# Create a temporary old-style archive to link instead of a shared archive.
4871old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4872
4873# Commands used to build and install a shared archive.
4874archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4875archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4876postinstall_cmds=$lt_postinstall_cmds
4877postuninstall_cmds=$lt_postuninstall_cmds
4878
4879# Commands used to build a loadable module (assumed same as above if empty)
4880module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4881module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4882
4883# Commands to strip libraries.
4884old_striplib=$lt_old_striplib
4885striplib=$lt_striplib
4886
4887# Dependencies to place before the objects being linked to create a
4888# shared library.
4889predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4890
4891# Dependencies to place after the objects being linked to create a
4892# shared library.
4893postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4894
4895# Dependencies to place before the objects being linked to create a
4896# shared library.
4897predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4898
4899# Dependencies to place after the objects being linked to create a
4900# shared library.
4901postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4902
4903# The directories searched by this compiler when creating a shared
4904# library
4905compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
4906
4907# The library search path used internally by the compiler when linking
4908# a shared library.
4909compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4910
4911# Method to check whether dependent libraries are shared objects.
4912deplibs_check_method=$lt_deplibs_check_method
4913
4914# Command to use when deplibs_check_method == file_magic.
4915file_magic_cmd=$lt_file_magic_cmd
4916
4917# Flag that allows shared libraries with undefined symbols to be built.
4918allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4919
4920# Flag that forces no undefined symbols.
4921no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4922
4923# Commands used to finish a libtool library installation in a directory.
4924finish_cmds=$lt_finish_cmds
4925
4926# Same as above, but a single script fragment to be evaled but not shown.
4927finish_eval=$lt_finish_eval
4928
4929# Take the output of nm and produce a listing of raw symbols and C names.
4930global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4931
4932# Transform the output of nm in a proper C declaration
4933global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4934
4935# Transform the output of nm in a C name address pair
4936global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4937
4938# This is the shared library runtime path variable.
4939runpath_var=$runpath_var
4940
4941# This is the shared library path variable.
4942shlibpath_var=$shlibpath_var
4943
4944# Is shlibpath searched before the hard-coded library search path?
4945shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4946
4947# How to hardcode a shared library path into an executable.
4948hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4949
4950# Whether we should hardcode library paths into libraries.
4951hardcode_into_libs=$hardcode_into_libs
4952
4953# Flag to hardcode \$libdir into a binary during linking.
4954# This must work even if \$libdir does not exist.
4955hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4956
4957# If ld is used when linking, flag to hardcode \$libdir into
4958# a binary during linking. This must work even if \$libdir does
4959# not exist.
4960hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4961
4962# Whether we need a single -rpath flag with a separated argument.
4963hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4964
4965# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4966# resulting binary.
4967hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4968
4969# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4970# resulting binary.
4971hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4972
4973# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4974# the resulting binary.
4975hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4976
4977# Set to yes if building a shared library automatically hardcodes DIR into the library
4978# and all subsequent libraries and executables linked against it.
4979hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4980
4981# Variables whose values should be saved in libtool wrapper scripts and
4982# restored at relink time.
4983variables_saved_for_relink="$variables_saved_for_relink"
4984
4985# Whether libtool must link a program against all its dependency libraries.
4986link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4987
4988# Compile-time system search path for libraries
4989sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4990
4991# Run-time system search path for libraries
4992sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4993
4994# Fix the shell variable \$srcfile for the compiler.
4995fix_srcfile_path=$lt_fix_srcfile_path
4996
4997# Set to yes if exported symbols are required.
4998always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4999
5000# The commands to list exported symbols.
5001export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5002
5003# The commands to extract the exported symbol list from a shared archive.
5004extract_expsyms_cmds=$lt_extract_expsyms_cmds
5005
5006# Symbols that should not be listed in the preloaded symbols.
5007exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5008
5009# Symbols that must always be exported.
5010include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5011
5012ifelse([$1],[],
5013[# ### END LIBTOOL CONFIG],
5014[# ### END LIBTOOL TAG CONFIG: $tagname])
5015
5016__EOF__
5017
5018ifelse([$1],[], [
5019  case $host_os in
5020  aix3*)
5021    cat <<\EOF >> "$cfgfile"
5022
5023# AIX sometimes has problems with the GCC collect2 program.  For some
5024# reason, if we set the COLLECT_NAMES environment variable, the problems
5025# vanish in a puff of smoke.
5026if test "X${COLLECT_NAMES+set}" != Xset; then
5027  COLLECT_NAMES=
5028  export COLLECT_NAMES
5029fi
5030EOF
5031    ;;
5032  esac
5033
5034  # We use sed instead of cat because bash on DJGPP gets confused if
5035  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
5036  # text mode, it properly converts lines to CR/LF.  This bash problem
5037  # is reportedly fixed, but why not run on old versions too?
5038  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5039
5040  mv -f "$cfgfile" "$ofile" || \
5041    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5042  chmod +x "$ofile"
5043])
5044else
5045  # If there is no Makefile yet, we rely on a make rule to execute
5046  # `config.status --recheck' to rerun these tests and create the
5047  # libtool script then.
5048  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5049  if test -f "$ltmain_in"; then
5050    test -f Makefile && make "$ltmain"
5051  fi
5052fi
5053])# AC_LIBTOOL_CONFIG
5054
5055
5056# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5057# -------------------------------------------
5058AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5059[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5060
5061_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5062
5063if test "$GCC" = yes; then
5064  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5065
5066  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5067    lt_cv_prog_compiler_rtti_exceptions,
5068    [-fno-rtti -fno-exceptions], [],
5069    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5070fi
5071])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5072
5073
5074# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5075# ---------------------------------
5076AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5077[AC_REQUIRE([AC_CANONICAL_HOST])
5078AC_REQUIRE([LT_AC_PROG_SED])
5079AC_REQUIRE([AC_PROG_NM])
5080AC_REQUIRE([AC_OBJEXT])
5081# Check for command to grab the raw symbol name followed by C symbol from nm.
5082AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5083AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5084[
5085# These are sane defaults that work on at least a few old systems.
5086# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5087
5088# Character class describing NM global symbol codes.
5089symcode='[[BCDEGRST]]'
5090
5091# Regexp to match symbols that can be accessed directly from C.
5092sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5093
5094# Transform an extracted symbol line into a proper C declaration
5095lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5096
5097# Transform an extracted symbol line into symbol name and symbol address
5098lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5099
5100# Define system-specific variables.
5101case $host_os in
5102aix*)
5103  symcode='[[BCDT]]'
5104  ;;
5105cygwin* | mingw* | pw32*)
5106  symcode='[[ABCDGISTW]]'
5107  ;;
5108hpux*) # Its linker distinguishes data from code symbols
5109  if test "$host_cpu" = ia64; then
5110    symcode='[[ABCDEGRST]]'
5111  fi
5112  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5113  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5114  ;;
5115linux* | k*bsd*-gnu)
5116  if test "$host_cpu" = ia64; then
5117    symcode='[[ABCDGIRSTW]]'
5118    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5119    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5120  fi
5121  ;;
5122irix* | nonstopux*)
5123  symcode='[[BCDEGRST]]'
5124  ;;
5125osf*)
5126  symcode='[[BCDEGQRST]]'
5127  ;;
5128solaris*)
5129  symcode='[[BDRT]]'
5130  ;;
5131sco3.2v5*)
5132  symcode='[[DT]]'
5133  ;;
5134sysv4.2uw2*)
5135  symcode='[[DT]]'
5136  ;;
5137sysv5* | sco5v6* | unixware* | OpenUNIX*)
5138  symcode='[[ABDT]]'
5139  ;;
5140sysv4)
5141  symcode='[[DFNSTU]]'
5142  ;;
5143esac
5144
5145# Handle CRLF in mingw tool chain
5146opt_cr=
5147case $build_os in
5148mingw*)
5149  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5150  ;;
5151esac
5152
5153# If we're using GNU nm, then use its standard symbol codes.
5154case `$NM -V 2>&1` in
5155*GNU* | *'with BFD'*)
5156  symcode='[[ABCDGIRSTW]]' ;;
5157esac
5158
5159# Try without a prefix undercore, then with it.
5160for ac_symprfx in "" "_"; do
5161
5162  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5163  symxfrm="\\1 $ac_symprfx\\2 \\2"
5164
5165  # Write the raw and C identifiers.
5166  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5167
5168  # Check to see that the pipe works correctly.
5169  pipe_works=no
5170
5171  rm -f conftest*
5172  cat > conftest.$ac_ext <<EOF
5173#ifdef __cplusplus
5174extern "C" {
5175#endif
5176char nm_test_var;
5177void nm_test_func(){}
5178#ifdef __cplusplus
5179}
5180#endif
5181int main(){nm_test_var='a';nm_test_func();return(0);}
5182EOF
5183
5184  if AC_TRY_EVAL(ac_compile); then
5185    # Now try to grab the symbols.
5186    nlist=conftest.nm
5187    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5188      # Try sorting and uniquifying the output.
5189      if sort "$nlist" | uniq > "$nlist"T; then
5190	mv -f "$nlist"T "$nlist"
5191      else
5192	rm -f "$nlist"T
5193      fi
5194
5195      # Make sure that we snagged all the symbols we need.
5196      if grep ' nm_test_var$' "$nlist" >/dev/null; then
5197	if grep ' nm_test_func$' "$nlist" >/dev/null; then
5198	  cat <<EOF > conftest.$ac_ext
5199#ifdef __cplusplus
5200extern "C" {
5201#endif
5202
5203EOF
5204	  # Now generate the symbol file.
5205	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5206
5207	  cat <<EOF >> conftest.$ac_ext
5208#if defined (__STDC__) && __STDC__
5209# define lt_ptr_t void *
5210#else
5211# define lt_ptr_t char *
5212# define const
5213#endif
5214
5215/* The mapping between symbol names and symbols. */
5216const struct {
5217  const char *name;
5218  lt_ptr_t address;
5219}
5220lt_preloaded_symbols[[]] =
5221{
5222EOF
5223	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5224	  cat <<\EOF >> conftest.$ac_ext
5225  {0, (lt_ptr_t) 0}
5226};
5227
5228#ifdef __cplusplus
5229}
5230#endif
5231EOF
5232	  # Now try linking the two files.
5233	  mv conftest.$ac_objext conftstm.$ac_objext
5234	  lt_save_LIBS="$LIBS"
5235	  lt_save_CFLAGS="$CFLAGS"
5236	  LIBS="conftstm.$ac_objext"
5237	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5238	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5239	    pipe_works=yes
5240	  fi
5241	  LIBS="$lt_save_LIBS"
5242	  CFLAGS="$lt_save_CFLAGS"
5243	else
5244	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5245	fi
5246      else
5247	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5248      fi
5249    else
5250      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5251    fi
5252  else
5253    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5254    cat conftest.$ac_ext >&5
5255  fi
5256  rm -rf conftest* conftst*
5257
5258  # Do not use the global_symbol_pipe unless it works.
5259  if test "$pipe_works" = yes; then
5260    break
5261  else
5262    lt_cv_sys_global_symbol_pipe=
5263  fi
5264done
5265])
5266if test -z "$lt_cv_sys_global_symbol_pipe"; then
5267  lt_cv_sys_global_symbol_to_cdecl=
5268fi
5269if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5270  AC_MSG_RESULT(failed)
5271else
5272  AC_MSG_RESULT(ok)
5273fi
5274]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5275
5276
5277# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5278# ---------------------------------------
5279AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5280[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5281_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5282_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5283
5284AC_MSG_CHECKING([for $compiler option to produce PIC])
5285 ifelse([$1],[CXX],[
5286  # C++ specific cases for pic, static, wl, etc.
5287  if test "$GXX" = yes; then
5288    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5289    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5290
5291    case $host_os in
5292    aix*)
5293      # All AIX code is PIC.
5294      if test "$host_cpu" = ia64; then
5295	# AIX 5 now supports IA64 processor
5296	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5297      fi
5298      ;;
5299    amigaos*)
5300      # FIXME: we need at least 68020 code to build shared libraries, but
5301      # adding the `-m68020' flag to GCC prevents building anything better,
5302      # like `-m68040'.
5303      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5304      ;;
5305    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5306      # PIC is the default for these OSes.
5307      ;;
5308    mingw* | cygwin* | os2* | pw32*)
5309      # This hack is so that the source file can tell whether it is being
5310      # built for inclusion in a dll (and should export symbols for example).
5311      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5312      # (--disable-auto-import) libraries
5313      m4_if([$1], [GCJ], [],
5314	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5315      ;;
5316    darwin* | rhapsody*)
5317      # PIC is the default on this platform
5318      # Common symbols not allowed in MH_DYLIB files
5319      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5320      ;;
5321    *djgpp*)
5322      # DJGPP does not support shared libraries at all
5323      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5324      ;;
5325    interix[[3-9]]*)
5326      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5327      # Instead, we relocate shared libraries at runtime.
5328      ;;
5329    sysv4*MP*)
5330      if test -d /usr/nec; then
5331	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5332      fi
5333      ;;
5334    hpux*)
5335      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5336      # not for PA HP-UX.
5337      case $host_cpu in
5338      hppa*64*|ia64*)
5339	;;
5340      *)
5341	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5342	;;
5343      esac
5344      ;;
5345    *)
5346      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5347      ;;
5348    esac
5349  else
5350    case $host_os in
5351      aix[[4-9]]*)
5352	# All AIX code is PIC.
5353	if test "$host_cpu" = ia64; then
5354	  # AIX 5 now supports IA64 processor
5355	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5356	else
5357	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5358	fi
5359	;;
5360      chorus*)
5361	case $cc_basename in
5362	cxch68*)
5363	  # Green Hills C++ Compiler
5364	  # _LT_AC_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"
5365	  ;;
5366	esac
5367	;;
5368       darwin*)
5369         # PIC is the default on this platform
5370         # Common symbols not allowed in MH_DYLIB files
5371         case $cc_basename in
5372           xlc*)
5373           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5374           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5375           ;;
5376         esac
5377       ;;
5378      dgux*)
5379	case $cc_basename in
5380	  ec++*)
5381	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5382	    ;;
5383	  ghcx*)
5384	    # Green Hills C++ Compiler
5385	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5386	    ;;
5387	  *)
5388	    ;;
5389	esac
5390	;;
5391      freebsd* | dragonfly* | midnightbsd*)
5392	# FreeBSD uses GNU C++
5393	;;
5394      hpux9* | hpux10* | hpux11*)
5395	case $cc_basename in
5396	  CC*)
5397	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5398	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5399	    if test "$host_cpu" != ia64; then
5400	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5401	    fi
5402	    ;;
5403	  aCC*)
5404	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5405	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5406	    case $host_cpu in
5407	    hppa*64*|ia64*)
5408	      # +Z the default
5409	      ;;
5410	    *)
5411	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5412	      ;;
5413	    esac
5414	    ;;
5415	  *)
5416	    ;;
5417	esac
5418	;;
5419      interix*)
5420	# This is c89, which is MS Visual C++ (no shared libs)
5421	# Anyone wants to do a port?
5422	;;
5423      irix5* | irix6* | nonstopux*)
5424	case $cc_basename in
5425	  CC*)
5426	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5427	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5428	    # CC pic flag -KPIC is the default.
5429	    ;;
5430	  *)
5431	    ;;
5432	esac
5433	;;
5434      linux* | k*bsd*-gnu)
5435	case $cc_basename in
5436	  KCC*)
5437	    # KAI C++ Compiler
5438	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5439	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5440	    ;;
5441	  icpc* | ecpc*)
5442	    # Intel C++
5443	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5444	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5445	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5446	    ;;
5447	  pgCC* | pgcpp*)
5448	    # Portland Group C++ compiler.
5449	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5450	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5451	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5452	    ;;
5453	  cxx*)
5454	    # Compaq C++
5455	    # Make sure the PIC flag is empty.  It appears that all Alpha
5456	    # Linux and Compaq Tru64 Unix objects are PIC.
5457	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5458	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5459	    ;;
5460	  *)
5461	    case `$CC -V 2>&1 | sed 5q` in
5462	    *Sun\ C*)
5463	      # Sun C++ 5.9
5464	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5465	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5466	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5467	      ;;
5468	    esac
5469	    ;;
5470	esac
5471	;;
5472      lynxos*)
5473	;;
5474      m88k*)
5475	;;
5476      mirbsd*)
5477	# MirOS uses GNU C++
5478	;;
5479      mvs*)
5480	case $cc_basename in
5481	  cxx*)
5482	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5483	    ;;
5484	  *)
5485	    ;;
5486	esac
5487	;;
5488      netbsd*)
5489	;;
5490      openbsd*)
5491	;;
5492      osf3* | osf4* | osf5*)
5493	case $cc_basename in
5494	  KCC*)
5495	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5496	    ;;
5497	  RCC*)
5498	    # Rational C++ 2.4.1
5499	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5500	    ;;
5501	  cxx*)
5502	    # Digital/Compaq C++
5503	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5504	    # Make sure the PIC flag is empty.  It appears that all Alpha
5505	    # Linux and Compaq Tru64 Unix objects are PIC.
5506	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5507	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5508	    ;;
5509	  *)
5510	    ;;
5511	esac
5512	;;
5513      psos*)
5514	;;
5515      solaris*)
5516	case $cc_basename in
5517	  CC*)
5518	    # Sun C++ 4.2, 5.x and Centerline C++
5519	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5520	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5521	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5522	    ;;
5523	  gcx*)
5524	    # Green Hills C++ Compiler
5525	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5526	    ;;
5527	  *)
5528	    ;;
5529	esac
5530	;;
5531      sunos4*)
5532	case $cc_basename in
5533	  CC*)
5534	    # Sun C++ 4.x
5535	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5536	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5537	    ;;
5538	  lcc*)
5539	    # Lucid
5540	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5541	    ;;
5542	  *)
5543	    ;;
5544	esac
5545	;;
5546      tandem*)
5547	case $cc_basename in
5548	  NCC*)
5549	    # NonStop-UX NCC 3.20
5550	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5551	    ;;
5552	  *)
5553	    ;;
5554	esac
5555	;;
5556      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5557	case $cc_basename in
5558	  CC*)
5559	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5560	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5561	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5562	    ;;
5563	esac
5564	;;
5565      vxworks*)
5566	;;
5567      *)
5568	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5569	;;
5570    esac
5571  fi
5572],
5573[
5574  if test "$GCC" = yes; then
5575    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5576    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5577
5578    case $host_os in
5579      aix*)
5580      # All AIX code is PIC.
5581      if test "$host_cpu" = ia64; then
5582	# AIX 5 now supports IA64 processor
5583	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5584      fi
5585      ;;
5586
5587    amigaos*)
5588      # FIXME: we need at least 68020 code to build shared libraries, but
5589      # adding the `-m68020' flag to GCC prevents building anything better,
5590      # like `-m68040'.
5591      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5592      ;;
5593
5594    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5595      # PIC is the default for these OSes.
5596      ;;
5597
5598    mingw* | cygwin* | pw32* | os2*)
5599      # This hack is so that the source file can tell whether it is being
5600      # built for inclusion in a dll (and should export symbols for example).
5601      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5602      # (--disable-auto-import) libraries
5603      m4_if([$1], [GCJ], [],
5604	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5605      ;;
5606
5607    darwin* | rhapsody*)
5608      # PIC is the default on this platform
5609      # Common symbols not allowed in MH_DYLIB files
5610      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5611      ;;
5612
5613    interix[[3-9]]*)
5614      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5615      # Instead, we relocate shared libraries at runtime.
5616      ;;
5617
5618    msdosdjgpp*)
5619      # Just because we use GCC doesn't mean we suddenly get shared libraries
5620      # on systems that don't support them.
5621      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5622      enable_shared=no
5623      ;;
5624
5625    sysv4*MP*)
5626      if test -d /usr/nec; then
5627	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5628      fi
5629      ;;
5630
5631    hpux*)
5632      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5633      # not for PA HP-UX.
5634      case $host_cpu in
5635      hppa*64*|ia64*)
5636	# +Z the default
5637	;;
5638      *)
5639	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5640	;;
5641      esac
5642      ;;
5643
5644    *)
5645      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5646      ;;
5647    esac
5648  else
5649    # PORTME Check for flag to pass linker flags through the system compiler.
5650    case $host_os in
5651    aix*)
5652      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5653      if test "$host_cpu" = ia64; then
5654	# AIX 5 now supports IA64 processor
5655	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5656      else
5657	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5658      fi
5659      ;;
5660      darwin*)
5661        # PIC is the default on this platform
5662        # Common symbols not allowed in MH_DYLIB files
5663       case $cc_basename in
5664         xlc*)
5665         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5666         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5667         ;;
5668       esac
5669       ;;
5670
5671    mingw* | cygwin* | pw32* | os2*)
5672      # This hack is so that the source file can tell whether it is being
5673      # built for inclusion in a dll (and should export symbols for example).
5674      m4_if([$1], [GCJ], [],
5675	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5676      ;;
5677
5678    hpux9* | hpux10* | hpux11*)
5679      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5680      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5681      # not for PA HP-UX.
5682      case $host_cpu in
5683      hppa*64*|ia64*)
5684	# +Z the default
5685	;;
5686      *)
5687	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5688	;;
5689      esac
5690      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5691      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5692      ;;
5693
5694    irix5* | irix6* | nonstopux*)
5695      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5696      # PIC (with -KPIC) is the default.
5697      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5698      ;;
5699
5700    newsos6)
5701      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5702      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5703      ;;
5704
5705    linux* | k*bsd*-gnu)
5706      case $cc_basename in
5707      icc* | ecc* | ifort*)
5708	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5709	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5710	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5711        ;;
5712      pgcc* | pgf77* | pgf90* | pgf95*)
5713        # Portland Group compilers (*not* the Pentium gcc compiler,
5714	# which looks to be a dead project)
5715	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5716	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5717	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5718        ;;
5719      ccc*)
5720        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5721        # All Alpha code is PIC.
5722        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5723        ;;
5724      *)
5725        case `$CC -V 2>&1 | sed 5q` in
5726	*Sun\ C*)
5727	  # Sun C 5.9
5728	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5729	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5730	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5731	  ;;
5732	*Sun\ F*)
5733	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5734	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5735	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5736	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
5737	  ;;
5738	esac
5739	;;
5740      esac
5741      ;;
5742
5743    osf3* | osf4* | osf5*)
5744      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5745      # All OSF/1 code is PIC.
5746      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5747      ;;
5748
5749    rdos*)
5750      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5751      ;;
5752
5753    solaris*)
5754      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5755      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5756      case $cc_basename in
5757      f77* | f90* | f95*)
5758	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5759      *)
5760	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5761      esac
5762      ;;
5763
5764    sunos4*)
5765      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5766      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5767      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5768      ;;
5769
5770    sysv4 | sysv4.2uw2* | sysv4.3*)
5771      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5772      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5773      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5774      ;;
5775
5776    sysv4*MP*)
5777      if test -d /usr/nec ;then
5778	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5779	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5780      fi
5781      ;;
5782
5783    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5784      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5785      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5786      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5787      ;;
5788
5789    unicos*)
5790      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5791      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5792      ;;
5793
5794    uts4*)
5795      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5796      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5797      ;;
5798
5799    *)
5800      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5801      ;;
5802    esac
5803  fi
5804])
5805AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5806
5807#
5808# Check to make sure the PIC flag actually works.
5809#
5810if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5811  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5812    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
5813    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5814    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5815     "" | " "*) ;;
5816     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5817     esac],
5818    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5819     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5820fi
5821case $host_os in
5822  # For platforms which do not support PIC, -DPIC is meaningless:
5823  *djgpp*)
5824    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5825    ;;
5826  *)
5827    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5828    ;;
5829esac
5830
5831#
5832# Check to make sure the static flag actually works.
5833#
5834wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5835AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5836  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5837  $lt_tmp_static_flag,
5838  [],
5839  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5840])
5841
5842
5843# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5844# ------------------------------------
5845# See if the linker supports building shared libraries.
5846AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5847[AC_REQUIRE([LT_AC_PROG_SED])dnl
5848AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5849ifelse([$1],[CXX],[
5850  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5851  case $host_os in
5852  aix[[4-9]]*)
5853    # If we're using GNU nm, then we don't want the "-C" option.
5854    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5855    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5856      _LT_AC_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'
5857    else
5858      _LT_AC_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'
5859    fi
5860    ;;
5861  pw32*)
5862    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5863  ;;
5864  cygwin* | mingw*)
5865    _LT_AC_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'
5866  ;;
5867  *)
5868    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5869  ;;
5870  esac
5871  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5872],[
5873  runpath_var=
5874  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5875  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5876  _LT_AC_TAGVAR(archive_cmds, $1)=
5877  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5878  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5879  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5880  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5881  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5882  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5883  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5884  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5885  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5886  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5887  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5888  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5889  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5890  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5891  _LT_AC_TAGVAR(module_cmds, $1)=
5892  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5893  _LT_AC_TAGVAR(always_export_symbols, $1)=no
5894  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5895  # include_expsyms should be a list of space-separated symbols to be *always*
5896  # included in the symbol list
5897  _LT_AC_TAGVAR(include_expsyms, $1)=
5898  # exclude_expsyms can be an extended regexp of symbols to exclude
5899  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5900  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5901  # as well as any symbol that contains `d'.
5902  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5903  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5904  # platforms (ab)use it in PIC code, but their linkers get confused if
5905  # the symbol is explicitly referenced.  Since portable code cannot
5906  # rely on this symbol name, it's probably fine to never include it in
5907  # preloaded symbol tables.
5908  # Exclude shared library initialization/finalization symbols.
5909dnl Note also adjust exclude_expsyms for C++ above.
5910  extract_expsyms_cmds=
5911  # Just being paranoid about ensuring that cc_basename is set.
5912  _LT_CC_BASENAME([$compiler])
5913  case $host_os in
5914  cygwin* | mingw* | pw32*)
5915    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5916    # When not using gcc, we currently assume that we are using
5917    # Microsoft Visual C++.
5918    if test "$GCC" != yes; then
5919      with_gnu_ld=no
5920    fi
5921    ;;
5922  interix*)
5923    # we just hope/assume this is gcc and not c89 (= MSVC++)
5924    with_gnu_ld=yes
5925    ;;
5926  mirbsd*)
5927    with_gnu_ld=yes
5928    ;;
5929  openbsd*)
5930    with_gnu_ld=no
5931    ;;
5932  esac
5933
5934  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5935  if test "$with_gnu_ld" = yes; then
5936    # If archive_cmds runs LD, not CC, wlarc should be empty
5937    wlarc='${wl}'
5938
5939    # Set some defaults for GNU ld with shared library support. These
5940    # are reset later if shared libraries are not supported. Putting them
5941    # here allows them to be overridden if necessary.
5942    runpath_var=LD_RUN_PATH
5943    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5944    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5945    # ancient GNU ld didn't support --whole-archive et. al.
5946    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5947	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5948      else
5949  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5950    fi
5951    supports_anon_versioning=no
5952    case `$LD -v 2>/dev/null` in
5953      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5954      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5955      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5956      *\ 2.11.*) ;; # other 2.11 versions
5957      *) supports_anon_versioning=yes ;;
5958    esac
5959
5960    # See if GNU ld supports shared libraries.
5961    case $host_os in
5962    aix[[3-9]]*)
5963      # On AIX/PPC, the GNU linker is very broken
5964      if test "$host_cpu" != ia64; then
5965	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5966	cat <<EOF 1>&2
5967
5968*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5969*** to be unable to reliably create shared libraries on AIX.
5970*** Therefore, libtool is disabling shared libraries support.  If you
5971*** really care for shared libraries, you may want to modify your PATH
5972*** so that a non-GNU linker is found, and then restart.
5973
5974EOF
5975      fi
5976      ;;
5977
5978    amigaos*)
5979      _LT_AC_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)'
5980      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5981      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5982
5983      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5984      # that the semantics of dynamic libraries on AmigaOS, at least up
5985      # to version 4, is to share data among multiple programs linked
5986      # with the same dynamic library.  Since this doesn't match the
5987      # behavior of shared libraries on other platforms, we can't use
5988      # them.
5989      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5990      ;;
5991
5992    beos*)
5993      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5994	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5995	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5996	# support --undefined.  This deserves some investigation.  FIXME
5997	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5998      else
5999	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6000      fi
6001      ;;
6002
6003    cygwin* | mingw* | pw32*)
6004      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6005      # as there is no search path for DLLs.
6006      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6007      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6008      _LT_AC_TAGVAR(always_export_symbols, $1)=no
6009      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6010      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
6011
6012      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6013        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6014	# If the export-symbols file already is a .def file (1st line
6015	# is EXPORTS), use it as is; otherwise, prepend...
6016	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6017	  cp $export_symbols $output_objdir/$soname.def;
6018	else
6019	  echo EXPORTS > $output_objdir/$soname.def;
6020	  cat $export_symbols >> $output_objdir/$soname.def;
6021	fi~
6022	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6023      else
6024	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6025      fi
6026      ;;
6027
6028    interix[[3-9]]*)
6029      _LT_AC_TAGVAR(hardcode_direct, $1)=no
6030      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6031      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6032      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6033      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6034      # Instead, shared libraries are loaded at an image base (0x10000000 by
6035      # default) and relocated if they conflict, which is a slow very memory
6036      # consuming and fragmenting process.  To avoid this, we pick a random,
6037      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6038      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6039      _LT_AC_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'
6040      _LT_AC_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'
6041      ;;
6042
6043    gnu* | linux* | k*bsd*-gnu)
6044      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6045	tmp_addflag=
6046	case $cc_basename,$host_cpu in
6047	pgcc*)				# Portland Group C compiler
6048	  _LT_AC_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'
6049	  tmp_addflag=' $pic_flag'
6050	  ;;
6051	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
6052	  _LT_AC_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'
6053	  tmp_addflag=' $pic_flag -Mnomain' ;;
6054	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
6055	  tmp_addflag=' -i_dynamic' ;;
6056	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
6057	  tmp_addflag=' -i_dynamic -nofor_main' ;;
6058	ifc* | ifort*)			# Intel Fortran compiler
6059	  tmp_addflag=' -nofor_main' ;;
6060	esac
6061	case `$CC -V 2>&1 | sed 5q` in
6062	*Sun\ C*)			# Sun C 5.9
6063	  _LT_AC_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'
6064	  tmp_sharedflag='-G' ;;
6065	*Sun\ F*)			# Sun Fortran 8.3
6066	  tmp_sharedflag='-G' ;;
6067	*)
6068	  tmp_sharedflag='-shared' ;;
6069	esac
6070	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6071
6072	if test $supports_anon_versioning = yes; then
6073	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6074  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6075  $echo "local: *; };" >> $output_objdir/$libname.ver~
6076	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6077	fi
6078      else
6079	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6080      fi
6081      ;;
6082
6083    mirbsd*)
6084      if test -f /usr/libexec/ld.so; then
6085	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6086	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6087	_LT_AC_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'
6088	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6089	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6090	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6091	output_verbose_link_cmd='echo'
6092      else
6093	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6094      fi
6095      ;;
6096
6097    netbsd*)
6098      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6099	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6100	wlarc=
6101      else
6102	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6103	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6104      fi
6105      ;;
6106
6107    solaris*)
6108      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6109	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6110	cat <<EOF 1>&2
6111
6112*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6113*** create shared libraries on Solaris systems.  Therefore, libtool
6114*** is disabling shared libraries support.  We urge you to upgrade GNU
6115*** binutils to release 2.9.1 or newer.  Another option is to modify
6116*** your PATH or compiler configuration so that the native linker is
6117*** used, and then restart.
6118
6119EOF
6120      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6121	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6122	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6123      else
6124	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6125      fi
6126      ;;
6127
6128    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6129      case `$LD -v 2>&1` in
6130        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6131	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6132	cat <<_LT_EOF 1>&2
6133
6134*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6135*** reliably create shared libraries on SCO systems.  Therefore, libtool
6136*** is disabling shared libraries support.  We urge you to upgrade GNU
6137*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6138*** your PATH or compiler configuration so that the native linker is
6139*** used, and then restart.
6140
6141_LT_EOF
6142	;;
6143	*)
6144	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6145	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
6146	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
6147	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
6148	  else
6149	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
6150	  fi
6151	;;
6152      esac
6153      ;;
6154
6155    sunos4*)
6156      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6157      wlarc=
6158      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6159      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6160      ;;
6161
6162    *)
6163      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6164	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6165	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6166      else
6167	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6168      fi
6169      ;;
6170    esac
6171
6172    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6173      runpath_var=
6174      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6175      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6176      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6177    fi
6178  else
6179    # PORTME fill in a description of your system's linker (not GNU ld)
6180    case $host_os in
6181    aix3*)
6182      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6183      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6184      _LT_AC_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'
6185      # Note: this linker hardcodes the directories in LIBPATH if there
6186      # are no directories specified by -L.
6187      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6188      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6189	# Neither direct hardcoding nor static linking is supported with a
6190	# broken collect2.
6191	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6192      fi
6193      ;;
6194
6195    aix[[4-9]]*)
6196      if test "$host_cpu" = ia64; then
6197	# On IA64, the linker does run time linking by default, so we don't
6198	# have to do anything special.
6199	aix_use_runtimelinking=no
6200	exp_sym_flag='-Bexport'
6201	no_entry_flag=""
6202      else
6203	# If we're using GNU nm, then we don't want the "-C" option.
6204	# -C means demangle to AIX nm, but means don't demangle with GNU nm
6205	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6206	  _LT_AC_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'
6207	else
6208	  _LT_AC_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'
6209	fi
6210	aix_use_runtimelinking=no
6211
6212	# Test if we are trying to use run time linking or normal
6213	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6214	# need to do runtime linking.
6215	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6216	  for ld_flag in $LDFLAGS; do
6217  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6218  	    aix_use_runtimelinking=yes
6219  	    break
6220  	  fi
6221	  done
6222	  ;;
6223	esac
6224
6225	exp_sym_flag='-bexport'
6226	no_entry_flag='-bnoentry'
6227      fi
6228
6229      # When large executables or shared objects are built, AIX ld can
6230      # have problems creating the table of contents.  If linking a library
6231      # or program results in "error TOC overflow" add -mminimal-toc to
6232      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6233      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6234
6235      _LT_AC_TAGVAR(archive_cmds, $1)=''
6236      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6237      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6238      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6239
6240      if test "$GCC" = yes; then
6241	case $host_os in aix4.[[012]]|aix4.[[012]].*)
6242	# We only want to do this on AIX 4.2 and lower, the check
6243	# below for broken collect2 doesn't work under 4.3+
6244	  collect2name=`${CC} -print-prog-name=collect2`
6245	  if test -f "$collect2name" && \
6246  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
6247	  then
6248  	  # We have reworked collect2
6249  	  :
6250	  else
6251  	  # We have old collect2
6252  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6253  	  # It fails to find uninstalled libraries when the uninstalled
6254  	  # path is not listed in the libpath.  Setting hardcode_minus_L
6255  	  # to unsupported forces relinking
6256  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6257  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6258  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6259	  fi
6260	  ;;
6261	esac
6262	shared_flag='-shared'
6263	if test "$aix_use_runtimelinking" = yes; then
6264	  shared_flag="$shared_flag "'${wl}-G'
6265	fi
6266      else
6267	# not using gcc
6268	if test "$host_cpu" = ia64; then
6269  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6270  	# chokes on -Wl,-G. The following line is correct:
6271	  shared_flag='-G'
6272	else
6273	  if test "$aix_use_runtimelinking" = yes; then
6274	    shared_flag='${wl}-G'
6275	  else
6276	    shared_flag='${wl}-bM:SRE'
6277	  fi
6278	fi
6279      fi
6280
6281      # It seems that -bexpall does not export symbols beginning with
6282      # underscore (_), so it is better to generate a list of symbols to export.
6283      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6284      if test "$aix_use_runtimelinking" = yes; then
6285	# Warning - without using the other runtime loading flags (-brtl),
6286	# -berok will link without error, but may produce a broken library.
6287	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6288       # Determine the default libpath from the value encoded in an empty executable.
6289       _LT_AC_SYS_LIBPATH_AIX
6290       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6291	_LT_AC_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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6292       else
6293	if test "$host_cpu" = ia64; then
6294	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6295	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6296	  _LT_AC_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"
6297	else
6298	 # Determine the default libpath from the value encoded in an empty executable.
6299	 _LT_AC_SYS_LIBPATH_AIX
6300	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6301	  # Warning - without using the other run time loading flags,
6302	  # -berok will link without error, but may produce a broken library.
6303	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6304	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6305	  # Exported symbols can be pulled into shared objects from archives
6306	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6307	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6308	  # This is similar to how AIX traditionally builds its shared libraries.
6309	  _LT_AC_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'
6310	fi
6311      fi
6312      ;;
6313
6314    amigaos*)
6315      _LT_AC_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)'
6316      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6317      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6318      # see comment about different semantics on the GNU ld section
6319      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6320      ;;
6321
6322    bsdi[[45]]*)
6323      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6324      ;;
6325
6326    cygwin* | mingw* | pw32*)
6327      # When not using gcc, we currently assume that we are using
6328      # Microsoft Visual C++.
6329      # hardcode_libdir_flag_spec is actually meaningless, as there is
6330      # no search path for DLLs.
6331      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6332      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6333      # Tell ltmain to make .lib files, not .a files.
6334      libext=lib
6335      # Tell ltmain to make .dll files, not .so files.
6336      shrext_cmds=".dll"
6337      # FIXME: Setting linknames here is a bad hack.
6338      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6339      # The linker will automatically build a .lib file if we build a DLL.
6340      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6341      # FIXME: Should let the user specify the lib program.
6342      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6343      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6344      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6345      ;;
6346
6347    darwin* | rhapsody*)
6348      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
6349      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6350      _LT_AC_TAGVAR(hardcode_direct, $1)=no
6351      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6352      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6353      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6354      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6355    if test "$GCC" = yes ; then
6356    	output_verbose_link_cmd='echo'
6357        _LT_AC_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}"
6358        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
6359        _LT_AC_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}"
6360        _LT_AC_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}"
6361    else
6362      case $cc_basename in
6363        xlc*)
6364         output_verbose_link_cmd='echo'
6365         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
6366         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6367          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6368         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6369          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6370          ;;
6371       *)
6372         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6373          ;;
6374      esac
6375    fi
6376      ;;
6377
6378    dgux*)
6379      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6380      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6381      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6382      ;;
6383
6384    freebsd1*)
6385      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6386      ;;
6387
6388    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6389    # support.  Future versions do this automatically, but an explicit c++rt0.o
6390    # does not break anything, and helps significantly (at the cost of a little
6391    # extra space).
6392    freebsd2.2*)
6393      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6394      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6395      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6396      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6397      ;;
6398
6399    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6400    freebsd2*)
6401      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6402      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6403      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6404      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6405      ;;
6406
6407    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6408    freebsd* | dragonfly* | midnightbsd*)
6409      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6410      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6411      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6412      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6413      ;;
6414
6415    hpux9*)
6416      if test "$GCC" = yes; then
6417	_LT_AC_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'
6418      else
6419	_LT_AC_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'
6420      fi
6421      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6422      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6423      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6424
6425      # hardcode_minus_L: Not really in the search PATH,
6426      # but as the default location of the library.
6427      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6428      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6429      ;;
6430
6431    hpux10*)
6432      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6433	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6434      else
6435	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6436      fi
6437      if test "$with_gnu_ld" = no; then
6438	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6439	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6440
6441	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6442	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6443
6444	# hardcode_minus_L: Not really in the search PATH,
6445	# but as the default location of the library.
6446	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6447      fi
6448      ;;
6449
6450    hpux11*)
6451      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6452	case $host_cpu in
6453	hppa*64*)
6454	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6455	  ;;
6456	ia64*)
6457	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6458	  ;;
6459	*)
6460	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6461	  ;;
6462	esac
6463      else
6464	case $host_cpu in
6465	hppa*64*)
6466	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6467	  ;;
6468	ia64*)
6469	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6470	  ;;
6471	*)
6472	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6473	  ;;
6474	esac
6475      fi
6476      if test "$with_gnu_ld" = no; then
6477	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6478	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6479
6480	case $host_cpu in
6481	hppa*64*|ia64*)
6482	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6483	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6484	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6485	  ;;
6486	*)
6487	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6488	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6489
6490	  # hardcode_minus_L: Not really in the search PATH,
6491	  # but as the default location of the library.
6492	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6493	  ;;
6494	esac
6495      fi
6496      ;;
6497
6498    irix5* | irix6* | nonstopux*)
6499      if test "$GCC" = yes; then
6500	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6501      else
6502	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6503	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6504      fi
6505      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6506      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6507      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6508      ;;
6509
6510    netbsd*)
6511      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6512	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6513      else
6514	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6515      fi
6516      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6517      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6518      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6519      ;;
6520
6521    newsos6)
6522      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6523      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6524      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6525      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6526      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6527      ;;
6528
6529    openbsd*)
6530      if test -f /usr/libexec/ld.so; then
6531	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6532	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6533	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6534	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6535	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6536	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6537	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6538	else
6539	  case $host_os in
6540	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6541	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6542	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6543	     ;;
6544	   *)
6545	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6546	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6547	     ;;
6548	  esac
6549        fi
6550      else
6551	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6552      fi
6553      ;;
6554
6555    os2*)
6556      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6557      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6558      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6559      _LT_AC_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'
6560      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6561      ;;
6562
6563    osf3*)
6564      if test "$GCC" = yes; then
6565	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6566	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6567      else
6568	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6569	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6570      fi
6571      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6572      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6573      ;;
6574
6575    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6576      if test "$GCC" = yes; then
6577	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6578	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6579	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6580      else
6581	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6582	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6583	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6584	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6585
6586	# Both c and cxx compiler support -rpath directly
6587	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6588      fi
6589      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6590      ;;
6591
6592    solaris*)
6593      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6594      if test "$GCC" = yes; then
6595	wlarc='${wl}'
6596	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6597	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6598	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6599      else
6600	wlarc=''
6601	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6602	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6603  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6604      fi
6605      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6606      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6607      case $host_os in
6608      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6609      *)
6610	# The compiler driver will combine and reorder linker options,
6611	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6612	# but is careful enough not to reorder.
6613 	# Supported since Solaris 2.6 (maybe 2.5.1?)
6614	if test "$GCC" = yes; then
6615	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6616	else
6617	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6618	fi
6619	;;
6620      esac
6621      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6622      ;;
6623
6624    sunos4*)
6625      if test "x$host_vendor" = xsequent; then
6626	# Use $CC to link under sequent, because it throws in some extra .o
6627	# files that make .init and .fini sections work.
6628	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6629      else
6630	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6631      fi
6632      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6633      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6634      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6635      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6636      ;;
6637
6638    sysv4)
6639      case $host_vendor in
6640	sni)
6641	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6642	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6643	;;
6644	siemens)
6645	  ## LD is ld it makes a PLAMLIB
6646	  ## CC just makes a GrossModule.
6647	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6648	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6649	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6650        ;;
6651	motorola)
6652	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6653	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6654	;;
6655      esac
6656      runpath_var='LD_RUN_PATH'
6657      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6658      ;;
6659
6660    sysv4.3*)
6661      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6662      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6663      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6664      ;;
6665
6666    sysv4*MP*)
6667      if test -d /usr/nec; then
6668	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6669	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6670	runpath_var=LD_RUN_PATH
6671	hardcode_runpath_var=yes
6672	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6673      fi
6674      ;;
6675
6676    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6677      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6678      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6679      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6680      runpath_var='LD_RUN_PATH'
6681
6682      if test "$GCC" = yes; then
6683	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6684	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6685      else
6686	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6687	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6688      fi
6689      ;;
6690
6691    sysv5* | sco3.2v5* | sco5v6*)
6692      # Note: We can NOT use -z defs as we might desire, because we do not
6693      # link with -lc, and that would cause any symbols used from libc to
6694      # always be unresolved, which means just about no library would
6695      # ever link correctly.  If we're not using GNU ld we use -z text
6696      # though, which does catch some bad symbols but isn't as heavy-handed
6697      # as -z defs.
6698      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6699      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6700      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6701      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6702      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6703      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6704      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6705      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6706      runpath_var='LD_RUN_PATH'
6707
6708      if test "$GCC" = yes; then
6709	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6710	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6711      else
6712	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6713	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6714      fi
6715      ;;
6716
6717    uts4*)
6718      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6719      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6720      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6721      ;;
6722
6723    *)
6724      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6725      ;;
6726    esac
6727  fi
6728])
6729AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6730test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6731
6732#
6733# Do we need to explicitly link libc?
6734#
6735case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6736x|xyes)
6737  # Assume -lc should be added
6738  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6739
6740  if test "$enable_shared" = yes && test "$GCC" = yes; then
6741    case $_LT_AC_TAGVAR(archive_cmds, $1) in
6742    *'~'*)
6743      # FIXME: we may have to deal with multi-command sequences.
6744      ;;
6745    '$CC '*)
6746      # Test whether the compiler implicitly links with -lc since on some
6747      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6748      # to ld, don't add -lc before -lgcc.
6749      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6750      $rm conftest*
6751      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6752
6753      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6754        soname=conftest
6755        lib=conftest
6756        libobjs=conftest.$ac_objext
6757        deplibs=
6758        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6759	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6760        compiler_flags=-v
6761        linker_flags=-v
6762        verstring=
6763        output_objdir=.
6764        libname=conftest
6765        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6766        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6767        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6768        then
6769	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6770        else
6771	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6772        fi
6773        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6774      else
6775        cat conftest.err 1>&5
6776      fi
6777      $rm conftest*
6778      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6779      ;;
6780    esac
6781  fi
6782  ;;
6783esac
6784])# AC_LIBTOOL_PROG_LD_SHLIBS
6785
6786
6787# _LT_AC_FILE_LTDLL_C
6788# -------------------
6789# Be careful that the start marker always follows a newline.
6790AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6791# /* ltdll.c starts here */
6792# #define WIN32_LEAN_AND_MEAN
6793# #include <windows.h>
6794# #undef WIN32_LEAN_AND_MEAN
6795# #include <stdio.h>
6796#
6797# #ifndef __CYGWIN__
6798# #  ifdef __CYGWIN32__
6799# #    define __CYGWIN__ __CYGWIN32__
6800# #  endif
6801# #endif
6802#
6803# #ifdef __cplusplus
6804# extern "C" {
6805# #endif
6806# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6807# #ifdef __cplusplus
6808# }
6809# #endif
6810#
6811# #ifdef __CYGWIN__
6812# #include <cygwin/cygwin_dll.h>
6813# DECLARE_CYGWIN_DLL( DllMain );
6814# #endif
6815# HINSTANCE __hDllInstance_base;
6816#
6817# BOOL APIENTRY
6818# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6819# {
6820#   __hDllInstance_base = hInst;
6821#   return TRUE;
6822# }
6823# /* ltdll.c ends here */
6824])# _LT_AC_FILE_LTDLL_C
6825
6826
6827# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6828# ---------------------------------
6829AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6830
6831
6832# old names
6833AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6834AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6835AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6836AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6837AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6838AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6839AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6840
6841# This is just to silence aclocal about the macro not being used
6842ifelse([AC_DISABLE_FAST_INSTALL])
6843
6844AC_DEFUN([LT_AC_PROG_GCJ],
6845[AC_CHECK_TOOL(GCJ, gcj, no)
6846  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6847  AC_SUBST(GCJFLAGS)
6848])
6849
6850AC_DEFUN([LT_AC_PROG_RC],
6851[AC_CHECK_TOOL(RC, windres, no)
6852])
6853
6854############################################################
6855# NOTE: This macro has been submitted for inclusion into   #
6856#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6857#  a released version of Autoconf we should remove this    #
6858#  macro and use it instead.                               #
6859############################################################
6860# LT_AC_PROG_SED
6861# --------------
6862# Check for a fully-functional sed program, that truncates
6863# as few characters as possible.  Prefer GNU sed if found.
6864AC_DEFUN([LT_AC_PROG_SED],
6865[AC_MSG_CHECKING([for a sed that does not truncate output])
6866AC_CACHE_VAL(lt_cv_path_SED,
6867[# Loop through the user's path and test for sed and gsed.
6868# Then use that list of seds as ones to test for truncation.
6869test -z "$as_executable_p" && as_executable_p="test -f"
6870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6871for as_dir in $PATH
6872do
6873  IFS=$as_save_IFS
6874  test -z "$as_dir" && as_dir=.
6875  for lt_ac_prog in sed gsed; do
6876    for ac_exec_ext in '' $ac_executable_extensions; do
6877      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6878        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6879      fi
6880    done
6881  done
6882done
6883IFS=$as_save_IFS
6884lt_ac_max=0
6885lt_ac_count=0
6886# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6887# along with /bin/sed that truncates output.
6888for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6889  test ! -f $lt_ac_sed && continue
6890  cat /dev/null > conftest.in
6891  lt_ac_count=0
6892  echo ${ECHO_N-$ac_n} "0123456789$ECHO_C" >conftest.in
6893  # Check for GNU sed and select it if it is found.
6894  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6895    lt_cv_path_SED=$lt_ac_sed
6896    break
6897  fi
6898  while true; do
6899    cat conftest.in conftest.in >conftest.tmp
6900    mv conftest.tmp conftest.in
6901    cp conftest.in conftest.nl
6902    echo >>conftest.nl
6903    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6904    cmp -s conftest.out conftest.nl || break
6905    # 10000 chars as input seems more than enough
6906    test $lt_ac_count -gt 10 && break
6907    lt_ac_count=`expr $lt_ac_count + 1`
6908    if test $lt_ac_count -gt $lt_ac_max; then
6909      lt_ac_max=$lt_ac_count
6910      lt_cv_path_SED=$lt_ac_sed
6911    fi
6912  done
6913done
6914])
6915lt_cv_path_SED=${lt_cv_path_SED-$SED}
6916SED=$lt_cv_path_SED
6917AC_SUBST([SED])
6918AC_MSG_RESULT([$SED])
6919])
6920
6921dnl   -----------------
6922])dnl end of MirLibtool
6923