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

Annotation of /mimetic/trunk/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log


Revision 130 - (hide annotations)
Sat Feb 25 16:49:22 2006 UTC (15 years, 6 months ago) by gregoa
File size: 246215 byte(s)
[svn-inject] Forking mimetic source to Trunk
1 gregoa 128 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 3 (gettext-0.13)
14     dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
15     dnl This file is free software, distributed under the terms of the GNU
16     dnl General Public License. As a special exception to the GNU General
17     dnl Public License, this file may be distributed as part of a program
18     dnl that contains a configuration script generated by Autoconf, under
19     dnl the same distribution terms as the rest of that program.
20    
21     dnl From Bruno Haible.
22    
23     dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
24     dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
25     dnl require excessive bracketing.
26     ifdef([AC_HELP_STRING],
27     [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
28     [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
29    
30     dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
31     dnl to access previously installed libraries. The basic assumption is that
32     dnl a user will want packages to use other packages he previously installed
33     dnl with the same --prefix option.
34     dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
35     dnl libraries, but is otherwise very convenient.
36     AC_DEFUN([AC_LIB_PREFIX],
37     [
38     AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
39     AC_REQUIRE([AC_PROG_CC])
40     AC_REQUIRE([AC_CANONICAL_HOST])
41     AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
42     dnl By default, look in $includedir and $libdir.
43     use_additional=yes
44     AC_LIB_WITH_FINAL_PREFIX([
45     eval additional_includedir=\"$includedir\"
46     eval additional_libdir=\"$libdir\"
47     ])
48     AC_LIB_ARG_WITH([lib-prefix],
49     [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
50     --without-lib-prefix don't search for libraries in includedir and libdir],
51     [
52     if test "X$withval" = "Xno"; then
53     use_additional=no
54     else
55     if test "X$withval" = "X"; then
56     AC_LIB_WITH_FINAL_PREFIX([
57     eval additional_includedir=\"$includedir\"
58     eval additional_libdir=\"$libdir\"
59     ])
60     else
61     additional_includedir="$withval/include"
62     additional_libdir="$withval/lib"
63     fi
64     fi
65     ])
66     if test $use_additional = yes; then
67     dnl Potentially add $additional_includedir to $CPPFLAGS.
68     dnl But don't add it
69     dnl 1. if it's the standard /usr/include,
70     dnl 2. if it's already present in $CPPFLAGS,
71     dnl 3. if it's /usr/local/include and we are using GCC on Linux,
72     dnl 4. if it doesn't exist as a directory.
73     if test "X$additional_includedir" != "X/usr/include"; then
74     haveit=
75     for x in $CPPFLAGS; do
76     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
77     if test "X$x" = "X-I$additional_includedir"; then
78     haveit=yes
79     break
80     fi
81     done
82     if test -z "$haveit"; then
83     if test "X$additional_includedir" = "X/usr/local/include"; then
84     if test -n "$GCC"; then
85     case $host_os in
86     linux*) haveit=yes;;
87     esac
88     fi
89     fi
90     if test -z "$haveit"; then
91     if test -d "$additional_includedir"; then
92     dnl Really add $additional_includedir to $CPPFLAGS.
93     CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
94     fi
95     fi
96     fi
97     fi
98     dnl Potentially add $additional_libdir to $LDFLAGS.
99     dnl But don't add it
100     dnl 1. if it's the standard /usr/lib,
101     dnl 2. if it's already present in $LDFLAGS,
102     dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
103     dnl 4. if it doesn't exist as a directory.
104     if test "X$additional_libdir" != "X/usr/lib"; then
105     haveit=
106     for x in $LDFLAGS; do
107     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
108     if test "X$x" = "X-L$additional_libdir"; then
109     haveit=yes
110     break
111     fi
112     done
113     if test -z "$haveit"; then
114     if test "X$additional_libdir" = "X/usr/local/lib"; then
115     if test -n "$GCC"; then
116     case $host_os in
117     linux*) haveit=yes;;
118     esac
119     fi
120     fi
121     if test -z "$haveit"; then
122     if test -d "$additional_libdir"; then
123     dnl Really add $additional_libdir to $LDFLAGS.
124     LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
125     fi
126     fi
127     fi
128     fi
129     fi
130     ])
131    
132     dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
133     dnl acl_final_exec_prefix, containing the values to which $prefix and
134     dnl $exec_prefix will expand at the end of the configure script.
135     AC_DEFUN([AC_LIB_PREPARE_PREFIX],
136     [
137     dnl Unfortunately, prefix and exec_prefix get only finally determined
138     dnl at the end of configure.
139     if test "X$prefix" = "XNONE"; then
140     acl_final_prefix="$ac_default_prefix"
141     else
142     acl_final_prefix="$prefix"
143     fi
144     if test "X$exec_prefix" = "XNONE"; then
145     acl_final_exec_prefix='${prefix}'
146     else
147     acl_final_exec_prefix="$exec_prefix"
148     fi
149     acl_save_prefix="$prefix"
150     prefix="$acl_final_prefix"
151     eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
152     prefix="$acl_save_prefix"
153     ])
154    
155     dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
156     dnl variables prefix and exec_prefix bound to the values they will have
157     dnl at the end of the configure script.
158     AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
159     [
160     acl_save_prefix="$prefix"
161     prefix="$acl_final_prefix"
162     acl_save_exec_prefix="$exec_prefix"
163     exec_prefix="$acl_final_exec_prefix"
164     $1
165     exec_prefix="$acl_save_exec_prefix"
166     prefix="$acl_save_prefix"
167     ])
168    
169     # lib-link.m4 serial 4 (gettext-0.12)
170     dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
171     dnl This file is free software, distributed under the terms of the GNU
172     dnl General Public License. As a special exception to the GNU General
173     dnl Public License, this file may be distributed as part of a program
174     dnl that contains a configuration script generated by Autoconf, under
175     dnl the same distribution terms as the rest of that program.
176    
177     dnl From Bruno Haible.
178    
179     dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
180     dnl the libraries corresponding to explicit and implicit dependencies.
181     dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
182     dnl augments the CPPFLAGS variable.
183     AC_DEFUN([AC_LIB_LINKFLAGS],
184     [
185     AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
186     AC_REQUIRE([AC_LIB_RPATH])
187     define([Name],[translit([$1],[./-], [___])])
188     define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
189     [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
190     AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
191     AC_LIB_LINKFLAGS_BODY([$1], [$2])
192     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
193     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
194     ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
195     ])
196     LIB[]NAME="$ac_cv_lib[]Name[]_libs"
197     LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
198     INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
199     AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
200     AC_SUBST([LIB]NAME)
201     AC_SUBST([LTLIB]NAME)
202     dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
203     dnl results of this search when this library appears as a dependency.
204     HAVE_LIB[]NAME=yes
205     undefine([Name])
206     undefine([NAME])
207     ])
208    
209     dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
210     dnl searches for libname and the libraries corresponding to explicit and
211     dnl implicit dependencies, together with the specified include files and
212     dnl the ability to compile and link the specified testcode. If found, it
213     dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
214     dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
215     dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
216     dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
217     AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
218     [
219     AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
220     AC_REQUIRE([AC_LIB_RPATH])
221     define([Name],[translit([$1],[./-], [___])])
222     define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
223     [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
224    
225     dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
226     dnl accordingly.
227     AC_LIB_LINKFLAGS_BODY([$1], [$2])
228    
229     dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
230     dnl because if the user has installed lib[]Name and not disabled its use
231     dnl via --without-lib[]Name-prefix, he wants to use it.
232     ac_save_CPPFLAGS="$CPPFLAGS"
233     AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
234    
235     AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
236     ac_save_LIBS="$LIBS"
237     LIBS="$LIBS $LIB[]NAME"
238     AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
239     LIBS="$ac_save_LIBS"
240     ])
241     if test "$ac_cv_lib[]Name" = yes; then
242     HAVE_LIB[]NAME=yes
243     AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
244     AC_MSG_CHECKING([how to link with lib[]$1])
245     AC_MSG_RESULT([$LIB[]NAME])
246     else
247     HAVE_LIB[]NAME=no
248     dnl If $LIB[]NAME didn't lead to a usable library, we don't need
249     dnl $INC[]NAME either.
250     CPPFLAGS="$ac_save_CPPFLAGS"
251     LIB[]NAME=
252     LTLIB[]NAME=
253     fi
254     AC_SUBST([HAVE_LIB]NAME)
255     AC_SUBST([LIB]NAME)
256     AC_SUBST([LTLIB]NAME)
257     undefine([Name])
258     undefine([NAME])
259     ])
260    
261     dnl Determine the platform dependent parameters needed to use rpath:
262     dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
263     dnl hardcode_direct, hardcode_minus_L.
264     AC_DEFUN([AC_LIB_RPATH],
265     [
266     AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
267     AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
268     AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
269     AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
270     AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
271     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
272     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
273     . ./conftest.sh
274     rm -f ./conftest.sh
275     acl_cv_rpath=done
276     ])
277     wl="$acl_cv_wl"
278     libext="$acl_cv_libext"
279     shlibext="$acl_cv_shlibext"
280     hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
281     hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
282     hardcode_direct="$acl_cv_hardcode_direct"
283     hardcode_minus_L="$acl_cv_hardcode_minus_L"
284     dnl Determine whether the user wants rpath handling at all.
285     AC_ARG_ENABLE(rpath,
286     [ --disable-rpath do not hardcode runtime library paths],
287     :, enable_rpath=yes)
288     ])
289    
290     dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
291     dnl the libraries corresponding to explicit and implicit dependencies.
292     dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
293     AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
294     [
295     define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
296     [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
297     dnl By default, look in $includedir and $libdir.
298     use_additional=yes
299     AC_LIB_WITH_FINAL_PREFIX([
300     eval additional_includedir=\"$includedir\"
301     eval additional_libdir=\"$libdir\"
302     ])
303     AC_LIB_ARG_WITH([lib$1-prefix],
304     [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
305     --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
306     [
307     if test "X$withval" = "Xno"; then
308     use_additional=no
309     else
310     if test "X$withval" = "X"; then
311     AC_LIB_WITH_FINAL_PREFIX([
312     eval additional_includedir=\"$includedir\"
313     eval additional_libdir=\"$libdir\"
314     ])
315     else
316     additional_includedir="$withval/include"
317     additional_libdir="$withval/lib"
318     fi
319     fi
320     ])
321     dnl Search the library and its dependencies in $additional_libdir and
322     dnl $LDFLAGS. Using breadth-first-seach.
323     LIB[]NAME=
324     LTLIB[]NAME=
325     INC[]NAME=
326     rpathdirs=
327     ltrpathdirs=
328     names_already_handled=
329     names_next_round='$1 $2'
330     while test -n "$names_next_round"; do
331     names_this_round="$names_next_round"
332     names_next_round=
333     for name in $names_this_round; do
334     already_handled=
335     for n in $names_already_handled; do
336     if test "$n" = "$name"; then
337     already_handled=yes
338     break
339     fi
340     done
341     if test -z "$already_handled"; then
342     names_already_handled="$names_already_handled $name"
343     dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
344     dnl or AC_LIB_HAVE_LINKFLAGS call.
345     uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
346     eval value=\"\$HAVE_LIB$uppername\"
347     if test -n "$value"; then
348     if test "$value" = yes; then
349     eval value=\"\$LIB$uppername\"
350     test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
351     eval value=\"\$LTLIB$uppername\"
352     test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
353     else
354     dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
355     dnl that this library doesn't exist. So just drop it.
356     :
357     fi
358     else
359     dnl Search the library lib$name in $additional_libdir and $LDFLAGS
360     dnl and the already constructed $LIBNAME/$LTLIBNAME.
361     found_dir=
362     found_la=
363     found_so=
364     found_a=
365     if test $use_additional = yes; then
366     if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
367     found_dir="$additional_libdir"
368     found_so="$additional_libdir/lib$name.$shlibext"
369     if test -f "$additional_libdir/lib$name.la"; then
370     found_la="$additional_libdir/lib$name.la"
371     fi
372     else
373     if test -f "$additional_libdir/lib$name.$libext"; then
374     found_dir="$additional_libdir"
375     found_a="$additional_libdir/lib$name.$libext"
376     if test -f "$additional_libdir/lib$name.la"; then
377     found_la="$additional_libdir/lib$name.la"
378     fi
379     fi
380     fi
381     fi
382     if test "X$found_dir" = "X"; then
383     for x in $LDFLAGS $LTLIB[]NAME; do
384     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
385     case "$x" in
386     -L*)
387     dir=`echo "X$x" | sed -e 's/^X-L//'`
388     if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
389     found_dir="$dir"
390     found_so="$dir/lib$name.$shlibext"
391     if test -f "$dir/lib$name.la"; then
392     found_la="$dir/lib$name.la"
393     fi
394     else
395     if test -f "$dir/lib$name.$libext"; then
396     found_dir="$dir"
397     found_a="$dir/lib$name.$libext"
398     if test -f "$dir/lib$name.la"; then
399     found_la="$dir/lib$name.la"
400     fi
401     fi
402     fi
403     ;;
404     esac
405     if test "X$found_dir" != "X"; then
406     break
407     fi
408     done
409     fi
410     if test "X$found_dir" != "X"; then
411     dnl Found the library.
412     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
413     if test "X$found_so" != "X"; then
414     dnl Linking with a shared library. We attempt to hardcode its
415     dnl directory into the executable's runpath, unless it's the
416     dnl standard /usr/lib.
417     if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
418     dnl No hardcoding is needed.
419     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
420     else
421     dnl Use an explicit option to hardcode DIR into the resulting
422     dnl binary.
423     dnl Potentially add DIR to ltrpathdirs.
424     dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
425     haveit=
426     for x in $ltrpathdirs; do
427     if test "X$x" = "X$found_dir"; then
428     haveit=yes
429     break
430     fi
431     done
432     if test -z "$haveit"; then
433     ltrpathdirs="$ltrpathdirs $found_dir"
434     fi
435     dnl The hardcoding into $LIBNAME is system dependent.
436     if test "$hardcode_direct" = yes; then
437     dnl Using DIR/libNAME.so during linking hardcodes DIR into the
438     dnl resulting binary.
439     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
440     else
441     if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
442     dnl Use an explicit option to hardcode DIR into the resulting
443     dnl binary.
444     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
445     dnl Potentially add DIR to rpathdirs.
446     dnl The rpathdirs will be appended to $LIBNAME at the end.
447     haveit=
448     for x in $rpathdirs; do
449     if test "X$x" = "X$found_dir"; then
450     haveit=yes
451     break
452     fi
453     done
454     if test -z "$haveit"; then
455     rpathdirs="$rpathdirs $found_dir"
456     fi
457     else
458     dnl Rely on "-L$found_dir".
459     dnl But don't add it if it's already contained in the LDFLAGS
460     dnl or the already constructed $LIBNAME
461     haveit=
462     for x in $LDFLAGS $LIB[]NAME; do
463     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
464     if test "X$x" = "X-L$found_dir"; then
465     haveit=yes
466     break
467     fi
468     done
469     if test -z "$haveit"; then
470     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
471     fi
472     if test "$hardcode_minus_L" != no; then
473     dnl FIXME: Not sure whether we should use
474     dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
475     dnl here.
476     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
477     else
478     dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
479     dnl here, because this doesn't fit in flags passed to the
480     dnl compiler. So give up. No hardcoding. This affects only
481     dnl very old systems.
482     dnl FIXME: Not sure whether we should use
483     dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
484     dnl here.
485     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
486     fi
487     fi
488     fi
489     fi
490     else
491     if test "X$found_a" != "X"; then
492     dnl Linking with a static library.
493     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
494     else
495     dnl We shouldn't come here, but anyway it's good to have a
496     dnl fallback.
497     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
498     fi
499     fi
500     dnl Assume the include files are nearby.
501     additional_includedir=
502     case "$found_dir" in
503     */lib | */lib/)
504     basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
505     additional_includedir="$basedir/include"
506     ;;
507     esac
508     if test "X$additional_includedir" != "X"; then
509     dnl Potentially add $additional_includedir to $INCNAME.
510     dnl But don't add it
511     dnl 1. if it's the standard /usr/include,
512     dnl 2. if it's /usr/local/include and we are using GCC on Linux,
513     dnl 3. if it's already present in $CPPFLAGS or the already
514     dnl constructed $INCNAME,
515     dnl 4. if it doesn't exist as a directory.
516     if test "X$additional_includedir" != "X/usr/include"; then
517     haveit=
518     if test "X$additional_includedir" = "X/usr/local/include"; then
519     if test -n "$GCC"; then
520     case $host_os in
521     linux*) haveit=yes;;
522     esac
523     fi
524     fi
525     if test -z "$haveit"; then
526     for x in $CPPFLAGS $INC[]NAME; do
527     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
528     if test "X$x" = "X-I$additional_includedir"; then
529     haveit=yes
530     break
531     fi
532     done
533     if test -z "$haveit"; then
534     if test -d "$additional_includedir"; then
535     dnl Really add $additional_includedir to $INCNAME.
536     INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
537     fi
538     fi
539     fi
540     fi
541     fi
542     dnl Look for dependencies.
543     if test -n "$found_la"; then
544     dnl Read the .la file. It defines the variables
545     dnl dlname, library_names, old_library, dependency_libs, current,
546     dnl age, revision, installed, dlopen, dlpreopen, libdir.
547     save_libdir="$libdir"
548     case "$found_la" in
549     */* | *\\*) . "$found_la" ;;
550     *) . "./$found_la" ;;
551     esac
552     libdir="$save_libdir"
553     dnl We use only dependency_libs.
554     for dep in $dependency_libs; do
555     case "$dep" in
556     -L*)
557     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
558     dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
559     dnl But don't add it
560     dnl 1. if it's the standard /usr/lib,
561     dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
562     dnl 3. if it's already present in $LDFLAGS or the already
563     dnl constructed $LIBNAME,
564     dnl 4. if it doesn't exist as a directory.
565     if test "X$additional_libdir" != "X/usr/lib"; then
566     haveit=
567     if test "X$additional_libdir" = "X/usr/local/lib"; then
568     if test -n "$GCC"; then
569     case $host_os in
570     linux*) haveit=yes;;
571     esac
572     fi
573     fi
574     if test -z "$haveit"; then
575     haveit=
576     for x in $LDFLAGS $LIB[]NAME; do
577     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
578     if test "X$x" = "X-L$additional_libdir"; then
579     haveit=yes
580     break
581     fi
582     done
583     if test -z "$haveit"; then
584     if test -d "$additional_libdir"; then
585     dnl Really add $additional_libdir to $LIBNAME.
586     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
587     fi
588     fi
589     haveit=
590     for x in $LDFLAGS $LTLIB[]NAME; do
591     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
592     if test "X$x" = "X-L$additional_libdir"; then
593     haveit=yes
594     break
595     fi
596     done
597     if test -z "$haveit"; then
598     if test -d "$additional_libdir"; then
599     dnl Really add $additional_libdir to $LTLIBNAME.
600     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
601     fi
602     fi
603     fi
604     fi
605     ;;
606     -R*)
607     dir=`echo "X$dep" | sed -e 's/^X-R//'`
608     if test "$enable_rpath" != no; then
609     dnl Potentially add DIR to rpathdirs.
610     dnl The rpathdirs will be appended to $LIBNAME at the end.
611     haveit=
612     for x in $rpathdirs; do
613     if test "X$x" = "X$dir"; then
614     haveit=yes
615     break
616     fi
617     done
618     if test -z "$haveit"; then
619     rpathdirs="$rpathdirs $dir"
620     fi
621     dnl Potentially add DIR to ltrpathdirs.
622     dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
623     haveit=
624     for x in $ltrpathdirs; do
625     if test "X$x" = "X$dir"; then
626     haveit=yes
627     break
628     fi
629     done
630     if test -z "$haveit"; then
631     ltrpathdirs="$ltrpathdirs $dir"
632     fi
633     fi
634     ;;
635     -l*)
636     dnl Handle this in the next round.
637     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
638     ;;
639     *.la)
640     dnl Handle this in the next round. Throw away the .la's
641     dnl directory; it is already contained in a preceding -L
642     dnl option.
643     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
644     ;;
645     *)
646     dnl Most likely an immediate library name.
647     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
648     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
649     ;;
650     esac
651     done
652     fi
653     else
654     dnl Didn't find the library; assume it is in the system directories
655     dnl known to the linker and runtime loader. (All the system
656     dnl directories known to the linker should also be known to the
657     dnl runtime loader, otherwise the system is severely misconfigured.)
658     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
659     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
660     fi
661     fi
662     fi
663     done
664     done
665     if test "X$rpathdirs" != "X"; then
666     if test -n "$hardcode_libdir_separator"; then
667     dnl Weird platform: only the last -rpath option counts, the user must
668     dnl pass all path elements in one option. We can arrange that for a
669     dnl single library, but not when more than one $LIBNAMEs are used.
670     alldirs=
671     for found_dir in $rpathdirs; do
672     alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
673     done
674     dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
675     acl_save_libdir="$libdir"
676     libdir="$alldirs"
677     eval flag=\"$hardcode_libdir_flag_spec\"
678     libdir="$acl_save_libdir"
679     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
680     else
681     dnl The -rpath options are cumulative.
682     for found_dir in $rpathdirs; do
683     acl_save_libdir="$libdir"
684     libdir="$found_dir"
685     eval flag=\"$hardcode_libdir_flag_spec\"
686     libdir="$acl_save_libdir"
687     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
688     done
689     fi
690     fi
691     if test "X$ltrpathdirs" != "X"; then
692     dnl When using libtool, the option that works for both libraries and
693     dnl executables is -R. The -R options are cumulative.
694     for found_dir in $ltrpathdirs; do
695     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
696     done
697     fi
698     ])
699    
700     dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
701     dnl unless already present in VAR.
702     dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
703     dnl contains two or three consecutive elements that belong together.
704     AC_DEFUN([AC_LIB_APPENDTOVAR],
705     [
706     for element in [$2]; do
707     haveit=
708     for x in $[$1]; do
709     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
710     if test "X$x" = "X$element"; then
711     haveit=yes
712     break
713     fi
714     done
715     if test -z "$haveit"; then
716     [$1]="${[$1]}${[$1]:+ }$element"
717     fi
718     done
719     ])
720    
721     # lib-ld.m4 serial 3 (gettext-0.13)
722     dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
723     dnl This file is free software, distributed under the terms of the GNU
724     dnl General Public License. As a special exception to the GNU General
725     dnl Public License, this file may be distributed as part of a program
726     dnl that contains a configuration script generated by Autoconf, under
727     dnl the same distribution terms as the rest of that program.
728    
729     dnl Subroutines of libtool.m4,
730     dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
731     dnl with libtool.m4.
732    
733     dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
734     AC_DEFUN([AC_LIB_PROG_LD_GNU],
735     [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
736     [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
737     case `$LD -v 2>&1 </dev/null` in
738     *GNU* | *'with BFD'*)
739     acl_cv_prog_gnu_ld=yes ;;
740     *)
741     acl_cv_prog_gnu_ld=no ;;
742     esac])
743     with_gnu_ld=$acl_cv_prog_gnu_ld
744     ])
745    
746     dnl From libtool-1.4. Sets the variable LD.
747     AC_DEFUN([AC_LIB_PROG_LD],
748     [AC_ARG_WITH(gnu-ld,
749     [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
750     test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
751     AC_REQUIRE([AC_PROG_CC])dnl
752     AC_REQUIRE([AC_CANONICAL_HOST])dnl
753     # Prepare PATH_SEPARATOR.
754     # The user is always right.
755     if test "${PATH_SEPARATOR+set}" != set; then
756     echo "#! /bin/sh" >conf$$.sh
757     echo "exit 0" >>conf$$.sh
758     chmod +x conf$$.sh
759     if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
760     PATH_SEPARATOR=';'
761     else
762     PATH_SEPARATOR=:
763     fi
764     rm -f conf$$.sh
765     fi
766     ac_prog=ld
767     if test "$GCC" = yes; then
768     # Check if gcc -print-prog-name=ld gives a path.
769     AC_MSG_CHECKING([for ld used by GCC])
770     case $host in
771     *-*-mingw*)
772     # gcc leaves a trailing carriage return which upsets mingw
773     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
774     *)
775     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
776     esac
777     case $ac_prog in
778     # Accept absolute paths.
779     [[\\/]* | [A-Za-z]:[\\/]*)]
780     [re_direlt='/[^/][^/]*/\.\./']
781     # Canonicalize the path of ld
782     ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
783     while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
784     ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
785     done
786     test -z "$LD" && LD="$ac_prog"
787     ;;
788     "")
789     # If it fails, then pretend we aren't using GCC.
790     ac_prog=ld
791     ;;
792     *)
793     # If it is relative, then search for the first ld in PATH.
794     with_gnu_ld=unknown
795     ;;
796     esac
797     elif test "$with_gnu_ld" = yes; then
798     AC_MSG_CHECKING([for GNU ld])
799     else
800     AC_MSG_CHECKING([for non-GNU ld])
801     fi
802     AC_CACHE_VAL(acl_cv_path_LD,
803     [if test -z "$LD"; then
804     IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
805     for ac_dir in $PATH; do
806     test -z "$ac_dir" && ac_dir=.
807     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
808     acl_cv_path_LD="$ac_dir/$ac_prog"
809     # Check to see if the program is GNU ld. I'd rather use --version,
810     # but apparently some GNU ld's only accept -v.
811     # Break only if it was the GNU/non-GNU ld that we prefer.
812     case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
813     *GNU* | *'with BFD'*)
814     test "$with_gnu_ld" != no && break ;;
815     *)
816     test "$with_gnu_ld" != yes && break ;;
817     esac
818     fi
819     done
820     IFS="$ac_save_ifs"
821     else
822     acl_cv_path_LD="$LD" # Let the user override the test with a path.
823     fi])
824     LD="$acl_cv_path_LD"
825     if test -n "$LD"; then
826     AC_MSG_RESULT($LD)
827     else
828     AC_MSG_RESULT(no)
829     fi
830     test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
831     AC_LIB_PROG_LD_GNU
832     ])
833    
834     # Do all the work for Automake. This macro actually does too much --
835     # some checks are only needed if your package does certain things.
836     # But this isn't really a big deal.
837    
838     # serial 1
839    
840     dnl Usage:
841     dnl AM_INIT_AUTOMAKE(package,version, [no-define])
842    
843     AC_DEFUN([AM_INIT_AUTOMAKE],
844     [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
845     AC_REQUIRE([AC_PROG_INSTALL])
846     PACKAGE=[$1]
847     AC_SUBST(PACKAGE)
848     VERSION=[$2]
849     AC_SUBST(VERSION)
850     dnl test to see if srcdir already configured
851     if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
852     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
853     fi
854     ifelse([$3],,
855     AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
856     AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
857     AC_REQUIRE([AM_SANITY_CHECK])
858     AC_REQUIRE([AC_ARG_PROGRAM])
859     dnl FIXME This is truly gross.
860     missing_dir=`cd $ac_aux_dir && pwd`
861     AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
862     AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
863     AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
864     AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
865     AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
866     AC_REQUIRE([AC_PROG_MAKE_SET])])
867    
868     # Copyright 2002 Free Software Foundation, Inc.
869    
870     # This program is free software; you can redistribute it and/or modify
871     # it under the terms of the GNU General Public License as published by
872     # the Free Software Foundation; either version 2, or (at your option)
873     # any later version.
874    
875     # This program is distributed in the hope that it will be useful,
876     # but WITHOUT ANY WARRANTY; without even the implied warranty of
877     # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
878     # GNU General Public License for more details.
879    
880     # You should have received a copy of the GNU General Public License
881     # along with this program; if not, write to the Free Software
882     # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
883    
884     # AM_AUTOMAKE_VERSION(VERSION)
885     # ----------------------------
886     # Automake X.Y traces this macro to ensure aclocal.m4 has been
887     # generated from the m4 files accompanying Automake X.Y.
888     AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
889    
890     # AM_SET_CURRENT_AUTOMAKE_VERSION
891     # -------------------------------
892     # Call AM_AUTOMAKE_VERSION so it can be traced.
893     # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
894     AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
895     [AM_AUTOMAKE_VERSION([1.4-p6])])
896    
897     #
898     # Check to make sure that the build environment is sane.
899     #
900    
901     AC_DEFUN([AM_SANITY_CHECK],
902     [AC_MSG_CHECKING([whether build environment is sane])
903     # Just in case
904     sleep 1
905     echo timestamp > conftestfile
906     # Do `set' in a subshell so we don't clobber the current shell's
907     # arguments. Must try -L first in case configure is actually a
908     # symlink; some systems play weird games with the mod time of symlinks
909     # (eg FreeBSD returns the mod time of the symlink's containing
910     # directory).
911     if (
912     set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
913     if test "[$]*" = "X"; then
914     # -L didn't work.
915     set X `ls -t $srcdir/configure conftestfile`
916     fi
917     if test "[$]*" != "X $srcdir/configure conftestfile" \
918     && test "[$]*" != "X conftestfile $srcdir/configure"; then
919    
920     # If neither matched, then we have a broken ls. This can happen
921     # if, for instance, CONFIG_SHELL is bash and it inherits a
922     # broken ls alias from the environment. This has actually
923     # happened. Such a system could not be considered "sane".
924     AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
925     alias in your environment])
926     fi
927    
928     test "[$]2" = conftestfile
929     )
930     then
931     # Ok.
932     :
933     else
934     AC_MSG_ERROR([newly created file is older than distributed files!
935     Check your system clock])
936     fi
937     rm -f conftest*
938     AC_MSG_RESULT(yes)])
939    
940     dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
941     dnl The program must properly implement --version.
942     AC_DEFUN([AM_MISSING_PROG],
943     [AC_MSG_CHECKING(for working $2)
944     # Run test in a subshell; some versions of sh will print an error if
945     # an executable is not found, even if stderr is redirected.
946     # Redirect stdin to placate older versions of autoconf. Sigh.
947     if ($2 --version) < /dev/null > /dev/null 2>&1; then
948     $1=$2
949     AC_MSG_RESULT(found)
950     else
951     $1="$3/missing $2"
952     AC_MSG_RESULT(missing)
953     fi
954     AC_SUBST($1)])
955    
956     # Like AC_CONFIG_HEADER, but automatically create stamp file.
957    
958     AC_DEFUN([AM_CONFIG_HEADER],
959     [AC_PREREQ([2.12])
960     AC_CONFIG_HEADER([$1])
961     dnl When config.status generates a header, we must update the stamp-h file.
962     dnl This file resides in the same directory as the config header
963     dnl that is generated. We must strip everything past the first ":",
964     dnl and everything past the last "/".
965     AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
966     ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
967     <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
968     <<am_indx=1
969     for am_file in <<$1>>; do
970     case " <<$>>CONFIG_HEADERS " in
971     *" <<$>>am_file "*<<)>>
972     echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
973     ;;
974     esac
975     am_indx=`expr "<<$>>am_indx" + 1`
976     done<<>>dnl>>)
977     changequote([,]))])
978    
979     # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
980    
981     # serial 47 AC_PROG_LIBTOOL
982     # Debian $Rev: 214 $
983    
984    
985     # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
986     # -----------------------------------------------------------
987     # If this macro is not defined by Autoconf, define it here.
988     m4_ifdef([AC_PROVIDE_IFELSE],
989     [],
990     [m4_define([AC_PROVIDE_IFELSE],
991     [m4_ifdef([AC_PROVIDE_$1],
992     [$2], [$3])])])
993    
994    
995     # AC_PROG_LIBTOOL
996     # ---------------
997     AC_DEFUN([AC_PROG_LIBTOOL],
998     [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
999     dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1000     dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1001     AC_PROVIDE_IFELSE([AC_PROG_CXX],
1002     [AC_LIBTOOL_CXX],
1003     [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1004     ])])
1005     dnl And a similar setup for Fortran 77 support
1006     AC_PROVIDE_IFELSE([AC_PROG_F77],
1007     [AC_LIBTOOL_F77],
1008     [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1009     ])])
1010    
1011     dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1012     dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1013     dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1014     AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1015     [AC_LIBTOOL_GCJ],
1016     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1017     [AC_LIBTOOL_GCJ],
1018     [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1019     [AC_LIBTOOL_GCJ],
1020     [ifdef([AC_PROG_GCJ],
1021     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1022     ifdef([A][M_PROG_GCJ],
1023     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1024     ifdef([LT_AC_PROG_GCJ],
1025     [define([LT_AC_PROG_GCJ],
1026     defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1027     ])])# AC_PROG_LIBTOOL
1028    
1029    
1030     # _AC_PROG_LIBTOOL
1031     # ----------------
1032     AC_DEFUN([_AC_PROG_LIBTOOL],
1033     [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1034     AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1035     AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1036     AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1037    
1038     # This can be used to rebuild libtool when needed
1039     LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1040    
1041     # Always use our own libtool.
1042     LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1043     AC_SUBST(LIBTOOL)dnl
1044    
1045     # Prevent multiple expansion
1046     define([AC_PROG_LIBTOOL], [])
1047     ])# _AC_PROG_LIBTOOL
1048    
1049    
1050     # AC_LIBTOOL_SETUP
1051     # ----------------
1052     AC_DEFUN([AC_LIBTOOL_SETUP],
1053     [AC_PREREQ(2.50)dnl
1054     AC_REQUIRE([AC_ENABLE_SHARED])dnl
1055     AC_REQUIRE([AC_ENABLE_STATIC])dnl
1056     AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1057     AC_REQUIRE([AC_CANONICAL_HOST])dnl
1058     AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1059     AC_REQUIRE([AC_PROG_CC])dnl
1060     AC_REQUIRE([AC_PROG_LD])dnl
1061     AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1062     AC_REQUIRE([AC_PROG_NM])dnl
1063    
1064     AC_REQUIRE([AC_PROG_LN_S])dnl
1065     AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1066     # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1067     AC_REQUIRE([AC_OBJEXT])dnl
1068     AC_REQUIRE([AC_EXEEXT])dnl
1069     dnl
1070    
1071     AC_LIBTOOL_SYS_MAX_CMD_LEN
1072     AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1073     AC_LIBTOOL_OBJDIR
1074    
1075     AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1076     _LT_AC_PROG_ECHO_BACKSLASH
1077    
1078     case $host_os in
1079     aix3*)
1080     # AIX sometimes has problems with the GCC collect2 program. For some
1081     # reason, if we set the COLLECT_NAMES environment variable, the problems
1082     # vanish in a puff of smoke.
1083     if test "X${COLLECT_NAMES+set}" != Xset; then
1084     COLLECT_NAMES=
1085     export COLLECT_NAMES
1086     fi
1087     ;;
1088     esac
1089    
1090     # Sed substitution that helps us do robust quoting. It backslashifies
1091     # metacharacters that are still active within double-quoted strings.
1092     Xsed='sed -e s/^X//'
1093     [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1094    
1095     # Same as above, but do not quote variable references.
1096     [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1097    
1098     # Sed substitution to delay expansion of an escaped shell variable in a
1099     # double_quote_subst'ed string.
1100     delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1101    
1102     # Sed substitution to avoid accidental globbing in evaled expressions
1103     no_glob_subst='s/\*/\\\*/g'
1104    
1105     # Constants:
1106     rm="rm -f"
1107    
1108     # Global variables:
1109     default_ofile=libtool
1110     can_build_shared=yes
1111    
1112     # All known linkers require a `.a' archive for static linking (except M$VC,
1113     # which needs '.lib').
1114     libext=a
1115     ltmain="$ac_aux_dir/ltmain.sh"
1116     ofile="$default_ofile"
1117     with_gnu_ld="$lt_cv_prog_gnu_ld"
1118    
1119     AC_CHECK_TOOL(AR, ar, false)
1120     AC_CHECK_TOOL(RANLIB, ranlib, :)
1121     AC_CHECK_TOOL(STRIP, strip, :)
1122    
1123     old_CC="$CC"
1124     old_CFLAGS="$CFLAGS"
1125    
1126     # Set sane defaults for various variables
1127     test -z "$AR" && AR=ar
1128     test -z "$AR_FLAGS" && AR_FLAGS=cru
1129     test -z "$AS" && AS=as
1130     test -z "$CC" && CC=cc
1131     test -z "$LTCC" && LTCC=$CC
1132     test -z "$DLLTOOL" && DLLTOOL=dlltool
1133     test -z "$LD" && LD=ld
1134     test -z "$LN_S" && LN_S="ln -s"
1135     test -z "$MAGIC_CMD" && MAGIC_CMD=file
1136     test -z "$NM" && NM=nm
1137     test -z "$SED" && SED=sed
1138     test -z "$OBJDUMP" && OBJDUMP=objdump
1139     test -z "$RANLIB" && RANLIB=:
1140     test -z "$STRIP" && STRIP=:
1141     test -z "$ac_objext" && ac_objext=o
1142    
1143     # Determine commands to create old-style static archives.
1144     old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1145     old_postinstall_cmds='chmod 644 $oldlib'
1146     old_postuninstall_cmds=
1147    
1148     if test -n "$RANLIB"; then
1149     case $host_os in
1150     openbsd*)
1151     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1152     ;;
1153     *)
1154     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1155     ;;
1156     esac
1157     old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1158     fi
1159    
1160     # Only perform the check for file, if the check method requires it
1161     case $deplibs_check_method in
1162     file_magic*)
1163     if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1164     AC_PATH_MAGIC
1165     fi
1166     ;;
1167     esac
1168    
1169     AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1170     AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1171     enable_win32_dll=yes, enable_win32_dll=no)
1172    
1173     AC_ARG_ENABLE([libtool-lock],
1174     [AC_HELP_STRING([--disable-libtool-lock],
1175     [avoid locking (might break parallel builds)])])
1176     test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1177    
1178     AC_ARG_WITH([pic],
1179     [AC_HELP_STRING([--with-pic],
1180     [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1181     [pic_mode="$withval"],
1182     [pic_mode=default])
1183     test -z "$pic_mode" && pic_mode=default
1184    
1185     # Use C for the default configuration in the libtool script
1186     tagname=
1187     AC_LIBTOOL_LANG_C_CONFIG
1188     _LT_AC_TAGCONFIG
1189     ])# AC_LIBTOOL_SETUP
1190    
1191    
1192     # _LT_AC_SYS_COMPILER
1193     # -------------------
1194     AC_DEFUN([_LT_AC_SYS_COMPILER],
1195     [AC_REQUIRE([AC_PROG_CC])dnl
1196    
1197     # If no C compiler was specified, use CC.
1198     LTCC=${LTCC-"$CC"}
1199    
1200     # Allow CC to be a program name with arguments.
1201     compiler=$CC
1202     ])# _LT_AC_SYS_COMPILER
1203    
1204    
1205     # _LT_AC_SYS_LIBPATH_AIX
1206     # ----------------------
1207     # Links a minimal program and checks the executable
1208     # for the system default hardcoded library path. In most cases,
1209     # this is /usr/lib:/lib, but when the MPI compilers are used
1210     # the location of the communication and MPI libs are included too.
1211     # If we don't find anything, use the default library path according
1212     # to the aix ld manual.
1213     AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1214     [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1215     aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1216     }'`
1217     # Check for a 64-bit object if we didn't find anything.
1218     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; }
1219     }'`; fi],[])
1220     if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1221     ])# _LT_AC_SYS_LIBPATH_AIX
1222    
1223    
1224     # _LT_AC_SHELL_INIT(ARG)
1225     # ----------------------
1226     AC_DEFUN([_LT_AC_SHELL_INIT],
1227     [ifdef([AC_DIVERSION_NOTICE],
1228     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1229     [AC_DIVERT_PUSH(NOTICE)])
1230     $1
1231     AC_DIVERT_POP
1232     ])# _LT_AC_SHELL_INIT
1233    
1234    
1235     # _LT_AC_PROG_ECHO_BACKSLASH
1236     # --------------------------
1237     # Add some code to the start of the generated configure script which
1238     # will find an echo command which doesn't interpret backslashes.
1239     AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1240     [_LT_AC_SHELL_INIT([
1241     # Check that we are running under the correct shell.
1242     SHELL=${CONFIG_SHELL-/bin/sh}
1243    
1244     case X$ECHO in
1245     X*--fallback-echo)
1246     # Remove one level of quotation (which was required for Make).
1247     ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1248     ;;
1249     esac
1250    
1251     echo=${ECHO-echo}
1252     if test "X[$]1" = X--no-reexec; then
1253     # Discard the --no-reexec flag, and continue.
1254     shift
1255     elif test "X[$]1" = X--fallback-echo; then
1256     # Avoid inline document here, it may be left over
1257     :
1258     elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1259     # Yippee, $echo works!
1260     :
1261     else
1262     # Restart under the correct shell.
1263     exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1264     fi
1265    
1266     if test "X[$]1" = X--fallback-echo; then
1267     # used as fallback echo
1268     shift
1269     cat <<EOF
1270     [$]*
1271     EOF
1272     exit 0
1273     fi
1274    
1275     # The HP-UX ksh and POSIX shell print the target directory to stdout
1276     # if CDPATH is set.
1277     if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1278    
1279     if test -z "$ECHO"; then
1280     if test "X${echo_test_string+set}" != Xset; then
1281     # find a string as large as possible, as long as the shell can cope with it
1282     for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1283     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1284     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1285     echo_test_string="`eval $cmd`" &&
1286     (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1287     then
1288     break
1289     fi
1290     done
1291     fi
1292    
1293     if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1294     echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1295     test "X$echo_testing_string" = "X$echo_test_string"; then
1296     :
1297     else
1298     # The Solaris, AIX, and Digital Unix default echo programs unquote
1299     # backslashes. This makes it impossible to quote backslashes using
1300     # echo "$something" | sed 's/\\/\\\\/g'
1301     #
1302     # So, first we look for a working echo in the user's PATH.
1303    
1304     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1305     for dir in $PATH /usr/ucb; do
1306     IFS="$lt_save_ifs"
1307     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1308     test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1309     echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1310     test "X$echo_testing_string" = "X$echo_test_string"; then
1311     echo="$dir/echo"
1312     break
1313     fi
1314     done
1315     IFS="$lt_save_ifs"
1316    
1317     if test "X$echo" = Xecho; then
1318     # We didn't find a better echo, so look for alternatives.
1319     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1320     echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1321     test "X$echo_testing_string" = "X$echo_test_string"; then
1322     # This shell has a builtin print -r that does the trick.
1323     echo='print -r'
1324     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1325     test "X$CONFIG_SHELL" != X/bin/ksh; then
1326     # If we have ksh, try running configure again with it.
1327     ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1328     export ORIGINAL_CONFIG_SHELL
1329     CONFIG_SHELL=/bin/ksh
1330     export CONFIG_SHELL
1331     exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1332     else
1333     # Try using printf.
1334     echo='printf %s\n'
1335     if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1336     echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1337     test "X$echo_testing_string" = "X$echo_test_string"; then
1338     # Cool, printf works
1339     :
1340     elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1341     test "X$echo_testing_string" = 'X\t' &&
1342     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1343     test "X$echo_testing_string" = "X$echo_test_string"; then
1344     CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1345     export CONFIG_SHELL
1346     SHELL="$CONFIG_SHELL"
1347     export SHELL
1348     echo="$CONFIG_SHELL [$]0 --fallback-echo"
1349     elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1350     test "X$echo_testing_string" = 'X\t' &&
1351     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1352     test "X$echo_testing_string" = "X$echo_test_string"; then
1353     echo="$CONFIG_SHELL [$]0 --fallback-echo"
1354     else
1355     # maybe with a smaller string...
1356     prev=:
1357    
1358     for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1359     if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1360     then
1361     break
1362     fi
1363     prev="$cmd"
1364     done
1365    
1366     if test "$prev" != 'sed 50q "[$]0"'; then
1367     echo_test_string=`eval $prev`
1368     export echo_test_string
1369     exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1370     else
1371     # Oops. We lost completely, so just stick with echo.
1372     echo=echo
1373     fi
1374     fi
1375     fi
1376     fi
1377     fi
1378     fi
1379    
1380     # Copy echo and quote the copy suitably for passing to libtool from
1381     # the Makefile, instead of quoting the original, which is used later.
1382     ECHO=$echo
1383     if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1384     ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1385     fi
1386    
1387     AC_SUBST(ECHO)
1388     ])])# _LT_AC_PROG_ECHO_BACKSLASH
1389    
1390    
1391     # _LT_AC_LOCK
1392     # -----------
1393     AC_DEFUN([_LT_AC_LOCK],
1394     [AC_ARG_ENABLE([libtool-lock],
1395     [AC_HELP_STRING([--disable-libtool-lock],
1396     [avoid locking (might break parallel builds)])])
1397     test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1398    
1399     # Some flags need to be propagated to the compiler or linker for good
1400     # libtool support.
1401     case $host in
1402     ia64-*-hpux*)
1403     # Find out which ABI we are using.
1404     echo 'int i;' > conftest.$ac_ext
1405     if AC_TRY_EVAL(ac_compile); then
1406     case `/usr/bin/file conftest.$ac_objext` in
1407     *ELF-32*)
1408     HPUX_IA64_MODE="32"
1409     ;;
1410     *ELF-64*)
1411     HPUX_IA64_MODE="64"
1412     ;;
1413     esac
1414     fi
1415     rm -rf conftest*
1416     ;;
1417     *-*-irix6*)
1418     # Find out which ABI we are using.
1419     echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1420     if AC_TRY_EVAL(ac_compile); then
1421     if test "$lt_cv_prog_gnu_ld" = yes; then
1422     case `/usr/bin/file conftest.$ac_objext` in
1423     *32-bit*)
1424     LD="${LD-ld} -melf32bsmip"
1425     ;;
1426     *N32*)
1427     LD="${LD-ld} -melf32bmipn32"
1428     ;;
1429     *64-bit*)
1430     LD="${LD-ld} -melf64bmip"
1431     ;;
1432     esac
1433     else
1434     case `/usr/bin/file conftest.$ac_objext` in
1435     *32-bit*)
1436     LD="${LD-ld} -32"
1437     ;;
1438     *N32*)
1439     LD="${LD-ld} -n32"
1440     ;;
1441     *64-bit*)
1442     LD="${LD-ld} -64"
1443     ;;
1444     esac
1445     fi
1446     fi
1447     rm -rf conftest*
1448     ;;
1449    
1450     x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1451     # Find out which ABI we are using.
1452     echo 'int i;' > conftest.$ac_ext
1453     if AC_TRY_EVAL(ac_compile); then
1454     case "`/usr/bin/file conftest.o`" in
1455     *32-bit*)
1456     case $host in
1457     x86_64-*linux*)
1458     LD="${LD-ld} -m elf_i386"
1459     ;;
1460     ppc64-*linux*|powerpc64-*linux*)
1461     LD="${LD-ld} -m elf32ppclinux"
1462     ;;
1463     s390x-*linux*)
1464     LD="${LD-ld} -m elf_s390"
1465     ;;
1466     sparc64-*linux*)
1467     LD="${LD-ld} -m elf32_sparc"
1468     ;;
1469     esac
1470     ;;
1471     *64-bit*)
1472     case $host in
1473     x86_64-*linux*)
1474     LD="${LD-ld} -m elf_x86_64"
1475     ;;
1476     ppc*-*linux*|powerpc*-*linux*)
1477     LD="${LD-ld} -m elf64ppc"
1478     ;;
1479     s390*-*linux*)
1480     LD="${LD-ld} -m elf64_s390"
1481     ;;
1482     sparc*-*linux*)
1483     LD="${LD-ld} -m elf64_sparc"
1484     ;;
1485     esac
1486     ;;
1487     esac
1488     fi
1489     rm -rf conftest*
1490     ;;
1491    
1492     *-*-sco3.2v5*)
1493     # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1494     SAVE_CFLAGS="$CFLAGS"
1495     CFLAGS="$CFLAGS -belf"
1496     AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1497     [AC_LANG_PUSH(C)
1498     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1499     AC_LANG_POP])
1500     if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1501     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1502     CFLAGS="$SAVE_CFLAGS"
1503     fi
1504     ;;
1505     AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1506     [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1507     AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1508     AC_CHECK_TOOL(AS, as, false)
1509     AC_CHECK_TOOL(OBJDUMP, objdump, false)
1510     ;;
1511     ])
1512     esac
1513    
1514     need_locks="$enable_libtool_lock"
1515    
1516     ])# _LT_AC_LOCK
1517    
1518    
1519     # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1520     # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1521     # ----------------------------------------------------------------
1522     # Check whether the given compiler option works
1523     AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1524     [AC_REQUIRE([LT_AC_PROG_SED])
1525     AC_CACHE_CHECK([$1], [$2],
1526     [$2=no
1527     ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1528     printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1529     lt_compiler_flag="$3"
1530     # Insert the option either (1) after the last *FLAGS variable, or
1531     # (2) before a word containing "conftest.", or (3) at the end.
1532     # Note that $ac_compile itself does not contain backslashes and begins
1533     # with a dollar sign (not a hyphen), so the echo should work correctly.
1534     # The option is referenced via a variable to avoid confusing sed.
1535     lt_compile=`echo "$ac_compile" | $SED \
1536     -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1537     -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1538     -e 's:$: $lt_compiler_flag:'`
1539     (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1540     (eval "$lt_compile" 2>conftest.err)
1541     ac_status=$?
1542     cat conftest.err >&AS_MESSAGE_LOG_FD
1543     echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1544     if (exit $ac_status) && test -s "$ac_outfile"; then
1545     # The compiler can only warn and ignore the option if not recognized
1546     # So say no if there are warnings
1547     if test ! -s conftest.err; then
1548     $2=yes
1549     fi
1550     fi
1551     $rm conftest*
1552     ])
1553    
1554     if test x"[$]$2" = xyes; then
1555     ifelse([$5], , :, [$5])
1556     else
1557     ifelse([$6], , :, [$6])
1558     fi
1559     ])# AC_LIBTOOL_COMPILER_OPTION
1560    
1561    
1562     # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1563     # [ACTION-SUCCESS], [ACTION-FAILURE])
1564     # ------------------------------------------------------------
1565     # Check whether the given compiler option works
1566     AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1567     [AC_CACHE_CHECK([$1], [$2],
1568     [$2=no
1569     save_LDFLAGS="$LDFLAGS"
1570     LDFLAGS="$LDFLAGS $3"
1571     printf "$lt_simple_link_test_code" > conftest.$ac_ext
1572     if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1573     # The compiler can only warn and ignore the option if not recognized
1574     # So say no if there are warnings
1575     if test -s conftest.err; then
1576     # Append any errors to the config.log.
1577     cat conftest.err 1>&AS_MESSAGE_LOG_FD
1578     else
1579     $2=yes
1580     fi
1581     fi
1582     $rm conftest*
1583     LDFLAGS="$save_LDFLAGS"
1584     ])
1585    
1586     if test x"[$]$2" = xyes; then
1587     ifelse([$4], , :, [$4])
1588     else
1589     ifelse([$5], , :, [$5])
1590     fi
1591     ])# AC_LIBTOOL_LINKER_OPTION
1592    
1593    
1594     # AC_LIBTOOL_SYS_MAX_CMD_LEN
1595     # --------------------------
1596     AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1597     [# find the maximum length of command line arguments
1598     AC_MSG_CHECKING([the maximum length of command line arguments])
1599     AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1600     i=0
1601     teststring="ABCD"
1602    
1603     case $build_os in
1604     msdosdjgpp*)
1605     # On DJGPP, this test can blow up pretty badly due to problems in libc
1606     # (any single argument exceeding 2000 bytes causes a buffer overrun
1607     # during glob expansion). Even if it were fixed, the result of this
1608     # check would be larger than it should be.
1609     lt_cv_sys_max_cmd_len=12288; # 12K is about right
1610     ;;
1611    
1612     gnu*)
1613     # Under GNU Hurd, this test is not required because there is
1614     # no limit to the length of command line arguments.
1615     # Libtool will interpret -1 as no limit whatsoever
1616     lt_cv_sys_max_cmd_len=-1;
1617     ;;
1618    
1619     cygwin* | mingw*)
1620     # On Win9x/ME, this test blows up -- it succeeds, but takes
1621     # about 5 minutes as the teststring grows exponentially.
1622     # Worse, since 9x/ME are not pre-emptively multitasking,
1623     # you end up with a "frozen" computer, even though with patience
1624     # the test eventually succeeds (with a max line length of 256k).
1625     # Instead, let's just punt: use the minimum linelength reported by
1626     # all of the supported platforms: 8192 (on NT/2K/XP).
1627     lt_cv_sys_max_cmd_len=8192;
1628     ;;
1629    
1630     amigaos*)
1631     # On AmigaOS with pdksh, this test takes hours, literally.
1632     # So we just punt and use a minimum line length of 8192.
1633     lt_cv_sys_max_cmd_len=8192;
1634     ;;
1635    
1636     *)
1637     # If test is not a shell built-in, we'll probably end up computing a
1638     # maximum length that is only half of the actual maximum length, but
1639     # we can't tell.
1640     while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1641     = "XX$teststring") >/dev/null 2>&1 &&
1642     new_result=`expr "X$teststring" : ".*" 2>&1` &&
1643     lt_cv_sys_max_cmd_len=$new_result &&
1644     test $i != 17 # 1/2 MB should be enough
1645     do
1646     i=`expr $i + 1`
1647     teststring=$teststring$teststring
1648     done
1649     teststring=
1650     # Add a significant safety factor because C++ compilers can tack on massive
1651     # amounts of additional arguments before passing them to the linker.
1652     # It appears as though 1/2 is a usable value.
1653     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1654     ;;
1655     esac
1656     ])
1657     if test -n $lt_cv_sys_max_cmd_len ; then
1658     AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1659     else
1660     AC_MSG_RESULT(none)
1661     fi
1662     ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1663    
1664    
1665     # _LT_AC_CHECK_DLFCN
1666     # --------------------
1667     AC_DEFUN([_LT_AC_CHECK_DLFCN],
1668     [AC_CHECK_HEADERS(dlfcn.h)dnl
1669     ])# _LT_AC_CHECK_DLFCN
1670    
1671    
1672     # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1673     # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1674     # ------------------------------------------------------------------
1675     AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1676     [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1677     if test "$cross_compiling" = yes; then :
1678     [$4]
1679     else
1680     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1681     lt_status=$lt_dlunknown
1682     cat > conftest.$ac_ext <<EOF
1683     [#line __oline__ "configure"
1684     #include "confdefs.h"
1685    
1686     #if HAVE_DLFCN_H
1687     #include <dlfcn.h>
1688     #endif
1689    
1690     #include <stdio.h>
1691    
1692     #ifdef RTLD_GLOBAL
1693     # define LT_DLGLOBAL RTLD_GLOBAL
1694     #else
1695     # ifdef DL_GLOBAL
1696     # define LT_DLGLOBAL DL_GLOBAL
1697     # else
1698     # define LT_DLGLOBAL 0
1699     # endif
1700     #endif
1701    
1702     /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1703     find out it does not work in some platform. */
1704     #ifndef LT_DLLAZY_OR_NOW
1705     # ifdef RTLD_LAZY
1706     # define LT_DLLAZY_OR_NOW RTLD_LAZY
1707     # else
1708     # ifdef DL_LAZY
1709     # define LT_DLLAZY_OR_NOW DL_LAZY
1710     # else
1711     # ifdef RTLD_NOW
1712     # define LT_DLLAZY_OR_NOW RTLD_NOW
1713     # else
1714     # ifdef DL_NOW
1715     # define LT_DLLAZY_OR_NOW DL_NOW
1716     # else
1717     # define LT_DLLAZY_OR_NOW 0
1718     # endif
1719     # endif
1720     # endif
1721     # endif
1722     #endif
1723    
1724     #ifdef __cplusplus
1725     extern "C" void exit (int);
1726     #endif
1727    
1728     void fnord() { int i=42;}
1729     int main ()
1730     {
1731     void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1732     int status = $lt_dlunknown;
1733    
1734     if (self)
1735     {
1736     if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1737     else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1738     /* dlclose (self); */
1739     }
1740    
1741     exit (status);
1742     }]
1743     EOF
1744     if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1745     (./conftest; exit; ) 2>/dev/null
1746     lt_status=$?
1747     case x$lt_status in
1748     x$lt_dlno_uscore) $1 ;;
1749     x$lt_dlneed_uscore) $2 ;;
1750     x$lt_unknown|x*) $3 ;;
1751     esac
1752     else :
1753     # compilation failed
1754     $3
1755     fi
1756     fi
1757     rm -fr conftest*
1758     ])# _LT_AC_TRY_DLOPEN_SELF
1759    
1760    
1761     # AC_LIBTOOL_DLOPEN_SELF
1762     # -------------------
1763     AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1764     [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1765     if test "x$enable_dlopen" != xyes; then
1766     enable_dlopen=unknown
1767     enable_dlopen_self=unknown
1768     enable_dlopen_self_static=unknown
1769     else
1770     lt_cv_dlopen=no
1771     lt_cv_dlopen_libs=
1772    
1773     case $host_os in
1774     beos*)
1775     lt_cv_dlopen="load_add_on"
1776     lt_cv_dlopen_libs=
1777     lt_cv_dlopen_self=yes
1778     ;;
1779    
1780     mingw* | pw32*)
1781     lt_cv_dlopen="LoadLibrary"
1782     lt_cv_dlopen_libs=
1783     ;;
1784    
1785     cygwin*)
1786     lt_cv_dlopen="dlopen"
1787     lt_cv_dlopen_libs=
1788     ;;
1789    
1790     darwin*)
1791     # if libdl is installed we need to link against it
1792     AC_CHECK_LIB([dl], [dlopen],
1793     [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1794     lt_cv_dlopen="dyld"
1795     lt_cv_dlopen_libs=
1796     lt_cv_dlopen_self=yes
1797     ])
1798     ;;
1799    
1800     *)
1801     AC_CHECK_FUNC([shl_load],
1802     [lt_cv_dlopen="shl_load"],
1803     [AC_CHECK_LIB([dld], [shl_load],
1804     [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1805     [AC_CHECK_FUNC([dlopen],
1806     [lt_cv_dlopen="dlopen"],
1807     [AC_CHECK_LIB([dl], [dlopen],
1808     [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1809     [AC_CHECK_LIB([svld], [dlopen],
1810     [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1811     [AC_CHECK_LIB([dld], [dld_link],
1812     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1813     ])
1814     ])
1815     ])
1816     ])
1817     ])
1818     ;;
1819     esac
1820    
1821     if test "x$lt_cv_dlopen" != xno; then
1822     enable_dlopen=yes
1823     else
1824     enable_dlopen=no
1825     fi
1826    
1827     case $lt_cv_dlopen in
1828     dlopen)
1829     save_CPPFLAGS="$CPPFLAGS"
1830     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1831    
1832     save_LDFLAGS="$LDFLAGS"
1833     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1834    
1835     save_LIBS="$LIBS"
1836     LIBS="$lt_cv_dlopen_libs $LIBS"
1837    
1838     AC_CACHE_CHECK([whether a program can dlopen itself],
1839     lt_cv_dlopen_self, [dnl
1840     _LT_AC_TRY_DLOPEN_SELF(
1841     lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1842     lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1843     ])
1844    
1845     if test "x$lt_cv_dlopen_self" = xyes; then
1846     LDFLAGS="$LDFLAGS $link_static_flag"
1847     AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1848     lt_cv_dlopen_self_static, [dnl
1849     _LT_AC_TRY_DLOPEN_SELF(
1850     lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1851     lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1852     ])
1853     fi
1854    
1855     CPPFLAGS="$save_CPPFLAGS"
1856     LDFLAGS="$save_LDFLAGS"
1857     LIBS="$save_LIBS"
1858     ;;
1859     esac
1860    
1861     case $lt_cv_dlopen_self in
1862     yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1863     *) enable_dlopen_self=unknown ;;
1864     esac
1865    
1866     case $lt_cv_dlopen_self_static in
1867     yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1868     *) enable_dlopen_self_static=unknown ;;
1869     esac
1870     fi
1871     ])# AC_LIBTOOL_DLOPEN_SELF
1872    
1873    
1874     # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1875     # ---------------------------------
1876     # Check to see if options -c and -o are simultaneously supported by compiler
1877     AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1878     [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1879     AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1880     [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1881     [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1882     $rm -r conftest 2>/dev/null
1883     mkdir conftest
1884     cd conftest
1885     mkdir out
1886     printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1887    
1888     lt_compiler_flag="-o out/conftest2.$ac_objext"
1889     # Insert the option either (1) after the last *FLAGS variable, or
1890     # (2) before a word containing "conftest.", or (3) at the end.
1891     # Note that $ac_compile itself does not contain backslashes and begins
1892     # with a dollar sign (not a hyphen), so the echo should work correctly.
1893     lt_compile=`echo "$ac_compile" | $SED \
1894     -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1895     -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1896     -e 's:$: $lt_compiler_flag:'`
1897     (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1898     (eval "$lt_compile" 2>out/conftest.err)
1899     ac_status=$?
1900     cat out/conftest.err >&AS_MESSAGE_LOG_FD
1901     echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1902     if (exit $ac_status) && test -s out/conftest2.$ac_objext
1903     then
1904     # The compiler can only warn and ignore the option if not recognized
1905     # So say no if there are warnings
1906     if test ! -s out/conftest.err; then
1907     _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1908     fi
1909     fi
1910     chmod u+w .
1911     $rm conftest*
1912     # SGI C++ compiler will create directory out/ii_files/ for
1913     # template instantiation
1914     test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1915     $rm out/* && rmdir out
1916     cd ..
1917     rmdir conftest
1918     $rm conftest*
1919     ])
1920     ])# AC_LIBTOOL_PROG_CC_C_O
1921    
1922    
1923     # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1924     # -----------------------------------------
1925     # Check to see if we can do hard links to lock some files if needed
1926     AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1927     [AC_REQUIRE([_LT_AC_LOCK])dnl
1928    
1929     hard_links="nottested"
1930     if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1931     # do not overwrite the value of need_locks provided by the user
1932     AC_MSG_CHECKING([if we can lock with hard links])
1933     hard_links=yes
1934     $rm conftest*
1935     ln conftest.a conftest.b 2>/dev/null && hard_links=no
1936     touch conftest.a
1937     ln conftest.a conftest.b 2>&5 || hard_links=no
1938     ln conftest.a conftest.b 2>/dev/null && hard_links=no
1939     AC_MSG_RESULT([$hard_links])
1940     if test "$hard_links" = no; then
1941     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1942     need_locks=warn
1943     fi
1944     else
1945     need_locks=no
1946     fi
1947     ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1948    
1949    
1950     # AC_LIBTOOL_OBJDIR
1951     # -----------------
1952     AC_DEFUN([AC_LIBTOOL_OBJDIR],
1953     [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1954     [rm -f .libs 2>/dev/null
1955     mkdir .libs 2>/dev/null
1956     if test -d .libs; then
1957     lt_cv_objdir=.libs
1958     else
1959     # MS-DOS does not allow filenames that begin with a dot.
1960     lt_cv_objdir=_libs
1961     fi
1962     rmdir .libs 2>/dev/null])
1963     objdir=$lt_cv_objdir
1964     ])# AC_LIBTOOL_OBJDIR
1965    
1966    
1967     # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1968     # ----------------------------------------------
1969     # Check hardcoding attributes.
1970     AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1971     [AC_MSG_CHECKING([how to hardcode library paths into programs])
1972     _LT_AC_TAGVAR(hardcode_action, $1)=
1973     if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1974     test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1975     test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
1976    
1977     # We can hardcode non-existant directories.
1978     if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1979     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1980     # have to relink, otherwise we might link with an installed library
1981     # when we should be linking with a yet-to-be-installed one
1982     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1983     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1984     # Linking always hardcodes the temporary library directory.
1985     _LT_AC_TAGVAR(hardcode_action, $1)=relink
1986     else
1987     # We can link without hardcoding, and we can hardcode nonexisting dirs.
1988     _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1989     fi
1990     else
1991     # We cannot hardcode anything, or else we can only hardcode existing
1992     # directories.
1993     _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1994     fi
1995     AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1996    
1997     if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1998     # Fast installation is not supported
1999     enable_fast_install=no
2000     elif test "$shlibpath_overrides_runpath" = yes ||
2001     test "$enable_shared" = no; then
2002     # Fast installation is not necessary
2003     enable_fast_install=needless
2004     fi
2005     ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2006    
2007    
2008     # AC_LIBTOOL_SYS_LIB_STRIP
2009     # ------------------------
2010     AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2011     [striplib=
2012     old_striplib=
2013     AC_MSG_CHECKING([whether stripping libraries is possible])
2014     if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2015     test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2016     test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2017     AC_MSG_RESULT([yes])
2018     else
2019     # FIXME - insert some real tests, host_os isn't really good enough
2020     case $host_os in
2021     darwin*)
2022     if test -n "$STRIP" ; then
2023     striplib="$STRIP -x"
2024     AC_MSG_RESULT([yes])
2025     else
2026     AC_MSG_RESULT([no])
2027     fi
2028     ;;
2029     *)
2030     AC_MSG_RESULT([no])
2031     ;;
2032     esac
2033     fi
2034     ])# AC_LIBTOOL_SYS_LIB_STRIP
2035    
2036    
2037     # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2038     # -----------------------------
2039     # PORTME Fill in your ld.so characteristics
2040     AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2041     [AC_MSG_CHECKING([dynamic linker characteristics])
2042     library_names_spec=
2043     libname_spec='lib$name'
2044     soname_spec=
2045     shrext_cmds=".so"
2046     postinstall_cmds=
2047     postuninstall_cmds=
2048     finish_cmds=
2049     finish_eval=
2050     shlibpath_var=
2051     shlibpath_overrides_runpath=unknown
2052     version_type=none
2053     dynamic_linker="$host_os ld.so"
2054     sys_lib_dlsearch_path_spec="/lib /usr/lib"
2055     if test "$GCC" = yes; then
2056     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2057     if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2058     # if the path contains ";" then we assume it to be the separator
2059     # otherwise default to the standard path separator (i.e. ":") - it is
2060     # assumed that no part of a normal pathname contains ";" but that should
2061     # okay in the real world where ";" in dirpaths is itself problematic.
2062     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2063     else
2064     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2065     fi
2066     else
2067     sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2068     fi
2069     need_lib_prefix=unknown
2070     hardcode_into_libs=no
2071    
2072     # when you set need_version to no, make sure it does not cause -set_version
2073     # flags to be left without arguments
2074     need_version=unknown
2075    
2076     case $host_os in
2077     aix3*)
2078     version_type=linux
2079     library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2080     shlibpath_var=LIBPATH
2081    
2082     # AIX 3 has no versioning support, so we append a major version to the name.
2083     soname_spec='${libname}${release}${shared_ext}$major'
2084     ;;
2085    
2086     aix4* | aix5*)
2087     version_type=linux
2088     need_lib_prefix=no
2089     need_version=no
2090     hardcode_into_libs=yes
2091     if test "$host_cpu" = ia64; then
2092     # AIX 5 supports IA64
2093     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2094     shlibpath_var=LD_LIBRARY_PATH
2095     else
2096     # With GCC up to 2.95.x, collect2 would create an import file
2097     # for dependence libraries. The import file would start with
2098     # the line `#! .'. This would cause the generated library to
2099     # depend on `.', always an invalid library. This was fixed in
2100     # development snapshots of GCC prior to 3.0.
2101     case $host_os in
2102     aix4 | aix4.[[01]] | aix4.[[01]].*)
2103     if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2104     echo ' yes '
2105     echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2106     :
2107     else
2108     can_build_shared=no
2109     fi
2110     ;;
2111     esac
2112     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2113     # soname into executable. Probably we can add versioning support to
2114     # collect2, so additional links can be useful in future.
2115     if test "$aix_use_runtimelinking" = yes; then
2116     # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2117     # instead of lib<name>.a to let people know that these are not
2118     # typical AIX shared libraries.
2119     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2120     else
2121     # We preserve .a as extension for shared libraries through AIX4.2
2122     # and later when we are not doing run time linking.
2123     library_names_spec='${libname}${release}.a $libname.a'
2124     soname_spec='${libname}${release}${shared_ext}$major'
2125     fi
2126     shlibpath_var=LIBPATH
2127     fi
2128     ;;
2129    
2130     amigaos*)
2131     library_names_spec='$libname.ixlibrary $libname.a'
2132     # Create ${libname}_ixlibrary.a entries in /sys/libs.
2133     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'
2134     ;;
2135    
2136     beos*)
2137     library_names_spec='${libname}${shared_ext}'
2138     dynamic_linker="$host_os ld.so"
2139     shlibpath_var=LIBRARY_PATH
2140     ;;
2141    
2142     bsdi4*)
2143     version_type=linux
2144     need_version=no
2145     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2146     soname_spec='${libname}${release}${shared_ext}$major'
2147     finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2148     shlibpath_var=LD_LIBRARY_PATH
2149     sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2150     sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2151     # the default ld.so.conf also contains /usr/contrib/lib and
2152     # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2153     # libtool to hard-code these into programs
2154     ;;
2155    
2156     cygwin* | mingw* | pw32*)
2157     version_type=windows
2158     shrext_cmds=".dll"
2159     need_version=no
2160     need_lib_prefix=no
2161    
2162     case $GCC,$host_os in
2163     yes,cygwin* | yes,mingw* | yes,pw32*)
2164     library_names_spec='$libname.dll.a'
2165     # DLL is installed to $(libdir)/../bin by postinstall_cmds
2166     postinstall_cmds='base_file=`basename \${file}`~
2167     dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2168     dldir=$destdir/`dirname \$dlpath`~
2169     test -d \$dldir || mkdir -p \$dldir~
2170     $install_prog $dir/$dlname \$dldir/$dlname'
2171     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2172     dlpath=$dir/\$dldll~
2173     $rm \$dlpath'
2174     shlibpath_overrides_runpath=yes
2175    
2176     case $host_os in
2177     cygwin*)
2178     # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2179     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2180     sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2181     ;;
2182     mingw*)
2183     # MinGW DLLs use traditional 'lib' prefix
2184     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2185     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2186     if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2187     # It is most probably a Windows format PATH printed by
2188     # mingw gcc, but we are running on Cygwin. Gcc prints its search
2189     # path with ; separators, and with drive letters. We can handle the
2190     # drive letters (cygwin fileutils understands them), so leave them,
2191     # especially as we might pass files found there to a mingw objdump,
2192     # which wouldn't understand a cygwinified path. Ahh.
2193     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2194     else
2195     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2196     fi
2197     ;;
2198     pw32*)
2199     # pw32 DLLs use 'pw' prefix rather than 'lib'
2200     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
2201     ;;
2202     esac
2203     ;;
2204    
2205     *)
2206     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2207     ;;
2208     esac
2209     dynamic_linker='Win32 ld.exe'
2210     # FIXME: first we should search . and the directory the executable is in
2211     shlibpath_var=PATH
2212     ;;
2213    
2214     darwin* | rhapsody*)
2215     dynamic_linker="$host_os dyld"
2216     version_type=darwin
2217     need_lib_prefix=no
2218     need_version=no
2219     library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2220     soname_spec='${libname}${release}${major}$shared_ext'
2221     shlibpath_overrides_runpath=yes
2222     shlibpath_var=DYLD_LIBRARY_PATH
2223     shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
2224     # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2225     if test "$GCC" = yes; then
2226     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"`
2227     else
2228     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2229     fi
2230     sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2231     ;;
2232    
2233     dgux*)
2234     version_type=linux
2235     need_lib_prefix=no
2236     need_version=no
2237     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2238     soname_spec='${libname}${release}${shared_ext}$major'
2239     shlibpath_var=LD_LIBRARY_PATH
2240     ;;
2241    
2242     freebsd1*)
2243     dynamic_linker=no
2244     ;;
2245    
2246     kfreebsd*-gnu)
2247     version_type=linux
2248     need_lib_prefix=no
2249     need_version=no
2250     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2251     soname_spec='${libname}${release}${shared_ext}$major'
2252     shlibpath_var=LD_LIBRARY_PATH
2253     shlibpath_overrides_runpath=no
2254     hardcode_into_libs=yes
2255     dynamic_linker='GNU ld.so'
2256     ;;
2257    
2258     freebsd*)
2259     objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2260     version_type=freebsd-$objformat
2261     case $version_type in
2262     freebsd-elf*)
2263     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2264     need_version=no
2265     need_lib_prefix=no
2266     ;;
2267     freebsd-*)
2268     library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2269     need_version=yes
2270     ;;
2271     esac
2272     shlibpath_var=LD_LIBRARY_PATH
2273     case $host_os in
2274     freebsd2*)
2275     shlibpath_overrides_runpath=yes
2276     ;;
2277     freebsd3.[01]* | freebsdelf3.[01]*)
2278     shlibpath_overrides_runpath=yes
2279     hardcode_into_libs=yes
2280     ;;
2281     *) # from 3.2 on
2282     shlibpath_overrides_runpath=no
2283     hardcode_into_libs=yes
2284     ;;
2285     esac
2286     ;;
2287    
2288     gnu*)
2289     version_type=linux
2290     need_lib_prefix=no
2291     need_version=no
2292     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2293     soname_spec='${libname}${release}${shared_ext}$major'
2294     shlibpath_var=LD_LIBRARY_PATH
2295     hardcode_into_libs=yes
2296     ;;
2297    
2298     hpux9* | hpux10* | hpux11*)
2299     # Give a soname corresponding to the major version so that dld.sl refuses to
2300     # link against other versions.
2301     version_type=sunos
2302     need_lib_prefix=no
2303     need_version=no
2304     case "$host_cpu" in
2305     ia64*)
2306     shrext_cmds='.so'
2307     hardcode_into_libs=yes
2308     dynamic_linker="$host_os dld.so"
2309     shlibpath_var=LD_LIBRARY_PATH
2310     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2311     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2312     soname_spec='${libname}${release}${shared_ext}$major'
2313     if test "X$HPUX_IA64_MODE" = X32; then
2314     sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2315     else
2316     sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2317     fi
2318     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2319     ;;
2320     hppa*64*)
2321     shrext_cmds='.sl'
2322     hardcode_into_libs=yes
2323     dynamic_linker="$host_os dld.sl"
2324     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2325     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2326     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2327     soname_spec='${libname}${release}${shared_ext}$major'
2328     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2329     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2330     ;;
2331     *)
2332     shrext_cmds='.sl'
2333     dynamic_linker="$host_os dld.sl"
2334     shlibpath_var=SHLIB_PATH
2335     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2336     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2337     soname_spec='${libname}${release}${shared_ext}$major'
2338     ;;
2339     esac
2340     # HP-UX runs *really* slowly unless shared libraries are mode 555.
2341     postinstall_cmds='chmod 555 $lib'
2342     ;;
2343    
2344     irix5* | irix6* | nonstopux*)
2345     case $host_os in
2346     nonstopux*) version_type=nonstopux ;;
2347     *)
2348     if test "$lt_cv_prog_gnu_ld" = yes; then
2349     version_type=linux
2350     else
2351     version_type=irix
2352     fi ;;
2353     esac
2354     need_lib_prefix=no
2355     need_version=no
2356     soname_spec='${libname}${release}${shared_ext}$major'
2357     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2358     case $host_os in
2359     irix5* | nonstopux*)
2360     libsuff= shlibsuff=
2361     ;;
2362     *)
2363     case $LD in # libtool.m4 will add one of these switches to LD
2364     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2365     libsuff= shlibsuff= libmagic=32-bit;;
2366     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2367     libsuff=32 shlibsuff=N32 libmagic=N32;;
2368     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2369     libsuff=64 shlibsuff=64 libmagic=64-bit;;
2370     *) libsuff= shlibsuff= libmagic=never-match;;
2371     esac
2372     ;;
2373     esac
2374     shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2375     shlibpath_overrides_runpath=no
2376     sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2377     sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2378     hardcode_into_libs=yes
2379     ;;
2380    
2381     # No shared lib support for Linux oldld, aout, or coff.
2382     linux*oldld* | linux*aout* | linux*coff*)
2383     dynamic_linker=no
2384     ;;
2385    
2386     # This must be Linux ELF.
2387     linux*)
2388     version_type=linux
2389     need_lib_prefix=no
2390     need_version=no
2391     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2392     soname_spec='${libname}${release}${shared_ext}$major'
2393     finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2394     shlibpath_var=LD_LIBRARY_PATH
2395     shlibpath_overrides_runpath=no
2396     # This implies no fast_install, which is unacceptable.
2397     # Some rework will be needed to allow for fast_install
2398     # before this can be enabled.
2399     hardcode_into_libs=yes
2400    
2401     # Append ld.so.conf contents to the search path
2402     if test -f /etc/ld.so.conf; then
2403     lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
2404     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2405     fi
2406    
2407     # We used to test for /lib/ld.so.1 and disable shared libraries on
2408     # powerpc, because MkLinux only supported shared libraries with the
2409     # GNU dynamic linker. Since this was broken with cross compilers,
2410     # most powerpc-linux boxes support dynamic linking these days and
2411     # people can always --disable-shared, the test was removed, and we
2412     # assume the GNU/Linux dynamic linker is in use.
2413     dynamic_linker='GNU/Linux ld.so'
2414     ;;
2415    
2416     netbsdelf*-gnu)
2417     version_type=linux
2418     need_lib_prefix=no
2419     need_version=no
2420     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2421     soname_spec='${libname}${release}${shared_ext}$major'
2422     shlibpath_var=LD_LIBRARY_PATH
2423     shlibpath_overrides_runpath=no
2424     hardcode_into_libs=yes
2425     dynamic_linker='NetBSD ld.elf_so'
2426     ;;
2427    
2428     knetbsd*-gnu)
2429     version_type=linux
2430     need_lib_prefix=no
2431     need_version=no
2432     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2433     soname_spec='${libname}${release}${shared_ext}$major'
2434     shlibpath_var=LD_LIBRARY_PATH
2435     shlibpath_overrides_runpath=no
2436     hardcode_into_libs=yes
2437     dynamic_linker='GNU ld.so'
2438     ;;
2439    
2440     netbsd*)
2441     version_type=sunos
2442     need_lib_prefix=no
2443     need_version=no
2444     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2445     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2446     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2447     dynamic_linker='NetBSD (a.out) ld.so'
2448     else
2449     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2450     soname_spec='${libname}${release}${shared_ext}$major'
2451     dynamic_linker='NetBSD ld.elf_so'
2452     fi
2453     shlibpath_var=LD_LIBRARY_PATH
2454     shlibpath_overrides_runpath=yes
2455     hardcode_into_libs=yes
2456     ;;
2457    
2458     newsos6)
2459     version_type=linux
2460     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2461     shlibpath_var=LD_LIBRARY_PATH
2462     shlibpath_overrides_runpath=yes
2463     ;;
2464    
2465     nto-qnx*)
2466     version_type=linux
2467     need_lib_prefix=no
2468     need_version=no
2469     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2470     soname_spec='${libname}${release}${shared_ext}$major'
2471     shlibpath_var=LD_LIBRARY_PATH
2472     shlibpath_overrides_runpath=yes
2473     ;;
2474    
2475     openbsd*)
2476     version_type=sunos
2477     need_lib_prefix=no
2478     need_version=yes
2479     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2480     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2481     shlibpath_var=LD_LIBRARY_PATH
2482     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2483     case $host_os in
2484     openbsd2.[[89]] | openbsd2.[[89]].*)
2485     shlibpath_overrides_runpath=no
2486     ;;
2487     *)
2488     shlibpath_overrides_runpath=yes
2489     ;;
2490     esac
2491     else
2492     shlibpath_overrides_runpath=yes
2493     fi
2494     ;;
2495    
2496     os2*)
2497     libname_spec='$name'
2498     shrext_cmds=".dll"
2499     need_lib_prefix=no
2500     library_names_spec='$libname${shared_ext} $libname.a'
2501     dynamic_linker='OS/2 ld.exe'
2502     shlibpath_var=LIBPATH
2503     ;;
2504    
2505     osf3* | osf4* | osf5*)
2506     version_type=osf
2507     need_lib_prefix=no
2508     need_version=no
2509     soname_spec='${libname}${release}${shared_ext}$major'
2510     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2511     shlibpath_var=LD_LIBRARY_PATH
2512     sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2513     sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2514     ;;
2515    
2516     sco3.2v5*)
2517     version_type=osf
2518     soname_spec='${libname}${release}${shared_ext}$major'
2519     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2520     shlibpath_var=LD_LIBRARY_PATH
2521     ;;
2522    
2523     solaris*)
2524     version_type=linux
2525     need_lib_prefix=no
2526     need_version=no
2527     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2528     soname_spec='${libname}${release}${shared_ext}$major'
2529     shlibpath_var=LD_LIBRARY_PATH
2530     shlibpath_overrides_runpath=yes
2531     hardcode_into_libs=yes
2532     # ldd complains unless libraries are executable
2533     postinstall_cmds='chmod +x $lib'
2534     ;;
2535    
2536     sunos4*)
2537     version_type=sunos
2538     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2539     finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2540     shlibpath_var=LD_LIBRARY_PATH
2541     shlibpath_overrides_runpath=yes
2542     if test "$with_gnu_ld" = yes; then
2543     need_lib_prefix=no
2544     fi
2545     need_version=yes
2546     ;;
2547    
2548     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2549     version_type=linux
2550     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2551     soname_spec='${libname}${release}${shared_ext}$major'
2552     shlibpath_var=LD_LIBRARY_PATH
2553     case $host_vendor in
2554     sni)
2555     shlibpath_overrides_runpath=no
2556     need_lib_prefix=no
2557     export_dynamic_flag_spec='${wl}-Blargedynsym'
2558     runpath_var=LD_RUN_PATH
2559     ;;
2560     siemens)
2561     need_lib_prefix=no
2562     ;;
2563     motorola)
2564     need_lib_prefix=no
2565     need_version=no
2566     shlibpath_overrides_runpath=no
2567     sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2568     ;;
2569     esac
2570     ;;
2571    
2572     sysv4*MP*)
2573     if test -d /usr/nec ;then
2574     version_type=linux
2575     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2576     soname_spec='$libname${shared_ext}.$major'
2577     shlibpath_var=LD_LIBRARY_PATH
2578     fi
2579     ;;
2580    
2581     uts4*)
2582     version_type=linux
2583     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2584     soname_spec='${libname}${release}${shared_ext}$major'
2585     shlibpath_var=LD_LIBRARY_PATH
2586     ;;
2587    
2588     *)
2589     dynamic_linker=no
2590     ;;
2591     esac
2592     AC_MSG_RESULT([$dynamic_linker])
2593     test "$dynamic_linker" = no && can_build_shared=no
2594     ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2595    
2596    
2597     # _LT_AC_TAGCONFIG
2598     # ----------------
2599     AC_DEFUN([_LT_AC_TAGCONFIG],
2600     [AC_ARG_WITH([tags],
2601     [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2602     [include additional configurations @<:@automatic@:>@])],
2603     [tagnames="$withval"])
2604    
2605     if test -f "$ltmain" && test -n "$tagnames"; then
2606     if test ! -f "${ofile}"; then
2607     AC_MSG_WARN([output file `$ofile' does not exist])
2608     fi
2609    
2610     if test -z "$LTCC"; then
2611     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2612     if test -z "$LTCC"; then
2613     AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2614     else
2615     AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2616     fi
2617     fi
2618    
2619     # Extract list of available tagged configurations in $ofile.
2620     # Note that this assumes the entire list is on one line.
2621     available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2622    
2623     lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2624     for tagname in $tagnames; do
2625     IFS="$lt_save_ifs"
2626     # Check whether tagname contains only valid characters
2627     case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2628     "") ;;
2629     *) AC_MSG_ERROR([invalid tag name: $tagname])
2630     ;;
2631     esac
2632    
2633     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2634     then
2635     AC_MSG_ERROR([tag name \"$tagname\" already exists])
2636     fi
2637    
2638     # Update the list of available tags.
2639     if test -n "$tagname"; then
2640     echo appending configuration tag \"$tagname\" to $ofile
2641    
2642     case $tagname in
2643     CXX)
2644     if test -n "$CXX" && test "X$CXX" != "Xno"; then
2645     AC_LIBTOOL_LANG_CXX_CONFIG
2646     else
2647     tagname=""
2648     fi
2649     ;;
2650    
2651     F77)
2652     if test -n "$F77" && test "X$F77" != "Xno"; then
2653     AC_LIBTOOL_LANG_F77_CONFIG
2654     else
2655     tagname=""
2656     fi
2657     ;;
2658    
2659     GCJ)
2660     if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2661     AC_LIBTOOL_LANG_GCJ_CONFIG
2662     else
2663     tagname=""
2664     fi
2665     ;;
2666    
2667     RC)
2668     AC_LIBTOOL_LANG_RC_CONFIG
2669     ;;
2670    
2671     *)
2672     AC_MSG_ERROR([Unsupported tag name: $tagname])
2673     ;;
2674     esac
2675    
2676     # Append the new tag name to the list of available tags.
2677     if test -n "$tagname" ; then
2678     available_tags="$available_tags $tagname"
2679     fi
2680     fi
2681     done
2682     IFS="$lt_save_ifs"
2683    
2684     # Now substitute the updated list of available tags.
2685     if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2686     mv "${ofile}T" "$ofile"
2687     chmod +x "$ofile"
2688     else
2689     rm -f "${ofile}T"
2690     AC_MSG_ERROR([unable to update list of available tagged configurations.])
2691     fi
2692     fi
2693     ])# _LT_AC_TAGCONFIG
2694    
2695    
2696     # AC_LIBTOOL_DLOPEN
2697     # -----------------
2698     # enable checks for dlopen support
2699     AC_DEFUN([AC_LIBTOOL_DLOPEN],
2700     [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2701     ])# AC_LIBTOOL_DLOPEN
2702    
2703    
2704     # AC_LIBTOOL_WIN32_DLL
2705     # --------------------
2706     # declare package support for building win32 dll's
2707     AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2708     [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2709     ])# AC_LIBTOOL_WIN32_DLL
2710    
2711    
2712     # AC_ENABLE_SHARED([DEFAULT])
2713     # ---------------------------
2714     # implement the --enable-shared flag
2715     # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2716     AC_DEFUN([AC_ENABLE_SHARED],
2717     [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2718     AC_ARG_ENABLE([shared],
2719     [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2720     [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2721     [p=${PACKAGE-default}
2722     case $enableval in
2723     yes) enable_shared=yes ;;
2724     no) enable_shared=no ;;
2725     *)
2726     enable_shared=no
2727     # Look at the argument we got. We use all the common list separators.
2728     lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2729     for pkg in $enableval; do
2730     IFS="$lt_save_ifs"
2731     if test "X$pkg" = "X$p"; then
2732     enable_shared=yes
2733     fi
2734     done
2735     IFS="$lt_save_ifs"
2736     ;;
2737     esac],
2738     [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2739     ])# AC_ENABLE_SHARED
2740    
2741    
2742     # AC_DISABLE_SHARED
2743     # -----------------
2744     #- set the default shared flag to --disable-shared
2745     AC_DEFUN([AC_DISABLE_SHARED],
2746     [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2747     AC_ENABLE_SHARED(no)
2748     ])# AC_DISABLE_SHARED
2749    
2750    
2751     # AC_ENABLE_STATIC([DEFAULT])
2752     # ---------------------------
2753     # implement the --enable-static flag
2754     # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2755     AC_DEFUN([AC_ENABLE_STATIC],
2756     [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2757     AC_ARG_ENABLE([static],
2758     [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2759     [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2760     [p=${PACKAGE-default}
2761     case $enableval in
2762     yes) enable_static=yes ;;
2763     no) enable_static=no ;;
2764     *)
2765     enable_static=no
2766     # Look at the argument we got. We use all the common list separators.
2767     lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2768     for pkg in $enableval; do
2769     IFS="$lt_save_ifs"
2770     if test "X$pkg" = "X$p"; then
2771     enable_static=yes
2772     fi
2773     done
2774     IFS="$lt_save_ifs"
2775     ;;
2776     esac],
2777     [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2778     ])# AC_ENABLE_STATIC
2779    
2780    
2781     # AC_DISABLE_STATIC
2782     # -----------------
2783     # set the default static flag to --disable-static
2784     AC_DEFUN([AC_DISABLE_STATIC],
2785     [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2786     AC_ENABLE_STATIC(no)
2787     ])# AC_DISABLE_STATIC
2788    
2789    
2790     # AC_ENABLE_FAST_INSTALL([DEFAULT])
2791     # ---------------------------------
2792     # implement the --enable-fast-install flag
2793     # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2794     AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2795     [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2796     AC_ARG_ENABLE([fast-install],
2797     [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2798     [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2799     [p=${PACKAGE-default}
2800     case $enableval in
2801     yes) enable_fast_install=yes ;;
2802     no) enable_fast_install=no ;;
2803     *)
2804     enable_fast_install=no
2805     # Look at the argument we got. We use all the common list separators.
2806     lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2807     for pkg in $enableval; do
2808     IFS="$lt_save_ifs"
2809     if test "X$pkg" = "X$p"; then
2810     enable_fast_install=yes
2811     fi
2812     done
2813     IFS="$lt_save_ifs"
2814     ;;
2815     esac],
2816     [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2817     ])# AC_ENABLE_FAST_INSTALL
2818    
2819    
2820     # AC_DISABLE_FAST_INSTALL
2821     # -----------------------
2822     # set the default to --disable-fast-install
2823     AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2824     [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2825     AC_ENABLE_FAST_INSTALL(no)
2826     ])# AC_DISABLE_FAST_INSTALL
2827    
2828    
2829     # AC_LIBTOOL_PICMODE([MODE])
2830     # --------------------------
2831     # implement the --with-pic flag
2832     # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2833     AC_DEFUN([AC_LIBTOOL_PICMODE],
2834     [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2835     pic_mode=ifelse($#,1,$1,default)
2836     ])# AC_LIBTOOL_PICMODE
2837    
2838    
2839     # AC_PROG_EGREP
2840     # -------------
2841     # This is predefined starting with Autoconf 2.54, so this conditional
2842     # definition can be removed once we require Autoconf 2.54 or later.
2843     m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2844     [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2845     [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2846     then ac_cv_prog_egrep='grep -E'
2847     else ac_cv_prog_egrep='egrep'
2848     fi])
2849     EGREP=$ac_cv_prog_egrep
2850     AC_SUBST([EGREP])
2851     ])])
2852    
2853    
2854     # AC_PATH_TOOL_PREFIX
2855     # -------------------
2856     # find a file program which can recognise shared library
2857     AC_DEFUN([AC_PATH_TOOL_PREFIX],
2858     [AC_REQUIRE([AC_PROG_EGREP])dnl
2859     AC_MSG_CHECKING([for $1])
2860     AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2861     [case $MAGIC_CMD in
2862     [[\\/*] | ?:[\\/]*])
2863     lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2864     ;;
2865     *)
2866     lt_save_MAGIC_CMD="$MAGIC_CMD"
2867     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2868     dnl $ac_dummy forces splitting on constant user-supplied paths.
2869     dnl POSIX.2 word splitting is done only on the output of word expansions,
2870     dnl not every word. This closes a longstanding sh security hole.
2871     ac_dummy="ifelse([$2], , $PATH, [$2])"
2872     for ac_dir in $ac_dummy; do
2873     IFS="$lt_save_ifs"
2874     test -z "$ac_dir" && ac_dir=.
2875     if test -f $ac_dir/$1; then
2876     lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2877     if test -n "$file_magic_test_file"; then
2878     case $deplibs_check_method in
2879     "file_magic "*)
2880     file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2881     MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2882     if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2883     $EGREP "$file_magic_regex" > /dev/null; then
2884     :
2885     else
2886     cat <<EOF 1>&2
2887    
2888     *** Warning: the command libtool uses to detect shared libraries,
2889     *** $file_magic_cmd, produces output that libtool cannot recognize.
2890     *** The result is that libtool may fail to recognize shared libraries
2891     *** as such. This will affect the creation of libtool libraries that
2892     *** depend on shared libraries, but programs linked with such libtool
2893     *** libraries will work regardless of this problem. Nevertheless, you
2894     *** may want to report the problem to your system manager and/or to
2895     *** bug-libtool@gnu.org
2896    
2897     EOF
2898     fi ;;
2899     esac
2900     fi
2901     break
2902     fi
2903     done
2904     IFS="$lt_save_ifs"
2905     MAGIC_CMD="$lt_save_MAGIC_CMD"
2906     ;;
2907     esac])
2908     MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2909     if test -n "$MAGIC_CMD"; then
2910     AC_MSG_RESULT($MAGIC_CMD)
2911     else
2912     AC_MSG_RESULT(no)
2913     fi
2914     ])# AC_PATH_TOOL_PREFIX
2915    
2916    
2917     # AC_PATH_MAGIC
2918     # -------------
2919     # find a file program which can recognise a shared library
2920     AC_DEFUN([AC_PATH_MAGIC],
2921     [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2922     if test -z "$lt_cv_path_MAGIC_CMD"; then
2923     if test -n "$ac_tool_prefix"; then
2924     AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2925     else
2926     MAGIC_CMD=:
2927     fi
2928     fi
2929     ])# AC_PATH_MAGIC
2930    
2931    
2932     # AC_PROG_LD
2933     # ----------
2934     # find the pathname to the GNU or non-GNU linker
2935     AC_DEFUN([AC_PROG_LD],
2936     [AC_ARG_WITH([gnu-ld],
2937     [AC_HELP_STRING([--with-gnu-ld],
2938     [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2939     [test "$withval" = no || with_gnu_ld=yes],
2940     [with_gnu_ld=no])
2941     AC_REQUIRE([LT_AC_PROG_SED])dnl
2942     AC_REQUIRE([AC_PROG_CC])dnl
2943     AC_REQUIRE([AC_CANONICAL_HOST])dnl
2944     AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2945     ac_prog=ld
2946     if test "$GCC" = yes; then
2947     # Check if gcc -print-prog-name=ld gives a path.
2948     AC_MSG_CHECKING([for ld used by $CC])
2949     case $host in
2950     *-*-mingw*)
2951     # gcc leaves a trailing carriage return which upsets mingw
2952     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2953     *)
2954     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2955     esac
2956     case $ac_prog in
2957     # Accept absolute paths.
2958     [[\\/]]* | ?:[[\\/]]*)
2959     re_direlt='/[[^/]][[^/]]*/\.\./'
2960     # Canonicalize the pathname of ld
2961     ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2962     while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2963     ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2964     done
2965     test -z "$LD" && LD="$ac_prog"
2966     ;;
2967     "")
2968     # If it fails, then pretend we aren't using GCC.
2969     ac_prog=ld
2970     ;;
2971     *)
2972     # If it is relative, then search for the first ld in PATH.
2973     with_gnu_ld=unknown
2974     ;;
2975     esac
2976     elif test "$with_gnu_ld" = yes; then
2977     AC_MSG_CHECKING([for GNU ld])
2978     else
2979     AC_MSG_CHECKING([for non-GNU ld])
2980     fi
2981     AC_CACHE_VAL(lt_cv_path_LD,
2982     [if test -z "$LD"; then
2983     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2984     for ac_dir in $PATH; do
2985     IFS="$lt_save_ifs"
2986     test -z "$ac_dir" && ac_dir=.
2987     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2988     lt_cv_path_LD="$ac_dir/$ac_prog"
2989     # Check to see if the program is GNU ld. I'd rather use --version,
2990     # but apparently some GNU ld's only accept -v.
2991     # Break only if it was the GNU/non-GNU ld that we prefer.
2992     case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2993     *GNU* | *'with BFD'*)
2994     test "$with_gnu_ld" != no && break
2995     ;;
2996     *)
2997     test "$with_gnu_ld" != yes && break
2998     ;;
2999     esac
3000     fi
3001     done
3002     IFS="$lt_save_ifs"
3003     else
3004     lt_cv_path_LD="$LD" # Let the user override the test with a path.
3005     fi])
3006     LD="$lt_cv_path_LD"
3007     if test -n "$LD"; then
3008     AC_MSG_RESULT($LD)
3009     else
3010     AC_MSG_RESULT(no)
3011     fi
3012     test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3013     AC_PROG_LD_GNU
3014     ])# AC_PROG_LD
3015    
3016    
3017     # AC_PROG_LD_GNU
3018     # --------------
3019     AC_DEFUN([AC_PROG_LD_GNU],
3020     [AC_REQUIRE([AC_PROG_EGREP])dnl
3021     AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3022     [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3023     case `$LD -v 2>&1 </dev/null` in
3024     *GNU* | *'with BFD'*)
3025     lt_cv_prog_gnu_ld=yes
3026     ;;
3027     *)
3028     lt_cv_prog_gnu_ld=no
3029     ;;
3030     esac])
3031     with_gnu_ld=$lt_cv_prog_gnu_ld
3032     ])# AC_PROG_LD_GNU
3033    
3034    
3035     # AC_PROG_LD_RELOAD_FLAG
3036     # ----------------------
3037     # find reload flag for linker
3038     # -- PORTME Some linkers may need a different reload flag.
3039     AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3040     [AC_CACHE_CHECK([for $LD option to reload object files],
3041     lt_cv_ld_reload_flag,
3042     [lt_cv_ld_reload_flag='-r'])
3043     reload_flag=$lt_cv_ld_reload_flag
3044     case $reload_flag in
3045     "" | " "*) ;;
3046     *) reload_flag=" $reload_flag" ;;
3047     esac
3048     reload_cmds='$LD$reload_flag -o $output$reload_objs'
3049     ])# AC_PROG_LD_RELOAD_FLAG
3050    
3051    
3052     # AC_DEPLIBS_CHECK_METHOD
3053     # -----------------------
3054     # how to check for library dependencies
3055     # -- PORTME fill in with the dynamic library characteristics
3056     AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3057     [AC_CACHE_CHECK([how to recognise dependent libraries],
3058     lt_cv_deplibs_check_method,
3059     [lt_cv_file_magic_cmd='$MAGIC_CMD'
3060     lt_cv_file_magic_test_file=
3061     lt_cv_deplibs_check_method='unknown'
3062     # Need to set the preceding variable on all platforms that support
3063     # interlibrary dependencies.
3064     # 'none' -- dependencies not supported.
3065     # `unknown' -- same as none, but documents that we really don't know.
3066     # 'pass_all' -- all dependencies passed with no checks.
3067     # 'test_compile' -- check by making test program.
3068     # 'file_magic [[regex]]' -- check by looking for files in library path
3069     # which responds to the $file_magic_cmd with a given extended regex.
3070     # If you have `file' or equivalent on your system and you're not sure
3071     # whether `pass_all' will *always* work, you probably want this one.
3072    
3073     case $host_os in
3074     aix4* | aix5*)
3075     lt_cv_deplibs_check_method=pass_all
3076     ;;
3077    
3078     beos*)
3079     lt_cv_deplibs_check_method=pass_all
3080     ;;
3081    
3082     bsdi4*)
3083     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3084     lt_cv_file_magic_cmd='/usr/bin/file -L'
3085     lt_cv_file_magic_test_file=/shlib/libc.so
3086     ;;
3087    
3088     cygwin*)
3089     # func_win32_libid is a shell function defined in ltmain.sh
3090     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3091     lt_cv_file_magic_cmd='func_win32_libid'
3092     ;;
3093    
3094     mingw* | pw32*)
3095     # Base MSYS/MinGW do not provide the 'file' command needed by
3096     # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3097     lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3098     lt_cv_file_magic_cmd='$OBJDUMP -f'
3099     ;;
3100    
3101     darwin* | rhapsody*)
3102     lt_cv_deplibs_check_method=pass_all
3103     ;;
3104    
3105     freebsd* | kfreebsd*-gnu)
3106     if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3107     case $host_cpu in
3108     i*86 )
3109     # Not sure whether the presence of OpenBSD here was a mistake.
3110     # Let's accept both of them until this is cleared up.
3111     lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3112     lt_cv_file_magic_cmd=/usr/bin/file
3113     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3114     ;;
3115     esac
3116     else
3117     lt_cv_deplibs_check_method=pass_all
3118     fi
3119     ;;
3120    
3121     gnu*)
3122     lt_cv_deplibs_check_method=pass_all
3123     ;;
3124    
3125     hpux10.20* | hpux11*)
3126     lt_cv_file_magic_cmd=/usr/bin/file
3127     case "$host_cpu" in
3128     ia64*)
3129     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3130     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3131     ;;
3132     hppa*64*)
3133     [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]']
3134     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3135     ;;
3136     *)
3137     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3138     lt_cv_file_magic_test_file=/usr/lib/libc.sl
3139     ;;
3140     esac
3141     ;;
3142    
3143     irix5* | irix6* | nonstopux*)
3144     case $LD in
3145     *-32|*"-32 ") libmagic=32-bit;;
3146     *-n32|*"-n32 ") libmagic=N32;;
3147     *-64|*"-64 ") libmagic=64-bit;;
3148     *) libmagic=never-match;;
3149     esac
3150     lt_cv_deplibs_check_method=pass_all
3151     ;;
3152    
3153     # This must be Linux ELF.
3154     linux*)
3155     lt_cv_deplibs_check_method=pass_all
3156     ;;
3157    
3158     netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
3159     if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3160     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3161     else
3162     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3163     fi
3164     ;;
3165    
3166     newos6*)
3167     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3168     lt_cv_file_magic_cmd=/usr/bin/file
3169     lt_cv_file_magic_test_file=/usr/lib/libnls.so
3170     ;;
3171    
3172     nto-qnx*)
3173     lt_cv_deplibs_check_method=unknown
3174     ;;
3175    
3176     openbsd*)
3177     lt_cv_file_magic_cmd=/usr/bin/file
3178     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3179     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3180     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3181     else
3182     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3183     fi
3184     ;;
3185    
3186     osf3* | osf4* | osf5*)
3187     lt_cv_deplibs_check_method=pass_all
3188     ;;
3189    
3190     sco3.2v5*)
3191     lt_cv_deplibs_check_method=pass_all
3192     ;;
3193    
3194     solaris*)
3195     lt_cv_deplibs_check_method=pass_all
3196     ;;
3197    
3198     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3199     case $host_vendor in
3200     motorola)
3201     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]]'
3202     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3203     ;;
3204     ncr)
3205     lt_cv_deplibs_check_method=pass_all
3206     ;;
3207     sequent)
3208     lt_cv_file_magic_cmd='/bin/file'
3209     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3210     ;;
3211     sni)
3212     lt_cv_file_magic_cmd='/bin/file'
3213     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3214     lt_cv_file_magic_test_file=/lib/libc.so
3215     ;;
3216     siemens)
3217     lt_cv_deplibs_check_method=pass_all
3218     ;;
3219     esac
3220     ;;
3221    
3222     sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3223     lt_cv_deplibs_check_method=pass_all
3224     ;;
3225     esac
3226     ])
3227     file_magic_cmd=$lt_cv_file_magic_cmd
3228     deplibs_check_method=$lt_cv_deplibs_check_method
3229     test -z "$deplibs_check_method" && deplibs_check_method=unknown
3230     ])# AC_DEPLIBS_CHECK_METHOD
3231    
3232    
3233     # AC_PROG_NM
3234     # ----------
3235     # find the pathname to a BSD-compatible name lister
3236     AC_DEFUN([AC_PROG_NM],
3237     [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3238     [if test -n "$NM"; then
3239     # Let the user override the test.
3240     lt_cv_path_NM="$NM"
3241     else
3242     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3243     for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3244     IFS="$lt_save_ifs"
3245     test -z "$ac_dir" && ac_dir=.
3246     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3247     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3248     # Check to see if the nm accepts a BSD-compat flag.
3249     # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3250     # nm: unknown option "B" ignored
3251     # Tru64's nm complains that /dev/null is an invalid object file
3252     case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3253     */dev/null* | *'Invalid file or object type'*)
3254     lt_cv_path_NM="$tmp_nm -B"
3255     break
3256     ;;
3257     *)
3258     case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3259     */dev/null*)
3260     lt_cv_path_NM="$tmp_nm -p"
3261     break
3262     ;;
3263     *)
3264     lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3265     continue # so that we can try to find one that supports BSD flags
3266     ;;
3267     esac
3268     esac
3269     fi
3270     done
3271     IFS="$lt_save_ifs"
3272     test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3273     fi])
3274     NM="$lt_cv_path_NM"
3275     ])# AC_PROG_NM
3276    
3277    
3278     # AC_CHECK_LIBM
3279     # -------------
3280     # check for math library
3281     AC_DEFUN([AC_CHECK_LIBM],
3282     [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3283     LIBM=
3284     case $host in
3285     *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3286     # These system don't have libm, or don't need it
3287     ;;
3288     *-ncr-sysv4.3*)
3289     AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3290     AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3291     ;;
3292     *)
3293     AC_CHECK_LIB(m, cos, LIBM="-lm")
3294     ;;
3295     esac
3296     ])# AC_CHECK_LIBM
3297    
3298    
3299     # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3300     # -----------------------------------
3301     # sets LIBLTDL to the link flags for the libltdl convenience library and
3302     # LTDLINCL to the include flags for the libltdl header and adds
3303     # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
3304     # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3305     # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
3306     # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3307     # '${top_srcdir}/' (note the single quotes!). If your package is not
3308     # flat and you're not using automake, define top_builddir and
3309     # top_srcdir appropriately in the Makefiles.
3310     AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3311     [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3312     case $enable_ltdl_convenience in
3313     no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3314     "") enable_ltdl_convenience=yes
3315     ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3316     esac
3317     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3318     LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3319     # For backwards non-gettext consistent compatibility...
3320     INCLTDL="$LTDLINCL"
3321     ])# AC_LIBLTDL_CONVENIENCE
3322    
3323    
3324     # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3325     # -----------------------------------
3326     # sets LIBLTDL to the link flags for the libltdl installable library and
3327     # LTDLINCL to the include flags for the libltdl header and adds
3328     # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
3329     # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3330     # DIRECTORY is not provided and an installed libltdl is not found, it is
3331     # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
3332     # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3333     # quotes!). If your package is not flat and you're not using automake,
3334     # define top_builddir and top_srcdir appropriately in the Makefiles.
3335     # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3336     AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3337     [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3338     AC_CHECK_LIB(ltdl, lt_dlinit,
3339     [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3340     [if test x"$enable_ltdl_install" = xno; then
3341     AC_MSG_WARN([libltdl not installed, but installation disabled])
3342     else
3343     enable_ltdl_install=yes
3344     fi
3345     ])
3346     if test x"$enable_ltdl_install" = x"yes"; then
3347     ac_configure_args="$ac_configure_args --enable-ltdl-install"
3348     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3349     LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3350     else
3351     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3352     LIBLTDL="-lltdl"
3353     LTDLINCL=
3354     fi
3355     # For backwards non-gettext consistent compatibility...
3356     INCLTDL="$LTDLINCL"
3357     ])# AC_LIBLTDL_INSTALLABLE
3358    
3359    
3360     # AC_LIBTOOL_CXX
3361     # --------------
3362     # enable support for C++ libraries
3363     AC_DEFUN([AC_LIBTOOL_CXX],
3364     [AC_REQUIRE([_LT_AC_LANG_CXX])
3365     ])# AC_LIBTOOL_CXX
3366    
3367    
3368     # _LT_AC_LANG_CXX
3369     # ---------------
3370     AC_DEFUN([_LT_AC_LANG_CXX],
3371     [AC_REQUIRE([AC_PROG_CXX])
3372     AC_REQUIRE([AC_PROG_CXXCPP])
3373     _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3374     ])# _LT_AC_LANG_CXX
3375    
3376    
3377     # AC_LIBTOOL_F77
3378     # --------------
3379     # enable support for Fortran 77 libraries
3380     AC_DEFUN([AC_LIBTOOL_F77],
3381     [AC_REQUIRE([_LT_AC_LANG_F77])
3382     ])# AC_LIBTOOL_F77
3383    
3384    
3385     # _LT_AC_LANG_F77
3386     # ---------------
3387     AC_DEFUN([_LT_AC_LANG_F77],
3388     [AC_REQUIRE([AC_PROG_F77])
3389     _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3390     ])# _LT_AC_LANG_F77
3391    
3392    
3393     # AC_LIBTOOL_GCJ
3394     # --------------
3395     # enable support for GCJ libraries
3396     AC_DEFUN([AC_LIBTOOL_GCJ],
3397     [AC_REQUIRE([_LT_AC_LANG_GCJ])
3398     ])# AC_LIBTOOL_GCJ
3399    
3400    
3401     # _LT_AC_LANG_GCJ
3402     # ---------------
3403     AC_DEFUN([_LT_AC_LANG_GCJ],
3404     [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3405     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3406     [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3407     [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3408     [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3409     [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3410     _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3411     ])# _LT_AC_LANG_GCJ
3412    
3413    
3414     # AC_LIBTOOL_RC
3415     # --------------
3416     # enable support for Windows resource files
3417     AC_DEFUN([AC_LIBTOOL_RC],
3418     [AC_REQUIRE([LT_AC_PROG_RC])
3419     _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3420     ])# AC_LIBTOOL_RC
3421    
3422    
3423     # AC_LIBTOOL_LANG_C_CONFIG
3424     # ------------------------
3425     # Ensure that the configuration vars for the C compiler are
3426     # suitably defined. Those variables are subsequently used by
3427     # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3428     AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3429     AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3430     [lt_save_CC="$CC"
3431     AC_LANG_PUSH(C)
3432    
3433     # Source file extension for C test sources.
3434     ac_ext=c
3435    
3436     # Object file extension for compiled C test sources.
3437     objext=o
3438     _LT_AC_TAGVAR(objext, $1)=$objext
3439    
3440     # Code to be used in simple compile tests
3441     lt_simple_compile_test_code="int some_variable = 0;\n"
3442    
3443     # Code to be used in simple link tests
3444     lt_simple_link_test_code='int main(){return(0);}\n'
3445    
3446     _LT_AC_SYS_COMPILER
3447    
3448     #
3449     # Check for any special shared library compilation flags.
3450     #
3451     _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3452     if test "$GCC" = no; then
3453     case $host_os in
3454     sco3.2v5*)
3455     _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3456     ;;
3457     esac
3458     fi
3459     if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3460     AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3461     if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
3462     else
3463     AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3464     _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3465     fi
3466     fi
3467    
3468    
3469     #
3470     # Check to make sure the static flag actually works.
3471     #
3472     AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3473     _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3474     $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3475     [],
3476     [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3477    
3478    
3479     AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3480     AC_LIBTOOL_PROG_COMPILER_PIC($1)
3481     AC_LIBTOOL_PROG_CC_C_O($1)
3482     AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3483     AC_LIBTOOL_PROG_LD_SHLIBS($1)
3484     AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3485     AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3486     AC_LIBTOOL_SYS_LIB_STRIP
3487     AC_LIBTOOL_DLOPEN_SELF($1)
3488    
3489     # Report which librarie types wil actually be built
3490     AC_MSG_CHECKING([if libtool supports shared libraries])
3491     AC_MSG_RESULT([$can_build_shared])
3492    
3493     AC_MSG_CHECKING([whether to build shared libraries])
3494     test "$can_build_shared" = "no" && enable_shared=no
3495    
3496     # On AIX, shared libraries and static libraries use the same namespace, and
3497     # are all built from PIC.
3498     case "$host_os" in
3499     aix3*)
3500     test "$enable_shared" = yes && enable_static=no
3501     if test -n "$RANLIB"; then
3502     archive_cmds="$archive_cmds~\$RANLIB \$lib"
3503     postinstall_cmds='$RANLIB $lib'
3504     fi
3505     ;;
3506    
3507     aix4* | aix5*)
3508     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3509     test "$enable_shared" = yes && enable_static=no
3510     fi
3511     ;;
3512     darwin* | rhapsody*)
3513     if test "$GCC" = yes; then
3514     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3515     case "$host_os" in
3516     rhapsody* | darwin1.[[012]])
3517     _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3518     ;;
3519     *) # Darwin 1.3 on
3520     if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3521     _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3522     else
3523     case ${MACOSX_DEPLOYMENT_TARGET} in
3524     10.[[012]])
3525     _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3526     ;;
3527     10.*)
3528     _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3529     ;;
3530     esac
3531     fi
3532     ;;
3533     esac
3534     output_verbose_link_cmd='echo'
3535     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3536     _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3537     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3538     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3539     _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}'
3540     _LT_AC_TAGVAR(hardcode_direct, $1)=no
3541     _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3542     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3543     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3544     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3545     else
3546     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3547     fi
3548     ;;
3549     esac
3550     AC_MSG_RESULT([$enable_shared])
3551    
3552     AC_MSG_CHECKING([whether to build static libraries])
3553     # Make sure either enable_shared or enable_static is yes.
3554     test "$enable_shared" = yes || enable_static=yes
3555     AC_MSG_RESULT([$enable_static])
3556    
3557     AC_LIBTOOL_CONFIG($1)
3558    
3559     AC_LANG_POP
3560     CC="$lt_save_CC"
3561     ])# AC_LIBTOOL_LANG_C_CONFIG
3562    
3563    
3564     # AC_LIBTOOL_LANG_CXX_CONFIG
3565     # --------------------------
3566     # Ensure that the configuration vars for the C compiler are
3567     # suitably defined. Those variables are subsequently used by
3568     # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3569     AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3570     AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3571     [AC_LANG_PUSH(C++)
3572     AC_REQUIRE([AC_PROG_CXX])
3573     AC_REQUIRE([AC_PROG_CXXCPP])
3574    
3575     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3576     _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3577     _LT_AC_TAGVAR(always_export_symbols, $1)=no
3578     _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3579     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3580     _LT_AC_TAGVAR(hardcode_direct, $1)=no
3581     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3582     _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3583     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3584     _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3585     _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3586     _LT_AC_TAGVAR(module_cmds, $1)=
3587     _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3588     _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3589     _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3590     _LT_AC_TAGVAR(no_undefined_flag, $1)=
3591     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3592     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3593    
3594     # Dependencies to place before and after the object being linked:
3595     _LT_AC_TAGVAR(predep_objects, $1)=
3596     _LT_AC_TAGVAR(postdep_objects, $1)=
3597     _LT_AC_TAGVAR(predeps, $1)=
3598     _LT_AC_TAGVAR(postdeps, $1)=
3599     _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3600    
3601     # Source file extension for C++ test sources.
3602     ac_ext=cc
3603    
3604     # Object file extension for compiled C++ test sources.
3605     objext=o
3606     _LT_AC_TAGVAR(objext, $1)=$objext
3607    
3608     # Code to be used in simple compile tests
3609     lt_simple_compile_test_code="int some_variable = 0;\n"
3610    
3611     # Code to be used in simple link tests
3612     lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3613    
3614     # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3615     _LT_AC_SYS_COMPILER
3616    
3617     # Allow CC to be a program name with arguments.
3618     lt_save_CC=$CC
3619     lt_save_LD=$LD
3620     lt_save_GCC=$GCC
3621     GCC=$GXX
3622     lt_save_with_gnu_ld=$with_gnu_ld
3623     lt_save_path_LD=$lt_cv_path_LD
3624     if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3625     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3626     else
3627     unset lt_cv_prog_gnu_ld
3628     fi
3629     if test -n "${lt_cv_path_LDCXX+set}"; then
3630     lt_cv_path_LD=$lt_cv_path_LDCXX
3631     else
3632     unset lt_cv_path_LD
3633     fi
3634     test -z "${LDCXX+set}" || LD=$LDCXX
3635     CC=${CXX-"c++"}
3636     compiler=$CC
3637     _LT_AC_TAGVAR(compiler, $1)=$CC
3638     cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3639    
3640     # We don't want -fno-exception wen compiling C++ code, so set the
3641     # no_builtin_flag separately
3642     if test "$GXX" = yes; then
3643     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3644     else
3645     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3646     fi
3647    
3648     if test "$GXX" = yes; then
3649     # Set up default GNU C++ configuration
3650    
3651     AC_PROG_LD
3652    
3653     # Check if GNU C++ uses GNU ld as the underlying linker, since the
3654     # archiving commands below assume that GNU ld is being used.
3655     if test "$with_gnu_ld" = yes; then
3656     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3657     _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'
3658    
3659     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3660     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3661    
3662     # If archive_cmds runs LD, not CC, wlarc should be empty
3663     # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3664     # investigate it a little bit more. (MM)
3665     wlarc='${wl}'
3666    
3667     # ancient GNU ld didn't support --whole-archive et. al.
3668     if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3669     grep 'no-whole-archive' > /dev/null; then
3670     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3671     else
3672     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3673     fi
3674     else
3675     with_gnu_ld=no
3676     wlarc=
3677    
3678     # A generic and very simple default shared library creation
3679     # command for GNU C++ for the case where it uses the native
3680     # linker, instead of GNU ld. If possible, this setting should
3681     # overridden to take advantage of the native linker features on
3682     # the platform it is being used on.
3683     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3684     fi
3685    
3686     # Commands to make compiler produce verbose output that lists
3687     # what "hidden" libraries, object files and flags are used when
3688     # linking a shared library.
3689     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3690    
3691     else
3692     GXX=no
3693     with_gnu_ld=no
3694     wlarc=
3695     fi
3696    
3697     # PORTME: fill in a description of your system's C++ link characteristics
3698     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3699     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3700     case $host_os in
3701     aix3*)
3702     # FIXME: insert proper C++ library support
3703     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3704     ;;
3705     aix4* | aix5*)
3706     if test "$host_cpu" = ia64; then
3707     # On IA64, the linker does run time linking by default, so we don't
3708     # have to do anything special.
3709     aix_use_runtimelinking=no
3710     exp_sym_flag='-Bexport'
3711     no_entry_flag=""
3712     else
3713     aix_use_runtimelinking=no
3714    
3715     # Test if we are trying to use run time linking or normal
3716     # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3717     # need to do runtime linking.
3718     case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3719     for ld_flag in $LDFLAGS; do
3720     case $ld_flag in
3721     *-brtl*)
3722     aix_use_runtimelinking=yes
3723     break
3724     ;;
3725     esac
3726     done
3727     esac
3728    
3729     exp_sym_flag='-bexport'
3730     no_entry_flag='-bnoentry'
3731     fi
3732    
3733     # When large executables or shared objects are built, AIX ld can
3734     # have problems creating the table of contents. If linking a library
3735     # or program results in "error TOC overflow" add -mminimal-toc to
3736     # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3737     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3738    
3739     _LT_AC_TAGVAR(archive_cmds, $1)=''
3740     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3741     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3742     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3743    
3744     if test "$GXX" = yes; then
3745     case $host_os in aix4.[012]|aix4.[012].*)
3746     # We only want to do this on AIX 4.2 and lower, the check
3747     # below for broken collect2 doesn't work under 4.3+
3748     collect2name=`${CC} -print-prog-name=collect2`
3749     if test -f "$collect2name" && \
3750     strings "$collect2name" | grep resolve_lib_name >/dev/null
3751     then
3752     # We have reworked collect2
3753     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3754     else
3755     # We have old collect2
3756     _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3757     # It fails to find uninstalled libraries when the uninstalled
3758     # path is not listed in the libpath. Setting hardcode_minus_L
3759     # to unsupported forces relinking
3760     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3761     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3762     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3763     fi
3764     esac
3765     shared_flag='-shared'
3766     else
3767     # not using gcc
3768     if test "$host_cpu" = ia64; then
3769     # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3770     # chokes on -Wl,-G. The following line is correct:
3771     shared_flag='-G'
3772     else
3773     if test "$aix_use_runtimelinking" = yes; then
3774     shared_flag='${wl}-G'
3775     else
3776     shared_flag='${wl}-bM:SRE'
3777     fi
3778     fi
3779     fi
3780    
3781     # It seems that -bexpall does not export symbols beginning with
3782     # underscore (_), so it is better to generate a list of symbols to export.
3783     _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3784     if test "$aix_use_runtimelinking" = yes; then
3785     # Warning - without using the other runtime loading flags (-brtl),
3786     # -berok will link without error, but may produce a broken library.
3787     _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3788     # Determine the default libpath from the value encoded in an empty executable.
3789     _LT_AC_SYS_LIBPATH_AIX
3790     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3791    
3792     _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3793     else
3794     if test "$host_cpu" = ia64; then
3795     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3796     _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3797     _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3798     else
3799     # Determine the default libpath from the value encoded in an empty executable.
3800     _LT_AC_SYS_LIBPATH_AIX
3801     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3802     # Warning - without using the other run time loading flags,
3803     # -berok will link without error, but may produce a broken library.
3804     _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3805     _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3806     # -bexpall does not export symbols beginning with underscore (_)
3807     _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3808     # Exported symbols can be pulled into shared objects from archives
3809     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3810     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3811     # This is similar to how AIX traditionally builds it's shared libraries.
3812     _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3813     fi
3814     fi
3815     ;;
3816     chorus*)
3817     case $cc_basename in
3818     *)
3819     # FIXME: insert proper C++ library support
3820     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3821     ;;
3822     esac
3823     ;;
3824    
3825     cygwin* | mingw* | pw32*)
3826     # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3827     # as there is no search path for DLLs.
3828     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3829     _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3830     _LT_AC_TAGVAR(always_export_symbols, $1)=no
3831     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3832    
3833     if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3834     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3835     # If the export-symbols file already is a .def file (1st line
3836     # is EXPORTS), use it as is; otherwise, prepend...
3837     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3838     cp $export_symbols $output_objdir/$soname.def;
3839     else
3840     echo EXPORTS > $output_objdir/$soname.def;
3841     cat $export_symbols >> $output_objdir/$soname.def;
3842     fi~
3843     $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3844     else
3845     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3846     fi
3847     ;;
3848    
3849     darwin* | rhapsody*)
3850     if test "$GXX" = yes; then
3851     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3852     case "$host_os" in
3853     rhapsody* | darwin1.[[012]])
3854     _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3855     ;;
3856     *) # Darwin 1.3 on
3857     if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3858     _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3859     else
3860     case ${MACOSX_DEPLOYMENT_TARGET} in
3861     10.[[012]])
3862     _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3863     ;;
3864     10.*)
3865     _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3866     ;;
3867     esac
3868     fi
3869     ;;
3870     esac
3871     lt_int_apple_cc_single_mod=no
3872     output_verbose_link_cmd='echo'
3873     if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3874     lt_int_apple_cc_single_mod=yes
3875     fi
3876     if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3877     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3878     else
3879     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3880     fi
3881     _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3882    
3883     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3884     if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3885     _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}'
3886     else
3887     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3888     fi
3889     _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}'
3890     _LT_AC_TAGVAR(hardcode_direct, $1)=no
3891     _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3892     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3893     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3894     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3895     else
3896     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3897     fi
3898     ;;
3899    
3900     dgux*)
3901     case $cc_basename in
3902     ec++)
3903     # FIXME: insert proper C++ library support
3904     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3905     ;;
3906     ghcx)
3907     # Green Hills C++ Compiler
3908     # FIXME: insert proper C++ library support
3909     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3910     ;;
3911     *)
3912     # FIXME: insert proper C++ library support
3913     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3914     ;;
3915     esac
3916     ;;
3917     freebsd[12]*)
3918     # C++ shared libraries reported to be fairly broken before switch to ELF