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