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