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