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