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