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