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