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