/[svn]/libgig/tags/start/aclocal.m4
ViewVC logotype

Contents of /libgig/tags/start/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC