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