OSDN Git Service

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