/[debian]/mimetic/trunk/aclocal.m4
ViewVC logotype

Contents of /mimetic/trunk/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log


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