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