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