comparison aclocal.m4 @ 0:cb178e5ad177 trunk

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