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