chiark / gitweb /
Import upstream sources.
[cparse] / aclocal.m4
1 # aclocal.m4 generated automatically by aclocal 1.5
2
3 # Copyright 1996, 1997, 1998, 1999, 2000, 2001
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.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 # This file is part of DisOrder.
15 # Copyright (C) 2004 Richard Kettlewell
16 #
17 # This program is free software; you can redistribute it and/or modify
18 # it under the terms of the GNU General Public License as published by
19 # the Free Software Foundation; either version 2 of the License, or
20 # (at your option) any later version.
21 #
22 # This program is distributed in the hope that it will be useful, but
23 # WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
25 # General Public License for more details.
26 #
27 # You should have received a copy of the GNU General Public License
28 # along with this program; if not, write to the Free Software
29 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
30 # USA
31 #
32
33 AC_DEFUN([RJK_FIND_GC_H],[
34   AC_CACHE_CHECK([looking for <gc.h>],[rjk_cv_gc_h],[
35     AC_PREPROC_IFELSE([
36                        #include <gc.h>
37                       ],
38                       [rjk_cv_gc_h="on default include path"],[
39       oldCPPFLAGS="${CPPFLAGS}"
40       for dir in /usr/include/gc /usr/local/include/gc; do
41         if test "x$GCC" = xyes; then
42           CPPFLAGS="${oldCPPFLAGS} -isystem $dir"
43         else
44           CPPFLAGS="${oldCPPFLAGS} -I$dir"
45         fi
46         AC_PREPROC_IFELSE([
47                            #include <gc.h>
48                           ],
49                           [rjk_cv_gc_h=$dir;break],[rjk_cv_gc_h="not found"])
50       done
51       CPPFLAGS="${oldCPPFLAGS}"
52    ])
53   ])
54   case "$rjk_cv_gc_h" in
55   "not found" )
56     missing_headers="$missing_headers gc.h"
57     ;;
58   /* )
59     if test "x$GCC" = xyes; then
60       CPPFLAGS="${CPPFLAGS} -isystem $rjk_cv_gc_h"
61     else
62       CPPFLAGS="${CPPFLAGS} -I$rjk_cv_gc_h"
63     fi
64     ;;
65   esac
66 ])
67
68 # Do all the work for Automake.  This macro actually does too much --
69 # some checks are only needed if your package does certain things.
70 # But this isn't really a big deal.
71
72 # serial 5
73
74 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
75 # written in clear, in which case automake, when reading aclocal.m4,
76 # will think it sees a *use*, and therefore will trigger all it's
77 # C support machinery.  Also note that it means that autoscan, seeing
78 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
79
80
81 # We require 2.13 because we rely on SHELL being computed by configure.
82 AC_PREREQ([2.13])
83
84 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
85 # -----------------------------------------------------------
86 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
87 # The purpose of this macro is to provide the user with a means to
88 # check macros which are provided without letting her know how the
89 # information is coded.
90 # If this macro is not defined by Autoconf, define it here.
91 ifdef([AC_PROVIDE_IFELSE],
92       [],
93       [define([AC_PROVIDE_IFELSE],
94               [ifdef([AC_PROVIDE_$1],
95                      [$2], [$3])])])
96
97
98 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
99 # ----------------------------------------------
100 AC_DEFUN([AM_INIT_AUTOMAKE],
101 [AC_REQUIRE([AC_PROG_INSTALL])dnl
102 # test to see if srcdir already configured
103 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
104    test -f $srcdir/config.status; then
105   AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
106 fi
107
108 # Define the identity of the package.
109 PACKAGE=$1
110 AC_SUBST(PACKAGE)dnl
111 VERSION=$2
112 AC_SUBST(VERSION)dnl
113 ifelse([$3],,
114 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
115 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
116
117 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
118 # the ones we care about.
119 ifdef([m4_pattern_allow],
120       [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
121
122 # Autoconf 2.50 always computes EXEEXT.  However we need to be
123 # compatible with 2.13, for now.  So we always define EXEEXT, but we
124 # don't compute it.
125 AC_SUBST(EXEEXT)
126 # Similar for OBJEXT -- only we only use OBJEXT if the user actually
127 # requests that it be used.  This is a bit dumb.
128 : ${OBJEXT=o}
129 AC_SUBST(OBJEXT)
130
131 # Some tools Automake needs.
132 AC_REQUIRE([AM_SANITY_CHECK])dnl
133 AC_REQUIRE([AC_ARG_PROGRAM])dnl
134 AM_MISSING_PROG(ACLOCAL, aclocal)
135 AM_MISSING_PROG(AUTOCONF, autoconf)
136 AM_MISSING_PROG(AUTOMAKE, automake)
137 AM_MISSING_PROG(AUTOHEADER, autoheader)
138 AM_MISSING_PROG(MAKEINFO, makeinfo)
139 AM_MISSING_PROG(AMTAR, tar)
140 AM_PROG_INSTALL_SH
141 AM_PROG_INSTALL_STRIP
142 # We need awk for the "check" target.  The system "awk" is bad on
143 # some platforms.
144 AC_REQUIRE([AC_PROG_AWK])dnl
145 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
146 AC_REQUIRE([AM_DEP_TRACK])dnl
147 AC_REQUIRE([AM_SET_DEPDIR])dnl
148 AC_PROVIDE_IFELSE([AC_PROG_][CC],
149                   [_AM_DEPENDENCIES(CC)],
150                   [define([AC_PROG_][CC],
151                           defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
152 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
153                   [_AM_DEPENDENCIES(CXX)],
154                   [define([AC_PROG_][CXX],
155                           defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
156 ])
157
158 #
159 # Check to make sure that the build environment is sane.
160 #
161
162 # serial 3
163
164 # AM_SANITY_CHECK
165 # ---------------
166 AC_DEFUN([AM_SANITY_CHECK],
167 [AC_MSG_CHECKING([whether build environment is sane])
168 # Just in case
169 sleep 1
170 echo timestamp > conftest.file
171 # Do `set' in a subshell so we don't clobber the current shell's
172 # arguments.  Must try -L first in case configure is actually a
173 # symlink; some systems play weird games with the mod time of symlinks
174 # (eg FreeBSD returns the mod time of the symlink's containing
175 # directory).
176 if (
177    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
178    if test "$[*]" = "X"; then
179       # -L didn't work.
180       set X `ls -t $srcdir/configure conftest.file`
181    fi
182    rm -f conftest.file
183    if test "$[*]" != "X $srcdir/configure conftest.file" \
184       && test "$[*]" != "X conftest.file $srcdir/configure"; then
185
186       # If neither matched, then we have a broken ls.  This can happen
187       # if, for instance, CONFIG_SHELL is bash and it inherits a
188       # broken ls alias from the environment.  This has actually
189       # happened.  Such a system could not be considered "sane".
190       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
191 alias in your environment])
192    fi
193
194    test "$[2]" = conftest.file
195    )
196 then
197    # Ok.
198    :
199 else
200    AC_MSG_ERROR([newly created file is older than distributed files!
201 Check your system clock])
202 fi
203 AC_MSG_RESULT(yes)])
204
205
206 # serial 2
207
208 # AM_MISSING_PROG(NAME, PROGRAM)
209 # ------------------------------
210 AC_DEFUN([AM_MISSING_PROG],
211 [AC_REQUIRE([AM_MISSING_HAS_RUN])
212 $1=${$1-"${am_missing_run}$2"}
213 AC_SUBST($1)])
214
215
216 # AM_MISSING_HAS_RUN
217 # ------------------
218 # Define MISSING if not defined so far and test if it supports --run.
219 # If it does, set am_missing_run to use it, otherwise, to nothing.
220 AC_DEFUN([AM_MISSING_HAS_RUN],
221 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
222 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
223 # Use eval to expand $SHELL
224 if eval "$MISSING --run true"; then
225   am_missing_run="$MISSING --run "
226 else
227   am_missing_run=
228   am_backtick='`'
229   AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
230 fi
231 ])
232
233 # AM_AUX_DIR_EXPAND
234
235 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
236 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
237 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
238 #
239 # Of course, Automake must honor this variable whenever it calls a
240 # tool from the auxiliary directory.  The problem is that $srcdir (and
241 # therefore $ac_aux_dir as well) can be either absolute or relative,
242 # depending on how configure is run.  This is pretty annoying, since
243 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
244 # source directory, any form will work fine, but in subdirectories a
245 # relative path needs to be adjusted first.
246 #
247 # $ac_aux_dir/missing
248 #    fails when called from a subdirectory if $ac_aux_dir is relative
249 # $top_srcdir/$ac_aux_dir/missing
250 #    fails if $ac_aux_dir is absolute,
251 #    fails when called from a subdirectory in a VPATH build with
252 #          a relative $ac_aux_dir
253 #
254 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
255 # are both prefixed by $srcdir.  In an in-source build this is usually
256 # harmless because $srcdir is `.', but things will broke when you
257 # start a VPATH build or use an absolute $srcdir.
258 #
259 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
260 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
261 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
262 # and then we would define $MISSING as
263 #   MISSING="\${SHELL} $am_aux_dir/missing"
264 # This will work as long as MISSING is not called from configure, because
265 # unfortunately $(top_srcdir) has no meaning in configure.
266 # However there are other variables, like CC, which are often used in
267 # configure, and could therefore not use this "fixed" $ac_aux_dir.
268 #
269 # Another solution, used here, is to always expand $ac_aux_dir to an
270 # absolute PATH.  The drawback is that using absolute paths prevent a
271 # configured tree to be moved without reconfiguration.
272
273 AC_DEFUN([AM_AUX_DIR_EXPAND], [
274 # expand $ac_aux_dir to an absolute path
275 am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
276 ])
277
278 # AM_PROG_INSTALL_SH
279 # ------------------
280 # Define $install_sh.
281 AC_DEFUN([AM_PROG_INSTALL_SH],
282 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
283 install_sh=${install_sh-"$am_aux_dir/install-sh"}
284 AC_SUBST(install_sh)])
285
286 # One issue with vendor `install' (even GNU) is that you can't
287 # specify the program used to strip binaries.  This is especially
288 # annoying in cross-compiling environments, where the build's strip
289 # is unlikely to handle the host's binaries.
290 # Fortunately install-sh will honor a STRIPPROG variable, so we
291 # always use install-sh in `make install-strip', and initialize
292 # STRIPPROG with the value of the STRIP variable (set by the user).
293 AC_DEFUN([AM_PROG_INSTALL_STRIP],
294 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
295 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
296 AC_SUBST([INSTALL_STRIP_PROGRAM])])
297
298 # serial 4                                              -*- Autoconf -*-
299
300
301
302 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
303 # written in clear, in which case automake, when reading aclocal.m4,
304 # will think it sees a *use*, and therefore will trigger all it's
305 # C support machinery.  Also note that it means that autoscan, seeing
306 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
307
308
309
310 # _AM_DEPENDENCIES(NAME)
311 # ---------------------
312 # See how the compiler implements dependency checking.
313 # NAME is "CC", "CXX" or "OBJC".
314 # We try a few techniques and use that to set a single cache variable.
315 #
316 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
317 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
318 # dependency, and given that the user is not expected to run this macro,
319 # just rely on AC_PROG_CC.
320 AC_DEFUN([_AM_DEPENDENCIES],
321 [AC_REQUIRE([AM_SET_DEPDIR])dnl
322 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
323 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
324 AC_REQUIRE([AM_DEP_TRACK])dnl
325
326 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
327        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
328        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
329        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
330                    [depcc="$$1"   am_compiler_list=])
331
332 AC_CACHE_CHECK([dependency style of $depcc],
333                [am_cv_$1_dependencies_compiler_type],
334 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
335   # We make a subdir and do the tests there.  Otherwise we can end up
336   # making bogus files that we don't know about and never remove.  For
337   # instance it was reported that on HP-UX the gcc test will end up
338   # making a dummy file named `D' -- because `-MD' means `put the output
339   # in D'.
340   mkdir conftest.dir
341   # Copy depcomp to subdir because otherwise we won't find it if we're
342   # using a relative directory.
343   cp "$am_depcomp" conftest.dir
344   cd conftest.dir
345
346   am_cv_$1_dependencies_compiler_type=none
347   if test "$am_compiler_list" = ""; then
348      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
349   fi
350   for depmode in $am_compiler_list; do
351     # We need to recreate these files for each test, as the compiler may
352     # overwrite some of them when testing with obscure command lines.
353     # This happens at least with the AIX C compiler.
354     echo '#include "conftest.h"' > conftest.c
355     echo 'int i;' > conftest.h
356     echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
357
358     case $depmode in
359     nosideeffect)
360       # after this tag, mechanisms are not by side-effect, so they'll
361       # only be used when explicitly requested
362       if test "x$enable_dependency_tracking" = xyes; then
363         continue
364       else
365         break
366       fi
367       ;;
368     none) break ;;
369     esac
370     # We check with `-c' and `-o' for the sake of the "dashmstdout"
371     # mode.  It turns out that the SunPro C++ compiler does not properly
372     # handle `-M -o', and we need to detect this.
373     if depmode=$depmode \
374        source=conftest.c object=conftest.o \
375        depfile=conftest.Po tmpdepfile=conftest.TPo \
376        $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
377        grep conftest.h conftest.Po > /dev/null 2>&1 &&
378        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
379       am_cv_$1_dependencies_compiler_type=$depmode
380       break
381     fi
382   done
383
384   cd ..
385   rm -rf conftest.dir
386 else
387   am_cv_$1_dependencies_compiler_type=none
388 fi
389 ])
390 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
391 AC_SUBST([$1DEPMODE])
392 ])
393
394
395 # AM_SET_DEPDIR
396 # -------------
397 # Choose a directory name for dependency files.
398 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
399 AC_DEFUN([AM_SET_DEPDIR],
400 [rm -f .deps 2>/dev/null
401 mkdir .deps 2>/dev/null
402 if test -d .deps; then
403   DEPDIR=.deps
404 else
405   # MS-DOS does not allow filenames that begin with a dot.
406   DEPDIR=_deps
407 fi
408 rmdir .deps 2>/dev/null
409 AC_SUBST(DEPDIR)
410 ])
411
412
413 # AM_DEP_TRACK
414 # ------------
415 AC_DEFUN([AM_DEP_TRACK],
416 [AC_ARG_ENABLE(dependency-tracking,
417 [  --disable-dependency-tracking Speeds up one-time builds
418   --enable-dependency-tracking  Do not reject slow dependency extractors])
419 if test "x$enable_dependency_tracking" != xno; then
420   am_depcomp="$ac_aux_dir/depcomp"
421   AMDEPBACKSLASH='\'
422 fi
423 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
424 pushdef([subst], defn([AC_SUBST]))
425 subst(AMDEPBACKSLASH)
426 popdef([subst])
427 ])
428
429 # Generate code to set up dependency tracking.
430 # This macro should only be invoked once -- use via AC_REQUIRE.
431 # Usage:
432 # AM_OUTPUT_DEPENDENCY_COMMANDS
433
434 #
435 # This code is only required when automatic dependency tracking
436 # is enabled.  FIXME.  This creates each `.P' file that we will
437 # need in order to bootstrap the dependency handling code.
438 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
439 AC_OUTPUT_COMMANDS([
440 test x"$AMDEP_TRUE" != x"" ||
441 for mf in $CONFIG_FILES; do
442   case "$mf" in
443   Makefile) dirpart=.;;
444   */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
445   *) continue;;
446   esac
447   grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
448   # Extract the definition of DEP_FILES from the Makefile without
449   # running `make'.
450   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
451   test -z "$DEPDIR" && continue
452   # When using ansi2knr, U may be empty or an underscore; expand it
453   U=`sed -n -e '/^U = / s///p' < "$mf"`
454   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
455   # We invoke sed twice because it is the simplest approach to
456   # changing $(DEPDIR) to its actual value in the expansion.
457   for file in `sed -n -e '
458     /^DEP_FILES = .*\\\\$/ {
459       s/^DEP_FILES = //
460       :loop
461         s/\\\\$//
462         p
463         n
464         /\\\\$/ b loop
465       p
466     }
467     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
468        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
469     # Make sure the directory exists.
470     test -f "$dirpart/$file" && continue
471     fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
472     $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
473     # echo "creating $dirpart/$file"
474     echo '# dummy' > "$dirpart/$file"
475   done
476 done
477 ], [AMDEP_TRUE="$AMDEP_TRUE"
478 ac_aux_dir="$ac_aux_dir"])])
479
480 # AM_MAKE_INCLUDE()
481 # -----------------
482 # Check to see how make treats includes.
483 AC_DEFUN([AM_MAKE_INCLUDE],
484 [am_make=${MAKE-make}
485 cat > confinc << 'END'
486 doit:
487         @echo done
488 END
489 # If we don't find an include directive, just comment out the code.
490 AC_MSG_CHECKING([for style of include used by $am_make])
491 am__include='#'
492 am__quote=
493 _am_result=none
494 # First try GNU make style include.
495 echo "include confinc" > confmf
496 # We grep out `Entering directory' and `Leaving directory'
497 # messages which can occur if `w' ends up in MAKEFLAGS.
498 # In particular we don't look at `^make:' because GNU make might
499 # be invoked under some other name (usually "gmake"), in which
500 # case it prints its new name instead of `make'.
501 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
502    am__include=include
503    am__quote=
504    _am_result=GNU
505 fi
506 # Now try BSD make style include.
507 if test "$am__include" = "#"; then
508    echo '.include "confinc"' > confmf
509    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
510       am__include=.include
511       am__quote='"'
512       _am_result=BSD
513    fi
514 fi
515 AC_SUBST(am__include)
516 AC_SUBST(am__quote)
517 AC_MSG_RESULT($_am_result)
518 rm -f confinc confmf
519 ])
520
521 # serial 3
522
523 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
524 # -------------------------------------
525 # Define a conditional.
526 #
527 # FIXME: Once using 2.50, use this:
528 # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
529 AC_DEFUN([AM_CONDITIONAL],
530 [ifelse([$1], [TRUE],
531         [errprint(__file__:__line__: [$0: invalid condition: $1
532 ])dnl
533 m4exit(1)])dnl
534 ifelse([$1], [FALSE],
535        [errprint(__file__:__line__: [$0: invalid condition: $1
536 ])dnl
537 m4exit(1)])dnl
538 AC_SUBST([$1_TRUE])
539 AC_SUBST([$1_FALSE])
540 if $2; then
541   $1_TRUE=
542   $1_FALSE='#'
543 else
544   $1_TRUE='#'
545   $1_FALSE=
546 fi])
547
548 # Like AC_CONFIG_HEADER, but automatically create stamp file.
549
550 # serial 3
551
552 # When config.status generates a header, we must update the stamp-h file.
553 # This file resides in the same directory as the config header
554 # that is generated.  We must strip everything past the first ":",
555 # and everything past the last "/".
556
557 AC_PREREQ([2.12])
558
559 AC_DEFUN([AM_CONFIG_HEADER],
560 [ifdef([AC_FOREACH],dnl
561          [dnl init our file count if it isn't already
562          m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
563          dnl prepare to store our destination file list for use in config.status
564          AC_FOREACH([_AM_File], [$1],
565                     [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
566                     m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
567                     dnl and add it to the list of files AC keeps track of, along
568                     dnl with our hook
569                     AC_CONFIG_HEADERS(_AM_File,
570 dnl COMMANDS, [, INIT-CMDS]
571 [# update the timestamp
572 echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
573 ][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
574                     m4_popdef([_AM_Dest])])],dnl
575 [AC_CONFIG_HEADER([$1])
576   AC_OUTPUT_COMMANDS(
577    ifelse(patsubst([$1], [[^ ]], []),
578           [],
579           [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
580            patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
581 [am_indx=1
582 for am_file in $1; do
583   case " \$CONFIG_HEADERS " in
584   *" \$am_file "*)
585     am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
586     if test -n "\$am_dir"; then
587       am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
588       for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
589         am_tmpdir=\$am_tmpdir\$am_subdir/
590         if test ! -d \$am_tmpdir; then
591           mkdir \$am_tmpdir
592         fi
593       done
594     fi
595     echo timestamp > "\$am_dir"stamp-h\$am_indx
596     ;;
597   esac
598   am_indx=\`expr \$am_indx + 1\`
599 done])
600 ])]) # AM_CONFIG_HEADER
601
602 # _AM_DIRNAME(PATH)
603 # -----------------
604 # Like AS_DIRNAME, only do it during macro expansion
605 AC_DEFUN([_AM_DIRNAME],
606        [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
607               m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
608                     m4_if(m4_regexp([$1], [^/.*]), -1,
609                           [.],
610                           m4_patsubst([$1], [^\(/\).*], [\1])),
611                     m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
612               m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
613 ]) # _AM_DIRNAME
614
615
616 # AM_PROG_LEX
617 # Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
618 AC_DEFUN([AM_PROG_LEX],
619 [AC_REQUIRE([AM_MISSING_HAS_RUN])
620 AC_CHECK_PROGS(LEX, flex lex, [${am_missing_run}flex])
621 AC_PROG_LEX
622 AC_DECL_YYTEXT])
623
624 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
625
626 # serial 46 AC_PROG_LIBTOOL
627
628 AC_DEFUN([AC_PROG_LIBTOOL],
629 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
630
631 # This can be used to rebuild libtool when needed
632 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
633
634 # Always use our own libtool.
635 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
636 AC_SUBST(LIBTOOL)dnl
637
638 # Prevent multiple expansion
639 define([AC_PROG_LIBTOOL], [])
640 ])
641
642 AC_DEFUN([AC_LIBTOOL_SETUP],
643 [AC_PREREQ(2.13)dnl
644 AC_REQUIRE([AC_ENABLE_SHARED])dnl
645 AC_REQUIRE([AC_ENABLE_STATIC])dnl
646 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
647 AC_REQUIRE([AC_CANONICAL_HOST])dnl
648 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
649 AC_REQUIRE([AC_PROG_CC])dnl
650 AC_REQUIRE([AC_PROG_LD])dnl
651 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
652 AC_REQUIRE([AC_PROG_NM])dnl
653 AC_REQUIRE([AC_PROG_LN_S])dnl
654 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
655 AC_REQUIRE([AC_OBJEXT])dnl
656 AC_REQUIRE([AC_EXEEXT])dnl
657 dnl
658
659 _LT_AC_PROG_ECHO_BACKSLASH
660 # Only perform the check for file, if the check method requires it
661 case $deplibs_check_method in
662 file_magic*)
663   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
664     AC_PATH_MAGIC
665   fi
666   ;;
667 esac
668
669 AC_CHECK_TOOL(RANLIB, ranlib, :)
670 AC_CHECK_TOOL(STRIP, strip, :)
671
672 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
673 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
674 enable_win32_dll=yes, enable_win32_dll=no)
675
676 AC_ARG_ENABLE(libtool-lock,
677   [  --disable-libtool-lock  avoid locking (might break parallel builds)])
678 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
679
680 # Some flags need to be propagated to the compiler or linker for good
681 # libtool support.
682 case $host in
683 *-*-irix6*)
684   # Find out which ABI we are using.
685   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
686   if AC_TRY_EVAL(ac_compile); then
687     case `/usr/bin/file conftest.$ac_objext` in
688     *32-bit*)
689       LD="${LD-ld} -32"
690       ;;
691     *N32*)
692       LD="${LD-ld} -n32"
693       ;;
694     *64-bit*)
695       LD="${LD-ld} -64"
696       ;;
697     esac
698   fi
699   rm -rf conftest*
700   ;;
701
702 *-*-sco3.2v5*)
703   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
704   SAVE_CFLAGS="$CFLAGS"
705   CFLAGS="$CFLAGS -belf"
706   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
707     [AC_LANG_SAVE
708      AC_LANG_C
709      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
710      AC_LANG_RESTORE])
711   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
712     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
713     CFLAGS="$SAVE_CFLAGS"
714   fi
715   ;;
716
717 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
718 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
719   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
720   AC_CHECK_TOOL(AS, as, false)
721   AC_CHECK_TOOL(OBJDUMP, objdump, false)
722
723   # recent cygwin and mingw systems supply a stub DllMain which the user
724   # can override, but on older systems we have to supply one
725   AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
726     [AC_TRY_LINK([],
727       [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
728       DllMain (0, 0, 0);],
729       [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
730
731   case $host/$CC in
732   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
733     # old mingw systems require "-dll" to link a DLL, while more recent ones
734     # require "-mdll"
735     SAVE_CFLAGS="$CFLAGS"
736     CFLAGS="$CFLAGS -mdll"
737     AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
738       [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
739     CFLAGS="$SAVE_CFLAGS" ;;
740   *-*-cygwin* | *-*-pw32*)
741     # cygwin systems need to pass --dll to the linker, and not link
742     # crt.o which will require a WinMain@16 definition.
743     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
744   esac
745   ;;
746   ])
747 esac
748
749 _LT_AC_LTCONFIG_HACK
750
751 ])
752
753 # AC_LIBTOOL_HEADER_ASSERT
754 # ------------------------
755 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
756 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
757     [lt_cv_func_assert_works],
758     [case $host in
759     *-*-solaris*)
760       if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
761         case `$CC --version 2>/dev/null` in
762         [[12]].*) lt_cv_func_assert_works=no ;;
763         *)        lt_cv_func_assert_works=yes ;;
764         esac
765       fi
766       ;;
767     esac])
768
769 if test "x$lt_cv_func_assert_works" = xyes; then
770   AC_CHECK_HEADERS(assert.h)
771 fi
772 ])# AC_LIBTOOL_HEADER_ASSERT
773
774 # _LT_AC_CHECK_DLFCN
775 # --------------------
776 AC_DEFUN([_LT_AC_CHECK_DLFCN],
777 [AC_CHECK_HEADERS(dlfcn.h)
778 ])# _LT_AC_CHECK_DLFCN
779
780 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
781 # ---------------------------------
782 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
783 [AC_REQUIRE([AC_CANONICAL_HOST])
784 AC_REQUIRE([AC_PROG_NM])
785 AC_REQUIRE([AC_OBJEXT])
786 # Check for command to grab the raw symbol name followed by C symbol from nm.
787 AC_MSG_CHECKING([command to parse $NM output])
788 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
789
790 # These are sane defaults that work on at least a few old systems.
791 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
792
793 # Character class describing NM global symbol codes.
794 symcode='[[BCDEGRST]]'
795
796 # Regexp to match symbols that can be accessed directly from C.
797 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
798
799 # Transform the above into a raw symbol and a C symbol.
800 symxfrm='\1 \2\3 \3'
801
802 # Transform an extracted symbol line into a proper C declaration
803 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
804
805 # Transform an extracted symbol line into symbol name and symbol address
806 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
807
808 # Define system-specific variables.
809 case $host_os in
810 aix*)
811   symcode='[[BCDT]]'
812   ;;
813 cygwin* | mingw* | pw32*)
814   symcode='[[ABCDGISTW]]'
815   ;;
816 hpux*) # Its linker distinguishes data from code symbols
817   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
818   lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
819   ;;
820 irix* | nonstopux*)
821   symcode='[[BCDEGRST]]'
822   ;;
823 solaris* | sysv5*)
824   symcode='[[BDT]]'
825   ;;
826 sysv4)
827   symcode='[[DFNSTU]]'
828   ;;
829 esac
830
831 # Handle CRLF in mingw tool chain
832 opt_cr=
833 case $host_os in
834 mingw*)
835   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
836   ;;
837 esac
838
839 # If we're using GNU nm, then use its standard symbol codes.
840 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
841   symcode='[[ABCDGISTW]]'
842 fi
843
844 # Try without a prefix undercore, then with it.
845 for ac_symprfx in "" "_"; do
846
847   # Write the raw and C identifiers.
848 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[        ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
849
850   # Check to see that the pipe works correctly.
851   pipe_works=no
852   rm -f conftest*
853   cat > conftest.$ac_ext <<EOF
854 #ifdef __cplusplus
855 extern "C" {
856 #endif
857 char nm_test_var;
858 void nm_test_func(){}
859 #ifdef __cplusplus
860 }
861 #endif
862 int main(){nm_test_var='a';nm_test_func();return(0);}
863 EOF
864
865   if AC_TRY_EVAL(ac_compile); then
866     # Now try to grab the symbols.
867     nlist=conftest.nm
868     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
869       # Try sorting and uniquifying the output.
870       if sort "$nlist" | uniq > "$nlist"T; then
871         mv -f "$nlist"T "$nlist"
872       else
873         rm -f "$nlist"T
874       fi
875
876       # Make sure that we snagged all the symbols we need.
877       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
878         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
879           cat <<EOF > conftest.$ac_ext
880 #ifdef __cplusplus
881 extern "C" {
882 #endif
883
884 EOF
885           # Now generate the symbol file.
886           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
887
888           cat <<EOF >> conftest.$ac_ext
889 #if defined (__STDC__) && __STDC__
890 # define lt_ptr void *
891 #else
892 # define lt_ptr char *
893 # define const
894 #endif
895
896 /* The mapping between symbol names and symbols. */
897 const struct {
898   const char *name;
899   lt_ptr address;
900 }
901 lt_preloaded_symbols[[]] =
902 {
903 EOF
904           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
905           cat <<\EOF >> conftest.$ac_ext
906   {0, (lt_ptr) 0}
907 };
908
909 #ifdef __cplusplus
910 }
911 #endif
912 EOF
913           # Now try linking the two files.
914           mv conftest.$ac_objext conftstm.$ac_objext
915           save_LIBS="$LIBS"
916           save_CFLAGS="$CFLAGS"
917           LIBS="conftstm.$ac_objext"
918           CFLAGS="$CFLAGS$no_builtin_flag"
919           if AC_TRY_EVAL(ac_link) && test -s conftest; then
920             pipe_works=yes
921           fi
922           LIBS="$save_LIBS"
923           CFLAGS="$save_CFLAGS"
924         else
925           echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
926         fi
927       else
928         echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
929       fi
930     else
931       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
932     fi
933   else
934     echo "$progname: failed program was:" >&AC_FD_CC
935     cat conftest.$ac_ext >&5
936   fi
937   rm -f conftest* conftst*
938
939   # Do not use the global_symbol_pipe unless it works.
940   if test "$pipe_works" = yes; then
941     break
942   else
943     lt_cv_sys_global_symbol_pipe=
944   fi
945 done
946 ])
947 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
948 if test -z "$lt_cv_sys_global_symbol_pipe"; then
949   global_symbol_to_cdecl=
950   global_symbol_to_c_name_address=
951 else
952   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
953   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
954 fi
955 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
956 then
957   AC_MSG_RESULT(failed)
958 else
959   AC_MSG_RESULT(ok)
960 fi
961 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
962
963 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
964 # ---------------------------------
965 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
966 [# Find the correct PATH separator.  Usually this is `:', but
967 # DJGPP uses `;' like DOS.
968 if test "X${PATH_SEPARATOR+set}" != Xset; then
969   UNAME=${UNAME-`uname 2>/dev/null`}
970   case X$UNAME in
971     *-DOS) lt_cv_sys_path_separator=';' ;;
972     *)     lt_cv_sys_path_separator=':' ;;
973   esac
974   PATH_SEPARATOR=$lt_cv_sys_path_separator
975 fi
976 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
977
978 # _LT_AC_PROG_ECHO_BACKSLASH
979 # --------------------------
980 # Add some code to the start of the generated configure script which
981 # will find an echo command which doesn't interpret backslashes.
982 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
983 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
984                               [AC_DIVERT_PUSH(NOTICE)])
985 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
986
987 # Check that we are running under the correct shell.
988 SHELL=${CONFIG_SHELL-/bin/sh}
989
990 case X$ECHO in
991 X*--fallback-echo)
992   # Remove one level of quotation (which was required for Make).
993   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
994   ;;
995 esac
996
997 echo=${ECHO-echo}
998 if test "X[$]1" = X--no-reexec; then
999   # Discard the --no-reexec flag, and continue.
1000   shift
1001 elif test "X[$]1" = X--fallback-echo; then
1002   # Avoid inline document here, it may be left over
1003   :
1004 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1005   # Yippee, $echo works!
1006   :
1007 else
1008   # Restart under the correct shell.
1009   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1010 fi
1011
1012 if test "X[$]1" = X--fallback-echo; then
1013   # used as fallback echo
1014   shift
1015   cat <<EOF
1016 $*
1017 EOF
1018   exit 0
1019 fi
1020
1021 # The HP-UX ksh and POSIX shell print the target directory to stdout
1022 # if CDPATH is set.
1023 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1024
1025 if test -z "$ECHO"; then
1026 if test "X${echo_test_string+set}" != Xset; then
1027 # find a string as large as possible, as long as the shell can cope with it
1028   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1029     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1030     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1031        echo_test_string="`eval $cmd`" &&
1032        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1033     then
1034       break
1035     fi
1036   done
1037 fi
1038
1039 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1040    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1041    test "X$echo_testing_string" = "X$echo_test_string"; then
1042   :
1043 else
1044   # The Solaris, AIX, and Digital Unix default echo programs unquote
1045   # backslashes.  This makes it impossible to quote backslashes using
1046   #   echo "$something" | sed 's/\\/\\\\/g'
1047   #
1048   # So, first we look for a working echo in the user's PATH.
1049
1050   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1051   for dir in $PATH /usr/ucb; do
1052     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1053        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1054        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1055        test "X$echo_testing_string" = "X$echo_test_string"; then
1056       echo="$dir/echo"
1057       break
1058     fi
1059   done
1060   IFS="$save_ifs"
1061
1062   if test "X$echo" = Xecho; then
1063     # We didn't find a better echo, so look for alternatives.
1064     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1065        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1066        test "X$echo_testing_string" = "X$echo_test_string"; then
1067       # This shell has a builtin print -r that does the trick.
1068       echo='print -r'
1069     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1070          test "X$CONFIG_SHELL" != X/bin/ksh; then
1071       # If we have ksh, try running configure again with it.
1072       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1073       export ORIGINAL_CONFIG_SHELL
1074       CONFIG_SHELL=/bin/ksh
1075       export CONFIG_SHELL
1076       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1077     else
1078       # Try using printf.
1079       echo='printf %s\n'
1080       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1081          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1082          test "X$echo_testing_string" = "X$echo_test_string"; then
1083         # Cool, printf works
1084         :
1085       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1086            test "X$echo_testing_string" = 'X\t' &&
1087            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1088            test "X$echo_testing_string" = "X$echo_test_string"; then
1089         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1090         export CONFIG_SHELL
1091         SHELL="$CONFIG_SHELL"
1092         export SHELL
1093         echo="$CONFIG_SHELL [$]0 --fallback-echo"
1094       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1095            test "X$echo_testing_string" = 'X\t' &&
1096            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1097            test "X$echo_testing_string" = "X$echo_test_string"; then
1098         echo="$CONFIG_SHELL [$]0 --fallback-echo"
1099       else
1100         # maybe with a smaller string...
1101         prev=:
1102
1103         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1104           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1105           then
1106             break
1107           fi
1108           prev="$cmd"
1109         done
1110
1111         if test "$prev" != 'sed 50q "[$]0"'; then
1112           echo_test_string=`eval $prev`
1113           export echo_test_string
1114           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1115         else
1116           # Oops.  We lost completely, so just stick with echo.
1117           echo=echo
1118         fi
1119       fi
1120     fi
1121   fi
1122 fi
1123 fi
1124
1125 # Copy echo and quote the copy suitably for passing to libtool from
1126 # the Makefile, instead of quoting the original, which is used later.
1127 ECHO=$echo
1128 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1129    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1130 fi
1131
1132 AC_SUBST(ECHO)
1133 AC_DIVERT_POP
1134 ])# _LT_AC_PROG_ECHO_BACKSLASH
1135
1136 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1137 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1138 # ------------------------------------------------------------------
1139 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1140 [if test "$cross_compiling" = yes; then :
1141   [$4]
1142 else
1143   AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1144   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1145   lt_status=$lt_dlunknown
1146   cat > conftest.$ac_ext <<EOF
1147 [#line __oline__ "configure"
1148 #include "confdefs.h"
1149
1150 #if HAVE_DLFCN_H
1151 #include <dlfcn.h>
1152 #endif
1153
1154 #include <stdio.h>
1155
1156 #ifdef RTLD_GLOBAL
1157 #  define LT_DLGLOBAL           RTLD_GLOBAL
1158 #else
1159 #  ifdef DL_GLOBAL
1160 #    define LT_DLGLOBAL         DL_GLOBAL
1161 #  else
1162 #    define LT_DLGLOBAL         0
1163 #  endif
1164 #endif
1165
1166 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1167    find out it does not work in some platform. */
1168 #ifndef LT_DLLAZY_OR_NOW
1169 #  ifdef RTLD_LAZY
1170 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
1171 #  else
1172 #    ifdef DL_LAZY
1173 #      define LT_DLLAZY_OR_NOW          DL_LAZY
1174 #    else
1175 #      ifdef RTLD_NOW
1176 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
1177 #      else
1178 #        ifdef DL_NOW
1179 #          define LT_DLLAZY_OR_NOW      DL_NOW
1180 #        else
1181 #          define LT_DLLAZY_OR_NOW      0
1182 #        endif
1183 #      endif
1184 #    endif
1185 #  endif
1186 #endif
1187
1188 #ifdef __cplusplus
1189 extern "C" void exit (int);
1190 #endif
1191
1192 void fnord() { int i=42;}
1193 int main ()
1194 {
1195   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1196   int status = $lt_dlunknown;
1197
1198   if (self)
1199     {
1200       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1201       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1202       /* dlclose (self); */
1203     }
1204
1205     exit (status);
1206 }]
1207 EOF
1208   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1209     (./conftest; exit; ) 2>/dev/null
1210     lt_status=$?
1211     case x$lt_status in
1212       x$lt_dlno_uscore) $1 ;;
1213       x$lt_dlneed_uscore) $2 ;;
1214       x$lt_unknown|x*) $3 ;;
1215     esac
1216   else :
1217     # compilation failed
1218     $3
1219   fi
1220 fi
1221 rm -fr conftest*
1222 ])# _LT_AC_TRY_DLOPEN_SELF
1223
1224 # AC_LIBTOOL_DLOPEN_SELF
1225 # -------------------
1226 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1227 [if test "x$enable_dlopen" != xyes; then
1228   enable_dlopen=unknown
1229   enable_dlopen_self=unknown
1230   enable_dlopen_self_static=unknown
1231 else
1232   lt_cv_dlopen=no
1233   lt_cv_dlopen_libs=
1234
1235   case $host_os in
1236   beos*)
1237     lt_cv_dlopen="load_add_on"
1238     lt_cv_dlopen_libs=
1239     lt_cv_dlopen_self=yes
1240     ;;
1241
1242   cygwin* | mingw* | pw32*)
1243     lt_cv_dlopen="LoadLibrary"
1244     lt_cv_dlopen_libs=
1245    ;;
1246
1247   *)
1248     AC_CHECK_FUNC([shl_load],
1249           [lt_cv_dlopen="shl_load"],
1250       [AC_CHECK_LIB([dld], [shl_load],
1251             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1252         [AC_CHECK_FUNC([dlopen],
1253               [lt_cv_dlopen="dlopen"],
1254           [AC_CHECK_LIB([dl], [dlopen],
1255                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1256             [AC_CHECK_LIB([svld], [dlopen],
1257                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1258               [AC_CHECK_LIB([dld], [dld_link],
1259                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1260               ])
1261             ])
1262           ])
1263         ])
1264       ])
1265     ;;
1266   esac
1267
1268   if test "x$lt_cv_dlopen" != xno; then
1269     enable_dlopen=yes
1270   else
1271     enable_dlopen=no
1272   fi
1273
1274   case $lt_cv_dlopen in
1275   dlopen)
1276     save_CPPFLAGS="$CPPFLAGS"
1277     AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1278     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1279
1280     save_LDFLAGS="$LDFLAGS"
1281     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1282
1283     save_LIBS="$LIBS"
1284     LIBS="$lt_cv_dlopen_libs $LIBS"
1285
1286     AC_CACHE_CHECK([whether a program can dlopen itself],
1287           lt_cv_dlopen_self, [dnl
1288           _LT_AC_TRY_DLOPEN_SELF(
1289             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1290             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1291     ])
1292
1293     if test "x$lt_cv_dlopen_self" = xyes; then
1294       LDFLAGS="$LDFLAGS $link_static_flag"
1295       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1296           lt_cv_dlopen_self_static, [dnl
1297           _LT_AC_TRY_DLOPEN_SELF(
1298             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1299             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1300       ])
1301     fi
1302
1303     CPPFLAGS="$save_CPPFLAGS"
1304     LDFLAGS="$save_LDFLAGS"
1305     LIBS="$save_LIBS"
1306     ;;
1307   esac
1308
1309   case $lt_cv_dlopen_self in
1310   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1311   *) enable_dlopen_self=unknown ;;
1312   esac
1313
1314   case $lt_cv_dlopen_self_static in
1315   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1316   *) enable_dlopen_self_static=unknown ;;
1317   esac
1318 fi
1319 ])# AC_LIBTOOL_DLOPEN_SELF
1320
1321 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1322 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1323 # Sed substitution that helps us do robust quoting.  It backslashifies
1324 # metacharacters that are still active within double-quoted strings.
1325 Xsed='sed -e s/^X//'
1326 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1327
1328 # Same as above, but do not quote variable references.
1329 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1330
1331 # Sed substitution to delay expansion of an escaped shell variable in a
1332 # double_quote_subst'ed string.
1333 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1334
1335 # Constants:
1336 rm="rm -f"
1337
1338 # Global variables:
1339 default_ofile=libtool
1340 can_build_shared=yes
1341
1342 # All known linkers require a `.a' archive for static linking (except M$VC,
1343 # which needs '.lib').
1344 libext=a
1345 ltmain="$ac_aux_dir/ltmain.sh"
1346 ofile="$default_ofile"
1347 with_gnu_ld="$lt_cv_prog_gnu_ld"
1348 need_locks="$enable_libtool_lock"
1349
1350 old_CC="$CC"
1351 old_CFLAGS="$CFLAGS"
1352
1353 # Set sane defaults for various variables
1354 test -z "$AR" && AR=ar
1355 test -z "$AR_FLAGS" && AR_FLAGS=cru
1356 test -z "$AS" && AS=as
1357 test -z "$CC" && CC=cc
1358 test -z "$DLLTOOL" && DLLTOOL=dlltool
1359 test -z "$LD" && LD=ld
1360 test -z "$LN_S" && LN_S="ln -s"
1361 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1362 test -z "$NM" && NM=nm
1363 test -z "$OBJDUMP" && OBJDUMP=objdump
1364 test -z "$RANLIB" && RANLIB=:
1365 test -z "$STRIP" && STRIP=:
1366 test -z "$ac_objext" && ac_objext=o
1367
1368 if test x"$host" != x"$build"; then
1369   ac_tool_prefix=${host_alias}-
1370 else
1371   ac_tool_prefix=
1372 fi
1373
1374 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1375 case $host_os in
1376 linux-gnu*) ;;
1377 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1378 esac
1379
1380 case $host_os in
1381 aix3*)
1382   # AIX sometimes has problems with the GCC collect2 program.  For some
1383   # reason, if we set the COLLECT_NAMES environment variable, the problems
1384   # vanish in a puff of smoke.
1385   if test "X${COLLECT_NAMES+set}" != Xset; then
1386     COLLECT_NAMES=
1387     export COLLECT_NAMES
1388   fi
1389   ;;
1390 esac
1391
1392 # Determine commands to create old-style static archives.
1393 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1394 old_postinstall_cmds='chmod 644 $oldlib'
1395 old_postuninstall_cmds=
1396
1397 if test -n "$RANLIB"; then
1398   case $host_os in
1399   openbsd*)
1400     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1401     ;;
1402   *)
1403     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1404     ;;
1405   esac
1406   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1407 fi
1408
1409 # Allow CC to be a program name with arguments.
1410 set dummy $CC
1411 compiler="[$]2"
1412
1413 AC_MSG_CHECKING([for objdir])
1414 rm -f .libs 2>/dev/null
1415 mkdir .libs 2>/dev/null
1416 if test -d .libs; then
1417   objdir=.libs
1418 else
1419   # MS-DOS does not allow filenames that begin with a dot.
1420   objdir=_libs
1421 fi
1422 rmdir .libs 2>/dev/null
1423 AC_MSG_RESULT($objdir)
1424
1425
1426 AC_ARG_WITH(pic,
1427 [  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
1428 pic_mode="$withval", pic_mode=default)
1429 test -z "$pic_mode" && pic_mode=default
1430
1431 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1432 # in isolation, and that seeing it set (from the cache) indicates that
1433 # the associated values are set (in the cache) correctly too.
1434 AC_MSG_CHECKING([for $compiler option to produce PIC])
1435 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1436 [ lt_cv_prog_cc_pic=
1437   lt_cv_prog_cc_shlib=
1438   lt_cv_prog_cc_wl=
1439   lt_cv_prog_cc_static=
1440   lt_cv_prog_cc_no_builtin=
1441   lt_cv_prog_cc_can_build_shared=$can_build_shared
1442
1443   if test "$GCC" = yes; then
1444     lt_cv_prog_cc_wl='-Wl,'
1445     lt_cv_prog_cc_static='-static'
1446
1447     case $host_os in
1448     aix*)
1449       # Below there is a dirty hack to force normal static linking with -ldl
1450       # The problem is because libdl dynamically linked with both libc and
1451       # libC (AIX C++ library), which obviously doesn't included in libraries
1452       # list by gcc. This cause undefined symbols with -static flags.
1453       # This hack allows C programs to be linked with "-static -ldl", but
1454       # not sure about C++ programs.
1455       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1456       ;;
1457     amigaos*)
1458       # FIXME: we need at least 68020 code to build shared libraries, but
1459       # adding the `-m68020' flag to GCC prevents building anything better,
1460       # like `-m68040'.
1461       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1462       ;;
1463     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1464       # PIC is the default for these OSes.
1465       ;;
1466     darwin* | rhapsody*)
1467       # PIC is the default on this platform
1468       # Common symbols not allowed in MH_DYLIB files
1469       lt_cv_prog_cc_pic='-fno-common'
1470       ;;
1471     cygwin* | mingw* | pw32* | os2*)
1472       # This hack is so that the source file can tell whether it is being
1473       # built for inclusion in a dll (and should export symbols for example).
1474       lt_cv_prog_cc_pic='-DDLL_EXPORT'
1475       ;;
1476     sysv4*MP*)
1477       if test -d /usr/nec; then
1478          lt_cv_prog_cc_pic=-Kconform_pic
1479       fi
1480       ;;
1481     *)
1482       lt_cv_prog_cc_pic='-fPIC'
1483       ;;
1484     esac
1485   else
1486     # PORTME Check for PIC flags for the system compiler.
1487     case $host_os in
1488     aix3* | aix4* | aix5*)
1489       lt_cv_prog_cc_wl='-Wl,'
1490       # All AIX code is PIC.
1491       if test "$host_cpu" = ia64; then
1492         # AIX 5 now supports IA64 processor
1493         lt_cv_prog_cc_static='-Bstatic'
1494       else
1495         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1496       fi
1497       ;;
1498
1499     hpux9* | hpux10* | hpux11*)
1500       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1501       lt_cv_prog_cc_wl='-Wl,'
1502       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1503       lt_cv_prog_cc_pic='+Z'
1504       ;;
1505
1506     irix5* | irix6* | nonstopux*)
1507       lt_cv_prog_cc_wl='-Wl,'
1508       lt_cv_prog_cc_static='-non_shared'
1509       # PIC (with -KPIC) is the default.
1510       ;;
1511
1512     cygwin* | mingw* | pw32* | os2*)
1513       # This hack is so that the source file can tell whether it is being
1514       # built for inclusion in a dll (and should export symbols for example).
1515       lt_cv_prog_cc_pic='-DDLL_EXPORT'
1516       ;;
1517
1518     newsos6)
1519       lt_cv_prog_cc_pic='-KPIC'
1520       lt_cv_prog_cc_static='-Bstatic'
1521       ;;
1522
1523     osf3* | osf4* | osf5*)
1524       # All OSF/1 code is PIC.
1525       lt_cv_prog_cc_wl='-Wl,'
1526       lt_cv_prog_cc_static='-non_shared'
1527       ;;
1528
1529     sco3.2v5*)
1530       lt_cv_prog_cc_pic='-Kpic'
1531       lt_cv_prog_cc_static='-dn'
1532       lt_cv_prog_cc_shlib='-belf'
1533       ;;
1534
1535     solaris*)
1536       lt_cv_prog_cc_pic='-KPIC'
1537       lt_cv_prog_cc_static='-Bstatic'
1538       lt_cv_prog_cc_wl='-Wl,'
1539       ;;
1540
1541     sunos4*)
1542       lt_cv_prog_cc_pic='-PIC'
1543       lt_cv_prog_cc_static='-Bstatic'
1544       lt_cv_prog_cc_wl='-Qoption ld '
1545       ;;
1546
1547     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1548       lt_cv_prog_cc_pic='-KPIC'
1549       lt_cv_prog_cc_static='-Bstatic'
1550       if test "x$host_vendor" = xsni; then
1551         lt_cv_prog_cc_wl='-LD'
1552       else
1553         lt_cv_prog_cc_wl='-Wl,'
1554       fi
1555       ;;
1556
1557     uts4*)
1558       lt_cv_prog_cc_pic='-pic'
1559       lt_cv_prog_cc_static='-Bstatic'
1560       ;;
1561
1562     sysv4*MP*)
1563       if test -d /usr/nec ;then
1564         lt_cv_prog_cc_pic='-Kconform_pic'
1565         lt_cv_prog_cc_static='-Bstatic'
1566       fi
1567       ;;
1568
1569     *)
1570       lt_cv_prog_cc_can_build_shared=no
1571       ;;
1572     esac
1573   fi
1574 ])
1575 if test -z "$lt_cv_prog_cc_pic"; then
1576   AC_MSG_RESULT([none])
1577 else
1578   AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1579
1580   # Check to make sure the pic_flag actually works.
1581   AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1582   AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1583     save_CFLAGS="$CFLAGS"
1584     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1585     AC_TRY_COMPILE([], [], [dnl
1586       case $host_os in
1587       hpux9* | hpux10* | hpux11*)
1588         # On HP-UX, both CC and GCC only warn that PIC is supported... then
1589         # they create non-PIC objects.  So, if there were any warnings, we
1590         # assume that PIC is not supported.
1591         if test -s conftest.err; then
1592           lt_cv_prog_cc_pic_works=no
1593         else
1594           lt_cv_prog_cc_pic_works=yes
1595         fi
1596         ;;
1597       *)
1598         lt_cv_prog_cc_pic_works=yes
1599         ;;
1600       esac
1601     ], [dnl
1602       lt_cv_prog_cc_pic_works=no
1603     ])
1604     CFLAGS="$save_CFLAGS"
1605   ])
1606
1607   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1608     lt_cv_prog_cc_pic=
1609     lt_cv_prog_cc_can_build_shared=no
1610   else
1611     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1612   fi
1613
1614   AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1615 fi
1616
1617 # Check for any special shared library compilation flags.
1618 if test -n "$lt_cv_prog_cc_shlib"; then
1619   AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1620   if echo "$old_CC $old_CFLAGS " | egrep -e "[[         ]]$lt_cv_prog_cc_shlib[[        ]]" >/dev/null; then :
1621   else
1622    AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1623     lt_cv_prog_cc_can_build_shared=no
1624   fi
1625 fi
1626
1627 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1628 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1629   lt_cv_prog_cc_static_works=no
1630   save_LDFLAGS="$LDFLAGS"
1631   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1632   AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1633   LDFLAGS="$save_LDFLAGS"
1634 ])
1635
1636 # Belt *and* braces to stop my trousers falling down:
1637 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1638 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1639
1640 pic_flag="$lt_cv_prog_cc_pic"
1641 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1642 wl="$lt_cv_prog_cc_wl"
1643 link_static_flag="$lt_cv_prog_cc_static"
1644 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1645 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1646
1647
1648 # Check to see if options -o and -c are simultaneously supported by compiler
1649 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1650 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1651 $rm -r conftest 2>/dev/null
1652 mkdir conftest
1653 cd conftest
1654 echo "int some_variable = 0;" > conftest.$ac_ext
1655 mkdir out
1656 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1657 # that will create temporary files in the current directory regardless of
1658 # the output directory.  Thus, making CWD read-only will cause this test
1659 # to fail, enabling locking or at least warning the user not to do parallel
1660 # builds.
1661 chmod -w .
1662 save_CFLAGS="$CFLAGS"
1663 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1664 compiler_c_o=no
1665 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1666   # The compiler can only warn and ignore the option if not recognized
1667   # So say no if there are warnings
1668   if test -s out/conftest.err; then
1669     lt_cv_compiler_c_o=no
1670   else
1671     lt_cv_compiler_c_o=yes
1672   fi
1673 else
1674   # Append any errors to the config.log.
1675   cat out/conftest.err 1>&AC_FD_CC
1676   lt_cv_compiler_c_o=no
1677 fi
1678 CFLAGS="$save_CFLAGS"
1679 chmod u+w .
1680 $rm conftest* out/*
1681 rmdir out
1682 cd ..
1683 rmdir conftest
1684 $rm -r conftest 2>/dev/null
1685 ])
1686 compiler_c_o=$lt_cv_compiler_c_o
1687 AC_MSG_RESULT([$compiler_c_o])
1688
1689 if test x"$compiler_c_o" = x"yes"; then
1690   # Check to see if we can write to a .lo
1691   AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1692   AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1693   lt_cv_compiler_o_lo=no
1694   save_CFLAGS="$CFLAGS"
1695   CFLAGS="$CFLAGS -c -o conftest.lo"
1696   save_objext="$ac_objext"
1697   ac_objext=lo
1698   AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1699     # The compiler can only warn and ignore the option if not recognized
1700     # So say no if there are warnings
1701     if test -s conftest.err; then
1702       lt_cv_compiler_o_lo=no
1703     else
1704       lt_cv_compiler_o_lo=yes
1705     fi
1706   ])
1707   ac_objext="$save_objext"
1708   CFLAGS="$save_CFLAGS"
1709   ])
1710   compiler_o_lo=$lt_cv_compiler_o_lo
1711   AC_MSG_RESULT([$compiler_o_lo])
1712 else
1713   compiler_o_lo=no
1714 fi
1715
1716 # Check to see if we can do hard links to lock some files if needed
1717 hard_links="nottested"
1718 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1719   # do not overwrite the value of need_locks provided by the user
1720   AC_MSG_CHECKING([if we can lock with hard links])
1721   hard_links=yes
1722   $rm conftest*
1723   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1724   touch conftest.a
1725   ln conftest.a conftest.b 2>&5 || hard_links=no
1726   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1727   AC_MSG_RESULT([$hard_links])
1728   if test "$hard_links" = no; then
1729     AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1730     need_locks=warn
1731   fi
1732 else
1733   need_locks=no
1734 fi
1735
1736 if test "$GCC" = yes; then
1737   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1738   AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1739   echo "int some_variable = 0;" > conftest.$ac_ext
1740   save_CFLAGS="$CFLAGS"
1741   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1742   compiler_rtti_exceptions=no
1743   AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1744     # The compiler can only warn and ignore the option if not recognized
1745     # So say no if there are warnings
1746     if test -s conftest.err; then
1747       compiler_rtti_exceptions=no
1748     else
1749       compiler_rtti_exceptions=yes
1750     fi
1751   ])
1752   CFLAGS="$save_CFLAGS"
1753   AC_MSG_RESULT([$compiler_rtti_exceptions])
1754
1755   if test "$compiler_rtti_exceptions" = "yes"; then
1756     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1757   else
1758     no_builtin_flag=' -fno-builtin'
1759   fi
1760 fi
1761
1762 # See if the linker supports building shared libraries.
1763 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1764
1765 allow_undefined_flag=
1766 no_undefined_flag=
1767 need_lib_prefix=unknown
1768 need_version=unknown
1769 # when you set need_version to no, make sure it does not cause -set_version
1770 # flags to be left without arguments
1771 archive_cmds=
1772 archive_expsym_cmds=
1773 old_archive_from_new_cmds=
1774 old_archive_from_expsyms_cmds=
1775 export_dynamic_flag_spec=
1776 whole_archive_flag_spec=
1777 thread_safe_flag_spec=
1778 hardcode_into_libs=no
1779 hardcode_libdir_flag_spec=
1780 hardcode_libdir_separator=
1781 hardcode_direct=no
1782 hardcode_minus_L=no
1783 hardcode_shlibpath_var=unsupported
1784 runpath_var=
1785 link_all_deplibs=unknown
1786 always_export_symbols=no
1787 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1788 # include_expsyms should be a list of space-separated symbols to be *always*
1789 # included in the symbol list
1790 include_expsyms=
1791 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1792 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1793 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1794 # as well as any symbol that contains `d'.
1795 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1796 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1797 # platforms (ab)use it in PIC code, but their linkers get confused if
1798 # the symbol is explicitly referenced.  Since portable code cannot
1799 # rely on this symbol name, it's probably fine to never include it in
1800 # preloaded symbol tables.
1801 extract_expsyms_cmds=
1802
1803 case $host_os in
1804 cygwin* | mingw* | pw32*)
1805   # FIXME: the MSVC++ port hasn't been tested in a loooong time
1806   # When not using gcc, we currently assume that we are using
1807   # Microsoft Visual C++.
1808   if test "$GCC" != yes; then
1809     with_gnu_ld=no
1810   fi
1811   ;;
1812 openbsd*)
1813   with_gnu_ld=no
1814   ;;
1815 esac
1816
1817 ld_shlibs=yes
1818 if test "$with_gnu_ld" = yes; then
1819   # If archive_cmds runs LD, not CC, wlarc should be empty
1820   wlarc='${wl}'
1821
1822   # See if GNU ld supports shared libraries.
1823   case $host_os in
1824   aix3* | aix4* | aix5*)
1825     # On AIX, the GNU linker is very broken
1826     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1827     ld_shlibs=no
1828     cat <<EOF 1>&2
1829
1830 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1831 *** to be unable to reliably create shared libraries on AIX.
1832 *** Therefore, libtool is disabling shared libraries support.  If you
1833 *** really care for shared libraries, you may want to modify your PATH
1834 *** so that a non-GNU linker is found, and then restart.
1835
1836 EOF
1837     ;;
1838
1839   amigaos*)
1840     archive_cmds='$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)'
1841     hardcode_libdir_flag_spec='-L$libdir'
1842     hardcode_minus_L=yes
1843
1844     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1845     # that the semantics of dynamic libraries on AmigaOS, at least up
1846     # to version 4, is to share data among multiple programs linked
1847     # with the same dynamic library.  Since this doesn't match the
1848     # behavior of shared libraries on other platforms, we can use
1849     # them.
1850     ld_shlibs=no
1851     ;;
1852
1853   beos*)
1854     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1855       allow_undefined_flag=unsupported
1856       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1857       # support --undefined.  This deserves some investigation.  FIXME
1858       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1859     else
1860       ld_shlibs=no
1861     fi
1862     ;;
1863
1864   cygwin* | mingw* | pw32*)
1865     # hardcode_libdir_flag_spec is actually meaningless, as there is
1866     # no search path for DLLs.
1867     hardcode_libdir_flag_spec='-L$libdir'
1868     allow_undefined_flag=unsupported
1869     always_export_symbols=yes
1870
1871     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1872       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1873       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1874       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1875       else $CC -o impgen impgen.c ; fi)~
1876       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1877
1878     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1879
1880     # cygwin and mingw dlls have different entry points and sets of symbols
1881     # to exclude.
1882     # FIXME: what about values for MSVC?
1883     dll_entry=__cygwin_dll_entry@12
1884     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1885     case $host_os in
1886     mingw*)
1887       # mingw values
1888       dll_entry=_DllMainCRTStartup@12
1889       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1890       ;;
1891     esac
1892
1893     # mingw and cygwin differ, and it's simplest to just exclude the union
1894     # of the two symbol sets.
1895     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1896
1897     # recent cygwin and mingw systems supply a stub DllMain which the user
1898     # can override, but on older systems we have to supply one (in ltdll.c)
1899     if test "x$lt_cv_need_dllmain" = "xyes"; then
1900       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1901       ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
1902         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1903     else
1904       ltdll_obj=
1905       ltdll_cmds=
1906     fi
1907
1908     # Extract the symbol export list from an `--export-all' def file,
1909     # then regenerate the def file from the symbol export list, so that
1910     # the compiled dll only exports the symbol export list.
1911     # Be careful not to strip the DATA tag left be newer dlltools.
1912     export_symbols_cmds="$ltdll_cmds"'
1913       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1914       sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1915
1916     # If the export-symbols file already is a .def file (1st line
1917     # is EXPORTS), use it as is.
1918     # If DATA tags from a recent dlltool are present, honour them!
1919     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
1920         cp $export_symbols $output_objdir/$soname-def;
1921       else
1922         echo EXPORTS > $output_objdir/$soname-def;
1923         _lt_hint=1;
1924         cat $export_symbols | while read symbol; do
1925          set dummy \$symbol;
1926          case \[$]# in
1927            2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1928            *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1929          esac;
1930          _lt_hint=`expr 1 + \$_lt_hint`;
1931         done;
1932       fi~
1933       '"$ltdll_cmds"'
1934       $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1935       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
1936       $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1937       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
1938       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1939     ;;
1940
1941   netbsd*)
1942     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1943       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1944       wlarc=
1945     else
1946       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1947       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1948     fi
1949     ;;
1950
1951   solaris* | sysv5*)
1952     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1953       ld_shlibs=no
1954       cat <<EOF 1>&2
1955
1956 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1957 *** create shared libraries on Solaris systems.  Therefore, libtool
1958 *** is disabling shared libraries support.  We urge you to upgrade GNU
1959 *** binutils to release 2.9.1 or newer.  Another option is to modify
1960 *** your PATH or compiler configuration so that the native linker is
1961 *** used, and then restart.
1962
1963 EOF
1964     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1965       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1966       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1967     else
1968       ld_shlibs=no
1969     fi
1970     ;;
1971
1972   sunos4*)
1973     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1974     wlarc=
1975     hardcode_direct=yes
1976     hardcode_shlibpath_var=no
1977     ;;
1978
1979   *)
1980     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1981       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1982       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1983     else
1984       ld_shlibs=no
1985     fi
1986     ;;
1987   esac
1988
1989   if test "$ld_shlibs" = yes; then
1990     runpath_var=LD_RUN_PATH
1991     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1992     export_dynamic_flag_spec='${wl}--export-dynamic'
1993     case $host_os in
1994     cygwin* | mingw* | pw32*)
1995       # dlltool doesn't understand --whole-archive et. al.
1996       whole_archive_flag_spec=
1997       ;;
1998     *)
1999       # ancient GNU ld didn't support --whole-archive et. al.
2000       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2001         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2002       else
2003         whole_archive_flag_spec=
2004       fi
2005       ;;
2006     esac
2007   fi
2008 else
2009   # PORTME fill in a description of your system's linker (not GNU ld)
2010   case $host_os in
2011   aix3*)
2012     allow_undefined_flag=unsupported
2013     always_export_symbols=yes
2014     archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
2015     # Note: this linker hardcodes the directories in LIBPATH if there
2016     # are no directories specified by -L.
2017     hardcode_minus_L=yes
2018     if test "$GCC" = yes && test -z "$link_static_flag"; then
2019       # Neither direct hardcoding nor static linking is supported with a
2020       # broken collect2.
2021       hardcode_direct=unsupported
2022     fi
2023     ;;
2024
2025   aix4* | aix5*)
2026     if test "$host_cpu" = ia64; then
2027       # On IA64, the linker does run time linking by default, so we don't
2028       # have to do anything special.
2029       aix_use_runtimelinking=no
2030       exp_sym_flag='-Bexport'
2031       no_entry_flag=""
2032     else
2033       aix_use_runtimelinking=no
2034
2035       # Test if we are trying to use run time linking or normal
2036       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2037       # need to do runtime linking.
2038       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2039         for ld_flag in $LDFLAGS; do
2040           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
2041             aix_use_runtimelinking=yes
2042             break
2043           fi
2044         done
2045       esac
2046
2047       exp_sym_flag='-bexport'
2048       no_entry_flag='-bnoentry'
2049     fi
2050
2051     # When large executables or shared objects are built, AIX ld can
2052     # have problems creating the table of contents.  If linking a library
2053     # or program results in "error TOC overflow" add -mminimal-toc to
2054     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2055     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2056
2057     hardcode_direct=yes
2058     archive_cmds=''
2059     hardcode_libdir_separator=':'
2060     if test "$GCC" = yes; then
2061       case $host_os in aix4.[[012]]|aix4.[[012]].*)
2062         collect2name=`${CC} -print-prog-name=collect2`
2063         if test -f "$collect2name" && \
2064           strings "$collect2name" | grep resolve_lib_name >/dev/null
2065         then
2066           # We have reworked collect2
2067           hardcode_direct=yes
2068         else
2069           # We have old collect2
2070           hardcode_direct=unsupported
2071           # It fails to find uninstalled libraries when the uninstalled
2072           # path is not listed in the libpath.  Setting hardcode_minus_L
2073           # to unsupported forces relinking
2074           hardcode_minus_L=yes
2075           hardcode_libdir_flag_spec='-L$libdir'
2076           hardcode_libdir_separator=
2077         fi
2078       esac
2079
2080       shared_flag='-shared'
2081     else
2082       # not using gcc
2083       if test "$host_cpu" = ia64; then
2084         shared_flag='${wl}-G'
2085       else
2086         if test "$aix_use_runtimelinking" = yes; then
2087           shared_flag='${wl}-G'
2088         else
2089           shared_flag='${wl}-bM:SRE'
2090         fi
2091       fi
2092     fi
2093
2094     # It seems that -bexpall can do strange things, so it is better to
2095     # generate a list of symbols to export.
2096     always_export_symbols=yes
2097     if test "$aix_use_runtimelinking" = yes; then
2098       # Warning - without using the other runtime loading flags (-brtl),
2099       # -berok will link without error, but may produce a broken library.
2100       allow_undefined_flag='-berok'
2101       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2102       archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2103     else
2104       if test "$host_cpu" = ia64; then
2105         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2106         allow_undefined_flag="-z nodefs"
2107         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2108       else
2109         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2110         # Warning - without using the other run time loading flags,
2111         # -berok will link without error, but may produce a broken library.
2112         allow_undefined_flag='${wl}-berok'
2113         # This is a bit strange, but is similar to how AIX traditionally builds
2114         # it's shared libraries.
2115         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
2116       fi
2117     fi
2118     ;;
2119
2120   amigaos*)
2121     archive_cmds='$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)'
2122     hardcode_libdir_flag_spec='-L$libdir'
2123     hardcode_minus_L=yes
2124     # see comment about different semantics on the GNU ld section
2125     ld_shlibs=no
2126     ;;
2127
2128   cygwin* | mingw* | pw32*)
2129     # When not using gcc, we currently assume that we are using
2130     # Microsoft Visual C++.
2131     # hardcode_libdir_flag_spec is actually meaningless, as there is
2132     # no search path for DLLs.
2133     hardcode_libdir_flag_spec=' '
2134     allow_undefined_flag=unsupported
2135     # Tell ltmain to make .lib files, not .a files.
2136     libext=lib
2137     # FIXME: Setting linknames here is a bad hack.
2138     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2139     # The linker will automatically build a .lib file if we build a DLL.
2140     old_archive_from_new_cmds='true'
2141     # FIXME: Should let the user specify the lib program.
2142     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2143     fix_srcfile_path='`cygpath -w "$srcfile"`'
2144     ;;
2145
2146   darwin* | rhapsody*)
2147     case "$host_os" in
2148     rhapsody* | darwin1.[[012]])
2149       allow_undefined_flag='-undefined suppress'
2150       ;;
2151     *) # Darwin 1.3 on
2152       allow_undefined_flag='-flat_namespace -undefined suppress'
2153       ;;
2154     esac
2155     # FIXME: Relying on posixy $() will cause problems for
2156     #        cross-compilation, but unfortunately the echo tests do not
2157     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
2158     #        `"' quotes if we put them in here... so don't!
2159     archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
2160     # We need to add '_' to the symbols in $export_symbols first
2161     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2162     hardcode_direct=yes
2163     hardcode_shlibpath_var=no
2164     whole_archive_flag_spec='-all_load $convenience'
2165     ;;
2166
2167   freebsd1*)
2168     ld_shlibs=no
2169     ;;
2170
2171   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2172   # support.  Future versions do this automatically, but an explicit c++rt0.o
2173   # does not break anything, and helps significantly (at the cost of a little
2174   # extra space).
2175   freebsd2.2*)
2176     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2177     hardcode_libdir_flag_spec='-R$libdir'
2178     hardcode_direct=yes
2179     hardcode_shlibpath_var=no
2180     ;;
2181
2182   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2183   freebsd2*)
2184     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2185     hardcode_direct=yes
2186     hardcode_minus_L=yes
2187     hardcode_shlibpath_var=no
2188     ;;
2189
2190   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2191   freebsd*)
2192     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2193     hardcode_libdir_flag_spec='-R$libdir'
2194     hardcode_direct=yes
2195     hardcode_shlibpath_var=no
2196     ;;
2197
2198   hpux9* | hpux10* | hpux11*)
2199     case $host_os in
2200     hpux9*) archive_cmds='$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' ;;
2201     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2202     esac
2203     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2204     hardcode_libdir_separator=:
2205     hardcode_direct=yes
2206     hardcode_minus_L=yes # Not in the search PATH, but as the default
2207                          # location of the library.
2208     export_dynamic_flag_spec='${wl}-E'
2209     ;;
2210
2211   irix5* | irix6* | nonstopux*)
2212     if test "$GCC" = yes; then
2213       archive_cmds='$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'
2214     else
2215       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2216     fi
2217     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2218     hardcode_libdir_separator=:
2219     link_all_deplibs=yes
2220     ;;
2221
2222   netbsd*)
2223     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2224       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
2225     else
2226       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
2227     fi
2228     hardcode_libdir_flag_spec='-R$libdir'
2229     hardcode_direct=yes
2230     hardcode_shlibpath_var=no
2231     ;;
2232
2233   newsos6)
2234     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2235     hardcode_direct=yes
2236     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2237     hardcode_libdir_separator=:
2238     hardcode_shlibpath_var=no
2239     ;;
2240
2241   openbsd*)
2242     hardcode_direct=yes
2243     hardcode_shlibpath_var=no
2244     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2245       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2246       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2247       export_dynamic_flag_spec='${wl}-E'
2248     else
2249       case "$host_os" in
2250       openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2251         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2252         hardcode_libdir_flag_spec='-R$libdir'
2253         ;;
2254       *)
2255         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2256         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2257         ;;
2258       esac
2259     fi
2260     ;;
2261
2262   os2*)
2263     hardcode_libdir_flag_spec='-L$libdir'
2264     hardcode_minus_L=yes
2265     allow_undefined_flag=unsupported
2266     archive_cmds='$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'
2267     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2268     ;;
2269
2270   osf3*)
2271     if test "$GCC" = yes; then
2272       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2273       archive_cmds='$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'
2274     else
2275       allow_undefined_flag=' -expect_unresolved \*'
2276       archive_cmds='$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'
2277     fi
2278     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2279     hardcode_libdir_separator=:
2280     ;;
2281
2282   osf4* | osf5*)        # as osf3* with the addition of -msym flag
2283     if test "$GCC" = yes; then
2284       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2285       archive_cmds='$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'
2286       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2287     else
2288       allow_undefined_flag=' -expect_unresolved \*'
2289       archive_cmds='$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'
2290       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2291       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
2292
2293       #Both c and cxx compiler support -rpath directly
2294       hardcode_libdir_flag_spec='-rpath $libdir'
2295     fi
2296     hardcode_libdir_separator=:
2297     ;;
2298
2299   sco3.2v5*)
2300     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2301     hardcode_shlibpath_var=no
2302     runpath_var=LD_RUN_PATH
2303     hardcode_runpath_var=yes
2304     export_dynamic_flag_spec='${wl}-Bexport'
2305     ;;
2306
2307   solaris*)
2308     # gcc --version < 3.0 without binutils cannot create self contained
2309     # shared libraries reliably, requiring libgcc.a to resolve some of
2310     # the object symbols generated in some cases.  Libraries that use
2311     # assert need libgcc.a to resolve __eprintf, for example.  Linking
2312     # a copy of libgcc.a into every shared library to guarantee resolving
2313     # such symbols causes other problems:  According to Tim Van Holder
2314     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2315     # (to the application) exception stack for one thing.
2316     no_undefined_flag=' -z defs'
2317     if test "$GCC" = yes; then
2318       case `$CC --version 2>/dev/null` in
2319       [[12]].*)
2320         cat <<EOF 1>&2
2321
2322 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2323 *** create self contained shared libraries on Solaris systems, without
2324 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
2325 *** -no-undefined support, which will at least allow you to build shared
2326 *** libraries.  However, you may find that when you link such libraries
2327 *** into an application without using GCC, you have to manually add
2328 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
2329 *** upgrade to a newer version of GCC.  Another option is to rebuild your
2330 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2331
2332 EOF
2333         no_undefined_flag=
2334         ;;
2335       esac
2336     fi
2337     # $CC -shared without GNU ld will not create a library from C++
2338     # object files and a static libstdc++, better avoid it by now
2339     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2340     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2341                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2342     hardcode_libdir_flag_spec='-R$libdir'
2343     hardcode_shlibpath_var=no
2344     case $host_os in
2345     solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2346     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2347       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2348     esac
2349     link_all_deplibs=yes
2350     ;;
2351
2352   sunos4*)
2353     if test "x$host_vendor" = xsequent; then
2354       # Use $CC to link under sequent, because it throws in some extra .o
2355       # files that make .init and .fini sections work.
2356       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2357     else
2358       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2359     fi
2360     hardcode_libdir_flag_spec='-L$libdir'
2361     hardcode_direct=yes
2362     hardcode_minus_L=yes
2363     hardcode_shlibpath_var=no
2364     ;;
2365
2366   sysv4)
2367     if test "x$host_vendor" = xsno; then
2368       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2369       hardcode_direct=yes # is this really true???
2370     else
2371       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2372       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2373     fi
2374     runpath_var='LD_RUN_PATH'
2375     hardcode_shlibpath_var=no
2376     ;;
2377
2378   sysv4.3*)
2379     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2380     hardcode_shlibpath_var=no
2381     export_dynamic_flag_spec='-Bexport'
2382     ;;
2383
2384   sysv5*)
2385     no_undefined_flag=' -z text'
2386     # $CC -shared without GNU ld will not create a library from C++
2387     # object files and a static libstdc++, better avoid it by now
2388     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2389     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2390                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2391     hardcode_libdir_flag_spec=
2392     hardcode_shlibpath_var=no
2393     runpath_var='LD_RUN_PATH'
2394     ;;
2395
2396   uts4*)
2397     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2398     hardcode_libdir_flag_spec='-L$libdir'
2399     hardcode_shlibpath_var=no
2400     ;;
2401
2402   dgux*)
2403     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2404     hardcode_libdir_flag_spec='-L$libdir'
2405     hardcode_shlibpath_var=no
2406     ;;
2407
2408   sysv4*MP*)
2409     if test -d /usr/nec; then
2410       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2411       hardcode_shlibpath_var=no
2412       runpath_var=LD_RUN_PATH
2413       hardcode_runpath_var=yes
2414       ld_shlibs=yes
2415     fi
2416     ;;
2417
2418   sysv4.2uw2*)
2419     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2420     hardcode_direct=yes
2421     hardcode_minus_L=no
2422     hardcode_shlibpath_var=no
2423     hardcode_runpath_var=yes
2424     runpath_var=LD_RUN_PATH
2425     ;;
2426
2427   sysv5uw7* | unixware7*)
2428     no_undefined_flag='${wl}-z ${wl}text'
2429     if test "$GCC" = yes; then
2430       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2431     else
2432       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2433     fi
2434     runpath_var='LD_RUN_PATH'
2435     hardcode_shlibpath_var=no
2436     ;;
2437
2438   *)
2439     ld_shlibs=no
2440     ;;
2441   esac
2442 fi
2443 AC_MSG_RESULT([$ld_shlibs])
2444 test "$ld_shlibs" = no && can_build_shared=no
2445
2446 # Check hardcoding attributes.
2447 AC_MSG_CHECKING([how to hardcode library paths into programs])
2448 hardcode_action=
2449 if test -n "$hardcode_libdir_flag_spec" || \
2450    test -n "$runpath_var"; then
2451
2452   # We can hardcode non-existant directories.
2453   if test "$hardcode_direct" != no &&
2454      # If the only mechanism to avoid hardcoding is shlibpath_var, we
2455      # have to relink, otherwise we might link with an installed library
2456      # when we should be linking with a yet-to-be-installed one
2457      ## test "$hardcode_shlibpath_var" != no &&
2458      test "$hardcode_minus_L" != no; then
2459     # Linking always hardcodes the temporary library directory.
2460     hardcode_action=relink
2461   else
2462     # We can link without hardcoding, and we can hardcode nonexisting dirs.
2463     hardcode_action=immediate
2464   fi
2465 else
2466   # We cannot hardcode anything, or else we can only hardcode existing
2467   # directories.
2468   hardcode_action=unsupported
2469 fi
2470 AC_MSG_RESULT([$hardcode_action])
2471
2472 striplib=
2473 old_striplib=
2474 AC_MSG_CHECKING([whether stripping libraries is possible])
2475 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2476   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2477   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2478   AC_MSG_RESULT([yes])
2479 else
2480   AC_MSG_RESULT([no])
2481 fi
2482
2483 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2484 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2485
2486 # PORTME Fill in your ld.so characteristics
2487 AC_MSG_CHECKING([dynamic linker characteristics])
2488 library_names_spec=
2489 libname_spec='lib$name'
2490 soname_spec=
2491 postinstall_cmds=
2492 postuninstall_cmds=
2493 finish_cmds=
2494 finish_eval=
2495 shlibpath_var=
2496 shlibpath_overrides_runpath=unknown
2497 version_type=none
2498 dynamic_linker="$host_os ld.so"
2499 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2500 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2501
2502 case $host_os in
2503 aix3*)
2504   version_type=linux
2505   library_names_spec='${libname}${release}.so$versuffix $libname.a'
2506   shlibpath_var=LIBPATH
2507
2508   # AIX has no versioning support, so we append a major version to the name.
2509   soname_spec='${libname}${release}.so$major'
2510   ;;
2511
2512 aix4* | aix5*)
2513   version_type=linux
2514   if test "$host_cpu" = ia64; then
2515     # AIX 5 supports IA64
2516     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2517     shlibpath_var=LD_LIBRARY_PATH
2518   else
2519     # With GCC up to 2.95.x, collect2 would create an import file
2520     # for dependence libraries.  The import file would start with
2521     # the line `#! .'.  This would cause the generated library to
2522     # depend on `.', always an invalid library.  This was fixed in
2523     # development snapshots of GCC prior to 3.0.
2524     case $host_os in
2525       aix4 | aix4.[[01]] | aix4.[[01]].*)
2526         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2527              echo ' yes '
2528              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2529           :
2530         else
2531           can_build_shared=no
2532         fi
2533         ;;
2534     esac
2535     # AIX (on Power*) has no versioning support, so currently we can
2536     # not hardcode correct soname into executable. Probably we can
2537     # add versioning support to collect2, so additional links can
2538     # be useful in future.
2539     if test "$aix_use_runtimelinking" = yes; then
2540       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2541       # instead of lib<name>.a to let people know that these are not
2542       # typical AIX shared libraries.
2543       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2544     else
2545       # We preserve .a as extension for shared libraries through AIX4.2
2546       # and later when we are not doing run time linking.
2547       library_names_spec='${libname}${release}.a $libname.a'
2548       soname_spec='${libname}${release}.so$major'
2549     fi
2550     shlibpath_var=LIBPATH
2551   fi
2552   ;;
2553
2554 amigaos*)
2555   library_names_spec='$libname.ixlibrary $libname.a'
2556   # Create ${libname}_ixlibrary.a entries in /sys/libs.
2557   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'
2558   ;;
2559
2560 beos*)
2561   library_names_spec='${libname}.so'
2562   dynamic_linker="$host_os ld.so"
2563   shlibpath_var=LIBRARY_PATH
2564   ;;
2565
2566 bsdi4*)
2567   version_type=linux
2568   need_version=no
2569   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2570   soname_spec='${libname}${release}.so$major'
2571   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2572   shlibpath_var=LD_LIBRARY_PATH
2573   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2574   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2575   export_dynamic_flag_spec=-rdynamic
2576   # the default ld.so.conf also contains /usr/contrib/lib and
2577   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2578   # libtool to hard-code these into programs
2579   ;;
2580
2581 cygwin* | mingw* | pw32*)
2582   version_type=windows
2583   need_version=no
2584   need_lib_prefix=no
2585   case $GCC,$host_os in
2586   yes,cygwin*)
2587     library_names_spec='$libname.dll.a'
2588     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2589     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2590       dldir=$destdir/`dirname \$dlpath`~
2591       test -d \$dldir || mkdir -p \$dldir~
2592       $install_prog .libs/$dlname \$dldir/$dlname'
2593     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2594       dlpath=$dir/\$dldll~
2595        $rm \$dlpath'
2596     ;;
2597   yes,mingw*)
2598     library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2599     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
2600     ;;
2601   yes,pw32*)
2602     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2603     ;;
2604   *)
2605     library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2606     ;;
2607   esac
2608   dynamic_linker='Win32 ld.exe'
2609   # FIXME: first we should search . and the directory the executable is in
2610   shlibpath_var=PATH
2611   ;;
2612
2613 darwin* | rhapsody*)
2614   dynamic_linker="$host_os dyld"
2615   version_type=darwin
2616   need_lib_prefix=no
2617   need_version=no
2618   # FIXME: Relying on posixy $() will cause problems for
2619   #        cross-compilation, but unfortunately the echo tests do not
2620   #        yet detect zsh echo's removal of \ escapes.
2621   library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
2622   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2623   shlibpath_overrides_runpath=yes
2624   shlibpath_var=DYLD_LIBRARY_PATH
2625   ;;
2626
2627 freebsd1*)
2628   dynamic_linker=no
2629   ;;
2630
2631 freebsd*)
2632   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2633   version_type=freebsd-$objformat
2634   case $version_type in
2635     freebsd-elf*)
2636       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2637       need_version=no
2638       need_lib_prefix=no
2639       ;;
2640     freebsd-*)
2641       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2642       need_version=yes
2643       ;;
2644   esac
2645   shlibpath_var=LD_LIBRARY_PATH
2646   case $host_os in
2647   freebsd2*)
2648     shlibpath_overrides_runpath=yes
2649     ;;
2650   *)
2651     shlibpath_overrides_runpath=no
2652     hardcode_into_libs=yes
2653     ;;
2654   esac
2655   ;;
2656
2657 gnu*)
2658   version_type=linux
2659   need_lib_prefix=no
2660   need_version=no
2661   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2662   soname_spec='${libname}${release}.so$major'
2663   shlibpath_var=LD_LIBRARY_PATH
2664   hardcode_into_libs=yes
2665   ;;
2666
2667 hpux9* | hpux10* | hpux11*)
2668   # Give a soname corresponding to the major version so that dld.sl refuses to
2669   # link against other versions.
2670   dynamic_linker="$host_os dld.sl"
2671   version_type=sunos
2672   need_lib_prefix=no
2673   need_version=no
2674   shlibpath_var=SHLIB_PATH
2675   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2676   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2677   soname_spec='${libname}${release}.sl$major'
2678   # HP-UX runs *really* slowly unless shared libraries are mode 555.
2679   postinstall_cmds='chmod 555 $lib'
2680   ;;
2681
2682 irix5* | irix6* | nonstopux*)
2683   case $host_os in
2684     nonstopux*) version_type=nonstopux ;;
2685     *)          version_type=irix ;;
2686   esac
2687   need_lib_prefix=no
2688   need_version=no
2689   soname_spec='${libname}${release}.so$major'
2690   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2691   case $host_os in
2692   irix5* | nonstopux*)
2693     libsuff= shlibsuff=
2694     ;;
2695   *)
2696     case $LD in # libtool.m4 will add one of these switches to LD
2697     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2698     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2699     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2700     *) libsuff= shlibsuff= libmagic=never-match;;
2701     esac
2702     ;;
2703   esac
2704   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2705   shlibpath_overrides_runpath=no
2706   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2707   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2708   ;;
2709
2710 # No shared lib support for Linux oldld, aout, or coff.
2711 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2712   dynamic_linker=no
2713   ;;
2714
2715 # This must be Linux ELF.
2716 linux-gnu*)
2717   version_type=linux
2718   need_lib_prefix=no
2719   need_version=no
2720   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2721   soname_spec='${libname}${release}.so$major'
2722   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2723   shlibpath_var=LD_LIBRARY_PATH
2724   shlibpath_overrides_runpath=no
2725   # This implies no fast_install, which is unacceptable.
2726   # Some rework will be needed to allow for fast_install
2727   # before this can be enabled.
2728   hardcode_into_libs=yes
2729
2730   # We used to test for /lib/ld.so.1 and disable shared libraries on
2731   # powerpc, because MkLinux only supported shared libraries with the
2732   # GNU dynamic linker.  Since this was broken with cross compilers,
2733   # most powerpc-linux boxes support dynamic linking these days and
2734   # people can always --disable-shared, the test was removed, and we
2735   # assume the GNU/Linux dynamic linker is in use.
2736   dynamic_linker='GNU/Linux ld.so'
2737   ;;
2738
2739 netbsd*)
2740   version_type=sunos
2741   need_lib_prefix=no
2742   need_version=no
2743   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2744     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2745     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2746     dynamic_linker='NetBSD (a.out) ld.so'
2747   else
2748     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2749     soname_spec='${libname}${release}.so$major'
2750     dynamic_linker='NetBSD ld.elf_so'
2751   fi
2752   shlibpath_var=LD_LIBRARY_PATH
2753   shlibpath_overrides_runpath=yes
2754   hardcode_into_libs=yes
2755   ;;
2756
2757 newsos6)
2758   version_type=linux
2759   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2760   shlibpath_var=LD_LIBRARY_PATH
2761   shlibpath_overrides_runpath=yes
2762   ;;
2763
2764 openbsd*)
2765   version_type=sunos
2766   need_lib_prefix=no
2767   need_version=no
2768   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2769     case "$host_os" in
2770     openbsd2.[[89]] | openbsd2.[[89]].*)
2771       shlibpath_overrides_runpath=no
2772       ;;
2773     *)
2774       shlibpath_overrides_runpath=yes
2775       ;;
2776     esac
2777   else
2778     shlibpath_overrides_runpath=yes
2779   fi
2780   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2781   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2782   shlibpath_var=LD_LIBRARY_PATH
2783   ;;
2784
2785 os2*)
2786   libname_spec='$name'
2787   need_lib_prefix=no
2788   library_names_spec='$libname.dll $libname.a'
2789   dynamic_linker='OS/2 ld.exe'
2790   shlibpath_var=LIBPATH
2791   ;;
2792
2793 osf3* | osf4* | osf5*)
2794   version_type=osf
2795   need_version=no
2796   need_lib_prefix=no
2797   soname_spec='${libname}${release}.so'
2798   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2799   shlibpath_var=LD_LIBRARY_PATH
2800   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2801   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2802   ;;
2803
2804 sco3.2v5*)
2805   version_type=osf
2806   soname_spec='${libname}${release}.so$major'
2807   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2808   shlibpath_var=LD_LIBRARY_PATH
2809   ;;
2810
2811 solaris*)
2812   version_type=linux
2813   need_lib_prefix=no
2814   need_version=no
2815   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2816   soname_spec='${libname}${release}.so$major'
2817   shlibpath_var=LD_LIBRARY_PATH
2818   shlibpath_overrides_runpath=yes
2819   hardcode_into_libs=yes
2820   # ldd complains unless libraries are executable
2821   postinstall_cmds='chmod +x $lib'
2822   ;;
2823
2824 sunos4*)
2825   version_type=sunos
2826   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2827   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2828   shlibpath_var=LD_LIBRARY_PATH
2829   shlibpath_overrides_runpath=yes
2830   if test "$with_gnu_ld" = yes; then
2831     need_lib_prefix=no
2832   fi
2833   need_version=yes
2834   ;;
2835
2836 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2837   version_type=linux
2838   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2839   soname_spec='${libname}${release}.so$major'
2840   shlibpath_var=LD_LIBRARY_PATH
2841   case $host_vendor in
2842     sni)
2843       shlibpath_overrides_runpath=no
2844       ;;
2845     motorola)
2846       need_lib_prefix=no
2847       need_version=no
2848       shlibpath_overrides_runpath=no
2849       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2850       ;;
2851   esac
2852   ;;
2853
2854 uts4*)
2855   version_type=linux
2856   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2857   soname_spec='${libname}${release}.so$major'
2858   shlibpath_var=LD_LIBRARY_PATH
2859   ;;
2860
2861 dgux*)
2862   version_type=linux
2863   need_lib_prefix=no
2864   need_version=no
2865   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2866   soname_spec='${libname}${release}.so$major'
2867   shlibpath_var=LD_LIBRARY_PATH
2868   ;;
2869
2870 sysv4*MP*)
2871   if test -d /usr/nec ;then
2872     version_type=linux
2873     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2874     soname_spec='$libname.so.$major'
2875     shlibpath_var=LD_LIBRARY_PATH
2876   fi
2877   ;;
2878
2879 *)
2880   dynamic_linker=no
2881   ;;
2882 esac
2883 AC_MSG_RESULT([$dynamic_linker])
2884 test "$dynamic_linker" = no && can_build_shared=no
2885
2886 # Report the final consequences.
2887 AC_MSG_CHECKING([if libtool supports shared libraries])
2888 AC_MSG_RESULT([$can_build_shared])
2889
2890 AC_MSG_CHECKING([whether to build shared libraries])
2891 test "$can_build_shared" = "no" && enable_shared=no
2892
2893 # On AIX, shared libraries and static libraries use the same namespace, and
2894 # are all built from PIC.
2895 case "$host_os" in
2896 aix3*)
2897   test "$enable_shared" = yes && enable_static=no
2898   if test -n "$RANLIB"; then
2899     archive_cmds="$archive_cmds~\$RANLIB \$lib"
2900     postinstall_cmds='$RANLIB $lib'
2901   fi
2902   ;;
2903
2904 aix4*)
2905   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2906     test "$enable_shared" = yes && enable_static=no
2907   fi
2908   ;;
2909 esac
2910 AC_MSG_RESULT([$enable_shared])
2911
2912 AC_MSG_CHECKING([whether to build static libraries])
2913 # Make sure either enable_shared or enable_static is yes.
2914 test "$enable_shared" = yes || enable_static=yes
2915 AC_MSG_RESULT([$enable_static])
2916
2917 if test "$hardcode_action" = relink; then
2918   # Fast installation is not supported
2919   enable_fast_install=no
2920 elif test "$shlibpath_overrides_runpath" = yes ||
2921      test "$enable_shared" = no; then
2922   # Fast installation is not necessary
2923   enable_fast_install=needless
2924 fi
2925
2926 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2927 if test "$GCC" = yes; then
2928   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2929 fi
2930
2931 AC_LIBTOOL_DLOPEN_SELF
2932
2933 if test "$enable_shared" = yes && test "$GCC" = yes; then
2934   case $archive_cmds in
2935   *'~'*)
2936     # FIXME: we may have to deal with multi-command sequences.
2937     ;;
2938   '$CC '*)
2939     # Test whether the compiler implicitly links with -lc since on some
2940     # systems, -lgcc has to come before -lc. If gcc already passes -lc
2941     # to ld, don't add -lc before -lgcc.
2942     AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2943     AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2944     [$rm conftest*
2945     echo 'static int dummy;' > conftest.$ac_ext
2946
2947     if AC_TRY_EVAL(ac_compile); then
2948       soname=conftest
2949       lib=conftest
2950       libobjs=conftest.$ac_objext
2951       deplibs=
2952       wl=$lt_cv_prog_cc_wl
2953       compiler_flags=-v
2954       linker_flags=-v
2955       verstring=
2956       output_objdir=.
2957       libname=conftest
2958       save_allow_undefined_flag=$allow_undefined_flag
2959       allow_undefined_flag=
2960       if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2961       then
2962         lt_cv_archive_cmds_need_lc=no
2963       else
2964         lt_cv_archive_cmds_need_lc=yes
2965       fi
2966       allow_undefined_flag=$save_allow_undefined_flag
2967     else
2968       cat conftest.err 1>&5
2969     fi])
2970     AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2971     ;;
2972   esac
2973 fi
2974 need_lc=${lt_cv_archive_cmds_need_lc-yes}
2975
2976 # The second clause should only fire when bootstrapping the
2977 # libtool distribution, otherwise you forgot to ship ltmain.sh
2978 # with your package, and you will get complaints that there are
2979 # no rules to generate ltmain.sh.
2980 if test -f "$ltmain"; then
2981   :
2982 else
2983   # If there is no Makefile yet, we rely on a make rule to execute
2984   # `config.status --recheck' to rerun these tests and create the
2985   # libtool script then.
2986   test -f Makefile && make "$ltmain"
2987 fi
2988
2989 if test -f "$ltmain"; then
2990   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2991   $rm -f "${ofile}T"
2992
2993   echo creating $ofile
2994
2995   # Now quote all the things that may contain metacharacters while being
2996   # careful not to overquote the AC_SUBSTed values.  We take copies of the
2997   # variables and quote the copies for generation of the libtool script.
2998   for var in echo old_CC old_CFLAGS \
2999     AR AR_FLAGS CC LD LN_S NM SHELL \
3000     reload_flag reload_cmds wl \
3001     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3002     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3003     library_names_spec soname_spec \
3004     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3005     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3006     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3007     old_striplib striplib file_magic_cmd export_symbols_cmds \
3008     deplibs_check_method allow_undefined_flag no_undefined_flag \
3009     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3010     global_symbol_to_c_name_address \
3011     hardcode_libdir_flag_spec hardcode_libdir_separator  \
3012     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3013     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3014
3015     case $var in
3016     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3017     old_postinstall_cmds | old_postuninstall_cmds | \
3018     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3019     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3020     postinstall_cmds | postuninstall_cmds | \
3021     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3022       # Double-quote double-evaled strings.
3023       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3024       ;;
3025     *)
3026       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3027       ;;
3028     esac
3029   done
3030
3031   cat <<__EOF__ > "${ofile}T"
3032 #! $SHELL
3033
3034 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3035 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3036 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3037 #
3038 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
3039 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3040 #
3041 # This program is free software; you can redistribute it and/or modify
3042 # it under the terms of the GNU General Public License as published by
3043 # the Free Software Foundation; either version 2 of the License, or
3044 # (at your option) any later version.
3045 #
3046 # This program is distributed in the hope that it will be useful, but
3047 # WITHOUT ANY WARRANTY; without even the implied warranty of
3048 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3049 # General Public License for more details.
3050 #
3051 # You should have received a copy of the GNU General Public License
3052 # along with this program; if not, write to the Free Software
3053 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3054 #
3055 # As a special exception to the GNU General Public License, if you
3056 # distribute this file as part of a program that contains a
3057 # configuration script generated by Autoconf, you may include it under
3058 # the same distribution terms that you use for the rest of that program.
3059
3060 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3061 Xsed="sed -e s/^X//"
3062
3063 # The HP-UX ksh and POSIX shell print the target directory to stdout
3064 # if CDPATH is set.
3065 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3066
3067 # ### BEGIN LIBTOOL CONFIG
3068
3069 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3070
3071 # Shell to use when invoking shell scripts.
3072 SHELL=$lt_SHELL
3073
3074 # Whether or not to build shared libraries.
3075 build_libtool_libs=$enable_shared
3076
3077 # Whether or not to build static libraries.
3078 build_old_libs=$enable_static
3079
3080 # Whether or not to add -lc for building shared libraries.
3081 build_libtool_need_lc=$need_lc
3082
3083 # Whether or not to optimize for fast installation.
3084 fast_install=$enable_fast_install
3085
3086 # The host system.
3087 host_alias=$host_alias
3088 host=$host
3089
3090 # An echo program that does not interpret backslashes.
3091 echo=$lt_echo
3092
3093 # The archiver.
3094 AR=$lt_AR
3095 AR_FLAGS=$lt_AR_FLAGS
3096
3097 # The default C compiler.
3098 CC=$lt_CC
3099
3100 # Is the compiler the GNU C compiler?
3101 with_gcc=$GCC
3102
3103 # The linker used to build libraries.
3104 LD=$lt_LD
3105
3106 # Whether we need hard or soft links.
3107 LN_S=$lt_LN_S
3108
3109 # A BSD-compatible nm program.
3110 NM=$lt_NM
3111
3112 # A symbol stripping program
3113 STRIP=$STRIP
3114
3115 # Used to examine libraries when file_magic_cmd begins "file"
3116 MAGIC_CMD=$MAGIC_CMD
3117
3118 # Used on cygwin: DLL creation program.
3119 DLLTOOL="$DLLTOOL"
3120
3121 # Used on cygwin: object dumper.
3122 OBJDUMP="$OBJDUMP"
3123
3124 # Used on cygwin: assembler.
3125 AS="$AS"
3126
3127 # The name of the directory that contains temporary libtool files.
3128 objdir=$objdir
3129
3130 # How to create reloadable object files.
3131 reload_flag=$lt_reload_flag
3132 reload_cmds=$lt_reload_cmds
3133
3134 # How to pass a linker flag through the compiler.
3135 wl=$lt_wl
3136
3137 # Object file suffix (normally "o").
3138 objext="$ac_objext"
3139
3140 # Old archive suffix (normally "a").
3141 libext="$libext"
3142
3143 # Executable file suffix (normally "").
3144 exeext="$exeext"
3145
3146 # Additional compiler flags for building library objects.
3147 pic_flag=$lt_pic_flag
3148 pic_mode=$pic_mode
3149
3150 # Does compiler simultaneously support -c and -o options?
3151 compiler_c_o=$lt_compiler_c_o
3152
3153 # Can we write directly to a .lo ?
3154 compiler_o_lo=$lt_compiler_o_lo
3155
3156 # Must we lock files when doing compilation ?
3157 need_locks=$lt_need_locks
3158
3159 # Do we need the lib prefix for modules?
3160 need_lib_prefix=$need_lib_prefix
3161
3162 # Do we need a version for libraries?
3163 need_version=$need_version
3164
3165 # Whether dlopen is supported.
3166 dlopen_support=$enable_dlopen
3167
3168 # Whether dlopen of programs is supported.
3169 dlopen_self=$enable_dlopen_self
3170
3171 # Whether dlopen of statically linked programs is supported.
3172 dlopen_self_static=$enable_dlopen_self_static
3173
3174 # Compiler flag to prevent dynamic linking.
3175 link_static_flag=$lt_link_static_flag
3176
3177 # Compiler flag to turn off builtin functions.
3178 no_builtin_flag=$lt_no_builtin_flag
3179
3180 # Compiler flag to allow reflexive dlopens.
3181 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3182
3183 # Compiler flag to generate shared objects directly from archives.
3184 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3185
3186 # Compiler flag to generate thread-safe objects.
3187 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3188
3189 # Library versioning type.
3190 version_type=$version_type
3191
3192 # Format of library name prefix.
3193 libname_spec=$lt_libname_spec
3194
3195 # List of archive names.  First name is the real one, the rest are links.
3196 # The last name is the one that the linker finds with -lNAME.
3197 library_names_spec=$lt_library_names_spec
3198
3199 # The coded name of the library, if different from the real name.
3200 soname_spec=$lt_soname_spec
3201
3202 # Commands used to build and install an old-style archive.
3203 RANLIB=$lt_RANLIB
3204 old_archive_cmds=$lt_old_archive_cmds
3205 old_postinstall_cmds=$lt_old_postinstall_cmds
3206 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3207
3208 # Create an old-style archive from a shared archive.
3209 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3210
3211 # Create a temporary old-style archive to link instead of a shared archive.
3212 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3213
3214 # Commands used to build and install a shared archive.
3215 archive_cmds=$lt_archive_cmds
3216 archive_expsym_cmds=$lt_archive_expsym_cmds
3217 postinstall_cmds=$lt_postinstall_cmds
3218 postuninstall_cmds=$lt_postuninstall_cmds
3219
3220 # Commands to strip libraries.
3221 old_striplib=$lt_old_striplib
3222 striplib=$lt_striplib
3223
3224 # Method to check whether dependent libraries are shared objects.
3225 deplibs_check_method=$lt_deplibs_check_method
3226
3227 # Command to use when deplibs_check_method == file_magic.
3228 file_magic_cmd=$lt_file_magic_cmd
3229
3230 # Flag that allows shared libraries with undefined symbols to be built.
3231 allow_undefined_flag=$lt_allow_undefined_flag
3232
3233 # Flag that forces no undefined symbols.
3234 no_undefined_flag=$lt_no_undefined_flag
3235
3236 # Commands used to finish a libtool library installation in a directory.
3237 finish_cmds=$lt_finish_cmds
3238
3239 # Same as above, but a single script fragment to be evaled but not shown.
3240 finish_eval=$lt_finish_eval
3241
3242 # Take the output of nm and produce a listing of raw symbols and C names.
3243 global_symbol_pipe=$lt_global_symbol_pipe
3244
3245 # Transform the output of nm in a proper C declaration
3246 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3247
3248 # Transform the output of nm in a C name address pair
3249 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3250
3251 # This is the shared library runtime path variable.
3252 runpath_var=$runpath_var
3253
3254 # This is the shared library path variable.
3255 shlibpath_var=$shlibpath_var
3256
3257 # Is shlibpath searched before the hard-coded library search path?
3258 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3259
3260 # How to hardcode a shared library path into an executable.
3261 hardcode_action=$hardcode_action
3262
3263 # Whether we should hardcode library paths into libraries.
3264 hardcode_into_libs=$hardcode_into_libs
3265
3266 # Flag to hardcode \$libdir into a binary during linking.
3267 # This must work even if \$libdir does not exist.
3268 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3269
3270 # Whether we need a single -rpath flag with a separated argument.
3271 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3272
3273 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3274 # resulting binary.
3275 hardcode_direct=$hardcode_direct
3276
3277 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3278 # resulting binary.
3279 hardcode_minus_L=$hardcode_minus_L
3280
3281 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3282 # the resulting binary.
3283 hardcode_shlibpath_var=$hardcode_shlibpath_var
3284
3285 # Variables whose values should be saved in libtool wrapper scripts and
3286 # restored at relink time.
3287 variables_saved_for_relink="$variables_saved_for_relink"
3288
3289 # Whether libtool must link a program against all its dependency libraries.
3290 link_all_deplibs=$link_all_deplibs
3291
3292 # Compile-time system search path for libraries
3293 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3294
3295 # Run-time system search path for libraries
3296 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3297
3298 # Fix the shell variable \$srcfile for the compiler.
3299 fix_srcfile_path="$fix_srcfile_path"
3300
3301 # Set to yes if exported symbols are required.
3302 always_export_symbols=$always_export_symbols
3303
3304 # The commands to list exported symbols.
3305 export_symbols_cmds=$lt_export_symbols_cmds
3306
3307 # The commands to extract the exported symbol list from a shared archive.
3308 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3309
3310 # Symbols that should not be listed in the preloaded symbols.
3311 exclude_expsyms=$lt_exclude_expsyms
3312
3313 # Symbols that must always be exported.
3314 include_expsyms=$lt_include_expsyms
3315
3316 # ### END LIBTOOL CONFIG
3317
3318 __EOF__
3319
3320   case $host_os in
3321   aix3*)
3322     cat <<\EOF >> "${ofile}T"
3323
3324 # AIX sometimes has problems with the GCC collect2 program.  For some
3325 # reason, if we set the COLLECT_NAMES environment variable, the problems
3326 # vanish in a puff of smoke.
3327 if test "X${COLLECT_NAMES+set}" != Xset; then
3328   COLLECT_NAMES=
3329   export COLLECT_NAMES
3330 fi
3331 EOF
3332     ;;
3333   esac
3334
3335   case $host_os in
3336   cygwin* | mingw* | pw32* | os2*)
3337     cat <<'EOF' >> "${ofile}T"
3338       # This is a source program that is used to create dlls on Windows
3339       # Don't remove nor modify the starting and closing comments
3340 # /* ltdll.c starts here */
3341 # #define WIN32_LEAN_AND_MEAN
3342 # #include <windows.h>
3343 # #undef WIN32_LEAN_AND_MEAN
3344 # #include <stdio.h>
3345 #
3346 # #ifndef __CYGWIN__
3347 # #  ifdef __CYGWIN32__
3348 # #    define __CYGWIN__ __CYGWIN32__
3349 # #  endif
3350 # #endif
3351 #
3352 # #ifdef __cplusplus
3353 # extern "C" {
3354 # #endif
3355 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3356 # #ifdef __cplusplus
3357 # }
3358 # #endif
3359 #
3360 # #ifdef __CYGWIN__
3361 # #include <cygwin/cygwin_dll.h>
3362 # DECLARE_CYGWIN_DLL( DllMain );
3363 # #endif
3364 # HINSTANCE __hDllInstance_base;
3365 #
3366 # BOOL APIENTRY
3367 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3368 # {
3369 #   __hDllInstance_base = hInst;
3370 #   return TRUE;
3371 # }
3372 # /* ltdll.c ends here */
3373         # This is a source program that is used to create import libraries
3374         # on Windows for dlls which lack them. Don't remove nor modify the
3375         # starting and closing comments
3376 # /* impgen.c starts here */
3377 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
3378 #
3379 #  This file is part of GNU libtool.
3380 #
3381 #  This program is free software; you can redistribute it and/or modify
3382 #  it under the terms of the GNU General Public License as published by
3383 #  the Free Software Foundation; either version 2 of the License, or
3384 #  (at your option) any later version.
3385 #
3386 #  This program is distributed in the hope that it will be useful,
3387 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
3388 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3389 #  GNU General Public License for more details.
3390 #
3391 #  You should have received a copy of the GNU General Public License
3392 #  along with this program; if not, write to the Free Software
3393 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3394 #  */
3395 #
3396 # #include <stdio.h>            /* for printf() */
3397 # #include <unistd.h>           /* for open(), lseek(), read() */
3398 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
3399 # #include <string.h>           /* for strdup() */
3400 #
3401 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3402 # #ifndef O_BINARY
3403 # #define O_BINARY 0
3404 # #endif
3405 #
3406 # static unsigned int
3407 # pe_get16 (fd, offset)
3408 #      int fd;
3409 #      int offset;
3410 # {
3411 #   unsigned char b[2];
3412 #   lseek (fd, offset, SEEK_SET);
3413 #   read (fd, b, 2);
3414 #   return b[0] + (b[1]<<8);
3415 # }
3416 #
3417 # static unsigned int
3418 # pe_get32 (fd, offset)
3419 #     int fd;
3420 #     int offset;
3421 # {
3422 #   unsigned char b[4];
3423 #   lseek (fd, offset, SEEK_SET);
3424 #   read (fd, b, 4);
3425 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3426 # }
3427 #
3428 # static unsigned int
3429 # pe_as32 (ptr)
3430 #      void *ptr;
3431 # {
3432 #   unsigned char *b = ptr;
3433 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3434 # }
3435 #
3436 # int
3437 # main (argc, argv)
3438 #     int argc;
3439 #     char *argv[];
3440 # {
3441 #     int dll;
3442 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3443 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
3444 #     unsigned long name_rvas, nexp;
3445 #     unsigned char *expdata, *erva;
3446 #     char *filename, *dll_name;
3447 #
3448 #     filename = argv[1];
3449 #
3450 #     dll = open(filename, O_RDONLY|O_BINARY);
3451 #     if (dll < 1)
3452 #       return 1;
3453 #
3454 #     dll_name = filename;
3455 #
3456 #     for (i=0; filename[i]; i++)
3457 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
3458 #           dll_name = filename + i +1;
3459 #
3460 #     pe_header_offset = pe_get32 (dll, 0x3c);
3461 #     opthdr_ofs = pe_header_offset + 4 + 20;
3462 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
3463 #
3464 #     if (num_entries < 1) /* no exports */
3465 #       return 1;
3466 #
3467 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
3468 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
3469 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3470 #     secptr = (pe_header_offset + 4 + 20 +
3471 #             pe_get16 (dll, pe_header_offset + 4 + 16));
3472 #
3473 #     expptr = 0;
3474 #     for (i = 0; i < nsections; i++)
3475 #     {
3476 #       char sname[8];
3477 #       unsigned long secptr1 = secptr + 40 * i;
3478 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3479 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3480 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3481 #       lseek(dll, secptr1, SEEK_SET);
3482 #       read(dll, sname, 8);
3483 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
3484 #       {
3485 #           expptr = fptr + (export_rva - vaddr);
3486 #           if (export_rva + export_size > vaddr + vsize)
3487 #               export_size = vsize - (export_rva - vaddr);
3488 #           break;
3489 #       }
3490 #     }
3491 #
3492 #     expdata = (unsigned char*)malloc(export_size);
3493 #     lseek (dll, expptr, SEEK_SET);
3494 #     read (dll, expdata, export_size);
3495 #     erva = expdata - export_rva;
3496 #
3497 #     nexp = pe_as32 (expdata+24);
3498 #     name_rvas = pe_as32 (expdata+32);
3499 #
3500 #     printf ("EXPORTS\n");
3501 #     for (i = 0; i<nexp; i++)
3502 #     {
3503 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3504 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3505 #     }
3506 #
3507 #     return 0;
3508 # }
3509 # /* impgen.c ends here */
3510
3511 EOF
3512     ;;
3513   esac
3514
3515   # We use sed instead of cat because bash on DJGPP gets confused if
3516   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3517   # text mode, it properly converts lines to CR/LF.  This bash problem
3518   # is reportedly fixed, but why not run on old versions too?
3519   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3520
3521   mv -f "${ofile}T" "$ofile" || \
3522     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3523   chmod +x "$ofile"
3524 fi
3525
3526 ])# _LT_AC_LTCONFIG_HACK
3527
3528 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3529 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3530
3531 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3532 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3533
3534 # AC_ENABLE_SHARED - implement the --enable-shared flag
3535 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3536 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3537 #   `yes'.
3538 AC_DEFUN([AC_ENABLE_SHARED],
3539 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3540 AC_ARG_ENABLE(shared,
3541 changequote(<<, >>)dnl
3542 <<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3543 changequote([, ])dnl
3544 [p=${PACKAGE-default}
3545 case $enableval in
3546 yes) enable_shared=yes ;;
3547 no) enable_shared=no ;;
3548 *)
3549   enable_shared=no
3550   # Look at the argument we got.  We use all the common list separators.
3551   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3552   for pkg in $enableval; do
3553     if test "X$pkg" = "X$p"; then
3554       enable_shared=yes
3555     fi
3556   done
3557   IFS="$ac_save_ifs"
3558   ;;
3559 esac],
3560 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3561 ])
3562
3563 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3564 AC_DEFUN([AC_DISABLE_SHARED],
3565 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3566 AC_ENABLE_SHARED(no)])
3567
3568 # AC_ENABLE_STATIC - implement the --enable-static flag
3569 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3570 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3571 #   `yes'.
3572 AC_DEFUN([AC_ENABLE_STATIC],
3573 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3574 AC_ARG_ENABLE(static,
3575 changequote(<<, >>)dnl
3576 <<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3577 changequote([, ])dnl
3578 [p=${PACKAGE-default}
3579 case $enableval in
3580 yes) enable_static=yes ;;
3581 no) enable_static=no ;;
3582 *)
3583   enable_static=no
3584   # Look at the argument we got.  We use all the common list separators.
3585   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3586   for pkg in $enableval; do
3587     if test "X$pkg" = "X$p"; then
3588       enable_static=yes
3589     fi
3590   done
3591   IFS="$ac_save_ifs"
3592   ;;
3593 esac],
3594 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3595 ])
3596
3597 # AC_DISABLE_STATIC - set the default static flag to --disable-static
3598 AC_DEFUN([AC_DISABLE_STATIC],
3599 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3600 AC_ENABLE_STATIC(no)])
3601
3602
3603 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3604 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3605 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3606 #   `yes'.
3607 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3608 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3609 AC_ARG_ENABLE(fast-install,
3610 changequote(<<, >>)dnl
3611 <<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3612 changequote([, ])dnl
3613 [p=${PACKAGE-default}
3614 case $enableval in
3615 yes) enable_fast_install=yes ;;
3616 no) enable_fast_install=no ;;
3617 *)
3618   enable_fast_install=no
3619   # Look at the argument we got.  We use all the common list separators.
3620   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3621   for pkg in $enableval; do
3622     if test "X$pkg" = "X$p"; then
3623       enable_fast_install=yes
3624     fi
3625   done
3626   IFS="$ac_save_ifs"
3627   ;;
3628 esac],
3629 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3630 ])
3631
3632 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3633 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3634 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3635 AC_ENABLE_FAST_INSTALL(no)])
3636
3637 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3638 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3639 #   Where MODE is either `yes' or `no'.  If omitted, it defaults to
3640 #   `both'.
3641 AC_DEFUN([AC_LIBTOOL_PICMODE],
3642 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3643 pic_mode=ifelse($#,1,$1,default)])
3644
3645
3646 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3647 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3648 [AC_MSG_CHECKING([for $1])
3649 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3650 [case $MAGIC_CMD in
3651   /*)
3652   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3653   ;;
3654   ?:/*)
3655   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3656   ;;
3657   *)
3658   ac_save_MAGIC_CMD="$MAGIC_CMD"
3659   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3660 dnl $ac_dummy forces splitting on constant user-supplied paths.
3661 dnl POSIX.2 word splitting is done only on the output of word expansions,
3662 dnl not every word.  This closes a longstanding sh security hole.
3663   ac_dummy="ifelse([$2], , $PATH, [$2])"
3664   for ac_dir in $ac_dummy; do
3665     test -z "$ac_dir" && ac_dir=.
3666     if test -f $ac_dir/$1; then
3667       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3668       if test -n "$file_magic_test_file"; then
3669         case $deplibs_check_method in
3670         "file_magic "*)
3671           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3672           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3673           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3674             egrep "$file_magic_regex" > /dev/null; then
3675             :
3676           else
3677             cat <<EOF 1>&2
3678
3679 *** Warning: the command libtool uses to detect shared libraries,
3680 *** $file_magic_cmd, produces output that libtool cannot recognize.
3681 *** The result is that libtool may fail to recognize shared libraries
3682 *** as such.  This will affect the creation of libtool libraries that
3683 *** depend on shared libraries, but programs linked with such libtool
3684 *** libraries will work regardless of this problem.  Nevertheless, you
3685 *** may want to report the problem to your system manager and/or to
3686 *** bug-libtool@gnu.org
3687
3688 EOF
3689           fi ;;
3690         esac
3691       fi
3692       break
3693     fi
3694   done
3695   IFS="$ac_save_ifs"
3696   MAGIC_CMD="$ac_save_MAGIC_CMD"
3697   ;;
3698 esac])
3699 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3700 if test -n "$MAGIC_CMD"; then
3701   AC_MSG_RESULT($MAGIC_CMD)
3702 else
3703   AC_MSG_RESULT(no)
3704 fi
3705 ])
3706
3707
3708 # AC_PATH_MAGIC - find a file program which can recognise a shared library
3709 AC_DEFUN([AC_PATH_MAGIC],
3710 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3711 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3712 if test -z "$lt_cv_path_MAGIC_CMD"; then
3713   if test -n "$ac_tool_prefix"; then
3714     AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3715   else
3716     MAGIC_CMD=:
3717   fi
3718 fi
3719 ])
3720
3721
3722 # AC_PROG_LD - find the path to the GNU or non-GNU linker
3723 AC_DEFUN([AC_PROG_LD],
3724 [AC_ARG_WITH(gnu-ld,
3725 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
3726 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3727 AC_REQUIRE([AC_PROG_CC])dnl
3728 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3729 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3730 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3731 ac_prog=ld
3732 if test "$GCC" = yes; then
3733   # Check if gcc -print-prog-name=ld gives a path.
3734   AC_MSG_CHECKING([for ld used by GCC])
3735   case $host in
3736   *-*-mingw*)
3737     # gcc leaves a trailing carriage return which upsets mingw
3738     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3739   *)
3740     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3741   esac
3742   case $ac_prog in
3743     # Accept absolute paths.
3744     [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3745       re_direlt='/[[^/]][[^/]]*/\.\./'
3746       # Canonicalize the path of ld
3747       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3748       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3749         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3750       done
3751       test -z "$LD" && LD="$ac_prog"
3752       ;;
3753   "")
3754     # If it fails, then pretend we aren't using GCC.
3755     ac_prog=ld
3756     ;;
3757   *)
3758     # If it is relative, then search for the first ld in PATH.
3759     with_gnu_ld=unknown
3760     ;;
3761   esac
3762 elif test "$with_gnu_ld" = yes; then
3763   AC_MSG_CHECKING([for GNU ld])
3764 else
3765   AC_MSG_CHECKING([for non-GNU ld])
3766 fi
3767 AC_CACHE_VAL(lt_cv_path_LD,
3768 [if test -z "$LD"; then
3769   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3770   for ac_dir in $PATH; do
3771     test -z "$ac_dir" && ac_dir=.
3772     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3773       lt_cv_path_LD="$ac_dir/$ac_prog"
3774       # Check to see if the program is GNU ld.  I'd rather use --version,
3775       # but apparently some GNU ld's only accept -v.
3776       # Break only if it was the GNU/non-GNU ld that we prefer.
3777       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3778         test "$with_gnu_ld" != no && break
3779       else
3780         test "$with_gnu_ld" != yes && break
3781       fi
3782     fi
3783   done
3784   IFS="$ac_save_ifs"
3785 else
3786   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3787 fi])
3788 LD="$lt_cv_path_LD"
3789 if test -n "$LD"; then
3790   AC_MSG_RESULT($LD)
3791 else
3792   AC_MSG_RESULT(no)
3793 fi
3794 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3795 AC_PROG_LD_GNU
3796 ])
3797
3798 # AC_PROG_LD_GNU -
3799 AC_DEFUN([AC_PROG_LD_GNU],
3800 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3801 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3802 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3803   lt_cv_prog_gnu_ld=yes
3804 else
3805   lt_cv_prog_gnu_ld=no
3806 fi])
3807 with_gnu_ld=$lt_cv_prog_gnu_ld
3808 ])
3809
3810 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3811 #   -- PORTME Some linkers may need a different reload flag.
3812 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3813 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3814 [lt_cv_ld_reload_flag='-r'])
3815 reload_flag=$lt_cv_ld_reload_flag
3816 test -n "$reload_flag" && reload_flag=" $reload_flag"
3817 ])
3818
3819 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3820 #  -- PORTME fill in with the dynamic library characteristics
3821 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3822 [AC_CACHE_CHECK([how to recognise dependant libraries],
3823 lt_cv_deplibs_check_method,
3824 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3825 lt_cv_file_magic_test_file=
3826 lt_cv_deplibs_check_method='unknown'
3827 # Need to set the preceding variable on all platforms that support
3828 # interlibrary dependencies.
3829 # 'none' -- dependencies not supported.
3830 # `unknown' -- same as none, but documents that we really don't know.
3831 # 'pass_all' -- all dependencies passed with no checks.
3832 # 'test_compile' -- check by making test program.
3833 # 'file_magic [[regex]]' -- check by looking for files in library path
3834 # which responds to the $file_magic_cmd with a given egrep regex.
3835 # If you have `file' or equivalent on your system and you're not sure
3836 # whether `pass_all' will *always* work, you probably want this one.
3837
3838 case $host_os in
3839 aix4* | aix5*)
3840   lt_cv_deplibs_check_method=pass_all
3841   ;;
3842
3843 beos*)
3844   lt_cv_deplibs_check_method=pass_all
3845   ;;
3846
3847 bsdi4*)
3848   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3849   lt_cv_file_magic_cmd='/usr/bin/file -L'
3850   lt_cv_file_magic_test_file=/shlib/libc.so
3851   ;;
3852
3853 cygwin* | mingw* | pw32*)
3854   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3855   lt_cv_file_magic_cmd='$OBJDUMP -f'
3856   ;;
3857
3858 darwin* | rhapsody*)
3859   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3860   lt_cv_file_magic_cmd='/usr/bin/file -L'
3861   case "$host_os" in
3862   rhapsody* | darwin1.[[012]])
3863     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3864     ;;
3865   *) # Darwin 1.3 on
3866     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3867     ;;
3868   esac
3869   ;;
3870
3871 freebsd*)
3872   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3873     case $host_cpu in
3874     i*86 )
3875       # Not sure whether the presence of OpenBSD here was a mistake.
3876       # Let's accept both of them until this is cleared up.
3877       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3878       lt_cv_file_magic_cmd=/usr/bin/file
3879       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3880       ;;
3881     esac
3882   else
3883     lt_cv_deplibs_check_method=pass_all
3884   fi
3885   ;;
3886
3887 gnu*)
3888   lt_cv_deplibs_check_method=pass_all
3889   ;;
3890
3891 hpux10.20*|hpux11*)
3892   lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3893   lt_cv_file_magic_cmd=/usr/bin/file
3894   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3895   ;;
3896
3897 irix5* | irix6* | nonstopux*)
3898   case $host_os in
3899   irix5* | nonstopux*)
3900     # this will be overridden with pass_all, but let us keep it just in case
3901     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3902     ;;
3903   *)
3904     case $LD in
3905     *-32|*"-32 ") libmagic=32-bit;;
3906     *-n32|*"-n32 ") libmagic=N32;;
3907     *-64|*"-64 ") libmagic=64-bit;;
3908     *) libmagic=never-match;;
3909     esac
3910     # this will be overridden with pass_all, but let us keep it just in case
3911     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3912     ;;
3913   esac
3914   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3915   lt_cv_deplibs_check_method=pass_all
3916   ;;
3917
3918 # This must be Linux ELF.
3919 linux-gnu*)
3920   lt_cv_deplibs_check_method=pass_all
3921   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3922   ;;
3923
3924 netbsd*)
3925   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3926     lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3927   else
3928     lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3929   fi
3930   ;;
3931
3932 newos6*)
3933   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3934   lt_cv_file_magic_cmd=/usr/bin/file
3935   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3936   ;;
3937
3938 openbsd*)
3939   lt_cv_file_magic_cmd=/usr/bin/file
3940   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3941   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3942     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3943   else
3944     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3945   fi
3946   ;;
3947
3948 osf3* | osf4* | osf5*)
3949   # this will be overridden with pass_all, but let us keep it just in case
3950   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3951   lt_cv_file_magic_test_file=/shlib/libc.so
3952   lt_cv_deplibs_check_method=pass_all
3953   ;;
3954
3955 sco3.2v5*)
3956   lt_cv_deplibs_check_method=pass_all
3957   ;;
3958
3959 solaris*)
3960   lt_cv_deplibs_check_method=pass_all
3961   lt_cv_file_magic_test_file=/lib/libc.so
3962   ;;
3963
3964 sysv5uw[[78]]* | sysv4*uw2*)
3965   lt_cv_deplibs_check_method=pass_all
3966   ;;
3967
3968 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3969   case $host_vendor in
3970   motorola)
3971     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]]'
3972     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3973     ;;
3974   ncr)
3975     lt_cv_deplibs_check_method=pass_all
3976     ;;
3977   sequent)
3978     lt_cv_file_magic_cmd='/bin/file'
3979     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3980     ;;
3981   sni)
3982     lt_cv_file_magic_cmd='/bin/file'
3983     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3984     lt_cv_file_magic_test_file=/lib/libc.so
3985     ;;
3986   esac
3987   ;;
3988 esac
3989 ])
3990 file_magic_cmd=$lt_cv_file_magic_cmd
3991 deplibs_check_method=$lt_cv_deplibs_check_method
3992 ])
3993
3994
3995 # AC_PROG_NM - find the path to a BSD-compatible name lister
3996 AC_DEFUN([AC_PROG_NM],
3997 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3998 AC_MSG_CHECKING([for BSD-compatible nm])
3999 AC_CACHE_VAL(lt_cv_path_NM,
4000 [if test -n "$NM"; then
4001   # Let the user override the test.
4002   lt_cv_path_NM="$NM"
4003 else
4004   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4005   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4006     test -z "$ac_dir" && ac_dir=.
4007     tmp_nm=$ac_dir/${ac_tool_prefix}nm
4008     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4009       # Check to see if the nm accepts a BSD-compat flag.
4010       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4011       #   nm: unknown option "B" ignored
4012       # Tru64's nm complains that /dev/null is an invalid object file
4013       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4014         lt_cv_path_NM="$tmp_nm -B"
4015         break
4016       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4017         lt_cv_path_NM="$tmp_nm -p"
4018         break
4019       else
4020         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4021         continue # so that we can try to find one that supports BSD flags
4022       fi
4023     fi
4024   done
4025   IFS="$ac_save_ifs"
4026   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4027 fi])
4028 NM="$lt_cv_path_NM"
4029 AC_MSG_RESULT([$NM])
4030 ])
4031
4032 # AC_CHECK_LIBM - check for math library
4033 AC_DEFUN([AC_CHECK_LIBM],
4034 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4035 LIBM=
4036 case $host in
4037 *-*-beos* | *-*-cygwin* | *-*-pw32*)
4038   # These system don't have libm
4039   ;;
4040 *-ncr-sysv4.3*)
4041   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4042   AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4043   ;;
4044 *)
4045   AC_CHECK_LIB(m, main, LIBM="-lm")
4046   ;;
4047 esac
4048 ])
4049
4050 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4051 # the libltdl convenience library and LTDLINCL to the include flags for
4052 # the libltdl header and adds --enable-ltdl-convenience to the
4053 # configure arguments.  Note that LIBLTDL and LTDLINCL are not
4054 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
4055 # provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
4056 # with '${top_builddir}/' and LTDLINCL will be prefixed with
4057 # '${top_srcdir}/' (note the single quotes!).  If your package is not
4058 # flat and you're not using automake, define top_builddir and
4059 # top_srcdir appropriately in the Makefiles.
4060 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4061 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4062   case $enable_ltdl_convenience in
4063   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4064   "") enable_ltdl_convenience=yes
4065       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4066   esac
4067   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4068   LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4069   # For backwards non-gettext consistent compatibility...
4070   INCLTDL="$LTDLINCL"
4071 ])
4072
4073 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4074 # the libltdl installable library and LTDLINCL to the include flags for
4075 # the libltdl header and adds --enable-ltdl-install to the configure
4076 # arguments.  Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
4077 # AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
4078 # libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
4079 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
4080 # with '${top_srcdir}/' (note the single quotes!).  If your package is
4081 # not flat and you're not using automake, define top_builddir and
4082 # top_srcdir appropriately in the Makefiles.
4083 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4084 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4085 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4086   AC_CHECK_LIB(ltdl, main,
4087   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4088   [if test x"$enable_ltdl_install" = xno; then
4089      AC_MSG_WARN([libltdl not installed, but installation disabled])
4090    else
4091      enable_ltdl_install=yes
4092    fi
4093   ])
4094   if test x"$enable_ltdl_install" = x"yes"; then
4095     ac_configure_args="$ac_configure_args --enable-ltdl-install"
4096     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4097     LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4098   else
4099     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4100     LIBLTDL="-lltdl"
4101     LTDLINCL=
4102   fi
4103   # For backwards non-gettext consistent compatibility...
4104   INCLTDL="$LTDLINCL"
4105 ])
4106
4107 # old names
4108 AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
4109 AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
4110 AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
4111 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4112 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4113 AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
4114 AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
4115
4116 # This is just to silence aclocal about the macro not being used
4117 ifelse([AC_DISABLE_FAST_INSTALL])
4118