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