source: trunk/third/libxslt/aclocal.m4 @ 20733

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