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