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