New alpm_list_join function
[pacman.git] / acinclude.m4
blob1d66dccdfbb77af03ea7e0a1241c755fbdf25512
1 dnl acinclude.m4 - configure macros used by pacman and libalpm
2 dnl The majority of this file is the libtool macros we use, kept here so
3 dnl we are not dependent on the host-system version of the macros. There
4 dnl are some pacman/libalpm specific macros at the end of the file as well.
6 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
7 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007
8 ## Free Software Foundation, Inc.
9 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
11 ## This file is free software; the Free Software Foundation gives
12 ## unlimited permission to copy and/or distribute it, with or without
13 ## modifications, as long as this notice is preserved.
15 # serial 51 AC_PROG_LIBTOOL
18 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
19 # -----------------------------------------------------------
20 # If this macro is not defined by Autoconf, define it here.
21 m4_ifdef([AC_PROVIDE_IFELSE],
22          [],
23          [m4_define([AC_PROVIDE_IFELSE],
24                  [m4_ifdef([AC_PROVIDE_$1],
25                            [$2], [$3])])])
28 # AC_PROG_LIBTOOL
29 # ---------------
30 AC_DEFUN([AC_PROG_LIBTOOL],
31 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
32 ])])# AC_PROG_LIBTOOL
35 # _AC_PROG_LIBTOOL
36 # ----------------
37 AC_DEFUN([_AC_PROG_LIBTOOL],
38 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
40 # This can be used to rebuild libtool when needed
41 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
43 # Always use our own libtool.
44 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
45 AC_SUBST(LIBTOOL)dnl
47 # Prevent multiple expansion
48 define([AC_PROG_LIBTOOL], [])
49 ])# _AC_PROG_LIBTOOL
52 # AC_LIBTOOL_SETUP
53 # ----------------
54 AC_DEFUN([AC_LIBTOOL_SETUP],
55 [AC_PREREQ(2.50)dnl
56 AC_REQUIRE([AC_ENABLE_SHARED])dnl
57 AC_REQUIRE([AC_ENABLE_STATIC])dnl
58 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
59 AC_REQUIRE([AC_CANONICAL_HOST])dnl
60 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
61 AC_REQUIRE([AC_PROG_CC])dnl
62 AC_REQUIRE([AC_PROG_LD])dnl
63 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
64 AC_REQUIRE([AC_PROG_NM])dnl
66 AC_REQUIRE([AC_PROG_LN_S])dnl
67 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
68 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
69 AC_REQUIRE([AC_OBJEXT])dnl
70 AC_REQUIRE([AC_EXEEXT])dnl
71 dnl
73 AC_LIBTOOL_SYS_MAX_CMD_LEN
74 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
75 AC_LIBTOOL_OBJDIR
77 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
78 _LT_AC_PROG_ECHO_BACKSLASH
80 case $host_os in
81 aix3*)
82   # AIX sometimes has problems with the GCC collect2 program.  For some
83   # reason, if we set the COLLECT_NAMES environment variable, the problems
84   # vanish in a puff of smoke.
85   if test "X${COLLECT_NAMES+set}" != Xset; then
86     COLLECT_NAMES=
87     export COLLECT_NAMES
88   fi
89   ;;
90 esac
92 # Sed substitution that helps us do robust quoting.  It backslashifies
93 # metacharacters that are still active within double-quoted strings.
94 Xsed='sed -e 1s/^X//'
95 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
97 # Same as above, but do not quote variable references.
98 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
100 # Sed substitution to delay expansion of an escaped shell variable in a
101 # double_quote_subst'ed string.
102 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
104 # Sed substitution to avoid accidental globbing in evaled expressions
105 no_glob_subst='s/\*/\\\*/g'
107 # Constants:
108 rm="rm -f"
110 # Global variables:
111 default_ofile=libtool
112 can_build_shared=yes
114 # All known linkers require a `.a' archive for static linking (except MSVC,
115 # which needs '.lib').
116 libext=a
117 ltmain="$ac_aux_dir/ltmain.sh"
118 ofile="$default_ofile"
119 with_gnu_ld="$lt_cv_prog_gnu_ld"
121 AC_CHECK_TOOL(AR, ar, false)
122 AC_CHECK_TOOL(RANLIB, ranlib, :)
123 AC_CHECK_TOOL(STRIP, strip, :)
125 old_CC="$CC"
126 old_CFLAGS="$CFLAGS"
128 # Set sane defaults for various variables
129 test -z "$AR" && AR=ar
130 test -z "$AR_FLAGS" && AR_FLAGS=cru
131 test -z "$AS" && AS=as
132 test -z "$CC" && CC=cc
133 test -z "$LTCC" && LTCC=$CC
134 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
135 test -z "$DLLTOOL" && DLLTOOL=dlltool
136 test -z "$LD" && LD=ld
137 test -z "$LN_S" && LN_S="ln -s"
138 test -z "$MAGIC_CMD" && MAGIC_CMD=file
139 test -z "$NM" && NM=nm
140 test -z "$SED" && SED=sed
141 test -z "$OBJDUMP" && OBJDUMP=objdump
142 test -z "$RANLIB" && RANLIB=:
143 test -z "$STRIP" && STRIP=:
144 test -z "$ac_objext" && ac_objext=o
146 # Determine commands to create old-style static archives.
147 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
148 old_postinstall_cmds='chmod 644 $oldlib'
149 old_postuninstall_cmds=
151 if test -n "$RANLIB"; then
152   case $host_os in
153   openbsd*)
154     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
155     ;;
156   *)
157     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
158     ;;
159   esac
160   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
163 _LT_CC_BASENAME([$compiler])
165 # Only perform the check for file, if the check method requires it
166 case $deplibs_check_method in
167 file_magic*)
168   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
169     AC_PATH_MAGIC
170   fi
171   ;;
172 esac
174 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
175 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
176 enable_win32_dll=yes, enable_win32_dll=no)
178 AC_ARG_ENABLE([libtool-lock],
179     [AC_HELP_STRING([--disable-libtool-lock],
180         [avoid locking (might break parallel builds)])])
181 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
183 AC_ARG_WITH([pic],
184     [AC_HELP_STRING([--with-pic],
185         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
186     [pic_mode="$withval"],
187     [pic_mode=default])
188 test -z "$pic_mode" && pic_mode=default
190 # Use C for the default configuration in the libtool script
191 tagname=
192 AC_LIBTOOL_LANG_C_CONFIG
193 _LT_AC_TAGCONFIG
194 ])# AC_LIBTOOL_SETUP
197 # _LT_AC_SYS_COMPILER
198 # -------------------
199 AC_DEFUN([_LT_AC_SYS_COMPILER],
200 [AC_REQUIRE([AC_PROG_CC])dnl
202 # If no C compiler was specified, use CC.
203 LTCC=${LTCC-"$CC"}
205 # If no C compiler flags were specified, use CFLAGS.
206 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
208 # Allow CC to be a program name with arguments.
209 compiler=$CC
210 ])# _LT_AC_SYS_COMPILER
213 # _LT_CC_BASENAME(CC)
214 # -------------------
215 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
216 AC_DEFUN([_LT_CC_BASENAME],
217 [for cc_temp in $1""; do
218   case $cc_temp in
219     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
220     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
221     \-*) ;;
222     *) break;;
223   esac
224 done
225 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
229 # _LT_COMPILER_BOILERPLATE
230 # ------------------------
231 # Check for compiler boilerplate output or warnings with
232 # the simple compiler test code.
233 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
234 [AC_REQUIRE([LT_AC_PROG_SED])dnl
235 ac_outfile=conftest.$ac_objext
236 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
237 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
238 _lt_compiler_boilerplate=`cat conftest.err`
239 $rm conftest*
240 ])# _LT_COMPILER_BOILERPLATE
243 # _LT_LINKER_BOILERPLATE
244 # ----------------------
245 # Check for linker boilerplate output or warnings with
246 # the simple link test code.
247 AC_DEFUN([_LT_LINKER_BOILERPLATE],
248 [AC_REQUIRE([LT_AC_PROG_SED])dnl
249 ac_outfile=conftest.$ac_objext
250 echo "$lt_simple_link_test_code" >conftest.$ac_ext
251 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
252 _lt_linker_boilerplate=`cat conftest.err`
253 $rm conftest*
254 ])# _LT_LINKER_BOILERPLATE
257 # _LT_AC_SYS_LIBPATH_AIX
258 # ----------------------
259 # Links a minimal program and checks the executable
260 # for the system default hardcoded library path. In most cases,
261 # this is /usr/lib:/lib, but when the MPI compilers are used
262 # the location of the communication and MPI libs are included too.
263 # If we don't find anything, use the default library path according
264 # to the aix ld manual.
265 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
266 [AC_REQUIRE([LT_AC_PROG_SED])dnl
267 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
268 lt_aix_libpath_sed='
269     /Import File Strings/,/^$/ {
270         /^0/ {
271             s/^0  *\(.*\)$/\1/
272             p
273         }
274     }'
275 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
276 # Check for a 64-bit object if we didn't find anything.
277 if test -z "$aix_libpath"; then
278   aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
279 fi],[])
280 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
281 ])# _LT_AC_SYS_LIBPATH_AIX
284 # _LT_AC_SHELL_INIT(ARG)
285 # ----------------------
286 AC_DEFUN([_LT_AC_SHELL_INIT],
287 [ifdef([AC_DIVERSION_NOTICE],
288              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
289          [AC_DIVERT_PUSH(NOTICE)])
291 AC_DIVERT_POP
292 ])# _LT_AC_SHELL_INIT
295 # _LT_AC_PROG_ECHO_BACKSLASH
296 # --------------------------
297 # Add some code to the start of the generated configure script which
298 # will find an echo command which doesn't interpret backslashes.
299 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
300 [_LT_AC_SHELL_INIT([
301 # Check that we are running under the correct shell.
302 SHELL=${CONFIG_SHELL-/bin/sh}
304 case X$ECHO in
305 X*--fallback-echo)
306   # Remove one level of quotation (which was required for Make).
307   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
308   ;;
309 esac
311 echo=${ECHO-echo}
312 if test "X[$]1" = X--no-reexec; then
313   # Discard the --no-reexec flag, and continue.
314   shift
315 elif test "X[$]1" = X--fallback-echo; then
316   # Avoid inline document here, it may be left over
317   :
318 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
319   # Yippee, $echo works!
320   :
321 else
322   # Restart under the correct shell.
323   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
326 if test "X[$]1" = X--fallback-echo; then
327   # used as fallback echo
328   shift
329   cat <<EOF
330 [$]*
332   exit 0
335 # The HP-UX ksh and POSIX shell print the target directory to stdout
336 # if CDPATH is set.
337 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
339 if test -z "$ECHO"; then
340 if test "X${echo_test_string+set}" != Xset; then
341 # find a string as large as possible, as long as the shell can cope with it
342   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
343     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
344     if (echo_test_string=`eval $cmd`) 2>/dev/null &&
345        echo_test_string=`eval $cmd` &&
346        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
347     then
348       break
349     fi
350   done
353 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
354    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
355    test "X$echo_testing_string" = "X$echo_test_string"; then
356   :
357 else
358   # The Solaris, AIX, and Digital Unix default echo programs unquote
359   # backslashes.  This makes it impossible to quote backslashes using
360   #   echo "$something" | sed 's/\\/\\\\/g'
361   #
362   # So, first we look for a working echo in the user's PATH.
364   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
365   for dir in $PATH /usr/ucb; do
366     IFS="$lt_save_ifs"
367     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
368        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
369        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
370        test "X$echo_testing_string" = "X$echo_test_string"; then
371       echo="$dir/echo"
372       break
373     fi
374   done
375   IFS="$lt_save_ifs"
377   if test "X$echo" = Xecho; then
378     # We didn't find a better echo, so look for alternatives.
379     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
380        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
381        test "X$echo_testing_string" = "X$echo_test_string"; then
382       # This shell has a builtin print -r that does the trick.
383       echo='print -r'
384     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
385          test "X$CONFIG_SHELL" != X/bin/ksh; then
386       # If we have ksh, try running configure again with it.
387       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
388       export ORIGINAL_CONFIG_SHELL
389       CONFIG_SHELL=/bin/ksh
390       export CONFIG_SHELL
391       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
392     else
393       # Try using printf.
394       echo='printf %s\n'
395       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
396          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
397          test "X$echo_testing_string" = "X$echo_test_string"; then
398         # Cool, printf works
399         :
400       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
401            test "X$echo_testing_string" = 'X\t' &&
402            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
403            test "X$echo_testing_string" = "X$echo_test_string"; then
404         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
405         export CONFIG_SHELL
406         SHELL="$CONFIG_SHELL"
407         export SHELL
408         echo="$CONFIG_SHELL [$]0 --fallback-echo"
409       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
410            test "X$echo_testing_string" = 'X\t' &&
411            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
412            test "X$echo_testing_string" = "X$echo_test_string"; then
413         echo="$CONFIG_SHELL [$]0 --fallback-echo"
414       else
415         # maybe with a smaller string...
416         prev=:
418         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
419           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
420           then
421             break
422           fi
423           prev="$cmd"
424         done
426         if test "$prev" != 'sed 50q "[$]0"'; then
427           echo_test_string=`eval $prev`
428           export echo_test_string
429           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
430         else
431           # Oops.  We lost completely, so just stick with echo.
432           echo=echo
433         fi
434       fi
435     fi
436   fi
440 # Copy echo and quote the copy suitably for passing to libtool from
441 # the Makefile, instead of quoting the original, which is used later.
442 ECHO=$echo
443 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
444    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
447 AC_SUBST(ECHO)
448 ])])# _LT_AC_PROG_ECHO_BACKSLASH
451 # _LT_AC_LOCK
452 # -----------
453 AC_DEFUN([_LT_AC_LOCK],
454 [AC_ARG_ENABLE([libtool-lock],
455     [AC_HELP_STRING([--disable-libtool-lock],
456         [avoid locking (might break parallel builds)])])
457 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
459 # Some flags need to be propagated to the compiler or linker for good
460 # libtool support.
461 case $host in
462 ia64-*-hpux*)
463   # Find out which ABI we are using.
464   echo 'int i;' > conftest.$ac_ext
465   if AC_TRY_EVAL(ac_compile); then
466     case `/usr/bin/file conftest.$ac_objext` in
467     *ELF-32*)
468       HPUX_IA64_MODE="32"
469       ;;
470     *ELF-64*)
471       HPUX_IA64_MODE="64"
472       ;;
473     esac
474   fi
475   rm -rf conftest*
476   ;;
477 *-*-irix6*)
478   # Find out which ABI we are using.
479   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
480   if AC_TRY_EVAL(ac_compile); then
481    if test "$lt_cv_prog_gnu_ld" = yes; then
482     case `/usr/bin/file conftest.$ac_objext` in
483     *32-bit*)
484       LD="${LD-ld} -melf32bsmip"
485       ;;
486     *N32*)
487       LD="${LD-ld} -melf32bmipn32"
488       ;;
489     *64-bit*)
490       LD="${LD-ld} -melf64bmip"
491       ;;
492     esac
493    else
494     case `/usr/bin/file conftest.$ac_objext` in
495     *32-bit*)
496       LD="${LD-ld} -32"
497       ;;
498     *N32*)
499       LD="${LD-ld} -n32"
500       ;;
501     *64-bit*)
502       LD="${LD-ld} -64"
503       ;;
504     esac
505    fi
506   fi
507   rm -rf conftest*
508   ;;
510 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
511 s390*-*linux*|sparc*-*linux*)
512   # Find out which ABI we are using.
513   echo 'int i;' > conftest.$ac_ext
514   if AC_TRY_EVAL(ac_compile); then
515     case `/usr/bin/file conftest.o` in
516     *32-bit*)
517       case $host in
518         x86_64-*kfreebsd*-gnu)
519           LD="${LD-ld} -m elf_i386_fbsd"
520           ;;
521         x86_64-*linux*)
522           LD="${LD-ld} -m elf_i386"
523           ;;
524         ppc64-*linux*|powerpc64-*linux*)
525           LD="${LD-ld} -m elf32ppclinux"
526           ;;
527         s390x-*linux*)
528           LD="${LD-ld} -m elf_s390"
529           ;;
530         sparc64-*linux*)
531           LD="${LD-ld} -m elf32_sparc"
532           ;;
533       esac
534       ;;
535     *64-bit*)
536       case $host in
537         x86_64-*kfreebsd*-gnu)
538           LD="${LD-ld} -m elf_x86_64_fbsd"
539           ;;
540         x86_64-*linux*)
541           LD="${LD-ld} -m elf_x86_64"
542           ;;
543         ppc*-*linux*|powerpc*-*linux*)
544           LD="${LD-ld} -m elf64ppc"
545           ;;
546         s390*-*linux*)
547           LD="${LD-ld} -m elf64_s390"
548           ;;
549         sparc*-*linux*)
550           LD="${LD-ld} -m elf64_sparc"
551           ;;
552       esac
553       ;;
554     esac
555   fi
556   rm -rf conftest*
557   ;;
559 *-*-sco3.2v5*)
560   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
561   SAVE_CFLAGS="$CFLAGS"
562   CFLAGS="$CFLAGS -belf"
563   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
564     [AC_LANG_PUSH(C)
565      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
566      AC_LANG_POP])
567   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
568     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
569     CFLAGS="$SAVE_CFLAGS"
570   fi
571   ;;
572 sparc*-*solaris*)
573   # Find out which ABI we are using.
574   echo 'int i;' > conftest.$ac_ext
575   if AC_TRY_EVAL(ac_compile); then
576     case `/usr/bin/file conftest.o` in
577     *64-bit*)
578       case $lt_cv_prog_gnu_ld in
579       yes*) LD="${LD-ld} -m elf64_sparc" ;;
580       *)    LD="${LD-ld} -64" ;;
581       esac
582       ;;
583     esac
584   fi
585   rm -rf conftest*
586   ;;
588 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
589 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
590   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
591   AC_CHECK_TOOL(AS, as, false)
592   AC_CHECK_TOOL(OBJDUMP, objdump, false)
593   ;;
594   ])
595 esac
597 need_locks="$enable_libtool_lock"
599 ])# _LT_AC_LOCK
602 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
603 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
604 # ----------------------------------------------------------------
605 # Check whether the given compiler option works
606 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
607 [AC_REQUIRE([LT_AC_PROG_SED])
608 AC_CACHE_CHECK([$1], [$2],
609   [$2=no
610   ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
611    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
612    lt_compiler_flag="$3"
613    # Insert the option either (1) after the last *FLAGS variable, or
614    # (2) before a word containing "conftest.", or (3) at the end.
615    # Note that $ac_compile itself does not contain backslashes and begins
616    # with a dollar sign (not a hyphen), so the echo should work correctly.
617    # The option is referenced via a variable to avoid confusing sed.
618    lt_compile=`echo "$ac_compile" | $SED \
619    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
620    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
621    -e 's:$: $lt_compiler_flag:'`
622    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
623    (eval "$lt_compile" 2>conftest.err)
624    ac_status=$?
625    cat conftest.err >&AS_MESSAGE_LOG_FD
626    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
627    if (exit $ac_status) && test -s "$ac_outfile"; then
628      # The compiler can only warn and ignore the option if not recognized
629      # So say no if there are warnings other than the usual output.
630      $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
631      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
632      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
633        $2=yes
634      fi
635    fi
636    $rm conftest*
639 if test x"[$]$2" = xyes; then
640     ifelse([$5], , :, [$5])
641 else
642     ifelse([$6], , :, [$6])
644 ])# AC_LIBTOOL_COMPILER_OPTION
647 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
648 #                          [ACTION-SUCCESS], [ACTION-FAILURE])
649 # ------------------------------------------------------------
650 # Check whether the given compiler option works
651 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
652 [AC_REQUIRE([LT_AC_PROG_SED])dnl
653 AC_CACHE_CHECK([$1], [$2],
654   [$2=no
655    save_LDFLAGS="$LDFLAGS"
656    LDFLAGS="$LDFLAGS $3"
657    echo "$lt_simple_link_test_code" > conftest.$ac_ext
658    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
659      # The linker can only warn and ignore the option if not recognized
660      # So say no if there are warnings
661      if test -s conftest.err; then
662        # Append any errors to the config.log.
663        cat conftest.err 1>&AS_MESSAGE_LOG_FD
664        $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
665        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
666        if diff conftest.exp conftest.er2 >/dev/null; then
667          $2=yes
668        fi
669      else
670        $2=yes
671      fi
672    fi
673    $rm conftest*
674    LDFLAGS="$save_LDFLAGS"
677 if test x"[$]$2" = xyes; then
678     ifelse([$4], , :, [$4])
679 else
680     ifelse([$5], , :, [$5])
682 ])# AC_LIBTOOL_LINKER_OPTION
685 # AC_LIBTOOL_SYS_MAX_CMD_LEN
686 # --------------------------
687 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
688 [# find the maximum length of command line arguments
689 AC_MSG_CHECKING([the maximum length of command line arguments])
690 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
691   i=0
692   teststring="ABCD"
694   case $build_os in
695   msdosdjgpp*)
696     # On DJGPP, this test can blow up pretty badly due to problems in libc
697     # (any single argument exceeding 2000 bytes causes a buffer overrun
698     # during glob expansion).  Even if it were fixed, the result of this
699     # check would be larger than it should be.
700     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
701     ;;
703   gnu*)
704     # Under GNU Hurd, this test is not required because there is
705     # no limit to the length of command line arguments.
706     # Libtool will interpret -1 as no limit whatsoever
707     lt_cv_sys_max_cmd_len=-1;
708     ;;
710   cygwin* | mingw*)
711     # On Win9x/ME, this test blows up -- it succeeds, but takes
712     # about 5 minutes as the teststring grows exponentially.
713     # Worse, since 9x/ME are not pre-emptively multitasking,
714     # you end up with a "frozen" computer, even though with patience
715     # the test eventually succeeds (with a max line length of 256k).
716     # Instead, let's just punt: use the minimum linelength reported by
717     # all of the supported platforms: 8192 (on NT/2K/XP).
718     lt_cv_sys_max_cmd_len=8192;
719     ;;
721   amigaos*)
722     # On AmigaOS with pdksh, this test takes hours, literally.
723     # So we just punt and use a minimum line length of 8192.
724     lt_cv_sys_max_cmd_len=8192;
725     ;;
727   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
728     # This has been around since 386BSD, at least.  Likely further.
729     if test -x /sbin/sysctl; then
730       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
731     elif test -x /usr/sbin/sysctl; then
732       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
733     else
734       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
735     fi
736     # And add a safety zone
737     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
738     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
739     ;;
741   interix*)
742     # We know the value 262144 and hardcode it with a safety zone (like BSD)
743     lt_cv_sys_max_cmd_len=196608
744     ;;
746   osf*)
747     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
748     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
749     # nice to cause kernel panics so lets avoid the loop below.
750     # First set a reasonable default.
751     lt_cv_sys_max_cmd_len=16384
752     #
753     if test -x /sbin/sysconfig; then
754       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
755         *1*) lt_cv_sys_max_cmd_len=-1 ;;
756       esac
757     fi
758     ;;
759   sco3.2v5*)
760     lt_cv_sys_max_cmd_len=102400
761     ;;
762   sysv5* | sco5v6* | sysv4.2uw2*)
763     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
764     if test -n "$kargmax"; then
765       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[        ]]//'`
766     else
767       lt_cv_sys_max_cmd_len=32768
768     fi
769     ;;
770   *)
771     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
772     if test -n "$lt_cv_sys_max_cmd_len"; then
773       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
774       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
775     else
776       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
777       while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
778                = "XX$teststring") >/dev/null 2>&1 &&
779               new_result=`expr "X$teststring" : ".*" 2>&1` &&
780               lt_cv_sys_max_cmd_len=$new_result &&
781               test $i != 17 # 1/2 MB should be enough
782       do
783         i=`expr $i + 1`
784         teststring=$teststring$teststring
785       done
786       teststring=
787       # Add a significant safety factor because C++ compilers can tack on massive
788       # amounts of additional arguments before passing them to the linker.
789       # It appears as though 1/2 is a usable value.
790       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
791     fi
792     ;;
793   esac
795 if test -n $lt_cv_sys_max_cmd_len ; then
796   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
797 else
798   AC_MSG_RESULT(none)
800 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
803 # _LT_AC_CHECK_DLFCN
804 # ------------------
805 AC_DEFUN([_LT_AC_CHECK_DLFCN],
806 [AC_CHECK_HEADERS(dlfcn.h)dnl
807 ])# _LT_AC_CHECK_DLFCN
810 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
811 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
812 # ---------------------------------------------------------------------
813 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
814 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
815 if test "$cross_compiling" = yes; then :
816   [$4]
817 else
818   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
819   lt_status=$lt_dlunknown
820   cat > conftest.$ac_ext <<EOF
821 [#line __oline__ "configure"
822 #include "confdefs.h"
824 #if HAVE_DLFCN_H
825 #include <dlfcn.h>
826 #endif
828 #include <stdio.h>
830 #ifdef RTLD_GLOBAL
831 #  define LT_DLGLOBAL           RTLD_GLOBAL
832 #else
833 #  ifdef DL_GLOBAL
834 #    define LT_DLGLOBAL         DL_GLOBAL
835 #  else
836 #    define LT_DLGLOBAL         0
837 #  endif
838 #endif
840 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
841    find out it does not work in some platform. */
842 #ifndef LT_DLLAZY_OR_NOW
843 #  ifdef RTLD_LAZY
844 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
845 #  else
846 #    ifdef DL_LAZY
847 #      define LT_DLLAZY_OR_NOW          DL_LAZY
848 #    else
849 #      ifdef RTLD_NOW
850 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
851 #      else
852 #        ifdef DL_NOW
853 #          define LT_DLLAZY_OR_NOW      DL_NOW
854 #        else
855 #          define LT_DLLAZY_OR_NOW      0
856 #        endif
857 #      endif
858 #    endif
859 #  endif
860 #endif
862 #ifdef __cplusplus
863 extern "C" void exit (int);
864 #endif
866 void fnord() { int i=42;}
867 int main ()
869   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
870   int status = $lt_dlunknown;
872   if (self)
873     {
874       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
875       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
876       /* dlclose (self); */
877     }
878   else
879     puts (dlerror ());
881     exit (status);
884   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
885     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
886     lt_status=$?
887     case x$lt_status in
888       x$lt_dlno_uscore) $1 ;;
889       x$lt_dlneed_uscore) $2 ;;
890       x$lt_dlunknown|x*) $3 ;;
891     esac
892   else :
893     # compilation failed
894     $3
895   fi
897 rm -fr conftest*
898 ])# _LT_AC_TRY_DLOPEN_SELF
901 # AC_LIBTOOL_DLOPEN_SELF
902 # ----------------------
903 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
904 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
905 if test "x$enable_dlopen" != xyes; then
906   enable_dlopen=unknown
907   enable_dlopen_self=unknown
908   enable_dlopen_self_static=unknown
909 else
910   lt_cv_dlopen=no
911   lt_cv_dlopen_libs=
913   case $host_os in
914   beos*)
915     lt_cv_dlopen="load_add_on"
916     lt_cv_dlopen_libs=
917     lt_cv_dlopen_self=yes
918     ;;
920   mingw* | pw32*)
921     lt_cv_dlopen="LoadLibrary"
922     lt_cv_dlopen_libs=
923    ;;
925   cygwin*)
926     lt_cv_dlopen="dlopen"
927     lt_cv_dlopen_libs=
928    ;;
930   darwin*)
931   # if libdl is installed we need to link against it
932     AC_CHECK_LIB([dl], [dlopen],
933                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
934     lt_cv_dlopen="dyld"
935     lt_cv_dlopen_libs=
936     lt_cv_dlopen_self=yes
937     ])
938    ;;
940   *)
941     AC_CHECK_FUNC([shl_load],
942           [lt_cv_dlopen="shl_load"],
943       [AC_CHECK_LIB([dld], [shl_load],
944             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
945         [AC_CHECK_FUNC([dlopen],
946               [lt_cv_dlopen="dlopen"],
947           [AC_CHECK_LIB([dl], [dlopen],
948                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
949             [AC_CHECK_LIB([svld], [dlopen],
950                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
951               [AC_CHECK_LIB([dld], [dld_link],
952                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
953               ])
954             ])
955           ])
956         ])
957       ])
958     ;;
959   esac
961   if test "x$lt_cv_dlopen" != xno; then
962     enable_dlopen=yes
963   else
964     enable_dlopen=no
965   fi
967   case $lt_cv_dlopen in
968   dlopen)
969     save_CPPFLAGS="$CPPFLAGS"
970     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
972     save_LDFLAGS="$LDFLAGS"
973     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
975     save_LIBS="$LIBS"
976     LIBS="$lt_cv_dlopen_libs $LIBS"
978     AC_CACHE_CHECK([whether a program can dlopen itself],
979           lt_cv_dlopen_self, [dnl
980           _LT_AC_TRY_DLOPEN_SELF(
981             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
982             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
983     ])
985     if test "x$lt_cv_dlopen_self" = xyes; then
986       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
987       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
988           lt_cv_dlopen_self_static, [dnl
989           _LT_AC_TRY_DLOPEN_SELF(
990             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
991             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
992       ])
993     fi
995     CPPFLAGS="$save_CPPFLAGS"
996     LDFLAGS="$save_LDFLAGS"
997     LIBS="$save_LIBS"
998     ;;
999   esac
1001   case $lt_cv_dlopen_self in
1002   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1003   *) enable_dlopen_self=unknown ;;
1004   esac
1006   case $lt_cv_dlopen_self_static in
1007   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1008   *) enable_dlopen_self_static=unknown ;;
1009   esac
1011 ])# AC_LIBTOOL_DLOPEN_SELF
1014 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1015 # ---------------------------------
1016 # Check to see if options -c and -o are simultaneously supported by compiler
1017 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1018 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1019 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1020 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1021   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1022   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1023    $rm -r conftest 2>/dev/null
1024    mkdir conftest
1025    cd conftest
1026    mkdir out
1027    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1029    lt_compiler_flag="-o out/conftest2.$ac_objext"
1030    # Insert the option either (1) after the last *FLAGS variable, or
1031    # (2) before a word containing "conftest.", or (3) at the end.
1032    # Note that $ac_compile itself does not contain backslashes and begins
1033    # with a dollar sign (not a hyphen), so the echo should work correctly.
1034    lt_compile=`echo "$ac_compile" | $SED \
1035    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1036    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1037    -e 's:$: $lt_compiler_flag:'`
1038    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1039    (eval "$lt_compile" 2>out/conftest.err)
1040    ac_status=$?
1041    cat out/conftest.err >&AS_MESSAGE_LOG_FD
1042    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1043    if (exit $ac_status) && test -s out/conftest2.$ac_objext
1044    then
1045      # The compiler can only warn and ignore the option if not recognized
1046      # So say no if there are warnings
1047      $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1048      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1049      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1050        _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1051      fi
1052    fi
1053    chmod u+w . 2>&AS_MESSAGE_LOG_FD
1054    $rm conftest*
1055    # SGI C++ compiler will create directory out/ii_files/ for
1056    # template instantiation
1057    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1058    $rm out/* && rmdir out
1059    cd ..
1060    rmdir conftest
1061    $rm conftest*
1063 ])# AC_LIBTOOL_PROG_CC_C_O
1066 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1067 # -----------------------------------------
1068 # Check to see if we can do hard links to lock some files if needed
1069 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1070 [AC_REQUIRE([_LT_AC_LOCK])dnl
1072 hard_links="nottested"
1073 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1074   # do not overwrite the value of need_locks provided by the user
1075   AC_MSG_CHECKING([if we can lock with hard links])
1076   hard_links=yes
1077   $rm conftest*
1078   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1079   touch conftest.a
1080   ln conftest.a conftest.b 2>&5 || hard_links=no
1081   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1082   AC_MSG_RESULT([$hard_links])
1083   if test "$hard_links" = no; then
1084     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1085     need_locks=warn
1086   fi
1087 else
1088   need_locks=no
1090 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1093 # AC_LIBTOOL_OBJDIR
1094 # -----------------
1095 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1096 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1097 [rm -f .libs 2>/dev/null
1098 mkdir .libs 2>/dev/null
1099 if test -d .libs; then
1100   lt_cv_objdir=.libs
1101 else
1102   # MS-DOS does not allow filenames that begin with a dot.
1103   lt_cv_objdir=_libs
1105 rmdir .libs 2>/dev/null])
1106 objdir=$lt_cv_objdir
1107 ])# AC_LIBTOOL_OBJDIR
1110 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1111 # ----------------------------------------------
1112 # Check hardcoding attributes.
1113 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1114 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1115 _LT_AC_TAGVAR(hardcode_action, $1)=
1116 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1117    test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1118    test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1120   # We can hardcode non-existant directories.
1121   if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1122      # If the only mechanism to avoid hardcoding is shlibpath_var, we
1123      # have to relink, otherwise we might link with an installed library
1124      # when we should be linking with a yet-to-be-installed one
1125      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1126      test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1127     # Linking always hardcodes the temporary library directory.
1128     _LT_AC_TAGVAR(hardcode_action, $1)=relink
1129   else
1130     # We can link without hardcoding, and we can hardcode nonexisting dirs.
1131     _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1132   fi
1133 else
1134   # We cannot hardcode anything, or else we can only hardcode existing
1135   # directories.
1136   _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1138 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1140 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1141   # Fast installation is not supported
1142   enable_fast_install=no
1143 elif test "$shlibpath_overrides_runpath" = yes ||
1144      test "$enable_shared" = no; then
1145   # Fast installation is not necessary
1146   enable_fast_install=needless
1148 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1151 # AC_LIBTOOL_SYS_LIB_STRIP
1152 # ------------------------
1153 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1154 [striplib=
1155 old_striplib=
1156 AC_MSG_CHECKING([whether stripping libraries is possible])
1157 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1158   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1159   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1160   AC_MSG_RESULT([yes])
1161 else
1162 # FIXME - insert some real tests, host_os isn't really good enough
1163   case $host_os in
1164    darwin*)
1165        if test -n "$STRIP" ; then
1166          striplib="$STRIP -x"
1167          old_striplib="$STRIP -S"
1168          AC_MSG_RESULT([yes])
1169        else
1170   AC_MSG_RESULT([no])
1172        ;;
1173    *)
1174   AC_MSG_RESULT([no])
1175     ;;
1176   esac
1178 ])# AC_LIBTOOL_SYS_LIB_STRIP
1181 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1182 # -----------------------------
1183 # PORTME Fill in your ld.so characteristics
1184 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1185 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1186 AC_MSG_CHECKING([dynamic linker characteristics])
1187 library_names_spec=
1188 libname_spec='lib$name'
1189 soname_spec=
1190 shrext_cmds=".so"
1191 postinstall_cmds=
1192 postuninstall_cmds=
1193 finish_cmds=
1194 finish_eval=
1195 shlibpath_var=
1196 shlibpath_overrides_runpath=unknown
1197 version_type=none
1198 dynamic_linker="$host_os ld.so"
1199 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1200 m4_if($1,[],[
1201 if test "$GCC" = yes; then
1202   case $host_os in
1203     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1204     *) lt_awk_arg="/^libraries:/" ;;
1205   esac
1206   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1207   if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
1208     # if the path contains ";" then we assume it to be the separator
1209     # otherwise default to the standard path separator (i.e. ":") - it is
1210     # assumed that no part of a normal pathname contains ";" but that should
1211     # okay in the real world where ";" in dirpaths is itself problematic.
1212     lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1213   else
1214     lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1215   fi
1216   # Ok, now we have the path, separated by spaces, we can step through it
1217   # and add multilib dir if necessary.
1218   lt_tmp_lt_search_path_spec=
1219   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1220   for lt_sys_path in $lt_search_path_spec; do
1221     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1222       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1223     else
1224       test -d "$lt_sys_path" && \
1225         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1226     fi
1227   done
1228   lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
1229 BEGIN {RS=" "; FS="/|\n";} {
1230   lt_foo="";
1231   lt_count=0;
1232   for (lt_i = NF; lt_i > 0; lt_i--) {
1233     if ($lt_i != "" && $lt_i != ".") {
1234       if ($lt_i == "..") {
1235         lt_count++;
1236       } else {
1237         if (lt_count == 0) {
1238           lt_foo="/" $lt_i lt_foo;
1239         } else {
1240           lt_count--;
1241         }
1242       }
1243     }
1244   }
1245   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1246   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1248   sys_lib_search_path_spec=`echo $lt_search_path_spec`
1249 else
1250   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1251 fi])
1252 need_lib_prefix=unknown
1253 hardcode_into_libs=no
1255 # when you set need_version to no, make sure it does not cause -set_version
1256 # flags to be left without arguments
1257 need_version=unknown
1259 case $host_os in
1260 aix3*)
1261   version_type=linux
1262   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1263   shlibpath_var=LIBPATH
1265   # AIX 3 has no versioning support, so we append a major version to the name.
1266   soname_spec='${libname}${release}${shared_ext}$major'
1267   ;;
1269 aix4* | aix5*)
1270   version_type=linux
1271   need_lib_prefix=no
1272   need_version=no
1273   hardcode_into_libs=yes
1274   if test "$host_cpu" = ia64; then
1275     # AIX 5 supports IA64
1276     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1277     shlibpath_var=LD_LIBRARY_PATH
1278   else
1279     # With GCC up to 2.95.x, collect2 would create an import file
1280     # for dependence libraries.  The import file would start with
1281     # the line `#! .'.  This would cause the generated library to
1282     # depend on `.', always an invalid library.  This was fixed in
1283     # development snapshots of GCC prior to 3.0.
1284     case $host_os in
1285       aix4 | aix4.[[01]] | aix4.[[01]].*)
1286       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1287            echo ' yes '
1288            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1289         :
1290       else
1291         can_build_shared=no
1292       fi
1293       ;;
1294     esac
1295     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1296     # soname into executable. Probably we can add versioning support to
1297     # collect2, so additional links can be useful in future.
1298     if test "$aix_use_runtimelinking" = yes; then
1299       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1300       # instead of lib<name>.a to let people know that these are not
1301       # typical AIX shared libraries.
1302       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1303     else
1304       # We preserve .a as extension for shared libraries through AIX4.2
1305       # and later when we are not doing run time linking.
1306       library_names_spec='${libname}${release}.a $libname.a'
1307       soname_spec='${libname}${release}${shared_ext}$major'
1308     fi
1309     shlibpath_var=LIBPATH
1310   fi
1311   ;;
1313 amigaos*)
1314   library_names_spec='$libname.ixlibrary $libname.a'
1315   # Create ${libname}_ixlibrary.a entries in /sys/libs.
1316   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'
1317   ;;
1319 beos*)
1320   library_names_spec='${libname}${shared_ext}'
1321   dynamic_linker="$host_os ld.so"
1322   shlibpath_var=LIBRARY_PATH
1323   ;;
1325 bsdi[[45]]*)
1326   version_type=linux
1327   need_version=no
1328   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1329   soname_spec='${libname}${release}${shared_ext}$major'
1330   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1331   shlibpath_var=LD_LIBRARY_PATH
1332   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1333   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1334   # the default ld.so.conf also contains /usr/contrib/lib and
1335   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1336   # libtool to hard-code these into programs
1337   ;;
1339 cygwin* | mingw* | pw32*)
1340   version_type=windows
1341   shrext_cmds=".dll"
1342   need_version=no
1343   need_lib_prefix=no
1345   case $GCC,$host_os in
1346   yes,cygwin* | yes,mingw* | yes,pw32*)
1347     library_names_spec='$libname.dll.a'
1348     # DLL is installed to $(libdir)/../bin by postinstall_cmds
1349     postinstall_cmds='base_file=`basename \${file}`~
1350       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1351       dldir=$destdir/`dirname \$dlpath`~
1352       test -d \$dldir || mkdir -p \$dldir~
1353       $install_prog $dir/$dlname \$dldir/$dlname~
1354       chmod a+x \$dldir/$dlname'
1355     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1356       dlpath=$dir/\$dldll~
1357        $rm \$dlpath'
1358     shlibpath_overrides_runpath=yes
1360     case $host_os in
1361     cygwin*)
1362       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1363       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1364       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1365       ;;
1366     mingw*)
1367       # MinGW DLLs use traditional 'lib' prefix
1368       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1369       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1370       if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1371         # It is most probably a Windows format PATH printed by
1372         # mingw gcc, but we are running on Cygwin. Gcc prints its search
1373         # path with ; separators, and with drive letters. We can handle the
1374         # drive letters (cygwin fileutils understands them), so leave them,
1375         # especially as we might pass files found there to a mingw objdump,
1376         # which wouldn't understand a cygwinified path. Ahh.
1377         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1378       else
1379         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1380       fi
1381       ;;
1382     pw32*)
1383       # pw32 DLLs use 'pw' prefix rather than 'lib'
1384       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1385       ;;
1386     esac
1387     ;;
1389   *)
1390     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1391     ;;
1392   esac
1393   dynamic_linker='Win32 ld.exe'
1394   # FIXME: first we should search . and the directory the executable is in
1395   shlibpath_var=PATH
1396   ;;
1398 darwin* | rhapsody*)
1399   dynamic_linker="$host_os dyld"
1400   version_type=darwin
1401   need_lib_prefix=no
1402   need_version=no
1403   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1404   soname_spec='${libname}${release}${major}$shared_ext'
1405   shlibpath_overrides_runpath=yes
1406   shlibpath_var=DYLD_LIBRARY_PATH
1407   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1408   m4_if([$1], [],[
1409   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
1410   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1411   ;;
1413 dgux*)
1414   version_type=linux
1415   need_lib_prefix=no
1416   need_version=no
1417   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1418   soname_spec='${libname}${release}${shared_ext}$major'
1419   shlibpath_var=LD_LIBRARY_PATH
1420   ;;
1422 freebsd1*)
1423   dynamic_linker=no
1424   ;;
1426 freebsd* | dragonfly*)
1427   # DragonFly does not have aout.  When/if they implement a new
1428   # versioning mechanism, adjust this.
1429   if test -x /usr/bin/objformat; then
1430     objformat=`/usr/bin/objformat`
1431   else
1432     case $host_os in
1433     freebsd[[123]]*) objformat=aout ;;
1434     *) objformat=elf ;;
1435     esac
1436   fi
1437   version_type=freebsd-$objformat
1438   case $version_type in
1439     freebsd-elf*)
1440       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1441       need_version=no
1442       need_lib_prefix=no
1443       ;;
1444     freebsd-*)
1445       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1446       need_version=yes
1447       ;;
1448   esac
1449   shlibpath_var=LD_LIBRARY_PATH
1450   case $host_os in
1451   freebsd2*)
1452     shlibpath_overrides_runpath=yes
1453     ;;
1454   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1455     shlibpath_overrides_runpath=yes
1456     hardcode_into_libs=yes
1457     ;;
1458   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1459   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1460     shlibpath_overrides_runpath=no
1461     hardcode_into_libs=yes
1462     ;;
1463   *) # from 4.6 on, and DragonFly
1464     shlibpath_overrides_runpath=yes
1465     hardcode_into_libs=yes
1466     ;;
1467   esac
1468   ;;
1470 gnu*)
1471   version_type=linux
1472   need_lib_prefix=no
1473   need_version=no
1474   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1475   soname_spec='${libname}${release}${shared_ext}$major'
1476   shlibpath_var=LD_LIBRARY_PATH
1477   hardcode_into_libs=yes
1478   ;;
1480 hpux9* | hpux10* | hpux11*)
1481   # Give a soname corresponding to the major version so that dld.sl refuses to
1482   # link against other versions.
1483   version_type=sunos
1484   need_lib_prefix=no
1485   need_version=no
1486   case $host_cpu in
1487   ia64*)
1488     shrext_cmds='.so'
1489     hardcode_into_libs=yes
1490     dynamic_linker="$host_os dld.so"
1491     shlibpath_var=LD_LIBRARY_PATH
1492     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1493     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1494     soname_spec='${libname}${release}${shared_ext}$major'
1495     if test "X$HPUX_IA64_MODE" = X32; then
1496       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1497     else
1498       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1499     fi
1500     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1501     ;;
1502    hppa*64*)
1503      shrext_cmds='.sl'
1504      hardcode_into_libs=yes
1505      dynamic_linker="$host_os dld.sl"
1506      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1507      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1508      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1509      soname_spec='${libname}${release}${shared_ext}$major'
1510      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1511      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1512      ;;
1513    *)
1514     shrext_cmds='.sl'
1515     dynamic_linker="$host_os dld.sl"
1516     shlibpath_var=SHLIB_PATH
1517     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1518     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1519     soname_spec='${libname}${release}${shared_ext}$major'
1520     ;;
1521   esac
1522   # HP-UX runs *really* slowly unless shared libraries are mode 555.
1523   postinstall_cmds='chmod 555 $lib'
1524   ;;
1526 interix[[3-9]]*)
1527   version_type=linux
1528   need_lib_prefix=no
1529   need_version=no
1530   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1531   soname_spec='${libname}${release}${shared_ext}$major'
1532   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1533   shlibpath_var=LD_LIBRARY_PATH
1534   shlibpath_overrides_runpath=no
1535   hardcode_into_libs=yes
1536   ;;
1538 irix5* | irix6* | nonstopux*)
1539   case $host_os in
1540     nonstopux*) version_type=nonstopux ;;
1541     *)
1542         if test "$lt_cv_prog_gnu_ld" = yes; then
1543                 version_type=linux
1544         else
1545                 version_type=irix
1546         fi ;;
1547   esac
1548   need_lib_prefix=no
1549   need_version=no
1550   soname_spec='${libname}${release}${shared_ext}$major'
1551   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1552   case $host_os in
1553   irix5* | nonstopux*)
1554     libsuff= shlibsuff=
1555     ;;
1556   *)
1557     case $LD in # libtool.m4 will add one of these switches to LD
1558     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1559       libsuff= shlibsuff= libmagic=32-bit;;
1560     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1561       libsuff=32 shlibsuff=N32 libmagic=N32;;
1562     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1563       libsuff=64 shlibsuff=64 libmagic=64-bit;;
1564     *) libsuff= shlibsuff= libmagic=never-match;;
1565     esac
1566     ;;
1567   esac
1568   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1569   shlibpath_overrides_runpath=no
1570   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1571   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1572   hardcode_into_libs=yes
1573   ;;
1575 # No shared lib support for Linux oldld, aout, or coff.
1576 linux*oldld* | linux*aout* | linux*coff*)
1577   dynamic_linker=no
1578   ;;
1580 # This must be Linux ELF.
1581 linux* | k*bsd*-gnu)
1582   version_type=linux
1583   need_lib_prefix=no
1584   need_version=no
1585   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1586   soname_spec='${libname}${release}${shared_ext}$major'
1587   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1588   shlibpath_var=LD_LIBRARY_PATH
1589   shlibpath_overrides_runpath=no
1590   # This implies no fast_install, which is unacceptable.
1591   # Some rework will be needed to allow for fast_install
1592   # before this can be enabled.
1593   hardcode_into_libs=yes
1595   # Append ld.so.conf contents to the search path
1596   if test -f /etc/ld.so.conf; then
1597     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1598     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1599   fi
1601   # We used to test for /lib/ld.so.1 and disable shared libraries on
1602   # powerpc, because MkLinux only supported shared libraries with the
1603   # GNU dynamic linker.  Since this was broken with cross compilers,
1604   # most powerpc-linux boxes support dynamic linking these days and
1605   # people can always --disable-shared, the test was removed, and we
1606   # assume the GNU/Linux dynamic linker is in use.
1607   dynamic_linker='GNU/Linux ld.so'
1608   ;;
1610 netbsd*)
1611   version_type=sunos
1612   need_lib_prefix=no
1613   need_version=no
1614   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1615     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1616     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1617     dynamic_linker='NetBSD (a.out) ld.so'
1618   else
1619     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1620     soname_spec='${libname}${release}${shared_ext}$major'
1621     dynamic_linker='NetBSD ld.elf_so'
1622   fi
1623   shlibpath_var=LD_LIBRARY_PATH
1624   shlibpath_overrides_runpath=yes
1625   hardcode_into_libs=yes
1626   ;;
1628 newsos6)
1629   version_type=linux
1630   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1631   shlibpath_var=LD_LIBRARY_PATH
1632   shlibpath_overrides_runpath=yes
1633   ;;
1635 nto-qnx*)
1636   version_type=linux
1637   need_lib_prefix=no
1638   need_version=no
1639   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1640   soname_spec='${libname}${release}${shared_ext}$major'
1641   shlibpath_var=LD_LIBRARY_PATH
1642   shlibpath_overrides_runpath=yes
1643   ;;
1645 openbsd*)
1646   version_type=sunos
1647   sys_lib_dlsearch_path_spec="/usr/lib"
1648   need_lib_prefix=no
1649   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1650   case $host_os in
1651     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1652     *)                         need_version=no  ;;
1653   esac
1654   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1655   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1656   shlibpath_var=LD_LIBRARY_PATH
1657   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1658     case $host_os in
1659       openbsd2.[[89]] | openbsd2.[[89]].*)
1660         shlibpath_overrides_runpath=no
1661         ;;
1662       *)
1663         shlibpath_overrides_runpath=yes
1664         ;;
1665       esac
1666   else
1667     shlibpath_overrides_runpath=yes
1668   fi
1669   ;;
1671 os2*)
1672   libname_spec='$name'
1673   shrext_cmds=".dll"
1674   need_lib_prefix=no
1675   library_names_spec='$libname${shared_ext} $libname.a'
1676   dynamic_linker='OS/2 ld.exe'
1677   shlibpath_var=LIBPATH
1678   ;;
1680 osf3* | osf4* | osf5*)
1681   version_type=osf
1682   need_lib_prefix=no
1683   need_version=no
1684   soname_spec='${libname}${release}${shared_ext}$major'
1685   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1686   shlibpath_var=LD_LIBRARY_PATH
1687   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1688   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1689   ;;
1691 rdos*)
1692   dynamic_linker=no
1693   ;;
1695 solaris*)
1696   version_type=linux
1697   need_lib_prefix=no
1698   need_version=no
1699   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1700   soname_spec='${libname}${release}${shared_ext}$major'
1701   shlibpath_var=LD_LIBRARY_PATH
1702   shlibpath_overrides_runpath=yes
1703   hardcode_into_libs=yes
1704   # ldd complains unless libraries are executable
1705   postinstall_cmds='chmod +x $lib'
1706   ;;
1708 sunos4*)
1709   version_type=sunos
1710   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1711   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1712   shlibpath_var=LD_LIBRARY_PATH
1713   shlibpath_overrides_runpath=yes
1714   if test "$with_gnu_ld" = yes; then
1715     need_lib_prefix=no
1716   fi
1717   need_version=yes
1718   ;;
1720 sysv4 | sysv4.3*)
1721   version_type=linux
1722   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1723   soname_spec='${libname}${release}${shared_ext}$major'
1724   shlibpath_var=LD_LIBRARY_PATH
1725   case $host_vendor in
1726     sni)
1727       shlibpath_overrides_runpath=no
1728       need_lib_prefix=no
1729       export_dynamic_flag_spec='${wl}-Blargedynsym'
1730       runpath_var=LD_RUN_PATH
1731       ;;
1732     siemens)
1733       need_lib_prefix=no
1734       ;;
1735     motorola)
1736       need_lib_prefix=no
1737       need_version=no
1738       shlibpath_overrides_runpath=no
1739       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1740       ;;
1741   esac
1742   ;;
1744 sysv4*MP*)
1745   if test -d /usr/nec ;then
1746     version_type=linux
1747     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1748     soname_spec='$libname${shared_ext}.$major'
1749     shlibpath_var=LD_LIBRARY_PATH
1750   fi
1751   ;;
1753 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1754   version_type=freebsd-elf
1755   need_lib_prefix=no
1756   need_version=no
1757   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1758   soname_spec='${libname}${release}${shared_ext}$major'
1759   shlibpath_var=LD_LIBRARY_PATH
1760   hardcode_into_libs=yes
1761   if test "$with_gnu_ld" = yes; then
1762     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1763     shlibpath_overrides_runpath=no
1764   else
1765     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1766     shlibpath_overrides_runpath=yes
1767     case $host_os in
1768       sco3.2v5*)
1769         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1770         ;;
1771     esac
1772   fi
1773   sys_lib_dlsearch_path_spec='/usr/lib'
1774   ;;
1776 uts4*)
1777   version_type=linux
1778   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1779   soname_spec='${libname}${release}${shared_ext}$major'
1780   shlibpath_var=LD_LIBRARY_PATH
1781   ;;
1784   dynamic_linker=no
1785   ;;
1786 esac
1787 AC_MSG_RESULT([$dynamic_linker])
1788 test "$dynamic_linker" = no && can_build_shared=no
1790 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1791 if test "$GCC" = yes; then
1792   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1794 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1797 # _LT_AC_TAGCONFIG
1798 # ----------------
1799 AC_DEFUN([_LT_AC_TAGCONFIG],
1800 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1801 AC_ARG_WITH([tags],
1802     [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1803         [include additional configurations @<:@automatic@:>@])],
1804     [tagnames="$withval"])
1806 if test -f "$ltmain" && test -n "$tagnames"; then
1807   if test ! -f "${ofile}"; then
1808     AC_MSG_WARN([output file `$ofile' does not exist])
1809   fi
1811   if test -z "$LTCC"; then
1812     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1813     if test -z "$LTCC"; then
1814       AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1815     else
1816       AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1817     fi
1818   fi
1819   if test -z "$LTCFLAGS"; then
1820     eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1821   fi
1823   # Extract list of available tagged configurations in $ofile.
1824   # Note that this assumes the entire list is on one line.
1825   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1827   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1828   for tagname in $tagnames; do
1829     IFS="$lt_save_ifs"
1830     # Check whether tagname contains only valid characters
1831     case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1832     "") ;;
1833     *)  AC_MSG_ERROR([invalid tag name: $tagname])
1834         ;;
1835     esac
1837     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1838     then
1839       AC_MSG_ERROR([tag name \"$tagname\" already exists])
1840     fi
1842     # Update the list of available tags.
1843     if test -n "$tagname"; then
1844       echo appending configuration tag \"$tagname\" to $ofile
1846       case $tagname in
1847       RC)
1848         AC_LIBTOOL_LANG_RC_CONFIG
1849         ;;
1851       *)
1852         AC_MSG_ERROR([Unsupported tag name: $tagname])
1853         ;;
1854       esac
1856       # Append the new tag name to the list of available tags.
1857       if test -n "$tagname" ; then
1858       available_tags="$available_tags $tagname"
1859     fi
1860     fi
1861   done
1862   IFS="$lt_save_ifs"
1864   # Now substitute the updated list of available tags.
1865   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1866     mv "${ofile}T" "$ofile"
1867     chmod +x "$ofile"
1868   else
1869     rm -f "${ofile}T"
1870     AC_MSG_ERROR([unable to update list of available tagged configurations.])
1871   fi
1873 ])# _LT_AC_TAGCONFIG
1876 # AC_LIBTOOL_DLOPEN
1877 # -----------------
1878 # enable checks for dlopen support
1879 AC_DEFUN([AC_LIBTOOL_DLOPEN],
1880  [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1881 ])# AC_LIBTOOL_DLOPEN
1884 # AC_LIBTOOL_WIN32_DLL
1885 # --------------------
1886 # declare package support for building win32 DLLs
1887 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1888 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1889 ])# AC_LIBTOOL_WIN32_DLL
1892 # AC_ENABLE_SHARED([DEFAULT])
1893 # ---------------------------
1894 # implement the --enable-shared flag
1895 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1896 AC_DEFUN([AC_ENABLE_SHARED],
1897 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1898 AC_ARG_ENABLE([shared],
1899     [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1900         [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1901     [p=${PACKAGE-default}
1902     case $enableval in
1903     yes) enable_shared=yes ;;
1904     no) enable_shared=no ;;
1905     *)
1906       enable_shared=no
1907       # Look at the argument we got.  We use all the common list separators.
1908       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1909       for pkg in $enableval; do
1910         IFS="$lt_save_ifs"
1911         if test "X$pkg" = "X$p"; then
1912           enable_shared=yes
1913         fi
1914       done
1915       IFS="$lt_save_ifs"
1916       ;;
1917     esac],
1918     [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1919 ])# AC_ENABLE_SHARED
1922 # AC_DISABLE_SHARED
1923 # -----------------
1924 # set the default shared flag to --disable-shared
1925 AC_DEFUN([AC_DISABLE_SHARED],
1926 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1927 AC_ENABLE_SHARED(no)
1928 ])# AC_DISABLE_SHARED
1931 # AC_ENABLE_STATIC([DEFAULT])
1932 # ---------------------------
1933 # implement the --enable-static flag
1934 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1935 AC_DEFUN([AC_ENABLE_STATIC],
1936 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1937 AC_ARG_ENABLE([static],
1938     [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1939         [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1940     [p=${PACKAGE-default}
1941     case $enableval in
1942     yes) enable_static=yes ;;
1943     no) enable_static=no ;;
1944     *)
1945      enable_static=no
1946       # Look at the argument we got.  We use all the common list separators.
1947       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1948       for pkg in $enableval; do
1949         IFS="$lt_save_ifs"
1950         if test "X$pkg" = "X$p"; then
1951           enable_static=yes
1952         fi
1953       done
1954       IFS="$lt_save_ifs"
1955       ;;
1956     esac],
1957     [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1958 ])# AC_ENABLE_STATIC
1961 # AC_DISABLE_STATIC
1962 # -----------------
1963 # set the default static flag to --disable-static
1964 AC_DEFUN([AC_DISABLE_STATIC],
1965 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1966 AC_ENABLE_STATIC(no)
1967 ])# AC_DISABLE_STATIC
1970 # AC_ENABLE_FAST_INSTALL([DEFAULT])
1971 # ---------------------------------
1972 # implement the --enable-fast-install flag
1973 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1974 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1975 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1976 AC_ARG_ENABLE([fast-install],
1977     [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1978     [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1979     [p=${PACKAGE-default}
1980     case $enableval in
1981     yes) enable_fast_install=yes ;;
1982     no) enable_fast_install=no ;;
1983     *)
1984       enable_fast_install=no
1985       # Look at the argument we got.  We use all the common list separators.
1986       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1987       for pkg in $enableval; do
1988         IFS="$lt_save_ifs"
1989         if test "X$pkg" = "X$p"; then
1990           enable_fast_install=yes
1991         fi
1992       done
1993       IFS="$lt_save_ifs"
1994       ;;
1995     esac],
1996     [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
1997 ])# AC_ENABLE_FAST_INSTALL
2000 # AC_DISABLE_FAST_INSTALL
2001 # -----------------------
2002 # set the default to --disable-fast-install
2003 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2004 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2005 AC_ENABLE_FAST_INSTALL(no)
2006 ])# AC_DISABLE_FAST_INSTALL
2009 # AC_LIBTOOL_PICMODE([MODE])
2010 # --------------------------
2011 # implement the --with-pic flag
2012 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2013 AC_DEFUN([AC_LIBTOOL_PICMODE],
2014 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2015 pic_mode=ifelse($#,1,$1,default)
2016 ])# AC_LIBTOOL_PICMODE
2019 # AC_PROG_EGREP
2020 # -------------
2021 # This is predefined starting with Autoconf 2.54, so this conditional
2022 # definition can be removed once we require Autoconf 2.54 or later.
2023 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2024 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2025    [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2026     then ac_cv_prog_egrep='grep -E'
2027     else ac_cv_prog_egrep='egrep'
2028     fi])
2029  EGREP=$ac_cv_prog_egrep
2030  AC_SUBST([EGREP])
2031 ])])
2034 # AC_PATH_TOOL_PREFIX
2035 # -------------------
2036 # find a file program which can recognize shared library
2037 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2038 [AC_REQUIRE([AC_PROG_EGREP])dnl
2039 AC_MSG_CHECKING([for $1])
2040 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2041 [case $MAGIC_CMD in
2042 [[\\/*] |  ?:[\\/]*])
2043   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2044   ;;
2046   lt_save_MAGIC_CMD="$MAGIC_CMD"
2047   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2048 dnl $ac_dummy forces splitting on constant user-supplied paths.
2049 dnl POSIX.2 word splitting is done only on the output of word expansions,
2050 dnl not every word.  This closes a longstanding sh security hole.
2051   ac_dummy="ifelse([$2], , $PATH, [$2])"
2052   for ac_dir in $ac_dummy; do
2053     IFS="$lt_save_ifs"
2054     test -z "$ac_dir" && ac_dir=.
2055     if test -f $ac_dir/$1; then
2056       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2057       if test -n "$file_magic_test_file"; then
2058         case $deplibs_check_method in
2059         "file_magic "*)
2060           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2061           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2062           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2063             $EGREP "$file_magic_regex" > /dev/null; then
2064             :
2065           else
2066             cat <<EOF 1>&2
2068 *** Warning: the command libtool uses to detect shared libraries,
2069 *** $file_magic_cmd, produces output that libtool cannot recognize.
2070 *** The result is that libtool may fail to recognize shared libraries
2071 *** as such.  This will affect the creation of libtool libraries that
2072 *** depend on shared libraries, but programs linked with such libtool
2073 *** libraries will work regardless of this problem.  Nevertheless, you
2074 *** may want to report the problem to your system manager and/or to
2075 *** bug-libtool@gnu.org
2078           fi ;;
2079         esac
2080       fi
2081       break
2082     fi
2083   done
2084   IFS="$lt_save_ifs"
2085   MAGIC_CMD="$lt_save_MAGIC_CMD"
2086   ;;
2087 esac])
2088 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2089 if test -n "$MAGIC_CMD"; then
2090   AC_MSG_RESULT($MAGIC_CMD)
2091 else
2092   AC_MSG_RESULT(no)
2094 ])# AC_PATH_TOOL_PREFIX
2097 # AC_PATH_MAGIC
2098 # -------------
2099 # find a file program which can recognize a shared library
2100 AC_DEFUN([AC_PATH_MAGIC],
2101 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2102 if test -z "$lt_cv_path_MAGIC_CMD"; then
2103   if test -n "$ac_tool_prefix"; then
2104     AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2105   else
2106     MAGIC_CMD=:
2107   fi
2109 ])# AC_PATH_MAGIC
2112 # AC_PROG_LD
2113 # ----------
2114 # find the pathname to the GNU or non-GNU linker
2115 AC_DEFUN([AC_PROG_LD],
2116 [AC_ARG_WITH([gnu-ld],
2117     [AC_HELP_STRING([--with-gnu-ld],
2118         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2119     [test "$withval" = no || with_gnu_ld=yes],
2120     [with_gnu_ld=no])
2121 AC_REQUIRE([LT_AC_PROG_SED])dnl
2122 AC_REQUIRE([AC_PROG_CC])dnl
2123 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2124 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2125 ac_prog=ld
2126 if test "$GCC" = yes; then
2127   # Check if gcc -print-prog-name=ld gives a path.
2128   AC_MSG_CHECKING([for ld used by $CC])
2129   case $host in
2130   *-*-mingw*)
2131     # gcc leaves a trailing carriage return which upsets mingw
2132     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2133   *)
2134     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2135   esac
2136   case $ac_prog in
2137     # Accept absolute paths.
2138     [[\\/]]* | ?:[[\\/]]*)
2139       re_direlt='/[[^/]][[^/]]*/\.\./'
2140       # Canonicalize the pathname of ld
2141       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2142       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2143         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2144       done
2145       test -z "$LD" && LD="$ac_prog"
2146       ;;
2147   "")
2148     # If it fails, then pretend we aren't using GCC.
2149     ac_prog=ld
2150     ;;
2151   *)
2152     # If it is relative, then search for the first ld in PATH.
2153     with_gnu_ld=unknown
2154     ;;
2155   esac
2156 elif test "$with_gnu_ld" = yes; then
2157   AC_MSG_CHECKING([for GNU ld])
2158 else
2159   AC_MSG_CHECKING([for non-GNU ld])
2161 AC_CACHE_VAL(lt_cv_path_LD,
2162 [if test -z "$LD"; then
2163   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2164   for ac_dir in $PATH; do
2165     IFS="$lt_save_ifs"
2166     test -z "$ac_dir" && ac_dir=.
2167     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2168       lt_cv_path_LD="$ac_dir/$ac_prog"
2169       # Check to see if the program is GNU ld.  I'd rather use --version,
2170       # but apparently some variants of GNU ld only accept -v.
2171       # Break only if it was the GNU/non-GNU ld that we prefer.
2172       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2173       *GNU* | *'with BFD'*)
2174         test "$with_gnu_ld" != no && break
2175         ;;
2176       *)
2177         test "$with_gnu_ld" != yes && break
2178         ;;
2179       esac
2180     fi
2181   done
2182   IFS="$lt_save_ifs"
2183 else
2184   lt_cv_path_LD="$LD" # Let the user override the test with a path.
2185 fi])
2186 LD="$lt_cv_path_LD"
2187 if test -n "$LD"; then
2188   AC_MSG_RESULT($LD)
2189 else
2190   AC_MSG_RESULT(no)
2192 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2193 AC_PROG_LD_GNU
2194 ])# AC_PROG_LD
2197 # AC_PROG_LD_GNU
2198 # --------------
2199 AC_DEFUN([AC_PROG_LD_GNU],
2200 [AC_REQUIRE([AC_PROG_EGREP])dnl
2201 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2202 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2203 case `$LD -v 2>&1 </dev/null` in
2204 *GNU* | *'with BFD'*)
2205   lt_cv_prog_gnu_ld=yes
2206   ;;
2208   lt_cv_prog_gnu_ld=no
2209   ;;
2210 esac])
2211 with_gnu_ld=$lt_cv_prog_gnu_ld
2212 ])# AC_PROG_LD_GNU
2215 # AC_PROG_LD_RELOAD_FLAG
2216 # ----------------------
2217 # find reload flag for linker
2218 #   -- PORTME Some linkers may need a different reload flag.
2219 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2220 [AC_CACHE_CHECK([for $LD option to reload object files],
2221   lt_cv_ld_reload_flag,
2222   [lt_cv_ld_reload_flag='-r'])
2223 reload_flag=$lt_cv_ld_reload_flag
2224 case $reload_flag in
2225 "" | " "*) ;;
2226 *) reload_flag=" $reload_flag" ;;
2227 esac
2228 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2229 case $host_os in
2230   darwin*)
2231     if test "$GCC" = yes; then
2232       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2233     else
2234       reload_cmds='$LD$reload_flag -o $output$reload_objs'
2235     fi
2236     ;;
2237 esac
2238 ])# AC_PROG_LD_RELOAD_FLAG
2241 # AC_DEPLIBS_CHECK_METHOD
2242 # -----------------------
2243 # how to check for library dependencies
2244 #  -- PORTME fill in with the dynamic library characteristics
2245 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2246 [AC_CACHE_CHECK([how to recognize dependent libraries],
2247 lt_cv_deplibs_check_method,
2248 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2249 lt_cv_file_magic_test_file=
2250 lt_cv_deplibs_check_method='unknown'
2251 # Need to set the preceding variable on all platforms that support
2252 # interlibrary dependencies.
2253 # 'none' -- dependencies not supported.
2254 # `unknown' -- same as none, but documents that we really don't know.
2255 # 'pass_all' -- all dependencies passed with no checks.
2256 # 'test_compile' -- check by making test program.
2257 # 'file_magic [[regex]]' -- check by looking for files in library path
2258 # which responds to the $file_magic_cmd with a given extended regex.
2259 # If you have `file' or equivalent on your system and you're not sure
2260 # whether `pass_all' will *always* work, you probably want this one.
2262 case $host_os in
2263 aix4* | aix5*)
2264   lt_cv_deplibs_check_method=pass_all
2265   ;;
2267 beos*)
2268   lt_cv_deplibs_check_method=pass_all
2269   ;;
2271 bsdi[[45]]*)
2272   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2273   lt_cv_file_magic_cmd='/usr/bin/file -L'
2274   lt_cv_file_magic_test_file=/shlib/libc.so
2275   ;;
2277 cygwin*)
2278   # func_win32_libid is a shell function defined in ltmain.sh
2279   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2280   lt_cv_file_magic_cmd='func_win32_libid'
2281   ;;
2283 mingw* | pw32*)
2284   # Base MSYS/MinGW do not provide the 'file' command needed by
2285   # func_win32_libid shell function, so use a weaker test based on 'objdump',
2286   # unless we find 'file', for example because we are cross-compiling.
2287   if ( file / ) >/dev/null 2>&1; then
2288     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2289     lt_cv_file_magic_cmd='func_win32_libid'
2290   else
2291     lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2292     lt_cv_file_magic_cmd='$OBJDUMP -f'
2293   fi
2294   ;;
2296 darwin* | rhapsody*)
2297   lt_cv_deplibs_check_method=pass_all
2298   ;;
2300 freebsd* | dragonfly*)
2301   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2302     case $host_cpu in
2303     i*86 )
2304       # Not sure whether the presence of OpenBSD here was a mistake.
2305       # Let's accept both of them until this is cleared up.
2306       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2307       lt_cv_file_magic_cmd=/usr/bin/file
2308       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2309       ;;
2310     esac
2311   else
2312     lt_cv_deplibs_check_method=pass_all
2313   fi
2314   ;;
2316 gnu*)
2317   lt_cv_deplibs_check_method=pass_all
2318   ;;
2320 hpux10.20* | hpux11*)
2321   lt_cv_file_magic_cmd=/usr/bin/file
2322   case $host_cpu in
2323   ia64*)
2324     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2325     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2326     ;;
2327   hppa*64*)
2328     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
2329     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2330     ;;
2331   *)
2332     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2333     lt_cv_file_magic_test_file=/usr/lib/libc.sl
2334     ;;
2335   esac
2336   ;;
2338 interix[[3-9]]*)
2339   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2340   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2341   ;;
2343 irix5* | irix6* | nonstopux*)
2344   case $LD in
2345   *-32|*"-32 ") libmagic=32-bit;;
2346   *-n32|*"-n32 ") libmagic=N32;;
2347   *-64|*"-64 ") libmagic=64-bit;;
2348   *) libmagic=never-match;;
2349   esac
2350   lt_cv_deplibs_check_method=pass_all
2351   ;;
2353 # This must be Linux ELF.
2354 linux* | k*bsd*-gnu)
2355   lt_cv_deplibs_check_method=pass_all
2356   ;;
2358 netbsd*)
2359   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2360     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2361   else
2362     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2363   fi
2364   ;;
2366 newos6*)
2367   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2368   lt_cv_file_magic_cmd=/usr/bin/file
2369   lt_cv_file_magic_test_file=/usr/lib/libnls.so
2370   ;;
2372 nto-qnx*)
2373   lt_cv_deplibs_check_method=unknown
2374   ;;
2376 openbsd*)
2377   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2378     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2379   else
2380     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2381   fi
2382   ;;
2384 osf3* | osf4* | osf5*)
2385   lt_cv_deplibs_check_method=pass_all
2386   ;;
2388 rdos*)
2389   lt_cv_deplibs_check_method=pass_all
2390   ;;
2392 solaris*)
2393   lt_cv_deplibs_check_method=pass_all
2394   ;;
2396 sysv4 | sysv4.3*)
2397   case $host_vendor in
2398   motorola)
2399     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]]'
2400     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2401     ;;
2402   ncr)
2403     lt_cv_deplibs_check_method=pass_all
2404     ;;
2405   sequent)
2406     lt_cv_file_magic_cmd='/bin/file'
2407     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2408     ;;
2409   sni)
2410     lt_cv_file_magic_cmd='/bin/file'
2411     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2412     lt_cv_file_magic_test_file=/lib/libc.so
2413     ;;
2414   siemens)
2415     lt_cv_deplibs_check_method=pass_all
2416     ;;
2417   pc)
2418     lt_cv_deplibs_check_method=pass_all
2419     ;;
2420   esac
2421   ;;
2423 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2424   lt_cv_deplibs_check_method=pass_all
2425   ;;
2426 esac
2428 file_magic_cmd=$lt_cv_file_magic_cmd
2429 deplibs_check_method=$lt_cv_deplibs_check_method
2430 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2431 ])# AC_DEPLIBS_CHECK_METHOD
2434 # AC_PROG_NM
2435 # ----------
2436 # find the pathname to a BSD-compatible name lister
2437 AC_DEFUN([AC_PROG_NM],
2438 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2439 [if test -n "$NM"; then
2440   # Let the user override the test.
2441   lt_cv_path_NM="$NM"
2442 else
2443   lt_nm_to_check="${ac_tool_prefix}nm"
2444   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2445     lt_nm_to_check="$lt_nm_to_check nm"
2446   fi
2447   for lt_tmp_nm in $lt_nm_to_check; do
2448     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2449     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2450       IFS="$lt_save_ifs"
2451       test -z "$ac_dir" && ac_dir=.
2452       tmp_nm="$ac_dir/$lt_tmp_nm"
2453       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2454         # Check to see if the nm accepts a BSD-compat flag.
2455         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2456         #   nm: unknown option "B" ignored
2457         # Tru64's nm complains that /dev/null is an invalid object file
2458         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2459         */dev/null* | *'Invalid file or object type'*)
2460           lt_cv_path_NM="$tmp_nm -B"
2461           break
2462           ;;
2463         *)
2464           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2465           */dev/null*)
2466             lt_cv_path_NM="$tmp_nm -p"
2467             break
2468             ;;
2469           *)
2470             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2471             continue # so that we can try to find one that supports BSD flags
2472             ;;
2473           esac
2474           ;;
2475         esac
2476       fi
2477     done
2478     IFS="$lt_save_ifs"
2479   done
2480   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2481 fi])
2482 NM="$lt_cv_path_NM"
2483 ])# AC_PROG_NM
2486 # AC_CHECK_LIBM
2487 # -------------
2488 # check for math library
2489 AC_DEFUN([AC_CHECK_LIBM],
2490 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2491 LIBM=
2492 case $host in
2493 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2494   # These system don't have libm, or don't need it
2495   ;;
2496 *-ncr-sysv4.3*)
2497   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2498   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2499   ;;
2501   AC_CHECK_LIB(m, cos, LIBM="-lm")
2502   ;;
2503 esac
2504 ])# AC_CHECK_LIBM
2507 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2508 # -----------------------------------
2509 # sets LIBLTDL to the link flags for the libltdl convenience library and
2510 # LTDLINCL to the include flags for the libltdl header and adds
2511 # --enable-ltdl-convenience to the configure arguments.  Note that
2512 # AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2513 # it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
2514 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2515 # (note the single quotes!).  If your package is not flat and you're not
2516 # using automake, define top_builddir and top_srcdir appropriately in
2517 # the Makefiles.
2518 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2519 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2520   case $enable_ltdl_convenience in
2521   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2522   "") enable_ltdl_convenience=yes
2523       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2524   esac
2525   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2526   LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2527   # For backwards non-gettext consistent compatibility...
2528   INCLTDL="$LTDLINCL"
2529 ])# AC_LIBLTDL_CONVENIENCE
2532 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2533 # -----------------------------------
2534 # sets LIBLTDL to the link flags for the libltdl installable library and
2535 # LTDLINCL to the include flags for the libltdl header and adds
2536 # --enable-ltdl-install to the configure arguments.  Note that
2537 # AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2538 # and an installed libltdl is not found, it is assumed to be `libltdl'.
2539 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2540 # '${top_srcdir}/' (note the single quotes!).  If your package is not
2541 # flat and you're not using automake, define top_builddir and top_srcdir
2542 # appropriately in the Makefiles.
2543 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2544 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2545 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2546   AC_CHECK_LIB(ltdl, lt_dlinit,
2547   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2548   [if test x"$enable_ltdl_install" = xno; then
2549      AC_MSG_WARN([libltdl not installed, but installation disabled])
2550    else
2551      enable_ltdl_install=yes
2552    fi
2553   ])
2554   if test x"$enable_ltdl_install" = x"yes"; then
2555     ac_configure_args="$ac_configure_args --enable-ltdl-install"
2556     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2557     LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2558   else
2559     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2560     LIBLTDL="-lltdl"
2561     LTDLINCL=
2562   fi
2563   # For backwards non-gettext consistent compatibility...
2564   INCLTDL="$LTDLINCL"
2565 ])# AC_LIBLTDL_INSTALLABLE
2568 # AC_LIBTOOL_RC
2569 # -------------
2570 # enable support for Windows resource files
2571 AC_DEFUN([AC_LIBTOOL_RC],
2572 [AC_REQUIRE([LT_AC_PROG_RC])
2573 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2574 ])# AC_LIBTOOL_RC
2577 # AC_LIBTOOL_LANG_C_CONFIG
2578 # ------------------------
2579 # Ensure that the configuration vars for the C compiler are
2580 # suitably defined.  Those variables are subsequently used by
2581 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2582 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2583 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2584 [lt_save_CC="$CC"
2585 AC_LANG_PUSH(C)
2587 # Source file extension for C test sources.
2588 ac_ext=c
2590 # Object file extension for compiled C test sources.
2591 objext=o
2592 _LT_AC_TAGVAR(objext, $1)=$objext
2594 # Code to be used in simple compile tests
2595 lt_simple_compile_test_code="int some_variable = 0;"
2597 # Code to be used in simple link tests
2598 lt_simple_link_test_code='int main(){return(0);}'
2600 _LT_AC_SYS_COMPILER
2602 # save warnings/boilerplate of simple test code
2603 _LT_COMPILER_BOILERPLATE
2604 _LT_LINKER_BOILERPLATE
2606 ## CAVEAT EMPTOR:
2607 ## There is no encapsulation within the following macros, do not change
2608 ## the running order or otherwise move them around unless you know exactly
2609 ## what you are doing...
2610 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2611 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2612 AC_LIBTOOL_PROG_CC_C_O($1)
2613 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2614 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2615 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2616 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2617 AC_LIBTOOL_SYS_LIB_STRIP
2618 AC_LIBTOOL_DLOPEN_SELF
2620 # Report which library types will actually be built
2621 AC_MSG_CHECKING([if libtool supports shared libraries])
2622 AC_MSG_RESULT([$can_build_shared])
2624 AC_MSG_CHECKING([whether to build shared libraries])
2625 test "$can_build_shared" = "no" && enable_shared=no
2627 # On AIX, shared libraries and static libraries use the same namespace, and
2628 # are all built from PIC.
2629 case $host_os in
2630 aix3*)
2631   test "$enable_shared" = yes && enable_static=no
2632   if test -n "$RANLIB"; then
2633     archive_cmds="$archive_cmds~\$RANLIB \$lib"
2634     postinstall_cmds='$RANLIB $lib'
2635   fi
2636   ;;
2638 aix4* | aix5*)
2639   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2640     test "$enable_shared" = yes && enable_static=no
2641   fi
2642     ;;
2643 esac
2644 AC_MSG_RESULT([$enable_shared])
2646 AC_MSG_CHECKING([whether to build static libraries])
2647 # Make sure either enable_shared or enable_static is yes.
2648 test "$enable_shared" = yes || enable_static=yes
2649 AC_MSG_RESULT([$enable_static])
2651 AC_LIBTOOL_CONFIG($1)
2653 AC_LANG_POP
2654 CC="$lt_save_CC"
2655 ])# AC_LIBTOOL_LANG_C_CONFIG
2658 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
2659 # ------------------------------------
2660 # Figure out "hidden" library dependencies from verbose
2661 # compiler output when linking a shared library.
2662 # Parse the compiler output and extract the necessary
2663 # objects, libraries and library flags.
2664 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
2665 dnl we can't use the lt_simple_compile_test_code here,
2666 dnl because it contains code intended for an executable,
2667 dnl not a library.  It's possible we should let each
2668 dnl tag define a new lt_????_link_test_code variable,
2669 dnl but it's only used here...
2670 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
2671 int a;
2672 void foo (void) { a = 0; }
2675 dnl Parse the compiler output and extract the necessary
2676 dnl objects, libraries and library flags.
2677 if AC_TRY_EVAL(ac_compile); then
2678   # Parse the compiler output and extract the necessary
2679   # objects, libraries and library flags.
2681   # Sentinel used to keep track of whether or not we are before
2682   # the conftest object file.
2683   pre_test_object_deps_done=no
2685   # The `*' in the case matches for architectures that use `case' in
2686   # $output_verbose_cmd can trigger glob expansion during the loop
2687   # eval without this substitution.
2688   output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
2690   for p in `eval $output_verbose_link_cmd`; do
2691     case $p in
2693     -L* | -R* | -l*)
2694        # Some compilers place space between "-{L,R}" and the path.
2695        # Remove the space.
2696        if test $p = "-L" \
2697           || test $p = "-R"; then
2698          prev=$p
2699          continue
2700        else
2701          prev=
2702        fi
2704        if test "$pre_test_object_deps_done" = no; then
2705          case $p in
2706          -L* | -R*)
2707            # Internal compiler library paths should come after those
2708            # provided the user.  The postdeps already come after the
2709            # user supplied libs so there is no need to process them.
2710            if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
2711              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
2712            else
2713              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
2714            fi
2715            ;;
2716          # The "-l" case would never come before the object being
2717          # linked, so don't bother handling this case.
2718          esac
2719        else
2720          if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
2721            _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
2722          else
2723            _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
2724          fi
2725        fi
2726        ;;
2728     *.$objext)
2729        # This assumes that the test object file only shows up
2730        # once in the compiler output.
2731        if test "$p" = "conftest.$objext"; then
2732          pre_test_object_deps_done=yes
2733          continue
2734        fi
2736        if test "$pre_test_object_deps_done" = no; then
2737          if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
2738            _LT_AC_TAGVAR(predep_objects, $1)="$p"
2739          else
2740            _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
2741          fi
2742        else
2743          if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
2744            _LT_AC_TAGVAR(postdep_objects, $1)="$p"
2745          else
2746            _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
2747          fi
2748        fi
2749        ;;
2751     *) ;; # Ignore the rest.
2753     esac
2754   done
2756   # Clean up.
2757   rm -f a.out a.exe
2758 else
2759   echo "libtool.m4: error: problem compiling $1 test program"
2762 $rm -f confest.$objext
2764 case " $_LT_AC_TAGVAR(postdeps, $1) " in
2765 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
2766 esac
2767 ])# AC_LIBTOOL_POSTDEP_PREDEP
2770 # AC_LIBTOOL_LANG_RC_CONFIG
2771 # -------------------------
2772 # Ensure that the configuration vars for the Windows resource compiler are
2773 # suitably defined.  Those variables are subsequently used by
2774 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2775 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
2776 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
2777 [AC_LANG_SAVE
2779 # Source file extension for RC test sources.
2780 ac_ext=rc
2782 # Object file extension for compiled RC test sources.
2783 objext=o
2784 _LT_AC_TAGVAR(objext, $1)=$objext
2786 # Code to be used in simple compile tests
2787 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
2789 # Code to be used in simple link tests
2790 lt_simple_link_test_code="$lt_simple_compile_test_code"
2792 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2793 _LT_AC_SYS_COMPILER
2795 # save warnings/boilerplate of simple test code
2796 _LT_COMPILER_BOILERPLATE
2797 _LT_LINKER_BOILERPLATE
2799 # Allow CC to be a program name with arguments.
2800 lt_save_CC="$CC"
2801 CC=${RC-"windres"}
2802 compiler=$CC
2803 _LT_AC_TAGVAR(compiler, $1)=$CC
2804 _LT_CC_BASENAME([$compiler])
2805 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2807 AC_LIBTOOL_CONFIG($1)
2809 AC_LANG_RESTORE
2810 CC="$lt_save_CC"
2811 ])# AC_LIBTOOL_LANG_RC_CONFIG
2814 # AC_LIBTOOL_CONFIG([TAGNAME])
2815 # ----------------------------
2816 # If TAGNAME is not passed, then create an initial libtool script
2817 # with a default configuration from the untagged config vars.  Otherwise
2818 # add code to config.status for appending the configuration named by
2819 # TAGNAME from the matching tagged config vars.
2820 AC_DEFUN([AC_LIBTOOL_CONFIG],
2821 [# The else clause should only fire when bootstrapping the
2822 # libtool distribution, otherwise you forgot to ship ltmain.sh
2823 # with your package, and you will get complaints that there are
2824 # no rules to generate ltmain.sh.
2825 if test -f "$ltmain"; then
2826   # See if we are running on zsh, and set the options which allow our commands through
2827   # without removal of \ escapes.
2828   if test -n "${ZSH_VERSION+set}" ; then
2829     setopt NO_GLOB_SUBST
2830   fi
2831   # Now quote all the things that may contain metacharacters while being
2832   # careful not to overquote the AC_SUBSTed values.  We take copies of the
2833   # variables and quote the copies for generation of the libtool script.
2834   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
2835     SED SHELL STRIP \
2836     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
2837     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
2838     deplibs_check_method reload_flag reload_cmds need_locks \
2839     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
2840     lt_cv_sys_global_symbol_to_c_name_address \
2841     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2842     old_postinstall_cmds old_postuninstall_cmds \
2843     _LT_AC_TAGVAR(compiler, $1) \
2844     _LT_AC_TAGVAR(CC, $1) \
2845     _LT_AC_TAGVAR(LD, $1) \
2846     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
2847     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
2848     _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
2849     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
2850     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
2851     _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
2852     _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
2853     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
2854     _LT_AC_TAGVAR(old_archive_cmds, $1) \
2855     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
2856     _LT_AC_TAGVAR(predep_objects, $1) \
2857     _LT_AC_TAGVAR(postdep_objects, $1) \
2858     _LT_AC_TAGVAR(predeps, $1) \
2859     _LT_AC_TAGVAR(postdeps, $1) \
2860     _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
2861     _LT_AC_TAGVAR(archive_cmds, $1) \
2862     _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
2863     _LT_AC_TAGVAR(postinstall_cmds, $1) \
2864     _LT_AC_TAGVAR(postuninstall_cmds, $1) \
2865     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
2866     _LT_AC_TAGVAR(allow_undefined_flag, $1) \
2867     _LT_AC_TAGVAR(no_undefined_flag, $1) \
2868     _LT_AC_TAGVAR(export_symbols_cmds, $1) \
2869     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
2870     _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
2871     _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
2872     _LT_AC_TAGVAR(hardcode_automatic, $1) \
2873     _LT_AC_TAGVAR(module_cmds, $1) \
2874     _LT_AC_TAGVAR(module_expsym_cmds, $1) \
2875     _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
2876     _LT_AC_TAGVAR(fix_srcfile_path, $1) \
2877     _LT_AC_TAGVAR(exclude_expsyms, $1) \
2878     _LT_AC_TAGVAR(include_expsyms, $1); do
2880     case $var in
2881     _LT_AC_TAGVAR(old_archive_cmds, $1) | \
2882     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
2883     _LT_AC_TAGVAR(archive_cmds, $1) | \
2884     _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
2885     _LT_AC_TAGVAR(module_cmds, $1) | \
2886     _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
2887     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
2888     _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
2889     extract_expsyms_cmds | reload_cmds | finish_cmds | \
2890     postinstall_cmds | postuninstall_cmds | \
2891     old_postinstall_cmds | old_postuninstall_cmds | \
2892     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2893       # Double-quote double-evaled strings.
2894       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2895       ;;
2896     *)
2897       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2898       ;;
2899     esac
2900   done
2902   case $lt_echo in
2903   *'\[$]0 --fallback-echo"')
2904     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
2905     ;;
2906   esac
2908 ifelse([$1], [],
2909   [cfgfile="${ofile}T"
2910   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
2911   $rm -f "$cfgfile"
2912   AC_MSG_NOTICE([creating $ofile])],
2913   [cfgfile="$ofile"])
2915   cat <<__EOF__ >> "$cfgfile"
2916 ifelse([$1], [],
2917 [#! $SHELL
2919 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2920 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2921 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2923 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
2924 # Free Software Foundation, Inc.
2926 # This file is part of GNU Libtool:
2927 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2929 # This program is free software; you can redistribute it and/or modify
2930 # it under the terms of the GNU General Public License as published by
2931 # the Free Software Foundation; either version 2 of the License, or
2932 # (at your option) any later version.
2934 # This program is distributed in the hope that it will be useful, but
2935 # WITHOUT ANY WARRANTY; without even the implied warranty of
2936 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2937 # General Public License for more details.
2939 # You should have received a copy of the GNU General Public License
2940 # along with this program; if not, write to the Free Software
2941 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2943 # As a special exception to the GNU General Public License, if you
2944 # distribute this file as part of a program that contains a
2945 # configuration script generated by Autoconf, you may include it under
2946 # the same distribution terms that you use for the rest of that program.
2948 # A sed program that does not truncate output.
2949 SED=$lt_SED
2951 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2952 Xsed="$SED -e 1s/^X//"
2954 # The HP-UX ksh and POSIX shell print the target directory to stdout
2955 # if CDPATH is set.
2956 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2958 # The names of the tagged configurations supported by this script.
2959 available_tags=
2961 # ### BEGIN LIBTOOL CONFIG],
2962 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
2964 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2966 # Shell to use when invoking shell scripts.
2967 SHELL=$lt_SHELL
2969 # Whether or not to build shared libraries.
2970 build_libtool_libs=$enable_shared
2972 # Whether or not to build static libraries.
2973 build_old_libs=$enable_static
2975 # Whether or not to add -lc for building shared libraries.
2976 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
2978 # Whether or not to disallow shared libs when runtime libs are static
2979 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
2981 # Whether or not to optimize for fast installation.
2982 fast_install=$enable_fast_install
2984 # The host system.
2985 host_alias=$host_alias
2986 host=$host
2987 host_os=$host_os
2989 # The build system.
2990 build_alias=$build_alias
2991 build=$build
2992 build_os=$build_os
2994 # An echo program that does not interpret backslashes.
2995 echo=$lt_echo
2997 # The archiver.
2998 AR=$lt_AR
2999 AR_FLAGS=$lt_AR_FLAGS
3001 # A C compiler.
3002 LTCC=$lt_LTCC
3004 # LTCC compiler flags.
3005 LTCFLAGS=$lt_LTCFLAGS
3007 # A language-specific compiler.
3008 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
3010 # Is the compiler the GNU C compiler?
3011 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
3013 # An ERE matcher.
3014 EGREP=$lt_EGREP
3016 # The linker used to build libraries.
3017 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
3019 # Whether we need hard or soft links.
3020 LN_S=$lt_LN_S
3022 # A BSD-compatible nm program.
3023 NM=$lt_NM
3025 # A symbol stripping program
3026 STRIP=$lt_STRIP
3028 # Used to examine libraries when file_magic_cmd begins "file"
3029 MAGIC_CMD=$MAGIC_CMD
3031 # Used on cygwin: DLL creation program.
3032 DLLTOOL="$DLLTOOL"
3034 # Used on cygwin: object dumper.
3035 OBJDUMP="$OBJDUMP"
3037 # Used on cygwin: assembler.
3038 AS="$AS"
3040 # The name of the directory that contains temporary libtool files.
3041 objdir=$objdir
3043 # How to create reloadable object files.
3044 reload_flag=$lt_reload_flag
3045 reload_cmds=$lt_reload_cmds
3047 # How to pass a linker flag through the compiler.
3048 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
3050 # Object file suffix (normally "o").
3051 objext="$ac_objext"
3053 # Old archive suffix (normally "a").
3054 libext="$libext"
3056 # Shared library suffix (normally ".so").
3057 shrext_cmds='$shrext_cmds'
3059 # Executable file suffix (normally "").
3060 exeext="$exeext"
3062 # Additional compiler flags for building library objects.
3063 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
3064 pic_mode=$pic_mode
3066 # What is the maximum length of a command?
3067 max_cmd_len=$lt_cv_sys_max_cmd_len
3069 # Does compiler simultaneously support -c and -o options?
3070 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
3072 # Must we lock files when doing compilation?
3073 need_locks=$lt_need_locks
3075 # Do we need the lib prefix for modules?
3076 need_lib_prefix=$need_lib_prefix
3078 # Do we need a version for libraries?
3079 need_version=$need_version
3081 # Whether dlopen is supported.
3082 dlopen_support=$enable_dlopen
3084 # Whether dlopen of programs is supported.
3085 dlopen_self=$enable_dlopen_self
3087 # Whether dlopen of statically linked programs is supported.
3088 dlopen_self_static=$enable_dlopen_self_static
3090 # Compiler flag to prevent dynamic linking.
3091 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
3093 # Compiler flag to turn off builtin functions.
3094 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
3096 # Compiler flag to allow reflexive dlopens.
3097 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
3099 # Compiler flag to generate shared objects directly from archives.
3100 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
3102 # Compiler flag to generate thread-safe objects.
3103 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
3105 # Library versioning type.
3106 version_type=$version_type
3108 # Format of library name prefix.
3109 libname_spec=$lt_libname_spec
3111 # List of archive names.  First name is the real one, the rest are links.
3112 # The last name is the one that the linker finds with -lNAME.
3113 library_names_spec=$lt_library_names_spec
3115 # The coded name of the library, if different from the real name.
3116 soname_spec=$lt_soname_spec
3118 # Commands used to build and install an old-style archive.
3119 RANLIB=$lt_RANLIB
3120 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
3121 old_postinstall_cmds=$lt_old_postinstall_cmds
3122 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3124 # Create an old-style archive from a shared archive.
3125 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
3127 # Create a temporary old-style archive to link instead of a shared archive.
3128 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
3130 # Commands used to build and install a shared archive.
3131 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
3132 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
3133 postinstall_cmds=$lt_postinstall_cmds
3134 postuninstall_cmds=$lt_postuninstall_cmds
3136 # Commands used to build a loadable module (assumed same as above if empty)
3137 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
3138 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
3140 # Commands to strip libraries.
3141 old_striplib=$lt_old_striplib
3142 striplib=$lt_striplib
3144 # Dependencies to place before the objects being linked to create a
3145 # shared library.
3146 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
3148 # Dependencies to place after the objects being linked to create a
3149 # shared library.
3150 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
3152 # Dependencies to place before the objects being linked to create a
3153 # shared library.
3154 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
3156 # Dependencies to place after the objects being linked to create a
3157 # shared library.
3158 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
3160 # The library search path used internally by the compiler when linking
3161 # a shared library.
3162 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
3164 # Method to check whether dependent libraries are shared objects.
3165 deplibs_check_method=$lt_deplibs_check_method
3167 # Command to use when deplibs_check_method == file_magic.
3168 file_magic_cmd=$lt_file_magic_cmd
3170 # Flag that allows shared libraries with undefined symbols to be built.
3171 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
3173 # Flag that forces no undefined symbols.
3174 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
3176 # Commands used to finish a libtool library installation in a directory.
3177 finish_cmds=$lt_finish_cmds
3179 # Same as above, but a single script fragment to be evaled but not shown.
3180 finish_eval=$lt_finish_eval
3182 # Take the output of nm and produce a listing of raw symbols and C names.
3183 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
3185 # Transform the output of nm in a proper C declaration
3186 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
3188 # Transform the output of nm in a C name address pair
3189 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
3191 # This is the shared library runtime path variable.
3192 runpath_var=$runpath_var
3194 # This is the shared library path variable.
3195 shlibpath_var=$shlibpath_var
3197 # Is shlibpath searched before the hard-coded library search path?
3198 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3200 # How to hardcode a shared library path into an executable.
3201 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
3203 # Whether we should hardcode library paths into libraries.
3204 hardcode_into_libs=$hardcode_into_libs
3206 # Flag to hardcode \$libdir into a binary during linking.
3207 # This must work even if \$libdir does not exist.
3208 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
3210 # If ld is used when linking, flag to hardcode \$libdir into
3211 # a binary during linking. This must work even if \$libdir does
3212 # not exist.
3213 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
3215 # Whether we need a single -rpath flag with a separated argument.
3216 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
3218 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
3219 # resulting binary.
3220 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
3222 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3223 # resulting binary.
3224 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
3226 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3227 # the resulting binary.
3228 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
3230 # Set to yes if building a shared library automatically hardcodes DIR into the library
3231 # and all subsequent libraries and executables linked against it.
3232 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
3234 # Variables whose values should be saved in libtool wrapper scripts and
3235 # restored at relink time.
3236 variables_saved_for_relink="$variables_saved_for_relink"
3238 # Whether libtool must link a program against all its dependency libraries.
3239 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
3241 # Compile-time system search path for libraries
3242 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3244 # Run-time system search path for libraries
3245 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3247 # Fix the shell variable \$srcfile for the compiler.
3248 fix_srcfile_path=$lt_fix_srcfile_path
3250 # Set to yes if exported symbols are required.
3251 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
3253 # The commands to list exported symbols.
3254 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
3256 # The commands to extract the exported symbol list from a shared archive.
3257 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3259 # Symbols that should not be listed in the preloaded symbols.
3260 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
3262 # Symbols that must always be exported.
3263 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
3265 ifelse([$1],[],
3266 [# ### END LIBTOOL CONFIG],
3267 [# ### END LIBTOOL TAG CONFIG: $tagname])
3269 __EOF__
3271 ifelse([$1],[], [
3272   case $host_os in
3273   aix3*)
3274     cat <<\EOF >> "$cfgfile"
3276 # AIX sometimes has problems with the GCC collect2 program.  For some
3277 # reason, if we set the COLLECT_NAMES environment variable, the problems
3278 # vanish in a puff of smoke.
3279 if test "X${COLLECT_NAMES+set}" != Xset; then
3280   COLLECT_NAMES=
3281   export COLLECT_NAMES
3284     ;;
3285   esac
3287   # We use sed instead of cat because bash on DJGPP gets confused if
3288   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3289   # text mode, it properly converts lines to CR/LF.  This bash problem
3290   # is reportedly fixed, but why not run on old versions too?
3291   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
3293   mv -f "$cfgfile" "$ofile" || \
3294     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3295   chmod +x "$ofile"
3297 else
3298   # If there is no Makefile yet, we rely on a make rule to execute
3299   # `config.status --recheck' to rerun these tests and create the
3300   # libtool script then.
3301   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
3302   if test -f "$ltmain_in"; then
3303     test -f Makefile && make "$ltmain"
3304   fi
3306 ])# AC_LIBTOOL_CONFIG
3309 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
3310 # -------------------------------------------
3311 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
3312 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
3314 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3316 if test "$GCC" = yes; then
3317   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3319   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3320     lt_cv_prog_compiler_rtti_exceptions,
3321     [-fno-rtti -fno-exceptions], [],
3322     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3324 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
3327 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
3328 # ---------------------------------
3329 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
3330 [AC_REQUIRE([AC_CANONICAL_HOST])
3331 AC_REQUIRE([LT_AC_PROG_SED])
3332 AC_REQUIRE([AC_PROG_NM])
3333 AC_REQUIRE([AC_OBJEXT])
3334 # Check for command to grab the raw symbol name followed by C symbol from nm.
3335 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3336 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3338 # These are sane defaults that work on at least a few old systems.
3339 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3341 # Character class describing NM global symbol codes.
3342 symcode='[[BCDEGRST]]'
3344 # Regexp to match symbols that can be accessed directly from C.
3345 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3347 # Transform an extracted symbol line into a proper C declaration
3348 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
3350 # Transform an extracted symbol line into symbol name and symbol address
3351 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'"
3353 # Define system-specific variables.
3354 case $host_os in
3355 aix*)
3356   symcode='[[BCDT]]'
3357   ;;
3358 cygwin* | mingw* | pw32*)
3359   symcode='[[ABCDGISTW]]'
3360   ;;
3361 hpux*) # Its linker distinguishes data from code symbols
3362   if test "$host_cpu" = ia64; then
3363     symcode='[[ABCDEGRST]]'
3364   fi
3365   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3366   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'"
3367   ;;
3368 linux* | k*bsd*-gnu)
3369   if test "$host_cpu" = ia64; then
3370     symcode='[[ABCDGIRSTW]]'
3371     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3372     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'"
3373   fi
3374   ;;
3375 irix* | nonstopux*)
3376   symcode='[[BCDEGRST]]'
3377   ;;
3378 osf*)
3379   symcode='[[BCDEGQRST]]'
3380   ;;
3381 solaris*)
3382   symcode='[[BDRT]]'
3383   ;;
3384 sco3.2v5*)
3385   symcode='[[DT]]'
3386   ;;
3387 sysv4.2uw2*)
3388   symcode='[[DT]]'
3389   ;;
3390 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3391   symcode='[[ABDT]]'
3392   ;;
3393 sysv4)
3394   symcode='[[DFNSTU]]'
3395   ;;
3396 esac
3398 # Handle CRLF in mingw tool chain
3399 opt_cr=
3400 case $build_os in
3401 mingw*)
3402   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3403   ;;
3404 esac
3406 # If we're using GNU nm, then use its standard symbol codes.
3407 case `$NM -V 2>&1` in
3408 *GNU* | *'with BFD'*)
3409   symcode='[[ABCDGIRSTW]]' ;;
3410 esac
3412 # Try without a prefix undercore, then with it.
3413 for ac_symprfx in "" "_"; do
3415   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3416   symxfrm="\\1 $ac_symprfx\\2 \\2"
3418   # Write the raw and C identifiers.
3419   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3421   # Check to see that the pipe works correctly.
3422   pipe_works=no
3424   rm -f conftest*
3425   cat > conftest.$ac_ext <<EOF
3426 #ifdef __cplusplus
3427 extern "C" {
3428 #endif
3429 char nm_test_var;
3430 void nm_test_func(){}
3431 #ifdef __cplusplus
3433 #endif
3434 int main(){nm_test_var='a';nm_test_func();return(0);}
3437   if AC_TRY_EVAL(ac_compile); then
3438     # Now try to grab the symbols.
3439     nlist=conftest.nm
3440     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3441       # Try sorting and uniquifying the output.
3442       if sort "$nlist" | uniq > "$nlist"T; then
3443         mv -f "$nlist"T "$nlist"
3444       else
3445         rm -f "$nlist"T
3446       fi
3448       # Make sure that we snagged all the symbols we need.
3449       if grep ' nm_test_var$' "$nlist" >/dev/null; then
3450         if grep ' nm_test_func$' "$nlist" >/dev/null; then
3451           cat <<EOF > conftest.$ac_ext
3452 #ifdef __cplusplus
3453 extern "C" {
3454 #endif
3457           # Now generate the symbol file.
3458           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
3460           cat <<EOF >> conftest.$ac_ext
3461 #if defined (__STDC__) && __STDC__
3462 # define lt_ptr_t void *
3463 #else
3464 # define lt_ptr_t char *
3465 # define const
3466 #endif
3468 /* The mapping between symbol names and symbols. */
3469 const struct {
3470   const char *name;
3471   lt_ptr_t address;
3473 lt_preloaded_symbols[[]] =
3476           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
3477           cat <<\EOF >> conftest.$ac_ext
3478   {0, (lt_ptr_t) 0}
3481 #ifdef __cplusplus
3483 #endif
3485           # Now try linking the two files.
3486           mv conftest.$ac_objext conftstm.$ac_objext
3487           lt_save_LIBS="$LIBS"
3488           lt_save_CFLAGS="$CFLAGS"
3489           LIBS="conftstm.$ac_objext"
3490           CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3491           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3492             pipe_works=yes
3493           fi
3494           LIBS="$lt_save_LIBS"
3495           CFLAGS="$lt_save_CFLAGS"
3496         else
3497           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3498         fi
3499       else
3500         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3501       fi
3502     else
3503       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3504     fi
3505   else
3506     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3507     cat conftest.$ac_ext >&5
3508   fi
3509   rm -f conftest* conftst*
3511   # Do not use the global_symbol_pipe unless it works.
3512   if test "$pipe_works" = yes; then
3513     break
3514   else
3515     lt_cv_sys_global_symbol_pipe=
3516   fi
3517 done
3519 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3520   lt_cv_sys_global_symbol_to_cdecl=
3522 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3523   AC_MSG_RESULT(failed)
3524 else
3525   AC_MSG_RESULT(ok)
3527 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
3530 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
3531 # ---------------------------------------
3532 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
3533 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
3534 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3535 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
3537 AC_MSG_CHECKING([for $compiler option to produce PIC])
3538   if test "$GCC" = yes; then
3539     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3540     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3542     case $host_os in
3543       aix*)
3544       # All AIX code is PIC.
3545       if test "$host_cpu" = ia64; then
3546         # AIX 5 now supports IA64 processor
3547         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3548       fi
3549       ;;
3551     amigaos*)
3552       # FIXME: we need at least 68020 code to build shared libraries, but
3553       # adding the `-m68020' flag to GCC prevents building anything better,
3554       # like `-m68040'.
3555       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3556       ;;
3558     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3559       # PIC is the default for these OSes.
3560       ;;
3562     mingw* | cygwin* | pw32* | os2*)
3563       # This hack is so that the source file can tell whether it is being
3564       # built for inclusion in a dll (and should export symbols for example).
3565       # Although the cygwin gcc ignores -fPIC, still need this for old-style
3566       # (--disable-auto-import) libraries
3567       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3568       ;;
3570     darwin* | rhapsody*)
3571       # PIC is the default on this platform
3572       # Common symbols not allowed in MH_DYLIB files
3573       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3574       ;;
3576     interix[[3-9]]*)
3577       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3578       # Instead, we relocate shared libraries at runtime.
3579       ;;
3581     msdosdjgpp*)
3582       # Just because we use GCC doesn't mean we suddenly get shared libraries
3583       # on systems that don't support them.
3584       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3585       enable_shared=no
3586       ;;
3588     sysv4*MP*)
3589       if test -d /usr/nec; then
3590         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3591       fi
3592       ;;
3594     hpux*)
3595       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3596       # not for PA HP-UX.
3597       case $host_cpu in
3598       hppa*64*|ia64*)
3599         # +Z the default
3600         ;;
3601       *)
3602         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3603         ;;
3604       esac
3605       ;;
3607     *)
3608       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3609       ;;
3610     esac
3611   else
3612     # PORTME Check for flag to pass linker flags through the system compiler.
3613     case $host_os in
3614     aix*)
3615       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3616       if test "$host_cpu" = ia64; then
3617         # AIX 5 now supports IA64 processor
3618         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3619       else
3620         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3621       fi
3622       ;;
3623       darwin*)
3624         # PIC is the default on this platform
3625         # Common symbols not allowed in MH_DYLIB files
3626        case $cc_basename in
3627          xlc*)
3628          _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3629          _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3630          ;;
3631        esac
3632        ;;
3634     mingw* | cygwin* | pw32* | os2*)
3635       # This hack is so that the source file can tell whether it is being
3636       # built for inclusion in a dll (and should export symbols for example).
3637       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3638       ;;
3640     hpux9* | hpux10* | hpux11*)
3641       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3642       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3643       # not for PA HP-UX.
3644       case $host_cpu in
3645       hppa*64*|ia64*)
3646         # +Z the default
3647         ;;
3648       *)
3649         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3650         ;;
3651       esac
3652       # Is there a better lt_prog_compiler_static that works with the bundled CC?
3653       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3654       ;;
3656     irix5* | irix6* | nonstopux*)
3657       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3658       # PIC (with -KPIC) is the default.
3659       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3660       ;;
3662     newsos6)
3663       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3664       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3665       ;;
3667     linux* | k*bsd*-gnu)
3668       case $cc_basename in
3669       icc* | ecc*)
3670         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3671         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3672         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3673         ;;
3674       pgcc* | pgf77* | pgf90* | pgf95*)
3675         # Portland Group compilers (*not* the Pentium gcc compiler,
3676         # which looks to be a dead project)
3677         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3678         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3679         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3680         ;;
3681       ccc*)
3682         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3683         # All Alpha code is PIC.
3684         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3685         ;;
3686       *)
3687         case `$CC -V 2>&1 | sed 5q` in
3688         *Sun\ C*)
3689           # Sun C 5.9
3690           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3691           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3692           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3693           ;;
3694         *Sun\ F*)
3695           # Sun Fortran 8.3 passes all unrecognized flags to the linker
3696           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3697           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3698           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
3699           ;;
3700         esac
3701         ;;
3702       esac
3703       ;;
3705     osf3* | osf4* | osf5*)
3706       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3707       # All OSF/1 code is PIC.
3708       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3709       ;;
3711     rdos*)
3712       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3713       ;;
3715     solaris*)
3716       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3717       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3718       case $cc_basename in
3719       f77* | f90* | f95*)
3720         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
3721       *)
3722         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
3723       esac
3724       ;;
3726     sunos4*)
3727       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3728       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3729       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3730       ;;
3732     sysv4 | sysv4.2uw2* | sysv4.3*)
3733       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3734       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3735       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3736       ;;
3738     sysv4*MP*)
3739       if test -d /usr/nec ;then
3740         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
3741         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3742       fi
3743       ;;
3745     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3746       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3747       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3748       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3749       ;;
3751     unicos*)
3752       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3753       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3754       ;;
3756     uts4*)
3757       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3758       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3759       ;;
3761     *)
3762       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3763       ;;
3764     esac
3765   fi
3766 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
3769 # Check to make sure the PIC flag actually works.
3771 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
3772   AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
3773     _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
3774     [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC])], [],
3775     [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
3776      "" | " "*) ;;
3777      *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
3778      esac],
3779     [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3780      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
3782 case $host_os in
3783   # For platforms which do not support PIC, -DPIC is meaningless:
3784   *djgpp*)
3785     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3786     ;;
3787   *)
3788     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC])"
3789     ;;
3790 esac
3793 # Check to make sure the static flag actually works.
3795 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
3796 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
3797   _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3798   $lt_tmp_static_flag,
3799   [],
3800   [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3804 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
3805 # ------------------------------------
3806 # See if the linker supports building shared libraries.
3807 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
3808 [AC_REQUIRE([LT_AC_PROG_SED])dnl
3809 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3810   runpath_var=
3811   _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3812   _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3813   _LT_AC_TAGVAR(archive_cmds, $1)=
3814   _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3815   _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
3816   _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
3817   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3818   _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3819   _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
3820   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3821   _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3822   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3823   _LT_AC_TAGVAR(hardcode_direct, $1)=no
3824   _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3825   _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3826   _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3827   _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3828   _LT_AC_TAGVAR(module_cmds, $1)=
3829   _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3830   _LT_AC_TAGVAR(always_export_symbols, $1)=no
3831   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3832   # include_expsyms should be a list of space-separated symbols to be *always*
3833   # included in the symbol list
3834   _LT_AC_TAGVAR(include_expsyms, $1)=
3835   # exclude_expsyms can be an extended regexp of symbols to exclude
3836   # it will be wrapped by ` (' and `)$', so one must not match beginning or
3837   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
3838   # as well as any symbol that contains `d'.
3839   _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
3840   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
3841   # platforms (ab)use it in PIC code, but their linkers get confused if
3842   # the symbol is explicitly referenced.  Since portable code cannot
3843   # rely on this symbol name, it's probably fine to never include it in
3844   # preloaded symbol tables.
3845   extract_expsyms_cmds=
3846   # Just being paranoid about ensuring that cc_basename is set.
3847   _LT_CC_BASENAME([$compiler])
3848   case $host_os in
3849   cygwin* | mingw* | pw32*)
3850     # FIXME: the MSVC++ port hasn't been tested in a loooong time
3851     # When not using gcc, we currently assume that we are using
3852     # Microsoft Visual C++.
3853     if test "$GCC" != yes; then
3854       with_gnu_ld=no
3855     fi
3856     ;;
3857   interix*)
3858     # we just hope/assume this is gcc and not c89 (= MSVC++)
3859     with_gnu_ld=yes
3860     ;;
3861   openbsd*)
3862     with_gnu_ld=no
3863     ;;
3864   esac
3866   _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3867   if test "$with_gnu_ld" = yes; then
3868     # If archive_cmds runs LD, not CC, wlarc should be empty
3869     wlarc='${wl}'
3871     # Set some defaults for GNU ld with shared library support. These
3872     # are reset later if shared libraries are not supported. Putting them
3873     # here allows them to be overridden if necessary.
3874     runpath_var=LD_RUN_PATH
3875     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3876     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3877     # ancient GNU ld didn't support --whole-archive et. al.
3878     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
3879         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3880       else
3881         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3882     fi
3883     supports_anon_versioning=no
3884     case `$LD -v 2>/dev/null` in
3885       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
3886       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
3887       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
3888       *\ 2.11.*) ;; # other 2.11 versions
3889       *) supports_anon_versioning=yes ;;
3890     esac
3892     # See if GNU ld supports shared libraries.
3893     case $host_os in
3894     aix3* | aix4* | aix5*)
3895       # On AIX/PPC, the GNU linker is very broken
3896       if test "$host_cpu" != ia64; then
3897         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3898         cat <<EOF 1>&2
3900 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
3901 *** to be unable to reliably create shared libraries on AIX.
3902 *** Therefore, libtool is disabling shared libraries support.  If you
3903 *** really care for shared libraries, you may want to modify your PATH
3904 *** so that a non-GNU linker is found, and then restart.
3907       fi
3908       ;;
3910     amigaos*)
3911       _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)'
3912       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3913       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3915       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
3916       # that the semantics of dynamic libraries on AmigaOS, at least up
3917       # to version 4, is to share data among multiple programs linked
3918       # with the same dynamic library.  Since this doesn't match the
3919       # behavior of shared libraries on other platforms, we can't use
3920       # them.
3921       _LT_AC_TAGVAR(ld_shlibs, $1)=no
3922       ;;
3924     beos*)
3925       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3926         _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3927         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3928         # support --undefined.  This deserves some investigation.  FIXME
3929         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3930       else
3931         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3932       fi
3933       ;;
3935     cygwin* | mingw* | pw32*)
3936       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3937       # as there is no search path for DLLs.
3938       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3939       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3940       _LT_AC_TAGVAR(always_export_symbols, $1)=no
3941       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3942       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
3944       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3945         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3946         # If the export-symbols file already is a .def file (1st line
3947         # is EXPORTS), use it as is; otherwise, prepend...
3948         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3949           cp $export_symbols $output_objdir/$soname.def;
3950         else
3951           echo EXPORTS > $output_objdir/$soname.def;
3952           cat $export_symbols >> $output_objdir/$soname.def;
3953         fi~
3954         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3955       else
3956         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3957       fi
3958       ;;
3960     interix[[3-9]]*)
3961       _LT_AC_TAGVAR(hardcode_direct, $1)=no
3962       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3963       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3964       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3965       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3966       # Instead, shared libraries are loaded at an image base (0x10000000 by
3967       # default) and relocated if they conflict, which is a slow very memory
3968       # consuming and fragmenting process.  To avoid this, we pick a random,
3969       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3970       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
3971       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3972       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3973       ;;
3975     gnu* | linux* | k*bsd*-gnu)
3976       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3977         tmp_addflag=
3978         case $cc_basename,$host_cpu in
3979         pgcc*)                          # Portland Group C compiler
3980           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3981           tmp_addflag=' $pic_flag'
3982           ;;
3983         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
3984           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3985           tmp_addflag=' $pic_flag -Mnomain' ;;
3986         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
3987           tmp_addflag=' -i_dynamic' ;;
3988         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
3989           tmp_addflag=' -i_dynamic -nofor_main' ;;
3990         ifc* | ifort*)                  # Intel Fortran compiler
3991           tmp_addflag=' -nofor_main' ;;
3992         esac
3993         case `$CC -V 2>&1 | sed 5q` in
3994         *Sun\ C*)                       # Sun C 5.9
3995           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3996           tmp_sharedflag='-G' ;;
3997         *Sun\ F*)                       # Sun Fortran 8.3
3998           tmp_sharedflag='-G' ;;
3999         *)
4000           tmp_sharedflag='-shared' ;;
4001         esac
4002         _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4004         if test $supports_anon_versioning = yes; then
4005           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
4006   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4007   $echo "local: *; };" >> $output_objdir/$libname.ver~
4008           $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4009         fi
4010       else
4011         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4012       fi
4013       ;;
4015     netbsd*)
4016       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4017         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4018         wlarc=
4019       else
4020         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4021         _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'
4022       fi
4023       ;;
4025     solaris*)
4026       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
4027         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4028         cat <<EOF 1>&2
4030 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4031 *** create shared libraries on Solaris systems.  Therefore, libtool
4032 *** is disabling shared libraries support.  We urge you to upgrade GNU
4033 *** binutils to release 2.9.1 or newer.  Another option is to modify
4034 *** your PATH or compiler configuration so that the native linker is
4035 *** used, and then restart.
4038       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4039         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4040         _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'
4041       else
4042         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4043       fi
4044       ;;
4046     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4047       case `$LD -v 2>&1` in
4048         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4049         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4050         cat <<_LT_EOF 1>&2
4052 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4053 *** reliably create shared libraries on SCO systems.  Therefore, libtool
4054 *** is disabling shared libraries support.  We urge you to upgrade GNU
4055 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
4056 *** your PATH or compiler configuration so that the native linker is
4057 *** used, and then restart.
4059 _LT_EOF
4060         ;;
4061         *)
4062           if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4063             _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
4064             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
4065             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
4066           else
4067             _LT_AC_TAGVAR(ld_shlibs, $1)=no
4068           fi
4069         ;;
4070       esac
4071       ;;
4073     sunos4*)
4074       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4075       wlarc=
4076       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4077       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4078       ;;
4080     *)
4081       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4082         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4083         _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'
4084       else
4085         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4086       fi
4087       ;;
4088     esac
4090     if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
4091       runpath_var=
4092       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4093       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4094       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4095     fi
4096   else
4097     # PORTME fill in a description of your system's linker (not GNU ld)
4098     case $host_os in
4099     aix3*)
4100       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4101       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4102       _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'
4103       # Note: this linker hardcodes the directories in LIBPATH if there
4104       # are no directories specified by -L.
4105       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4106       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4107         # Neither direct hardcoding nor static linking is supported with a
4108         # broken collect2.
4109         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4110       fi
4111       ;;
4113     aix4* | aix5*)
4114       if test "$host_cpu" = ia64; then
4115         # On IA64, the linker does run time linking by default, so we don't
4116         # have to do anything special.
4117         aix_use_runtimelinking=no
4118         exp_sym_flag='-Bexport'
4119         no_entry_flag=""
4120       else
4121         # If we're using GNU nm, then we don't want the "-C" option.
4122         # -C means demangle to AIX nm, but means don't demangle with GNU nm
4123         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
4124           _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'
4125         else
4126           _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'
4127         fi
4128         aix_use_runtimelinking=no
4130         # Test if we are trying to use run time linking or normal
4131         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4132         # need to do runtime linking.
4133         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4134           for ld_flag in $LDFLAGS; do
4135           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4136             aix_use_runtimelinking=yes
4137             break
4138           fi
4139           done
4140           ;;
4141         esac
4143         exp_sym_flag='-bexport'
4144         no_entry_flag='-bnoentry'
4145       fi
4147       # When large executables or shared objects are built, AIX ld can
4148       # have problems creating the table of contents.  If linking a library
4149       # or program results in "error TOC overflow" add -mminimal-toc to
4150       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4151       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4153       _LT_AC_TAGVAR(archive_cmds, $1)=''
4154       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4155       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4156       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4158       if test "$GCC" = yes; then
4159         case $host_os in aix4.[[012]]|aix4.[[012]].*)
4160         # We only want to do this on AIX 4.2 and lower, the check
4161         # below for broken collect2 doesn't work under 4.3+
4162           collect2name=`${CC} -print-prog-name=collect2`
4163           if test -f "$collect2name" && \
4164            strings "$collect2name" | grep resolve_lib_name >/dev/null
4165           then
4166           # We have reworked collect2
4167           :
4168           else
4169           # We have old collect2
4170           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4171           # It fails to find uninstalled libraries when the uninstalled
4172           # path is not listed in the libpath.  Setting hardcode_minus_L
4173           # to unsupported forces relinking
4174           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4175           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4176           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4177           fi
4178           ;;
4179         esac
4180         shared_flag='-shared'
4181         if test "$aix_use_runtimelinking" = yes; then
4182           shared_flag="$shared_flag "'${wl}-G'
4183         fi
4184       else
4185         # not using gcc
4186         if test "$host_cpu" = ia64; then
4187         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4188         # chokes on -Wl,-G. The following line is correct:
4189           shared_flag='-G'
4190         else
4191           if test "$aix_use_runtimelinking" = yes; then
4192             shared_flag='${wl}-G'
4193           else
4194             shared_flag='${wl}-bM:SRE'
4195           fi
4196         fi
4197       fi
4199       # It seems that -bexpall does not export symbols beginning with
4200       # underscore (_), so it is better to generate a list of symbols to export.
4201       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4202       if test "$aix_use_runtimelinking" = yes; then
4203         # Warning - without using the other runtime loading flags (-brtl),
4204         # -berok will link without error, but may produce a broken library.
4205         _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4206        # Determine the default libpath from the value encoded in an empty executable.
4207        _LT_AC_SYS_LIBPATH_AIX
4208        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4209         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4210        else
4211         if test "$host_cpu" = ia64; then
4212           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4213           _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4214           _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
4215         else
4216          # Determine the default libpath from the value encoded in an empty executable.
4217          _LT_AC_SYS_LIBPATH_AIX
4218          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4219           # Warning - without using the other run time loading flags,
4220           # -berok will link without error, but may produce a broken library.
4221           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4222           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4223           # Exported symbols can be pulled into shared objects from archives
4224           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4225           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4226           # This is similar to how AIX traditionally builds its shared libraries.
4227           _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4228         fi
4229       fi
4230       ;;
4232     amigaos*)
4233       _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)'
4234       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4235       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4236       # see comment about different semantics on the GNU ld section
4237       _LT_AC_TAGVAR(ld_shlibs, $1)=no
4238       ;;
4240     bsdi[[45]]*)
4241       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4242       ;;
4244     cygwin* | mingw* | pw32*)
4245       # When not using gcc, we currently assume that we are using
4246       # Microsoft Visual C++.
4247       # hardcode_libdir_flag_spec is actually meaningless, as there is
4248       # no search path for DLLs.
4249       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4250       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4251       # Tell ltmain to make .lib files, not .a files.
4252       libext=lib
4253       # Tell ltmain to make .dll files, not .so files.
4254       shrext_cmds=".dll"
4255       # FIXME: Setting linknames here is a bad hack.
4256       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
4257       # The linker will automatically build a .lib file if we build a DLL.
4258       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
4259       # FIXME: Should let the user specify the lib program.
4260       _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4261       _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4262       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4263       ;;
4265     darwin* | rhapsody*)
4266       case $host_os in
4267         rhapsody* | darwin1.[[012]])
4268          _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4269          ;;
4270        *) # Darwin 1.3 on
4271          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4272            _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4273          else
4274            case ${MACOSX_DEPLOYMENT_TARGET} in
4275              10.[[012]])
4276                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4277                ;;
4278              10.*)
4279                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4280                ;;
4281            esac
4282          fi
4283          ;;
4284       esac
4285       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4286       _LT_AC_TAGVAR(hardcode_direct, $1)=no
4287       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4288       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4289       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4290       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4291     if test "$GCC" = yes ; then
4292         output_verbose_link_cmd='echo'
4293         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4294       _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4295       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4296       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4297       _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4298     else
4299       case $cc_basename in
4300         xlc*)
4301          output_verbose_link_cmd='echo'
4302          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
4303          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4304           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4305          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4306           _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4307           ;;
4308        *)
4309          _LT_AC_TAGVAR(ld_shlibs, $1)=no
4310           ;;
4311       esac
4312     fi
4313       ;;
4315     dgux*)
4316       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4317       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4318       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4319       ;;
4321     freebsd1*)
4322       _LT_AC_TAGVAR(ld_shlibs, $1)=no
4323       ;;
4325     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4326     # support.  Future versions do this automatically, but an explicit c++rt0.o
4327     # does not break anything, and helps significantly (at the cost of a little
4328     # extra space).
4329     freebsd2.2*)
4330       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4331       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4332       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4333       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4334       ;;
4336     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4337     freebsd2*)
4338       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4339       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4340       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4341       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4342       ;;
4344     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4345     freebsd* | dragonfly*)
4346       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4347       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4348       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4349       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4350       ;;
4352     hpux9*)
4353       if test "$GCC" = yes; then
4354         _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'
4355       else
4356         _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'
4357       fi
4358       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4359       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4360       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4362       # hardcode_minus_L: Not really in the search PATH,
4363       # but as the default location of the library.
4364       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4365       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4366       ;;
4368     hpux10*)
4369       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4370         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4371       else
4372         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4373       fi
4374       if test "$with_gnu_ld" = no; then
4375         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4376         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4378         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4379         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4381         # hardcode_minus_L: Not really in the search PATH,
4382         # but as the default location of the library.
4383         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4384       fi
4385       ;;
4387     hpux11*)
4388       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4389         case $host_cpu in
4390         hppa*64*)
4391           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4392           ;;
4393         ia64*)
4394           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4395           ;;
4396         *)
4397           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4398           ;;
4399         esac
4400       else
4401         case $host_cpu in
4402         hppa*64*)
4403           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4404           ;;
4405         ia64*)
4406           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4407           ;;
4408         *)
4409           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4410           ;;
4411         esac
4412       fi
4413       if test "$with_gnu_ld" = no; then
4414         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4415         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4417         case $host_cpu in
4418         hppa*64*|ia64*)
4419           _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4420           _LT_AC_TAGVAR(hardcode_direct, $1)=no
4421           _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4422           ;;
4423         *)
4424           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4425           _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4427           # hardcode_minus_L: Not really in the search PATH,
4428           # but as the default location of the library.
4429           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4430           ;;
4431         esac
4432       fi
4433       ;;
4435     irix5* | irix6* | nonstopux*)
4436       if test "$GCC" = yes; then
4437         _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'
4438       else
4439         _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'
4440         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4441       fi
4442       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4443       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4444       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4445       ;;
4447     netbsd*)
4448       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4449         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
4450       else
4451         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
4452       fi
4453       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4454       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4455       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4456       ;;
4458     newsos6)
4459       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4460       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4461       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4462       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4463       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4464       ;;
4466     openbsd*)
4467       if test -f /usr/libexec/ld.so; then
4468         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4469         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4470         if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4471           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4472           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4473           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4474           _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4475         else
4476           case $host_os in
4477            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4478              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4479              _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4480              ;;
4481            *)
4482              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4483              _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4484              ;;
4485           esac
4486         fi
4487       else
4488         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4489       fi
4490       ;;
4492     os2*)
4493       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4494       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4495       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4496       _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'
4497       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4498       ;;
4500     osf3*)
4501       if test "$GCC" = yes; then
4502         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4503         _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'
4504       else
4505         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4506         _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'
4507       fi
4508       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4509       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4510       ;;
4512     osf4* | osf5*)      # as osf3* with the addition of -msym flag
4513       if test "$GCC" = yes; then
4514         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4515         _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'
4516         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4517       else
4518         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4519         _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'
4520         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
4521         $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
4523         # Both c and cxx compiler support -rpath directly
4524         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4525       fi
4526       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4527       ;;
4529     solaris*)
4530       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
4531       if test "$GCC" = yes; then
4532         wlarc='${wl}'
4533         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4534         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4535           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
4536       else
4537         wlarc=''
4538         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4539         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4540         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4541       fi
4542       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4543       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4544       case $host_os in
4545       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4546       *)
4547         # The compiler driver will combine and reorder linker options,
4548         # but understands `-z linker_flag'.  GCC discards it without `$wl',
4549         # but is careful enough not to reorder.
4550         # Supported since Solaris 2.6 (maybe 2.5.1?)
4551         if test "$GCC" = yes; then
4552           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4553         else
4554           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4555         fi
4556         ;;
4557       esac
4558       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4559       ;;
4561     sunos4*)
4562       if test "x$host_vendor" = xsequent; then
4563         # Use $CC to link under sequent, because it throws in some extra .o
4564         # files that make .init and .fini sections work.
4565         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4566       else
4567         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4568       fi
4569       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4570       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4571       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4572       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4573       ;;
4575     sysv4)
4576       case $host_vendor in
4577         sni)
4578           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4579           _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
4580         ;;
4581         siemens)
4582           ## LD is ld it makes a PLAMLIB
4583           ## CC just makes a GrossModule.
4584           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4585           _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
4586           _LT_AC_TAGVAR(hardcode_direct, $1)=no
4587         ;;
4588         motorola)
4589           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4590           _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
4591         ;;
4592       esac
4593       runpath_var='LD_RUN_PATH'
4594       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4595       ;;
4597     sysv4.3*)
4598       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4599       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4600       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
4601       ;;
4603     sysv4*MP*)
4604       if test -d /usr/nec; then
4605         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4606         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4607         runpath_var=LD_RUN_PATH
4608         hardcode_runpath_var=yes
4609         _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4610       fi
4611       ;;
4613     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4614       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4615       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4616       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4617       runpath_var='LD_RUN_PATH'
4619       if test "$GCC" = yes; then
4620         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4621         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4622       else
4623         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4624         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4625       fi
4626       ;;
4628     sysv5* | sco3.2v5* | sco5v6*)
4629       # Note: We can NOT use -z defs as we might desire, because we do not
4630       # link with -lc, and that would cause any symbols used from libc to
4631       # always be unresolved, which means just about no library would
4632       # ever link correctly.  If we're not using GNU ld we use -z text
4633       # though, which does catch some bad symbols but isn't as heavy-handed
4634       # as -z defs.
4635       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4636       _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4637       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4638       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4639       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4640       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4641       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4642       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4643       runpath_var='LD_RUN_PATH'
4645       if test "$GCC" = yes; then
4646         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4647         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4648       else
4649         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4650         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4651       fi
4652       ;;
4654     uts4*)
4655       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4656       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4657       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4658       ;;
4660     *)
4661       _LT_AC_TAGVAR(ld_shlibs, $1)=no
4662       ;;
4663     esac
4664   fi
4665 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4666 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4669 # Do we need to explicitly link libc?
4671 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
4672 x|xyes)
4673   # Assume -lc should be added
4674   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4676   if test "$enable_shared" = yes && test "$GCC" = yes; then
4677     case $_LT_AC_TAGVAR(archive_cmds, $1) in
4678     *'~'*)
4679       # FIXME: we may have to deal with multi-command sequences.
4680       ;;
4681     '$CC '*)
4682       # Test whether the compiler implicitly links with -lc since on some
4683       # systems, -lgcc has to come before -lc. If gcc already passes -lc
4684       # to ld, don't add -lc before -lgcc.
4685       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
4686       $rm conftest*
4687       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4689       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
4690         soname=conftest
4691         lib=conftest
4692         libobjs=conftest.$ac_objext
4693         deplibs=
4694         wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4695         pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4696         compiler_flags=-v
4697         linker_flags=-v
4698         verstring=
4699         output_objdir=.
4700         libname=conftest
4701         lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
4702         _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4703         if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
4704         then
4705           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4706         else
4707           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4708         fi
4709         _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
4710       else
4711         cat conftest.err 1>&5
4712       fi
4713       $rm conftest*
4714       AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
4715       ;;
4716     esac
4717   fi
4718   ;;
4719 esac
4720 ])# AC_LIBTOOL_PROG_LD_SHLIBS
4723 # _LT_AC_FILE_LTDLL_C
4724 # -------------------
4725 # Be careful that the start marker always follows a newline.
4726 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
4727 # /* ltdll.c starts here */
4728 # #define WIN32_LEAN_AND_MEAN
4729 # #include <windows.h>
4730 # #undef WIN32_LEAN_AND_MEAN
4731 # #include <stdio.h>
4733 # #ifndef __CYGWIN__
4734 # #  ifdef __CYGWIN32__
4735 # #    define __CYGWIN__ __CYGWIN32__
4736 # #  endif
4737 # #endif
4739 # #ifdef __cplusplus
4740 # extern "C" {
4741 # #endif
4742 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
4743 # #ifdef __cplusplus
4744 # }
4745 # #endif
4747 # #ifdef __CYGWIN__
4748 # #include <cygwin/cygwin_dll.h>
4749 # DECLARE_CYGWIN_DLL( DllMain );
4750 # #endif
4751 # HINSTANCE __hDllInstance_base;
4753 # BOOL APIENTRY
4754 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
4755 # {
4756 #   __hDllInstance_base = hInst;
4757 #   return TRUE;
4758 # }
4759 # /* ltdll.c ends here */
4760 ])# _LT_AC_FILE_LTDLL_C
4763 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
4764 # ---------------------------------
4765 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
4768 # old names
4769 AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
4770 AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
4771 AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
4772 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4773 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4774 AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
4775 AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
4777 # This is just to silence aclocal about the macro not being used
4778 ifelse([AC_DISABLE_FAST_INSTALL])
4780 AC_DEFUN([LT_AC_PROG_RC],
4781 [AC_CHECK_TOOL(RC, windres, no)
4785 # Cheap backport of AS_EXECUTABLE_P and required macros
4786 # from Autoconf 2.59; we should not use $as_executable_p directly.
4788 # _AS_TEST_PREPARE
4789 # ----------------
4790 m4_ifndef([_AS_TEST_PREPARE],
4791 [m4_defun([_AS_TEST_PREPARE],
4792 [if test -x / >/dev/null 2>&1; then
4793   as_executable_p='test -x'
4794 else
4795   as_executable_p='test -f'
4797 ])])# _AS_TEST_PREPARE
4799 # AS_EXECUTABLE_P
4800 # ---------------
4801 # Check whether a file is executable.
4802 m4_ifndef([AS_EXECUTABLE_P],
4803 [m4_defun([AS_EXECUTABLE_P],
4804 [AS_REQUIRE([_AS_TEST_PREPARE])dnl
4805 $as_executable_p $1[]dnl
4806 ])])# AS_EXECUTABLE_P
4808 ############################################################
4809 # NOTE: This macro has been submitted for inclusion into   #
4810 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
4811 #  a released version of Autoconf we should remove this    #
4812 #  macro and use it instead.                               #
4813 ############################################################
4814 # LT_AC_PROG_SED
4815 # --------------
4816 # Check for a fully-functional sed program, that truncates
4817 # as few characters as possible.  Prefer GNU sed if found.
4818 AC_DEFUN([LT_AC_PROG_SED],
4819 [AC_MSG_CHECKING([for a sed that does not truncate output])
4820 AC_CACHE_VAL(lt_cv_path_SED,
4821 [# Loop through the user's path and test for sed and gsed.
4822 # Then use that list of sed's as ones to test for truncation.
4823 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4824 for as_dir in $PATH
4826   IFS=$as_save_IFS
4827   test -z "$as_dir" && as_dir=.
4828   for lt_ac_prog in sed gsed; do
4829     for ac_exec_ext in '' $ac_executable_extensions; do
4830       if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
4831         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
4832       fi
4833     done
4834   done
4835 done
4836 IFS=$as_save_IFS
4837 lt_ac_max=0
4838 lt_ac_count=0
4839 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
4840 # along with /bin/sed that truncates output.
4841 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
4842   test ! -f $lt_ac_sed && continue
4843   cat /dev/null > conftest.in
4844   lt_ac_count=0
4845   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
4846   # Check for GNU sed and select it if it is found.
4847   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
4848     lt_cv_path_SED=$lt_ac_sed
4849     break
4850   fi
4851   while true; do
4852     cat conftest.in conftest.in >conftest.tmp
4853     mv conftest.tmp conftest.in
4854     cp conftest.in conftest.nl
4855     echo >>conftest.nl
4856     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
4857     cmp -s conftest.out conftest.nl || break
4858     # 10000 chars as input seems more than enough
4859     test $lt_ac_count -gt 10 && break
4860     lt_ac_count=`expr $lt_ac_count + 1`
4861     if test $lt_ac_count -gt $lt_ac_max; then
4862       lt_ac_max=$lt_ac_count
4863       lt_cv_path_SED=$lt_ac_sed
4864     fi
4865   done
4866 done
4868 SED=$lt_cv_path_SED
4869 AC_SUBST([SED])
4870 AC_MSG_RESULT([$SED])
4874 dnl Add some custom macros for pacman and libalpm
4876 dnl GCC_STACK_PROTECT_LIB
4877 dnl adds -lssp to LIBS if it is available
4878 dnl ssp is usually provided as part of libc, but was previously a separate lib
4879 dnl It does not hurt to add -lssp even if libc provides SSP - in that case
4880 dnl libssp will simply be ignored.
4881 AC_DEFUN([GCC_STACK_PROTECT_LIB],[
4882   AC_CACHE_CHECK([whether libssp exists], ssp_cv_lib,
4883     [ssp_old_libs="$LIBS"
4884      LIBS="$LIBS -lssp"
4885      AC_TRY_LINK(,, ssp_cv_lib=yes, ssp_cv_lib=no)
4886      LIBS="$ssp_old_libs"
4887     ])
4888   if test $ssp_cv_lib = yes; then
4889     LIBS="$LIBS -lssp"
4890   fi
4893 dnl GCC_STACK_PROTECT_CC
4894 dnl checks -fstack-protector-all with the C compiler, if it exists then updates
4895 dnl CFLAGS and defines ENABLE_SSP_CC
4896 AC_DEFUN([GCC_STACK_PROTECT_CC],[
4897   AC_LANG_ASSERT(C)
4898   if test "X$CC" != "X"; then
4899     AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector-all],
4900       ssp_cv_cc,
4901       [ssp_old_cflags="$CFLAGS"
4902        CFLAGS="$CFLAGS -fstack-protector-all"
4903        AC_TRY_COMPILE(,, ssp_cv_cc=yes, ssp_cv_cc=no)
4904        CFLAGS="$ssp_old_cflags"
4905       ])
4906     if test $ssp_cv_cc = yes; then
4907       CFLAGS="$CFLAGS -fstack-protector-all"
4908       AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
4909     fi
4910   fi
4913 dnl GCC_VISIBILITY_CC
4914 dnl checks -fvisibility=internal with the C compiler, if it exists then
4915 dnl defines ENABLE_VISIBILITY_CC in both configure script and Makefiles
4916 AC_DEFUN([GCC_VISIBILITY_CC],[
4917   AC_LANG_ASSERT(C)
4918   if test "X$CC" != "X"; then
4919     AC_CACHE_CHECK([whether ${CC} accepts -fvisibility=internal],
4920       visibility_cv_cc,
4921       [visibility_old_cflags="$CFLAGS"
4922        CFLAGS="$CFLAGS -fvisibility=internal"
4923        AC_TRY_COMPILE(,, visibility_cv_cc=yes, visibility_cv_cc=no)
4924        CFLAGS="$visibility_old_cflags"
4925       ])
4926     if test $visibility_cv_cc = yes; then
4927       AC_DEFINE([ENABLE_VISIBILITY_CC], 1, [Define if symbol visibility C support is enabled.])
4928     fi
4929         AM_CONDITIONAL([ENABLE_VISIBILITY_CC], test "x$visibility_cv_cc" = "xyes")
4930   fi
4933 dnl GCC_GNU89_INLINE_CC
4934 dnl checks -fgnu89-inline with the C compiler, if it exists then defines
4935 dnl ENABLE_GNU89_INLINE_CC in both configure script and Makefiles
4936 AC_DEFUN([GCC_GNU89_INLINE_CC],[
4937   AC_LANG_ASSERT(C)
4938   if test "X$CC" != "X"; then
4939     AC_CACHE_CHECK([for -fgnu89-inline],
4940     gnu89_inline_cv_cc,
4941     [ gnu89_inline_old_cflags="$CFLAGS"
4942       CFLAGS="$CFLAGS -fgnu89-inline"
4943       AC_TRY_COMPILE(,, gnu89_inline_cv_cc=yes, gnu89_inline_cv_cc=no)
4944       CFLAGS="$gnu89_inline_old_cflags"
4945     ])
4946     if test $gnu89_inline_cv_cc = yes; then
4947       AC_DEFINE([ENABLE_GNU89_INLINE_CC], 1, [Define if gnu89 inlining semantics should be used.])
4948     fi
4949         AM_CONDITIONAL([ENABLE_GNU89_INLINE_CC], test "x$gnu89_inline_cv_cc" = "xyes")
4950   fi