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