Develop and Download Open Source Software

Browse CVS Repository

Contents of /xoonips/AL/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download)
Thu Mar 17 16:21:10 2005 UTC (19 years ago) by orrisroot
Branch: MAIN
Changes since 1.4: +0 -0 lines
リンク時に LDFLAGS 追加.
% make dist 作成される tar ball の中身修正.

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