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