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