changes related to temperature and layout
[monky] / aclocal.m4
1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_AUTOCONF_VERSION],
15   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17 [m4_warning([this file was generated for autoconf 2.65.
18 You have another version of autoconf.  It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22 # iconv.m4 serial 11 (gettext-0.18.1)
23 dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
24 dnl This file is free software; the Free Software Foundation
25 dnl gives unlimited permission to copy and/or distribute it,
26 dnl with or without modifications, as long as this notice is preserved.
27
28 dnl From Bruno Haible.
29
30 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
31 [
32   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
33   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
34   AC_REQUIRE([AC_LIB_RPATH])
35
36   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
37   dnl accordingly.
38   AC_LIB_LINKFLAGS_BODY([iconv])
39 ])
40
41 AC_DEFUN([AM_ICONV_LINK],
42 [
43   dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
44   dnl those with the standalone portable GNU libiconv installed).
45   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
46
47   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
48   dnl accordingly.
49   AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
50
51   dnl Add $INCICONV to CPPFLAGS before performing the following checks,
52   dnl because if the user has installed libiconv and not disabled its use
53   dnl via --without-libiconv-prefix, he wants to use it. The first
54   dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
55   am_save_CPPFLAGS="$CPPFLAGS"
56   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
57
58   AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
59     am_cv_func_iconv="no, consider installing GNU libiconv"
60     am_cv_lib_iconv=no
61     AC_TRY_LINK([#include <stdlib.h>
62 #include <iconv.h>],
63       [iconv_t cd = iconv_open("","");
64        iconv(cd,NULL,NULL,NULL,NULL);
65        iconv_close(cd);],
66       [am_cv_func_iconv=yes])
67     if test "$am_cv_func_iconv" != yes; then
68       am_save_LIBS="$LIBS"
69       LIBS="$LIBS $LIBICONV"
70       AC_TRY_LINK([#include <stdlib.h>
71 #include <iconv.h>],
72         [iconv_t cd = iconv_open("","");
73          iconv(cd,NULL,NULL,NULL,NULL);
74          iconv_close(cd);],
75         [am_cv_lib_iconv=yes]
76         [am_cv_func_iconv=yes])
77       LIBS="$am_save_LIBS"
78     fi
79   ])
80   if test "$am_cv_func_iconv" = yes; then
81     AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
82       dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
83       am_save_LIBS="$LIBS"
84       if test $am_cv_lib_iconv = yes; then
85         LIBS="$LIBS $LIBICONV"
86       fi
87       AC_TRY_RUN([
88 #include <iconv.h>
89 #include <string.h>
90 int main ()
91 {
92   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
93      returns.  */
94   {
95     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
96     if (cd_utf8_to_88591 != (iconv_t)(-1))
97       {
98         static const char input[] = "\342\202\254"; /* EURO SIGN */
99         char buf[10];
100         const char *inptr = input;
101         size_t inbytesleft = strlen (input);
102         char *outptr = buf;
103         size_t outbytesleft = sizeof (buf);
104         size_t res = iconv (cd_utf8_to_88591,
105                             (char **) &inptr, &inbytesleft,
106                             &outptr, &outbytesleft);
107         if (res == 0)
108           return 1;
109       }
110   }
111   /* Test against Solaris 10 bug: Failures are not distinguishable from
112      successful returns.  */
113   {
114     iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
115     if (cd_ascii_to_88591 != (iconv_t)(-1))
116       {
117         static const char input[] = "\263";
118         char buf[10];
119         const char *inptr = input;
120         size_t inbytesleft = strlen (input);
121         char *outptr = buf;
122         size_t outbytesleft = sizeof (buf);
123         size_t res = iconv (cd_ascii_to_88591,
124                             (char **) &inptr, &inbytesleft,
125                             &outptr, &outbytesleft);
126         if (res == 0)
127           return 1;
128       }
129   }
130 #if 0 /* This bug could be worked around by the caller.  */
131   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
132   {
133     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
134     if (cd_88591_to_utf8 != (iconv_t)(-1))
135       {
136         static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
137         char buf[50];
138         const char *inptr = input;
139         size_t inbytesleft = strlen (input);
140         char *outptr = buf;
141         size_t outbytesleft = sizeof (buf);
142         size_t res = iconv (cd_88591_to_utf8,
143                             (char **) &inptr, &inbytesleft,
144                             &outptr, &outbytesleft);
145         if ((int)res > 0)
146           return 1;
147       }
148   }
149 #endif
150   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
151      provided.  */
152   if (/* Try standardized names.  */
153       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
154       /* Try IRIX, OSF/1 names.  */
155       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
156       /* Try AIX names.  */
157       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
158       /* Try HP-UX names.  */
159       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
160     return 1;
161   return 0;
162 }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
163         [case "$host_os" in
164            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
165            *)            am_cv_func_iconv_works="guessing yes" ;;
166          esac])
167       LIBS="$am_save_LIBS"
168     ])
169     case "$am_cv_func_iconv_works" in
170       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
171       *)   am_func_iconv=yes ;;
172     esac
173   else
174     am_func_iconv=no am_cv_lib_iconv=no
175   fi
176   if test "$am_func_iconv" = yes; then
177     AC_DEFINE([HAVE_ICONV], [1],
178       [Define if you have the iconv() function and it works.])
179   fi
180   if test "$am_cv_lib_iconv" = yes; then
181     AC_MSG_CHECKING([how to link with libiconv])
182     AC_MSG_RESULT([$LIBICONV])
183   else
184     dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
185     dnl either.
186     CPPFLAGS="$am_save_CPPFLAGS"
187     LIBICONV=
188     LTLIBICONV=
189   fi
190   AC_SUBST([LIBICONV])
191   AC_SUBST([LTLIBICONV])
192 ])
193
194 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
195 dnl avoid warnings like
196 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
197 dnl This is tricky because of the way 'aclocal' is implemented:
198 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
199 dnl   Otherwise aclocal's initial scan pass would miss the macro definition.
200 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
201 dnl   Otherwise aclocal would emit many "Use of uninitialized value $1"
202 dnl   warnings.
203 m4_define([gl_iconv_AC_DEFUN],
204   m4_version_prereq([2.64],
205     [[AC_DEFUN_ONCE(
206         [$1], [$2])]],
207     [[AC_DEFUN(
208         [$1], [$2])]]))
209 gl_iconv_AC_DEFUN([AM_ICONV],
210 [
211   AM_ICONV_LINK
212   if test "$am_cv_func_iconv" = yes; then
213     AC_MSG_CHECKING([for iconv declaration])
214     AC_CACHE_VAL([am_cv_proto_iconv], [
215       AC_TRY_COMPILE([
216 #include <stdlib.h>
217 #include <iconv.h>
218 extern
219 #ifdef __cplusplus
220 "C"
221 #endif
222 #if defined(__STDC__) || defined(__cplusplus)
223 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
224 #else
225 size_t iconv();
226 #endif
227 ], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
228       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
229     am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
230     AC_MSG_RESULT([
231          $am_cv_proto_iconv])
232     AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
233       [Define as const if the declaration of iconv() needs const.])
234   fi
235 ])
236
237 # lib-ld.m4 serial 4 (gettext-0.18)
238 dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
239 dnl This file is free software; the Free Software Foundation
240 dnl gives unlimited permission to copy and/or distribute it,
241 dnl with or without modifications, as long as this notice is preserved.
242
243 dnl Subroutines of libtool.m4,
244 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
245 dnl with libtool.m4.
246
247 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
248 AC_DEFUN([AC_LIB_PROG_LD_GNU],
249 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
250 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
251 case `$LD -v 2>&1 </dev/null` in
252 *GNU* | *'with BFD'*)
253   acl_cv_prog_gnu_ld=yes ;;
254 *)
255   acl_cv_prog_gnu_ld=no ;;
256 esac])
257 with_gnu_ld=$acl_cv_prog_gnu_ld
258 ])
259
260 dnl From libtool-1.4. Sets the variable LD.
261 AC_DEFUN([AC_LIB_PROG_LD],
262 [AC_ARG_WITH([gnu-ld],
263 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
264 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
265 AC_REQUIRE([AC_PROG_CC])dnl
266 AC_REQUIRE([AC_CANONICAL_HOST])dnl
267 # Prepare PATH_SEPARATOR.
268 # The user is always right.
269 if test "${PATH_SEPARATOR+set}" != set; then
270   echo "#! /bin/sh" >conf$$.sh
271   echo  "exit 0"   >>conf$$.sh
272   chmod +x conf$$.sh
273   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
274     PATH_SEPARATOR=';'
275   else
276     PATH_SEPARATOR=:
277   fi
278   rm -f conf$$.sh
279 fi
280 ac_prog=ld
281 if test "$GCC" = yes; then
282   # Check if gcc -print-prog-name=ld gives a path.
283   AC_MSG_CHECKING([for ld used by GCC])
284   case $host in
285   *-*-mingw*)
286     # gcc leaves a trailing carriage return which upsets mingw
287     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
288   *)
289     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
290   esac
291   case $ac_prog in
292     # Accept absolute paths.
293     [[\\/]* | [A-Za-z]:[\\/]*)]
294       [re_direlt='/[^/][^/]*/\.\./']
295       # Canonicalize the path of ld
296       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
297       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
298         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
299       done
300       test -z "$LD" && LD="$ac_prog"
301       ;;
302   "")
303     # If it fails, then pretend we aren't using GCC.
304     ac_prog=ld
305     ;;
306   *)
307     # If it is relative, then search for the first ld in PATH.
308     with_gnu_ld=unknown
309     ;;
310   esac
311 elif test "$with_gnu_ld" = yes; then
312   AC_MSG_CHECKING([for GNU ld])
313 else
314   AC_MSG_CHECKING([for non-GNU ld])
315 fi
316 AC_CACHE_VAL([acl_cv_path_LD],
317 [if test -z "$LD"; then
318   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
319   for ac_dir in $PATH; do
320     test -z "$ac_dir" && ac_dir=.
321     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
322       acl_cv_path_LD="$ac_dir/$ac_prog"
323       # Check to see if the program is GNU ld.  I'd rather use --version,
324       # but apparently some GNU ld's only accept -v.
325       # Break only if it was the GNU/non-GNU ld that we prefer.
326       case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
327       *GNU* | *'with BFD'*)
328         test "$with_gnu_ld" != no && break ;;
329       *)
330         test "$with_gnu_ld" != yes && break ;;
331       esac
332     fi
333   done
334   IFS="$ac_save_ifs"
335 else
336   acl_cv_path_LD="$LD" # Let the user override the test with a path.
337 fi])
338 LD="$acl_cv_path_LD"
339 if test -n "$LD"; then
340   AC_MSG_RESULT([$LD])
341 else
342   AC_MSG_RESULT([no])
343 fi
344 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
345 AC_LIB_PROG_LD_GNU
346 ])
347
348 # lib-link.m4 serial 21 (gettext-0.18)
349 dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
350 dnl This file is free software; the Free Software Foundation
351 dnl gives unlimited permission to copy and/or distribute it,
352 dnl with or without modifications, as long as this notice is preserved.
353
354 dnl From Bruno Haible.
355
356 AC_PREREQ([2.54])
357
358 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
359 dnl the libraries corresponding to explicit and implicit dependencies.
360 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
361 dnl augments the CPPFLAGS variable.
362 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
363 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
364 AC_DEFUN([AC_LIB_LINKFLAGS],
365 [
366   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
367   AC_REQUIRE([AC_LIB_RPATH])
368   pushdef([Name],[translit([$1],[./-], [___])])
369   pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
370                                 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
371   AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
372     AC_LIB_LINKFLAGS_BODY([$1], [$2])
373     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
374     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
375     ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
376     ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
377   ])
378   LIB[]NAME="$ac_cv_lib[]Name[]_libs"
379   LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
380   INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
381   LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
382   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
383   AC_SUBST([LIB]NAME)
384   AC_SUBST([LTLIB]NAME)
385   AC_SUBST([LIB]NAME[_PREFIX])
386   dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
387   dnl results of this search when this library appears as a dependency.
388   HAVE_LIB[]NAME=yes
389   popdef([NAME])
390   popdef([Name])
391 ])
392
393 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
394 dnl searches for libname and the libraries corresponding to explicit and
395 dnl implicit dependencies, together with the specified include files and
396 dnl the ability to compile and link the specified testcode. The missing-message
397 dnl defaults to 'no' and may contain additional hints for the user.
398 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
399 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
400 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
401 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
402 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
403 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
404 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
405 [
406   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
407   AC_REQUIRE([AC_LIB_RPATH])
408   pushdef([Name],[translit([$1],[./-], [___])])
409   pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
410                                 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
411
412   dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
413   dnl accordingly.
414   AC_LIB_LINKFLAGS_BODY([$1], [$2])
415
416   dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
417   dnl because if the user has installed lib[]Name and not disabled its use
418   dnl via --without-lib[]Name-prefix, he wants to use it.
419   ac_save_CPPFLAGS="$CPPFLAGS"
420   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
421
422   AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
423     ac_save_LIBS="$LIBS"
424     dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
425     dnl because these -l options might require -L options that are present in
426     dnl LIBS. -l options benefit only from the -L options listed before it.
427     dnl Otherwise, add it to the front of LIBS, because it may be a static
428     dnl library that depends on another static library that is present in LIBS.
429     dnl Static libraries benefit only from the static libraries listed after
430     dnl it.
431     case " $LIB[]NAME" in
432       *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
433       *)       LIBS="$LIB[]NAME $LIBS" ;;
434     esac
435     AC_TRY_LINK([$3], [$4],
436       [ac_cv_lib[]Name=yes],
437       [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
438     LIBS="$ac_save_LIBS"
439   ])
440   if test "$ac_cv_lib[]Name" = yes; then
441     HAVE_LIB[]NAME=yes
442     AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
443     AC_MSG_CHECKING([how to link with lib[]$1])
444     AC_MSG_RESULT([$LIB[]NAME])
445   else
446     HAVE_LIB[]NAME=no
447     dnl If $LIB[]NAME didn't lead to a usable library, we don't need
448     dnl $INC[]NAME either.
449     CPPFLAGS="$ac_save_CPPFLAGS"
450     LIB[]NAME=
451     LTLIB[]NAME=
452     LIB[]NAME[]_PREFIX=
453   fi
454   AC_SUBST([HAVE_LIB]NAME)
455   AC_SUBST([LIB]NAME)
456   AC_SUBST([LTLIB]NAME)
457   AC_SUBST([LIB]NAME[_PREFIX])
458   popdef([NAME])
459   popdef([Name])
460 ])
461
462 dnl Determine the platform dependent parameters needed to use rpath:
463 dnl   acl_libext,
464 dnl   acl_shlibext,
465 dnl   acl_hardcode_libdir_flag_spec,
466 dnl   acl_hardcode_libdir_separator,
467 dnl   acl_hardcode_direct,
468 dnl   acl_hardcode_minus_L.
469 AC_DEFUN([AC_LIB_RPATH],
470 [
471   dnl Tell automake >= 1.10 to complain if config.rpath is missing.
472   m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
473   AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
474   AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
475   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
476   AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
477   AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
478     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
479     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
480     . ./conftest.sh
481     rm -f ./conftest.sh
482     acl_cv_rpath=done
483   ])
484   wl="$acl_cv_wl"
485   acl_libext="$acl_cv_libext"
486   acl_shlibext="$acl_cv_shlibext"
487   acl_libname_spec="$acl_cv_libname_spec"
488   acl_library_names_spec="$acl_cv_library_names_spec"
489   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
490   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
491   acl_hardcode_direct="$acl_cv_hardcode_direct"
492   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
493   dnl Determine whether the user wants rpath handling at all.
494   AC_ARG_ENABLE([rpath],
495     [  --disable-rpath         do not hardcode runtime library paths],
496     :, enable_rpath=yes)
497 ])
498
499 dnl AC_LIB_FROMPACKAGE(name, package)
500 dnl declares that libname comes from the given package. The configure file
501 dnl will then not have a --with-libname-prefix option but a
502 dnl --with-package-prefix option. Several libraries can come from the same
503 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
504 dnl macro call that searches for libname.
505 AC_DEFUN([AC_LIB_FROMPACKAGE],
506 [
507   pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
508                                 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
509   define([acl_frompackage_]NAME, [$2])
510   popdef([NAME])
511   pushdef([PACK],[$2])
512   pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
513                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
514   define([acl_libsinpackage_]PACKUP,
515     m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
516   popdef([PACKUP])
517   popdef([PACK])
518 ])
519
520 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
521 dnl the libraries corresponding to explicit and implicit dependencies.
522 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
523 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
524 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
525 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
526 [
527   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
528   pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
529                                 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
530   pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
531   pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
532                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
533   pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
534   dnl Autoconf >= 2.61 supports dots in --with options.
535   pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
536   dnl By default, look in $includedir and $libdir.
537   use_additional=yes
538   AC_LIB_WITH_FINAL_PREFIX([
539     eval additional_includedir=\"$includedir\"
540     eval additional_libdir=\"$libdir\"
541   ])
542   AC_ARG_WITH(P_A_C_K[-prefix],
543 [[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
544   --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
545 [
546     if test "X$withval" = "Xno"; then
547       use_additional=no
548     else
549       if test "X$withval" = "X"; then
550         AC_LIB_WITH_FINAL_PREFIX([
551           eval additional_includedir=\"$includedir\"
552           eval additional_libdir=\"$libdir\"
553         ])
554       else
555         additional_includedir="$withval/include"
556         additional_libdir="$withval/$acl_libdirstem"
557         if test "$acl_libdirstem2" != "$acl_libdirstem" \
558            && ! test -d "$withval/$acl_libdirstem"; then
559           additional_libdir="$withval/$acl_libdirstem2"
560         fi
561       fi
562     fi
563 ])
564   dnl Search the library and its dependencies in $additional_libdir and
565   dnl $LDFLAGS. Using breadth-first-seach.
566   LIB[]NAME=
567   LTLIB[]NAME=
568   INC[]NAME=
569   LIB[]NAME[]_PREFIX=
570   dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
571   dnl computed. So it has to be reset here.
572   HAVE_LIB[]NAME=
573   rpathdirs=
574   ltrpathdirs=
575   names_already_handled=
576   names_next_round='$1 $2'
577   while test -n "$names_next_round"; do
578     names_this_round="$names_next_round"
579     names_next_round=
580     for name in $names_this_round; do
581       already_handled=
582       for n in $names_already_handled; do
583         if test "$n" = "$name"; then
584           already_handled=yes
585           break
586         fi
587       done
588       if test -z "$already_handled"; then
589         names_already_handled="$names_already_handled $name"
590         dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
591         dnl or AC_LIB_HAVE_LINKFLAGS call.
592         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
593         eval value=\"\$HAVE_LIB$uppername\"
594         if test -n "$value"; then
595           if test "$value" = yes; then
596             eval value=\"\$LIB$uppername\"
597             test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
598             eval value=\"\$LTLIB$uppername\"
599             test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
600           else
601             dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
602             dnl that this library doesn't exist. So just drop it.
603             :
604           fi
605         else
606           dnl Search the library lib$name in $additional_libdir and $LDFLAGS
607           dnl and the already constructed $LIBNAME/$LTLIBNAME.
608           found_dir=
609           found_la=
610           found_so=
611           found_a=
612           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
613           if test -n "$acl_shlibext"; then
614             shrext=".$acl_shlibext"             # typically: shrext=.so
615           else
616             shrext=
617           fi
618           if test $use_additional = yes; then
619             dir="$additional_libdir"
620             dnl The same code as in the loop below:
621             dnl First look for a shared library.
622             if test -n "$acl_shlibext"; then
623               if test -f "$dir/$libname$shrext"; then
624                 found_dir="$dir"
625                 found_so="$dir/$libname$shrext"
626               else
627                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
628                   ver=`(cd "$dir" && \
629                         for f in "$libname$shrext".*; do echo "$f"; done \
630                         | sed -e "s,^$libname$shrext\\\\.,," \
631                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
632                         | sed 1q ) 2>/dev/null`
633                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
634                     found_dir="$dir"
635                     found_so="$dir/$libname$shrext.$ver"
636                   fi
637                 else
638                   eval library_names=\"$acl_library_names_spec\"
639                   for f in $library_names; do
640                     if test -f "$dir/$f"; then
641                       found_dir="$dir"
642                       found_so="$dir/$f"
643                       break
644                     fi
645                   done
646                 fi
647               fi
648             fi
649             dnl Then look for a static library.
650             if test "X$found_dir" = "X"; then
651               if test -f "$dir/$libname.$acl_libext"; then
652                 found_dir="$dir"
653                 found_a="$dir/$libname.$acl_libext"
654               fi
655             fi
656             if test "X$found_dir" != "X"; then
657               if test -f "$dir/$libname.la"; then
658                 found_la="$dir/$libname.la"
659               fi
660             fi
661           fi
662           if test "X$found_dir" = "X"; then
663             for x in $LDFLAGS $LTLIB[]NAME; do
664               AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
665               case "$x" in
666                 -L*)
667                   dir=`echo "X$x" | sed -e 's/^X-L//'`
668                   dnl First look for a shared library.
669                   if test -n "$acl_shlibext"; then
670                     if test -f "$dir/$libname$shrext"; then
671                       found_dir="$dir"
672                       found_so="$dir/$libname$shrext"
673                     else
674                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
675                         ver=`(cd "$dir" && \
676                               for f in "$libname$shrext".*; do echo "$f"; done \
677                               | sed -e "s,^$libname$shrext\\\\.,," \
678                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
679                               | sed 1q ) 2>/dev/null`
680                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
681                           found_dir="$dir"
682                           found_so="$dir/$libname$shrext.$ver"
683                         fi
684                       else
685                         eval library_names=\"$acl_library_names_spec\"
686                         for f in $library_names; do
687                           if test -f "$dir/$f"; then
688                             found_dir="$dir"
689                             found_so="$dir/$f"
690                             break
691                           fi
692                         done
693                       fi
694                     fi
695                   fi
696                   dnl Then look for a static library.
697                   if test "X$found_dir" = "X"; then
698                     if test -f "$dir/$libname.$acl_libext"; then
699                       found_dir="$dir"
700                       found_a="$dir/$libname.$acl_libext"
701                     fi
702                   fi
703                   if test "X$found_dir" != "X"; then
704                     if test -f "$dir/$libname.la"; then
705                       found_la="$dir/$libname.la"
706                     fi
707                   fi
708                   ;;
709               esac
710               if test "X$found_dir" != "X"; then
711                 break
712               fi
713             done
714           fi
715           if test "X$found_dir" != "X"; then
716             dnl Found the library.
717             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
718             if test "X$found_so" != "X"; then
719               dnl Linking with a shared library. We attempt to hardcode its
720               dnl directory into the executable's runpath, unless it's the
721               dnl standard /usr/lib.
722               if test "$enable_rpath" = no \
723                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
724                  || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
725                 dnl No hardcoding is needed.
726                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
727               else
728                 dnl Use an explicit option to hardcode DIR into the resulting
729                 dnl binary.
730                 dnl Potentially add DIR to ltrpathdirs.
731                 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
732                 haveit=
733                 for x in $ltrpathdirs; do
734                   if test "X$x" = "X$found_dir"; then
735                     haveit=yes
736                     break
737                   fi
738                 done
739                 if test -z "$haveit"; then
740                   ltrpathdirs="$ltrpathdirs $found_dir"
741                 fi
742                 dnl The hardcoding into $LIBNAME is system dependent.
743                 if test "$acl_hardcode_direct" = yes; then
744                   dnl Using DIR/libNAME.so during linking hardcodes DIR into the
745                   dnl resulting binary.
746                   LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
747                 else
748                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
749                     dnl Use an explicit option to hardcode DIR into the resulting
750                     dnl binary.
751                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
752                     dnl Potentially add DIR to rpathdirs.
753                     dnl The rpathdirs will be appended to $LIBNAME at the end.
754                     haveit=
755                     for x in $rpathdirs; do
756                       if test "X$x" = "X$found_dir"; then
757                         haveit=yes
758                         break
759                       fi
760                     done
761                     if test -z "$haveit"; then
762                       rpathdirs="$rpathdirs $found_dir"
763                     fi
764                   else
765                     dnl Rely on "-L$found_dir".
766                     dnl But don't add it if it's already contained in the LDFLAGS
767                     dnl or the already constructed $LIBNAME
768                     haveit=
769                     for x in $LDFLAGS $LIB[]NAME; do
770                       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
771                       if test "X$x" = "X-L$found_dir"; then
772                         haveit=yes
773                         break
774                       fi
775                     done
776                     if test -z "$haveit"; then
777                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
778                     fi
779                     if test "$acl_hardcode_minus_L" != no; then
780                       dnl FIXME: Not sure whether we should use
781                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
782                       dnl here.
783                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
784                     else
785                       dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
786                       dnl here, because this doesn't fit in flags passed to the
787                       dnl compiler. So give up. No hardcoding. This affects only
788                       dnl very old systems.
789                       dnl FIXME: Not sure whether we should use
790                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
791                       dnl here.
792                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
793                     fi
794                   fi
795                 fi
796               fi
797             else
798               if test "X$found_a" != "X"; then
799                 dnl Linking with a static library.
800                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
801               else
802                 dnl We shouldn't come here, but anyway it's good to have a
803                 dnl fallback.
804                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
805               fi
806             fi
807             dnl Assume the include files are nearby.
808             additional_includedir=
809             case "$found_dir" in
810               */$acl_libdirstem | */$acl_libdirstem/)
811                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
812                 if test "$name" = '$1'; then
813                   LIB[]NAME[]_PREFIX="$basedir"
814                 fi
815                 additional_includedir="$basedir/include"
816                 ;;
817               */$acl_libdirstem2 | */$acl_libdirstem2/)
818                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
819                 if test "$name" = '$1'; then
820                   LIB[]NAME[]_PREFIX="$basedir"
821                 fi
822                 additional_includedir="$basedir/include"
823                 ;;
824             esac
825             if test "X$additional_includedir" != "X"; then
826               dnl Potentially add $additional_includedir to $INCNAME.
827               dnl But don't add it
828               dnl   1. if it's the standard /usr/include,
829               dnl   2. if it's /usr/local/include and we are using GCC on Linux,
830               dnl   3. if it's already present in $CPPFLAGS or the already
831               dnl      constructed $INCNAME,
832               dnl   4. if it doesn't exist as a directory.
833               if test "X$additional_includedir" != "X/usr/include"; then
834                 haveit=
835                 if test "X$additional_includedir" = "X/usr/local/include"; then
836                   if test -n "$GCC"; then
837                     case $host_os in
838                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
839                     esac
840                   fi
841                 fi
842                 if test -z "$haveit"; then
843                   for x in $CPPFLAGS $INC[]NAME; do
844                     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
845                     if test "X$x" = "X-I$additional_includedir"; then
846                       haveit=yes
847                       break
848                     fi
849                   done
850                   if test -z "$haveit"; then
851                     if test -d "$additional_includedir"; then
852                       dnl Really add $additional_includedir to $INCNAME.
853                       INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
854                     fi
855                   fi
856                 fi
857               fi
858             fi
859             dnl Look for dependencies.
860             if test -n "$found_la"; then
861               dnl Read the .la file. It defines the variables
862               dnl dlname, library_names, old_library, dependency_libs, current,
863               dnl age, revision, installed, dlopen, dlpreopen, libdir.
864               save_libdir="$libdir"
865               case "$found_la" in
866                 */* | *\\*) . "$found_la" ;;
867                 *) . "./$found_la" ;;
868               esac
869               libdir="$save_libdir"
870               dnl We use only dependency_libs.
871               for dep in $dependency_libs; do
872                 case "$dep" in
873                   -L*)
874                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
875                     dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
876                     dnl But don't add it
877                     dnl   1. if it's the standard /usr/lib,
878                     dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
879                     dnl   3. if it's already present in $LDFLAGS or the already
880                     dnl      constructed $LIBNAME,
881                     dnl   4. if it doesn't exist as a directory.
882                     if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
883                        && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
884                       haveit=
885                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
886                          || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
887                         if test -n "$GCC"; then
888                           case $host_os in
889                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
890                           esac
891                         fi
892                       fi
893                       if test -z "$haveit"; then
894                         haveit=
895                         for x in $LDFLAGS $LIB[]NAME; do
896                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
897                           if test "X$x" = "X-L$additional_libdir"; then
898                             haveit=yes
899                             break
900                           fi
901                         done
902                         if test -z "$haveit"; then
903                           if test -d "$additional_libdir"; then
904                             dnl Really add $additional_libdir to $LIBNAME.
905                             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
906                           fi
907                         fi
908                         haveit=
909                         for x in $LDFLAGS $LTLIB[]NAME; do
910                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
911                           if test "X$x" = "X-L$additional_libdir"; then
912                             haveit=yes
913                             break
914                           fi
915                         done
916                         if test -z "$haveit"; then
917                           if test -d "$additional_libdir"; then
918                             dnl Really add $additional_libdir to $LTLIBNAME.
919                             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
920                           fi
921                         fi
922                       fi
923                     fi
924                     ;;
925                   -R*)
926                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
927                     if test "$enable_rpath" != no; then
928                       dnl Potentially add DIR to rpathdirs.
929                       dnl The rpathdirs will be appended to $LIBNAME at the end.
930                       haveit=
931                       for x in $rpathdirs; do
932                         if test "X$x" = "X$dir"; then
933                           haveit=yes
934                           break
935                         fi
936                       done
937                       if test -z "$haveit"; then
938                         rpathdirs="$rpathdirs $dir"
939                       fi
940                       dnl Potentially add DIR to ltrpathdirs.
941                       dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
942                       haveit=
943                       for x in $ltrpathdirs; do
944                         if test "X$x" = "X$dir"; then
945                           haveit=yes
946                           break
947                         fi
948                       done
949                       if test -z "$haveit"; then
950                         ltrpathdirs="$ltrpathdirs $dir"
951                       fi
952                     fi
953                     ;;
954                   -l*)
955                     dnl Handle this in the next round.
956                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
957                     ;;
958                   *.la)
959                     dnl Handle this in the next round. Throw away the .la's
960                     dnl directory; it is already contained in a preceding -L
961                     dnl option.
962                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
963                     ;;
964                   *)
965                     dnl Most likely an immediate library name.
966                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
967                     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
968                     ;;
969                 esac
970               done
971             fi
972           else
973             dnl Didn't find the library; assume it is in the system directories
974             dnl known to the linker and runtime loader. (All the system
975             dnl directories known to the linker should also be known to the
976             dnl runtime loader, otherwise the system is severely misconfigured.)
977             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
978             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
979           fi
980         fi
981       fi
982     done
983   done
984   if test "X$rpathdirs" != "X"; then
985     if test -n "$acl_hardcode_libdir_separator"; then
986       dnl Weird platform: only the last -rpath option counts, the user must
987       dnl pass all path elements in one option. We can arrange that for a
988       dnl single library, but not when more than one $LIBNAMEs are used.
989       alldirs=
990       for found_dir in $rpathdirs; do
991         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
992       done
993       dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
994       acl_save_libdir="$libdir"
995       libdir="$alldirs"
996       eval flag=\"$acl_hardcode_libdir_flag_spec\"
997       libdir="$acl_save_libdir"
998       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
999     else
1000       dnl The -rpath options are cumulative.
1001       for found_dir in $rpathdirs; do
1002         acl_save_libdir="$libdir"
1003         libdir="$found_dir"
1004         eval flag=\"$acl_hardcode_libdir_flag_spec\"
1005         libdir="$acl_save_libdir"
1006         LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1007       done
1008     fi
1009   fi
1010   if test "X$ltrpathdirs" != "X"; then
1011     dnl When using libtool, the option that works for both libraries and
1012     dnl executables is -R. The -R options are cumulative.
1013     for found_dir in $ltrpathdirs; do
1014       LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1015     done
1016   fi
1017   popdef([P_A_C_K])
1018   popdef([PACKLIBS])
1019   popdef([PACKUP])
1020   popdef([PACK])
1021   popdef([NAME])
1022 ])
1023
1024 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1025 dnl unless already present in VAR.
1026 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1027 dnl contains two or three consecutive elements that belong together.
1028 AC_DEFUN([AC_LIB_APPENDTOVAR],
1029 [
1030   for element in [$2]; do
1031     haveit=
1032     for x in $[$1]; do
1033       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1034       if test "X$x" = "X$element"; then
1035         haveit=yes
1036         break
1037       fi
1038     done
1039     if test -z "$haveit"; then
1040       [$1]="${[$1]}${[$1]:+ }$element"
1041     fi
1042   done
1043 ])
1044
1045 dnl For those cases where a variable contains several -L and -l options
1046 dnl referring to unknown libraries and directories, this macro determines the
1047 dnl necessary additional linker options for the runtime path.
1048 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1049 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1050 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1051 dnl otherwise linking without libtool is assumed.
1052 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1053 [
1054   AC_REQUIRE([AC_LIB_RPATH])
1055   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1056   $1=
1057   if test "$enable_rpath" != no; then
1058     if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1059       dnl Use an explicit option to hardcode directories into the resulting
1060       dnl binary.
1061       rpathdirs=
1062       next=
1063       for opt in $2; do
1064         if test -n "$next"; then
1065           dir="$next"
1066           dnl No need to hardcode the standard /usr/lib.
1067           if test "X$dir" != "X/usr/$acl_libdirstem" \
1068              && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1069             rpathdirs="$rpathdirs $dir"
1070           fi
1071           next=
1072         else
1073           case $opt in
1074             -L) next=yes ;;
1075             -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1076                  dnl No need to hardcode the standard /usr/lib.
1077                  if test "X$dir" != "X/usr/$acl_libdirstem" \
1078                     && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1079                    rpathdirs="$rpathdirs $dir"
1080                  fi
1081                  next= ;;
1082             *) next= ;;
1083           esac
1084         fi
1085       done
1086       if test "X$rpathdirs" != "X"; then
1087         if test -n ""$3""; then
1088           dnl libtool is used for linking. Use -R options.
1089           for dir in $rpathdirs; do
1090             $1="${$1}${$1:+ }-R$dir"
1091           done
1092         else
1093           dnl The linker is used for linking directly.
1094           if test -n "$acl_hardcode_libdir_separator"; then
1095             dnl Weird platform: only the last -rpath option counts, the user
1096             dnl must pass all path elements in one option.
1097             alldirs=
1098             for dir in $rpathdirs; do
1099               alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1100             done
1101             acl_save_libdir="$libdir"
1102             libdir="$alldirs"
1103             eval flag=\"$acl_hardcode_libdir_flag_spec\"
1104             libdir="$acl_save_libdir"
1105             $1="$flag"
1106           else
1107             dnl The -rpath options are cumulative.
1108             for dir in $rpathdirs; do
1109               acl_save_libdir="$libdir"
1110               libdir="$dir"
1111               eval flag=\"$acl_hardcode_libdir_flag_spec\"
1112               libdir="$acl_save_libdir"
1113               $1="${$1}${$1:+ }$flag"
1114             done
1115           fi
1116         fi
1117       fi
1118     fi
1119   fi
1120   AC_SUBST([$1])
1121 ])
1122
1123 # lib-prefix.m4 serial 7 (gettext-0.18)
1124 dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
1125 dnl This file is free software; the Free Software Foundation
1126 dnl gives unlimited permission to copy and/or distribute it,
1127 dnl with or without modifications, as long as this notice is preserved.
1128
1129 dnl From Bruno Haible.
1130
1131 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1132 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1133 dnl require excessive bracketing.
1134 ifdef([AC_HELP_STRING],
1135 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1136 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1137
1138 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1139 dnl to access previously installed libraries. The basic assumption is that
1140 dnl a user will want packages to use other packages he previously installed
1141 dnl with the same --prefix option.
1142 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1143 dnl libraries, but is otherwise very convenient.
1144 AC_DEFUN([AC_LIB_PREFIX],
1145 [
1146   AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1147   AC_REQUIRE([AC_PROG_CC])
1148   AC_REQUIRE([AC_CANONICAL_HOST])
1149   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1150   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1151   dnl By default, look in $includedir and $libdir.
1152   use_additional=yes
1153   AC_LIB_WITH_FINAL_PREFIX([
1154     eval additional_includedir=\"$includedir\"
1155     eval additional_libdir=\"$libdir\"
1156   ])
1157   AC_LIB_ARG_WITH([lib-prefix],
1158 [  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1159   --without-lib-prefix    don't search for libraries in includedir and libdir],
1160 [
1161     if test "X$withval" = "Xno"; then
1162       use_additional=no
1163     else
1164       if test "X$withval" = "X"; then
1165         AC_LIB_WITH_FINAL_PREFIX([
1166           eval additional_includedir=\"$includedir\"
1167           eval additional_libdir=\"$libdir\"
1168         ])
1169       else
1170         additional_includedir="$withval/include"
1171         additional_libdir="$withval/$acl_libdirstem"
1172       fi
1173     fi
1174 ])
1175   if test $use_additional = yes; then
1176     dnl Potentially add $additional_includedir to $CPPFLAGS.
1177     dnl But don't add it
1178     dnl   1. if it's the standard /usr/include,
1179     dnl   2. if it's already present in $CPPFLAGS,
1180     dnl   3. if it's /usr/local/include and we are using GCC on Linux,
1181     dnl   4. if it doesn't exist as a directory.
1182     if test "X$additional_includedir" != "X/usr/include"; then
1183       haveit=
1184       for x in $CPPFLAGS; do
1185         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1186         if test "X$x" = "X-I$additional_includedir"; then
1187           haveit=yes
1188           break
1189         fi
1190       done
1191       if test -z "$haveit"; then
1192         if test "X$additional_includedir" = "X/usr/local/include"; then
1193           if test -n "$GCC"; then
1194             case $host_os in
1195               linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1196             esac
1197           fi
1198         fi
1199         if test -z "$haveit"; then
1200           if test -d "$additional_includedir"; then
1201             dnl Really add $additional_includedir to $CPPFLAGS.
1202             CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1203           fi
1204         fi
1205       fi
1206     fi
1207     dnl Potentially add $additional_libdir to $LDFLAGS.
1208     dnl But don't add it
1209     dnl   1. if it's the standard /usr/lib,
1210     dnl   2. if it's already present in $LDFLAGS,
1211     dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
1212     dnl   4. if it doesn't exist as a directory.
1213     if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1214       haveit=
1215       for x in $LDFLAGS; do
1216         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1217         if test "X$x" = "X-L$additional_libdir"; then
1218           haveit=yes
1219           break
1220         fi
1221       done
1222       if test -z "$haveit"; then
1223         if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1224           if test -n "$GCC"; then
1225             case $host_os in
1226               linux*) haveit=yes;;
1227             esac
1228           fi
1229         fi
1230         if test -z "$haveit"; then
1231           if test -d "$additional_libdir"; then
1232             dnl Really add $additional_libdir to $LDFLAGS.
1233             LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1234           fi
1235         fi
1236       fi
1237     fi
1238   fi
1239 ])
1240
1241 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1242 dnl acl_final_exec_prefix, containing the values to which $prefix and
1243 dnl $exec_prefix will expand at the end of the configure script.
1244 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1245 [
1246   dnl Unfortunately, prefix and exec_prefix get only finally determined
1247   dnl at the end of configure.
1248   if test "X$prefix" = "XNONE"; then
1249     acl_final_prefix="$ac_default_prefix"
1250   else
1251     acl_final_prefix="$prefix"
1252   fi
1253   if test "X$exec_prefix" = "XNONE"; then
1254     acl_final_exec_prefix='${prefix}'
1255   else
1256     acl_final_exec_prefix="$exec_prefix"
1257   fi
1258   acl_save_prefix="$prefix"
1259   prefix="$acl_final_prefix"
1260   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1261   prefix="$acl_save_prefix"
1262 ])
1263
1264 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1265 dnl variables prefix and exec_prefix bound to the values they will have
1266 dnl at the end of the configure script.
1267 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1268 [
1269   acl_save_prefix="$prefix"
1270   prefix="$acl_final_prefix"
1271   acl_save_exec_prefix="$exec_prefix"
1272   exec_prefix="$acl_final_exec_prefix"
1273   $1
1274   exec_prefix="$acl_save_exec_prefix"
1275   prefix="$acl_save_prefix"
1276 ])
1277
1278 dnl AC_LIB_PREPARE_MULTILIB creates
1279 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1280 dnl   "lib" or "lib64" or "lib/64",
1281 dnl - a variable acl_libdirstem2, as a secondary possible value for
1282 dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1283 dnl   "lib/amd64".
1284 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1285 [
1286   dnl There is no formal standard regarding lib and lib64.
1287   dnl On glibc systems, the current practice is that on a system supporting
1288   dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1289   dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1290   dnl the compiler's default mode by looking at the compiler's library search
1291   dnl path. If at least one of its elements ends in /lib64 or points to a
1292   dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1293   dnl Otherwise we use the default, namely "lib".
1294   dnl On Solaris systems, the current practice is that on a system supporting
1295   dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1296   dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1297   dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1298   AC_REQUIRE([AC_CANONICAL_HOST])
1299   acl_libdirstem=lib
1300   acl_libdirstem2=
1301   case "$host_os" in
1302     solaris*)
1303       dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1304       dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1305       dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1306       dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1307       dnl symlink is missing, so we set acl_libdirstem2 too.
1308       AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1309         [AC_EGREP_CPP([sixtyfour bits], [
1310 #ifdef _LP64
1311 sixtyfour bits
1312 #endif
1313            ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1314         ])
1315       if test $gl_cv_solaris_64bit = yes; then
1316         acl_libdirstem=lib/64
1317         case "$host_cpu" in
1318           sparc*)        acl_libdirstem2=lib/sparcv9 ;;
1319           i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1320         esac
1321       fi
1322       ;;
1323     *)
1324       searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1325       if test -n "$searchpath"; then
1326         acl_save_IFS="${IFS=    }"; IFS=":"
1327         for searchdir in $searchpath; do
1328           if test -d "$searchdir"; then
1329             case "$searchdir" in
1330               */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1331               */../ | */.. )
1332                 # Better ignore directories of this form. They are misleading.
1333                 ;;
1334               *) searchdir=`cd "$searchdir" && pwd`
1335                  case "$searchdir" in
1336                    */lib64 ) acl_libdirstem=lib64 ;;
1337                  esac ;;
1338             esac
1339           fi
1340         done
1341         IFS="$acl_save_IFS"
1342       fi
1343       ;;
1344   esac
1345   test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1346 ])
1347
1348 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1349 #
1350 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1351 #                 2006, 2007, 2008 Free Software Foundation, Inc.
1352 #   Written by Gordon Matzigkeit, 1996
1353 #
1354 # This file is free software; the Free Software Foundation gives
1355 # unlimited permission to copy and/or distribute it, with or without
1356 # modifications, as long as this notice is preserved.
1357
1358 m4_define([_LT_COPYING], [dnl
1359 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1360 #                 2006, 2007, 2008 Free Software Foundation, Inc.
1361 #   Written by Gordon Matzigkeit, 1996
1362 #
1363 #   This file is part of GNU Libtool.
1364 #
1365 # GNU Libtool is free software; you can redistribute it and/or
1366 # modify it under the terms of the GNU General Public License as
1367 # published by the Free Software Foundation; either version 2 of
1368 # the License, or (at your option) any later version.
1369 #
1370 # As a special exception to the GNU General Public License,
1371 # if you distribute this file as part of a program or library that
1372 # is built using GNU Libtool, you may include this file under the
1373 # same distribution terms that you use for the rest of that program.
1374 #
1375 # GNU Libtool is distributed in the hope that it will be useful,
1376 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1377 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1378 # GNU General Public License for more details.
1379 #
1380 # You should have received a copy of the GNU General Public License
1381 # along with GNU Libtool; see the file COPYING.  If not, a copy
1382 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1383 # obtained by writing to the Free Software Foundation, Inc.,
1384 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1385 ])
1386
1387 # serial 56 LT_INIT
1388
1389
1390 # LT_PREREQ(VERSION)
1391 # ------------------
1392 # Complain and exit if this libtool version is less that VERSION.
1393 m4_defun([LT_PREREQ],
1394 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1395        [m4_default([$3],
1396                    [m4_fatal([Libtool version $1 or higher is required],
1397                              63)])],
1398        [$2])])
1399
1400
1401 # _LT_CHECK_BUILDDIR
1402 # ------------------
1403 # Complain if the absolute build directory name contains unusual characters
1404 m4_defun([_LT_CHECK_BUILDDIR],
1405 [case `pwd` in
1406   *\ * | *\     *)
1407     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1408 esac
1409 ])
1410
1411
1412 # LT_INIT([OPTIONS])
1413 # ------------------
1414 AC_DEFUN([LT_INIT],
1415 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1416 AC_BEFORE([$0], [LT_LANG])dnl
1417 AC_BEFORE([$0], [LT_OUTPUT])dnl
1418 AC_BEFORE([$0], [LTDL_INIT])dnl
1419 m4_require([_LT_CHECK_BUILDDIR])dnl
1420
1421 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1422 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1423 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1424 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1425 dnl unless we require an AC_DEFUNed macro:
1426 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1427 AC_REQUIRE([LTSUGAR_VERSION])dnl
1428 AC_REQUIRE([LTVERSION_VERSION])dnl
1429 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1430 m4_require([_LT_PROG_LTMAIN])dnl
1431
1432 dnl Parse OPTIONS
1433 _LT_SET_OPTIONS([$0], [$1])
1434
1435 # This can be used to rebuild libtool when needed
1436 LIBTOOL_DEPS="$ltmain"
1437
1438 # Always use our own libtool.
1439 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1440 AC_SUBST(LIBTOOL)dnl
1441
1442 _LT_SETUP
1443
1444 # Only expand once:
1445 m4_define([LT_INIT])
1446 ])# LT_INIT
1447
1448 # Old names:
1449 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1450 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1451 dnl aclocal-1.4 backwards compatibility:
1452 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1453 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1454
1455
1456 # _LT_CC_BASENAME(CC)
1457 # -------------------
1458 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1459 m4_defun([_LT_CC_BASENAME],
1460 [for cc_temp in $1""; do
1461   case $cc_temp in
1462     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1463     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1464     \-*) ;;
1465     *) break;;
1466   esac
1467 done
1468 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1469 ])
1470
1471
1472 # _LT_FILEUTILS_DEFAULTS
1473 # ----------------------
1474 # It is okay to use these file commands and assume they have been set
1475 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1476 m4_defun([_LT_FILEUTILS_DEFAULTS],
1477 [: ${CP="cp -f"}
1478 : ${MV="mv -f"}
1479 : ${RM="rm -f"}
1480 ])# _LT_FILEUTILS_DEFAULTS
1481
1482
1483 # _LT_SETUP
1484 # ---------
1485 m4_defun([_LT_SETUP],
1486 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1487 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1488 _LT_DECL([], [host_alias], [0], [The host system])dnl
1489 _LT_DECL([], [host], [0])dnl
1490 _LT_DECL([], [host_os], [0])dnl
1491 dnl
1492 _LT_DECL([], [build_alias], [0], [The build system])dnl
1493 _LT_DECL([], [build], [0])dnl
1494 _LT_DECL([], [build_os], [0])dnl
1495 dnl
1496 AC_REQUIRE([AC_PROG_CC])dnl
1497 AC_REQUIRE([LT_PATH_LD])dnl
1498 AC_REQUIRE([LT_PATH_NM])dnl
1499 dnl
1500 AC_REQUIRE([AC_PROG_LN_S])dnl
1501 test -z "$LN_S" && LN_S="ln -s"
1502 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1503 dnl
1504 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1505 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1506 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1507 dnl
1508 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1509 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1510 m4_require([_LT_CMD_RELOAD])dnl
1511 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1512 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1513 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1514
1515 _LT_CONFIG_LIBTOOL_INIT([
1516 # See if we are running on zsh, and set the options which allow our
1517 # commands through without removal of \ escapes INIT.
1518 if test -n "\${ZSH_VERSION+set}" ; then
1519    setopt NO_GLOB_SUBST
1520 fi
1521 ])
1522 if test -n "${ZSH_VERSION+set}" ; then
1523    setopt NO_GLOB_SUBST
1524 fi
1525
1526 _LT_CHECK_OBJDIR
1527
1528 m4_require([_LT_TAG_COMPILER])dnl
1529 _LT_PROG_ECHO_BACKSLASH
1530
1531 case $host_os in
1532 aix3*)
1533   # AIX sometimes has problems with the GCC collect2 program.  For some
1534   # reason, if we set the COLLECT_NAMES environment variable, the problems
1535   # vanish in a puff of smoke.
1536   if test "X${COLLECT_NAMES+set}" != Xset; then
1537     COLLECT_NAMES=
1538     export COLLECT_NAMES
1539   fi
1540   ;;
1541 esac
1542
1543 # Sed substitution that helps us do robust quoting.  It backslashifies
1544 # metacharacters that are still active within double-quoted strings.
1545 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1546
1547 # Same as above, but do not quote variable references.
1548 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1549
1550 # Sed substitution to delay expansion of an escaped shell variable in a
1551 # double_quote_subst'ed string.
1552 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1553
1554 # Sed substitution to delay expansion of an escaped single quote.
1555 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1556
1557 # Sed substitution to avoid accidental globbing in evaled expressions
1558 no_glob_subst='s/\*/\\\*/g'
1559
1560 # Global variables:
1561 ofile=libtool
1562 can_build_shared=yes
1563
1564 # All known linkers require a `.a' archive for static linking (except MSVC,
1565 # which needs '.lib').
1566 libext=a
1567
1568 with_gnu_ld="$lt_cv_prog_gnu_ld"
1569
1570 old_CC="$CC"
1571 old_CFLAGS="$CFLAGS"
1572
1573 # Set sane defaults for various variables
1574 test -z "$CC" && CC=cc
1575 test -z "$LTCC" && LTCC=$CC
1576 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1577 test -z "$LD" && LD=ld
1578 test -z "$ac_objext" && ac_objext=o
1579
1580 _LT_CC_BASENAME([$compiler])
1581
1582 # Only perform the check for file, if the check method requires it
1583 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1584 case $deplibs_check_method in
1585 file_magic*)
1586   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1587     _LT_PATH_MAGIC
1588   fi
1589   ;;
1590 esac
1591
1592 # Use C for the default configuration in the libtool script
1593 LT_SUPPORTED_TAG([CC])
1594 _LT_LANG_C_CONFIG
1595 _LT_LANG_DEFAULT_CONFIG
1596 _LT_CONFIG_COMMANDS
1597 ])# _LT_SETUP
1598
1599
1600 # _LT_PROG_LTMAIN
1601 # ---------------
1602 # Note that this code is called both from `configure', and `config.status'
1603 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1604 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1605 # so we pass a copy along to make sure it has a sensible value anyway.
1606 m4_defun([_LT_PROG_LTMAIN],
1607 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1608 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1609 ltmain="$ac_aux_dir/ltmain.sh"
1610 ])# _LT_PROG_LTMAIN
1611
1612
1613
1614 # So that we can recreate a full libtool script including additional
1615 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1616 # in macros and then make a single call at the end using the `libtool'
1617 # label.
1618
1619
1620 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1621 # ----------------------------------------
1622 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1623 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1624 [m4_ifval([$1],
1625           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1626                      [$1
1627 ])])])
1628
1629 # Initialize.
1630 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1631
1632
1633 # _LT_CONFIG_LIBTOOL([COMMANDS])
1634 # ------------------------------
1635 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1636 m4_define([_LT_CONFIG_LIBTOOL],
1637 [m4_ifval([$1],
1638           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1639                      [$1
1640 ])])])
1641
1642 # Initialize.
1643 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1644
1645
1646 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1647 # -----------------------------------------------------
1648 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1649 [_LT_CONFIG_LIBTOOL([$1])
1650 _LT_CONFIG_LIBTOOL_INIT([$2])
1651 ])
1652
1653
1654 # _LT_FORMAT_COMMENT([COMMENT])
1655 # -----------------------------
1656 # Add leading comment marks to the start of each line, and a trailing
1657 # full-stop to the whole comment if one is not present already.
1658 m4_define([_LT_FORMAT_COMMENT],
1659 [m4_ifval([$1], [
1660 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1661               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1662 )])
1663
1664
1665
1666
1667
1668 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1669 # -------------------------------------------------------------------
1670 # CONFIGNAME is the name given to the value in the libtool script.
1671 # VARNAME is the (base) name used in the configure script.
1672 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1673 # VARNAME.  Any other value will be used directly.
1674 m4_define([_LT_DECL],
1675 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1676     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1677         [m4_ifval([$1], [$1], [$2])])
1678     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1679     m4_ifval([$4],
1680         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1681     lt_dict_add_subkey([lt_decl_dict], [$2],
1682         [tagged?], [m4_ifval([$5], [yes], [no])])])
1683 ])
1684
1685
1686 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1687 # --------------------------------------------------------
1688 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1689
1690
1691 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1692 # ------------------------------------------------
1693 m4_define([lt_decl_tag_varnames],
1694 [_lt_decl_filter([tagged?], [yes], $@)])
1695
1696
1697 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1698 # ---------------------------------------------------------
1699 m4_define([_lt_decl_filter],
1700 [m4_case([$#],
1701   [0], [m4_fatal([$0: too few arguments: $#])],
1702   [1], [m4_fatal([$0: too few arguments: $#: $1])],
1703   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1704   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1705   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1706 ])
1707
1708
1709 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1710 # --------------------------------------------------
1711 m4_define([lt_decl_quote_varnames],
1712 [_lt_decl_filter([value], [1], $@)])
1713
1714
1715 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1716 # ---------------------------------------------------
1717 m4_define([lt_decl_dquote_varnames],
1718 [_lt_decl_filter([value], [2], $@)])
1719
1720
1721 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1722 # ---------------------------------------------------
1723 m4_define([lt_decl_varnames_tagged],
1724 [m4_assert([$# <= 2])dnl
1725 _$0(m4_quote(m4_default([$1], [[, ]])),
1726     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1727     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1728 m4_define([_lt_decl_varnames_tagged],
1729 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1730
1731
1732 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1733 # ------------------------------------------------
1734 m4_define([lt_decl_all_varnames],
1735 [_$0(m4_quote(m4_default([$1], [[, ]])),
1736      m4_if([$2], [],
1737            m4_quote(lt_decl_varnames),
1738         m4_quote(m4_shift($@))))[]dnl
1739 ])
1740 m4_define([_lt_decl_all_varnames],
1741 [lt_join($@, lt_decl_varnames_tagged([$1],
1742                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1743 ])
1744
1745
1746 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1747 # ------------------------------------
1748 # Quote a variable value, and forward it to `config.status' so that its
1749 # declaration there will have the same value as in `configure'.  VARNAME
1750 # must have a single quote delimited value for this to work.
1751 m4_define([_LT_CONFIG_STATUS_DECLARE],
1752 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1753
1754
1755 # _LT_CONFIG_STATUS_DECLARATIONS
1756 # ------------------------------
1757 # We delimit libtool config variables with single quotes, so when
1758 # we write them to config.status, we have to be sure to quote all
1759 # embedded single quotes properly.  In configure, this macro expands
1760 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1761 #
1762 #    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1763 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1764 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1765     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1766
1767
1768 # _LT_LIBTOOL_TAGS
1769 # ----------------
1770 # Output comment and list of tags supported by the script
1771 m4_defun([_LT_LIBTOOL_TAGS],
1772 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1773 available_tags="_LT_TAGS"dnl
1774 ])
1775
1776
1777 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1778 # -----------------------------------
1779 # Extract the dictionary values for VARNAME (optionally with TAG) and
1780 # expand to a commented shell variable setting:
1781 #
1782 #    # Some comment about what VAR is for.
1783 #    visible_name=$lt_internal_name
1784 m4_define([_LT_LIBTOOL_DECLARE],
1785 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1786                                            [description])))[]dnl
1787 m4_pushdef([_libtool_name],
1788     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1789 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1790     [0], [_libtool_name=[$]$1],
1791     [1], [_libtool_name=$lt_[]$1],
1792     [2], [_libtool_name=$lt_[]$1],
1793     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1794 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1795 ])
1796
1797
1798 # _LT_LIBTOOL_CONFIG_VARS
1799 # -----------------------
1800 # Produce commented declarations of non-tagged libtool config variables
1801 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1802 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1803 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1804 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1805 [m4_foreach([_lt_var],
1806     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1807     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1808
1809
1810 # _LT_LIBTOOL_TAG_VARS(TAG)
1811 # -------------------------
1812 m4_define([_LT_LIBTOOL_TAG_VARS],
1813 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1814     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1815
1816
1817 # _LT_TAGVAR(VARNAME, [TAGNAME])
1818 # ------------------------------
1819 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1820
1821
1822 # _LT_CONFIG_COMMANDS
1823 # -------------------
1824 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1825 # variables for single and double quote escaping we saved from calls
1826 # to _LT_DECL, we can put quote escaped variables declarations
1827 # into `config.status', and then the shell code to quote escape them in
1828 # for loops in `config.status'.  Finally, any additional code accumulated
1829 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1830 m4_defun([_LT_CONFIG_COMMANDS],
1831 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1832         dnl If the libtool generation code has been placed in $CONFIG_LT,
1833         dnl instead of duplicating it all over again into config.status,
1834         dnl then we will have config.status run $CONFIG_LT later, so it
1835         dnl needs to know what name is stored there:
1836         [AC_CONFIG_COMMANDS([libtool],
1837             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1838     dnl If the libtool generation code is destined for config.status,
1839     dnl expand the accumulated commands and init code now:
1840     [AC_CONFIG_COMMANDS([libtool],
1841         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1842 ])#_LT_CONFIG_COMMANDS
1843
1844
1845 # Initialize.
1846 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1847 [
1848
1849 # The HP-UX ksh and POSIX shell print the target directory to stdout
1850 # if CDPATH is set.
1851 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1852
1853 sed_quote_subst='$sed_quote_subst'
1854 double_quote_subst='$double_quote_subst'
1855 delay_variable_subst='$delay_variable_subst'
1856 _LT_CONFIG_STATUS_DECLARATIONS
1857 LTCC='$LTCC'
1858 LTCFLAGS='$LTCFLAGS'
1859 compiler='$compiler_DEFAULT'
1860
1861 # Quote evaled strings.
1862 for var in lt_decl_all_varnames([[ \
1863 ]], lt_decl_quote_varnames); do
1864     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1865     *[[\\\\\\\`\\"\\\$]]*)
1866       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1867       ;;
1868     *)
1869       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1870       ;;
1871     esac
1872 done
1873
1874 # Double-quote double-evaled strings.
1875 for var in lt_decl_all_varnames([[ \
1876 ]], lt_decl_dquote_varnames); do
1877     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1878     *[[\\\\\\\`\\"\\\$]]*)
1879       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1880       ;;
1881     *)
1882       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1883       ;;
1884     esac
1885 done
1886
1887 # Fix-up fallback echo if it was mangled by the above quoting rules.
1888 case \$lt_ECHO in
1889 *'\\\[$]0 --fallback-echo"')dnl "
1890   lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1891   ;;
1892 esac
1893
1894 _LT_OUTPUT_LIBTOOL_INIT
1895 ])
1896
1897
1898 # LT_OUTPUT
1899 # ---------
1900 # This macro allows early generation of the libtool script (before
1901 # AC_OUTPUT is called), incase it is used in configure for compilation
1902 # tests.
1903 AC_DEFUN([LT_OUTPUT],
1904 [: ${CONFIG_LT=./config.lt}
1905 AC_MSG_NOTICE([creating $CONFIG_LT])
1906 cat >"$CONFIG_LT" <<_LTEOF
1907 #! $SHELL
1908 # Generated by $as_me.
1909 # Run this file to recreate a libtool stub with the current configuration.
1910
1911 lt_cl_silent=false
1912 SHELL=\${CONFIG_SHELL-$SHELL}
1913 _LTEOF
1914
1915 cat >>"$CONFIG_LT" <<\_LTEOF
1916 AS_SHELL_SANITIZE
1917 _AS_PREPARE
1918
1919 exec AS_MESSAGE_FD>&1
1920 exec AS_MESSAGE_LOG_FD>>config.log
1921 {
1922   echo
1923   AS_BOX([Running $as_me.])
1924 } >&AS_MESSAGE_LOG_FD
1925
1926 lt_cl_help="\
1927 \`$as_me' creates a local libtool stub from the current configuration,
1928 for use in further configure time tests before the real libtool is
1929 generated.
1930
1931 Usage: $[0] [[OPTIONS]]
1932
1933   -h, --help      print this help, then exit
1934   -V, --version   print version number, then exit
1935   -q, --quiet     do not print progress messages
1936   -d, --debug     don't remove temporary files
1937
1938 Report bugs to <bug-libtool@gnu.org>."
1939
1940 lt_cl_version="\
1941 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1942 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1943 configured by $[0], generated by m4_PACKAGE_STRING.
1944
1945 Copyright (C) 2008 Free Software Foundation, Inc.
1946 This config.lt script is free software; the Free Software Foundation
1947 gives unlimited permision to copy, distribute and modify it."
1948
1949 while test $[#] != 0
1950 do
1951   case $[1] in
1952     --version | --v* | -V )
1953       echo "$lt_cl_version"; exit 0 ;;
1954     --help | --h* | -h )
1955       echo "$lt_cl_help"; exit 0 ;;
1956     --debug | --d* | -d )
1957       debug=: ;;
1958     --quiet | --q* | --silent | --s* | -q )
1959       lt_cl_silent=: ;;
1960
1961     -*) AC_MSG_ERROR([unrecognized option: $[1]
1962 Try \`$[0] --help' for more information.]) ;;
1963
1964     *) AC_MSG_ERROR([unrecognized argument: $[1]
1965 Try \`$[0] --help' for more information.]) ;;
1966   esac
1967   shift
1968 done
1969
1970 if $lt_cl_silent; then
1971   exec AS_MESSAGE_FD>/dev/null
1972 fi
1973 _LTEOF
1974
1975 cat >>"$CONFIG_LT" <<_LTEOF
1976 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1977 _LTEOF
1978
1979 cat >>"$CONFIG_LT" <<\_LTEOF
1980 AC_MSG_NOTICE([creating $ofile])
1981 _LT_OUTPUT_LIBTOOL_COMMANDS
1982 AS_EXIT(0)
1983 _LTEOF
1984 chmod +x "$CONFIG_LT"
1985
1986 # configure is writing to config.log, but config.lt does its own redirection,
1987 # appending to config.log, which fails on DOS, as config.log is still kept
1988 # open by configure.  Here we exec the FD to /dev/null, effectively closing
1989 # config.log, so it can be properly (re)opened and appended to by config.lt.
1990 if test "$no_create" != yes; then
1991   lt_cl_success=:
1992   test "$silent" = yes &&
1993     lt_config_lt_args="$lt_config_lt_args --quiet"
1994   exec AS_MESSAGE_LOG_FD>/dev/null
1995   $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1996   exec AS_MESSAGE_LOG_FD>>config.log
1997   $lt_cl_success || AS_EXIT(1)
1998 fi
1999 ])# LT_OUTPUT
2000
2001
2002 # _LT_CONFIG(TAG)
2003 # ---------------
2004 # If TAG is the built-in tag, create an initial libtool script with a
2005 # default configuration from the untagged config vars.  Otherwise add code
2006 # to config.status for appending the configuration named by TAG from the
2007 # matching tagged config vars.
2008 m4_defun([_LT_CONFIG],
2009 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2010 _LT_CONFIG_SAVE_COMMANDS([
2011   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2012   m4_if(_LT_TAG, [C], [
2013     # See if we are running on zsh, and set the options which allow our
2014     # commands through without removal of \ escapes.
2015     if test -n "${ZSH_VERSION+set}" ; then
2016       setopt NO_GLOB_SUBST
2017     fi
2018
2019     cfgfile="${ofile}T"
2020     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2021     $RM "$cfgfile"
2022
2023     cat <<_LT_EOF >> "$cfgfile"
2024 #! $SHELL
2025
2026 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2027 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2028 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2029 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2030 #
2031 _LT_COPYING
2032 _LT_LIBTOOL_TAGS
2033
2034 # ### BEGIN LIBTOOL CONFIG
2035 _LT_LIBTOOL_CONFIG_VARS
2036 _LT_LIBTOOL_TAG_VARS
2037 # ### END LIBTOOL CONFIG
2038
2039 _LT_EOF
2040
2041   case $host_os in
2042   aix3*)
2043     cat <<\_LT_EOF >> "$cfgfile"
2044 # AIX sometimes has problems with the GCC collect2 program.  For some
2045 # reason, if we set the COLLECT_NAMES environment variable, the problems
2046 # vanish in a puff of smoke.
2047 if test "X${COLLECT_NAMES+set}" != Xset; then
2048   COLLECT_NAMES=
2049   export COLLECT_NAMES
2050 fi
2051 _LT_EOF
2052     ;;
2053   esac
2054
2055   _LT_PROG_LTMAIN
2056
2057   # We use sed instead of cat because bash on DJGPP gets confused if
2058   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
2059   # text mode, it properly converts lines to CR/LF.  This bash problem
2060   # is reportedly fixed, but why not run on old versions too?
2061   sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
2062     || (rm -f "$cfgfile"; exit 1)
2063
2064   _LT_PROG_XSI_SHELLFNS
2065
2066   sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
2067     || (rm -f "$cfgfile"; exit 1)
2068
2069   mv -f "$cfgfile" "$ofile" ||
2070     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2071   chmod +x "$ofile"
2072 ],
2073 [cat <<_LT_EOF >> "$ofile"
2074
2075 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2076 dnl in a comment (ie after a #).
2077 # ### BEGIN LIBTOOL TAG CONFIG: $1
2078 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
2079 # ### END LIBTOOL TAG CONFIG: $1
2080 _LT_EOF
2081 ])dnl /m4_if
2082 ],
2083 [m4_if([$1], [], [
2084     PACKAGE='$PACKAGE'
2085     VERSION='$VERSION'
2086     TIMESTAMP='$TIMESTAMP'
2087     RM='$RM'
2088     ofile='$ofile'], [])
2089 ])dnl /_LT_CONFIG_SAVE_COMMANDS
2090 ])# _LT_CONFIG
2091
2092
2093 # LT_SUPPORTED_TAG(TAG)
2094 # ---------------------
2095 # Trace this macro to discover what tags are supported by the libtool
2096 # --tag option, using:
2097 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
2098 AC_DEFUN([LT_SUPPORTED_TAG], [])
2099
2100
2101 # C support is built-in for now
2102 m4_define([_LT_LANG_C_enabled], [])
2103 m4_define([_LT_TAGS], [])
2104
2105
2106 # LT_LANG(LANG)
2107 # -------------
2108 # Enable libtool support for the given language if not already enabled.
2109 AC_DEFUN([LT_LANG],
2110 [AC_BEFORE([$0], [LT_OUTPUT])dnl
2111 m4_case([$1],
2112   [C],                  [_LT_LANG(C)],
2113   [C++],                [_LT_LANG(CXX)],
2114   [Java],               [_LT_LANG(GCJ)],
2115   [Fortran 77],         [_LT_LANG(F77)],
2116   [Fortran],            [_LT_LANG(FC)],
2117   [Windows Resource],   [_LT_LANG(RC)],
2118   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2119     [_LT_LANG($1)],
2120     [m4_fatal([$0: unsupported language: "$1"])])])dnl
2121 ])# LT_LANG
2122
2123
2124 # _LT_LANG(LANGNAME)
2125 # ------------------
2126 m4_defun([_LT_LANG],
2127 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
2128   [LT_SUPPORTED_TAG([$1])dnl
2129   m4_append([_LT_TAGS], [$1 ])dnl
2130   m4_define([_LT_LANG_]$1[_enabled], [])dnl
2131   _LT_LANG_$1_CONFIG($1)])dnl
2132 ])# _LT_LANG
2133
2134
2135 # _LT_LANG_DEFAULT_CONFIG
2136 # -----------------------
2137 m4_defun([_LT_LANG_DEFAULT_CONFIG],
2138 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
2139   [LT_LANG(CXX)],
2140   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2141
2142 AC_PROVIDE_IFELSE([AC_PROG_F77],
2143   [LT_LANG(F77)],
2144   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2145
2146 AC_PROVIDE_IFELSE([AC_PROG_FC],
2147   [LT_LANG(FC)],
2148   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2149
2150 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2151 dnl pulling things in needlessly.
2152 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2153   [LT_LANG(GCJ)],
2154   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2155     [LT_LANG(GCJ)],
2156     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2157       [LT_LANG(GCJ)],
2158       [m4_ifdef([AC_PROG_GCJ],
2159         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2160        m4_ifdef([A][M_PROG_GCJ],
2161         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2162        m4_ifdef([LT_PROG_GCJ],
2163         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2164
2165 AC_PROVIDE_IFELSE([LT_PROG_RC],
2166   [LT_LANG(RC)],
2167   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2168 ])# _LT_LANG_DEFAULT_CONFIG
2169
2170 # Obsolete macros:
2171 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2172 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2173 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2174 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2175 dnl aclocal-1.4 backwards compatibility:
2176 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2177 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2178 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2179 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2180
2181
2182 # _LT_TAG_COMPILER
2183 # ----------------
2184 m4_defun([_LT_TAG_COMPILER],
2185 [AC_REQUIRE([AC_PROG_CC])dnl
2186
2187 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2188 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2189 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2190 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2191
2192 # If no C compiler was specified, use CC.
2193 LTCC=${LTCC-"$CC"}
2194
2195 # If no C compiler flags were specified, use CFLAGS.
2196 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2197
2198 # Allow CC to be a program name with arguments.
2199 compiler=$CC
2200 ])# _LT_TAG_COMPILER
2201
2202
2203 # _LT_COMPILER_BOILERPLATE
2204 # ------------------------
2205 # Check for compiler boilerplate output or warnings with
2206 # the simple compiler test code.
2207 m4_defun([_LT_COMPILER_BOILERPLATE],
2208 [m4_require([_LT_DECL_SED])dnl
2209 ac_outfile=conftest.$ac_objext
2210 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2211 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2212 _lt_compiler_boilerplate=`cat conftest.err`
2213 $RM conftest*
2214 ])# _LT_COMPILER_BOILERPLATE
2215
2216
2217 # _LT_LINKER_BOILERPLATE
2218 # ----------------------
2219 # Check for linker boilerplate output or warnings with
2220 # the simple link test code.
2221 m4_defun([_LT_LINKER_BOILERPLATE],
2222 [m4_require([_LT_DECL_SED])dnl
2223 ac_outfile=conftest.$ac_objext
2224 echo "$lt_simple_link_test_code" >conftest.$ac_ext
2225 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2226 _lt_linker_boilerplate=`cat conftest.err`
2227 $RM -r conftest*
2228 ])# _LT_LINKER_BOILERPLATE
2229
2230 # _LT_REQUIRED_DARWIN_CHECKS
2231 # -------------------------
2232 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2233   case $host_os in
2234     rhapsody* | darwin*)
2235     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2236     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2237     AC_CHECK_TOOL([LIPO], [lipo], [:])
2238     AC_CHECK_TOOL([OTOOL], [otool], [:])
2239     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2240     _LT_DECL([], [DSYMUTIL], [1],
2241       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2242     _LT_DECL([], [NMEDIT], [1],
2243       [Tool to change global to local symbols on Mac OS X])
2244     _LT_DECL([], [LIPO], [1],
2245       [Tool to manipulate fat objects and archives on Mac OS X])
2246     _LT_DECL([], [OTOOL], [1],
2247       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2248     _LT_DECL([], [OTOOL64], [1],
2249       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2250
2251     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2252       [lt_cv_apple_cc_single_mod=no
2253       if test -z "${LT_MULTI_MODULE}"; then
2254         # By default we will add the -single_module flag. You can override
2255         # by either setting the environment variable LT_MULTI_MODULE
2256         # non-empty at configure time, or by adding -multi_module to the
2257         # link flags.
2258         rm -rf libconftest.dylib*
2259         echo "int foo(void){return 1;}" > conftest.c
2260         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2261 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2262         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2263           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2264         _lt_result=$?
2265         if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
2266           lt_cv_apple_cc_single_mod=yes
2267         else
2268           cat conftest.err >&AS_MESSAGE_LOG_FD
2269         fi
2270         rm -rf libconftest.dylib*
2271         rm -f conftest.*
2272       fi])
2273     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2274       [lt_cv_ld_exported_symbols_list],
2275       [lt_cv_ld_exported_symbols_list=no
2276       save_LDFLAGS=$LDFLAGS
2277       echo "_main" > conftest.sym
2278       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2279       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2280         [lt_cv_ld_exported_symbols_list=yes],
2281         [lt_cv_ld_exported_symbols_list=no])
2282         LDFLAGS="$save_LDFLAGS"
2283     ])
2284     case $host_os in
2285     rhapsody* | darwin1.[[012]])
2286       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2287     darwin1.*)
2288       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2289     darwin*) # darwin 5.x on
2290       # if running on 10.5 or later, the deployment target defaults
2291       # to the OS version, if on x86, and 10.4, the deployment
2292       # target defaults to 10.4. Don't you love it?
2293       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2294         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2295           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2296         10.[[012]]*)
2297           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2298         10.*)
2299           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2300       esac
2301     ;;
2302   esac
2303     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2304       _lt_dar_single_mod='$single_module'
2305     fi
2306     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2307       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2308     else
2309       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2310     fi
2311     if test "$DSYMUTIL" != ":"; then
2312       _lt_dsymutil='~$DSYMUTIL $lib || :'
2313     else
2314       _lt_dsymutil=
2315     fi
2316     ;;
2317   esac
2318 ])
2319
2320
2321 # _LT_DARWIN_LINKER_FEATURES
2322 # --------------------------
2323 # Checks for linker and compiler features on darwin
2324 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2325 [
2326   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2327   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2328   _LT_TAGVAR(hardcode_direct, $1)=no
2329   _LT_TAGVAR(hardcode_automatic, $1)=yes
2330   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2331   _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2332   _LT_TAGVAR(link_all_deplibs, $1)=yes
2333   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2334   case $cc_basename in
2335      ifort*) _lt_dar_can_shared=yes ;;
2336      *) _lt_dar_can_shared=$GCC ;;
2337   esac
2338   if test "$_lt_dar_can_shared" = "yes"; then
2339     output_verbose_link_cmd=echo
2340     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
2341     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2342     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
2343     _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
2344     m4_if([$1], [CXX],
2345 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2346       _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
2347       _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
2348     fi
2349 ],[])
2350   else
2351   _LT_TAGVAR(ld_shlibs, $1)=no
2352   fi
2353 ])
2354
2355 # _LT_SYS_MODULE_PATH_AIX
2356 # -----------------------
2357 # Links a minimal program and checks the executable
2358 # for the system default hardcoded library path. In most cases,
2359 # this is /usr/lib:/lib, but when the MPI compilers are used
2360 # the location of the communication and MPI libs are included too.
2361 # If we don't find anything, use the default library path according
2362 # to the aix ld manual.
2363 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2364 [m4_require([_LT_DECL_SED])dnl
2365 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2366 lt_aix_libpath_sed='
2367     /Import File Strings/,/^$/ {
2368         /^0/ {
2369             s/^0  *\(.*\)$/\1/
2370             p
2371         }
2372     }'
2373 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2374 # Check for a 64-bit object if we didn't find anything.
2375 if test -z "$aix_libpath"; then
2376   aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2377 fi],[])
2378 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2379 ])# _LT_SYS_MODULE_PATH_AIX
2380
2381
2382 # _LT_SHELL_INIT(ARG)
2383 # -------------------
2384 m4_define([_LT_SHELL_INIT],
2385 [ifdef([AC_DIVERSION_NOTICE],
2386              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
2387          [AC_DIVERT_PUSH(NOTICE)])
2388 $1
2389 AC_DIVERT_POP
2390 ])# _LT_SHELL_INIT
2391
2392
2393 # _LT_PROG_ECHO_BACKSLASH
2394 # -----------------------
2395 # Add some code to the start of the generated configure script which
2396 # will find an echo command which doesn't interpret backslashes.
2397 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2398 [_LT_SHELL_INIT([
2399 # Check that we are running under the correct shell.
2400 SHELL=${CONFIG_SHELL-/bin/sh}
2401
2402 case X$lt_ECHO in
2403 X*--fallback-echo)
2404   # Remove one level of quotation (which was required for Make).
2405   ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2406   ;;
2407 esac
2408
2409 ECHO=${lt_ECHO-echo}
2410 if test "X[$]1" = X--no-reexec; then
2411   # Discard the --no-reexec flag, and continue.
2412   shift
2413 elif test "X[$]1" = X--fallback-echo; then
2414   # Avoid inline document here, it may be left over
2415   :
2416 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
2417   # Yippee, $ECHO works!
2418   :
2419 else
2420   # Restart under the correct shell.
2421   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2422 fi
2423
2424 if test "X[$]1" = X--fallback-echo; then
2425   # used as fallback echo
2426   shift
2427   cat <<_LT_EOF
2428 [$]*
2429 _LT_EOF
2430   exit 0
2431 fi
2432
2433 # The HP-UX ksh and POSIX shell print the target directory to stdout
2434 # if CDPATH is set.
2435 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2436
2437 if test -z "$lt_ECHO"; then
2438   if test "X${echo_test_string+set}" != Xset; then
2439     # find a string as large as possible, as long as the shell can cope with it
2440     for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
2441       # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
2442       if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
2443          { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
2444       then
2445         break
2446       fi
2447     done
2448   fi
2449
2450   if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2451      echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2452      test "X$echo_testing_string" = "X$echo_test_string"; then
2453     :
2454   else
2455     # The Solaris, AIX, and Digital Unix default echo programs unquote
2456     # backslashes.  This makes it impossible to quote backslashes using
2457     #   echo "$something" | sed 's/\\/\\\\/g'
2458     #
2459     # So, first we look for a working echo in the user's PATH.
2460
2461     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2462     for dir in $PATH /usr/ucb; do
2463       IFS="$lt_save_ifs"
2464       if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2465          test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2466          echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2467          test "X$echo_testing_string" = "X$echo_test_string"; then
2468         ECHO="$dir/echo"
2469         break
2470       fi
2471     done
2472     IFS="$lt_save_ifs"
2473
2474     if test "X$ECHO" = Xecho; then
2475       # We didn't find a better echo, so look for alternatives.
2476       if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
2477          echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
2478          test "X$echo_testing_string" = "X$echo_test_string"; then
2479         # This shell has a builtin print -r that does the trick.
2480         ECHO='print -r'
2481       elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
2482            test "X$CONFIG_SHELL" != X/bin/ksh; then
2483         # If we have ksh, try running configure again with it.
2484         ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2485         export ORIGINAL_CONFIG_SHELL
2486         CONFIG_SHELL=/bin/ksh
2487         export CONFIG_SHELL
2488         exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2489       else
2490         # Try using printf.
2491         ECHO='printf %s\n'
2492         if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2493            echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2494            test "X$echo_testing_string" = "X$echo_test_string"; then
2495           # Cool, printf works
2496           :
2497         elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2498              test "X$echo_testing_string" = 'X\t' &&
2499              echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2500              test "X$echo_testing_string" = "X$echo_test_string"; then
2501           CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2502           export CONFIG_SHELL
2503           SHELL="$CONFIG_SHELL"
2504           export SHELL
2505           ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2506         elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2507              test "X$echo_testing_string" = 'X\t' &&
2508              echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2509              test "X$echo_testing_string" = "X$echo_test_string"; then
2510           ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2511         else
2512           # maybe with a smaller string...
2513           prev=:
2514
2515           for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2516             if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
2517             then
2518               break
2519             fi
2520             prev="$cmd"
2521           done
2522
2523           if test "$prev" != 'sed 50q "[$]0"'; then
2524             echo_test_string=`eval $prev`
2525             export echo_test_string
2526             exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2527           else
2528             # Oops.  We lost completely, so just stick with echo.
2529             ECHO=echo
2530           fi
2531         fi
2532       fi
2533     fi
2534   fi
2535 fi
2536
2537 # Copy echo and quote the copy suitably for passing to libtool from
2538 # the Makefile, instead of quoting the original, which is used later.
2539 lt_ECHO=$ECHO
2540 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2541    lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2542 fi
2543
2544 AC_SUBST(lt_ECHO)
2545 ])
2546 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2547 _LT_DECL([], [ECHO], [1],
2548     [An echo program that does not interpret backslashes])
2549 ])# _LT_PROG_ECHO_BACKSLASH
2550
2551
2552 # _LT_ENABLE_LOCK
2553 # ---------------
2554 m4_defun([_LT_ENABLE_LOCK],
2555 [AC_ARG_ENABLE([libtool-lock],
2556   [AS_HELP_STRING([--disable-libtool-lock],
2557     [avoid locking (might break parallel builds)])])
2558 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2559
2560 # Some flags need to be propagated to the compiler or linker for good
2561 # libtool support.
2562 case $host in
2563 ia64-*-hpux*)
2564   # Find out which ABI we are using.
2565   echo 'int i;' > conftest.$ac_ext
2566   if AC_TRY_EVAL(ac_compile); then
2567     case `/usr/bin/file conftest.$ac_objext` in
2568       *ELF-32*)
2569         HPUX_IA64_MODE="32"
2570         ;;
2571       *ELF-64*)
2572         HPUX_IA64_MODE="64"
2573         ;;
2574     esac
2575   fi
2576   rm -rf conftest*
2577   ;;
2578 *-*-irix6*)
2579   # Find out which ABI we are using.
2580   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2581   if AC_TRY_EVAL(ac_compile); then
2582     if test "$lt_cv_prog_gnu_ld" = yes; then
2583       case `/usr/bin/file conftest.$ac_objext` in
2584         *32-bit*)
2585           LD="${LD-ld} -melf32bsmip"
2586           ;;
2587         *N32*)
2588           LD="${LD-ld} -melf32bmipn32"
2589           ;;
2590         *64-bit*)
2591           LD="${LD-ld} -melf64bmip"
2592         ;;
2593       esac
2594     else
2595       case `/usr/bin/file conftest.$ac_objext` in
2596         *32-bit*)
2597           LD="${LD-ld} -32"
2598           ;;
2599         *N32*)
2600           LD="${LD-ld} -n32"
2601           ;;
2602         *64-bit*)
2603           LD="${LD-ld} -64"
2604           ;;
2605       esac
2606     fi
2607   fi
2608   rm -rf conftest*
2609   ;;
2610
2611 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2612 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2613   # Find out which ABI we are using.
2614   echo 'int i;' > conftest.$ac_ext
2615   if AC_TRY_EVAL(ac_compile); then
2616     case `/usr/bin/file conftest.o` in
2617       *32-bit*)
2618         case $host in
2619           x86_64-*kfreebsd*-gnu)
2620             LD="${LD-ld} -m elf_i386_fbsd"
2621             ;;
2622           x86_64-*linux*)
2623             LD="${LD-ld} -m elf_i386"
2624             ;;
2625           ppc64-*linux*|powerpc64-*linux*)
2626             LD="${LD-ld} -m elf32ppclinux"
2627             ;;
2628           s390x-*linux*)
2629             LD="${LD-ld} -m elf_s390"
2630             ;;
2631           sparc64-*linux*)
2632             LD="${LD-ld} -m elf32_sparc"
2633             ;;
2634         esac
2635         ;;
2636       *64-bit*)
2637         case $host in
2638           x86_64-*kfreebsd*-gnu)
2639             LD="${LD-ld} -m elf_x86_64_fbsd"
2640             ;;
2641           x86_64-*linux*)
2642             LD="${LD-ld} -m elf_x86_64"
2643             ;;
2644           ppc*-*linux*|powerpc*-*linux*)
2645             LD="${LD-ld} -m elf64ppc"
2646             ;;
2647           s390*-*linux*|s390*-*tpf*)
2648             LD="${LD-ld} -m elf64_s390"
2649             ;;
2650           sparc*-*linux*)
2651             LD="${LD-ld} -m elf64_sparc"
2652             ;;
2653         esac
2654         ;;
2655     esac
2656   fi
2657   rm -rf conftest*
2658   ;;
2659
2660 *-*-sco3.2v5*)
2661   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2662   SAVE_CFLAGS="$CFLAGS"
2663   CFLAGS="$CFLAGS -belf"
2664   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2665     [AC_LANG_PUSH(C)
2666      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2667      AC_LANG_POP])
2668   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2669     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2670     CFLAGS="$SAVE_CFLAGS"
2671   fi
2672   ;;
2673 sparc*-*solaris*)
2674   # Find out which ABI we are using.
2675   echo 'int i;' > conftest.$ac_ext
2676   if AC_TRY_EVAL(ac_compile); then
2677     case `/usr/bin/file conftest.o` in
2678     *64-bit*)
2679       case $lt_cv_prog_gnu_ld in
2680       yes*) LD="${LD-ld} -m elf64_sparc" ;;
2681       *)
2682         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2683           LD="${LD-ld} -64"
2684         fi
2685         ;;
2686       esac
2687       ;;
2688     esac
2689   fi
2690   rm -rf conftest*
2691   ;;
2692 esac
2693
2694 need_locks="$enable_libtool_lock"
2695 ])# _LT_ENABLE_LOCK
2696
2697
2698 # _LT_CMD_OLD_ARCHIVE
2699 # -------------------
2700 m4_defun([_LT_CMD_OLD_ARCHIVE],
2701 [AC_CHECK_TOOL(AR, ar, false)
2702 test -z "$AR" && AR=ar
2703 test -z "$AR_FLAGS" && AR_FLAGS=cru
2704 _LT_DECL([], [AR], [1], [The archiver])
2705 _LT_DECL([], [AR_FLAGS], [1])
2706
2707 AC_CHECK_TOOL(STRIP, strip, :)
2708 test -z "$STRIP" && STRIP=:
2709 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2710
2711 AC_CHECK_TOOL(RANLIB, ranlib, :)
2712 test -z "$RANLIB" && RANLIB=:
2713 _LT_DECL([], [RANLIB], [1],
2714     [Commands used to install an old-style archive])
2715
2716 # Determine commands to create old-style static archives.
2717 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2718 old_postinstall_cmds='chmod 644 $oldlib'
2719 old_postuninstall_cmds=
2720
2721 if test -n "$RANLIB"; then
2722   case $host_os in
2723   openbsd*)
2724     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2725     ;;
2726   *)
2727     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2728     ;;
2729   esac
2730   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2731 fi
2732 _LT_DECL([], [old_postinstall_cmds], [2])
2733 _LT_DECL([], [old_postuninstall_cmds], [2])
2734 _LT_TAGDECL([], [old_archive_cmds], [2],
2735     [Commands used to build an old-style archive])
2736 ])# _LT_CMD_OLD_ARCHIVE
2737
2738
2739 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2740 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2741 # ----------------------------------------------------------------
2742 # Check whether the given compiler option works
2743 AC_DEFUN([_LT_COMPILER_OPTION],
2744 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2745 m4_require([_LT_DECL_SED])dnl
2746 AC_CACHE_CHECK([$1], [$2],
2747   [$2=no
2748    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2749    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2750    lt_compiler_flag="$3"
2751    # Insert the option either (1) after the last *FLAGS variable, or
2752    # (2) before a word containing "conftest.", or (3) at the end.
2753    # Note that $ac_compile itself does not contain backslashes and begins
2754    # with a dollar sign (not a hyphen), so the echo should work correctly.
2755    # The option is referenced via a variable to avoid confusing sed.
2756    lt_compile=`echo "$ac_compile" | $SED \
2757    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2758    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2759    -e 's:$: $lt_compiler_flag:'`
2760    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2761    (eval "$lt_compile" 2>conftest.err)
2762    ac_status=$?
2763    cat conftest.err >&AS_MESSAGE_LOG_FD
2764    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2765    if (exit $ac_status) && test -s "$ac_outfile"; then
2766      # The compiler can only warn and ignore the option if not recognized
2767      # So say no if there are warnings other than the usual output.
2768      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2769      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2770      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2771        $2=yes
2772      fi
2773    fi
2774    $RM conftest*
2775 ])
2776
2777 if test x"[$]$2" = xyes; then
2778     m4_if([$5], , :, [$5])
2779 else
2780     m4_if([$6], , :, [$6])
2781 fi
2782 ])# _LT_COMPILER_OPTION
2783
2784 # Old name:
2785 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2786 dnl aclocal-1.4 backwards compatibility:
2787 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2788
2789
2790 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2791 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
2792 # ----------------------------------------------------
2793 # Check whether the given linker option works
2794 AC_DEFUN([_LT_LINKER_OPTION],
2795 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2796 m4_require([_LT_DECL_SED])dnl
2797 AC_CACHE_CHECK([$1], [$2],
2798   [$2=no
2799    save_LDFLAGS="$LDFLAGS"
2800    LDFLAGS="$LDFLAGS $3"
2801    echo "$lt_simple_link_test_code" > conftest.$ac_ext
2802    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2803      # The linker can only warn and ignore the option if not recognized
2804      # So say no if there are warnings
2805      if test -s conftest.err; then
2806        # Append any errors to the config.log.
2807        cat conftest.err 1>&AS_MESSAGE_LOG_FD
2808        $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2809        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2810        if diff conftest.exp conftest.er2 >/dev/null; then
2811          $2=yes
2812        fi
2813      else
2814        $2=yes
2815      fi
2816    fi
2817    $RM -r conftest*
2818    LDFLAGS="$save_LDFLAGS"
2819 ])
2820
2821 if test x"[$]$2" = xyes; then
2822     m4_if([$4], , :, [$4])
2823 else
2824     m4_if([$5], , :, [$5])
2825 fi
2826 ])# _LT_LINKER_OPTION
2827
2828 # Old name:
2829 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2830 dnl aclocal-1.4 backwards compatibility:
2831 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2832
2833
2834 # LT_CMD_MAX_LEN
2835 #---------------
2836 AC_DEFUN([LT_CMD_MAX_LEN],
2837 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2838 # find the maximum length of command line arguments
2839 AC_MSG_CHECKING([the maximum length of command line arguments])
2840 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2841   i=0
2842   teststring="ABCD"
2843
2844   case $build_os in
2845   msdosdjgpp*)
2846     # On DJGPP, this test can blow up pretty badly due to problems in libc
2847     # (any single argument exceeding 2000 bytes causes a buffer overrun
2848     # during glob expansion).  Even if it were fixed, the result of this
2849     # check would be larger than it should be.
2850     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2851     ;;
2852
2853   gnu*)
2854     # Under GNU Hurd, this test is not required because there is
2855     # no limit to the length of command line arguments.
2856     # Libtool will interpret -1 as no limit whatsoever
2857     lt_cv_sys_max_cmd_len=-1;
2858     ;;
2859
2860   cygwin* | mingw* | cegcc*)
2861     # On Win9x/ME, this test blows up -- it succeeds, but takes
2862     # about 5 minutes as the teststring grows exponentially.
2863     # Worse, since 9x/ME are not pre-emptively multitasking,
2864     # you end up with a "frozen" computer, even though with patience
2865     # the test eventually succeeds (with a max line length of 256k).
2866     # Instead, let's just punt: use the minimum linelength reported by
2867     # all of the supported platforms: 8192 (on NT/2K/XP).
2868     lt_cv_sys_max_cmd_len=8192;
2869     ;;
2870
2871   amigaos*)
2872     # On AmigaOS with pdksh, this test takes hours, literally.
2873     # So we just punt and use a minimum line length of 8192.
2874     lt_cv_sys_max_cmd_len=8192;
2875     ;;
2876
2877   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2878     # This has been around since 386BSD, at least.  Likely further.
2879     if test -x /sbin/sysctl; then
2880       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2881     elif test -x /usr/sbin/sysctl; then
2882       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2883     else
2884       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
2885     fi
2886     # And add a safety zone
2887     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2888     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2889     ;;
2890
2891   interix*)
2892     # We know the value 262144 and hardcode it with a safety zone (like BSD)
2893     lt_cv_sys_max_cmd_len=196608
2894     ;;
2895
2896   osf*)
2897     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2898     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2899     # nice to cause kernel panics so lets avoid the loop below.
2900     # First set a reasonable default.
2901     lt_cv_sys_max_cmd_len=16384
2902     #
2903     if test -x /sbin/sysconfig; then
2904       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2905         *1*) lt_cv_sys_max_cmd_len=-1 ;;
2906       esac
2907     fi
2908     ;;
2909   sco3.2v5*)
2910     lt_cv_sys_max_cmd_len=102400
2911     ;;
2912   sysv5* | sco5v6* | sysv4.2uw2*)
2913     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2914     if test -n "$kargmax"; then
2915       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
2916     else
2917       lt_cv_sys_max_cmd_len=32768
2918     fi
2919     ;;
2920   *)
2921     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2922     if test -n "$lt_cv_sys_max_cmd_len"; then
2923       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2924       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2925     else
2926       # Make teststring a little bigger before we do anything with it.
2927       # a 1K string should be a reasonable start.
2928       for i in 1 2 3 4 5 6 7 8 ; do
2929         teststring=$teststring$teststring
2930       done
2931       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2932       # If test is not a shell built-in, we'll probably end up computing a
2933       # maximum length that is only half of the actual maximum length, but
2934       # we can't tell.
2935       while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2936                  = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
2937               test $i != 17 # 1/2 MB should be enough
2938       do
2939         i=`expr $i + 1`
2940         teststring=$teststring$teststring
2941       done
2942       # Only check the string length outside the loop.
2943       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2944       teststring=
2945       # Add a significant safety factor because C++ compilers can tack on
2946       # massive amounts of additional arguments before passing them to the
2947       # linker.  It appears as though 1/2 is a usable value.
2948       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2949     fi
2950     ;;
2951   esac
2952 ])
2953 if test -n $lt_cv_sys_max_cmd_len ; then
2954   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2955 else
2956   AC_MSG_RESULT(none)
2957 fi
2958 max_cmd_len=$lt_cv_sys_max_cmd_len
2959 _LT_DECL([], [max_cmd_len], [0],
2960     [What is the maximum length of a command?])
2961 ])# LT_CMD_MAX_LEN
2962
2963 # Old name:
2964 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2965 dnl aclocal-1.4 backwards compatibility:
2966 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2967
2968
2969 # _LT_HEADER_DLFCN
2970 # ----------------
2971 m4_defun([_LT_HEADER_DLFCN],
2972 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2973 ])# _LT_HEADER_DLFCN
2974
2975
2976 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2977 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2978 # ----------------------------------------------------------------
2979 m4_defun([_LT_TRY_DLOPEN_SELF],
2980 [m4_require([_LT_HEADER_DLFCN])dnl
2981 if test "$cross_compiling" = yes; then :
2982   [$4]
2983 else
2984   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2985   lt_status=$lt_dlunknown
2986   cat > conftest.$ac_ext <<_LT_EOF
2987 [#line __oline__ "configure"
2988 #include "confdefs.h"
2989
2990 #if HAVE_DLFCN_H
2991 #include <dlfcn.h>
2992 #endif
2993
2994 #include <stdio.h>
2995
2996 #ifdef RTLD_GLOBAL
2997 #  define LT_DLGLOBAL           RTLD_GLOBAL
2998 #else
2999 #  ifdef DL_GLOBAL
3000 #    define LT_DLGLOBAL         DL_GLOBAL
3001 #  else
3002 #    define LT_DLGLOBAL         0
3003 #  endif
3004 #endif
3005
3006 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3007    find out it does not work in some platform. */
3008 #ifndef LT_DLLAZY_OR_NOW
3009 #  ifdef RTLD_LAZY
3010 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
3011 #  else
3012 #    ifdef DL_LAZY
3013 #      define LT_DLLAZY_OR_NOW          DL_LAZY
3014 #    else
3015 #      ifdef RTLD_NOW
3016 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
3017 #      else
3018 #        ifdef DL_NOW
3019 #          define LT_DLLAZY_OR_NOW      DL_NOW
3020 #        else
3021 #          define LT_DLLAZY_OR_NOW      0
3022 #        endif
3023 #      endif
3024 #    endif
3025 #  endif
3026 #endif
3027
3028 void fnord() { int i=42;}
3029 int main ()
3030 {
3031   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3032   int status = $lt_dlunknown;
3033
3034   if (self)
3035     {
3036       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
3037       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3038       /* dlclose (self); */
3039     }
3040   else
3041     puts (dlerror ());
3042
3043   return status;
3044 }]
3045 _LT_EOF
3046   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3047     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3048     lt_status=$?
3049     case x$lt_status in
3050       x$lt_dlno_uscore) $1 ;;
3051       x$lt_dlneed_uscore) $2 ;;
3052       x$lt_dlunknown|x*) $3 ;;
3053     esac
3054   else :
3055     # compilation failed
3056     $3
3057   fi
3058 fi
3059 rm -fr conftest*
3060 ])# _LT_TRY_DLOPEN_SELF
3061
3062
3063 # LT_SYS_DLOPEN_SELF
3064 # ------------------
3065 AC_DEFUN([LT_SYS_DLOPEN_SELF],
3066 [m4_require([_LT_HEADER_DLFCN])dnl
3067 if test "x$enable_dlopen" != xyes; then
3068   enable_dlopen=unknown
3069   enable_dlopen_self=unknown
3070   enable_dlopen_self_static=unknown
3071 else
3072   lt_cv_dlopen=no
3073   lt_cv_dlopen_libs=
3074
3075   case $host_os in
3076   beos*)
3077     lt_cv_dlopen="load_add_on"
3078     lt_cv_dlopen_libs=
3079     lt_cv_dlopen_self=yes
3080     ;;
3081
3082   mingw* | pw32* | cegcc*)
3083     lt_cv_dlopen="LoadLibrary"
3084     lt_cv_dlopen_libs=
3085     ;;
3086
3087   cygwin*)
3088     lt_cv_dlopen="dlopen"
3089     lt_cv_dlopen_libs=
3090     ;;
3091
3092   darwin*)
3093   # if libdl is installed we need to link against it
3094     AC_CHECK_LIB([dl], [dlopen],
3095                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3096     lt_cv_dlopen="dyld"
3097     lt_cv_dlopen_libs=
3098     lt_cv_dlopen_self=yes
3099     ])
3100     ;;
3101
3102   *)
3103     AC_CHECK_FUNC([shl_load],
3104           [lt_cv_dlopen="shl_load"],
3105       [AC_CHECK_LIB([dld], [shl_load],
3106             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3107         [AC_CHECK_FUNC([dlopen],
3108               [lt_cv_dlopen="dlopen"],
3109           [AC_CHECK_LIB([dl], [dlopen],
3110                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3111             [AC_CHECK_LIB([svld], [dlopen],
3112                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3113               [AC_CHECK_LIB([dld], [dld_link],
3114                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3115               ])
3116             ])
3117           ])
3118         ])
3119       ])
3120     ;;
3121   esac
3122
3123   if test "x$lt_cv_dlopen" != xno; then
3124     enable_dlopen=yes
3125   else
3126     enable_dlopen=no
3127   fi
3128
3129   case $lt_cv_dlopen in
3130   dlopen)
3131     save_CPPFLAGS="$CPPFLAGS"
3132     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3133
3134     save_LDFLAGS="$LDFLAGS"
3135     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3136
3137     save_LIBS="$LIBS"
3138     LIBS="$lt_cv_dlopen_libs $LIBS"
3139
3140     AC_CACHE_CHECK([whether a program can dlopen itself],
3141           lt_cv_dlopen_self, [dnl
3142           _LT_TRY_DLOPEN_SELF(
3143             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3144             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3145     ])
3146
3147     if test "x$lt_cv_dlopen_self" = xyes; then
3148       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3149       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3150           lt_cv_dlopen_self_static, [dnl
3151           _LT_TRY_DLOPEN_SELF(
3152             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3153             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3154       ])
3155     fi
3156
3157     CPPFLAGS="$save_CPPFLAGS"
3158     LDFLAGS="$save_LDFLAGS"
3159     LIBS="$save_LIBS"
3160     ;;
3161   esac
3162
3163   case $lt_cv_dlopen_self in
3164   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3165   *) enable_dlopen_self=unknown ;;
3166   esac
3167
3168   case $lt_cv_dlopen_self_static in
3169   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3170   *) enable_dlopen_self_static=unknown ;;
3171   esac
3172 fi
3173 _LT_DECL([dlopen_support], [enable_dlopen], [0],
3174          [Whether dlopen is supported])
3175 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3176          [Whether dlopen of programs is supported])
3177 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3178          [Whether dlopen of statically linked programs is supported])
3179 ])# LT_SYS_DLOPEN_SELF
3180
3181 # Old name:
3182 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3183 dnl aclocal-1.4 backwards compatibility:
3184 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3185
3186
3187 # _LT_COMPILER_C_O([TAGNAME])
3188 # ---------------------------
3189 # Check to see if options -c and -o are simultaneously supported by compiler.
3190 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3191 m4_defun([_LT_COMPILER_C_O],
3192 [m4_require([_LT_DECL_SED])dnl
3193 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3194 m4_require([_LT_TAG_COMPILER])dnl
3195 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3196   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3197   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3198    $RM -r conftest 2>/dev/null
3199    mkdir conftest
3200    cd conftest
3201    mkdir out
3202    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3203
3204    lt_compiler_flag="-o out/conftest2.$ac_objext"
3205    # Insert the option either (1) after the last *FLAGS variable, or
3206    # (2) before a word containing "conftest.", or (3) at the end.
3207    # Note that $ac_compile itself does not contain backslashes and begins
3208    # with a dollar sign (not a hyphen), so the echo should work correctly.
3209    lt_compile=`echo "$ac_compile" | $SED \
3210    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3211    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3212    -e 's:$: $lt_compiler_flag:'`
3213    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3214    (eval "$lt_compile" 2>out/conftest.err)
3215    ac_status=$?
3216    cat out/conftest.err >&AS_MESSAGE_LOG_FD
3217    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3218    if (exit $ac_status) && test -s out/conftest2.$ac_objext
3219    then
3220      # The compiler can only warn and ignore the option if not recognized
3221      # So say no if there are warnings
3222      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
3223      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3224      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3225        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3226      fi
3227    fi
3228    chmod u+w . 2>&AS_MESSAGE_LOG_FD
3229    $RM conftest*
3230    # SGI C++ compiler will create directory out/ii_files/ for
3231    # template instantiation
3232    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3233    $RM out/* && rmdir out
3234    cd ..
3235    $RM -r conftest
3236    $RM conftest*
3237 ])
3238 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3239         [Does compiler simultaneously support -c and -o options?])
3240 ])# _LT_COMPILER_C_O
3241
3242
3243 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3244 # ----------------------------------
3245 # Check to see if we can do hard links to lock some files if needed
3246 m4_defun([_LT_COMPILER_FILE_LOCKS],
3247 [m4_require([_LT_ENABLE_LOCK])dnl
3248 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3249 _LT_COMPILER_C_O([$1])
3250
3251 hard_links="nottested"
3252 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3253   # do not overwrite the value of need_locks provided by the user
3254   AC_MSG_CHECKING([if we can lock with hard links])
3255   hard_links=yes
3256   $RM conftest*
3257   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3258   touch conftest.a
3259   ln conftest.a conftest.b 2>&5 || hard_links=no
3260   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3261   AC_MSG_RESULT([$hard_links])
3262   if test "$hard_links" = no; then
3263     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3264     need_locks=warn
3265   fi
3266 else
3267   need_locks=no
3268 fi
3269 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3270 ])# _LT_COMPILER_FILE_LOCKS
3271
3272
3273 # _LT_CHECK_OBJDIR
3274 # ----------------
3275 m4_defun([_LT_CHECK_OBJDIR],
3276 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3277 [rm -f .libs 2>/dev/null
3278 mkdir .libs 2>/dev/null
3279 if test -d .libs; then
3280   lt_cv_objdir=.libs
3281 else
3282   # MS-DOS does not allow filenames that begin with a dot.
3283   lt_cv_objdir=_libs
3284 fi
3285 rmdir .libs 2>/dev/null])
3286 objdir=$lt_cv_objdir
3287 _LT_DECL([], [objdir], [0],
3288          [The name of the directory that contains temporary libtool files])dnl
3289 m4_pattern_allow([LT_OBJDIR])dnl
3290 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3291   [Define to the sub-directory in which libtool stores uninstalled libraries.])
3292 ])# _LT_CHECK_OBJDIR
3293
3294
3295 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3296 # --------------------------------------
3297 # Check hardcoding attributes.
3298 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3299 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3300 _LT_TAGVAR(hardcode_action, $1)=
3301 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3302    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3303    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3304
3305   # We can hardcode non-existent directories.
3306   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3307      # If the only mechanism to avoid hardcoding is shlibpath_var, we
3308      # have to relink, otherwise we might link with an installed library
3309      # when we should be linking with a yet-to-be-installed one
3310      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3311      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3312     # Linking always hardcodes the temporary library directory.
3313     _LT_TAGVAR(hardcode_action, $1)=relink
3314   else
3315     # We can link without hardcoding, and we can hardcode nonexisting dirs.
3316     _LT_TAGVAR(hardcode_action, $1)=immediate
3317   fi
3318 else
3319   # We cannot hardcode anything, or else we can only hardcode existing
3320   # directories.
3321   _LT_TAGVAR(hardcode_action, $1)=unsupported
3322 fi
3323 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3324
3325 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3326    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3327   # Fast installation is not supported
3328   enable_fast_install=no
3329 elif test "$shlibpath_overrides_runpath" = yes ||
3330      test "$enable_shared" = no; then
3331   # Fast installation is not necessary
3332   enable_fast_install=needless
3333 fi
3334 _LT_TAGDECL([], [hardcode_action], [0],
3335     [How to hardcode a shared library path into an executable])
3336 ])# _LT_LINKER_HARDCODE_LIBPATH
3337
3338
3339 # _LT_CMD_STRIPLIB
3340 # ----------------
3341 m4_defun([_LT_CMD_STRIPLIB],
3342 [m4_require([_LT_DECL_EGREP])
3343 striplib=
3344 old_striplib=
3345 AC_MSG_CHECKING([whether stripping libraries is possible])
3346 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3347   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3348   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3349   AC_MSG_RESULT([yes])
3350 else
3351 # FIXME - insert some real tests, host_os isn't really good enough
3352   case $host_os in
3353   darwin*)
3354     if test -n "$STRIP" ; then
3355       striplib="$STRIP -x"
3356       old_striplib="$STRIP -S"
3357       AC_MSG_RESULT([yes])
3358     else
3359       AC_MSG_RESULT([no])
3360     fi
3361     ;;
3362   *)
3363     AC_MSG_RESULT([no])
3364     ;;
3365   esac
3366 fi
3367 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3368 _LT_DECL([], [striplib], [1])
3369 ])# _LT_CMD_STRIPLIB
3370
3371
3372 # _LT_SYS_DYNAMIC_LINKER([TAG])
3373 # -----------------------------
3374 # PORTME Fill in your ld.so characteristics
3375 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3376 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3377 m4_require([_LT_DECL_EGREP])dnl
3378 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3379 m4_require([_LT_DECL_OBJDUMP])dnl
3380 m4_require([_LT_DECL_SED])dnl
3381 AC_MSG_CHECKING([dynamic linker characteristics])
3382 m4_if([$1],
3383         [], [
3384 if test "$GCC" = yes; then
3385   case $host_os in
3386     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3387     *) lt_awk_arg="/^libraries:/" ;;
3388   esac
3389   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3390   if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
3391     # if the path contains ";" then we assume it to be the separator
3392     # otherwise default to the standard path separator (i.e. ":") - it is
3393     # assumed that no part of a normal pathname contains ";" but that should
3394     # okay in the real world where ";" in dirpaths is itself problematic.
3395     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
3396   else
3397     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3398   fi
3399   # Ok, now we have the path, separated by spaces, we can step through it
3400   # and add multilib dir if necessary.
3401   lt_tmp_lt_search_path_spec=
3402   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3403   for lt_sys_path in $lt_search_path_spec; do
3404     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3405       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3406     else
3407       test -d "$lt_sys_path" && \
3408         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3409     fi
3410   done
3411   lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
3412 BEGIN {RS=" "; FS="/|\n";} {
3413   lt_foo="";
3414   lt_count=0;
3415   for (lt_i = NF; lt_i > 0; lt_i--) {
3416     if ($lt_i != "" && $lt_i != ".") {
3417       if ($lt_i == "..") {
3418         lt_count++;
3419       } else {
3420         if (lt_count == 0) {
3421           lt_foo="/" $lt_i lt_foo;
3422         } else {
3423           lt_count--;
3424         }
3425       }
3426     }
3427   }
3428   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3429   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3430 }'`
3431   sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
3432 else
3433   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3434 fi])
3435 library_names_spec=
3436 libname_spec='lib$name'
3437 soname_spec=
3438 shrext_cmds=".so"
3439 postinstall_cmds=
3440 postuninstall_cmds=
3441 finish_cmds=
3442 finish_eval=
3443 shlibpath_var=
3444 shlibpath_overrides_runpath=unknown
3445 version_type=none
3446 dynamic_linker="$host_os ld.so"
3447 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3448 need_lib_prefix=unknown
3449 hardcode_into_libs=no
3450
3451 # when you set need_version to no, make sure it does not cause -set_version
3452 # flags to be left without arguments
3453 need_version=unknown
3454
3455 case $host_os in
3456 aix3*)
3457   version_type=linux
3458   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3459   shlibpath_var=LIBPATH
3460
3461   # AIX 3 has no versioning support, so we append a major version to the name.
3462   soname_spec='${libname}${release}${shared_ext}$major'
3463   ;;
3464
3465 aix[[4-9]]*)
3466   version_type=linux
3467   need_lib_prefix=no
3468   need_version=no
3469   hardcode_into_libs=yes
3470   if test "$host_cpu" = ia64; then
3471     # AIX 5 supports IA64
3472     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3473     shlibpath_var=LD_LIBRARY_PATH
3474   else
3475     # With GCC up to 2.95.x, collect2 would create an import file
3476     # for dependence libraries.  The import file would start with
3477     # the line `#! .'.  This would cause the generated library to
3478     # depend on `.', always an invalid library.  This was fixed in
3479     # development snapshots of GCC prior to 3.0.
3480     case $host_os in
3481       aix4 | aix4.[[01]] | aix4.[[01]].*)
3482       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3483            echo ' yes '
3484            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3485         :
3486       else
3487         can_build_shared=no
3488       fi
3489       ;;
3490     esac
3491     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3492     # soname into executable. Probably we can add versioning support to
3493     # collect2, so additional links can be useful in future.
3494     if test "$aix_use_runtimelinking" = yes; then
3495       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3496       # instead of lib<name>.a to let people know that these are not
3497       # typical AIX shared libraries.
3498       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3499     else
3500       # We preserve .a as extension for shared libraries through AIX4.2
3501       # and later when we are not doing run time linking.
3502       library_names_spec='${libname}${release}.a $libname.a'
3503       soname_spec='${libname}${release}${shared_ext}$major'
3504     fi
3505     shlibpath_var=LIBPATH
3506   fi
3507   ;;
3508
3509 amigaos*)
3510   case $host_cpu in
3511   powerpc)
3512     # Since July 2007 AmigaOS4 officially supports .so libraries.
3513     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3514     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3515     ;;
3516   m68k)
3517     library_names_spec='$libname.ixlibrary $libname.a'
3518     # Create ${libname}_ixlibrary.a entries in /sys/libs.
3519     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'
3520     ;;
3521   esac
3522   ;;
3523
3524 beos*)
3525   library_names_spec='${libname}${shared_ext}'
3526   dynamic_linker="$host_os ld.so"
3527   shlibpath_var=LIBRARY_PATH
3528   ;;
3529
3530 bsdi[[45]]*)
3531   version_type=linux
3532   need_version=no
3533   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3534   soname_spec='${libname}${release}${shared_ext}$major'
3535   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3536   shlibpath_var=LD_LIBRARY_PATH
3537   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3538   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3539   # the default ld.so.conf also contains /usr/contrib/lib and
3540   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3541   # libtool to hard-code these into programs
3542   ;;
3543
3544 cygwin* | mingw* | pw32* | cegcc*)
3545   version_type=windows
3546   shrext_cmds=".dll"
3547   need_version=no
3548   need_lib_prefix=no
3549
3550   case $GCC,$host_os in
3551   yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
3552     library_names_spec='$libname.dll.a'
3553     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3554     postinstall_cmds='base_file=`basename \${file}`~
3555       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3556       dldir=$destdir/`dirname \$dlpath`~
3557       test -d \$dldir || mkdir -p \$dldir~
3558       $install_prog $dir/$dlname \$dldir/$dlname~
3559       chmod a+x \$dldir/$dlname~
3560       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3561         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3562       fi'
3563     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3564       dlpath=$dir/\$dldll~
3565        $RM \$dlpath'
3566     shlibpath_overrides_runpath=yes
3567
3568     case $host_os in
3569     cygwin*)
3570       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3571       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3572       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3573       ;;
3574     mingw* | cegcc*)
3575       # MinGW DLLs use traditional 'lib' prefix
3576       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3577       sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3578       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3579         # It is most probably a Windows format PATH printed by
3580         # mingw gcc, but we are running on Cygwin. Gcc prints its search
3581         # path with ; separators, and with drive letters. We can handle the
3582         # drive letters (cygwin fileutils understands them), so leave them,
3583         # especially as we might pass files found there to a mingw objdump,
3584         # which wouldn't understand a cygwinified path. Ahh.
3585         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3586       else
3587         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3588       fi
3589       ;;
3590     pw32*)
3591       # pw32 DLLs use 'pw' prefix rather than 'lib'
3592       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3593       ;;
3594     esac
3595     ;;
3596
3597   *)
3598     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3599     ;;
3600   esac
3601   dynamic_linker='Win32 ld.exe'
3602   # FIXME: first we should search . and the directory the executable is in
3603   shlibpath_var=PATH
3604   ;;
3605
3606 darwin* | rhapsody*)
3607   dynamic_linker="$host_os dyld"
3608   version_type=darwin
3609   need_lib_prefix=no
3610   need_version=no
3611   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3612   soname_spec='${libname}${release}${major}$shared_ext'
3613   shlibpath_overrides_runpath=yes
3614   shlibpath_var=DYLD_LIBRARY_PATH
3615   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3616 m4_if([$1], [],[
3617   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3618   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3619   ;;
3620
3621 dgux*)
3622   version_type=linux
3623   need_lib_prefix=no
3624   need_version=no
3625   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3626   soname_spec='${libname}${release}${shared_ext}$major'
3627   shlibpath_var=LD_LIBRARY_PATH
3628   ;;
3629
3630 freebsd1*)
3631   dynamic_linker=no
3632   ;;
3633
3634 freebsd* | dragonfly*)
3635   # DragonFly does not have aout.  When/if they implement a new
3636   # versioning mechanism, adjust this.
3637   if test -x /usr/bin/objformat; then
3638     objformat=`/usr/bin/objformat`
3639   else
3640     case $host_os in
3641     freebsd[[123]]*) objformat=aout ;;
3642     *) objformat=elf ;;
3643     esac
3644   fi
3645   version_type=freebsd-$objformat
3646   case $version_type in
3647     freebsd-elf*)
3648       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3649       need_version=no
3650       need_lib_prefix=no
3651       ;;
3652     freebsd-*)
3653       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3654       need_version=yes
3655       ;;
3656   esac
3657   shlibpath_var=LD_LIBRARY_PATH
3658   case $host_os in
3659   freebsd2*)
3660     shlibpath_overrides_runpath=yes
3661     ;;
3662   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3663     shlibpath_overrides_runpath=yes
3664     hardcode_into_libs=yes
3665     ;;
3666   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3667   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3668     shlibpath_overrides_runpath=no
3669     hardcode_into_libs=yes
3670     ;;
3671   *) # from 4.6 on, and DragonFly
3672     shlibpath_overrides_runpath=yes
3673     hardcode_into_libs=yes
3674     ;;
3675   esac
3676   ;;
3677
3678 gnu*)
3679   version_type=linux
3680   need_lib_prefix=no
3681   need_version=no
3682   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3683   soname_spec='${libname}${release}${shared_ext}$major'
3684   shlibpath_var=LD_LIBRARY_PATH
3685   hardcode_into_libs=yes
3686   ;;
3687
3688 hpux9* | hpux10* | hpux11*)
3689   # Give a soname corresponding to the major version so that dld.sl refuses to
3690   # link against other versions.
3691   version_type=sunos
3692   need_lib_prefix=no
3693   need_version=no
3694   case $host_cpu in
3695   ia64*)
3696     shrext_cmds='.so'
3697     hardcode_into_libs=yes
3698     dynamic_linker="$host_os dld.so"
3699     shlibpath_var=LD_LIBRARY_PATH
3700     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3701     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3702     soname_spec='${libname}${release}${shared_ext}$major'
3703     if test "X$HPUX_IA64_MODE" = X32; then
3704       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3705     else
3706       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3707     fi
3708     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3709     ;;
3710   hppa*64*)
3711     shrext_cmds='.sl'
3712     hardcode_into_libs=yes
3713     dynamic_linker="$host_os dld.sl"
3714     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3715     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3716     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3717     soname_spec='${libname}${release}${shared_ext}$major'
3718     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3719     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3720     ;;
3721   *)
3722     shrext_cmds='.sl'
3723     dynamic_linker="$host_os dld.sl"
3724     shlibpath_var=SHLIB_PATH
3725     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3726     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3727     soname_spec='${libname}${release}${shared_ext}$major'
3728     ;;
3729   esac
3730   # HP-UX runs *really* slowly unless shared libraries are mode 555.
3731   postinstall_cmds='chmod 555 $lib'
3732   ;;
3733
3734 interix[[3-9]]*)
3735   version_type=linux
3736   need_lib_prefix=no
3737   need_version=no
3738   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3739   soname_spec='${libname}${release}${shared_ext}$major'
3740   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3741   shlibpath_var=LD_LIBRARY_PATH
3742   shlibpath_overrides_runpath=no
3743   hardcode_into_libs=yes
3744   ;;
3745
3746 irix5* | irix6* | nonstopux*)
3747   case $host_os in
3748     nonstopux*) version_type=nonstopux ;;
3749     *)
3750         if test "$lt_cv_prog_gnu_ld" = yes; then
3751                 version_type=linux
3752         else
3753                 version_type=irix
3754         fi ;;
3755   esac
3756   need_lib_prefix=no
3757   need_version=no
3758   soname_spec='${libname}${release}${shared_ext}$major'
3759   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3760   case $host_os in
3761   irix5* | nonstopux*)
3762     libsuff= shlibsuff=
3763     ;;
3764   *)
3765     case $LD in # libtool.m4 will add one of these switches to LD
3766     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3767       libsuff= shlibsuff= libmagic=32-bit;;
3768     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3769       libsuff=32 shlibsuff=N32 libmagic=N32;;
3770     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3771       libsuff=64 shlibsuff=64 libmagic=64-bit;;
3772     *) libsuff= shlibsuff= libmagic=never-match;;
3773     esac
3774     ;;
3775   esac
3776   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3777   shlibpath_overrides_runpath=no
3778   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3779   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3780   hardcode_into_libs=yes
3781   ;;
3782
3783 # No shared lib support for Linux oldld, aout, or coff.
3784 linux*oldld* | linux*aout* | linux*coff*)
3785   dynamic_linker=no
3786   ;;
3787
3788 # This must be Linux ELF.
3789 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3790   version_type=linux
3791   need_lib_prefix=no
3792   need_version=no
3793   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3794   soname_spec='${libname}${release}${shared_ext}$major'
3795   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3796   shlibpath_var=LD_LIBRARY_PATH
3797   shlibpath_overrides_runpath=no
3798   # Some binutils ld are patched to set DT_RUNPATH
3799   save_LDFLAGS=$LDFLAGS
3800   save_libdir=$libdir
3801   eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3802        LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3803   AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3804     [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3805        [shlibpath_overrides_runpath=yes])])
3806   LDFLAGS=$save_LDFLAGS
3807   libdir=$save_libdir
3808
3809   # This implies no fast_install, which is unacceptable.
3810   # Some rework will be needed to allow for fast_install
3811   # before this can be enabled.
3812   hardcode_into_libs=yes
3813
3814   # Append ld.so.conf contents to the search path
3815   if test -f /etc/ld.so.conf; then
3816     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
3817     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3818   fi
3819
3820   # We used to test for /lib/ld.so.1 and disable shared libraries on
3821   # powerpc, because MkLinux only supported shared libraries with the
3822   # GNU dynamic linker.  Since this was broken with cross compilers,
3823   # most powerpc-linux boxes support dynamic linking these days and
3824   # people can always --disable-shared, the test was removed, and we
3825   # assume the GNU/Linux dynamic linker is in use.
3826   dynamic_linker='GNU/Linux ld.so'
3827   ;;
3828
3829 netbsdelf*-gnu)
3830   version_type=linux
3831   need_lib_prefix=no
3832   need_version=no
3833   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3834   soname_spec='${libname}${release}${shared_ext}$major'
3835   shlibpath_var=LD_LIBRARY_PATH
3836   shlibpath_overrides_runpath=no
3837   hardcode_into_libs=yes
3838   dynamic_linker='NetBSD ld.elf_so'
3839   ;;
3840
3841 netbsd*)
3842   version_type=sunos
3843   need_lib_prefix=no
3844   need_version=no
3845   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3846     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3847     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3848     dynamic_linker='NetBSD (a.out) ld.so'
3849   else
3850     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3851     soname_spec='${libname}${release}${shared_ext}$major'
3852     dynamic_linker='NetBSD ld.elf_so'
3853   fi
3854   shlibpath_var=LD_LIBRARY_PATH
3855   shlibpath_overrides_runpath=yes
3856   hardcode_into_libs=yes
3857   ;;
3858
3859 newsos6)
3860   version_type=linux
3861   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3862   shlibpath_var=LD_LIBRARY_PATH
3863   shlibpath_overrides_runpath=yes
3864   ;;
3865
3866 *nto* | *qnx*)
3867   version_type=qnx
3868   need_lib_prefix=no
3869   need_version=no
3870   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3871   soname_spec='${libname}${release}${shared_ext}$major'
3872   shlibpath_var=LD_LIBRARY_PATH
3873   shlibpath_overrides_runpath=no
3874   hardcode_into_libs=yes
3875   dynamic_linker='ldqnx.so'
3876   ;;
3877
3878 openbsd*)
3879   version_type=sunos
3880   sys_lib_dlsearch_path_spec="/usr/lib"
3881   need_lib_prefix=no
3882   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3883   case $host_os in
3884     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
3885     *)                          need_version=no  ;;
3886   esac
3887   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3888   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3889   shlibpath_var=LD_LIBRARY_PATH
3890   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3891     case $host_os in
3892       openbsd2.[[89]] | openbsd2.[[89]].*)
3893         shlibpath_overrides_runpath=no
3894         ;;
3895       *)
3896         shlibpath_overrides_runpath=yes
3897         ;;
3898       esac
3899   else
3900     shlibpath_overrides_runpath=yes
3901   fi
3902   ;;
3903
3904 os2*)
3905   libname_spec='$name'
3906   shrext_cmds=".dll"
3907   need_lib_prefix=no
3908   library_names_spec='$libname${shared_ext} $libname.a'
3909   dynamic_linker='OS/2 ld.exe'
3910   shlibpath_var=LIBPATH
3911   ;;
3912
3913 osf3* | osf4* | osf5*)
3914   version_type=osf
3915   need_lib_prefix=no
3916   need_version=no
3917   soname_spec='${libname}${release}${shared_ext}$major'
3918   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3919   shlibpath_var=LD_LIBRARY_PATH
3920   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3921   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3922   ;;
3923
3924 rdos*)
3925   dynamic_linker=no
3926   ;;
3927
3928 solaris*)
3929   version_type=linux
3930   need_lib_prefix=no
3931   need_version=no
3932   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3933   soname_spec='${libname}${release}${shared_ext}$major'
3934   shlibpath_var=LD_LIBRARY_PATH
3935   shlibpath_overrides_runpath=yes
3936   hardcode_into_libs=yes
3937   # ldd complains unless libraries are executable
3938   postinstall_cmds='chmod +x $lib'
3939   ;;
3940
3941 sunos4*)
3942   version_type=sunos
3943   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3944   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3945   shlibpath_var=LD_LIBRARY_PATH
3946   shlibpath_overrides_runpath=yes
3947   if test "$with_gnu_ld" = yes; then
3948     need_lib_prefix=no
3949   fi
3950   need_version=yes
3951   ;;
3952
3953 sysv4 | sysv4.3*)
3954   version_type=linux
3955   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3956   soname_spec='${libname}${release}${shared_ext}$major'
3957   shlibpath_var=LD_LIBRARY_PATH
3958   case $host_vendor in
3959     sni)
3960       shlibpath_overrides_runpath=no
3961       need_lib_prefix=no
3962       runpath_var=LD_RUN_PATH
3963       ;;
3964     siemens)
3965       need_lib_prefix=no
3966       ;;
3967     motorola)
3968       need_lib_prefix=no
3969       need_version=no
3970       shlibpath_overrides_runpath=no
3971       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3972       ;;
3973   esac
3974   ;;
3975
3976 sysv4*MP*)
3977   if test -d /usr/nec ;then
3978     version_type=linux
3979     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3980     soname_spec='$libname${shared_ext}.$major'
3981     shlibpath_var=LD_LIBRARY_PATH
3982   fi
3983   ;;
3984
3985 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3986   version_type=freebsd-elf
3987   need_lib_prefix=no
3988   need_version=no
3989   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3990   soname_spec='${libname}${release}${shared_ext}$major'
3991   shlibpath_var=LD_LIBRARY_PATH
3992   shlibpath_overrides_runpath=yes
3993   hardcode_into_libs=yes
3994   if test "$with_gnu_ld" = yes; then
3995     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3996   else
3997     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3998     case $host_os in
3999       sco3.2v5*)
4000         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4001         ;;
4002     esac
4003   fi
4004   sys_lib_dlsearch_path_spec='/usr/lib'
4005   ;;
4006
4007 tpf*)
4008   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
4009   version_type=linux
4010   need_lib_prefix=no
4011   need_version=no
4012   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4013   shlibpath_var=LD_LIBRARY_PATH
4014   shlibpath_overrides_runpath=no
4015   hardcode_into_libs=yes
4016   ;;
4017
4018 uts4*)
4019   version_type=linux
4020   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4021   soname_spec='${libname}${release}${shared_ext}$major'
4022   shlibpath_var=LD_LIBRARY_PATH
4023   ;;
4024
4025 *)
4026   dynamic_linker=no
4027   ;;
4028 esac
4029 AC_MSG_RESULT([$dynamic_linker])
4030 test "$dynamic_linker" = no && can_build_shared=no
4031
4032 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4033 if test "$GCC" = yes; then
4034   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4035 fi
4036
4037 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4038   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4039 fi
4040 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4041   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4042 fi
4043
4044 _LT_DECL([], [variables_saved_for_relink], [1],
4045     [Variables whose values should be saved in libtool wrapper scripts and
4046     restored at link time])
4047 _LT_DECL([], [need_lib_prefix], [0],
4048     [Do we need the "lib" prefix for modules?])
4049 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4050 _LT_DECL([], [version_type], [0], [Library versioning type])
4051 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
4052 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4053 _LT_DECL([], [shlibpath_overrides_runpath], [0],
4054     [Is shlibpath searched before the hard-coded library search path?])
4055 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4056 _LT_DECL([], [library_names_spec], [1],
4057     [[List of archive names.  First name is the real one, the rest are links.
4058     The last name is the one that the linker finds with -lNAME]])
4059 _LT_DECL([], [soname_spec], [1],
4060     [[The coded name of the library, if different from the real name]])
4061 _LT_DECL([], [postinstall_cmds], [2],
4062     [Command to use after installation of a shared archive])
4063 _LT_DECL([], [postuninstall_cmds], [2],
4064     [Command to use after uninstallation of a shared archive])
4065 _LT_DECL([], [finish_cmds], [2],
4066     [Commands used to finish a libtool library installation in a directory])
4067 _LT_DECL([], [finish_eval], [1],
4068     [[As "finish_cmds", except a single script fragment to be evaled but
4069     not shown]])
4070 _LT_DECL([], [hardcode_into_libs], [0],
4071     [Whether we should hardcode library paths into libraries])
4072 _LT_DECL([], [sys_lib_search_path_spec], [2],
4073     [Compile-time system search path for libraries])
4074 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4075     [Run-time system search path for libraries])
4076 ])# _LT_SYS_DYNAMIC_LINKER
4077
4078
4079 # _LT_PATH_TOOL_PREFIX(TOOL)
4080 # --------------------------
4081 # find a file program which can recognize shared library
4082 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4083 [m4_require([_LT_DECL_EGREP])dnl
4084 AC_MSG_CHECKING([for $1])
4085 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4086 [case $MAGIC_CMD in
4087 [[\\/*] |  ?:[\\/]*])
4088   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4089   ;;
4090 *)
4091   lt_save_MAGIC_CMD="$MAGIC_CMD"
4092   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4093 dnl $ac_dummy forces splitting on constant user-supplied paths.
4094 dnl POSIX.2 word splitting is done only on the output of word expansions,
4095 dnl not every word.  This closes a longstanding sh security hole.
4096   ac_dummy="m4_if([$2], , $PATH, [$2])"
4097   for ac_dir in $ac_dummy; do
4098     IFS="$lt_save_ifs"
4099     test -z "$ac_dir" && ac_dir=.
4100     if test -f $ac_dir/$1; then
4101       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4102       if test -n "$file_magic_test_file"; then
4103         case $deplibs_check_method in
4104         "file_magic "*)
4105           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4106           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4107           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4108             $EGREP "$file_magic_regex" > /dev/null; then
4109             :
4110           else
4111             cat <<_LT_EOF 1>&2
4112
4113 *** Warning: the command libtool uses to detect shared libraries,
4114 *** $file_magic_cmd, produces output that libtool cannot recognize.
4115 *** The result is that libtool may fail to recognize shared libraries
4116 *** as such.  This will affect the creation of libtool libraries that
4117 *** depend on shared libraries, but programs linked with such libtool
4118 *** libraries will work regardless of this problem.  Nevertheless, you
4119 *** may want to report the problem to your system manager and/or to
4120 *** bug-libtool@gnu.org
4121
4122 _LT_EOF
4123           fi ;;
4124         esac
4125       fi
4126       break
4127     fi
4128   done
4129   IFS="$lt_save_ifs"
4130   MAGIC_CMD="$lt_save_MAGIC_CMD"
4131   ;;
4132 esac])
4133 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4134 if test -n "$MAGIC_CMD"; then
4135   AC_MSG_RESULT($MAGIC_CMD)
4136 else
4137   AC_MSG_RESULT(no)
4138 fi
4139 _LT_DECL([], [MAGIC_CMD], [0],
4140          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4141 ])# _LT_PATH_TOOL_PREFIX
4142
4143 # Old name:
4144 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4145 dnl aclocal-1.4 backwards compatibility:
4146 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4147
4148
4149 # _LT_PATH_MAGIC
4150 # --------------
4151 # find a file program which can recognize a shared library
4152 m4_defun([_LT_PATH_MAGIC],
4153 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4154 if test -z "$lt_cv_path_MAGIC_CMD"; then
4155   if test -n "$ac_tool_prefix"; then
4156     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4157   else
4158     MAGIC_CMD=:
4159   fi
4160 fi
4161 ])# _LT_PATH_MAGIC
4162
4163
4164 # LT_PATH_LD
4165 # ----------
4166 # find the pathname to the GNU or non-GNU linker
4167 AC_DEFUN([LT_PATH_LD],
4168 [AC_REQUIRE([AC_PROG_CC])dnl
4169 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4170 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4171 m4_require([_LT_DECL_SED])dnl
4172 m4_require([_LT_DECL_EGREP])dnl
4173
4174 AC_ARG_WITH([gnu-ld],
4175     [AS_HELP_STRING([--with-gnu-ld],
4176         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4177     [test "$withval" = no || with_gnu_ld=yes],
4178     [with_gnu_ld=no])dnl
4179
4180 ac_prog=ld
4181 if test "$GCC" = yes; then
4182   # Check if gcc -print-prog-name=ld gives a path.
4183   AC_MSG_CHECKING([for ld used by $CC])
4184   case $host in
4185   *-*-mingw*)
4186     # gcc leaves a trailing carriage return which upsets mingw
4187     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4188   *)
4189     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4190   esac
4191   case $ac_prog in
4192     # Accept absolute paths.
4193     [[\\/]]* | ?:[[\\/]]*)
4194       re_direlt='/[[^/]][[^/]]*/\.\./'
4195       # Canonicalize the pathname of ld
4196       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4197       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4198         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4199       done
4200       test -z "$LD" && LD="$ac_prog"
4201       ;;
4202   "")
4203     # If it fails, then pretend we aren't using GCC.
4204     ac_prog=ld
4205     ;;
4206   *)
4207     # If it is relative, then search for the first ld in PATH.
4208     with_gnu_ld=unknown
4209     ;;
4210   esac
4211 elif test "$with_gnu_ld" = yes; then
4212   AC_MSG_CHECKING([for GNU ld])
4213 else
4214   AC_MSG_CHECKING([for non-GNU ld])
4215 fi
4216 AC_CACHE_VAL(lt_cv_path_LD,
4217 [if test -z "$LD"; then
4218   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4219   for ac_dir in $PATH; do
4220     IFS="$lt_save_ifs"
4221     test -z "$ac_dir" && ac_dir=.
4222     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4223       lt_cv_path_LD="$ac_dir/$ac_prog"
4224       # Check to see if the program is GNU ld.  I'd rather use --version,
4225       # but apparently some variants of GNU ld only accept -v.
4226       # Break only if it was the GNU/non-GNU ld that we prefer.
4227       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4228       *GNU* | *'with BFD'*)
4229         test "$with_gnu_ld" != no && break
4230         ;;
4231       *)
4232         test "$with_gnu_ld" != yes && break
4233         ;;
4234       esac
4235     fi
4236   done
4237   IFS="$lt_save_ifs"
4238 else
4239   lt_cv_path_LD="$LD" # Let the user override the test with a path.
4240 fi])
4241 LD="$lt_cv_path_LD"
4242 if test -n "$LD"; then
4243   AC_MSG_RESULT($LD)
4244 else
4245   AC_MSG_RESULT(no)
4246 fi
4247 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4248 _LT_PATH_LD_GNU
4249 AC_SUBST([LD])
4250
4251 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4252 ])# LT_PATH_LD
4253
4254 # Old names:
4255 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4256 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4257 dnl aclocal-1.4 backwards compatibility:
4258 dnl AC_DEFUN([AM_PROG_LD], [])
4259 dnl AC_DEFUN([AC_PROG_LD], [])
4260
4261
4262 # _LT_PATH_LD_GNU
4263 #- --------------
4264 m4_defun([_LT_PATH_LD_GNU],
4265 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4266 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4267 case `$LD -v 2>&1 </dev/null` in
4268 *GNU* | *'with BFD'*)
4269   lt_cv_prog_gnu_ld=yes
4270   ;;
4271 *)
4272   lt_cv_prog_gnu_ld=no
4273   ;;
4274 esac])
4275 with_gnu_ld=$lt_cv_prog_gnu_ld
4276 ])# _LT_PATH_LD_GNU
4277
4278
4279 # _LT_CMD_RELOAD
4280 # --------------
4281 # find reload flag for linker
4282 #   -- PORTME Some linkers may need a different reload flag.
4283 m4_defun([_LT_CMD_RELOAD],
4284 [AC_CACHE_CHECK([for $LD option to reload object files],
4285   lt_cv_ld_reload_flag,
4286   [lt_cv_ld_reload_flag='-r'])
4287 reload_flag=$lt_cv_ld_reload_flag
4288 case $reload_flag in
4289 "" | " "*) ;;
4290 *) reload_flag=" $reload_flag" ;;
4291 esac
4292 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4293 case $host_os in
4294   darwin*)
4295     if test "$GCC" = yes; then
4296       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4297     else
4298       reload_cmds='$LD$reload_flag -o $output$reload_objs'
4299     fi
4300     ;;
4301 esac
4302 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4303 _LT_DECL([], [reload_cmds], [2])dnl
4304 ])# _LT_CMD_RELOAD
4305
4306
4307 # _LT_CHECK_MAGIC_METHOD
4308 # ----------------------
4309 # how to check for library dependencies
4310 #  -- PORTME fill in with the dynamic library characteristics
4311 m4_defun([_LT_CHECK_MAGIC_METHOD],
4312 [m4_require([_LT_DECL_EGREP])
4313 m4_require([_LT_DECL_OBJDUMP])
4314 AC_CACHE_CHECK([how to recognize dependent libraries],
4315 lt_cv_deplibs_check_method,
4316 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4317 lt_cv_file_magic_test_file=
4318 lt_cv_deplibs_check_method='unknown'
4319 # Need to set the preceding variable on all platforms that support
4320 # interlibrary dependencies.
4321 # 'none' -- dependencies not supported.
4322 # `unknown' -- same as none, but documents that we really don't know.
4323 # 'pass_all' -- all dependencies passed with no checks.
4324 # 'test_compile' -- check by making test program.
4325 # 'file_magic [[regex]]' -- check by looking for files in library path
4326 # which responds to the $file_magic_cmd with a given extended regex.
4327 # If you have `file' or equivalent on your system and you're not sure
4328 # whether `pass_all' will *always* work, you probably want this one.
4329
4330 case $host_os in
4331 aix[[4-9]]*)
4332   lt_cv_deplibs_check_method=pass_all
4333   ;;
4334
4335 beos*)
4336   lt_cv_deplibs_check_method=pass_all
4337   ;;
4338
4339 bsdi[[45]]*)
4340   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4341   lt_cv_file_magic_cmd='/usr/bin/file -L'
4342   lt_cv_file_magic_test_file=/shlib/libc.so
4343   ;;
4344
4345 cygwin*)
4346   # func_win32_libid is a shell function defined in ltmain.sh
4347   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4348   lt_cv_file_magic_cmd='func_win32_libid'
4349   ;;
4350
4351 mingw* | pw32*)
4352   # Base MSYS/MinGW do not provide the 'file' command needed by
4353   # func_win32_libid shell function, so use a weaker test based on 'objdump',
4354   # unless we find 'file', for example because we are cross-compiling.
4355   if ( file / ) >/dev/null 2>&1; then
4356     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4357     lt_cv_file_magic_cmd='func_win32_libid'
4358   else
4359     lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4360     lt_cv_file_magic_cmd='$OBJDUMP -f'
4361   fi
4362   ;;
4363
4364 cegcc)
4365   # use the weaker test based on 'objdump'. See mingw*.
4366   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4367   lt_cv_file_magic_cmd='$OBJDUMP -f'
4368   ;;
4369
4370 darwin* | rhapsody*)
4371   lt_cv_deplibs_check_method=pass_all
4372   ;;
4373
4374 freebsd* | dragonfly*)
4375   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4376     case $host_cpu in
4377     i*86 )
4378       # Not sure whether the presence of OpenBSD here was a mistake.
4379       # Let's accept both of them until this is cleared up.
4380       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4381       lt_cv_file_magic_cmd=/usr/bin/file
4382       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4383       ;;
4384     esac
4385   else
4386     lt_cv_deplibs_check_method=pass_all
4387   fi
4388   ;;
4389
4390 gnu*)
4391   lt_cv_deplibs_check_method=pass_all
4392   ;;
4393
4394 hpux10.20* | hpux11*)
4395   lt_cv_file_magic_cmd=/usr/bin/file
4396   case $host_cpu in
4397   ia64*)
4398     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4399     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4400     ;;
4401   hppa*64*)
4402     [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]']
4403     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4404     ;;
4405   *)
4406     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4407     lt_cv_file_magic_test_file=/usr/lib/libc.sl
4408     ;;
4409   esac
4410   ;;
4411
4412 interix[[3-9]]*)
4413   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4414   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4415   ;;
4416
4417 irix5* | irix6* | nonstopux*)
4418   case $LD in
4419   *-32|*"-32 ") libmagic=32-bit;;
4420   *-n32|*"-n32 ") libmagic=N32;;
4421   *-64|*"-64 ") libmagic=64-bit;;
4422   *) libmagic=never-match;;
4423   esac
4424   lt_cv_deplibs_check_method=pass_all
4425   ;;
4426
4427 # This must be Linux ELF.
4428 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4429   lt_cv_deplibs_check_method=pass_all
4430   ;;
4431
4432 netbsd* | netbsdelf*-gnu)
4433   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4434     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4435   else
4436     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4437   fi
4438   ;;
4439
4440 newos6*)
4441   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4442   lt_cv_file_magic_cmd=/usr/bin/file
4443   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4444   ;;
4445
4446 *nto* | *qnx*)
4447   lt_cv_deplibs_check_method=pass_all
4448   ;;
4449
4450 openbsd*)
4451   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4452     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4453   else
4454     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4455   fi
4456   ;;
4457
4458 osf3* | osf4* | osf5*)
4459   lt_cv_deplibs_check_method=pass_all
4460   ;;
4461
4462 rdos*)
4463   lt_cv_deplibs_check_method=pass_all
4464   ;;
4465
4466 solaris*)
4467   lt_cv_deplibs_check_method=pass_all
4468   ;;
4469
4470 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4471   lt_cv_deplibs_check_method=pass_all
4472   ;;
4473
4474 sysv4 | sysv4.3*)
4475   case $host_vendor in
4476   motorola)
4477     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]]'
4478     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4479     ;;
4480   ncr)
4481     lt_cv_deplibs_check_method=pass_all
4482     ;;
4483   sequent)
4484     lt_cv_file_magic_cmd='/bin/file'
4485     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4486     ;;
4487   sni)
4488     lt_cv_file_magic_cmd='/bin/file'
4489     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4490     lt_cv_file_magic_test_file=/lib/libc.so
4491     ;;
4492   siemens)
4493     lt_cv_deplibs_check_method=pass_all
4494     ;;
4495   pc)
4496     lt_cv_deplibs_check_method=pass_all
4497     ;;
4498   esac
4499   ;;
4500
4501 tpf*)
4502   lt_cv_deplibs_check_method=pass_all
4503   ;;
4504 esac
4505 ])
4506 file_magic_cmd=$lt_cv_file_magic_cmd
4507 deplibs_check_method=$lt_cv_deplibs_check_method
4508 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4509
4510 _LT_DECL([], [deplibs_check_method], [1],
4511     [Method to check whether dependent libraries are shared objects])
4512 _LT_DECL([], [file_magic_cmd], [1],
4513     [Command to use when deplibs_check_method == "file_magic"])
4514 ])# _LT_CHECK_MAGIC_METHOD
4515
4516
4517 # LT_PATH_NM
4518 # ----------
4519 # find the pathname to a BSD- or MS-compatible name lister
4520 AC_DEFUN([LT_PATH_NM],
4521 [AC_REQUIRE([AC_PROG_CC])dnl
4522 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4523 [if test -n "$NM"; then
4524   # Let the user override the test.
4525   lt_cv_path_NM="$NM"
4526 else
4527   lt_nm_to_check="${ac_tool_prefix}nm"
4528   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4529     lt_nm_to_check="$lt_nm_to_check nm"
4530   fi
4531   for lt_tmp_nm in $lt_nm_to_check; do
4532     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4533     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4534       IFS="$lt_save_ifs"
4535       test -z "$ac_dir" && ac_dir=.
4536       tmp_nm="$ac_dir/$lt_tmp_nm"
4537       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4538         # Check to see if the nm accepts a BSD-compat flag.
4539         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4540         #   nm: unknown option "B" ignored
4541         # Tru64's nm complains that /dev/null is an invalid object file
4542         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4543         */dev/null* | *'Invalid file or object type'*)
4544           lt_cv_path_NM="$tmp_nm -B"
4545           break
4546           ;;
4547         *)
4548           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4549           */dev/null*)
4550             lt_cv_path_NM="$tmp_nm -p"
4551             break
4552             ;;
4553           *)
4554             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4555             continue # so that we can try to find one that supports BSD flags
4556             ;;
4557           esac
4558           ;;
4559         esac
4560       fi
4561     done
4562     IFS="$lt_save_ifs"
4563   done
4564   : ${lt_cv_path_NM=no}
4565 fi])
4566 if test "$lt_cv_path_NM" != "no"; then
4567   NM="$lt_cv_path_NM"
4568 else
4569   # Didn't find any BSD compatible name lister, look for dumpbin.
4570   AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
4571   AC_SUBST([DUMPBIN])
4572   if test "$DUMPBIN" != ":"; then
4573     NM="$DUMPBIN"
4574   fi
4575 fi
4576 test -z "$NM" && NM=nm
4577 AC_SUBST([NM])
4578 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4579
4580 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4581   [lt_cv_nm_interface="BSD nm"
4582   echo "int some_variable = 0;" > conftest.$ac_ext
4583   (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4584   (eval "$ac_compile" 2>conftest.err)
4585   cat conftest.err >&AS_MESSAGE_LOG_FD
4586   (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4587   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4588   cat conftest.err >&AS_MESSAGE_LOG_FD
4589   (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
4590   cat conftest.out >&AS_MESSAGE_LOG_FD
4591   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4592     lt_cv_nm_interface="MS dumpbin"
4593   fi
4594   rm -f conftest*])
4595 ])# LT_PATH_NM
4596
4597 # Old names:
4598 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4599 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4600 dnl aclocal-1.4 backwards compatibility:
4601 dnl AC_DEFUN([AM_PROG_NM], [])
4602 dnl AC_DEFUN([AC_PROG_NM], [])
4603
4604
4605 # LT_LIB_M
4606 # --------
4607 # check for math library
4608 AC_DEFUN([LT_LIB_M],
4609 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4610 LIBM=
4611 case $host in
4612 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4613   # These system don't have libm, or don't need it
4614   ;;
4615 *-ncr-sysv4.3*)
4616   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4617   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4618   ;;
4619 *)
4620   AC_CHECK_LIB(m, cos, LIBM="-lm")
4621   ;;
4622 esac
4623 AC_SUBST([LIBM])
4624 ])# LT_LIB_M
4625
4626 # Old name:
4627 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4628 dnl aclocal-1.4 backwards compatibility:
4629 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4630
4631
4632 # _LT_COMPILER_NO_RTTI([TAGNAME])
4633 # -------------------------------
4634 m4_defun([_LT_COMPILER_NO_RTTI],
4635 [m4_require([_LT_TAG_COMPILER])dnl
4636
4637 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4638
4639 if test "$GCC" = yes; then
4640   _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4641
4642   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4643     lt_cv_prog_compiler_rtti_exceptions,
4644     [-fno-rtti -fno-exceptions], [],
4645     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4646 fi
4647 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4648         [Compiler flag to turn off builtin functions])
4649 ])# _LT_COMPILER_NO_RTTI
4650
4651
4652 # _LT_CMD_GLOBAL_SYMBOLS
4653 # ----------------------
4654 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4655 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4656 AC_REQUIRE([AC_PROG_CC])dnl
4657 AC_REQUIRE([LT_PATH_NM])dnl
4658 AC_REQUIRE([LT_PATH_LD])dnl
4659 m4_require([_LT_DECL_SED])dnl
4660 m4_require([_LT_DECL_EGREP])dnl
4661 m4_require([_LT_TAG_COMPILER])dnl
4662
4663 # Check for command to grab the raw symbol name followed by C symbol from nm.
4664 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4665 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4666 [
4667 # These are sane defaults that work on at least a few old systems.
4668 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4669
4670 # Character class describing NM global symbol codes.
4671 symcode='[[BCDEGRST]]'
4672
4673 # Regexp to match symbols that can be accessed directly from C.
4674 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4675
4676 # Define system-specific variables.
4677 case $host_os in
4678 aix*)
4679   symcode='[[BCDT]]'
4680   ;;
4681 cygwin* | mingw* | pw32* | cegcc*)
4682   symcode='[[ABCDGISTW]]'
4683   ;;
4684 hpux*)
4685   if test "$host_cpu" = ia64; then
4686     symcode='[[ABCDEGRST]]'
4687   fi
4688   ;;
4689 irix* | nonstopux*)
4690   symcode='[[BCDEGRST]]'
4691   ;;
4692 osf*)
4693   symcode='[[BCDEGQRST]]'
4694   ;;
4695 solaris*)
4696   symcode='[[BDRT]]'
4697   ;;
4698 sco3.2v5*)
4699   symcode='[[DT]]'
4700   ;;
4701 sysv4.2uw2*)
4702   symcode='[[DT]]'
4703   ;;
4704 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4705   symcode='[[ABDT]]'
4706   ;;
4707 sysv4)
4708   symcode='[[DFNSTU]]'
4709   ;;
4710 esac
4711
4712 # If we're using GNU nm, then use its standard symbol codes.
4713 case `$NM -V 2>&1` in
4714 *GNU* | *'with BFD'*)
4715   symcode='[[ABCDGIRSTW]]' ;;
4716 esac
4717
4718 # Transform an extracted symbol line into a proper C declaration.
4719 # Some systems (esp. on ia64) link data and code symbols differently,
4720 # so use this general approach.
4721 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4722
4723 # Transform an extracted symbol line into symbol name and symbol address
4724 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4725 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
4726
4727 # Handle CRLF in mingw tool chain
4728 opt_cr=
4729 case $build_os in
4730 mingw*)
4731   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4732   ;;
4733 esac
4734
4735 # Try without a prefix underscore, then with it.
4736 for ac_symprfx in "" "_"; do
4737
4738   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4739   symxfrm="\\1 $ac_symprfx\\2 \\2"
4740
4741   # Write the raw and C identifiers.
4742   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4743     # Fake it for dumpbin and say T for any non-static function
4744     # and D for any global variable.
4745     # Also find C++ and __fastcall symbols from MSVC++,
4746     # which start with @ or ?.
4747     lt_cv_sys_global_symbol_pipe="$AWK ['"\
4748 "     {last_section=section; section=\$ 3};"\
4749 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4750 "     \$ 0!~/External *\|/{next};"\
4751 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4752 "     {if(hide[section]) next};"\
4753 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4754 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4755 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4756 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4757 "     ' prfx=^$ac_symprfx]"
4758   else
4759     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4760   fi
4761
4762   # Check to see that the pipe works correctly.
4763   pipe_works=no
4764
4765   rm -f conftest*
4766   cat > conftest.$ac_ext <<_LT_EOF
4767 #ifdef __cplusplus
4768 extern "C" {
4769 #endif
4770 char nm_test_var;
4771 void nm_test_func(void);
4772 void nm_test_func(void){}
4773 #ifdef __cplusplus
4774 }
4775 #endif
4776 int main(){nm_test_var='a';nm_test_func();return(0);}
4777 _LT_EOF
4778
4779   if AC_TRY_EVAL(ac_compile); then
4780     # Now try to grab the symbols.
4781     nlist=conftest.nm
4782     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4783       # Try sorting and uniquifying the output.
4784       if sort "$nlist" | uniq > "$nlist"T; then
4785         mv -f "$nlist"T "$nlist"
4786       else
4787         rm -f "$nlist"T
4788       fi
4789
4790       # Make sure that we snagged all the symbols we need.
4791       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4792         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4793           cat <<_LT_EOF > conftest.$ac_ext
4794 #ifdef __cplusplus
4795 extern "C" {
4796 #endif
4797
4798 _LT_EOF
4799           # Now generate the symbol file.
4800           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4801
4802           cat <<_LT_EOF >> conftest.$ac_ext
4803
4804 /* The mapping between symbol names and symbols.  */
4805 const struct {
4806   const char *name;
4807   void       *address;
4808 }
4809 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4810 {
4811   { "@PROGRAM@", (void *) 0 },
4812 _LT_EOF
4813           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4814           cat <<\_LT_EOF >> conftest.$ac_ext
4815   {0, (void *) 0}
4816 };
4817
4818 /* This works around a problem in FreeBSD linker */
4819 #ifdef FREEBSD_WORKAROUND
4820 static const void *lt_preloaded_setup() {
4821   return lt__PROGRAM__LTX_preloaded_symbols;
4822 }
4823 #endif
4824
4825 #ifdef __cplusplus
4826 }
4827 #endif
4828 _LT_EOF
4829           # Now try linking the two files.
4830           mv conftest.$ac_objext conftstm.$ac_objext
4831           lt_save_LIBS="$LIBS"
4832           lt_save_CFLAGS="$CFLAGS"
4833           LIBS="conftstm.$ac_objext"
4834           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4835           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4836             pipe_works=yes
4837           fi
4838           LIBS="$lt_save_LIBS"
4839           CFLAGS="$lt_save_CFLAGS"
4840         else
4841           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4842         fi
4843       else
4844         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4845       fi
4846     else
4847       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4848     fi
4849   else
4850     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4851     cat conftest.$ac_ext >&5
4852   fi
4853   rm -rf conftest* conftst*
4854
4855   # Do not use the global_symbol_pipe unless it works.
4856   if test "$pipe_works" = yes; then
4857     break
4858   else
4859     lt_cv_sys_global_symbol_pipe=
4860   fi
4861 done
4862 ])
4863 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4864   lt_cv_sys_global_symbol_to_cdecl=
4865 fi
4866 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4867   AC_MSG_RESULT(failed)
4868 else
4869   AC_MSG_RESULT(ok)
4870 fi
4871
4872 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4873     [Take the output of nm and produce a listing of raw symbols and C names])
4874 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4875     [Transform the output of nm in a proper C declaration])
4876 _LT_DECL([global_symbol_to_c_name_address],
4877     [lt_cv_sys_global_symbol_to_c_name_address], [1],
4878     [Transform the output of nm in a C name address pair])
4879 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4880     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4881     [Transform the output of nm in a C name address pair when lib prefix is needed])
4882 ]) # _LT_CMD_GLOBAL_SYMBOLS
4883
4884
4885 # _LT_COMPILER_PIC([TAGNAME])
4886 # ---------------------------
4887 m4_defun([_LT_COMPILER_PIC],
4888 [m4_require([_LT_TAG_COMPILER])dnl
4889 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4890 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4891 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4892
4893 AC_MSG_CHECKING([for $compiler option to produce PIC])
4894 m4_if([$1], [CXX], [
4895   # C++ specific cases for pic, static, wl, etc.
4896   if test "$GXX" = yes; then
4897     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4898     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4899
4900     case $host_os in
4901     aix*)
4902       # All AIX code is PIC.
4903       if test "$host_cpu" = ia64; then
4904         # AIX 5 now supports IA64 processor
4905         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4906       fi
4907       ;;
4908
4909     amigaos*)
4910       case $host_cpu in
4911       powerpc)
4912             # see comment about AmigaOS4 .so support
4913             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4914         ;;
4915       m68k)
4916             # FIXME: we need at least 68020 code to build shared libraries, but
4917             # adding the `-m68020' flag to GCC prevents building anything better,
4918             # like `-m68040'.
4919             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4920         ;;
4921       esac
4922       ;;
4923
4924     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4925       # PIC is the default for these OSes.
4926       ;;
4927     mingw* | cygwin* | os2* | pw32* | cegcc*)
4928       # This hack is so that the source file can tell whether it is being
4929       # built for inclusion in a dll (and should export symbols for example).
4930       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4931       # (--disable-auto-import) libraries
4932       m4_if([$1], [GCJ], [],
4933         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4934       ;;
4935     darwin* | rhapsody*)
4936       # PIC is the default on this platform
4937       # Common symbols not allowed in MH_DYLIB files
4938       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4939       ;;
4940     *djgpp*)
4941       # DJGPP does not support shared libraries at all
4942       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4943       ;;
4944     interix[[3-9]]*)
4945       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4946       # Instead, we relocate shared libraries at runtime.
4947       ;;
4948     sysv4*MP*)
4949       if test -d /usr/nec; then
4950         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4951       fi
4952       ;;
4953     hpux*)
4954       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4955       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4956       # sets the default TLS model and affects inlining.
4957       case $host_cpu in
4958       hppa*64*)
4959         ;;
4960       *)
4961         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4962         ;;
4963       esac
4964       ;;
4965     *qnx* | *nto*)
4966       # QNX uses GNU C++, but need to define -shared option too, otherwise
4967       # it will coredump.
4968       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4969       ;;
4970     *)
4971       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4972       ;;
4973     esac
4974   else
4975     case $host_os in
4976       aix[[4-9]]*)
4977         # All AIX code is PIC.
4978         if test "$host_cpu" = ia64; then
4979           # AIX 5 now supports IA64 processor
4980           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4981         else
4982           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4983         fi
4984         ;;
4985       chorus*)
4986         case $cc_basename in
4987         cxch68*)
4988           # Green Hills C++ Compiler
4989           # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4990           ;;
4991         esac
4992         ;;
4993       dgux*)
4994         case $cc_basename in
4995           ec++*)
4996             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4997             ;;
4998           ghcx*)
4999             # Green Hills C++ Compiler
5000             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5001             ;;
5002           *)
5003             ;;
5004         esac
5005         ;;
5006       freebsd* | dragonfly*)
5007         # FreeBSD uses GNU C++
5008         ;;
5009       hpux9* | hpux10* | hpux11*)
5010         case $cc_basename in
5011           CC*)
5012             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5013             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5014             if test "$host_cpu" != ia64; then
5015               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5016             fi
5017             ;;
5018           aCC*)
5019             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5020             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5021             case $host_cpu in
5022             hppa*64*|ia64*)
5023               # +Z the default
5024               ;;
5025             *)
5026               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5027               ;;
5028             esac
5029             ;;
5030           *)
5031             ;;
5032         esac
5033         ;;
5034       interix*)
5035         # This is c89, which is MS Visual C++ (no shared libs)
5036         # Anyone wants to do a port?
5037         ;;
5038       irix5* | irix6* | nonstopux*)
5039         case $cc_basename in
5040           CC*)
5041             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5042             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5043             # CC pic flag -KPIC is the default.
5044             ;;
5045           *)
5046             ;;
5047         esac
5048         ;;
5049       linux* | k*bsd*-gnu | kopensolaris*-gnu)
5050         case $cc_basename in
5051           KCC*)
5052             # KAI C++ Compiler
5053             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5054             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5055             ;;
5056           ecpc* )
5057             # old Intel C++ for x86_64 which still supported -KPIC.
5058             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5059             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5060             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5061             ;;
5062           icpc* )
5063             # Intel C++, used to be incompatible with GCC.
5064             # ICC 10 doesn't accept -KPIC any more.
5065             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5066             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5067             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5068             ;;
5069           pgCC* | pgcpp*)
5070             # Portland Group C++ compiler
5071             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5072             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5073             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5074             ;;
5075           cxx*)
5076             # Compaq C++
5077             # Make sure the PIC flag is empty.  It appears that all Alpha
5078             # Linux and Compaq Tru64 Unix objects are PIC.
5079             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5080             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5081             ;;
5082           xlc* | xlC*)
5083             # IBM XL 8.0 on PPC
5084             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5085             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5086             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5087             ;;
5088           *)
5089             case `$CC -V 2>&1 | sed 5q` in
5090             *Sun\ C*)
5091               # Sun C++ 5.9
5092               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5093               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5094               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5095               ;;
5096             esac
5097             ;;
5098         esac
5099         ;;
5100       lynxos*)
5101         ;;
5102       m88k*)
5103         ;;
5104       mvs*)
5105         case $cc_basename in
5106           cxx*)
5107             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5108             ;;
5109           *)
5110             ;;
5111         esac
5112         ;;
5113       netbsd* | netbsdelf*-gnu)
5114         ;;
5115       *qnx* | *nto*)
5116         # QNX uses GNU C++, but need to define -shared option too, otherwise
5117         # it will coredump.
5118         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5119         ;;
5120       osf3* | osf4* | osf5*)
5121         case $cc_basename in
5122           KCC*)
5123             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5124             ;;
5125           RCC*)
5126             # Rational C++ 2.4.1
5127             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5128             ;;
5129           cxx*)
5130             # Digital/Compaq C++
5131             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5132             # Make sure the PIC flag is empty.  It appears that all Alpha
5133             # Linux and Compaq Tru64 Unix objects are PIC.
5134             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5135             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5136             ;;
5137           *)
5138             ;;
5139         esac
5140         ;;
5141       psos*)
5142         ;;
5143       solaris*)
5144         case $cc_basename in
5145           CC*)
5146             # Sun C++ 4.2, 5.x and Centerline C++
5147             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5148             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5149             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5150             ;;
5151           gcx*)
5152             # Green Hills C++ Compiler
5153             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5154             ;;
5155           *)
5156             ;;
5157         esac
5158         ;;
5159       sunos4*)
5160         case $cc_basename in
5161           CC*)
5162             # Sun C++ 4.x
5163             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5164             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5165             ;;
5166           lcc*)
5167             # Lucid
5168             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5169             ;;
5170           *)
5171             ;;
5172         esac
5173         ;;
5174       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5175         case $cc_basename in
5176           CC*)
5177             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5178             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5179             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5180             ;;
5181         esac
5182         ;;
5183       tandem*)
5184         case $cc_basename in
5185           NCC*)
5186             # NonStop-UX NCC 3.20
5187             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5188             ;;
5189           *)
5190             ;;
5191         esac
5192         ;;
5193       vxworks*)
5194         ;;
5195       *)
5196         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5197         ;;
5198     esac
5199   fi
5200 ],
5201 [
5202   if test "$GCC" = yes; then
5203     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5204     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5205
5206     case $host_os in
5207       aix*)
5208       # All AIX code is PIC.
5209       if test "$host_cpu" = ia64; then
5210         # AIX 5 now supports IA64 processor
5211         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5212       fi
5213       ;;
5214
5215     amigaos*)
5216       case $host_cpu in
5217       powerpc)
5218             # see comment about AmigaOS4 .so support
5219             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5220         ;;
5221       m68k)
5222             # FIXME: we need at least 68020 code to build shared libraries, but
5223             # adding the `-m68020' flag to GCC prevents building anything better,
5224             # like `-m68040'.
5225             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5226         ;;
5227       esac
5228       ;;
5229
5230     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5231       # PIC is the default for these OSes.
5232       ;;
5233
5234     mingw* | cygwin* | pw32* | os2* | cegcc*)
5235       # This hack is so that the source file can tell whether it is being
5236       # built for inclusion in a dll (and should export symbols for example).
5237       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5238       # (--disable-auto-import) libraries
5239       m4_if([$1], [GCJ], [],
5240         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5241       ;;
5242
5243     darwin* | rhapsody*)
5244       # PIC is the default on this platform
5245       # Common symbols not allowed in MH_DYLIB files
5246       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5247       ;;
5248
5249     hpux*)
5250       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5251       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5252       # sets the default TLS model and affects inlining.
5253       case $host_cpu in
5254       hppa*64*)
5255         # +Z the default
5256         ;;
5257       *)
5258         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5259         ;;
5260       esac
5261       ;;
5262
5263     interix[[3-9]]*)
5264       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5265       # Instead, we relocate shared libraries at runtime.
5266       ;;
5267
5268     msdosdjgpp*)
5269       # Just because we use GCC doesn't mean we suddenly get shared libraries
5270       # on systems that don't support them.
5271       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5272       enable_shared=no
5273       ;;
5274
5275     *nto* | *qnx*)
5276       # QNX uses GNU C++, but need to define -shared option too, otherwise
5277       # it will coredump.
5278       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5279       ;;
5280
5281     sysv4*MP*)
5282       if test -d /usr/nec; then
5283         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5284       fi
5285       ;;
5286
5287     *)
5288       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5289       ;;
5290     esac
5291   else
5292     # PORTME Check for flag to pass linker flags through the system compiler.
5293     case $host_os in
5294     aix*)
5295       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5296       if test "$host_cpu" = ia64; then
5297         # AIX 5 now supports IA64 processor
5298         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5299       else
5300         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5301       fi
5302       ;;
5303
5304     mingw* | cygwin* | pw32* | os2* | cegcc*)
5305       # This hack is so that the source file can tell whether it is being
5306       # built for inclusion in a dll (and should export symbols for example).
5307       m4_if([$1], [GCJ], [],
5308         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5309       ;;
5310
5311     hpux9* | hpux10* | hpux11*)
5312       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5313       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5314       # not for PA HP-UX.
5315       case $host_cpu in
5316       hppa*64*|ia64*)
5317         # +Z the default
5318         ;;
5319       *)
5320         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5321         ;;
5322       esac
5323       # Is there a better lt_prog_compiler_static that works with the bundled CC?
5324       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5325       ;;
5326
5327     irix5* | irix6* | nonstopux*)
5328       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5329       # PIC (with -KPIC) is the default.
5330       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5331       ;;
5332
5333     linux* | k*bsd*-gnu | kopensolaris*-gnu)
5334       case $cc_basename in
5335       # old Intel for x86_64 which still supported -KPIC.
5336       ecc*)
5337         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5338         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5339         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5340         ;;
5341       # icc used to be incompatible with GCC.
5342       # ICC 10 doesn't accept -KPIC any more.
5343       icc* | ifort*)
5344         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5345         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5346         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5347         ;;
5348       # Lahey Fortran 8.1.
5349       lf95*)
5350         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5351         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5352         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5353         ;;
5354       pgcc* | pgf77* | pgf90* | pgf95*)
5355         # Portland Group compilers (*not* the Pentium gcc compiler,
5356         # which looks to be a dead project)
5357         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5358         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5359         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5360         ;;
5361       ccc*)
5362         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5363         # All Alpha code is PIC.
5364         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5365         ;;
5366       xl*)
5367         # IBM XL C 8.0/Fortran 10.1 on PPC
5368         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5369         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5370         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5371         ;;
5372       *)
5373         case `$CC -V 2>&1 | sed 5q` in
5374         *Sun\ C*)
5375           # Sun C 5.9
5376           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5377           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5378           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5379           ;;
5380         *Sun\ F*)
5381           # Sun Fortran 8.3 passes all unrecognized flags to the linker
5382           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5383           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5384           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5385           ;;
5386         esac
5387         ;;
5388       esac
5389       ;;
5390
5391     newsos6)
5392       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5393       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5394       ;;
5395
5396     *nto* | *qnx*)
5397       # QNX uses GNU C++, but need to define -shared option too, otherwise
5398       # it will coredump.
5399       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5400       ;;
5401
5402     osf3* | osf4* | osf5*)
5403       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5404       # All OSF/1 code is PIC.
5405       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5406       ;;
5407
5408     rdos*)
5409       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5410       ;;
5411
5412     solaris*)
5413       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5414       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5415       case $cc_basename in
5416       f77* | f90* | f95*)
5417         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5418       *)
5419         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5420       esac
5421       ;;
5422
5423     sunos4*)
5424       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5425       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5426       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5427       ;;
5428
5429     sysv4 | sysv4.2uw2* | sysv4.3*)
5430       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5431       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5432       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5433       ;;
5434
5435     sysv4*MP*)
5436       if test -d /usr/nec ;then
5437         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5438         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5439       fi
5440       ;;
5441
5442     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5443       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5444       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5445       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5446       ;;
5447
5448     unicos*)
5449       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5450       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5451       ;;
5452
5453     uts4*)
5454       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5455       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5456       ;;
5457
5458     *)
5459       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5460       ;;
5461     esac
5462   fi
5463 ])
5464 case $host_os in
5465   # For platforms which do not support PIC, -DPIC is meaningless:
5466   *djgpp*)
5467     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5468     ;;
5469   *)
5470     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5471     ;;
5472 esac
5473 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5474 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5475         [How to pass a linker flag through the compiler])
5476
5477 #
5478 # Check to make sure the PIC flag actually works.
5479 #
5480 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5481   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5482     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5483     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5484     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5485      "" | " "*) ;;
5486      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5487      esac],
5488     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5489      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5490 fi
5491 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5492         [Additional compiler flags for building library objects])
5493
5494 #
5495 # Check to make sure the static flag actually works.
5496 #
5497 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5498 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5499   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5500   $lt_tmp_static_flag,
5501   [],
5502   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5503 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5504         [Compiler flag to prevent dynamic linking])
5505 ])# _LT_COMPILER_PIC
5506
5507
5508 # _LT_LINKER_SHLIBS([TAGNAME])
5509 # ----------------------------
5510 # See if the linker supports building shared libraries.
5511 m4_defun([_LT_LINKER_SHLIBS],
5512 [AC_REQUIRE([LT_PATH_LD])dnl
5513 AC_REQUIRE([LT_PATH_NM])dnl
5514 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5515 m4_require([_LT_DECL_EGREP])dnl
5516 m4_require([_LT_DECL_SED])dnl
5517 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5518 m4_require([_LT_TAG_COMPILER])dnl
5519 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5520 m4_if([$1], [CXX], [
5521   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5522   case $host_os in
5523   aix[[4-9]]*)
5524     # If we're using GNU nm, then we don't want the "-C" option.
5525     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5526     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5527       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5528     else
5529       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5530     fi
5531     ;;
5532   pw32*)
5533     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5534   ;;
5535   cygwin* | mingw* | cegcc*)
5536     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5537   ;;
5538   linux* | k*bsd*-gnu)
5539     _LT_TAGVAR(link_all_deplibs, $1)=no
5540   ;;
5541   *)
5542     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5543   ;;
5544   esac
5545   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5546 ], [
5547   runpath_var=
5548   _LT_TAGVAR(allow_undefined_flag, $1)=
5549   _LT_TAGVAR(always_export_symbols, $1)=no
5550   _LT_TAGVAR(archive_cmds, $1)=
5551   _LT_TAGVAR(archive_expsym_cmds, $1)=
5552   _LT_TAGVAR(compiler_needs_object, $1)=no
5553   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5554   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5555   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5556   _LT_TAGVAR(hardcode_automatic, $1)=no
5557   _LT_TAGVAR(hardcode_direct, $1)=no
5558   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5559   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5560   _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5561   _LT_TAGVAR(hardcode_libdir_separator, $1)=
5562   _LT_TAGVAR(hardcode_minus_L, $1)=no
5563   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5564   _LT_TAGVAR(inherit_rpath, $1)=no
5565   _LT_TAGVAR(link_all_deplibs, $1)=unknown
5566   _LT_TAGVAR(module_cmds, $1)=
5567   _LT_TAGVAR(module_expsym_cmds, $1)=
5568   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5569   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5570   _LT_TAGVAR(thread_safe_flag_spec, $1)=
5571   _LT_TAGVAR(whole_archive_flag_spec, $1)=
5572   # include_expsyms should be a list of space-separated symbols to be *always*
5573   # included in the symbol list
5574   _LT_TAGVAR(include_expsyms, $1)=
5575   # exclude_expsyms can be an extended regexp of symbols to exclude
5576   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5577   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5578   # as well as any symbol that contains `d'.
5579   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5580   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5581   # platforms (ab)use it in PIC code, but their linkers get confused if
5582   # the symbol is explicitly referenced.  Since portable code cannot
5583   # rely on this symbol name, it's probably fine to never include it in
5584   # preloaded symbol tables.
5585   # Exclude shared library initialization/finalization symbols.
5586 dnl Note also adjust exclude_expsyms for C++ above.
5587   extract_expsyms_cmds=
5588
5589   case $host_os in
5590   cygwin* | mingw* | pw32* | cegcc*)
5591     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5592     # When not using gcc, we currently assume that we are using
5593     # Microsoft Visual C++.
5594     if test "$GCC" != yes; then
5595       with_gnu_ld=no
5596     fi
5597     ;;
5598   interix*)
5599     # we just hope/assume this is gcc and not c89 (= MSVC++)
5600     with_gnu_ld=yes
5601     ;;
5602   openbsd*)
5603     with_gnu_ld=no
5604     ;;
5605   linux* | k*bsd*-gnu)
5606     _LT_TAGVAR(link_all_deplibs, $1)=no
5607     ;;
5608   esac
5609
5610   _LT_TAGVAR(ld_shlibs, $1)=yes
5611   if test "$with_gnu_ld" = yes; then
5612     # If archive_cmds runs LD, not CC, wlarc should be empty
5613     wlarc='${wl}'
5614
5615     # Set some defaults for GNU ld with shared library support. These
5616     # are reset later if shared libraries are not supported. Putting them
5617     # here allows them to be overridden if necessary.
5618     runpath_var=LD_RUN_PATH
5619     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5620     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5621     # ancient GNU ld didn't support --whole-archive et. al.
5622     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5623       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5624     else
5625       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5626     fi
5627     supports_anon_versioning=no
5628     case `$LD -v 2>&1` in
5629       *GNU\ gold*) supports_anon_versioning=yes ;;
5630       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5631       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5632       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5633       *\ 2.11.*) ;; # other 2.11 versions
5634       *) supports_anon_versioning=yes ;;
5635     esac
5636
5637     # See if GNU ld supports shared libraries.
5638     case $host_os in
5639     aix[[3-9]]*)
5640       # On AIX/PPC, the GNU linker is very broken
5641       if test "$host_cpu" != ia64; then
5642         _LT_TAGVAR(ld_shlibs, $1)=no
5643         cat <<_LT_EOF 1>&2
5644
5645 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5646 *** to be unable to reliably create shared libraries on AIX.
5647 *** Therefore, libtool is disabling shared libraries support.  If you
5648 *** really care for shared libraries, you may want to modify your PATH
5649 *** so that a non-GNU linker is found, and then restart.
5650
5651 _LT_EOF
5652       fi
5653       ;;
5654
5655     amigaos*)
5656       case $host_cpu in
5657       powerpc)
5658             # see comment about AmigaOS4 .so support
5659             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5660             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5661         ;;
5662       m68k)
5663             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5664             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5665             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5666         ;;
5667       esac
5668       ;;
5669
5670     beos*)
5671       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5672         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5673         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5674         # support --undefined.  This deserves some investigation.  FIXME
5675         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5676       else
5677         _LT_TAGVAR(ld_shlibs, $1)=no
5678       fi
5679       ;;
5680
5681     cygwin* | mingw* | pw32* | cegcc*)
5682       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5683       # as there is no search path for DLLs.
5684       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5685       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5686       _LT_TAGVAR(always_export_symbols, $1)=no
5687       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5688       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5689
5690       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5691         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5692         # If the export-symbols file already is a .def file (1st line
5693         # is EXPORTS), use it as is; otherwise, prepend...
5694         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5695           cp $export_symbols $output_objdir/$soname.def;
5696         else
5697           echo EXPORTS > $output_objdir/$soname.def;
5698           cat $export_symbols >> $output_objdir/$soname.def;
5699         fi~
5700         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5701       else
5702         _LT_TAGVAR(ld_shlibs, $1)=no
5703       fi
5704       ;;
5705
5706     interix[[3-9]]*)
5707       _LT_TAGVAR(hardcode_direct, $1)=no
5708       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5709       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5710       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5711       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5712       # Instead, shared libraries are loaded at an image base (0x10000000 by
5713       # default) and relocated if they conflict, which is a slow very memory
5714       # consuming and fragmenting process.  To avoid this, we pick a random,
5715       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5716       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5717       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5718       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5719       ;;
5720
5721     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5722       tmp_diet=no
5723       if test "$host_os" = linux-dietlibc; then
5724         case $cc_basename in
5725           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
5726         esac
5727       fi
5728       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5729          && test "$tmp_diet" = no
5730       then
5731         tmp_addflag=
5732         tmp_sharedflag='-shared'
5733         case $cc_basename,$host_cpu in
5734         pgcc*)                          # Portland Group C compiler
5735           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5736           tmp_addflag=' $pic_flag'
5737           ;;
5738         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
5739           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5740           tmp_addflag=' $pic_flag -Mnomain' ;;
5741         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
5742           tmp_addflag=' -i_dynamic' ;;
5743         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
5744           tmp_addflag=' -i_dynamic -nofor_main' ;;
5745         ifc* | ifort*)                  # Intel Fortran compiler
5746           tmp_addflag=' -nofor_main' ;;
5747         lf95*)                          # Lahey Fortran 8.1
5748           _LT_TAGVAR(whole_archive_flag_spec, $1)=
5749           tmp_sharedflag='--shared' ;;
5750         xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
5751           tmp_sharedflag='-qmkshrobj'
5752           tmp_addflag= ;;
5753         esac
5754         case `$CC -V 2>&1 | sed 5q` in
5755         *Sun\ C*)                       # Sun C 5.9
5756           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5757           _LT_TAGVAR(compiler_needs_object, $1)=yes
5758           tmp_sharedflag='-G' ;;
5759         *Sun\ F*)                       # Sun Fortran 8.3
5760           tmp_sharedflag='-G' ;;
5761         esac
5762         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5763
5764         if test "x$supports_anon_versioning" = xyes; then
5765           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5766             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5767             echo "local: *; };" >> $output_objdir/$libname.ver~
5768             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5769         fi
5770
5771         case $cc_basename in
5772         xlf*)
5773           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5774           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5775           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5776           _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5777           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5778           if test "x$supports_anon_versioning" = xyes; then
5779             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5780               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5781               echo "local: *; };" >> $output_objdir/$libname.ver~
5782               $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5783           fi
5784           ;;
5785         esac
5786       else
5787         _LT_TAGVAR(ld_shlibs, $1)=no
5788       fi
5789       ;;
5790
5791     netbsd* | netbsdelf*-gnu)
5792       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5793         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5794         wlarc=
5795       else
5796         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5797         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5798       fi
5799       ;;
5800
5801     solaris*)
5802       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5803         _LT_TAGVAR(ld_shlibs, $1)=no
5804         cat <<_LT_EOF 1>&2
5805
5806 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5807 *** create shared libraries on Solaris systems.  Therefore, libtool
5808 *** is disabling shared libraries support.  We urge you to upgrade GNU
5809 *** binutils to release 2.9.1 or newer.  Another option is to modify
5810 *** your PATH or compiler configuration so that the native linker is
5811 *** used, and then restart.
5812
5813 _LT_EOF
5814       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5815         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5816         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5817       else
5818         _LT_TAGVAR(ld_shlibs, $1)=no
5819       fi
5820       ;;
5821
5822     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5823       case `$LD -v 2>&1` in
5824         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5825         _LT_TAGVAR(ld_shlibs, $1)=no
5826         cat <<_LT_EOF 1>&2
5827
5828 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5829 *** reliably create shared libraries on SCO systems.  Therefore, libtool
5830 *** is disabling shared libraries support.  We urge you to upgrade GNU
5831 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5832 *** your PATH or compiler configuration so that the native linker is
5833 *** used, and then restart.
5834
5835 _LT_EOF
5836         ;;
5837         *)
5838           # For security reasons, it is highly recommended that you always
5839           # use absolute paths for naming shared libraries, and exclude the
5840           # DT_RUNPATH tag from executables and libraries.  But doing so
5841           # requires that you compile everything twice, which is a pain.
5842           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5843             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5844             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5845             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5846           else
5847             _LT_TAGVAR(ld_shlibs, $1)=no
5848           fi
5849         ;;
5850       esac
5851       ;;
5852
5853     sunos4*)
5854       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5855       wlarc=
5856       _LT_TAGVAR(hardcode_direct, $1)=yes
5857       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5858       ;;
5859
5860     *)
5861       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5862         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5863         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5864       else
5865         _LT_TAGVAR(ld_shlibs, $1)=no
5866       fi
5867       ;;
5868     esac
5869
5870     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5871       runpath_var=
5872       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5873       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5874       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5875     fi
5876   else
5877     # PORTME fill in a description of your system's linker (not GNU ld)
5878     case $host_os in
5879     aix3*)
5880       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5881       _LT_TAGVAR(always_export_symbols, $1)=yes
5882       _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5883       # Note: this linker hardcodes the directories in LIBPATH if there
5884       # are no directories specified by -L.
5885       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5886       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5887         # Neither direct hardcoding nor static linking is supported with a
5888         # broken collect2.
5889         _LT_TAGVAR(hardcode_direct, $1)=unsupported
5890       fi
5891       ;;
5892
5893     aix[[4-9]]*)
5894       if test "$host_cpu" = ia64; then
5895         # On IA64, the linker does run time linking by default, so we don't
5896         # have to do anything special.
5897         aix_use_runtimelinking=no
5898         exp_sym_flag='-Bexport'
5899         no_entry_flag=""
5900       else
5901         # If we're using GNU nm, then we don't want the "-C" option.
5902         # -C means demangle to AIX nm, but means don't demangle with GNU nm
5903         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5904           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5905         else
5906           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5907         fi
5908         aix_use_runtimelinking=no
5909
5910         # Test if we are trying to use run time linking or normal
5911         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5912         # need to do runtime linking.
5913         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5914           for ld_flag in $LDFLAGS; do
5915           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5916             aix_use_runtimelinking=yes
5917             break
5918           fi
5919           done
5920           ;;
5921         esac
5922
5923         exp_sym_flag='-bexport'
5924         no_entry_flag='-bnoentry'
5925       fi
5926
5927       # When large executables or shared objects are built, AIX ld can
5928       # have problems creating the table of contents.  If linking a library
5929       # or program results in "error TOC overflow" add -mminimal-toc to
5930       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5931       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5932
5933       _LT_TAGVAR(archive_cmds, $1)=''
5934       _LT_TAGVAR(hardcode_direct, $1)=yes
5935       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5936       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5937       _LT_TAGVAR(link_all_deplibs, $1)=yes
5938       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5939
5940       if test "$GCC" = yes; then
5941         case $host_os in aix4.[[012]]|aix4.[[012]].*)
5942         # We only want to do this on AIX 4.2 and lower, the check
5943         # below for broken collect2 doesn't work under 4.3+
5944           collect2name=`${CC} -print-prog-name=collect2`
5945           if test -f "$collect2name" &&
5946            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5947           then
5948           # We have reworked collect2
5949           :
5950           else
5951           # We have old collect2
5952           _LT_TAGVAR(hardcode_direct, $1)=unsupported
5953           # It fails to find uninstalled libraries when the uninstalled
5954           # path is not listed in the libpath.  Setting hardcode_minus_L
5955           # to unsupported forces relinking
5956           _LT_TAGVAR(hardcode_minus_L, $1)=yes
5957           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5958           _LT_TAGVAR(hardcode_libdir_separator, $1)=
5959           fi
5960           ;;
5961         esac
5962         shared_flag='-shared'
5963         if test "$aix_use_runtimelinking" = yes; then
5964           shared_flag="$shared_flag "'${wl}-G'
5965         fi
5966         _LT_TAGVAR(link_all_deplibs, $1)=no
5967       else
5968         # not using gcc
5969         if test "$host_cpu" = ia64; then
5970         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5971         # chokes on -Wl,-G. The following line is correct:
5972           shared_flag='-G'
5973         else
5974           if test "$aix_use_runtimelinking" = yes; then
5975             shared_flag='${wl}-G'
5976           else
5977             shared_flag='${wl}-bM:SRE'
5978           fi
5979         fi
5980       fi
5981
5982       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5983       # It seems that -bexpall does not export symbols beginning with
5984       # underscore (_), so it is better to generate a list of symbols to export.
5985       _LT_TAGVAR(always_export_symbols, $1)=yes
5986       if test "$aix_use_runtimelinking" = yes; then
5987         # Warning - without using the other runtime loading flags (-brtl),
5988         # -berok will link without error, but may produce a broken library.
5989         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5990         # Determine the default libpath from the value encoded in an
5991         # empty executable.
5992         _LT_SYS_MODULE_PATH_AIX
5993         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5994         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5995       else
5996         if test "$host_cpu" = ia64; then
5997           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5998           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5999           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6000         else
6001          # Determine the default libpath from the value encoded in an
6002          # empty executable.
6003          _LT_SYS_MODULE_PATH_AIX
6004          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6005           # Warning - without using the other run time loading flags,
6006           # -berok will link without error, but may produce a broken library.
6007           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6008           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6009           # Exported symbols can be pulled into shared objects from archives
6010           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6011           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6012           # This is similar to how AIX traditionally builds its shared libraries.
6013           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6014         fi
6015       fi
6016       ;;
6017
6018     amigaos*)
6019       case $host_cpu in
6020       powerpc)
6021             # see comment about AmigaOS4 .so support
6022             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6023             _LT_TAGVAR(archive_expsym_cmds, $1)=''
6024         ;;
6025       m68k)
6026             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6027             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6028             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6029         ;;
6030       esac
6031       ;;
6032
6033     bsdi[[45]]*)
6034       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6035       ;;
6036
6037     cygwin* | mingw* | pw32* | cegcc*)
6038       # When not using gcc, we currently assume that we are using
6039       # Microsoft Visual C++.
6040       # hardcode_libdir_flag_spec is actually meaningless, as there is
6041       # no search path for DLLs.
6042       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6043       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6044       # Tell ltmain to make .lib files, not .a files.
6045       libext=lib
6046       # Tell ltmain to make .dll files, not .so files.
6047       shrext_cmds=".dll"
6048       # FIXME: Setting linknames here is a bad hack.
6049       _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
6050       # The linker will automatically build a .lib file if we build a DLL.
6051       _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6052       # FIXME: Should let the user specify the lib program.
6053       _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6054       _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6055       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6056       ;;
6057
6058     darwin* | rhapsody*)
6059       _LT_DARWIN_LINKER_FEATURES($1)
6060       ;;
6061
6062     dgux*)
6063       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6064       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6065       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6066       ;;
6067
6068     freebsd1*)
6069       _LT_TAGVAR(ld_shlibs, $1)=no
6070       ;;
6071
6072     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6073     # support.  Future versions do this automatically, but an explicit c++rt0.o
6074     # does not break anything, and helps significantly (at the cost of a little
6075     # extra space).
6076     freebsd2.2*)
6077       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6078       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6079       _LT_TAGVAR(hardcode_direct, $1)=yes
6080       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6081       ;;
6082
6083     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6084     freebsd2*)
6085       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6086       _LT_TAGVAR(hardcode_direct, $1)=yes
6087       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6088       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6089       ;;
6090
6091     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6092     freebsd* | dragonfly*)
6093       _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6094       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6095       _LT_TAGVAR(hardcode_direct, $1)=yes
6096       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6097       ;;
6098
6099     hpux9*)
6100       if test "$GCC" = yes; then
6101         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6102       else
6103         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6104       fi
6105       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6106       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6107       _LT_TAGVAR(hardcode_direct, $1)=yes
6108
6109       # hardcode_minus_L: Not really in the search PATH,
6110       # but as the default location of the library.
6111       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6112       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6113       ;;
6114
6115     hpux10*)
6116       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6117         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6118       else
6119         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6120       fi
6121       if test "$with_gnu_ld" = no; then
6122         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6123         _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6124         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6125         _LT_TAGVAR(hardcode_direct, $1)=yes
6126         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6127         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6128         # hardcode_minus_L: Not really in the search PATH,
6129         # but as the default location of the library.
6130         _LT_TAGVAR(hardcode_minus_L, $1)=yes
6131       fi
6132       ;;
6133
6134     hpux11*)
6135       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6136         case $host_cpu in
6137         hppa*64*)
6138           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6139           ;;
6140         ia64*)
6141           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6142           ;;
6143         *)
6144           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6145           ;;
6146         esac
6147       else
6148         case $host_cpu in
6149         hppa*64*)
6150           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6151           ;;
6152         ia64*)
6153           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6154           ;;
6155         *)
6156           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6157           ;;
6158         esac
6159       fi
6160       if test "$with_gnu_ld" = no; then
6161         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6162         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6163
6164         case $host_cpu in
6165         hppa*64*|ia64*)
6166           _LT_TAGVAR(hardcode_direct, $1)=no
6167           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6168           ;;
6169         *)
6170           _LT_TAGVAR(hardcode_direct, $1)=yes
6171           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6172           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6173
6174           # hardcode_minus_L: Not really in the search PATH,
6175           # but as the default location of the library.
6176           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6177           ;;
6178         esac
6179       fi
6180       ;;
6181
6182     irix5* | irix6* | nonstopux*)
6183       if test "$GCC" = yes; then
6184         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6185         # Try to use the -exported_symbol ld option, if it does not
6186         # work, assume that -exports_file does not work either and
6187         # implicitly export all symbols.
6188         save_LDFLAGS="$LDFLAGS"
6189         LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6190         AC_LINK_IFELSE(int foo(void) {},
6191           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6192         )
6193         LDFLAGS="$save_LDFLAGS"
6194       else
6195         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6196         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6197       fi
6198       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6199       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6200       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6201       _LT_TAGVAR(inherit_rpath, $1)=yes
6202       _LT_TAGVAR(link_all_deplibs, $1)=yes
6203       ;;
6204
6205     netbsd* | netbsdelf*-gnu)
6206       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6207         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6208       else
6209         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6210       fi
6211       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6212       _LT_TAGVAR(hardcode_direct, $1)=yes
6213       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6214       ;;
6215
6216     newsos6)
6217       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6218       _LT_TAGVAR(hardcode_direct, $1)=yes
6219       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6220       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6221       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6222       ;;
6223
6224     *nto* | *qnx*)
6225       ;;
6226
6227     openbsd*)
6228       if test -f /usr/libexec/ld.so; then
6229         _LT_TAGVAR(hardcode_direct, $1)=yes
6230         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6231         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6232         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6233           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6234           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6235           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6236           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6237         else
6238           case $host_os in
6239            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6240              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6241              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6242              ;;
6243            *)
6244              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6245              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6246              ;;
6247           esac
6248         fi
6249       else
6250         _LT_TAGVAR(ld_shlibs, $1)=no
6251       fi
6252       ;;
6253
6254     os2*)
6255       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6256       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6257       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6258       _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6259       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6260       ;;
6261
6262     osf3*)
6263       if test "$GCC" = yes; then
6264         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6265         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6266       else
6267         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6268         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6269       fi
6270       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6271       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6272       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6273       ;;
6274
6275     osf4* | osf5*)      # as osf3* with the addition of -msym flag
6276       if test "$GCC" = yes; then
6277         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6278         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6279         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6280       else
6281         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6282         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6283         _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
6284         $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6285
6286         # Both c and cxx compiler support -rpath directly
6287         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6288       fi
6289       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6290       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6291       ;;
6292
6293     solaris*)
6294       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6295       if test "$GCC" = yes; then
6296         wlarc='${wl}'
6297         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6298         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6299           $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6300       else
6301         case `$CC -V 2>&1` in
6302         *"Compilers 5.0"*)
6303           wlarc=''
6304           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6305           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6306           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6307           ;;
6308         *)
6309           wlarc='${wl}'
6310           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6311           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6312           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6313           ;;
6314         esac
6315       fi
6316       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6317       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6318       case $host_os in
6319       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6320       *)
6321         # The compiler driver will combine and reorder linker options,
6322         # but understands `-z linker_flag'.  GCC discards it without `$wl',
6323         # but is careful enough not to reorder.
6324         # Supported since Solaris 2.6 (maybe 2.5.1?)
6325         if test "$GCC" = yes; then
6326           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6327         else
6328           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6329         fi
6330         ;;
6331       esac
6332       _LT_TAGVAR(link_all_deplibs, $1)=yes
6333       ;;
6334
6335     sunos4*)
6336       if test "x$host_vendor" = xsequent; then
6337         # Use $CC to link under sequent, because it throws in some extra .o
6338         # files that make .init and .fini sections work.
6339         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6340       else
6341         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6342       fi
6343       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6344       _LT_TAGVAR(hardcode_direct, $1)=yes
6345       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6346       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6347       ;;
6348
6349     sysv4)
6350       case $host_vendor in
6351         sni)
6352           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6353           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6354         ;;
6355         siemens)
6356           ## LD is ld it makes a PLAMLIB
6357           ## CC just makes a GrossModule.
6358           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6359           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6360           _LT_TAGVAR(hardcode_direct, $1)=no
6361         ;;
6362         motorola)
6363           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6364           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6365         ;;
6366       esac
6367       runpath_var='LD_RUN_PATH'
6368       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6369       ;;
6370
6371     sysv4.3*)
6372       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6373       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6374       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6375       ;;
6376
6377     sysv4*MP*)
6378       if test -d /usr/nec; then
6379         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6380         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6381         runpath_var=LD_RUN_PATH
6382         hardcode_runpath_var=yes
6383         _LT_TAGVAR(ld_shlibs, $1)=yes
6384       fi
6385       ;;
6386
6387     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6388       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6389       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6390       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6391       runpath_var='LD_RUN_PATH'
6392
6393       if test "$GCC" = yes; then
6394         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6395         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6396       else
6397         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6398         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6399       fi
6400       ;;
6401
6402     sysv5* | sco3.2v5* | sco5v6*)
6403       # Note: We can NOT use -z defs as we might desire, because we do not
6404       # link with -lc, and that would cause any symbols used from libc to
6405       # always be unresolved, which means just about no library would
6406       # ever link correctly.  If we're not using GNU ld we use -z text
6407       # though, which does catch some bad symbols but isn't as heavy-handed
6408       # as -z defs.
6409       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6410       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6411       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6412       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6413       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6414       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6415       _LT_TAGVAR(link_all_deplibs, $1)=yes
6416       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6417       runpath_var='LD_RUN_PATH'
6418
6419       if test "$GCC" = yes; then
6420         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6421         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6422       else
6423         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6424         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6425       fi
6426       ;;
6427
6428     uts4*)
6429       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6430       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6431       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6432       ;;
6433
6434     *)
6435       _LT_TAGVAR(ld_shlibs, $1)=no
6436       ;;
6437     esac
6438
6439     if test x$host_vendor = xsni; then
6440       case $host in
6441       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6442         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6443         ;;
6444       esac
6445     fi
6446   fi
6447 ])
6448 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6449 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6450
6451 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6452
6453 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6454 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6455 _LT_DECL([], [extract_expsyms_cmds], [2],
6456     [The commands to extract the exported symbol list from a shared archive])
6457
6458 #
6459 # Do we need to explicitly link libc?
6460 #
6461 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6462 x|xyes)
6463   # Assume -lc should be added
6464   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6465
6466   if test "$enable_shared" = yes && test "$GCC" = yes; then
6467     case $_LT_TAGVAR(archive_cmds, $1) in
6468     *'~'*)
6469       # FIXME: we may have to deal with multi-command sequences.
6470       ;;
6471     '$CC '*)
6472       # Test whether the compiler implicitly links with -lc since on some
6473       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6474       # to ld, don't add -lc before -lgcc.
6475       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6476       $RM conftest*
6477       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6478
6479       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6480         soname=conftest
6481         lib=conftest
6482         libobjs=conftest.$ac_objext
6483         deplibs=
6484         wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6485         pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6486         compiler_flags=-v
6487         linker_flags=-v
6488         verstring=
6489         output_objdir=.
6490         libname=conftest
6491         lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6492         _LT_TAGVAR(allow_undefined_flag, $1)=
6493         if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6494         then
6495           _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6496         else
6497           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6498         fi
6499         _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6500       else
6501         cat conftest.err 1>&5
6502       fi
6503       $RM conftest*
6504       AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
6505       ;;
6506     esac
6507   fi
6508   ;;
6509 esac
6510
6511 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6512     [Whether or not to add -lc for building shared libraries])
6513 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6514     [enable_shared_with_static_runtimes], [0],
6515     [Whether or not to disallow shared libs when runtime libs are static])
6516 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6517     [Compiler flag to allow reflexive dlopens])
6518 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6519     [Compiler flag to generate shared objects directly from archives])
6520 _LT_TAGDECL([], [compiler_needs_object], [1],
6521     [Whether the compiler copes with passing no objects directly])
6522 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6523     [Create an old-style archive from a shared archive])
6524 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6525     [Create a temporary old-style archive to link instead of a shared archive])
6526 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6527 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6528 _LT_TAGDECL([], [module_cmds], [2],
6529     [Commands used to build a loadable module if different from building
6530     a shared archive.])
6531 _LT_TAGDECL([], [module_expsym_cmds], [2])
6532 _LT_TAGDECL([], [with_gnu_ld], [1],
6533     [Whether we are building with GNU ld or not])
6534 _LT_TAGDECL([], [allow_undefined_flag], [1],
6535     [Flag that allows shared libraries with undefined symbols to be built])
6536 _LT_TAGDECL([], [no_undefined_flag], [1],
6537     [Flag that enforces no undefined symbols])
6538 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6539     [Flag to hardcode $libdir into a binary during linking.
6540     This must work even if $libdir does not exist])
6541 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6542     [[If ld is used when linking, flag to hardcode $libdir into a binary
6543     during linking.  This must work even if $libdir does not exist]])
6544 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6545     [Whether we need a single "-rpath" flag with a separated argument])
6546 _LT_TAGDECL([], [hardcode_direct], [0],
6547     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6548     DIR into the resulting binary])
6549 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6550     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6551     DIR into the resulting binary and the resulting library dependency is
6552     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6553     library is relocated])
6554 _LT_TAGDECL([], [hardcode_minus_L], [0],
6555     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6556     into the resulting binary])
6557 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6558     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6559     into the resulting binary])
6560 _LT_TAGDECL([], [hardcode_automatic], [0],
6561     [Set to "yes" if building a shared library automatically hardcodes DIR
6562     into the library and all subsequent libraries and executables linked
6563     against it])
6564 _LT_TAGDECL([], [inherit_rpath], [0],
6565     [Set to yes if linker adds runtime paths of dependent libraries
6566     to runtime path list])
6567 _LT_TAGDECL([], [link_all_deplibs], [0],
6568     [Whether libtool must link a program against all its dependency libraries])
6569 _LT_TAGDECL([], [fix_srcfile_path], [1],
6570     [Fix the shell variable $srcfile for the compiler])
6571 _LT_TAGDECL([], [always_export_symbols], [0],
6572     [Set to "yes" if exported symbols are required])
6573 _LT_TAGDECL([], [export_symbols_cmds], [2],
6574     [The commands to list exported symbols])
6575 _LT_TAGDECL([], [exclude_expsyms], [1],
6576     [Symbols that should not be listed in the preloaded symbols])
6577 _LT_TAGDECL([], [include_expsyms], [1],
6578     [Symbols that must always be exported])
6579 _LT_TAGDECL([], [prelink_cmds], [2],
6580     [Commands necessary for linking programs (against libraries) with templates])
6581 _LT_TAGDECL([], [file_list_spec], [1],
6582     [Specify filename containing input files])
6583 dnl FIXME: Not yet implemented
6584 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6585 dnl    [Compiler flag to generate thread safe objects])
6586 ])# _LT_LINKER_SHLIBS
6587
6588
6589 # _LT_LANG_C_CONFIG([TAG])
6590 # ------------------------
6591 # Ensure that the configuration variables for a C compiler are suitably
6592 # defined.  These variables are subsequently used by _LT_CONFIG to write
6593 # the compiler configuration to `libtool'.
6594 m4_defun([_LT_LANG_C_CONFIG],
6595 [m4_require([_LT_DECL_EGREP])dnl
6596 lt_save_CC="$CC"
6597 AC_LANG_PUSH(C)
6598
6599 # Source file extension for C test sources.
6600 ac_ext=c
6601
6602 # Object file extension for compiled C test sources.
6603 objext=o
6604 _LT_TAGVAR(objext, $1)=$objext
6605
6606 # Code to be used in simple compile tests
6607 lt_simple_compile_test_code="int some_variable = 0;"
6608
6609 # Code to be used in simple link tests
6610 lt_simple_link_test_code='int main(){return(0);}'
6611
6612 _LT_TAG_COMPILER
6613 # Save the default compiler, since it gets overwritten when the other
6614 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6615 compiler_DEFAULT=$CC
6616
6617 # save warnings/boilerplate of simple test code
6618 _LT_COMPILER_BOILERPLATE
6619 _LT_LINKER_BOILERPLATE
6620
6621 if test -n "$compiler"; then
6622   _LT_COMPILER_NO_RTTI($1)
6623   _LT_COMPILER_PIC($1)
6624   _LT_COMPILER_C_O($1)
6625   _LT_COMPILER_FILE_LOCKS($1)
6626   _LT_LINKER_SHLIBS($1)
6627   _LT_SYS_DYNAMIC_LINKER($1)
6628   _LT_LINKER_HARDCODE_LIBPATH($1)
6629   LT_SYS_DLOPEN_SELF
6630   _LT_CMD_STRIPLIB
6631
6632   # Report which library types will actually be built
6633   AC_MSG_CHECKING([if libtool supports shared libraries])
6634   AC_MSG_RESULT([$can_build_shared])
6635
6636   AC_MSG_CHECKING([whether to build shared libraries])
6637   test "$can_build_shared" = "no" && enable_shared=no
6638
6639   # On AIX, shared libraries and static libraries use the same namespace, and
6640   # are all built from PIC.
6641   case $host_os in
6642   aix3*)
6643     test "$enable_shared" = yes && enable_static=no
6644     if test -n "$RANLIB"; then
6645       archive_cmds="$archive_cmds~\$RANLIB \$lib"
6646       postinstall_cmds='$RANLIB $lib'
6647     fi
6648     ;;
6649
6650   aix[[4-9]]*)
6651     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6652       test "$enable_shared" = yes && enable_static=no
6653     fi
6654     ;;
6655   esac
6656   AC_MSG_RESULT([$enable_shared])
6657
6658   AC_MSG_CHECKING([whether to build static libraries])
6659   # Make sure either enable_shared or enable_static is yes.
6660   test "$enable_shared" = yes || enable_static=yes
6661   AC_MSG_RESULT([$enable_static])
6662
6663   _LT_CONFIG($1)
6664 fi
6665 AC_LANG_POP
6666 CC="$lt_save_CC"
6667 ])# _LT_LANG_C_CONFIG
6668
6669
6670 # _LT_PROG_CXX
6671 # ------------
6672 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
6673 # compiler, we have our own version here.
6674 m4_defun([_LT_PROG_CXX],
6675 [
6676 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6677 AC_PROG_CXX
6678 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6679     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6680     (test "X$CXX" != "Xg++"))) ; then
6681   AC_PROG_CXXCPP
6682 else
6683   _lt_caught_CXX_error=yes
6684 fi
6685 popdef([AC_MSG_ERROR])
6686 ])# _LT_PROG_CXX
6687
6688 dnl aclocal-1.4 backwards compatibility:
6689 dnl AC_DEFUN([_LT_PROG_CXX], [])
6690
6691
6692 # _LT_LANG_CXX_CONFIG([TAG])
6693 # --------------------------
6694 # Ensure that the configuration variables for a C++ compiler are suitably
6695 # defined.  These variables are subsequently used by _LT_CONFIG to write
6696 # the compiler configuration to `libtool'.
6697 m4_defun([_LT_LANG_CXX_CONFIG],
6698 [AC_REQUIRE([_LT_PROG_CXX])dnl
6699 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6700 m4_require([_LT_DECL_EGREP])dnl
6701
6702 AC_LANG_PUSH(C++)
6703 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6704 _LT_TAGVAR(allow_undefined_flag, $1)=
6705 _LT_TAGVAR(always_export_symbols, $1)=no
6706 _LT_TAGVAR(archive_expsym_cmds, $1)=
6707 _LT_TAGVAR(compiler_needs_object, $1)=no
6708 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6709 _LT_TAGVAR(hardcode_direct, $1)=no
6710 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6711 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6712 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6713 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6714 _LT_TAGVAR(hardcode_minus_L, $1)=no
6715 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6716 _LT_TAGVAR(hardcode_automatic, $1)=no
6717 _LT_TAGVAR(inherit_rpath, $1)=no
6718 _LT_TAGVAR(module_cmds, $1)=
6719 _LT_TAGVAR(module_expsym_cmds, $1)=
6720 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6721 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6722 _LT_TAGVAR(no_undefined_flag, $1)=
6723 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6724 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6725
6726 # Source file extension for C++ test sources.
6727 ac_ext=cpp
6728
6729 # Object file extension for compiled C++ test sources.
6730 objext=o
6731 _LT_TAGVAR(objext, $1)=$objext
6732
6733 # No sense in running all these tests if we already determined that
6734 # the CXX compiler isn't working.  Some variables (like enable_shared)
6735 # are currently assumed to apply to all compilers on this platform,
6736 # and will be corrupted by setting them based on a non-working compiler.
6737 if test "$_lt_caught_CXX_error" != yes; then
6738   # Code to be used in simple compile tests
6739   lt_simple_compile_test_code="int some_variable = 0;"
6740
6741   # Code to be used in simple link tests
6742   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6743
6744   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6745   _LT_TAG_COMPILER
6746
6747   # save warnings/boilerplate of simple test code
6748   _LT_COMPILER_BOILERPLATE
6749   _LT_LINKER_BOILERPLATE
6750
6751   # Allow CC to be a program name with arguments.
6752   lt_save_CC=$CC
6753   lt_save_LD=$LD
6754   lt_save_GCC=$GCC
6755   GCC=$GXX
6756   lt_save_with_gnu_ld=$with_gnu_ld
6757   lt_save_path_LD=$lt_cv_path_LD
6758   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6759     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6760   else
6761     $as_unset lt_cv_prog_gnu_ld
6762   fi
6763   if test -n "${lt_cv_path_LDCXX+set}"; then
6764     lt_cv_path_LD=$lt_cv_path_LDCXX
6765   else
6766     $as_unset lt_cv_path_LD
6767   fi
6768   test -z "${LDCXX+set}" || LD=$LDCXX
6769   CC=${CXX-"c++"}
6770   compiler=$CC
6771   _LT_TAGVAR(compiler, $1)=$CC
6772   _LT_CC_BASENAME([$compiler])
6773
6774   if test -n "$compiler"; then
6775     # We don't want -fno-exception when compiling C++ code, so set the
6776     # no_builtin_flag separately
6777     if test "$GXX" = yes; then
6778       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6779     else
6780       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6781     fi
6782
6783     if test "$GXX" = yes; then
6784       # Set up default GNU C++ configuration
6785
6786       LT_PATH_LD
6787
6788       # Check if GNU C++ uses GNU ld as the underlying linker, since the
6789       # archiving commands below assume that GNU ld is being used.
6790       if test "$with_gnu_ld" = yes; then
6791         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6792         _LT_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'
6793
6794         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6795         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6796
6797         # If archive_cmds runs LD, not CC, wlarc should be empty
6798         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6799         #     investigate it a little bit more. (MM)
6800         wlarc='${wl}'
6801
6802         # ancient GNU ld didn't support --whole-archive et. al.
6803         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6804           $GREP 'no-whole-archive' > /dev/null; then
6805           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6806         else
6807           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6808         fi
6809       else
6810         with_gnu_ld=no
6811         wlarc=
6812
6813         # A generic and very simple default shared library creation
6814         # command for GNU C++ for the case where it uses the native
6815         # linker, instead of GNU ld.  If possible, this setting should
6816         # overridden to take advantage of the native linker features on
6817         # the platform it is being used on.
6818         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6819       fi
6820
6821       # Commands to make compiler produce verbose output that lists
6822       # what "hidden" libraries, object files and flags are used when
6823       # linking a shared library.
6824       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6825
6826     else
6827       GXX=no
6828       with_gnu_ld=no
6829       wlarc=
6830     fi
6831
6832     # PORTME: fill in a description of your system's C++ link characteristics
6833     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6834     _LT_TAGVAR(ld_shlibs, $1)=yes
6835     case $host_os in
6836       aix3*)
6837         # FIXME: insert proper C++ library support
6838         _LT_TAGVAR(ld_shlibs, $1)=no
6839         ;;
6840       aix[[4-9]]*)
6841         if test "$host_cpu" = ia64; then
6842           # On IA64, the linker does run time linking by default, so we don't
6843           # have to do anything special.
6844           aix_use_runtimelinking=no
6845           exp_sym_flag='-Bexport'
6846           no_entry_flag=""
6847         else
6848           aix_use_runtimelinking=no
6849
6850           # Test if we are trying to use run time linking or normal
6851           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6852           # need to do runtime linking.
6853           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6854             for ld_flag in $LDFLAGS; do
6855               case $ld_flag in
6856               *-brtl*)
6857                 aix_use_runtimelinking=yes
6858                 break
6859                 ;;
6860               esac
6861             done
6862             ;;
6863           esac
6864
6865           exp_sym_flag='-bexport'
6866           no_entry_flag='-bnoentry'
6867         fi
6868
6869         # When large executables or shared objects are built, AIX ld can
6870         # have problems creating the table of contents.  If linking a library
6871         # or program results in "error TOC overflow" add -mminimal-toc to
6872         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6873         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6874
6875         _LT_TAGVAR(archive_cmds, $1)=''
6876         _LT_TAGVAR(hardcode_direct, $1)=yes
6877         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6878         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6879         _LT_TAGVAR(link_all_deplibs, $1)=yes
6880         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6881
6882         if test "$GXX" = yes; then
6883           case $host_os in aix4.[[012]]|aix4.[[012]].*)
6884           # We only want to do this on AIX 4.2 and lower, the check
6885           # below for broken collect2 doesn't work under 4.3+
6886           collect2name=`${CC} -print-prog-name=collect2`
6887           if test -f "$collect2name" &&
6888              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6889           then
6890             # We have reworked collect2
6891             :
6892           else
6893             # We have old collect2
6894             _LT_TAGVAR(hardcode_direct, $1)=unsupported
6895             # It fails to find uninstalled libraries when the uninstalled
6896             # path is not listed in the libpath.  Setting hardcode_minus_L
6897             # to unsupported forces relinking
6898             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6899             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6900             _LT_TAGVAR(hardcode_libdir_separator, $1)=
6901           fi
6902           esac
6903           shared_flag='-shared'
6904           if test "$aix_use_runtimelinking" = yes; then
6905             shared_flag="$shared_flag "'${wl}-G'
6906           fi
6907         else
6908           # not using gcc
6909           if test "$host_cpu" = ia64; then
6910           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6911           # chokes on -Wl,-G. The following line is correct:
6912           shared_flag='-G'
6913           else
6914             if test "$aix_use_runtimelinking" = yes; then
6915               shared_flag='${wl}-G'
6916             else
6917               shared_flag='${wl}-bM:SRE'
6918             fi
6919           fi
6920         fi
6921
6922         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6923         # It seems that -bexpall does not export symbols beginning with
6924         # underscore (_), so it is better to generate a list of symbols to
6925         # export.
6926         _LT_TAGVAR(always_export_symbols, $1)=yes
6927         if test "$aix_use_runtimelinking" = yes; then
6928           # Warning - without using the other runtime loading flags (-brtl),
6929           # -berok will link without error, but may produce a broken library.
6930           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6931           # Determine the default libpath from the value encoded in an empty
6932           # executable.
6933           _LT_SYS_MODULE_PATH_AIX
6934           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6935
6936           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6937         else
6938           if test "$host_cpu" = ia64; then
6939             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6940             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6941             _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6942           else
6943             # Determine the default libpath from the value encoded in an
6944             # empty executable.
6945             _LT_SYS_MODULE_PATH_AIX
6946             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6947             # Warning - without using the other run time loading flags,
6948             # -berok will link without error, but may produce a broken library.
6949             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6950             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6951             # Exported symbols can be pulled into shared objects from archives
6952             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6953             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6954             # This is similar to how AIX traditionally builds its shared
6955             # libraries.
6956             _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6957           fi
6958         fi
6959         ;;
6960
6961       beos*)
6962         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6963           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6964           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6965           # support --undefined.  This deserves some investigation.  FIXME
6966           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6967         else
6968           _LT_TAGVAR(ld_shlibs, $1)=no
6969         fi
6970         ;;
6971
6972       chorus*)
6973         case $cc_basename in
6974           *)
6975           # FIXME: insert proper C++ library support
6976           _LT_TAGVAR(ld_shlibs, $1)=no
6977           ;;
6978         esac
6979         ;;
6980
6981       cygwin* | mingw* | pw32* | cegcc*)
6982         # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6983         # as there is no search path for DLLs.
6984         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6985         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6986         _LT_TAGVAR(always_export_symbols, $1)=no
6987         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6988
6989         if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6990           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6991           # If the export-symbols file already is a .def file (1st line
6992           # is EXPORTS), use it as is; otherwise, prepend...
6993           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6994             cp $export_symbols $output_objdir/$soname.def;
6995           else
6996             echo EXPORTS > $output_objdir/$soname.def;
6997             cat $export_symbols >> $output_objdir/$soname.def;
6998           fi~
6999           $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7000         else
7001           _LT_TAGVAR(ld_shlibs, $1)=no
7002         fi
7003         ;;
7004       darwin* | rhapsody*)
7005         _LT_DARWIN_LINKER_FEATURES($1)
7006         ;;
7007
7008       dgux*)
7009         case $cc_basename in
7010           ec++*)
7011             # FIXME: insert proper C++ library support
7012             _LT_TAGVAR(ld_shlibs, $1)=no
7013             ;;
7014           ghcx*)
7015             # Green Hills C++ Compiler
7016             # FIXME: insert proper C++ library support
7017             _LT_TAGVAR(ld_shlibs, $1)=no
7018             ;;
7019           *)
7020             # FIXME: insert proper C++ library support
7021             _LT_TAGVAR(ld_shlibs, $1)=no
7022             ;;
7023         esac
7024         ;;
7025
7026       freebsd[[12]]*)
7027         # C++ shared libraries reported to be fairly broken before
7028         # switch to ELF
7029         _LT_TAGVAR(ld_shlibs, $1)=no
7030         ;;
7031
7032       freebsd-elf*)
7033         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7034         ;;
7035
7036       freebsd* | dragonfly*)
7037         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7038         # conventions
7039         _LT_TAGVAR(ld_shlibs, $1)=yes
7040         ;;
7041
7042       gnu*)
7043         ;;
7044
7045       hpux9*)
7046         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7047         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7048         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7049         _LT_TAGVAR(hardcode_direct, $1)=yes
7050         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7051                                              # but as the default
7052                                              # location of the library.
7053
7054         case $cc_basename in
7055           CC*)
7056             # FIXME: insert proper C++ library support
7057             _LT_TAGVAR(ld_shlibs, $1)=no
7058             ;;
7059           aCC*)
7060             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7061             # Commands to make compiler produce verbose output that lists
7062             # what "hidden" libraries, object files and flags are used when
7063             # linking a shared library.
7064             #
7065             # There doesn't appear to be a way to prevent this compiler from
7066             # explicitly linking system object files so we need to strip them
7067             # from the output so that they don't get included in the library
7068             # dependencies.
7069             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
7070             ;;
7071           *)
7072             if test "$GXX" = yes; then
7073               _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7074             else
7075               # FIXME: insert proper C++ library support
7076               _LT_TAGVAR(ld_shlibs, $1)=no
7077             fi
7078             ;;
7079         esac
7080         ;;
7081
7082       hpux10*|hpux11*)
7083         if test $with_gnu_ld = no; then
7084           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7085           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7086
7087           case $host_cpu in
7088             hppa*64*|ia64*)
7089               ;;
7090             *)
7091               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7092               ;;
7093           esac
7094         fi
7095         case $host_cpu in
7096           hppa*64*|ia64*)
7097             _LT_TAGVAR(hardcode_direct, $1)=no
7098             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7099             ;;
7100           *)
7101             _LT_TAGVAR(hardcode_direct, $1)=yes
7102             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7103             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7104                                                  # but as the default
7105                                                  # location of the library.
7106             ;;
7107         esac
7108
7109         case $cc_basename in
7110           CC*)
7111             # FIXME: insert proper C++ library support
7112             _LT_TAGVAR(ld_shlibs, $1)=no
7113             ;;
7114           aCC*)
7115             case $host_cpu in
7116               hppa*64*)
7117                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7118                 ;;
7119               ia64*)
7120                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7121                 ;;
7122               *)
7123                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7124                 ;;
7125             esac
7126             # Commands to make compiler produce verbose output that lists
7127             # what "hidden" libraries, object files and flags are used when
7128             # linking a shared library.
7129             #
7130             # There doesn't appear to be a way to prevent this compiler from
7131             # explicitly linking system object files so we need to strip them
7132             # from the output so that they don't get included in the library
7133             # dependencies.
7134             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
7135             ;;
7136           *)
7137             if test "$GXX" = yes; then
7138               if test $with_gnu_ld = no; then
7139                 case $host_cpu in
7140                   hppa*64*)
7141                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7142                     ;;
7143                   ia64*)
7144                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7145                     ;;
7146                   *)
7147                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7148                     ;;
7149                 esac
7150               fi
7151             else
7152               # FIXME: insert proper C++ library support
7153               _LT_TAGVAR(ld_shlibs, $1)=no
7154             fi
7155             ;;
7156         esac
7157         ;;
7158
7159       interix[[3-9]]*)
7160         _LT_TAGVAR(hardcode_direct, $1)=no
7161         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7162         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7163         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7164         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7165         # Instead, shared libraries are loaded at an image base (0x10000000 by
7166         # default) and relocated if they conflict, which is a slow very memory
7167         # consuming and fragmenting process.  To avoid this, we pick a random,
7168         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7169         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7170         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7171         _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7172         ;;
7173       irix5* | irix6*)
7174         case $cc_basename in
7175           CC*)
7176             # SGI C++
7177             _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7178
7179             # Archives containing C++ object files must be created using
7180             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7181             # necessary to make sure instantiated templates are included
7182             # in the archive.
7183             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7184             ;;
7185           *)
7186             if test "$GXX" = yes; then
7187               if test "$with_gnu_ld" = no; then
7188                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7189               else
7190                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
7191               fi
7192             fi
7193             _LT_TAGVAR(link_all_deplibs, $1)=yes
7194             ;;
7195         esac
7196         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7197         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7198         _LT_TAGVAR(inherit_rpath, $1)=yes
7199         ;;
7200
7201       linux* | k*bsd*-gnu | kopensolaris*-gnu)
7202         case $cc_basename in
7203           KCC*)
7204             # Kuck and Associates, Inc. (KAI) C++ Compiler
7205
7206             # KCC will only create a shared library if the output file
7207             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7208             # to its proper name (with version) after linking.
7209             _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7210             _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
7211             # Commands to make compiler produce verbose output that lists
7212             # what "hidden" libraries, object files and flags are used when
7213             # linking a shared library.
7214             #
7215             # There doesn't appear to be a way to prevent this compiler from
7216             # explicitly linking system object files so we need to strip them
7217             # from the output so that they don't get included in the library
7218             # dependencies.
7219             output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
7220
7221             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7222             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7223
7224             # Archives containing C++ object files must be created using
7225             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7226             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7227             ;;
7228           icpc* | ecpc* )
7229             # Intel C++
7230             with_gnu_ld=yes
7231             # version 8.0 and above of icpc choke on multiply defined symbols
7232             # if we add $predep_objects and $postdep_objects, however 7.1 and
7233             # earlier do not add the objects themselves.
7234             case `$CC -V 2>&1` in
7235               *"Version 7."*)
7236                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7237                 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7238                 ;;
7239               *)  # Version 8.0 or newer
7240                 tmp_idyn=
7241                 case $host_cpu in
7242                   ia64*) tmp_idyn=' -i_dynamic';;
7243                 esac
7244                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7245                 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7246                 ;;
7247             esac
7248             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7249             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7250             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7251             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7252             ;;
7253           pgCC* | pgcpp*)
7254             # Portland Group C++ compiler
7255             case `$CC -V` in
7256             *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
7257               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7258                 rm -rf $tpldir~
7259                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7260                 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
7261               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7262                 rm -rf $tpldir~
7263                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7264                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
7265                 $RANLIB $oldlib'
7266               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7267                 rm -rf $tpldir~
7268                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7269                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7270               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7271                 rm -rf $tpldir~
7272                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7273                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7274               ;;
7275             *) # Version 6 will use weak symbols
7276               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7277               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7278               ;;
7279             esac
7280
7281             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7282             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7283             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
7284             ;;
7285           cxx*)
7286             # Compaq C++
7287             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7288             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
7289
7290             runpath_var=LD_RUN_PATH
7291             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7292             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7293
7294             # Commands to make compiler produce verbose output that lists
7295             # what "hidden" libraries, object files and flags are used when
7296             # linking a shared library.
7297             #
7298             # There doesn't appear to be a way to prevent this compiler from
7299             # explicitly linking system object files so we need to strip them
7300             # from the output so that they don't get included in the library
7301             # dependencies.
7302             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
7303             ;;
7304           xl*)
7305             # IBM XL 8.0 on PPC, with GNU ld
7306             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7307             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7308             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7309             if test "x$supports_anon_versioning" = xyes; then
7310               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7311                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7312                 echo "local: *; };" >> $output_objdir/$libname.ver~
7313                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7314             fi
7315             ;;
7316           *)
7317             case `$CC -V 2>&1 | sed 5q` in
7318             *Sun\ C*)
7319               # Sun C++ 5.9
7320               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7321               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7322               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
7323               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7324               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
7325               _LT_TAGVAR(compiler_needs_object, $1)=yes
7326
7327               # Not sure whether something based on
7328               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7329               # would be better.
7330               output_verbose_link_cmd='echo'
7331
7332               # Archives containing C++ object files must be created using
7333               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7334               # necessary to make sure instantiated templates are included
7335               # in the archive.
7336               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7337               ;;
7338             esac
7339             ;;
7340         esac
7341         ;;
7342
7343       lynxos*)
7344         # FIXME: insert proper C++ library support
7345         _LT_TAGVAR(ld_shlibs, $1)=no
7346         ;;
7347
7348       m88k*)
7349         # FIXME: insert proper C++ library support
7350         _LT_TAGVAR(ld_shlibs, $1)=no
7351         ;;
7352
7353       mvs*)
7354         case $cc_basename in
7355           cxx*)
7356             # FIXME: insert proper C++ library support
7357             _LT_TAGVAR(ld_shlibs, $1)=no
7358             ;;
7359           *)
7360             # FIXME: insert proper C++ library support
7361             _LT_TAGVAR(ld_shlibs, $1)=no
7362             ;;
7363         esac
7364         ;;
7365
7366       netbsd*)
7367         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7368           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7369           wlarc=
7370           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7371           _LT_TAGVAR(hardcode_direct, $1)=yes
7372           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7373         fi
7374         # Workaround some broken pre-1.5 toolchains
7375         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7376         ;;
7377
7378       *nto* | *qnx*)
7379         _LT_TAGVAR(ld_shlibs, $1)=yes
7380         ;;
7381
7382       openbsd2*)
7383         # C++ shared libraries are fairly broken
7384         _LT_TAGVAR(ld_shlibs, $1)=no
7385         ;;
7386
7387       openbsd*)
7388         if test -f /usr/libexec/ld.so; then
7389           _LT_TAGVAR(hardcode_direct, $1)=yes
7390           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7391           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7392           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7393           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7394           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7395             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
7396             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7397             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7398           fi
7399           output_verbose_link_cmd=echo
7400         else
7401           _LT_TAGVAR(ld_shlibs, $1)=no
7402         fi
7403         ;;
7404
7405       osf3* | osf4* | osf5*)
7406         case $cc_basename in
7407           KCC*)
7408             # Kuck and Associates, Inc. (KAI) C++ Compiler
7409
7410             # KCC will only create a shared library if the output file
7411             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7412             # to its proper name (with version) after linking.
7413             _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7414
7415             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7416             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7417
7418             # Archives containing C++ object files must be created using
7419             # the KAI C++ compiler.
7420             case $host in
7421               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7422               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7423             esac
7424             ;;
7425           RCC*)
7426             # Rational C++ 2.4.1
7427             # FIXME: insert proper C++ library support
7428             _LT_TAGVAR(ld_shlibs, $1)=no
7429             ;;
7430           cxx*)
7431             case $host in
7432               osf3*)
7433                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7434                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7435                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7436                 ;;
7437               *)
7438                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7439                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7440                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7441                   echo "-hidden">> $lib.exp~
7442                   $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
7443                   $RM $lib.exp'
7444                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7445                 ;;
7446             esac
7447
7448             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7449
7450             # Commands to make compiler produce verbose output that lists
7451             # what "hidden" libraries, object files and flags are used when
7452             # linking a shared library.
7453             #
7454             # There doesn't appear to be a way to prevent this compiler from
7455             # explicitly linking system object files so we need to strip them
7456             # from the output so that they don't get included in the library
7457             # dependencies.
7458             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
7459             ;;
7460           *)
7461             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7462               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7463               case $host in
7464                 osf3*)
7465                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7466                   ;;
7467                 *)
7468                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7469                   ;;
7470               esac
7471
7472               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7473               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7474
7475               # Commands to make compiler produce verbose output that lists
7476               # what "hidden" libraries, object files and flags are used when
7477               # linking a shared library.
7478               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7479
7480             else
7481               # FIXME: insert proper C++ library support
7482               _LT_TAGVAR(ld_shlibs, $1)=no
7483             fi
7484             ;;
7485         esac
7486         ;;
7487
7488       psos*)
7489         # FIXME: insert proper C++ library support
7490         _LT_TAGVAR(ld_shlibs, $1)=no
7491         ;;
7492
7493       sunos4*)
7494         case $cc_basename in
7495           CC*)
7496             # Sun C++ 4.x
7497             # FIXME: insert proper C++ library support
7498             _LT_TAGVAR(ld_shlibs, $1)=no
7499             ;;
7500           lcc*)
7501             # Lucid
7502             # FIXME: insert proper C++ library support
7503             _LT_TAGVAR(ld_shlibs, $1)=no
7504             ;;
7505           *)
7506             # FIXME: insert proper C++ library support
7507             _LT_TAGVAR(ld_shlibs, $1)=no
7508             ;;
7509         esac
7510         ;;
7511
7512       solaris*)
7513         case $cc_basename in
7514           CC*)
7515             # Sun C++ 4.2, 5.x and Centerline C++
7516             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7517             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7518             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7519             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7520               $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7521
7522             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7523             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7524             case $host_os in
7525               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7526               *)
7527                 # The compiler driver will combine and reorder linker options,
7528                 # but understands `-z linker_flag'.
7529                 # Supported since Solaris 2.6 (maybe 2.5.1?)
7530                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7531                 ;;
7532             esac
7533             _LT_TAGVAR(link_all_deplibs, $1)=yes
7534
7535             output_verbose_link_cmd='echo'
7536
7537             # Archives containing C++ object files must be created using
7538             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7539             # necessary to make sure instantiated templates are included
7540             # in the archive.
7541             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7542             ;;
7543           gcx*)
7544             # Green Hills C++ Compiler
7545             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7546
7547             # The C++ compiler must be used to create the archive.
7548             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7549             ;;
7550           *)
7551             # GNU C++ compiler with Solaris linker
7552             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7553               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7554               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7555                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7556                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7557                   $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7558
7559                 # Commands to make compiler produce verbose output that lists
7560                 # what "hidden" libraries, object files and flags are used when
7561                 # linking a shared library.
7562                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7563               else
7564                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7565                 # platform.
7566                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7567                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7568                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7569
7570                 # Commands to make compiler produce verbose output that lists
7571                 # what "hidden" libraries, object files and flags are used when
7572                 # linking a shared library.
7573                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7574               fi
7575
7576               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7577               case $host_os in
7578                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7579                 *)
7580                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7581                   ;;
7582               esac
7583             fi
7584             ;;
7585         esac
7586         ;;
7587
7588     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7589       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7590       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7591       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7592       runpath_var='LD_RUN_PATH'
7593
7594       case $cc_basename in
7595         CC*)
7596           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7597           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7598           ;;
7599         *)
7600           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7601           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7602           ;;
7603       esac
7604       ;;
7605
7606       sysv5* | sco3.2v5* | sco5v6*)
7607         # Note: We can NOT use -z defs as we might desire, because we do not
7608         # link with -lc, and that would cause any symbols used from libc to
7609         # always be unresolved, which means just about no library would
7610         # ever link correctly.  If we're not using GNU ld we use -z text
7611         # though, which does catch some bad symbols but isn't as heavy-handed
7612         # as -z defs.
7613         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7614         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7615         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7616         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7617         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7618         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7619         _LT_TAGVAR(link_all_deplibs, $1)=yes
7620         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7621         runpath_var='LD_RUN_PATH'
7622
7623         case $cc_basename in
7624           CC*)
7625             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7626             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7627             ;;
7628           *)
7629             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7630             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7631             ;;
7632         esac
7633       ;;
7634
7635       tandem*)
7636         case $cc_basename in
7637           NCC*)
7638             # NonStop-UX NCC 3.20
7639             # FIXME: insert proper C++ library support
7640             _LT_TAGVAR(ld_shlibs, $1)=no
7641             ;;
7642           *)
7643             # FIXME: insert proper C++ library support
7644             _LT_TAGVAR(ld_shlibs, $1)=no
7645             ;;
7646         esac
7647         ;;
7648
7649       vxworks*)
7650         # FIXME: insert proper C++ library support
7651         _LT_TAGVAR(ld_shlibs, $1)=no
7652         ;;
7653
7654       *)
7655         # FIXME: insert proper C++ library support
7656         _LT_TAGVAR(ld_shlibs, $1)=no
7657         ;;
7658     esac
7659
7660     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7661     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7662
7663     _LT_TAGVAR(GCC, $1)="$GXX"
7664     _LT_TAGVAR(LD, $1)="$LD"
7665
7666     ## CAVEAT EMPTOR:
7667     ## There is no encapsulation within the following macros, do not change
7668     ## the running order or otherwise move them around unless you know exactly
7669     ## what you are doing...
7670     _LT_SYS_HIDDEN_LIBDEPS($1)
7671     _LT_COMPILER_PIC($1)
7672     _LT_COMPILER_C_O($1)
7673     _LT_COMPILER_FILE_LOCKS($1)
7674     _LT_LINKER_SHLIBS($1)
7675     _LT_SYS_DYNAMIC_LINKER($1)
7676     _LT_LINKER_HARDCODE_LIBPATH($1)
7677
7678     _LT_CONFIG($1)
7679   fi # test -n "$compiler"
7680
7681   CC=$lt_save_CC
7682   LDCXX=$LD
7683   LD=$lt_save_LD
7684   GCC=$lt_save_GCC
7685   with_gnu_ld=$lt_save_with_gnu_ld
7686   lt_cv_path_LDCXX=$lt_cv_path_LD
7687   lt_cv_path_LD=$lt_save_path_LD
7688   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7689   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7690 fi # test "$_lt_caught_CXX_error" != yes
7691
7692 AC_LANG_POP
7693 ])# _LT_LANG_CXX_CONFIG
7694
7695
7696 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7697 # ---------------------------------
7698 # Figure out "hidden" library dependencies from verbose
7699 # compiler output when linking a shared library.
7700 # Parse the compiler output and extract the necessary
7701 # objects, libraries and library flags.
7702 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7703 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7704 # Dependencies to place before and after the object being linked:
7705 _LT_TAGVAR(predep_objects, $1)=
7706 _LT_TAGVAR(postdep_objects, $1)=
7707 _LT_TAGVAR(predeps, $1)=
7708 _LT_TAGVAR(postdeps, $1)=
7709 _LT_TAGVAR(compiler_lib_search_path, $1)=
7710
7711 dnl we can't use the lt_simple_compile_test_code here,
7712 dnl because it contains code intended for an executable,
7713 dnl not a library.  It's possible we should let each
7714 dnl tag define a new lt_????_link_test_code variable,
7715 dnl but it's only used here...
7716 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7717 int a;
7718 void foo (void) { a = 0; }
7719 _LT_EOF
7720 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7721 class Foo
7722 {
7723 public:
7724   Foo (void) { a = 0; }
7725 private:
7726   int a;
7727 };
7728 _LT_EOF
7729 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7730       subroutine foo
7731       implicit none
7732       integer*4 a
7733       a=0
7734       return
7735       end
7736 _LT_EOF
7737 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7738       subroutine foo
7739       implicit none
7740       integer a
7741       a=0
7742       return
7743       end
7744 _LT_EOF
7745 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7746 public class foo {
7747   private int a;
7748   public void bar (void) {
7749     a = 0;
7750   }
7751 };
7752 _LT_EOF
7753 ])
7754 dnl Parse the compiler output and extract the necessary
7755 dnl objects, libraries and library flags.
7756 if AC_TRY_EVAL(ac_compile); then
7757   # Parse the compiler output and extract the necessary
7758   # objects, libraries and library flags.
7759
7760   # Sentinel used to keep track of whether or not we are before
7761   # the conftest object file.
7762   pre_test_object_deps_done=no
7763
7764   for p in `eval "$output_verbose_link_cmd"`; do
7765     case $p in
7766
7767     -L* | -R* | -l*)
7768        # Some compilers place space between "-{L,R}" and the path.
7769        # Remove the space.
7770        if test $p = "-L" ||
7771           test $p = "-R"; then
7772          prev=$p
7773          continue
7774        else
7775          prev=
7776        fi
7777
7778        if test "$pre_test_object_deps_done" = no; then
7779          case $p in
7780          -L* | -R*)
7781            # Internal compiler library paths should come after those
7782            # provided the user.  The postdeps already come after the
7783            # user supplied libs so there is no need to process them.
7784            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7785              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7786            else
7787              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7788            fi
7789            ;;
7790          # The "-l" case would never come before the object being
7791          # linked, so don't bother handling this case.
7792          esac
7793        else
7794          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7795            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7796          else
7797            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7798          fi
7799        fi
7800        ;;
7801
7802     *.$objext)
7803        # This assumes that the test object file only shows up
7804        # once in the compiler output.
7805        if test "$p" = "conftest.$objext"; then
7806          pre_test_object_deps_done=yes
7807          continue
7808        fi
7809
7810        if test "$pre_test_object_deps_done" = no; then
7811          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7812            _LT_TAGVAR(predep_objects, $1)="$p"
7813          else
7814            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7815          fi
7816        else
7817          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7818            _LT_TAGVAR(postdep_objects, $1)="$p"
7819          else
7820            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7821          fi
7822        fi
7823        ;;
7824
7825     *) ;; # Ignore the rest.
7826
7827     esac
7828   done
7829
7830   # Clean up.
7831   rm -f a.out a.exe
7832 else
7833   echo "libtool.m4: error: problem compiling $1 test program"
7834 fi
7835
7836 $RM -f confest.$objext
7837
7838 # PORTME: override above test on systems where it is broken
7839 m4_if([$1], [CXX],
7840 [case $host_os in
7841 interix[[3-9]]*)
7842   # Interix 3.5 installs completely hosed .la files for C++, so rather than
7843   # hack all around it, let's just trust "g++" to DTRT.
7844   _LT_TAGVAR(predep_objects,$1)=
7845   _LT_TAGVAR(postdep_objects,$1)=
7846   _LT_TAGVAR(postdeps,$1)=
7847   ;;
7848
7849 linux*)
7850   case `$CC -V 2>&1 | sed 5q` in
7851   *Sun\ C*)
7852     # Sun C++ 5.9
7853
7854     # The more standards-conforming stlport4 library is
7855     # incompatible with the Cstd library. Avoid specifying
7856     # it if it's in CXXFLAGS. Ignore libCrun as
7857     # -library=stlport4 depends on it.
7858     case " $CXX $CXXFLAGS " in
7859     *" -library=stlport4 "*)
7860       solaris_use_stlport4=yes
7861       ;;
7862     esac
7863
7864     if test "$solaris_use_stlport4" != yes; then
7865       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7866     fi
7867     ;;
7868   esac
7869   ;;
7870
7871 solaris*)
7872   case $cc_basename in
7873   CC*)
7874     # The more standards-conforming stlport4 library is
7875     # incompatible with the Cstd library. Avoid specifying
7876     # it if it's in CXXFLAGS. Ignore libCrun as
7877     # -library=stlport4 depends on it.
7878     case " $CXX $CXXFLAGS " in
7879     *" -library=stlport4 "*)
7880       solaris_use_stlport4=yes
7881       ;;
7882     esac
7883
7884     # Adding this requires a known-good setup of shared libraries for
7885     # Sun compiler versions before 5.6, else PIC objects from an old
7886     # archive will be linked into the output, leading to subtle bugs.
7887     if test "$solaris_use_stlport4" != yes; then
7888       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7889     fi
7890     ;;
7891   esac
7892   ;;
7893 esac
7894 ])
7895
7896 case " $_LT_TAGVAR(postdeps, $1) " in
7897 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7898 esac
7899  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7900 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7901  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7902 fi
7903 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7904     [The directories searched by this compiler when creating a shared library])
7905 _LT_TAGDECL([], [predep_objects], [1],
7906     [Dependencies to place before and after the objects being linked to
7907     create a shared library])
7908 _LT_TAGDECL([], [postdep_objects], [1])
7909 _LT_TAGDECL([], [predeps], [1])
7910 _LT_TAGDECL([], [postdeps], [1])
7911 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7912     [The library search path used internally by the compiler when linking
7913     a shared library])
7914 ])# _LT_SYS_HIDDEN_LIBDEPS
7915
7916
7917 # _LT_PROG_F77
7918 # ------------
7919 # Since AC_PROG_F77 is broken, in that it returns the empty string
7920 # if there is no fortran compiler, we have our own version here.
7921 m4_defun([_LT_PROG_F77],
7922 [
7923 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
7924 AC_PROG_F77
7925 if test -z "$F77" || test "X$F77" = "Xno"; then
7926   _lt_disable_F77=yes
7927 fi
7928 popdef([AC_MSG_ERROR])
7929 ])# _LT_PROG_F77
7930
7931 dnl aclocal-1.4 backwards compatibility:
7932 dnl AC_DEFUN([_LT_PROG_F77], [])
7933
7934
7935 # _LT_LANG_F77_CONFIG([TAG])
7936 # --------------------------
7937 # Ensure that the configuration variables for a Fortran 77 compiler are
7938 # suitably defined.  These variables are subsequently used by _LT_CONFIG
7939 # to write the compiler configuration to `libtool'.
7940 m4_defun([_LT_LANG_F77_CONFIG],
7941 [AC_REQUIRE([_LT_PROG_F77])dnl
7942 AC_LANG_PUSH(Fortran 77)
7943
7944 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7945 _LT_TAGVAR(allow_undefined_flag, $1)=
7946 _LT_TAGVAR(always_export_symbols, $1)=no
7947 _LT_TAGVAR(archive_expsym_cmds, $1)=
7948 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7949 _LT_TAGVAR(hardcode_direct, $1)=no
7950 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7951 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7952 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7953 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7954 _LT_TAGVAR(hardcode_minus_L, $1)=no
7955 _LT_TAGVAR(hardcode_automatic, $1)=no
7956 _LT_TAGVAR(inherit_rpath, $1)=no
7957 _LT_TAGVAR(module_cmds, $1)=
7958 _LT_TAGVAR(module_expsym_cmds, $1)=
7959 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7960 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7961 _LT_TAGVAR(no_undefined_flag, $1)=
7962 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7963 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7964
7965 # Source file extension for f77 test sources.
7966 ac_ext=f
7967
7968 # Object file extension for compiled f77 test sources.
7969 objext=o
7970 _LT_TAGVAR(objext, $1)=$objext
7971
7972 # No sense in running all these tests if we already determined that
7973 # the F77 compiler isn't working.  Some variables (like enable_shared)
7974 # are currently assumed to apply to all compilers on this platform,
7975 # and will be corrupted by setting them based on a non-working compiler.
7976 if test "$_lt_disable_F77" != yes; then
7977   # Code to be used in simple compile tests
7978   lt_simple_compile_test_code="\
7979       subroutine t
7980       return
7981       end
7982 "
7983
7984   # Code to be used in simple link tests
7985   lt_simple_link_test_code="\
7986       program t
7987       end
7988 "
7989
7990   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7991   _LT_TAG_COMPILER
7992
7993   # save warnings/boilerplate of simple test code
7994   _LT_COMPILER_BOILERPLATE
7995   _LT_LINKER_BOILERPLATE
7996
7997   # Allow CC to be a program name with arguments.
7998   lt_save_CC="$CC"
7999   lt_save_GCC=$GCC
8000   CC=${F77-"f77"}
8001   compiler=$CC
8002   _LT_TAGVAR(compiler, $1)=$CC
8003   _LT_CC_BASENAME([$compiler])
8004   GCC=$G77
8005   if test -n "$compiler"; then
8006     AC_MSG_CHECKING([if libtool supports shared libraries])
8007     AC_MSG_RESULT([$can_build_shared])
8008
8009     AC_MSG_CHECKING([whether to build shared libraries])
8010     test "$can_build_shared" = "no" && enable_shared=no
8011
8012     # On AIX, shared libraries and static libraries use the same namespace, and
8013     # are all built from PIC.
8014     case $host_os in
8015       aix3*)
8016         test "$enable_shared" = yes && enable_static=no
8017         if test -n "$RANLIB"; then
8018           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8019           postinstall_cmds='$RANLIB $lib'
8020         fi
8021         ;;
8022       aix[[4-9]]*)
8023         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8024           test "$enable_shared" = yes && enable_static=no
8025         fi
8026         ;;
8027     esac
8028     AC_MSG_RESULT([$enable_shared])
8029
8030     AC_MSG_CHECKING([whether to build static libraries])
8031     # Make sure either enable_shared or enable_static is yes.
8032     test "$enable_shared" = yes || enable_static=yes
8033     AC_MSG_RESULT([$enable_static])
8034
8035     _LT_TAGVAR(GCC, $1)="$G77"
8036     _LT_TAGVAR(LD, $1)="$LD"
8037
8038     ## CAVEAT EMPTOR:
8039     ## There is no encapsulation within the following macros, do not change
8040     ## the running order or otherwise move them around unless you know exactly
8041     ## what you are doing...
8042     _LT_COMPILER_PIC($1)
8043     _LT_COMPILER_C_O($1)
8044     _LT_COMPILER_FILE_LOCKS($1)
8045     _LT_LINKER_SHLIBS($1)
8046     _LT_SYS_DYNAMIC_LINKER($1)
8047     _LT_LINKER_HARDCODE_LIBPATH($1)
8048
8049     _LT_CONFIG($1)
8050   fi # test -n "$compiler"
8051
8052   GCC=$lt_save_GCC
8053   CC="$lt_save_CC"
8054 fi # test "$_lt_disable_F77" != yes
8055
8056 AC_LANG_POP
8057 ])# _LT_LANG_F77_CONFIG
8058
8059
8060 # _LT_PROG_FC
8061 # -----------
8062 # Since AC_PROG_FC is broken, in that it returns the empty string
8063 # if there is no fortran compiler, we have our own version here.
8064 m4_defun([_LT_PROG_FC],
8065 [
8066 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
8067 AC_PROG_FC
8068 if test -z "$FC" || test "X$FC" = "Xno"; then
8069   _lt_disable_FC=yes
8070 fi
8071 popdef([AC_MSG_ERROR])
8072 ])# _LT_PROG_FC
8073
8074 dnl aclocal-1.4 backwards compatibility:
8075 dnl AC_DEFUN([_LT_PROG_FC], [])
8076
8077
8078 # _LT_LANG_FC_CONFIG([TAG])
8079 # -------------------------
8080 # Ensure that the configuration variables for a Fortran compiler are
8081 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8082 # to write the compiler configuration to `libtool'.
8083 m4_defun([_LT_LANG_FC_CONFIG],
8084 [AC_REQUIRE([_LT_PROG_FC])dnl
8085 AC_LANG_PUSH(Fortran)
8086
8087 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8088 _LT_TAGVAR(allow_undefined_flag, $1)=
8089 _LT_TAGVAR(always_export_symbols, $1)=no
8090 _LT_TAGVAR(archive_expsym_cmds, $1)=
8091 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8092 _LT_TAGVAR(hardcode_direct, $1)=no
8093 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8094 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8095 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8096 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8097 _LT_TAGVAR(hardcode_minus_L, $1)=no
8098 _LT_TAGVAR(hardcode_automatic, $1)=no
8099 _LT_TAGVAR(inherit_rpath, $1)=no
8100 _LT_TAGVAR(module_cmds, $1)=
8101 _LT_TAGVAR(module_expsym_cmds, $1)=
8102 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8103 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8104 _LT_TAGVAR(no_undefined_flag, $1)=
8105 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8106 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8107
8108 # Source file extension for fc test sources.
8109 ac_ext=${ac_fc_srcext-f}
8110
8111 # Object file extension for compiled fc test sources.
8112 objext=o
8113 _LT_TAGVAR(objext, $1)=$objext
8114
8115 # No sense in running all these tests if we already determined that
8116 # the FC compiler isn't working.  Some variables (like enable_shared)
8117 # are currently assumed to apply to all compilers on this platform,
8118 # and will be corrupted by setting them based on a non-working compiler.
8119 if test "$_lt_disable_FC" != yes; then
8120   # Code to be used in simple compile tests
8121   lt_simple_compile_test_code="\
8122       subroutine t
8123       return
8124       end
8125 "
8126
8127   # Code to be used in simple link tests
8128   lt_simple_link_test_code="\
8129       program t
8130       end
8131 "
8132
8133   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8134   _LT_TAG_COMPILER
8135
8136   # save warnings/boilerplate of simple test code
8137   _LT_COMPILER_BOILERPLATE
8138   _LT_LINKER_BOILERPLATE
8139
8140   # Allow CC to be a program name with arguments.
8141   lt_save_CC="$CC"
8142   lt_save_GCC=$GCC
8143   CC=${FC-"f95"}
8144   compiler=$CC
8145   GCC=$ac_cv_fc_compiler_gnu
8146
8147   _LT_TAGVAR(compiler, $1)=$CC
8148   _LT_CC_BASENAME([$compiler])
8149
8150   if test -n "$compiler"; then
8151     AC_MSG_CHECKING([if libtool supports shared libraries])
8152     AC_MSG_RESULT([$can_build_shared])
8153
8154     AC_MSG_CHECKING([whether to build shared libraries])
8155     test "$can_build_shared" = "no" && enable_shared=no
8156
8157     # On AIX, shared libraries and static libraries use the same namespace, and
8158     # are all built from PIC.
8159     case $host_os in
8160       aix3*)
8161         test "$enable_shared" = yes && enable_static=no
8162         if test -n "$RANLIB"; then
8163           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8164           postinstall_cmds='$RANLIB $lib'
8165         fi
8166         ;;
8167       aix[[4-9]]*)
8168         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8169           test "$enable_shared" = yes && enable_static=no
8170         fi
8171         ;;
8172     esac
8173     AC_MSG_RESULT([$enable_shared])
8174
8175     AC_MSG_CHECKING([whether to build static libraries])
8176     # Make sure either enable_shared or enable_static is yes.
8177     test "$enable_shared" = yes || enable_static=yes
8178     AC_MSG_RESULT([$enable_static])
8179
8180     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8181     _LT_TAGVAR(LD, $1)="$LD"
8182
8183     ## CAVEAT EMPTOR:
8184     ## There is no encapsulation within the following macros, do not change
8185     ## the running order or otherwise move them around unless you know exactly
8186     ## what you are doing...
8187     _LT_SYS_HIDDEN_LIBDEPS($1)
8188     _LT_COMPILER_PIC($1)
8189     _LT_COMPILER_C_O($1)
8190     _LT_COMPILER_FILE_LOCKS($1)
8191     _LT_LINKER_SHLIBS($1)
8192     _LT_SYS_DYNAMIC_LINKER($1)
8193     _LT_LINKER_HARDCODE_LIBPATH($1)
8194
8195     _LT_CONFIG($1)
8196   fi # test -n "$compiler"
8197
8198   GCC=$lt_save_GCC
8199   CC="$lt_save_CC"
8200 fi # test "$_lt_disable_FC" != yes
8201
8202 AC_LANG_POP
8203 ])# _LT_LANG_FC_CONFIG
8204
8205
8206 # _LT_LANG_GCJ_CONFIG([TAG])
8207 # --------------------------
8208 # Ensure that the configuration variables for the GNU Java Compiler compiler
8209 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8210 # to write the compiler configuration to `libtool'.
8211 m4_defun([_LT_LANG_GCJ_CONFIG],
8212 [AC_REQUIRE([LT_PROG_GCJ])dnl
8213 AC_LANG_SAVE
8214
8215 # Source file extension for Java test sources.
8216 ac_ext=java
8217
8218 # Object file extension for compiled Java test sources.
8219 objext=o
8220 _LT_TAGVAR(objext, $1)=$objext
8221
8222 # Code to be used in simple compile tests
8223 lt_simple_compile_test_code="class foo {}"
8224
8225 # Code to be used in simple link tests
8226 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8227
8228 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8229 _LT_TAG_COMPILER
8230
8231 # save warnings/boilerplate of simple test code
8232 _LT_COMPILER_BOILERPLATE
8233 _LT_LINKER_BOILERPLATE
8234
8235 # Allow CC to be a program name with arguments.
8236 lt_save_CC="$CC"
8237 lt_save_GCC=$GCC
8238 GCC=yes
8239 CC=${GCJ-"gcj"}
8240 compiler=$CC
8241 _LT_TAGVAR(compiler, $1)=$CC
8242 _LT_TAGVAR(LD, $1)="$LD"
8243 _LT_CC_BASENAME([$compiler])
8244
8245 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8246 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8247
8248 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8249
8250 if test -n "$compiler"; then
8251   _LT_COMPILER_NO_RTTI($1)
8252   _LT_COMPILER_PIC($1)
8253   _LT_COMPILER_C_O($1)
8254   _LT_COMPILER_FILE_LOCKS($1)
8255   _LT_LINKER_SHLIBS($1)
8256   _LT_LINKER_HARDCODE_LIBPATH($1)
8257
8258   _LT_CONFIG($1)
8259 fi
8260
8261 AC_LANG_RESTORE
8262
8263 GCC=$lt_save_GCC
8264 CC="$lt_save_CC"
8265 ])# _LT_LANG_GCJ_CONFIG
8266
8267
8268 # _LT_LANG_RC_CONFIG([TAG])
8269 # -------------------------
8270 # Ensure that the configuration variables for the Windows resource compiler
8271 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8272 # to write the compiler configuration to `libtool'.
8273 m4_defun([_LT_LANG_RC_CONFIG],
8274 [AC_REQUIRE([LT_PROG_RC])dnl
8275 AC_LANG_SAVE
8276
8277 # Source file extension for RC test sources.
8278 ac_ext=rc
8279
8280 # Object file extension for compiled RC test sources.
8281 objext=o
8282 _LT_TAGVAR(objext, $1)=$objext
8283
8284 # Code to be used in simple compile tests
8285 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8286
8287 # Code to be used in simple link tests
8288 lt_simple_link_test_code="$lt_simple_compile_test_code"
8289
8290 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8291 _LT_TAG_COMPILER
8292
8293 # save warnings/boilerplate of simple test code
8294 _LT_COMPILER_BOILERPLATE
8295 _LT_LINKER_BOILERPLATE
8296
8297 # Allow CC to be a program name with arguments.
8298 lt_save_CC="$CC"
8299 lt_save_GCC=$GCC
8300 GCC=
8301 CC=${RC-"windres"}
8302 compiler=$CC
8303 _LT_TAGVAR(compiler, $1)=$CC
8304 _LT_CC_BASENAME([$compiler])
8305 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8306
8307 if test -n "$compiler"; then
8308   :
8309   _LT_CONFIG($1)
8310 fi
8311
8312 GCC=$lt_save_GCC
8313 AC_LANG_RESTORE
8314 CC="$lt_save_CC"
8315 ])# _LT_LANG_RC_CONFIG
8316
8317
8318 # LT_PROG_GCJ
8319 # -----------
8320 AC_DEFUN([LT_PROG_GCJ],
8321 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8322   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8323     [AC_CHECK_TOOL(GCJ, gcj,)
8324       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8325       AC_SUBST(GCJFLAGS)])])[]dnl
8326 ])
8327
8328 # Old name:
8329 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8330 dnl aclocal-1.4 backwards compatibility:
8331 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8332
8333
8334 # LT_PROG_RC
8335 # ----------
8336 AC_DEFUN([LT_PROG_RC],
8337 [AC_CHECK_TOOL(RC, windres,)
8338 ])
8339
8340 # Old name:
8341 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8342 dnl aclocal-1.4 backwards compatibility:
8343 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8344
8345
8346 # _LT_DECL_EGREP
8347 # --------------
8348 # If we don't have a new enough Autoconf to choose the best grep
8349 # available, choose the one first in the user's PATH.
8350 m4_defun([_LT_DECL_EGREP],
8351 [AC_REQUIRE([AC_PROG_EGREP])dnl
8352 AC_REQUIRE([AC_PROG_FGREP])dnl
8353 test -z "$GREP" && GREP=grep
8354 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8355 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8356 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8357 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8358 AC_SUBST([GREP])
8359 ])
8360
8361
8362 # _LT_DECL_OBJDUMP
8363 # --------------
8364 # If we don't have a new enough Autoconf to choose the best objdump
8365 # available, choose the one first in the user's PATH.
8366 m4_defun([_LT_DECL_OBJDUMP],
8367 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8368 test -z "$OBJDUMP" && OBJDUMP=objdump
8369 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8370 AC_SUBST([OBJDUMP])
8371 ])
8372
8373
8374 # _LT_DECL_SED
8375 # ------------
8376 # Check for a fully-functional sed program, that truncates
8377 # as few characters as possible.  Prefer GNU sed if found.
8378 m4_defun([_LT_DECL_SED],
8379 [AC_PROG_SED
8380 test -z "$SED" && SED=sed
8381 Xsed="$SED -e 1s/^X//"
8382 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8383 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8384     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8385 ])# _LT_DECL_SED
8386
8387 m4_ifndef([AC_PROG_SED], [
8388 # NOTE: This macro has been submitted for inclusion into   #
8389 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8390 #  a released version of Autoconf we should remove this    #
8391 #  macro and use it instead.                               #
8392
8393 m4_defun([AC_PROG_SED],
8394 [AC_MSG_CHECKING([for a sed that does not truncate output])
8395 AC_CACHE_VAL(lt_cv_path_SED,
8396 [# Loop through the user's path and test for sed and gsed.
8397 # Then use that list of sed's as ones to test for truncation.
8398 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8399 for as_dir in $PATH
8400 do
8401   IFS=$as_save_IFS
8402   test -z "$as_dir" && as_dir=.
8403   for lt_ac_prog in sed gsed; do
8404     for ac_exec_ext in '' $ac_executable_extensions; do
8405       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8406         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8407       fi
8408     done
8409   done
8410 done
8411 IFS=$as_save_IFS
8412 lt_ac_max=0
8413 lt_ac_count=0
8414 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8415 # along with /bin/sed that truncates output.
8416 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8417   test ! -f $lt_ac_sed && continue
8418   cat /dev/null > conftest.in
8419   lt_ac_count=0
8420   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8421   # Check for GNU sed and select it if it is found.
8422   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8423     lt_cv_path_SED=$lt_ac_sed
8424     break
8425   fi
8426   while true; do
8427     cat conftest.in conftest.in >conftest.tmp
8428     mv conftest.tmp conftest.in
8429     cp conftest.in conftest.nl
8430     echo >>conftest.nl
8431     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8432     cmp -s conftest.out conftest.nl || break
8433     # 10000 chars as input seems more than enough
8434     test $lt_ac_count -gt 10 && break
8435     lt_ac_count=`expr $lt_ac_count + 1`
8436     if test $lt_ac_count -gt $lt_ac_max; then
8437       lt_ac_max=$lt_ac_count
8438       lt_cv_path_SED=$lt_ac_sed
8439     fi
8440   done
8441 done
8442 ])
8443 SED=$lt_cv_path_SED
8444 AC_SUBST([SED])
8445 AC_MSG_RESULT([$SED])
8446 ])#AC_PROG_SED
8447 ])#m4_ifndef
8448
8449 # Old name:
8450 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8451 dnl aclocal-1.4 backwards compatibility:
8452 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8453
8454
8455 # _LT_CHECK_SHELL_FEATURES
8456 # ------------------------
8457 # Find out whether the shell is Bourne or XSI compatible,
8458 # or has some other useful features.
8459 m4_defun([_LT_CHECK_SHELL_FEATURES],
8460 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8461 # Try some XSI features
8462 xsi_shell=no
8463 ( _lt_dummy="a/b/c"
8464   test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
8465       = c,a/b,, \
8466     && eval 'test $(( 1 + 1 )) -eq 2 \
8467     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8468   && xsi_shell=yes
8469 AC_MSG_RESULT([$xsi_shell])
8470 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8471
8472 AC_MSG_CHECKING([whether the shell understands "+="])
8473 lt_shell_append=no
8474 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8475     >/dev/null 2>&1 \
8476   && lt_shell_append=yes
8477 AC_MSG_RESULT([$lt_shell_append])
8478 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8479
8480 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8481   lt_unset=unset
8482 else
8483   lt_unset=false
8484 fi
8485 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8486
8487 # test EBCDIC or ASCII
8488 case `echo X|tr X '\101'` in
8489  A) # ASCII based system
8490     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8491   lt_SP2NL='tr \040 \012'
8492   lt_NL2SP='tr \015\012 \040\040'
8493   ;;
8494  *) # EBCDIC based system
8495   lt_SP2NL='tr \100 \n'
8496   lt_NL2SP='tr \r\n \100\100'
8497   ;;
8498 esac
8499 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8500 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8501 ])# _LT_CHECK_SHELL_FEATURES
8502
8503
8504 # _LT_PROG_XSI_SHELLFNS
8505 # ---------------------
8506 # Bourne and XSI compatible variants of some useful shell functions.
8507 m4_defun([_LT_PROG_XSI_SHELLFNS],
8508 [case $xsi_shell in
8509   yes)
8510     cat << \_LT_EOF >> "$cfgfile"
8511
8512 # func_dirname file append nondir_replacement
8513 # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8514 # otherwise set result to NONDIR_REPLACEMENT.
8515 func_dirname ()
8516 {
8517   case ${1} in
8518     */*) func_dirname_result="${1%/*}${2}" ;;
8519     *  ) func_dirname_result="${3}" ;;
8520   esac
8521 }
8522
8523 # func_basename file
8524 func_basename ()
8525 {
8526   func_basename_result="${1##*/}"
8527 }
8528
8529 # func_dirname_and_basename file append nondir_replacement
8530 # perform func_basename and func_dirname in a single function
8531 # call:
8532 #   dirname:  Compute the dirname of FILE.  If nonempty,
8533 #             add APPEND to the result, otherwise set result
8534 #             to NONDIR_REPLACEMENT.
8535 #             value returned in "$func_dirname_result"
8536 #   basename: Compute filename of FILE.
8537 #             value retuned in "$func_basename_result"
8538 # Implementation must be kept synchronized with func_dirname
8539 # and func_basename. For efficiency, we do not delegate to
8540 # those functions but instead duplicate the functionality here.
8541 func_dirname_and_basename ()
8542 {
8543   case ${1} in
8544     */*) func_dirname_result="${1%/*}${2}" ;;
8545     *  ) func_dirname_result="${3}" ;;
8546   esac
8547   func_basename_result="${1##*/}"
8548 }
8549
8550 # func_stripname prefix suffix name
8551 # strip PREFIX and SUFFIX off of NAME.
8552 # PREFIX and SUFFIX must not contain globbing or regex special
8553 # characters, hashes, percent signs, but SUFFIX may contain a leading
8554 # dot (in which case that matches only a dot).
8555 func_stripname ()
8556 {
8557   # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8558   # positional parameters, so assign one to ordinary parameter first.
8559   func_stripname_result=${3}
8560   func_stripname_result=${func_stripname_result#"${1}"}
8561   func_stripname_result=${func_stripname_result%"${2}"}
8562 }
8563
8564 # func_opt_split
8565 func_opt_split ()
8566 {
8567   func_opt_split_opt=${1%%=*}
8568   func_opt_split_arg=${1#*=}
8569 }
8570
8571 # func_lo2o object
8572 func_lo2o ()
8573 {
8574   case ${1} in
8575     *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8576     *)    func_lo2o_result=${1} ;;
8577   esac
8578 }
8579
8580 # func_xform libobj-or-source
8581 func_xform ()
8582 {
8583   func_xform_result=${1%.*}.lo
8584 }
8585
8586 # func_arith arithmetic-term...
8587 func_arith ()
8588 {
8589   func_arith_result=$(( $[*] ))
8590 }
8591
8592 # func_len string
8593 # STRING may not start with a hyphen.
8594 func_len ()
8595 {
8596   func_len_result=${#1}
8597 }
8598
8599 _LT_EOF
8600     ;;
8601   *) # Bourne compatible functions.
8602     cat << \_LT_EOF >> "$cfgfile"
8603
8604 # func_dirname file append nondir_replacement
8605 # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8606 # otherwise set result to NONDIR_REPLACEMENT.
8607 func_dirname ()
8608 {
8609   # Extract subdirectory from the argument.
8610   func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
8611   if test "X$func_dirname_result" = "X${1}"; then
8612     func_dirname_result="${3}"
8613   else
8614     func_dirname_result="$func_dirname_result${2}"
8615   fi
8616 }
8617
8618 # func_basename file
8619 func_basename ()
8620 {
8621   func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
8622 }
8623
8624 dnl func_dirname_and_basename
8625 dnl A portable version of this function is already defined in general.m4sh
8626 dnl so there is no need for it here.
8627
8628 # func_stripname prefix suffix name
8629 # strip PREFIX and SUFFIX off of NAME.
8630 # PREFIX and SUFFIX must not contain globbing or regex special
8631 # characters, hashes, percent signs, but SUFFIX may contain a leading
8632 # dot (in which case that matches only a dot).
8633 # func_strip_suffix prefix name
8634 func_stripname ()
8635 {
8636   case ${2} in
8637     .*) func_stripname_result=`$ECHO "X${3}" \
8638            | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
8639     *)  func_stripname_result=`$ECHO "X${3}" \
8640            | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
8641   esac
8642 }
8643
8644 # sed scripts:
8645 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8646 my_sed_long_arg='1s/^-[[^=]]*=//'
8647
8648 # func_opt_split
8649 func_opt_split ()
8650 {
8651   func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
8652   func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
8653 }
8654
8655 # func_lo2o object
8656 func_lo2o ()
8657 {
8658   func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8659 }
8660
8661 # func_xform libobj-or-source
8662 func_xform ()
8663 {
8664   func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8665 }
8666
8667 # func_arith arithmetic-term...
8668 func_arith ()
8669 {
8670   func_arith_result=`expr "$[@]"`
8671 }
8672
8673 # func_len string
8674 # STRING may not start with a hyphen.
8675 func_len ()
8676 {
8677   func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8678 }
8679
8680 _LT_EOF
8681 esac
8682
8683 case $lt_shell_append in
8684   yes)
8685     cat << \_LT_EOF >> "$cfgfile"
8686
8687 # func_append var value
8688 # Append VALUE to the end of shell variable VAR.
8689 func_append ()
8690 {
8691   eval "$[1]+=\$[2]"
8692 }
8693 _LT_EOF
8694     ;;
8695   *)
8696     cat << \_LT_EOF >> "$cfgfile"
8697
8698 # func_append var value
8699 # Append VALUE to the end of shell variable VAR.
8700 func_append ()
8701 {
8702   eval "$[1]=\$$[1]\$[2]"
8703 }
8704
8705 _LT_EOF
8706     ;;
8707   esac
8708 ])
8709
8710 # Helper functions for option handling.                    -*- Autoconf -*-
8711 #
8712 #   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8713 #   Written by Gary V. Vaughan, 2004
8714 #
8715 # This file is free software; the Free Software Foundation gives
8716 # unlimited permission to copy and/or distribute it, with or without
8717 # modifications, as long as this notice is preserved.
8718
8719 # serial 6 ltoptions.m4
8720
8721 # This is to help aclocal find these macros, as it can't see m4_define.
8722 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8723
8724
8725 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8726 # ------------------------------------------
8727 m4_define([_LT_MANGLE_OPTION],
8728 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8729
8730
8731 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8732 # ---------------------------------------
8733 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8734 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8735 # saved as a flag.
8736 m4_define([_LT_SET_OPTION],
8737 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8738 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8739         _LT_MANGLE_DEFUN([$1], [$2]),
8740     [m4_warning([Unknown $1 option `$2'])])[]dnl
8741 ])
8742
8743
8744 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8745 # ------------------------------------------------------------
8746 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8747 m4_define([_LT_IF_OPTION],
8748 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8749
8750
8751 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8752 # -------------------------------------------------------
8753 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8754 # are set.
8755 m4_define([_LT_UNLESS_OPTIONS],
8756 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8757             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8758                       [m4_define([$0_found])])])[]dnl
8759 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8760 ])[]dnl
8761 ])
8762
8763
8764 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8765 # ----------------------------------------
8766 # OPTION-LIST is a space-separated list of Libtool options associated
8767 # with MACRO-NAME.  If any OPTION has a matching handler declared with
8768 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8769 # the unknown option and exit.
8770 m4_defun([_LT_SET_OPTIONS],
8771 [# Set options
8772 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8773     [_LT_SET_OPTION([$1], _LT_Option)])
8774
8775 m4_if([$1],[LT_INIT],[
8776   dnl
8777   dnl Simply set some default values (i.e off) if boolean options were not
8778   dnl specified:
8779   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8780   ])
8781   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8782   ])
8783   dnl
8784   dnl If no reference was made to various pairs of opposing options, then
8785   dnl we run the default mode handler for the pair.  For example, if neither
8786   dnl `shared' nor `disable-shared' was passed, we enable building of shared
8787   dnl archives by default:
8788   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8789   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8790   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8791   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8792                    [_LT_ENABLE_FAST_INSTALL])
8793   ])
8794 ])# _LT_SET_OPTIONS
8795
8796
8797
8798 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8799 # -----------------------------------------
8800 m4_define([_LT_MANGLE_DEFUN],
8801 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8802
8803
8804 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8805 # -----------------------------------------------
8806 m4_define([LT_OPTION_DEFINE],
8807 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8808 ])# LT_OPTION_DEFINE
8809
8810
8811 # dlopen
8812 # ------
8813 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8814 ])
8815
8816 AU_DEFUN([AC_LIBTOOL_DLOPEN],
8817 [_LT_SET_OPTION([LT_INIT], [dlopen])
8818 AC_DIAGNOSE([obsolete],
8819 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8820 put the `dlopen' option into LT_INIT's first parameter.])
8821 ])
8822
8823 dnl aclocal-1.4 backwards compatibility:
8824 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8825
8826
8827 # win32-dll
8828 # ---------
8829 # Declare package support for building win32 dll's.
8830 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8831 [enable_win32_dll=yes
8832
8833 case $host in
8834 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
8835   AC_CHECK_TOOL(AS, as, false)
8836   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8837   AC_CHECK_TOOL(OBJDUMP, objdump, false)
8838   ;;
8839 esac
8840
8841 test -z "$AS" && AS=as
8842 _LT_DECL([], [AS],      [0], [Assembler program])dnl
8843
8844 test -z "$DLLTOOL" && DLLTOOL=dlltool
8845 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
8846
8847 test -z "$OBJDUMP" && OBJDUMP=objdump
8848 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
8849 ])# win32-dll
8850
8851 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8852 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8853 _LT_SET_OPTION([LT_INIT], [win32-dll])
8854 AC_DIAGNOSE([obsolete],
8855 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8856 put the `win32-dll' option into LT_INIT's first parameter.])
8857 ])
8858
8859 dnl aclocal-1.4 backwards compatibility:
8860 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8861
8862
8863 # _LT_ENABLE_SHARED([DEFAULT])
8864 # ----------------------------
8865 # implement the --enable-shared flag, and supports the `shared' and
8866 # `disable-shared' LT_INIT options.
8867 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8868 m4_define([_LT_ENABLE_SHARED],
8869 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8870 AC_ARG_ENABLE([shared],
8871     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8872         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8873     [p=${PACKAGE-default}
8874     case $enableval in
8875     yes) enable_shared=yes ;;
8876     no) enable_shared=no ;;
8877     *)
8878       enable_shared=no
8879       # Look at the argument we got.  We use all the common list separators.
8880       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8881       for pkg in $enableval; do
8882         IFS="$lt_save_ifs"
8883         if test "X$pkg" = "X$p"; then
8884           enable_shared=yes
8885         fi
8886       done
8887       IFS="$lt_save_ifs"
8888       ;;
8889     esac],
8890     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8891
8892     _LT_DECL([build_libtool_libs], [enable_shared], [0],
8893         [Whether or not to build shared libraries])
8894 ])# _LT_ENABLE_SHARED
8895
8896 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8897 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8898
8899 # Old names:
8900 AC_DEFUN([AC_ENABLE_SHARED],
8901 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8902 ])
8903
8904 AC_DEFUN([AC_DISABLE_SHARED],
8905 [_LT_SET_OPTION([LT_INIT], [disable-shared])
8906 ])
8907
8908 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8909 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8910
8911 dnl aclocal-1.4 backwards compatibility:
8912 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8913 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8914
8915
8916
8917 # _LT_ENABLE_STATIC([DEFAULT])
8918 # ----------------------------
8919 # implement the --enable-static flag, and support the `static' and
8920 # `disable-static' LT_INIT options.
8921 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8922 m4_define([_LT_ENABLE_STATIC],
8923 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8924 AC_ARG_ENABLE([static],
8925     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8926         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8927     [p=${PACKAGE-default}
8928     case $enableval in
8929     yes) enable_static=yes ;;
8930     no) enable_static=no ;;
8931     *)
8932      enable_static=no
8933       # Look at the argument we got.  We use all the common list separators.
8934       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8935       for pkg in $enableval; do
8936         IFS="$lt_save_ifs"
8937         if test "X$pkg" = "X$p"; then
8938           enable_static=yes
8939         fi
8940       done
8941       IFS="$lt_save_ifs"
8942       ;;
8943     esac],
8944     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8945
8946     _LT_DECL([build_old_libs], [enable_static], [0],
8947         [Whether or not to build static libraries])
8948 ])# _LT_ENABLE_STATIC
8949
8950 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8951 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8952
8953 # Old names:
8954 AC_DEFUN([AC_ENABLE_STATIC],
8955 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8956 ])
8957
8958 AC_DEFUN([AC_DISABLE_STATIC],
8959 [_LT_SET_OPTION([LT_INIT], [disable-static])
8960 ])
8961
8962 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8963 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8964
8965 dnl aclocal-1.4 backwards compatibility:
8966 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8967 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8968
8969
8970
8971 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
8972 # ----------------------------------
8973 # implement the --enable-fast-install flag, and support the `fast-install'
8974 # and `disable-fast-install' LT_INIT options.
8975 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8976 m4_define([_LT_ENABLE_FAST_INSTALL],
8977 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8978 AC_ARG_ENABLE([fast-install],
8979     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8980     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8981     [p=${PACKAGE-default}
8982     case $enableval in
8983     yes) enable_fast_install=yes ;;
8984     no) enable_fast_install=no ;;
8985     *)
8986       enable_fast_install=no
8987       # Look at the argument we got.  We use all the common list separators.
8988       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8989       for pkg in $enableval; do
8990         IFS="$lt_save_ifs"
8991         if test "X$pkg" = "X$p"; then
8992           enable_fast_install=yes
8993         fi
8994       done
8995       IFS="$lt_save_ifs"
8996       ;;
8997     esac],
8998     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8999
9000 _LT_DECL([fast_install], [enable_fast_install], [0],
9001          [Whether or not to optimize for fast installation])dnl
9002 ])# _LT_ENABLE_FAST_INSTALL
9003
9004 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9005 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9006
9007 # Old names:
9008 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9009 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9010 AC_DIAGNOSE([obsolete],
9011 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9012 the `fast-install' option into LT_INIT's first parameter.])
9013 ])
9014
9015 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9016 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9017 AC_DIAGNOSE([obsolete],
9018 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9019 the `disable-fast-install' option into LT_INIT's first parameter.])
9020 ])
9021
9022 dnl aclocal-1.4 backwards compatibility:
9023 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9024 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9025
9026
9027 # _LT_WITH_PIC([MODE])
9028 # --------------------
9029 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9030 # LT_INIT options.
9031 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9032 m4_define([_LT_WITH_PIC],
9033 [AC_ARG_WITH([pic],
9034     [AS_HELP_STRING([--with-pic],
9035         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9036     [pic_mode="$withval"],
9037     [pic_mode=default])
9038
9039 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9040
9041 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9042 ])# _LT_WITH_PIC
9043
9044 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9045 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9046
9047 # Old name:
9048 AU_DEFUN([AC_LIBTOOL_PICMODE],
9049 [_LT_SET_OPTION([LT_INIT], [pic-only])
9050 AC_DIAGNOSE([obsolete],
9051 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9052 put the `pic-only' option into LT_INIT's first parameter.])
9053 ])
9054
9055 dnl aclocal-1.4 backwards compatibility:
9056 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9057
9058
9059 m4_define([_LTDL_MODE], [])
9060 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9061                  [m4_define([_LTDL_MODE], [nonrecursive])])
9062 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9063                  [m4_define([_LTDL_MODE], [recursive])])
9064 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9065                  [m4_define([_LTDL_MODE], [subproject])])
9066
9067 m4_define([_LTDL_TYPE], [])
9068 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9069                  [m4_define([_LTDL_TYPE], [installable])])
9070 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9071                  [m4_define([_LTDL_TYPE], [convenience])])
9072
9073 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9074 #
9075 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9076 # Written by Gary V. Vaughan, 2004
9077 #
9078 # This file is free software; the Free Software Foundation gives
9079 # unlimited permission to copy and/or distribute it, with or without
9080 # modifications, as long as this notice is preserved.
9081
9082 # serial 6 ltsugar.m4
9083
9084 # This is to help aclocal find these macros, as it can't see m4_define.
9085 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9086
9087
9088 # lt_join(SEP, ARG1, [ARG2...])
9089 # -----------------------------
9090 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9091 # associated separator.
9092 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9093 # versions in m4sugar had bugs.
9094 m4_define([lt_join],
9095 [m4_if([$#], [1], [],
9096        [$#], [2], [[$2]],
9097        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9098 m4_define([_lt_join],
9099 [m4_if([$#$2], [2], [],
9100        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9101
9102
9103 # lt_car(LIST)
9104 # lt_cdr(LIST)
9105 # ------------
9106 # Manipulate m4 lists.
9107 # These macros are necessary as long as will still need to support
9108 # Autoconf-2.59 which quotes differently.
9109 m4_define([lt_car], [[$1]])
9110 m4_define([lt_cdr],
9111 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9112        [$#], 1, [],
9113        [m4_dquote(m4_shift($@))])])
9114 m4_define([lt_unquote], $1)
9115
9116
9117 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9118 # ------------------------------------------
9119 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9120 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9121 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9122 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9123 # than defined and empty).
9124 #
9125 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9126 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9127 m4_define([lt_append],
9128 [m4_define([$1],
9129            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9130
9131
9132
9133 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9134 # ----------------------------------------------------------
9135 # Produce a SEP delimited list of all paired combinations of elements of
9136 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9137 # has the form PREFIXmINFIXSUFFIXn.
9138 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9139 m4_define([lt_combine],
9140 [m4_if(m4_eval([$# > 3]), [1],
9141        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9142 [[m4_foreach([_Lt_prefix], [$2],
9143              [m4_foreach([_Lt_suffix],
9144                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9145         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9146
9147
9148 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9149 # -----------------------------------------------------------------------
9150 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9151 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9152 m4_define([lt_if_append_uniq],
9153 [m4_ifdef([$1],
9154           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9155                  [lt_append([$1], [$2], [$3])$4],
9156                  [$5])],
9157           [lt_append([$1], [$2], [$3])$4])])
9158
9159
9160 # lt_dict_add(DICT, KEY, VALUE)
9161 # -----------------------------
9162 m4_define([lt_dict_add],
9163 [m4_define([$1($2)], [$3])])
9164
9165
9166 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9167 # --------------------------------------------
9168 m4_define([lt_dict_add_subkey],
9169 [m4_define([$1($2:$3)], [$4])])
9170
9171
9172 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9173 # ----------------------------------
9174 m4_define([lt_dict_fetch],
9175 [m4_ifval([$3],
9176         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9177     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9178
9179
9180 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9181 # -----------------------------------------------------------------
9182 m4_define([lt_if_dict_fetch],
9183 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9184         [$5],
9185     [$6])])
9186
9187
9188 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9189 # --------------------------------------------------------------
9190 m4_define([lt_dict_filter],
9191 [m4_if([$5], [], [],
9192   [lt_join(m4_quote(m4_default([$4], [[, ]])),
9193            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9194                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9195 ])
9196
9197 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
9198 #
9199 #   Copyright (C) 2004 Free Software Foundation, Inc.
9200 #   Written by Scott James Remnant, 2004
9201 #
9202 # This file is free software; the Free Software Foundation gives
9203 # unlimited permission to copy and/or distribute it, with or without
9204 # modifications, as long as this notice is preserved.
9205
9206 # Generated from ltversion.in.
9207
9208 # serial 3017 ltversion.m4
9209 # This file is part of GNU Libtool
9210
9211 m4_define([LT_PACKAGE_VERSION], [2.2.6b])
9212 m4_define([LT_PACKAGE_REVISION], [1.3017])
9213
9214 AC_DEFUN([LTVERSION_VERSION],
9215 [macro_version='2.2.6b'
9216 macro_revision='1.3017'
9217 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9218 _LT_DECL(, macro_revision, 0)
9219 ])
9220
9221 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9222 #
9223 #   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
9224 #   Written by Scott James Remnant, 2004.
9225 #
9226 # This file is free software; the Free Software Foundation gives
9227 # unlimited permission to copy and/or distribute it, with or without
9228 # modifications, as long as this notice is preserved.
9229
9230 # serial 4 lt~obsolete.m4
9231
9232 # These exist entirely to fool aclocal when bootstrapping libtool.
9233 #
9234 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9235 # which have later been changed to m4_define as they aren't part of the
9236 # exported API, or moved to Autoconf or Automake where they belong.
9237 #
9238 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9239 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9240 # using a macro with the same name in our local m4/libtool.m4 it'll
9241 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9242 # and doesn't know about Autoconf macros at all.)
9243 #
9244 # So we provide this file, which has a silly filename so it's always
9245 # included after everything else.  This provides aclocal with the
9246 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9247 # because those macros already exist, or will be overwritten later.
9248 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9249 #
9250 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9251 # Yes, that means every name once taken will need to remain here until
9252 # we give up compatibility with versions before 1.7, at which point
9253 # we need to keep only those names which we still refer to.
9254
9255 # This is to help aclocal find these macros, as it can't see m4_define.
9256 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9257
9258 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9259 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
9260 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9261 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
9262 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9263 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
9264 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
9265 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9266 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
9267 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9268 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
9269 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9270 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9271 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9272 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9273 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9274 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
9275 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9276 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9277 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
9278 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
9279 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9280 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9281 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9282 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9283 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9284 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9285 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9286 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
9287 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
9288 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
9289 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9290 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9291 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
9292 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
9293 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9294 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9295 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
9296 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9297 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
9298 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
9299 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
9300 m4_ifndef([AC_LIBTOOL_RC],              [AC_DEFUN([AC_LIBTOOL_RC])])
9301 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9302 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9303 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9304 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9305 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9306 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9307 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9308 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9309 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9310 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9311 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9312 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9313
9314 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
9315 #
9316 # This file is free software; the Free Software Foundation
9317 # gives unlimited permission to copy and/or distribute it,
9318 # with or without modifications, as long as this notice is preserved.
9319
9320 # AM_AUTOMAKE_VERSION(VERSION)
9321 # ----------------------------
9322 # Automake X.Y traces this macro to ensure aclocal.m4 has been
9323 # generated from the m4 files accompanying Automake X.Y.
9324 # (This private macro should not be called outside this file.)
9325 AC_DEFUN([AM_AUTOMAKE_VERSION],
9326 [am__api_version='1.11'
9327 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9328 dnl require some minimum version.  Point them to the right macro.
9329 m4_if([$1], [1.11.1], [],
9330       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9331 ])
9332
9333 # _AM_AUTOCONF_VERSION(VERSION)
9334 # -----------------------------
9335 # aclocal traces this macro to find the Autoconf version.
9336 # This is a private macro too.  Using m4_define simplifies
9337 # the logic in aclocal, which can simply ignore this definition.
9338 m4_define([_AM_AUTOCONF_VERSION], [])
9339
9340 # AM_SET_CURRENT_AUTOMAKE_VERSION
9341 # -------------------------------
9342 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9343 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9344 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9345 [AM_AUTOMAKE_VERSION([1.11.1])dnl
9346 m4_ifndef([AC_AUTOCONF_VERSION],
9347   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9348 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9349
9350 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
9351
9352 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9353 #
9354 # This file is free software; the Free Software Foundation
9355 # gives unlimited permission to copy and/or distribute it,
9356 # with or without modifications, as long as this notice is preserved.
9357
9358 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9359 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
9360 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9361 #
9362 # Of course, Automake must honor this variable whenever it calls a
9363 # tool from the auxiliary directory.  The problem is that $srcdir (and
9364 # therefore $ac_aux_dir as well) can be either absolute or relative,
9365 # depending on how configure is run.  This is pretty annoying, since
9366 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
9367 # source directory, any form will work fine, but in subdirectories a
9368 # relative path needs to be adjusted first.
9369 #
9370 # $ac_aux_dir/missing
9371 #    fails when called from a subdirectory if $ac_aux_dir is relative
9372 # $top_srcdir/$ac_aux_dir/missing
9373 #    fails if $ac_aux_dir is absolute,
9374 #    fails when called from a subdirectory in a VPATH build with
9375 #          a relative $ac_aux_dir
9376 #
9377 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9378 # are both prefixed by $srcdir.  In an in-source build this is usually
9379 # harmless because $srcdir is `.', but things will broke when you
9380 # start a VPATH build or use an absolute $srcdir.
9381 #
9382 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9383 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9384 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9385 # and then we would define $MISSING as
9386 #   MISSING="\${SHELL} $am_aux_dir/missing"
9387 # This will work as long as MISSING is not called from configure, because
9388 # unfortunately $(top_srcdir) has no meaning in configure.
9389 # However there are other variables, like CC, which are often used in
9390 # configure, and could therefore not use this "fixed" $ac_aux_dir.
9391 #
9392 # Another solution, used here, is to always expand $ac_aux_dir to an
9393 # absolute PATH.  The drawback is that using absolute paths prevent a
9394 # configured tree to be moved without reconfiguration.
9395
9396 AC_DEFUN([AM_AUX_DIR_EXPAND],
9397 [dnl Rely on autoconf to set up CDPATH properly.
9398 AC_PREREQ([2.50])dnl
9399 # expand $ac_aux_dir to an absolute path
9400 am_aux_dir=`cd $ac_aux_dir && pwd`
9401 ])
9402
9403 # AM_CONDITIONAL                                            -*- Autoconf -*-
9404
9405 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9406 # Free Software Foundation, Inc.
9407 #
9408 # This file is free software; the Free Software Foundation
9409 # gives unlimited permission to copy and/or distribute it,
9410 # with or without modifications, as long as this notice is preserved.
9411
9412 # serial 9
9413
9414 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
9415 # -------------------------------------
9416 # Define a conditional.
9417 AC_DEFUN([AM_CONDITIONAL],
9418 [AC_PREREQ(2.52)dnl
9419  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
9420         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9421 AC_SUBST([$1_TRUE])dnl
9422 AC_SUBST([$1_FALSE])dnl
9423 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
9424 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
9425 m4_define([_AM_COND_VALUE_$1], [$2])dnl
9426 if $2; then
9427   $1_TRUE=
9428   $1_FALSE='#'
9429 else
9430   $1_TRUE='#'
9431   $1_FALSE=
9432 fi
9433 AC_CONFIG_COMMANDS_PRE(
9434 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9435   AC_MSG_ERROR([[conditional "$1" was never defined.
9436 Usually this means the macro was only invoked conditionally.]])
9437 fi])])
9438
9439 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9440 # Free Software Foundation, Inc.
9441 #
9442 # This file is free software; the Free Software Foundation
9443 # gives unlimited permission to copy and/or distribute it,
9444 # with or without modifications, as long as this notice is preserved.
9445
9446 # serial 10
9447
9448 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9449 # written in clear, in which case automake, when reading aclocal.m4,
9450 # will think it sees a *use*, and therefore will trigger all it's
9451 # C support machinery.  Also note that it means that autoscan, seeing
9452 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9453
9454
9455 # _AM_DEPENDENCIES(NAME)
9456 # ----------------------
9457 # See how the compiler implements dependency checking.
9458 # NAME is "CC", "CXX", "GCJ", or "OBJC".
9459 # We try a few techniques and use that to set a single cache variable.
9460 #
9461 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9462 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9463 # dependency, and given that the user is not expected to run this macro,
9464 # just rely on AC_PROG_CC.
9465 AC_DEFUN([_AM_DEPENDENCIES],
9466 [AC_REQUIRE([AM_SET_DEPDIR])dnl
9467 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9468 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9469 AC_REQUIRE([AM_DEP_TRACK])dnl
9470
9471 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
9472        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
9473        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9474        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
9475        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9476                    [depcc="$$1"   am_compiler_list=])
9477
9478 AC_CACHE_CHECK([dependency style of $depcc],
9479                [am_cv_$1_dependencies_compiler_type],
9480 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9481   # We make a subdir and do the tests there.  Otherwise we can end up
9482   # making bogus files that we don't know about and never remove.  For
9483   # instance it was reported that on HP-UX the gcc test will end up
9484   # making a dummy file named `D' -- because `-MD' means `put the output
9485   # in D'.
9486   mkdir conftest.dir
9487   # Copy depcomp to subdir because otherwise we won't find it if we're
9488   # using a relative directory.
9489   cp "$am_depcomp" conftest.dir
9490   cd conftest.dir
9491   # We will build objects and dependencies in a subdirectory because
9492   # it helps to detect inapplicable dependency modes.  For instance
9493   # both Tru64's cc and ICC support -MD to output dependencies as a
9494   # side effect of compilation, but ICC will put the dependencies in
9495   # the current directory while Tru64 will put them in the object
9496   # directory.
9497   mkdir sub
9498
9499   am_cv_$1_dependencies_compiler_type=none
9500   if test "$am_compiler_list" = ""; then
9501      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9502   fi
9503   am__universal=false
9504   m4_case([$1], [CC],
9505     [case " $depcc " in #(
9506      *\ -arch\ *\ -arch\ *) am__universal=true ;;
9507      esac],
9508     [CXX],
9509     [case " $depcc " in #(
9510      *\ -arch\ *\ -arch\ *) am__universal=true ;;
9511      esac])
9512
9513   for depmode in $am_compiler_list; do
9514     # Setup a source with many dependencies, because some compilers
9515     # like to wrap large dependency lists on column 80 (with \), and
9516     # we should not choose a depcomp mode which is confused by this.
9517     #
9518     # We need to recreate these files for each test, as the compiler may
9519     # overwrite some of them when testing with obscure command lines.
9520     # This happens at least with the AIX C compiler.
9521     : > sub/conftest.c
9522     for i in 1 2 3 4 5 6; do
9523       echo '#include "conftst'$i'.h"' >> sub/conftest.c
9524       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9525       # Solaris 8's {/usr,}/bin/sh.
9526       touch sub/conftst$i.h
9527     done
9528     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9529
9530     # We check with `-c' and `-o' for the sake of the "dashmstdout"
9531     # mode.  It turns out that the SunPro C++ compiler does not properly
9532     # handle `-M -o', and we need to detect this.  Also, some Intel
9533     # versions had trouble with output in subdirs
9534     am__obj=sub/conftest.${OBJEXT-o}
9535     am__minus_obj="-o $am__obj"
9536     case $depmode in
9537     gcc)
9538       # This depmode causes a compiler race in universal mode.
9539       test "$am__universal" = false || continue
9540       ;;
9541     nosideeffect)
9542       # after this tag, mechanisms are not by side-effect, so they'll
9543       # only be used when explicitly requested
9544       if test "x$enable_dependency_tracking" = xyes; then
9545         continue
9546       else
9547         break
9548       fi
9549       ;;
9550     msvisualcpp | msvcmsys)
9551       # This compiler won't grok `-c -o', but also, the minuso test has
9552       # not run yet.  These depmodes are late enough in the game, and
9553       # so weak that their functioning should not be impacted.
9554       am__obj=conftest.${OBJEXT-o}
9555       am__minus_obj=
9556       ;;
9557     none) break ;;
9558     esac
9559     if depmode=$depmode \
9560        source=sub/conftest.c object=$am__obj \
9561        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9562        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9563          >/dev/null 2>conftest.err &&
9564        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9565        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9566        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9567        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9568       # icc doesn't choke on unknown options, it will just issue warnings
9569       # or remarks (even with -Werror).  So we grep stderr for any message
9570       # that says an option was ignored or not supported.
9571       # When given -MP, icc 7.0 and 7.1 complain thusly:
9572       #   icc: Command line warning: ignoring option '-M'; no argument required
9573       # The diagnosis changed in icc 8.0:
9574       #   icc: Command line remark: option '-MP' not supported
9575       if (grep 'ignoring option' conftest.err ||
9576           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9577         am_cv_$1_dependencies_compiler_type=$depmode
9578         break
9579       fi
9580     fi
9581   done
9582
9583   cd ..
9584   rm -rf conftest.dir
9585 else
9586   am_cv_$1_dependencies_compiler_type=none
9587 fi
9588 ])
9589 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9590 AM_CONDITIONAL([am__fastdep$1], [
9591   test "x$enable_dependency_tracking" != xno \
9592   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9593 ])
9594
9595
9596 # AM_SET_DEPDIR
9597 # -------------
9598 # Choose a directory name for dependency files.
9599 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
9600 AC_DEFUN([AM_SET_DEPDIR],
9601 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9602 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9603 ])
9604
9605
9606 # AM_DEP_TRACK
9607 # ------------
9608 AC_DEFUN([AM_DEP_TRACK],
9609 [AC_ARG_ENABLE(dependency-tracking,
9610 [  --disable-dependency-tracking  speeds up one-time build
9611   --enable-dependency-tracking   do not reject slow dependency extractors])
9612 if test "x$enable_dependency_tracking" != xno; then
9613   am_depcomp="$ac_aux_dir/depcomp"
9614   AMDEPBACKSLASH='\'
9615 fi
9616 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9617 AC_SUBST([AMDEPBACKSLASH])dnl
9618 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9619 ])
9620
9621 # Generate code to set up dependency tracking.              -*- Autoconf -*-
9622
9623 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9624 # Free Software Foundation, Inc.
9625 #
9626 # This file is free software; the Free Software Foundation
9627 # gives unlimited permission to copy and/or distribute it,
9628 # with or without modifications, as long as this notice is preserved.
9629
9630 #serial 5
9631
9632 # _AM_OUTPUT_DEPENDENCY_COMMANDS
9633 # ------------------------------
9634 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9635 [{
9636   # Autoconf 2.62 quotes --file arguments for eval, but not when files
9637   # are listed without --file.  Let's play safe and only enable the eval
9638   # if we detect the quoting.
9639   case $CONFIG_FILES in
9640   *\'*) eval set x "$CONFIG_FILES" ;;
9641   *)   set x $CONFIG_FILES ;;
9642   esac
9643   shift
9644   for mf
9645   do
9646     # Strip MF so we end up with the name of the file.
9647     mf=`echo "$mf" | sed -e 's/:.*$//'`
9648     # Check whether this is an Automake generated Makefile or not.
9649     # We used to match only the files named `Makefile.in', but
9650     # some people rename them; so instead we look at the file content.
9651     # Grep'ing the first line is not enough: some people post-process
9652     # each Makefile.in and add a new line on top of each file to say so.
9653     # Grep'ing the whole file is not good either: AIX grep has a line
9654     # limit of 2048, but all sed's we know have understand at least 4000.
9655     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9656       dirpart=`AS_DIRNAME("$mf")`
9657     else
9658       continue
9659     fi
9660     # Extract the definition of DEPDIR, am__include, and am__quote
9661     # from the Makefile without running `make'.
9662     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9663     test -z "$DEPDIR" && continue
9664     am__include=`sed -n 's/^am__include = //p' < "$mf"`
9665     test -z "am__include" && continue
9666     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9667     # When using ansi2knr, U may be empty or an underscore; expand it
9668     U=`sed -n 's/^U = //p' < "$mf"`
9669     # Find all dependency output files, they are included files with
9670     # $(DEPDIR) in their names.  We invoke sed twice because it is the
9671     # simplest approach to changing $(DEPDIR) to its actual value in the
9672     # expansion.
9673     for file in `sed -n "
9674       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9675          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9676       # Make sure the directory exists.
9677       test -f "$dirpart/$file" && continue
9678       fdir=`AS_DIRNAME(["$file"])`
9679       AS_MKDIR_P([$dirpart/$fdir])
9680       # echo "creating $dirpart/$file"
9681       echo '# dummy' > "$dirpart/$file"
9682     done
9683   done
9684 }
9685 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9686
9687
9688 # AM_OUTPUT_DEPENDENCY_COMMANDS
9689 # -----------------------------
9690 # This macro should only be invoked once -- use via AC_REQUIRE.
9691 #
9692 # This code is only required when automatic dependency tracking
9693 # is enabled.  FIXME.  This creates each `.P' file that we will
9694 # need in order to bootstrap the dependency handling code.
9695 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9696 [AC_CONFIG_COMMANDS([depfiles],
9697      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9698      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9699 ])
9700
9701 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9702 # Free Software Foundation, Inc.
9703 #
9704 # This file is free software; the Free Software Foundation
9705 # gives unlimited permission to copy and/or distribute it,
9706 # with or without modifications, as long as this notice is preserved.
9707
9708 # serial 8
9709
9710 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
9711 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9712
9713 # Do all the work for Automake.                             -*- Autoconf -*-
9714
9715 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9716 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9717 #
9718 # This file is free software; the Free Software Foundation
9719 # gives unlimited permission to copy and/or distribute it,
9720 # with or without modifications, as long as this notice is preserved.
9721
9722 # serial 16
9723
9724 # This macro actually does too much.  Some checks are only needed if
9725 # your package does certain things.  But this isn't really a big deal.
9726
9727 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9728 # AM_INIT_AUTOMAKE([OPTIONS])
9729 # -----------------------------------------------
9730 # The call with PACKAGE and VERSION arguments is the old style
9731 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
9732 # and VERSION should now be passed to AC_INIT and removed from
9733 # the call to AM_INIT_AUTOMAKE.
9734 # We support both call styles for the transition.  After
9735 # the next Automake release, Autoconf can make the AC_INIT
9736 # arguments mandatory, and then we can depend on a new Autoconf
9737 # release and drop the old call support.
9738 AC_DEFUN([AM_INIT_AUTOMAKE],
9739 [AC_PREREQ([2.62])dnl
9740 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
9741 dnl the ones we care about.
9742 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9743 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9744 AC_REQUIRE([AC_PROG_INSTALL])dnl
9745 if test "`cd $srcdir && pwd`" != "`pwd`"; then
9746   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9747   # is not polluted with repeated "-I."
9748   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9749   # test to see if srcdir already configured
9750   if test -f $srcdir/config.status; then
9751     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9752   fi
9753 fi
9754
9755 # test whether we have cygpath
9756 if test -z "$CYGPATH_W"; then
9757   if (cygpath --version) >/dev/null 2>/dev/null; then
9758     CYGPATH_W='cygpath -w'
9759   else
9760     CYGPATH_W=echo
9761   fi
9762 fi
9763 AC_SUBST([CYGPATH_W])
9764
9765 # Define the identity of the package.
9766 dnl Distinguish between old-style and new-style calls.
9767 m4_ifval([$2],
9768 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9769  AC_SUBST([PACKAGE], [$1])dnl
9770  AC_SUBST([VERSION], [$2])],
9771 [_AM_SET_OPTIONS([$1])dnl
9772 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9773 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9774   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9775  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9776  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9777
9778 _AM_IF_OPTION([no-define],,
9779 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9780  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9781
9782 # Some tools Automake needs.
9783 AC_REQUIRE([AM_SANITY_CHECK])dnl
9784 AC_REQUIRE([AC_ARG_PROGRAM])dnl
9785 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9786 AM_MISSING_PROG(AUTOCONF, autoconf)
9787 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9788 AM_MISSING_PROG(AUTOHEADER, autoheader)
9789 AM_MISSING_PROG(MAKEINFO, makeinfo)
9790 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9791 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9792 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9793 # We need awk for the "check" target.  The system "awk" is bad on
9794 # some platforms.
9795 AC_REQUIRE([AC_PROG_AWK])dnl
9796 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9797 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9798 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9799               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9800                              [_AM_PROG_TAR([v7])])])
9801 _AM_IF_OPTION([no-dependencies],,
9802 [AC_PROVIDE_IFELSE([AC_PROG_CC],
9803                   [_AM_DEPENDENCIES(CC)],
9804                   [define([AC_PROG_CC],
9805                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9806 AC_PROVIDE_IFELSE([AC_PROG_CXX],
9807                   [_AM_DEPENDENCIES(CXX)],
9808                   [define([AC_PROG_CXX],
9809                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9810 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9811                   [_AM_DEPENDENCIES(OBJC)],
9812                   [define([AC_PROG_OBJC],
9813                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9814 ])
9815 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9816 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9817 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
9818 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9819 AC_CONFIG_COMMANDS_PRE(dnl
9820 [m4_provide_if([_AM_COMPILER_EXEEXT],
9821   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9822 ])
9823
9824 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
9825 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9826 dnl mangled by Autoconf and run in a shell conditional statement.
9827 m4_define([_AC_COMPILER_EXEEXT],
9828 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9829
9830
9831 # When config.status generates a header, we must update the stamp-h file.
9832 # This file resides in the same directory as the config header
9833 # that is generated.  The stamp files are numbered to have different names.
9834
9835 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9836 # loop where config.status creates the headers, so we can generate
9837 # our stamp files there.
9838 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9839 [# Compute $1's index in $config_headers.
9840 _am_arg=$1
9841 _am_stamp_count=1
9842 for _am_header in $config_headers :; do
9843   case $_am_header in
9844     $_am_arg | $_am_arg:* )
9845       break ;;
9846     * )
9847       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9848   esac
9849 done
9850 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9851
9852 # Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
9853 #
9854 # This file is free software; the Free Software Foundation
9855 # gives unlimited permission to copy and/or distribute it,
9856 # with or without modifications, as long as this notice is preserved.
9857
9858 # AM_PROG_INSTALL_SH
9859 # ------------------
9860 # Define $install_sh.
9861 AC_DEFUN([AM_PROG_INSTALL_SH],
9862 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9863 if test x"${install_sh}" != xset; then
9864   case $am_aux_dir in
9865   *\ * | *\     *)
9866     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9867   *)
9868     install_sh="\${SHELL} $am_aux_dir/install-sh"
9869   esac
9870 fi
9871 AC_SUBST(install_sh)])
9872
9873 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
9874 #
9875 # This file is free software; the Free Software Foundation
9876 # gives unlimited permission to copy and/or distribute it,
9877 # with or without modifications, as long as this notice is preserved.
9878
9879 # serial 2
9880
9881 # Check whether the underlying file-system supports filenames
9882 # with a leading dot.  For instance MS-DOS doesn't.
9883 AC_DEFUN([AM_SET_LEADING_DOT],
9884 [rm -rf .tst 2>/dev/null
9885 mkdir .tst 2>/dev/null
9886 if test -d .tst; then
9887   am__leading_dot=.
9888 else
9889   am__leading_dot=_
9890 fi
9891 rmdir .tst 2>/dev/null
9892 AC_SUBST([am__leading_dot])])
9893
9894 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
9895
9896 # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
9897 #
9898 # This file is free software; the Free Software Foundation
9899 # gives unlimited permission to copy and/or distribute it,
9900 # with or without modifications, as long as this notice is preserved.
9901
9902 # serial 4
9903
9904 # AM_MAKE_INCLUDE()
9905 # -----------------
9906 # Check to see how make treats includes.
9907 AC_DEFUN([AM_MAKE_INCLUDE],
9908 [am_make=${MAKE-make}
9909 cat > confinc << 'END'
9910 am__doit:
9911         @echo this is the am__doit target
9912 .PHONY: am__doit
9913 END
9914 # If we don't find an include directive, just comment out the code.
9915 AC_MSG_CHECKING([for style of include used by $am_make])
9916 am__include="#"
9917 am__quote=
9918 _am_result=none
9919 # First try GNU make style include.
9920 echo "include confinc" > confmf
9921 # Ignore all kinds of additional output from `make'.
9922 case `$am_make -s -f confmf 2> /dev/null` in #(
9923 *the\ am__doit\ target*)
9924   am__include=include
9925   am__quote=
9926   _am_result=GNU
9927   ;;
9928 esac
9929 # Now try BSD make style include.
9930 if test "$am__include" = "#"; then
9931    echo '.include "confinc"' > confmf
9932    case `$am_make -s -f confmf 2> /dev/null` in #(
9933    *the\ am__doit\ target*)
9934      am__include=.include
9935      am__quote="\""
9936      _am_result=BSD
9937      ;;
9938    esac
9939 fi
9940 AC_SUBST([am__include])
9941 AC_SUBST([am__quote])
9942 AC_MSG_RESULT([$_am_result])
9943 rm -f confinc confmf
9944 ])
9945
9946 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
9947 # Free Software Foundation, Inc.
9948 #
9949 # This file is free software; the Free Software Foundation
9950 # gives unlimited permission to copy and/or distribute it,
9951 # with or without modifications, as long as this notice is preserved.
9952
9953 # serial 6
9954
9955 # AM_PROG_CC_C_O
9956 # --------------
9957 # Like AC_PROG_CC_C_O, but changed for automake.
9958 AC_DEFUN([AM_PROG_CC_C_O],
9959 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
9960 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9961 AC_REQUIRE_AUX_FILE([compile])dnl
9962 # FIXME: we rely on the cache variable name because
9963 # there is no other way.
9964 set dummy $CC
9965 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
9966 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
9967 if test "$am_t" != yes; then
9968    # Losing compiler, so override with the script.
9969    # FIXME: It is wrong to rewrite CC.
9970    # But if we don't then we get into trouble of one sort or another.
9971    # A longer-term fix would be to have automake use am__CC in this case,
9972    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
9973    CC="$am_aux_dir/compile $CC"
9974 fi
9975 dnl Make sure AC_PROG_CC is never called again, or it will override our
9976 dnl setting of CC.
9977 m4_define([AC_PROG_CC],
9978           [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
9979 ])
9980
9981 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
9982
9983 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
9984 # Free Software Foundation, Inc.
9985 #
9986 # This file is free software; the Free Software Foundation
9987 # gives unlimited permission to copy and/or distribute it,
9988 # with or without modifications, as long as this notice is preserved.
9989
9990 # serial 6
9991
9992 # AM_MISSING_PROG(NAME, PROGRAM)
9993 # ------------------------------
9994 AC_DEFUN([AM_MISSING_PROG],
9995 [AC_REQUIRE([AM_MISSING_HAS_RUN])
9996 $1=${$1-"${am_missing_run}$2"}
9997 AC_SUBST($1)])
9998
9999
10000 # AM_MISSING_HAS_RUN
10001 # ------------------
10002 # Define MISSING if not defined so far and test if it supports --run.
10003 # If it does, set am_missing_run to use it, otherwise, to nothing.
10004 AC_DEFUN([AM_MISSING_HAS_RUN],
10005 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10006 AC_REQUIRE_AUX_FILE([missing])dnl
10007 if test x"${MISSING+set}" != xset; then
10008   case $am_aux_dir in
10009   *\ * | *\     *)
10010     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10011   *)
10012     MISSING="\${SHELL} $am_aux_dir/missing" ;;
10013   esac
10014 fi
10015 # Use eval to expand $SHELL
10016 if eval "$MISSING --run true"; then
10017   am_missing_run="$MISSING --run "
10018 else
10019   am_missing_run=
10020   AC_MSG_WARN([`missing' script is too old or missing])
10021 fi
10022 ])
10023
10024 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
10025 #
10026 # This file is free software; the Free Software Foundation
10027 # gives unlimited permission to copy and/or distribute it,
10028 # with or without modifications, as long as this notice is preserved.
10029
10030 # AM_PROG_MKDIR_P
10031 # ---------------
10032 # Check for `mkdir -p'.
10033 AC_DEFUN([AM_PROG_MKDIR_P],
10034 [AC_PREREQ([2.60])dnl
10035 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10036 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
10037 dnl while keeping a definition of mkdir_p for backward compatibility.
10038 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
10039 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
10040 dnl Makefile.ins that do not define MKDIR_P, so we do our own
10041 dnl adjustment using top_builddir (which is defined more often than
10042 dnl MKDIR_P).
10043 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
10044 case $mkdir_p in
10045   [[\\/$]]* | ?:[[\\/]]*) ;;
10046   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
10047 esac
10048 ])
10049
10050 # Helper functions for option handling.                     -*- Autoconf -*-
10051
10052 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
10053 #
10054 # This file is free software; the Free Software Foundation
10055 # gives unlimited permission to copy and/or distribute it,
10056 # with or without modifications, as long as this notice is preserved.
10057
10058 # serial 4
10059
10060 # _AM_MANGLE_OPTION(NAME)
10061 # -----------------------
10062 AC_DEFUN([_AM_MANGLE_OPTION],
10063 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10064
10065 # _AM_SET_OPTION(NAME)
10066 # ------------------------------
10067 # Set option NAME.  Presently that only means defining a flag for this option.
10068 AC_DEFUN([_AM_SET_OPTION],
10069 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10070
10071 # _AM_SET_OPTIONS(OPTIONS)
10072 # ----------------------------------
10073 # OPTIONS is a space-separated list of Automake options.
10074 AC_DEFUN([_AM_SET_OPTIONS],
10075 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10076
10077 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10078 # -------------------------------------------
10079 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10080 AC_DEFUN([_AM_IF_OPTION],
10081 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10082
10083 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
10084
10085 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
10086 # Free Software Foundation, Inc.
10087 #
10088 # This file is free software; the Free Software Foundation
10089 # gives unlimited permission to copy and/or distribute it,
10090 # with or without modifications, as long as this notice is preserved.
10091
10092 # serial 5
10093
10094 # AM_SANITY_CHECK
10095 # ---------------
10096 AC_DEFUN([AM_SANITY_CHECK],
10097 [AC_MSG_CHECKING([whether build environment is sane])
10098 # Just in case
10099 sleep 1
10100 echo timestamp > conftest.file
10101 # Reject unsafe characters in $srcdir or the absolute working directory
10102 # name.  Accept space and tab only in the latter.
10103 am_lf='
10104 '
10105 case `pwd` in
10106   *[[\\\"\#\$\&\'\`$am_lf]]*)
10107     AC_MSG_ERROR([unsafe absolute working directory name]);;
10108 esac
10109 case $srcdir in
10110   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
10111     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
10112 esac
10113
10114 # Do `set' in a subshell so we don't clobber the current shell's
10115 # arguments.  Must try -L first in case configure is actually a
10116 # symlink; some systems play weird games with the mod time of symlinks
10117 # (eg FreeBSD returns the mod time of the symlink's containing
10118 # directory).
10119 if (
10120    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10121    if test "$[*]" = "X"; then
10122       # -L didn't work.
10123       set X `ls -t "$srcdir/configure" conftest.file`
10124    fi
10125    rm -f conftest.file
10126    if test "$[*]" != "X $srcdir/configure conftest.file" \
10127       && test "$[*]" != "X conftest.file $srcdir/configure"; then
10128
10129       # If neither matched, then we have a broken ls.  This can happen
10130       # if, for instance, CONFIG_SHELL is bash and it inherits a
10131       # broken ls alias from the environment.  This has actually
10132       # happened.  Such a system could not be considered "sane".
10133       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10134 alias in your environment])
10135    fi
10136
10137    test "$[2]" = conftest.file
10138    )
10139 then
10140    # Ok.
10141    :
10142 else
10143    AC_MSG_ERROR([newly created file is older than distributed files!
10144 Check your system clock])
10145 fi
10146 AC_MSG_RESULT(yes)])
10147
10148 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
10149 #
10150 # This file is free software; the Free Software Foundation
10151 # gives unlimited permission to copy and/or distribute it,
10152 # with or without modifications, as long as this notice is preserved.
10153
10154 # AM_PROG_INSTALL_STRIP
10155 # ---------------------
10156 # One issue with vendor `install' (even GNU) is that you can't
10157 # specify the program used to strip binaries.  This is especially
10158 # annoying in cross-compiling environments, where the build's strip
10159 # is unlikely to handle the host's binaries.
10160 # Fortunately install-sh will honor a STRIPPROG variable, so we
10161 # always use install-sh in `make install-strip', and initialize
10162 # STRIPPROG with the value of the STRIP variable (set by the user).
10163 AC_DEFUN([AM_PROG_INSTALL_STRIP],
10164 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10165 # Installed binaries are usually stripped using `strip' when the user
10166 # run `make install-strip'.  However `strip' might not be the right
10167 # tool to use in cross-compilation environments, therefore Automake
10168 # will honor the `STRIP' environment variable to overrule this program.
10169 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10170 if test "$cross_compiling" != no; then
10171   AC_CHECK_TOOL([STRIP], [strip], :)
10172 fi
10173 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10174 AC_SUBST([INSTALL_STRIP_PROGRAM])])
10175
10176 # Copyright (C) 2006, 2008  Free Software Foundation, Inc.
10177 #
10178 # This file is free software; the Free Software Foundation
10179 # gives unlimited permission to copy and/or distribute it,
10180 # with or without modifications, as long as this notice is preserved.
10181
10182 # serial 2
10183
10184 # _AM_SUBST_NOTMAKE(VARIABLE)
10185 # ---------------------------
10186 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10187 # This macro is traced by Automake.
10188 AC_DEFUN([_AM_SUBST_NOTMAKE])
10189
10190 # AM_SUBST_NOTMAKE(VARIABLE)
10191 # ---------------------------
10192 # Public sister of _AM_SUBST_NOTMAKE.
10193 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10194
10195 # Check how to create a tarball.                            -*- Autoconf -*-
10196
10197 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
10198 #
10199 # This file is free software; the Free Software Foundation
10200 # gives unlimited permission to copy and/or distribute it,
10201 # with or without modifications, as long as this notice is preserved.
10202
10203 # serial 2
10204
10205 # _AM_PROG_TAR(FORMAT)
10206 # --------------------
10207 # Check how to create a tarball in format FORMAT.
10208 # FORMAT should be one of `v7', `ustar', or `pax'.
10209 #
10210 # Substitute a variable $(am__tar) that is a command
10211 # writing to stdout a FORMAT-tarball containing the directory
10212 # $tardir.
10213 #     tardir=directory && $(am__tar) > result.tar
10214 #
10215 # Substitute a variable $(am__untar) that extract such
10216 # a tarball read from stdin.
10217 #     $(am__untar) < result.tar
10218 AC_DEFUN([_AM_PROG_TAR],
10219 [# Always define AMTAR for backward compatibility.
10220 AM_MISSING_PROG([AMTAR], [tar])
10221 m4_if([$1], [v7],
10222      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
10223      [m4_case([$1], [ustar],, [pax],,
10224               [m4_fatal([Unknown tar format])])
10225 AC_MSG_CHECKING([how to create a $1 tar archive])
10226 # Loop over all known methods to create a tar archive until one works.
10227 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10228 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10229 # Do not fold the above two line into one, because Tru64 sh and
10230 # Solaris sh will not grok spaces in the rhs of `-'.
10231 for _am_tool in $_am_tools
10232 do
10233   case $_am_tool in
10234   gnutar)
10235     for _am_tar in tar gnutar gtar;
10236     do
10237       AM_RUN_LOG([$_am_tar --version]) && break
10238     done
10239     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10240     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10241     am__untar="$_am_tar -xf -"
10242     ;;
10243   plaintar)
10244     # Must skip GNU tar: if it does not support --format= it doesn't create
10245     # ustar tarball either.
10246     (tar --version) >/dev/null 2>&1 && continue
10247     am__tar='tar chf - "$$tardir"'
10248     am__tar_='tar chf - "$tardir"'
10249     am__untar='tar xf -'
10250     ;;
10251   pax)
10252     am__tar='pax -L -x $1 -w "$$tardir"'
10253     am__tar_='pax -L -x $1 -w "$tardir"'
10254     am__untar='pax -r'
10255     ;;
10256   cpio)
10257     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10258     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10259     am__untar='cpio -i -H $1 -d'
10260     ;;
10261   none)
10262     am__tar=false
10263     am__tar_=false
10264     am__untar=false
10265     ;;
10266   esac
10267
10268   # If the value was cached, stop now.  We just wanted to have am__tar
10269   # and am__untar set.
10270   test -n "${am_cv_prog_tar_$1}" && break
10271
10272   # tar/untar a dummy directory, and stop if the command works
10273   rm -rf conftest.dir
10274   mkdir conftest.dir
10275   echo GrepMe > conftest.dir/file
10276   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10277   rm -rf conftest.dir
10278   if test -s conftest.tar; then
10279     AM_RUN_LOG([$am__untar <conftest.tar])
10280     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10281   fi
10282 done
10283 rm -rf conftest.dir
10284
10285 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10286 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10287 AC_SUBST([am__tar])
10288 AC_SUBST([am__untar])
10289 ]) # _AM_PROG_TAR
10290
10291 m4_include([m4/pkg.m4])