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