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