Added text grid windows. Output, cursor placement, and character input work. Line...
[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 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
636 #                 2006, 2007, 2008 Free Software Foundation, Inc.
637 #   Written by Gordon Matzigkeit, 1996
638 #
639 # This file is free software; the Free Software Foundation gives
640 # unlimited permission to copy and/or distribute it, with or without
641 # modifications, as long as this notice is preserved.
642
643 m4_define([_LT_COPYING], [dnl
644 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
645 #                 2006, 2007, 2008 Free Software Foundation, Inc.
646 #   Written by Gordon Matzigkeit, 1996
647 #
648 #   This file is part of GNU Libtool.
649 #
650 # GNU Libtool is free software; you can redistribute it and/or
651 # modify it under the terms of the GNU General Public License as
652 # published by the Free Software Foundation; either version 2 of
653 # the License, or (at your option) any later version.
654 #
655 # As a special exception to the GNU General Public License,
656 # if you distribute this file as part of a program or library that
657 # is built using GNU Libtool, you may include this file under the
658 # same distribution terms that you use for the rest of that program.
659 #
660 # GNU Libtool is distributed in the hope that it will be useful,
661 # but WITHOUT ANY WARRANTY; without even the implied warranty of
662 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
663 # GNU General Public License for more details.
664 #
665 # You should have received a copy of the GNU General Public License
666 # along with GNU Libtool; see the file COPYING.  If not, a copy
667 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
668 # obtained by writing to the Free Software Foundation, Inc.,
669 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
670 ])
671
672 # serial 56 LT_INIT
673
674
675 # LT_PREREQ(VERSION)
676 # ------------------
677 # Complain and exit if this libtool version is less that VERSION.
678 m4_defun([LT_PREREQ],
679 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
680        [m4_default([$3],
681                    [m4_fatal([Libtool version $1 or higher is required],
682                              63)])],
683        [$2])])
684
685
686 # _LT_CHECK_BUILDDIR
687 # ------------------
688 # Complain if the absolute build directory name contains unusual characters
689 m4_defun([_LT_CHECK_BUILDDIR],
690 [case `pwd` in
691   *\ * | *\     *)
692     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
693 esac
694 ])
695
696
697 # LT_INIT([OPTIONS])
698 # ------------------
699 AC_DEFUN([LT_INIT],
700 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
701 AC_BEFORE([$0], [LT_LANG])dnl
702 AC_BEFORE([$0], [LT_OUTPUT])dnl
703 AC_BEFORE([$0], [LTDL_INIT])dnl
704 m4_require([_LT_CHECK_BUILDDIR])dnl
705
706 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
707 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
708 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
709 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
710 dnl unless we require an AC_DEFUNed macro:
711 AC_REQUIRE([LTOPTIONS_VERSION])dnl
712 AC_REQUIRE([LTSUGAR_VERSION])dnl
713 AC_REQUIRE([LTVERSION_VERSION])dnl
714 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
715 m4_require([_LT_PROG_LTMAIN])dnl
716
717 dnl Parse OPTIONS
718 _LT_SET_OPTIONS([$0], [$1])
719
720 # This can be used to rebuild libtool when needed
721 LIBTOOL_DEPS="$ltmain"
722
723 # Always use our own libtool.
724 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
725 AC_SUBST(LIBTOOL)dnl
726
727 _LT_SETUP
728
729 # Only expand once:
730 m4_define([LT_INIT])
731 ])# LT_INIT
732
733 # Old names:
734 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
735 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
736 dnl aclocal-1.4 backwards compatibility:
737 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
738 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
739
740
741 # _LT_CC_BASENAME(CC)
742 # -------------------
743 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
744 m4_defun([_LT_CC_BASENAME],
745 [for cc_temp in $1""; do
746   case $cc_temp in
747     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
748     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
749     \-*) ;;
750     *) break;;
751   esac
752 done
753 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
754 ])
755
756
757 # _LT_FILEUTILS_DEFAULTS
758 # ----------------------
759 # It is okay to use these file commands and assume they have been set
760 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
761 m4_defun([_LT_FILEUTILS_DEFAULTS],
762 [: ${CP="cp -f"}
763 : ${MV="mv -f"}
764 : ${RM="rm -f"}
765 ])# _LT_FILEUTILS_DEFAULTS
766
767
768 # _LT_SETUP
769 # ---------
770 m4_defun([_LT_SETUP],
771 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
772 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
773 _LT_DECL([], [host_alias], [0], [The host system])dnl
774 _LT_DECL([], [host], [0])dnl
775 _LT_DECL([], [host_os], [0])dnl
776 dnl
777 _LT_DECL([], [build_alias], [0], [The build system])dnl
778 _LT_DECL([], [build], [0])dnl
779 _LT_DECL([], [build_os], [0])dnl
780 dnl
781 AC_REQUIRE([AC_PROG_CC])dnl
782 AC_REQUIRE([LT_PATH_LD])dnl
783 AC_REQUIRE([LT_PATH_NM])dnl
784 dnl
785 AC_REQUIRE([AC_PROG_LN_S])dnl
786 test -z "$LN_S" && LN_S="ln -s"
787 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
788 dnl
789 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
790 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
791 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
792 dnl
793 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
794 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
795 m4_require([_LT_CMD_RELOAD])dnl
796 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
797 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
798 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
799
800 _LT_CONFIG_LIBTOOL_INIT([
801 # See if we are running on zsh, and set the options which allow our
802 # commands through without removal of \ escapes INIT.
803 if test -n "\${ZSH_VERSION+set}" ; then
804    setopt NO_GLOB_SUBST
805 fi
806 ])
807 if test -n "${ZSH_VERSION+set}" ; then
808    setopt NO_GLOB_SUBST
809 fi
810
811 _LT_CHECK_OBJDIR
812
813 m4_require([_LT_TAG_COMPILER])dnl
814 _LT_PROG_ECHO_BACKSLASH
815
816 case $host_os in
817 aix3*)
818   # AIX sometimes has problems with the GCC collect2 program.  For some
819   # reason, if we set the COLLECT_NAMES environment variable, the problems
820   # vanish in a puff of smoke.
821   if test "X${COLLECT_NAMES+set}" != Xset; then
822     COLLECT_NAMES=
823     export COLLECT_NAMES
824   fi
825   ;;
826 esac
827
828 # Sed substitution that helps us do robust quoting.  It backslashifies
829 # metacharacters that are still active within double-quoted strings.
830 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
831
832 # Same as above, but do not quote variable references.
833 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
834
835 # Sed substitution to delay expansion of an escaped shell variable in a
836 # double_quote_subst'ed string.
837 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
838
839 # Sed substitution to delay expansion of an escaped single quote.
840 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
841
842 # Sed substitution to avoid accidental globbing in evaled expressions
843 no_glob_subst='s/\*/\\\*/g'
844
845 # Global variables:
846 ofile=libtool
847 can_build_shared=yes
848
849 # All known linkers require a `.a' archive for static linking (except MSVC,
850 # which needs '.lib').
851 libext=a
852
853 with_gnu_ld="$lt_cv_prog_gnu_ld"
854
855 old_CC="$CC"
856 old_CFLAGS="$CFLAGS"
857
858 # Set sane defaults for various variables
859 test -z "$CC" && CC=cc
860 test -z "$LTCC" && LTCC=$CC
861 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
862 test -z "$LD" && LD=ld
863 test -z "$ac_objext" && ac_objext=o
864
865 _LT_CC_BASENAME([$compiler])
866
867 # Only perform the check for file, if the check method requires it
868 test -z "$MAGIC_CMD" && MAGIC_CMD=file
869 case $deplibs_check_method in
870 file_magic*)
871   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
872     _LT_PATH_MAGIC
873   fi
874   ;;
875 esac
876
877 # Use C for the default configuration in the libtool script
878 LT_SUPPORTED_TAG([CC])
879 _LT_LANG_C_CONFIG
880 _LT_LANG_DEFAULT_CONFIG
881 _LT_CONFIG_COMMANDS
882 ])# _LT_SETUP
883
884
885 # _LT_PROG_LTMAIN
886 # ---------------
887 # Note that this code is called both from `configure', and `config.status'
888 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
889 # `config.status' has no value for ac_aux_dir unless we are using Automake,
890 # so we pass a copy along to make sure it has a sensible value anyway.
891 m4_defun([_LT_PROG_LTMAIN],
892 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
893 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
894 ltmain="$ac_aux_dir/ltmain.sh"
895 ])# _LT_PROG_LTMAIN
896
897
898
899 # So that we can recreate a full libtool script including additional
900 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
901 # in macros and then make a single call at the end using the `libtool'
902 # label.
903
904
905 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
906 # ----------------------------------------
907 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
908 m4_define([_LT_CONFIG_LIBTOOL_INIT],
909 [m4_ifval([$1],
910           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
911                      [$1
912 ])])])
913
914 # Initialize.
915 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
916
917
918 # _LT_CONFIG_LIBTOOL([COMMANDS])
919 # ------------------------------
920 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
921 m4_define([_LT_CONFIG_LIBTOOL],
922 [m4_ifval([$1],
923           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
924                      [$1
925 ])])])
926
927 # Initialize.
928 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
929
930
931 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
932 # -----------------------------------------------------
933 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
934 [_LT_CONFIG_LIBTOOL([$1])
935 _LT_CONFIG_LIBTOOL_INIT([$2])
936 ])
937
938
939 # _LT_FORMAT_COMMENT([COMMENT])
940 # -----------------------------
941 # Add leading comment marks to the start of each line, and a trailing
942 # full-stop to the whole comment if one is not present already.
943 m4_define([_LT_FORMAT_COMMENT],
944 [m4_ifval([$1], [
945 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
946               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
947 )])
948
949
950
951
952
953 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
954 # -------------------------------------------------------------------
955 # CONFIGNAME is the name given to the value in the libtool script.
956 # VARNAME is the (base) name used in the configure script.
957 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
958 # VARNAME.  Any other value will be used directly.
959 m4_define([_LT_DECL],
960 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
961     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
962         [m4_ifval([$1], [$1], [$2])])
963     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
964     m4_ifval([$4],
965         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
966     lt_dict_add_subkey([lt_decl_dict], [$2],
967         [tagged?], [m4_ifval([$5], [yes], [no])])])
968 ])
969
970
971 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
972 # --------------------------------------------------------
973 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
974
975
976 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
977 # ------------------------------------------------
978 m4_define([lt_decl_tag_varnames],
979 [_lt_decl_filter([tagged?], [yes], $@)])
980
981
982 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
983 # ---------------------------------------------------------
984 m4_define([_lt_decl_filter],
985 [m4_case([$#],
986   [0], [m4_fatal([$0: too few arguments: $#])],
987   [1], [m4_fatal([$0: too few arguments: $#: $1])],
988   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
989   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
990   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
991 ])
992
993
994 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
995 # --------------------------------------------------
996 m4_define([lt_decl_quote_varnames],
997 [_lt_decl_filter([value], [1], $@)])
998
999
1000 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1001 # ---------------------------------------------------
1002 m4_define([lt_decl_dquote_varnames],
1003 [_lt_decl_filter([value], [2], $@)])
1004
1005
1006 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1007 # ---------------------------------------------------
1008 m4_define([lt_decl_varnames_tagged],
1009 [m4_assert([$# <= 2])dnl
1010 _$0(m4_quote(m4_default([$1], [[, ]])),
1011     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1012     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1013 m4_define([_lt_decl_varnames_tagged],
1014 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1015
1016
1017 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1018 # ------------------------------------------------
1019 m4_define([lt_decl_all_varnames],
1020 [_$0(m4_quote(m4_default([$1], [[, ]])),
1021      m4_if([$2], [],
1022            m4_quote(lt_decl_varnames),
1023         m4_quote(m4_shift($@))))[]dnl
1024 ])
1025 m4_define([_lt_decl_all_varnames],
1026 [lt_join($@, lt_decl_varnames_tagged([$1],
1027                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1028 ])
1029
1030
1031 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1032 # ------------------------------------
1033 # Quote a variable value, and forward it to `config.status' so that its
1034 # declaration there will have the same value as in `configure'.  VARNAME
1035 # must have a single quote delimited value for this to work.
1036 m4_define([_LT_CONFIG_STATUS_DECLARE],
1037 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1038
1039
1040 # _LT_CONFIG_STATUS_DECLARATIONS
1041 # ------------------------------
1042 # We delimit libtool config variables with single quotes, so when
1043 # we write them to config.status, we have to be sure to quote all
1044 # embedded single quotes properly.  In configure, this macro expands
1045 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1046 #
1047 #    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1048 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1049 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1050     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1051
1052
1053 # _LT_LIBTOOL_TAGS
1054 # ----------------
1055 # Output comment and list of tags supported by the script
1056 m4_defun([_LT_LIBTOOL_TAGS],
1057 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1058 available_tags="_LT_TAGS"dnl
1059 ])
1060
1061
1062 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1063 # -----------------------------------
1064 # Extract the dictionary values for VARNAME (optionally with TAG) and
1065 # expand to a commented shell variable setting:
1066 #
1067 #    # Some comment about what VAR is for.
1068 #    visible_name=$lt_internal_name
1069 m4_define([_LT_LIBTOOL_DECLARE],
1070 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1071                                            [description])))[]dnl
1072 m4_pushdef([_libtool_name],
1073     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1074 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1075     [0], [_libtool_name=[$]$1],
1076     [1], [_libtool_name=$lt_[]$1],
1077     [2], [_libtool_name=$lt_[]$1],
1078     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1079 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1080 ])
1081
1082
1083 # _LT_LIBTOOL_CONFIG_VARS
1084 # -----------------------
1085 # Produce commented declarations of non-tagged libtool config variables
1086 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1087 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1088 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1089 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1090 [m4_foreach([_lt_var],
1091     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1092     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1093
1094
1095 # _LT_LIBTOOL_TAG_VARS(TAG)
1096 # -------------------------
1097 m4_define([_LT_LIBTOOL_TAG_VARS],
1098 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1099     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1100
1101
1102 # _LT_TAGVAR(VARNAME, [TAGNAME])
1103 # ------------------------------
1104 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1105
1106
1107 # _LT_CONFIG_COMMANDS
1108 # -------------------
1109 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1110 # variables for single and double quote escaping we saved from calls
1111 # to _LT_DECL, we can put quote escaped variables declarations
1112 # into `config.status', and then the shell code to quote escape them in
1113 # for loops in `config.status'.  Finally, any additional code accumulated
1114 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1115 m4_defun([_LT_CONFIG_COMMANDS],
1116 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1117         dnl If the libtool generation code has been placed in $CONFIG_LT,
1118         dnl instead of duplicating it all over again into config.status,
1119         dnl then we will have config.status run $CONFIG_LT later, so it
1120         dnl needs to know what name is stored there:
1121         [AC_CONFIG_COMMANDS([libtool],
1122             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1123     dnl If the libtool generation code is destined for config.status,
1124     dnl expand the accumulated commands and init code now:
1125     [AC_CONFIG_COMMANDS([libtool],
1126         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1127 ])#_LT_CONFIG_COMMANDS
1128
1129
1130 # Initialize.
1131 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1132 [
1133
1134 # The HP-UX ksh and POSIX shell print the target directory to stdout
1135 # if CDPATH is set.
1136 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1137
1138 sed_quote_subst='$sed_quote_subst'
1139 double_quote_subst='$double_quote_subst'
1140 delay_variable_subst='$delay_variable_subst'
1141 _LT_CONFIG_STATUS_DECLARATIONS
1142 LTCC='$LTCC'
1143 LTCFLAGS='$LTCFLAGS'
1144 compiler='$compiler_DEFAULT'
1145
1146 # Quote evaled strings.
1147 for var in lt_decl_all_varnames([[ \
1148 ]], lt_decl_quote_varnames); do
1149     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1150     *[[\\\\\\\`\\"\\\$]]*)
1151       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1152       ;;
1153     *)
1154       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1155       ;;
1156     esac
1157 done
1158
1159 # Double-quote double-evaled strings.
1160 for var in lt_decl_all_varnames([[ \
1161 ]], lt_decl_dquote_varnames); do
1162     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1163     *[[\\\\\\\`\\"\\\$]]*)
1164       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1165       ;;
1166     *)
1167       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1168       ;;
1169     esac
1170 done
1171
1172 # Fix-up fallback echo if it was mangled by the above quoting rules.
1173 case \$lt_ECHO in
1174 *'\\\[$]0 --fallback-echo"')dnl "
1175   lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1176   ;;
1177 esac
1178
1179 _LT_OUTPUT_LIBTOOL_INIT
1180 ])
1181
1182
1183 # LT_OUTPUT
1184 # ---------
1185 # This macro allows early generation of the libtool script (before
1186 # AC_OUTPUT is called), incase it is used in configure for compilation
1187 # tests.
1188 AC_DEFUN([LT_OUTPUT],
1189 [: ${CONFIG_LT=./config.lt}
1190 AC_MSG_NOTICE([creating $CONFIG_LT])
1191 cat >"$CONFIG_LT" <<_LTEOF
1192 #! $SHELL
1193 # Generated by $as_me.
1194 # Run this file to recreate a libtool stub with the current configuration.
1195
1196 lt_cl_silent=false
1197 SHELL=\${CONFIG_SHELL-$SHELL}
1198 _LTEOF
1199
1200 cat >>"$CONFIG_LT" <<\_LTEOF
1201 AS_SHELL_SANITIZE
1202 _AS_PREPARE
1203
1204 exec AS_MESSAGE_FD>&1
1205 exec AS_MESSAGE_LOG_FD>>config.log
1206 {
1207   echo
1208   AS_BOX([Running $as_me.])
1209 } >&AS_MESSAGE_LOG_FD
1210
1211 lt_cl_help="\
1212 \`$as_me' creates a local libtool stub from the current configuration,
1213 for use in further configure time tests before the real libtool is
1214 generated.
1215
1216 Usage: $[0] [[OPTIONS]]
1217
1218   -h, --help      print this help, then exit
1219   -V, --version   print version number, then exit
1220   -q, --quiet     do not print progress messages
1221   -d, --debug     don't remove temporary files
1222
1223 Report bugs to <bug-libtool@gnu.org>."
1224
1225 lt_cl_version="\
1226 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1227 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1228 configured by $[0], generated by m4_PACKAGE_STRING.
1229
1230 Copyright (C) 2008 Free Software Foundation, Inc.
1231 This config.lt script is free software; the Free Software Foundation
1232 gives unlimited permision to copy, distribute and modify it."
1233
1234 while test $[#] != 0
1235 do
1236   case $[1] in
1237     --version | --v* | -V )
1238       echo "$lt_cl_version"; exit 0 ;;
1239     --help | --h* | -h )
1240       echo "$lt_cl_help"; exit 0 ;;
1241     --debug | --d* | -d )
1242       debug=: ;;
1243     --quiet | --q* | --silent | --s* | -q )
1244       lt_cl_silent=: ;;
1245
1246     -*) AC_MSG_ERROR([unrecognized option: $[1]
1247 Try \`$[0] --help' for more information.]) ;;
1248
1249     *) AC_MSG_ERROR([unrecognized argument: $[1]
1250 Try \`$[0] --help' for more information.]) ;;
1251   esac
1252   shift
1253 done
1254
1255 if $lt_cl_silent; then
1256   exec AS_MESSAGE_FD>/dev/null
1257 fi
1258 _LTEOF
1259
1260 cat >>"$CONFIG_LT" <<_LTEOF
1261 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1262 _LTEOF
1263
1264 cat >>"$CONFIG_LT" <<\_LTEOF
1265 AC_MSG_NOTICE([creating $ofile])
1266 _LT_OUTPUT_LIBTOOL_COMMANDS
1267 AS_EXIT(0)
1268 _LTEOF
1269 chmod +x "$CONFIG_LT"
1270
1271 # configure is writing to config.log, but config.lt does its own redirection,
1272 # appending to config.log, which fails on DOS, as config.log is still kept
1273 # open by configure.  Here we exec the FD to /dev/null, effectively closing
1274 # config.log, so it can be properly (re)opened and appended to by config.lt.
1275 if test "$no_create" != yes; then
1276   lt_cl_success=:
1277   test "$silent" = yes &&
1278     lt_config_lt_args="$lt_config_lt_args --quiet"
1279   exec AS_MESSAGE_LOG_FD>/dev/null
1280   $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1281   exec AS_MESSAGE_LOG_FD>>config.log
1282   $lt_cl_success || AS_EXIT(1)
1283 fi
1284 ])# LT_OUTPUT
1285
1286
1287 # _LT_CONFIG(TAG)
1288 # ---------------
1289 # If TAG is the built-in tag, create an initial libtool script with a
1290 # default configuration from the untagged config vars.  Otherwise add code
1291 # to config.status for appending the configuration named by TAG from the
1292 # matching tagged config vars.
1293 m4_defun([_LT_CONFIG],
1294 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1295 _LT_CONFIG_SAVE_COMMANDS([
1296   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1297   m4_if(_LT_TAG, [C], [
1298     # See if we are running on zsh, and set the options which allow our
1299     # commands through without removal of \ escapes.
1300     if test -n "${ZSH_VERSION+set}" ; then
1301       setopt NO_GLOB_SUBST
1302     fi
1303
1304     cfgfile="${ofile}T"
1305     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1306     $RM "$cfgfile"
1307
1308     cat <<_LT_EOF >> "$cfgfile"
1309 #! $SHELL
1310
1311 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1312 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1313 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1314 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1315 #
1316 _LT_COPYING
1317 _LT_LIBTOOL_TAGS
1318
1319 # ### BEGIN LIBTOOL CONFIG
1320 _LT_LIBTOOL_CONFIG_VARS
1321 _LT_LIBTOOL_TAG_VARS
1322 # ### END LIBTOOL CONFIG
1323
1324 _LT_EOF
1325
1326   case $host_os in
1327   aix3*)
1328     cat <<\_LT_EOF >> "$cfgfile"
1329 # AIX sometimes has problems with the GCC collect2 program.  For some
1330 # reason, if we set the COLLECT_NAMES environment variable, the problems
1331 # vanish in a puff of smoke.
1332 if test "X${COLLECT_NAMES+set}" != Xset; then
1333   COLLECT_NAMES=
1334   export COLLECT_NAMES
1335 fi
1336 _LT_EOF
1337     ;;
1338   esac
1339
1340   _LT_PROG_LTMAIN
1341
1342   # We use sed instead of cat because bash on DJGPP gets confused if
1343   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1344   # text mode, it properly converts lines to CR/LF.  This bash problem
1345   # is reportedly fixed, but why not run on old versions too?
1346   sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
1347     || (rm -f "$cfgfile"; exit 1)
1348
1349   _LT_PROG_XSI_SHELLFNS
1350
1351   sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
1352     || (rm -f "$cfgfile"; exit 1)
1353
1354   mv -f "$cfgfile" "$ofile" ||
1355     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1356   chmod +x "$ofile"
1357 ],
1358 [cat <<_LT_EOF >> "$ofile"
1359
1360 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1361 dnl in a comment (ie after a #).
1362 # ### BEGIN LIBTOOL TAG CONFIG: $1
1363 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
1364 # ### END LIBTOOL TAG CONFIG: $1
1365 _LT_EOF
1366 ])dnl /m4_if
1367 ],
1368 [m4_if([$1], [], [
1369     PACKAGE='$PACKAGE'
1370     VERSION='$VERSION'
1371     TIMESTAMP='$TIMESTAMP'
1372     RM='$RM'
1373     ofile='$ofile'], [])
1374 ])dnl /_LT_CONFIG_SAVE_COMMANDS
1375 ])# _LT_CONFIG
1376
1377
1378 # LT_SUPPORTED_TAG(TAG)
1379 # ---------------------
1380 # Trace this macro to discover what tags are supported by the libtool
1381 # --tag option, using:
1382 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1383 AC_DEFUN([LT_SUPPORTED_TAG], [])
1384
1385
1386 # C support is built-in for now
1387 m4_define([_LT_LANG_C_enabled], [])
1388 m4_define([_LT_TAGS], [])
1389
1390
1391 # LT_LANG(LANG)
1392 # -------------
1393 # Enable libtool support for the given language if not already enabled.
1394 AC_DEFUN([LT_LANG],
1395 [AC_BEFORE([$0], [LT_OUTPUT])dnl
1396 m4_case([$1],
1397   [C],                  [_LT_LANG(C)],
1398   [C++],                [_LT_LANG(CXX)],
1399   [Java],               [_LT_LANG(GCJ)],
1400   [Fortran 77],         [_LT_LANG(F77)],
1401   [Fortran],            [_LT_LANG(FC)],
1402   [Windows Resource],   [_LT_LANG(RC)],
1403   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1404     [_LT_LANG($1)],
1405     [m4_fatal([$0: unsupported language: "$1"])])])dnl
1406 ])# LT_LANG
1407
1408
1409 # _LT_LANG(LANGNAME)
1410 # ------------------
1411 m4_defun([_LT_LANG],
1412 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
1413   [LT_SUPPORTED_TAG([$1])dnl
1414   m4_append([_LT_TAGS], [$1 ])dnl
1415   m4_define([_LT_LANG_]$1[_enabled], [])dnl
1416   _LT_LANG_$1_CONFIG($1)])dnl
1417 ])# _LT_LANG
1418
1419
1420 # _LT_LANG_DEFAULT_CONFIG
1421 # -----------------------
1422 m4_defun([_LT_LANG_DEFAULT_CONFIG],
1423 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
1424   [LT_LANG(CXX)],
1425   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1426
1427 AC_PROVIDE_IFELSE([AC_PROG_F77],
1428   [LT_LANG(F77)],
1429   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1430
1431 AC_PROVIDE_IFELSE([AC_PROG_FC],
1432   [LT_LANG(FC)],
1433   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1434
1435 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1436 dnl pulling things in needlessly.
1437 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1438   [LT_LANG(GCJ)],
1439   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1440     [LT_LANG(GCJ)],
1441     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1442       [LT_LANG(GCJ)],
1443       [m4_ifdef([AC_PROG_GCJ],
1444         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1445        m4_ifdef([A][M_PROG_GCJ],
1446         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1447        m4_ifdef([LT_PROG_GCJ],
1448         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1449
1450 AC_PROVIDE_IFELSE([LT_PROG_RC],
1451   [LT_LANG(RC)],
1452   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1453 ])# _LT_LANG_DEFAULT_CONFIG
1454
1455 # Obsolete macros:
1456 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1457 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1458 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1459 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1460 dnl aclocal-1.4 backwards compatibility:
1461 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1462 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1463 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1464 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1465
1466
1467 # _LT_TAG_COMPILER
1468 # ----------------
1469 m4_defun([_LT_TAG_COMPILER],
1470 [AC_REQUIRE([AC_PROG_CC])dnl
1471
1472 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1473 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1474 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1475 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1476
1477 # If no C compiler was specified, use CC.
1478 LTCC=${LTCC-"$CC"}
1479
1480 # If no C compiler flags were specified, use CFLAGS.
1481 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1482
1483 # Allow CC to be a program name with arguments.
1484 compiler=$CC
1485 ])# _LT_TAG_COMPILER
1486
1487
1488 # _LT_COMPILER_BOILERPLATE
1489 # ------------------------
1490 # Check for compiler boilerplate output or warnings with
1491 # the simple compiler test code.
1492 m4_defun([_LT_COMPILER_BOILERPLATE],
1493 [m4_require([_LT_DECL_SED])dnl
1494 ac_outfile=conftest.$ac_objext
1495 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1496 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1497 _lt_compiler_boilerplate=`cat conftest.err`
1498 $RM conftest*
1499 ])# _LT_COMPILER_BOILERPLATE
1500
1501
1502 # _LT_LINKER_BOILERPLATE
1503 # ----------------------
1504 # Check for linker boilerplate output or warnings with
1505 # the simple link test code.
1506 m4_defun([_LT_LINKER_BOILERPLATE],
1507 [m4_require([_LT_DECL_SED])dnl
1508 ac_outfile=conftest.$ac_objext
1509 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1510 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1511 _lt_linker_boilerplate=`cat conftest.err`
1512 $RM -r conftest*
1513 ])# _LT_LINKER_BOILERPLATE
1514
1515 # _LT_REQUIRED_DARWIN_CHECKS
1516 # -------------------------
1517 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1518   case $host_os in
1519     rhapsody* | darwin*)
1520     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1521     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1522     AC_CHECK_TOOL([LIPO], [lipo], [:])
1523     AC_CHECK_TOOL([OTOOL], [otool], [:])
1524     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1525     _LT_DECL([], [DSYMUTIL], [1],
1526       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1527     _LT_DECL([], [NMEDIT], [1],
1528       [Tool to change global to local symbols on Mac OS X])
1529     _LT_DECL([], [LIPO], [1],
1530       [Tool to manipulate fat objects and archives on Mac OS X])
1531     _LT_DECL([], [OTOOL], [1],
1532       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1533     _LT_DECL([], [OTOOL64], [1],
1534       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1535
1536     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1537       [lt_cv_apple_cc_single_mod=no
1538       if test -z "${LT_MULTI_MODULE}"; then
1539         # By default we will add the -single_module flag. You can override
1540         # by either setting the environment variable LT_MULTI_MODULE
1541         # non-empty at configure time, or by adding -multi_module to the
1542         # link flags.
1543         rm -rf libconftest.dylib*
1544         echo "int foo(void){return 1;}" > conftest.c
1545         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1546 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1547         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1548           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1549         _lt_result=$?
1550         if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1551           lt_cv_apple_cc_single_mod=yes
1552         else
1553           cat conftest.err >&AS_MESSAGE_LOG_FD
1554         fi
1555         rm -rf libconftest.dylib*
1556         rm -f conftest.*
1557       fi])
1558     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1559       [lt_cv_ld_exported_symbols_list],
1560       [lt_cv_ld_exported_symbols_list=no
1561       save_LDFLAGS=$LDFLAGS
1562       echo "_main" > conftest.sym
1563       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1564       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1565         [lt_cv_ld_exported_symbols_list=yes],
1566         [lt_cv_ld_exported_symbols_list=no])
1567         LDFLAGS="$save_LDFLAGS"
1568     ])
1569     case $host_os in
1570     rhapsody* | darwin1.[[012]])
1571       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1572     darwin1.*)
1573       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1574     darwin*) # darwin 5.x on
1575       # if running on 10.5 or later, the deployment target defaults
1576       # to the OS version, if on x86, and 10.4, the deployment
1577       # target defaults to 10.4. Don't you love it?
1578       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1579         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1580           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1581         10.[[012]]*)
1582           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1583         10.*)
1584           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1585       esac
1586     ;;
1587   esac
1588     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1589       _lt_dar_single_mod='$single_module'
1590     fi
1591     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1592       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1593     else
1594       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1595     fi
1596     if test "$DSYMUTIL" != ":"; then
1597       _lt_dsymutil='~$DSYMUTIL $lib || :'
1598     else
1599       _lt_dsymutil=
1600     fi
1601     ;;
1602   esac
1603 ])
1604
1605
1606 # _LT_DARWIN_LINKER_FEATURES
1607 # --------------------------
1608 # Checks for linker and compiler features on darwin
1609 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1610 [
1611   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1612   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1613   _LT_TAGVAR(hardcode_direct, $1)=no
1614   _LT_TAGVAR(hardcode_automatic, $1)=yes
1615   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1616   _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1617   _LT_TAGVAR(link_all_deplibs, $1)=yes
1618   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1619   case $cc_basename in
1620      ifort*) _lt_dar_can_shared=yes ;;
1621      *) _lt_dar_can_shared=$GCC ;;
1622   esac
1623   if test "$_lt_dar_can_shared" = "yes"; then
1624     output_verbose_link_cmd=echo
1625     _LT_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}"
1626     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1627     _LT_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}"
1628     _LT_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}"
1629     m4_if([$1], [CXX],
1630 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1631       _LT_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}"
1632       _LT_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}"
1633     fi
1634 ],[])
1635   else
1636   _LT_TAGVAR(ld_shlibs, $1)=no
1637   fi
1638 ])
1639
1640 # _LT_SYS_MODULE_PATH_AIX
1641 # -----------------------
1642 # Links a minimal program and checks the executable
1643 # for the system default hardcoded library path. In most cases,
1644 # this is /usr/lib:/lib, but when the MPI compilers are used
1645 # the location of the communication and MPI libs are included too.
1646 # If we don't find anything, use the default library path according
1647 # to the aix ld manual.
1648 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1649 [m4_require([_LT_DECL_SED])dnl
1650 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1651 lt_aix_libpath_sed='
1652     /Import File Strings/,/^$/ {
1653         /^0/ {
1654             s/^0  *\(.*\)$/\1/
1655             p
1656         }
1657     }'
1658 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1659 # Check for a 64-bit object if we didn't find anything.
1660 if test -z "$aix_libpath"; then
1661   aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1662 fi],[])
1663 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1664 ])# _LT_SYS_MODULE_PATH_AIX
1665
1666
1667 # _LT_SHELL_INIT(ARG)
1668 # -------------------
1669 m4_define([_LT_SHELL_INIT],
1670 [ifdef([AC_DIVERSION_NOTICE],
1671              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1672          [AC_DIVERT_PUSH(NOTICE)])
1673 $1
1674 AC_DIVERT_POP
1675 ])# _LT_SHELL_INIT
1676
1677
1678 # _LT_PROG_ECHO_BACKSLASH
1679 # -----------------------
1680 # Add some code to the start of the generated configure script which
1681 # will find an echo command which doesn't interpret backslashes.
1682 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1683 [_LT_SHELL_INIT([
1684 # Check that we are running under the correct shell.
1685 SHELL=${CONFIG_SHELL-/bin/sh}
1686
1687 case X$lt_ECHO in
1688 X*--fallback-echo)
1689   # Remove one level of quotation (which was required for Make).
1690   ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1691   ;;
1692 esac
1693
1694 ECHO=${lt_ECHO-echo}
1695 if test "X[$]1" = X--no-reexec; then
1696   # Discard the --no-reexec flag, and continue.
1697   shift
1698 elif test "X[$]1" = X--fallback-echo; then
1699   # Avoid inline document here, it may be left over
1700   :
1701 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1702   # Yippee, $ECHO works!
1703   :
1704 else
1705   # Restart under the correct shell.
1706   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1707 fi
1708
1709 if test "X[$]1" = X--fallback-echo; then
1710   # used as fallback echo
1711   shift
1712   cat <<_LT_EOF
1713 [$]*
1714 _LT_EOF
1715   exit 0
1716 fi
1717
1718 # The HP-UX ksh and POSIX shell print the target directory to stdout
1719 # if CDPATH is set.
1720 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1721
1722 if test -z "$lt_ECHO"; then
1723   if test "X${echo_test_string+set}" != Xset; then
1724     # find a string as large as possible, as long as the shell can cope with it
1725     for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1726       # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1727       if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1728          { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1729       then
1730         break
1731       fi
1732     done
1733   fi
1734
1735   if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1736      echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1737      test "X$echo_testing_string" = "X$echo_test_string"; then
1738     :
1739   else
1740     # The Solaris, AIX, and Digital Unix default echo programs unquote
1741     # backslashes.  This makes it impossible to quote backslashes using
1742     #   echo "$something" | sed 's/\\/\\\\/g'
1743     #
1744     # So, first we look for a working echo in the user's PATH.
1745
1746     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1747     for dir in $PATH /usr/ucb; do
1748       IFS="$lt_save_ifs"
1749       if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1750          test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1751          echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1752          test "X$echo_testing_string" = "X$echo_test_string"; then
1753         ECHO="$dir/echo"
1754         break
1755       fi
1756     done
1757     IFS="$lt_save_ifs"
1758
1759     if test "X$ECHO" = Xecho; then
1760       # We didn't find a better echo, so look for alternatives.
1761       if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1762          echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1763          test "X$echo_testing_string" = "X$echo_test_string"; then
1764         # This shell has a builtin print -r that does the trick.
1765         ECHO='print -r'
1766       elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1767            test "X$CONFIG_SHELL" != X/bin/ksh; then
1768         # If we have ksh, try running configure again with it.
1769         ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1770         export ORIGINAL_CONFIG_SHELL
1771         CONFIG_SHELL=/bin/ksh
1772         export CONFIG_SHELL
1773         exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1774       else
1775         # Try using printf.
1776         ECHO='printf %s\n'
1777         if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1778            echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1779            test "X$echo_testing_string" = "X$echo_test_string"; then
1780           # Cool, printf works
1781           :
1782         elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1783              test "X$echo_testing_string" = 'X\t' &&
1784              echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1785              test "X$echo_testing_string" = "X$echo_test_string"; then
1786           CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1787           export CONFIG_SHELL
1788           SHELL="$CONFIG_SHELL"
1789           export SHELL
1790           ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1791         elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1792              test "X$echo_testing_string" = 'X\t' &&
1793              echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1794              test "X$echo_testing_string" = "X$echo_test_string"; then
1795           ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1796         else
1797           # maybe with a smaller string...
1798           prev=:
1799
1800           for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1801             if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1802             then
1803               break
1804             fi
1805             prev="$cmd"
1806           done
1807
1808           if test "$prev" != 'sed 50q "[$]0"'; then
1809             echo_test_string=`eval $prev`
1810             export echo_test_string
1811             exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1812           else
1813             # Oops.  We lost completely, so just stick with echo.
1814             ECHO=echo
1815           fi
1816         fi
1817       fi
1818     fi
1819   fi
1820 fi
1821
1822 # Copy echo and quote the copy suitably for passing to libtool from
1823 # the Makefile, instead of quoting the original, which is used later.
1824 lt_ECHO=$ECHO
1825 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1826    lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1827 fi
1828
1829 AC_SUBST(lt_ECHO)
1830 ])
1831 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1832 _LT_DECL([], [ECHO], [1],
1833     [An echo program that does not interpret backslashes])
1834 ])# _LT_PROG_ECHO_BACKSLASH
1835
1836
1837 # _LT_ENABLE_LOCK
1838 # ---------------
1839 m4_defun([_LT_ENABLE_LOCK],
1840 [AC_ARG_ENABLE([libtool-lock],
1841   [AS_HELP_STRING([--disable-libtool-lock],
1842     [avoid locking (might break parallel builds)])])
1843 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1844
1845 # Some flags need to be propagated to the compiler or linker for good
1846 # libtool support.
1847 case $host in
1848 ia64-*-hpux*)
1849   # Find out which ABI we are using.
1850   echo 'int i;' > conftest.$ac_ext
1851   if AC_TRY_EVAL(ac_compile); then
1852     case `/usr/bin/file conftest.$ac_objext` in
1853       *ELF-32*)
1854         HPUX_IA64_MODE="32"
1855         ;;
1856       *ELF-64*)
1857         HPUX_IA64_MODE="64"
1858         ;;
1859     esac
1860   fi
1861   rm -rf conftest*
1862   ;;
1863 *-*-irix6*)
1864   # Find out which ABI we are using.
1865   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1866   if AC_TRY_EVAL(ac_compile); then
1867     if test "$lt_cv_prog_gnu_ld" = yes; then
1868       case `/usr/bin/file conftest.$ac_objext` in
1869         *32-bit*)
1870           LD="${LD-ld} -melf32bsmip"
1871           ;;
1872         *N32*)
1873           LD="${LD-ld} -melf32bmipn32"
1874           ;;
1875         *64-bit*)
1876           LD="${LD-ld} -melf64bmip"
1877         ;;
1878       esac
1879     else
1880       case `/usr/bin/file conftest.$ac_objext` in
1881         *32-bit*)
1882           LD="${LD-ld} -32"
1883           ;;
1884         *N32*)
1885           LD="${LD-ld} -n32"
1886           ;;
1887         *64-bit*)
1888           LD="${LD-ld} -64"
1889           ;;
1890       esac
1891     fi
1892   fi
1893   rm -rf conftest*
1894   ;;
1895
1896 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1897 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1898   # Find out which ABI we are using.
1899   echo 'int i;' > conftest.$ac_ext
1900   if AC_TRY_EVAL(ac_compile); then
1901     case `/usr/bin/file conftest.o` in
1902       *32-bit*)
1903         case $host in
1904           x86_64-*kfreebsd*-gnu)
1905             LD="${LD-ld} -m elf_i386_fbsd"
1906             ;;
1907           x86_64-*linux*)
1908             LD="${LD-ld} -m elf_i386"
1909             ;;
1910           ppc64-*linux*|powerpc64-*linux*)
1911             LD="${LD-ld} -m elf32ppclinux"
1912             ;;
1913           s390x-*linux*)
1914             LD="${LD-ld} -m elf_s390"
1915             ;;
1916           sparc64-*linux*)
1917             LD="${LD-ld} -m elf32_sparc"
1918             ;;
1919         esac
1920         ;;
1921       *64-bit*)
1922         case $host in
1923           x86_64-*kfreebsd*-gnu)
1924             LD="${LD-ld} -m elf_x86_64_fbsd"
1925             ;;
1926           x86_64-*linux*)
1927             LD="${LD-ld} -m elf_x86_64"
1928             ;;
1929           ppc*-*linux*|powerpc*-*linux*)
1930             LD="${LD-ld} -m elf64ppc"
1931             ;;
1932           s390*-*linux*|s390*-*tpf*)
1933             LD="${LD-ld} -m elf64_s390"
1934             ;;
1935           sparc*-*linux*)
1936             LD="${LD-ld} -m elf64_sparc"
1937             ;;
1938         esac
1939         ;;
1940     esac
1941   fi
1942   rm -rf conftest*
1943   ;;
1944
1945 *-*-sco3.2v5*)
1946   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1947   SAVE_CFLAGS="$CFLAGS"
1948   CFLAGS="$CFLAGS -belf"
1949   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1950     [AC_LANG_PUSH(C)
1951      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1952      AC_LANG_POP])
1953   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1954     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1955     CFLAGS="$SAVE_CFLAGS"
1956   fi
1957   ;;
1958 sparc*-*solaris*)
1959   # Find out which ABI we are using.
1960   echo 'int i;' > conftest.$ac_ext
1961   if AC_TRY_EVAL(ac_compile); then
1962     case `/usr/bin/file conftest.o` in
1963     *64-bit*)
1964       case $lt_cv_prog_gnu_ld in
1965       yes*) LD="${LD-ld} -m elf64_sparc" ;;
1966       *)
1967         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1968           LD="${LD-ld} -64"
1969         fi
1970         ;;
1971       esac
1972       ;;
1973     esac
1974   fi
1975   rm -rf conftest*
1976   ;;
1977 esac
1978
1979 need_locks="$enable_libtool_lock"
1980 ])# _LT_ENABLE_LOCK
1981
1982
1983 # _LT_CMD_OLD_ARCHIVE
1984 # -------------------
1985 m4_defun([_LT_CMD_OLD_ARCHIVE],
1986 [AC_CHECK_TOOL(AR, ar, false)
1987 test -z "$AR" && AR=ar
1988 test -z "$AR_FLAGS" && AR_FLAGS=cru
1989 _LT_DECL([], [AR], [1], [The archiver])
1990 _LT_DECL([], [AR_FLAGS], [1])
1991
1992 AC_CHECK_TOOL(STRIP, strip, :)
1993 test -z "$STRIP" && STRIP=:
1994 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1995
1996 AC_CHECK_TOOL(RANLIB, ranlib, :)
1997 test -z "$RANLIB" && RANLIB=:
1998 _LT_DECL([], [RANLIB], [1],
1999     [Commands used to install an old-style archive])
2000
2001 # Determine commands to create old-style static archives.
2002 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2003 old_postinstall_cmds='chmod 644 $oldlib'
2004 old_postuninstall_cmds=
2005
2006 if test -n "$RANLIB"; then
2007   case $host_os in
2008   openbsd*)
2009     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2010     ;;
2011   *)
2012     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2013     ;;
2014   esac
2015   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2016 fi
2017 _LT_DECL([], [old_postinstall_cmds], [2])
2018 _LT_DECL([], [old_postuninstall_cmds], [2])
2019 _LT_TAGDECL([], [old_archive_cmds], [2],
2020     [Commands used to build an old-style archive])
2021 ])# _LT_CMD_OLD_ARCHIVE
2022
2023
2024 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2025 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2026 # ----------------------------------------------------------------
2027 # Check whether the given compiler option works
2028 AC_DEFUN([_LT_COMPILER_OPTION],
2029 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2030 m4_require([_LT_DECL_SED])dnl
2031 AC_CACHE_CHECK([$1], [$2],
2032   [$2=no
2033    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2034    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2035    lt_compiler_flag="$3"
2036    # Insert the option either (1) after the last *FLAGS variable, or
2037    # (2) before a word containing "conftest.", or (3) at the end.
2038    # Note that $ac_compile itself does not contain backslashes and begins
2039    # with a dollar sign (not a hyphen), so the echo should work correctly.
2040    # The option is referenced via a variable to avoid confusing sed.
2041    lt_compile=`echo "$ac_compile" | $SED \
2042    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2043    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2044    -e 's:$: $lt_compiler_flag:'`
2045    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2046    (eval "$lt_compile" 2>conftest.err)
2047    ac_status=$?
2048    cat conftest.err >&AS_MESSAGE_LOG_FD
2049    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2050    if (exit $ac_status) && test -s "$ac_outfile"; then
2051      # The compiler can only warn and ignore the option if not recognized
2052      # So say no if there are warnings other than the usual output.
2053      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2054      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2055      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2056        $2=yes
2057      fi
2058    fi
2059    $RM conftest*
2060 ])
2061
2062 if test x"[$]$2" = xyes; then
2063     m4_if([$5], , :, [$5])
2064 else
2065     m4_if([$6], , :, [$6])
2066 fi
2067 ])# _LT_COMPILER_OPTION
2068
2069 # Old name:
2070 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2071 dnl aclocal-1.4 backwards compatibility:
2072 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2073
2074
2075 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2076 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
2077 # ----------------------------------------------------
2078 # Check whether the given linker option works
2079 AC_DEFUN([_LT_LINKER_OPTION],
2080 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2081 m4_require([_LT_DECL_SED])dnl
2082 AC_CACHE_CHECK([$1], [$2],
2083   [$2=no
2084    save_LDFLAGS="$LDFLAGS"
2085    LDFLAGS="$LDFLAGS $3"
2086    echo "$lt_simple_link_test_code" > conftest.$ac_ext
2087    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2088      # The linker can only warn and ignore the option if not recognized
2089      # So say no if there are warnings
2090      if test -s conftest.err; then
2091        # Append any errors to the config.log.
2092        cat conftest.err 1>&AS_MESSAGE_LOG_FD
2093        $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2094        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2095        if diff conftest.exp conftest.er2 >/dev/null; then
2096          $2=yes
2097        fi
2098      else
2099        $2=yes
2100      fi
2101    fi
2102    $RM -r conftest*
2103    LDFLAGS="$save_LDFLAGS"
2104 ])
2105
2106 if test x"[$]$2" = xyes; then
2107     m4_if([$4], , :, [$4])
2108 else
2109     m4_if([$5], , :, [$5])
2110 fi
2111 ])# _LT_LINKER_OPTION
2112
2113 # Old name:
2114 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2115 dnl aclocal-1.4 backwards compatibility:
2116 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2117
2118
2119 # LT_CMD_MAX_LEN
2120 #---------------
2121 AC_DEFUN([LT_CMD_MAX_LEN],
2122 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2123 # find the maximum length of command line arguments
2124 AC_MSG_CHECKING([the maximum length of command line arguments])
2125 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2126   i=0
2127   teststring="ABCD"
2128
2129   case $build_os in
2130   msdosdjgpp*)
2131     # On DJGPP, this test can blow up pretty badly due to problems in libc
2132     # (any single argument exceeding 2000 bytes causes a buffer overrun
2133     # during glob expansion).  Even if it were fixed, the result of this
2134     # check would be larger than it should be.
2135     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2136     ;;
2137
2138   gnu*)
2139     # Under GNU Hurd, this test is not required because there is
2140     # no limit to the length of command line arguments.
2141     # Libtool will interpret -1 as no limit whatsoever
2142     lt_cv_sys_max_cmd_len=-1;
2143     ;;
2144
2145   cygwin* | mingw* | cegcc*)
2146     # On Win9x/ME, this test blows up -- it succeeds, but takes
2147     # about 5 minutes as the teststring grows exponentially.
2148     # Worse, since 9x/ME are not pre-emptively multitasking,
2149     # you end up with a "frozen" computer, even though with patience
2150     # the test eventually succeeds (with a max line length of 256k).
2151     # Instead, let's just punt: use the minimum linelength reported by
2152     # all of the supported platforms: 8192 (on NT/2K/XP).
2153     lt_cv_sys_max_cmd_len=8192;
2154     ;;
2155
2156   amigaos*)
2157     # On AmigaOS with pdksh, this test takes hours, literally.
2158     # So we just punt and use a minimum line length of 8192.
2159     lt_cv_sys_max_cmd_len=8192;
2160     ;;
2161
2162   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2163     # This has been around since 386BSD, at least.  Likely further.
2164     if test -x /sbin/sysctl; then
2165       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2166     elif test -x /usr/sbin/sysctl; then
2167       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2168     else
2169       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
2170     fi
2171     # And add a safety zone
2172     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2173     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2174     ;;
2175
2176   interix*)
2177     # We know the value 262144 and hardcode it with a safety zone (like BSD)
2178     lt_cv_sys_max_cmd_len=196608
2179     ;;
2180
2181   osf*)
2182     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2183     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2184     # nice to cause kernel panics so lets avoid the loop below.
2185     # First set a reasonable default.
2186     lt_cv_sys_max_cmd_len=16384
2187     #
2188     if test -x /sbin/sysconfig; then
2189       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2190         *1*) lt_cv_sys_max_cmd_len=-1 ;;
2191       esac
2192     fi
2193     ;;
2194   sco3.2v5*)
2195     lt_cv_sys_max_cmd_len=102400
2196     ;;
2197   sysv5* | sco5v6* | sysv4.2uw2*)
2198     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2199     if test -n "$kargmax"; then
2200       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
2201     else
2202       lt_cv_sys_max_cmd_len=32768
2203     fi
2204     ;;
2205   *)
2206     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2207     if test -n "$lt_cv_sys_max_cmd_len"; then
2208       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2209       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2210     else
2211       # Make teststring a little bigger before we do anything with it.
2212       # a 1K string should be a reasonable start.
2213       for i in 1 2 3 4 5 6 7 8 ; do
2214         teststring=$teststring$teststring
2215       done
2216       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2217       # If test is not a shell built-in, we'll probably end up computing a
2218       # maximum length that is only half of the actual maximum length, but
2219       # we can't tell.
2220       while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2221                  = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
2222               test $i != 17 # 1/2 MB should be enough
2223       do
2224         i=`expr $i + 1`
2225         teststring=$teststring$teststring
2226       done
2227       # Only check the string length outside the loop.
2228       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2229       teststring=
2230       # Add a significant safety factor because C++ compilers can tack on
2231       # massive amounts of additional arguments before passing them to the
2232       # linker.  It appears as though 1/2 is a usable value.
2233       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2234     fi
2235     ;;
2236   esac
2237 ])
2238 if test -n $lt_cv_sys_max_cmd_len ; then
2239   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2240 else
2241   AC_MSG_RESULT(none)
2242 fi
2243 max_cmd_len=$lt_cv_sys_max_cmd_len
2244 _LT_DECL([], [max_cmd_len], [0],
2245     [What is the maximum length of a command?])
2246 ])# LT_CMD_MAX_LEN
2247
2248 # Old name:
2249 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2250 dnl aclocal-1.4 backwards compatibility:
2251 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2252
2253
2254 # _LT_HEADER_DLFCN
2255 # ----------------
2256 m4_defun([_LT_HEADER_DLFCN],
2257 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2258 ])# _LT_HEADER_DLFCN
2259
2260
2261 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2262 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2263 # ----------------------------------------------------------------
2264 m4_defun([_LT_TRY_DLOPEN_SELF],
2265 [m4_require([_LT_HEADER_DLFCN])dnl
2266 if test "$cross_compiling" = yes; then :
2267   [$4]
2268 else
2269   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2270   lt_status=$lt_dlunknown
2271   cat > conftest.$ac_ext <<_LT_EOF
2272 [#line __oline__ "configure"
2273 #include "confdefs.h"
2274
2275 #if HAVE_DLFCN_H
2276 #include <dlfcn.h>
2277 #endif
2278
2279 #include <stdio.h>
2280
2281 #ifdef RTLD_GLOBAL
2282 #  define LT_DLGLOBAL           RTLD_GLOBAL
2283 #else
2284 #  ifdef DL_GLOBAL
2285 #    define LT_DLGLOBAL         DL_GLOBAL
2286 #  else
2287 #    define LT_DLGLOBAL         0
2288 #  endif
2289 #endif
2290
2291 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2292    find out it does not work in some platform. */
2293 #ifndef LT_DLLAZY_OR_NOW
2294 #  ifdef RTLD_LAZY
2295 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
2296 #  else
2297 #    ifdef DL_LAZY
2298 #      define LT_DLLAZY_OR_NOW          DL_LAZY
2299 #    else
2300 #      ifdef RTLD_NOW
2301 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
2302 #      else
2303 #        ifdef DL_NOW
2304 #          define LT_DLLAZY_OR_NOW      DL_NOW
2305 #        else
2306 #          define LT_DLLAZY_OR_NOW      0
2307 #        endif
2308 #      endif
2309 #    endif
2310 #  endif
2311 #endif
2312
2313 void fnord() { int i=42;}
2314 int main ()
2315 {
2316   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2317   int status = $lt_dlunknown;
2318
2319   if (self)
2320     {
2321       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2322       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2323       /* dlclose (self); */
2324     }
2325   else
2326     puts (dlerror ());
2327
2328   return status;
2329 }]
2330 _LT_EOF
2331   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2332     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2333     lt_status=$?
2334     case x$lt_status in
2335       x$lt_dlno_uscore) $1 ;;
2336       x$lt_dlneed_uscore) $2 ;;
2337       x$lt_dlunknown|x*) $3 ;;
2338     esac
2339   else :
2340     # compilation failed
2341     $3
2342   fi
2343 fi
2344 rm -fr conftest*
2345 ])# _LT_TRY_DLOPEN_SELF
2346
2347
2348 # LT_SYS_DLOPEN_SELF
2349 # ------------------
2350 AC_DEFUN([LT_SYS_DLOPEN_SELF],
2351 [m4_require([_LT_HEADER_DLFCN])dnl
2352 if test "x$enable_dlopen" != xyes; then
2353   enable_dlopen=unknown
2354   enable_dlopen_self=unknown
2355   enable_dlopen_self_static=unknown
2356 else
2357   lt_cv_dlopen=no
2358   lt_cv_dlopen_libs=
2359
2360   case $host_os in
2361   beos*)
2362     lt_cv_dlopen="load_add_on"
2363     lt_cv_dlopen_libs=
2364     lt_cv_dlopen_self=yes
2365     ;;
2366
2367   mingw* | pw32* | cegcc*)
2368     lt_cv_dlopen="LoadLibrary"
2369     lt_cv_dlopen_libs=
2370     ;;
2371
2372   cygwin*)
2373     lt_cv_dlopen="dlopen"
2374     lt_cv_dlopen_libs=
2375     ;;
2376
2377   darwin*)
2378   # if libdl is installed we need to link against it
2379     AC_CHECK_LIB([dl], [dlopen],
2380                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2381     lt_cv_dlopen="dyld"
2382     lt_cv_dlopen_libs=
2383     lt_cv_dlopen_self=yes
2384     ])
2385     ;;
2386
2387   *)
2388     AC_CHECK_FUNC([shl_load],
2389           [lt_cv_dlopen="shl_load"],
2390       [AC_CHECK_LIB([dld], [shl_load],
2391             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2392         [AC_CHECK_FUNC([dlopen],
2393               [lt_cv_dlopen="dlopen"],
2394           [AC_CHECK_LIB([dl], [dlopen],
2395                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2396             [AC_CHECK_LIB([svld], [dlopen],
2397                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2398               [AC_CHECK_LIB([dld], [dld_link],
2399                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2400               ])
2401             ])
2402           ])
2403         ])
2404       ])
2405     ;;
2406   esac
2407
2408   if test "x$lt_cv_dlopen" != xno; then
2409     enable_dlopen=yes
2410   else
2411     enable_dlopen=no
2412   fi
2413
2414   case $lt_cv_dlopen in
2415   dlopen)
2416     save_CPPFLAGS="$CPPFLAGS"
2417     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2418
2419     save_LDFLAGS="$LDFLAGS"
2420     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2421
2422     save_LIBS="$LIBS"
2423     LIBS="$lt_cv_dlopen_libs $LIBS"
2424
2425     AC_CACHE_CHECK([whether a program can dlopen itself],
2426           lt_cv_dlopen_self, [dnl
2427           _LT_TRY_DLOPEN_SELF(
2428             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2429             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2430     ])
2431
2432     if test "x$lt_cv_dlopen_self" = xyes; then
2433       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2434       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2435           lt_cv_dlopen_self_static, [dnl
2436           _LT_TRY_DLOPEN_SELF(
2437             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2438             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2439       ])
2440     fi
2441
2442     CPPFLAGS="$save_CPPFLAGS"
2443     LDFLAGS="$save_LDFLAGS"
2444     LIBS="$save_LIBS"
2445     ;;
2446   esac
2447
2448   case $lt_cv_dlopen_self in
2449   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2450   *) enable_dlopen_self=unknown ;;
2451   esac
2452
2453   case $lt_cv_dlopen_self_static in
2454   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2455   *) enable_dlopen_self_static=unknown ;;
2456   esac
2457 fi
2458 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2459          [Whether dlopen is supported])
2460 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2461          [Whether dlopen of programs is supported])
2462 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2463          [Whether dlopen of statically linked programs is supported])
2464 ])# LT_SYS_DLOPEN_SELF
2465
2466 # Old name:
2467 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2468 dnl aclocal-1.4 backwards compatibility:
2469 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2470
2471
2472 # _LT_COMPILER_C_O([TAGNAME])
2473 # ---------------------------
2474 # Check to see if options -c and -o are simultaneously supported by compiler.
2475 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2476 m4_defun([_LT_COMPILER_C_O],
2477 [m4_require([_LT_DECL_SED])dnl
2478 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2479 m4_require([_LT_TAG_COMPILER])dnl
2480 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2481   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2482   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2483    $RM -r conftest 2>/dev/null
2484    mkdir conftest
2485    cd conftest
2486    mkdir out
2487    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2488
2489    lt_compiler_flag="-o out/conftest2.$ac_objext"
2490    # Insert the option either (1) after the last *FLAGS variable, or
2491    # (2) before a word containing "conftest.", or (3) at the end.
2492    # Note that $ac_compile itself does not contain backslashes and begins
2493    # with a dollar sign (not a hyphen), so the echo should work correctly.
2494    lt_compile=`echo "$ac_compile" | $SED \
2495    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2496    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2497    -e 's:$: $lt_compiler_flag:'`
2498    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2499    (eval "$lt_compile" 2>out/conftest.err)
2500    ac_status=$?
2501    cat out/conftest.err >&AS_MESSAGE_LOG_FD
2502    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2503    if (exit $ac_status) && test -s out/conftest2.$ac_objext
2504    then
2505      # The compiler can only warn and ignore the option if not recognized
2506      # So say no if there are warnings
2507      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2508      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2509      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2510        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2511      fi
2512    fi
2513    chmod u+w . 2>&AS_MESSAGE_LOG_FD
2514    $RM conftest*
2515    # SGI C++ compiler will create directory out/ii_files/ for
2516    # template instantiation
2517    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2518    $RM out/* && rmdir out
2519    cd ..
2520    $RM -r conftest
2521    $RM conftest*
2522 ])
2523 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2524         [Does compiler simultaneously support -c and -o options?])
2525 ])# _LT_COMPILER_C_O
2526
2527
2528 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2529 # ----------------------------------
2530 # Check to see if we can do hard links to lock some files if needed
2531 m4_defun([_LT_COMPILER_FILE_LOCKS],
2532 [m4_require([_LT_ENABLE_LOCK])dnl
2533 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2534 _LT_COMPILER_C_O([$1])
2535
2536 hard_links="nottested"
2537 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2538   # do not overwrite the value of need_locks provided by the user
2539   AC_MSG_CHECKING([if we can lock with hard links])
2540   hard_links=yes
2541   $RM conftest*
2542   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2543   touch conftest.a
2544   ln conftest.a conftest.b 2>&5 || hard_links=no
2545   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2546   AC_MSG_RESULT([$hard_links])
2547   if test "$hard_links" = no; then
2548     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2549     need_locks=warn
2550   fi
2551 else
2552   need_locks=no
2553 fi
2554 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2555 ])# _LT_COMPILER_FILE_LOCKS
2556
2557
2558 # _LT_CHECK_OBJDIR
2559 # ----------------
2560 m4_defun([_LT_CHECK_OBJDIR],
2561 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2562 [rm -f .libs 2>/dev/null
2563 mkdir .libs 2>/dev/null
2564 if test -d .libs; then
2565   lt_cv_objdir=.libs
2566 else
2567   # MS-DOS does not allow filenames that begin with a dot.
2568   lt_cv_objdir=_libs
2569 fi
2570 rmdir .libs 2>/dev/null])
2571 objdir=$lt_cv_objdir
2572 _LT_DECL([], [objdir], [0],
2573          [The name of the directory that contains temporary libtool files])dnl
2574 m4_pattern_allow([LT_OBJDIR])dnl
2575 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2576   [Define to the sub-directory in which libtool stores uninstalled libraries.])
2577 ])# _LT_CHECK_OBJDIR
2578
2579
2580 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2581 # --------------------------------------
2582 # Check hardcoding attributes.
2583 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2584 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2585 _LT_TAGVAR(hardcode_action, $1)=
2586 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2587    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2588    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2589
2590   # We can hardcode non-existent directories.
2591   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2592      # If the only mechanism to avoid hardcoding is shlibpath_var, we
2593      # have to relink, otherwise we might link with an installed library
2594      # when we should be linking with a yet-to-be-installed one
2595      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2596      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2597     # Linking always hardcodes the temporary library directory.
2598     _LT_TAGVAR(hardcode_action, $1)=relink
2599   else
2600     # We can link without hardcoding, and we can hardcode nonexisting dirs.
2601     _LT_TAGVAR(hardcode_action, $1)=immediate
2602   fi
2603 else
2604   # We cannot hardcode anything, or else we can only hardcode existing
2605   # directories.
2606   _LT_TAGVAR(hardcode_action, $1)=unsupported
2607 fi
2608 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2609
2610 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2611    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2612   # Fast installation is not supported
2613   enable_fast_install=no
2614 elif test "$shlibpath_overrides_runpath" = yes ||
2615      test "$enable_shared" = no; then
2616   # Fast installation is not necessary
2617   enable_fast_install=needless
2618 fi
2619 _LT_TAGDECL([], [hardcode_action], [0],
2620     [How to hardcode a shared library path into an executable])
2621 ])# _LT_LINKER_HARDCODE_LIBPATH
2622
2623
2624 # _LT_CMD_STRIPLIB
2625 # ----------------
2626 m4_defun([_LT_CMD_STRIPLIB],
2627 [m4_require([_LT_DECL_EGREP])
2628 striplib=
2629 old_striplib=
2630 AC_MSG_CHECKING([whether stripping libraries is possible])
2631 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2632   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2633   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2634   AC_MSG_RESULT([yes])
2635 else
2636 # FIXME - insert some real tests, host_os isn't really good enough
2637   case $host_os in
2638   darwin*)
2639     if test -n "$STRIP" ; then
2640       striplib="$STRIP -x"
2641       old_striplib="$STRIP -S"
2642       AC_MSG_RESULT([yes])
2643     else
2644       AC_MSG_RESULT([no])
2645     fi
2646     ;;
2647   *)
2648     AC_MSG_RESULT([no])
2649     ;;
2650   esac
2651 fi
2652 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2653 _LT_DECL([], [striplib], [1])
2654 ])# _LT_CMD_STRIPLIB
2655
2656
2657 # _LT_SYS_DYNAMIC_LINKER([TAG])
2658 # -----------------------------
2659 # PORTME Fill in your ld.so characteristics
2660 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2661 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2662 m4_require([_LT_DECL_EGREP])dnl
2663 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2664 m4_require([_LT_DECL_OBJDUMP])dnl
2665 m4_require([_LT_DECL_SED])dnl
2666 AC_MSG_CHECKING([dynamic linker characteristics])
2667 m4_if([$1],
2668         [], [
2669 if test "$GCC" = yes; then
2670   case $host_os in
2671     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2672     *) lt_awk_arg="/^libraries:/" ;;
2673   esac
2674   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2675   if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2676     # if the path contains ";" then we assume it to be the separator
2677     # otherwise default to the standard path separator (i.e. ":") - it is
2678     # assumed that no part of a normal pathname contains ";" but that should
2679     # okay in the real world where ";" in dirpaths is itself problematic.
2680     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2681   else
2682     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2683   fi
2684   # Ok, now we have the path, separated by spaces, we can step through it
2685   # and add multilib dir if necessary.
2686   lt_tmp_lt_search_path_spec=
2687   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2688   for lt_sys_path in $lt_search_path_spec; do
2689     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2690       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2691     else
2692       test -d "$lt_sys_path" && \
2693         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2694     fi
2695   done
2696   lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2697 BEGIN {RS=" "; FS="/|\n";} {
2698   lt_foo="";
2699   lt_count=0;
2700   for (lt_i = NF; lt_i > 0; lt_i--) {
2701     if ($lt_i != "" && $lt_i != ".") {
2702       if ($lt_i == "..") {
2703         lt_count++;
2704       } else {
2705         if (lt_count == 0) {
2706           lt_foo="/" $lt_i lt_foo;
2707         } else {
2708           lt_count--;
2709         }
2710       }
2711     }
2712   }
2713   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2714   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2715 }'`
2716   sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2717 else
2718   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2719 fi])
2720 library_names_spec=
2721 libname_spec='lib$name'
2722 soname_spec=
2723 shrext_cmds=".so"
2724 postinstall_cmds=
2725 postuninstall_cmds=
2726 finish_cmds=
2727 finish_eval=
2728 shlibpath_var=
2729 shlibpath_overrides_runpath=unknown
2730 version_type=none
2731 dynamic_linker="$host_os ld.so"
2732 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2733 need_lib_prefix=unknown
2734 hardcode_into_libs=no
2735
2736 # when you set need_version to no, make sure it does not cause -set_version
2737 # flags to be left without arguments
2738 need_version=unknown
2739
2740 case $host_os in
2741 aix3*)
2742   version_type=linux
2743   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2744   shlibpath_var=LIBPATH
2745
2746   # AIX 3 has no versioning support, so we append a major version to the name.
2747   soname_spec='${libname}${release}${shared_ext}$major'
2748   ;;
2749
2750 aix[[4-9]]*)
2751   version_type=linux
2752   need_lib_prefix=no
2753   need_version=no
2754   hardcode_into_libs=yes
2755   if test "$host_cpu" = ia64; then
2756     # AIX 5 supports IA64
2757     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2758     shlibpath_var=LD_LIBRARY_PATH
2759   else
2760     # With GCC up to 2.95.x, collect2 would create an import file
2761     # for dependence libraries.  The import file would start with
2762     # the line `#! .'.  This would cause the generated library to
2763     # depend on `.', always an invalid library.  This was fixed in
2764     # development snapshots of GCC prior to 3.0.
2765     case $host_os in
2766       aix4 | aix4.[[01]] | aix4.[[01]].*)
2767       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2768            echo ' yes '
2769            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2770         :
2771       else
2772         can_build_shared=no
2773       fi
2774       ;;
2775     esac
2776     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2777     # soname into executable. Probably we can add versioning support to
2778     # collect2, so additional links can be useful in future.
2779     if test "$aix_use_runtimelinking" = yes; then
2780       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2781       # instead of lib<name>.a to let people know that these are not
2782       # typical AIX shared libraries.
2783       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2784     else
2785       # We preserve .a as extension for shared libraries through AIX4.2
2786       # and later when we are not doing run time linking.
2787       library_names_spec='${libname}${release}.a $libname.a'
2788       soname_spec='${libname}${release}${shared_ext}$major'
2789     fi
2790     shlibpath_var=LIBPATH
2791   fi
2792   ;;
2793
2794 amigaos*)
2795   case $host_cpu in
2796   powerpc)
2797     # Since July 2007 AmigaOS4 officially supports .so libraries.
2798     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2799     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2800     ;;
2801   m68k)
2802     library_names_spec='$libname.ixlibrary $libname.a'
2803     # Create ${libname}_ixlibrary.a entries in /sys/libs.
2804     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'
2805     ;;
2806   esac
2807   ;;
2808
2809 beos*)
2810   library_names_spec='${libname}${shared_ext}'
2811   dynamic_linker="$host_os ld.so"
2812   shlibpath_var=LIBRARY_PATH
2813   ;;
2814
2815 bsdi[[45]]*)
2816   version_type=linux
2817   need_version=no
2818   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2819   soname_spec='${libname}${release}${shared_ext}$major'
2820   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2821   shlibpath_var=LD_LIBRARY_PATH
2822   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2823   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2824   # the default ld.so.conf also contains /usr/contrib/lib and
2825   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2826   # libtool to hard-code these into programs
2827   ;;
2828
2829 cygwin* | mingw* | pw32* | cegcc*)
2830   version_type=windows
2831   shrext_cmds=".dll"
2832   need_version=no
2833   need_lib_prefix=no
2834
2835   case $GCC,$host_os in
2836   yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2837     library_names_spec='$libname.dll.a'
2838     # DLL is installed to $(libdir)/../bin by postinstall_cmds
2839     postinstall_cmds='base_file=`basename \${file}`~
2840       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2841       dldir=$destdir/`dirname \$dlpath`~
2842       test -d \$dldir || mkdir -p \$dldir~
2843       $install_prog $dir/$dlname \$dldir/$dlname~
2844       chmod a+x \$dldir/$dlname~
2845       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2846         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2847       fi'
2848     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2849       dlpath=$dir/\$dldll~
2850        $RM \$dlpath'
2851     shlibpath_overrides_runpath=yes
2852
2853     case $host_os in
2854     cygwin*)
2855       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2856       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2857       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2858       ;;
2859     mingw* | cegcc*)
2860       # MinGW DLLs use traditional 'lib' prefix
2861       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2862       sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2863       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2864         # It is most probably a Windows format PATH printed by
2865         # mingw gcc, but we are running on Cygwin. Gcc prints its search
2866         # path with ; separators, and with drive letters. We can handle the
2867         # drive letters (cygwin fileutils understands them), so leave them,
2868         # especially as we might pass files found there to a mingw objdump,
2869         # which wouldn't understand a cygwinified path. Ahh.
2870         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2871       else
2872         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2873       fi
2874       ;;
2875     pw32*)
2876       # pw32 DLLs use 'pw' prefix rather than 'lib'
2877       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2878       ;;
2879     esac
2880     ;;
2881
2882   *)
2883     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2884     ;;
2885   esac
2886   dynamic_linker='Win32 ld.exe'
2887   # FIXME: first we should search . and the directory the executable is in
2888   shlibpath_var=PATH
2889   ;;
2890
2891 darwin* | rhapsody*)
2892   dynamic_linker="$host_os dyld"
2893   version_type=darwin
2894   need_lib_prefix=no
2895   need_version=no
2896   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2897   soname_spec='${libname}${release}${major}$shared_ext'
2898   shlibpath_overrides_runpath=yes
2899   shlibpath_var=DYLD_LIBRARY_PATH
2900   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2901 m4_if([$1], [],[
2902   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2903   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2904   ;;
2905
2906 dgux*)
2907   version_type=linux
2908   need_lib_prefix=no
2909   need_version=no
2910   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2911   soname_spec='${libname}${release}${shared_ext}$major'
2912   shlibpath_var=LD_LIBRARY_PATH
2913   ;;
2914
2915 freebsd1*)
2916   dynamic_linker=no
2917   ;;
2918
2919 freebsd* | dragonfly*)
2920   # DragonFly does not have aout.  When/if they implement a new
2921   # versioning mechanism, adjust this.
2922   if test -x /usr/bin/objformat; then
2923     objformat=`/usr/bin/objformat`
2924   else
2925     case $host_os in
2926     freebsd[[123]]*) objformat=aout ;;
2927     *) objformat=elf ;;
2928     esac
2929   fi
2930   version_type=freebsd-$objformat
2931   case $version_type in
2932     freebsd-elf*)
2933       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2934       need_version=no
2935       need_lib_prefix=no
2936       ;;
2937     freebsd-*)
2938       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2939       need_version=yes
2940       ;;
2941   esac
2942   shlibpath_var=LD_LIBRARY_PATH
2943   case $host_os in
2944   freebsd2*)
2945     shlibpath_overrides_runpath=yes
2946     ;;
2947   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2948     shlibpath_overrides_runpath=yes
2949     hardcode_into_libs=yes
2950     ;;
2951   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2952   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2953     shlibpath_overrides_runpath=no
2954     hardcode_into_libs=yes
2955     ;;
2956   *) # from 4.6 on, and DragonFly
2957     shlibpath_overrides_runpath=yes
2958     hardcode_into_libs=yes
2959     ;;
2960   esac
2961   ;;
2962
2963 gnu*)
2964   version_type=linux
2965   need_lib_prefix=no
2966   need_version=no
2967   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2968   soname_spec='${libname}${release}${shared_ext}$major'
2969   shlibpath_var=LD_LIBRARY_PATH
2970   hardcode_into_libs=yes
2971   ;;
2972
2973 hpux9* | hpux10* | hpux11*)
2974   # Give a soname corresponding to the major version so that dld.sl refuses to
2975   # link against other versions.
2976   version_type=sunos
2977   need_lib_prefix=no
2978   need_version=no
2979   case $host_cpu in
2980   ia64*)
2981     shrext_cmds='.so'
2982     hardcode_into_libs=yes
2983     dynamic_linker="$host_os dld.so"
2984     shlibpath_var=LD_LIBRARY_PATH
2985     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2986     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2987     soname_spec='${libname}${release}${shared_ext}$major'
2988     if test "X$HPUX_IA64_MODE" = X32; then
2989       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2990     else
2991       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2992     fi
2993     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2994     ;;
2995   hppa*64*)
2996     shrext_cmds='.sl'
2997     hardcode_into_libs=yes
2998     dynamic_linker="$host_os dld.sl"
2999     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3000     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3001     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3002     soname_spec='${libname}${release}${shared_ext}$major'
3003     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3004     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3005     ;;
3006   *)
3007     shrext_cmds='.sl'
3008     dynamic_linker="$host_os dld.sl"
3009     shlibpath_var=SHLIB_PATH
3010     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3011     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3012     soname_spec='${libname}${release}${shared_ext}$major'
3013     ;;
3014   esac
3015   # HP-UX runs *really* slowly unless shared libraries are mode 555.
3016   postinstall_cmds='chmod 555 $lib'
3017   ;;
3018
3019 interix[[3-9]]*)
3020   version_type=linux
3021   need_lib_prefix=no
3022   need_version=no
3023   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3024   soname_spec='${libname}${release}${shared_ext}$major'
3025   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3026   shlibpath_var=LD_LIBRARY_PATH
3027   shlibpath_overrides_runpath=no
3028   hardcode_into_libs=yes
3029   ;;
3030
3031 irix5* | irix6* | nonstopux*)
3032   case $host_os in
3033     nonstopux*) version_type=nonstopux ;;
3034     *)
3035         if test "$lt_cv_prog_gnu_ld" = yes; then
3036                 version_type=linux
3037         else
3038                 version_type=irix
3039         fi ;;
3040   esac
3041   need_lib_prefix=no
3042   need_version=no
3043   soname_spec='${libname}${release}${shared_ext}$major'
3044   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3045   case $host_os in
3046   irix5* | nonstopux*)
3047     libsuff= shlibsuff=
3048     ;;
3049   *)
3050     case $LD in # libtool.m4 will add one of these switches to LD
3051     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3052       libsuff= shlibsuff= libmagic=32-bit;;
3053     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3054       libsuff=32 shlibsuff=N32 libmagic=N32;;
3055     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3056       libsuff=64 shlibsuff=64 libmagic=64-bit;;
3057     *) libsuff= shlibsuff= libmagic=never-match;;
3058     esac
3059     ;;
3060   esac
3061   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3062   shlibpath_overrides_runpath=no
3063   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3064   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3065   hardcode_into_libs=yes
3066   ;;
3067
3068 # No shared lib support for Linux oldld, aout, or coff.
3069 linux*oldld* | linux*aout* | linux*coff*)
3070   dynamic_linker=no
3071   ;;
3072
3073 # This must be Linux ELF.
3074 linux* | k*bsd*-gnu)
3075   version_type=linux
3076   need_lib_prefix=no
3077   need_version=no
3078   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3079   soname_spec='${libname}${release}${shared_ext}$major'
3080   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3081   shlibpath_var=LD_LIBRARY_PATH
3082   shlibpath_overrides_runpath=no
3083   # Some binutils ld are patched to set DT_RUNPATH
3084   save_LDFLAGS=$LDFLAGS
3085   save_libdir=$libdir
3086   eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3087        LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3088   AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3089     [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3090        [shlibpath_overrides_runpath=yes])])
3091   LDFLAGS=$save_LDFLAGS
3092   libdir=$save_libdir
3093
3094   # This implies no fast_install, which is unacceptable.
3095   # Some rework will be needed to allow for fast_install
3096   # before this can be enabled.
3097   hardcode_into_libs=yes
3098
3099   # Append ld.so.conf contents to the search path
3100   if test -f /etc/ld.so.conf; then
3101     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' ' '`
3102     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3103   fi
3104
3105   # We used to test for /lib/ld.so.1 and disable shared libraries on
3106   # powerpc, because MkLinux only supported shared libraries with the
3107   # GNU dynamic linker.  Since this was broken with cross compilers,
3108   # most powerpc-linux boxes support dynamic linking these days and
3109   # people can always --disable-shared, the test was removed, and we
3110   # assume the GNU/Linux dynamic linker is in use.
3111   dynamic_linker='GNU/Linux ld.so'
3112   ;;
3113
3114 netbsd*)
3115   version_type=sunos
3116   need_lib_prefix=no
3117   need_version=no
3118   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3119     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3120     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3121     dynamic_linker='NetBSD (a.out) ld.so'
3122   else
3123     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3124     soname_spec='${libname}${release}${shared_ext}$major'
3125     dynamic_linker='NetBSD ld.elf_so'
3126   fi
3127   shlibpath_var=LD_LIBRARY_PATH
3128   shlibpath_overrides_runpath=yes
3129   hardcode_into_libs=yes
3130   ;;
3131
3132 newsos6)
3133   version_type=linux
3134   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3135   shlibpath_var=LD_LIBRARY_PATH
3136   shlibpath_overrides_runpath=yes
3137   ;;
3138
3139 *nto* | *qnx*)
3140   version_type=qnx
3141   need_lib_prefix=no
3142   need_version=no
3143   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3144   soname_spec='${libname}${release}${shared_ext}$major'
3145   shlibpath_var=LD_LIBRARY_PATH
3146   shlibpath_overrides_runpath=no
3147   hardcode_into_libs=yes
3148   dynamic_linker='ldqnx.so'
3149   ;;
3150
3151 openbsd*)
3152   version_type=sunos
3153   sys_lib_dlsearch_path_spec="/usr/lib"
3154   need_lib_prefix=no
3155   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3156   case $host_os in
3157     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
3158     *)                          need_version=no  ;;
3159   esac
3160   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3161   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3162   shlibpath_var=LD_LIBRARY_PATH
3163   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3164     case $host_os in
3165       openbsd2.[[89]] | openbsd2.[[89]].*)
3166         shlibpath_overrides_runpath=no
3167         ;;
3168       *)
3169         shlibpath_overrides_runpath=yes
3170         ;;
3171       esac
3172   else
3173     shlibpath_overrides_runpath=yes
3174   fi
3175   ;;
3176
3177 os2*)
3178   libname_spec='$name'
3179   shrext_cmds=".dll"
3180   need_lib_prefix=no
3181   library_names_spec='$libname${shared_ext} $libname.a'
3182   dynamic_linker='OS/2 ld.exe'
3183   shlibpath_var=LIBPATH
3184   ;;
3185
3186 osf3* | osf4* | osf5*)
3187   version_type=osf
3188   need_lib_prefix=no
3189   need_version=no
3190   soname_spec='${libname}${release}${shared_ext}$major'
3191   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3192   shlibpath_var=LD_LIBRARY_PATH
3193   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3194   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3195   ;;
3196
3197 rdos*)
3198   dynamic_linker=no
3199   ;;
3200
3201 solaris*)
3202   version_type=linux
3203   need_lib_prefix=no
3204   need_version=no
3205   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3206   soname_spec='${libname}${release}${shared_ext}$major'
3207   shlibpath_var=LD_LIBRARY_PATH
3208   shlibpath_overrides_runpath=yes
3209   hardcode_into_libs=yes
3210   # ldd complains unless libraries are executable
3211   postinstall_cmds='chmod +x $lib'
3212   ;;
3213
3214 sunos4*)
3215   version_type=sunos
3216   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3217   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3218   shlibpath_var=LD_LIBRARY_PATH
3219   shlibpath_overrides_runpath=yes
3220   if test "$with_gnu_ld" = yes; then
3221     need_lib_prefix=no
3222   fi
3223   need_version=yes
3224   ;;
3225
3226 sysv4 | sysv4.3*)
3227   version_type=linux
3228   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3229   soname_spec='${libname}${release}${shared_ext}$major'
3230   shlibpath_var=LD_LIBRARY_PATH
3231   case $host_vendor in
3232     sni)
3233       shlibpath_overrides_runpath=no
3234       need_lib_prefix=no
3235       runpath_var=LD_RUN_PATH
3236       ;;
3237     siemens)
3238       need_lib_prefix=no
3239       ;;
3240     motorola)
3241       need_lib_prefix=no
3242       need_version=no
3243       shlibpath_overrides_runpath=no
3244       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3245       ;;
3246   esac
3247   ;;
3248
3249 sysv4*MP*)
3250   if test -d /usr/nec ;then
3251     version_type=linux
3252     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3253     soname_spec='$libname${shared_ext}.$major'
3254     shlibpath_var=LD_LIBRARY_PATH
3255   fi
3256   ;;
3257
3258 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3259   version_type=freebsd-elf
3260   need_lib_prefix=no
3261   need_version=no
3262   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3263   soname_spec='${libname}${release}${shared_ext}$major'
3264   shlibpath_var=LD_LIBRARY_PATH
3265   shlibpath_overrides_runpath=yes
3266   hardcode_into_libs=yes
3267   if test "$with_gnu_ld" = yes; then
3268     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3269   else
3270     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3271     case $host_os in
3272       sco3.2v5*)
3273         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3274         ;;
3275     esac
3276   fi
3277   sys_lib_dlsearch_path_spec='/usr/lib'
3278   ;;
3279
3280 tpf*)
3281   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3282   version_type=linux
3283   need_lib_prefix=no
3284   need_version=no
3285   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3286   shlibpath_var=LD_LIBRARY_PATH
3287   shlibpath_overrides_runpath=no
3288   hardcode_into_libs=yes
3289   ;;
3290
3291 uts4*)
3292   version_type=linux
3293   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3294   soname_spec='${libname}${release}${shared_ext}$major'
3295   shlibpath_var=LD_LIBRARY_PATH
3296   ;;
3297
3298 *)
3299   dynamic_linker=no
3300   ;;
3301 esac
3302 AC_MSG_RESULT([$dynamic_linker])
3303 test "$dynamic_linker" = no && can_build_shared=no
3304
3305 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3306 if test "$GCC" = yes; then
3307   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3308 fi
3309
3310 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3311   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3312 fi
3313 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3314   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3315 fi
3316
3317 _LT_DECL([], [variables_saved_for_relink], [1],
3318     [Variables whose values should be saved in libtool wrapper scripts and
3319     restored at link time])
3320 _LT_DECL([], [need_lib_prefix], [0],
3321     [Do we need the "lib" prefix for modules?])
3322 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3323 _LT_DECL([], [version_type], [0], [Library versioning type])
3324 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3325 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3326 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3327     [Is shlibpath searched before the hard-coded library search path?])
3328 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3329 _LT_DECL([], [library_names_spec], [1],
3330     [[List of archive names.  First name is the real one, the rest are links.
3331     The last name is the one that the linker finds with -lNAME]])
3332 _LT_DECL([], [soname_spec], [1],
3333     [[The coded name of the library, if different from the real name]])
3334 _LT_DECL([], [postinstall_cmds], [2],
3335     [Command to use after installation of a shared archive])
3336 _LT_DECL([], [postuninstall_cmds], [2],
3337     [Command to use after uninstallation of a shared archive])
3338 _LT_DECL([], [finish_cmds], [2],
3339     [Commands used to finish a libtool library installation in a directory])
3340 _LT_DECL([], [finish_eval], [1],
3341     [[As "finish_cmds", except a single script fragment to be evaled but
3342     not shown]])
3343 _LT_DECL([], [hardcode_into_libs], [0],
3344     [Whether we should hardcode library paths into libraries])
3345 _LT_DECL([], [sys_lib_search_path_spec], [2],
3346     [Compile-time system search path for libraries])
3347 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3348     [Run-time system search path for libraries])
3349 ])# _LT_SYS_DYNAMIC_LINKER
3350
3351
3352 # _LT_PATH_TOOL_PREFIX(TOOL)
3353 # --------------------------
3354 # find a file program which can recognize shared library
3355 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3356 [m4_require([_LT_DECL_EGREP])dnl
3357 AC_MSG_CHECKING([for $1])
3358 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3359 [case $MAGIC_CMD in
3360 [[\\/*] |  ?:[\\/]*])
3361   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3362   ;;
3363 *)
3364   lt_save_MAGIC_CMD="$MAGIC_CMD"
3365   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3366 dnl $ac_dummy forces splitting on constant user-supplied paths.
3367 dnl POSIX.2 word splitting is done only on the output of word expansions,
3368 dnl not every word.  This closes a longstanding sh security hole.
3369   ac_dummy="m4_if([$2], , $PATH, [$2])"
3370   for ac_dir in $ac_dummy; do
3371     IFS="$lt_save_ifs"
3372     test -z "$ac_dir" && ac_dir=.
3373     if test -f $ac_dir/$1; then
3374       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3375       if test -n "$file_magic_test_file"; then
3376         case $deplibs_check_method in
3377         "file_magic "*)
3378           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3379           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3380           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3381             $EGREP "$file_magic_regex" > /dev/null; then
3382             :
3383           else
3384             cat <<_LT_EOF 1>&2
3385
3386 *** Warning: the command libtool uses to detect shared libraries,
3387 *** $file_magic_cmd, produces output that libtool cannot recognize.
3388 *** The result is that libtool may fail to recognize shared libraries
3389 *** as such.  This will affect the creation of libtool libraries that
3390 *** depend on shared libraries, but programs linked with such libtool
3391 *** libraries will work regardless of this problem.  Nevertheless, you
3392 *** may want to report the problem to your system manager and/or to
3393 *** bug-libtool@gnu.org
3394
3395 _LT_EOF
3396           fi ;;
3397         esac
3398       fi
3399       break
3400     fi
3401   done
3402   IFS="$lt_save_ifs"
3403   MAGIC_CMD="$lt_save_MAGIC_CMD"
3404   ;;
3405 esac])
3406 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3407 if test -n "$MAGIC_CMD"; then
3408   AC_MSG_RESULT($MAGIC_CMD)
3409 else
3410   AC_MSG_RESULT(no)
3411 fi
3412 _LT_DECL([], [MAGIC_CMD], [0],
3413          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3414 ])# _LT_PATH_TOOL_PREFIX
3415
3416 # Old name:
3417 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3418 dnl aclocal-1.4 backwards compatibility:
3419 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3420
3421
3422 # _LT_PATH_MAGIC
3423 # --------------
3424 # find a file program which can recognize a shared library
3425 m4_defun([_LT_PATH_MAGIC],
3426 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3427 if test -z "$lt_cv_path_MAGIC_CMD"; then
3428   if test -n "$ac_tool_prefix"; then
3429     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3430   else
3431     MAGIC_CMD=:
3432   fi
3433 fi
3434 ])# _LT_PATH_MAGIC
3435
3436
3437 # LT_PATH_LD
3438 # ----------
3439 # find the pathname to the GNU or non-GNU linker
3440 AC_DEFUN([LT_PATH_LD],
3441 [AC_REQUIRE([AC_PROG_CC])dnl
3442 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3443 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3444 m4_require([_LT_DECL_SED])dnl
3445 m4_require([_LT_DECL_EGREP])dnl
3446
3447 AC_ARG_WITH([gnu-ld],
3448     [AS_HELP_STRING([--with-gnu-ld],
3449         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3450     [test "$withval" = no || with_gnu_ld=yes],
3451     [with_gnu_ld=no])dnl
3452
3453 ac_prog=ld
3454 if test "$GCC" = yes; then
3455   # Check if gcc -print-prog-name=ld gives a path.
3456   AC_MSG_CHECKING([for ld used by $CC])
3457   case $host in
3458   *-*-mingw*)
3459     # gcc leaves a trailing carriage return which upsets mingw
3460     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3461   *)
3462     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3463   esac
3464   case $ac_prog in
3465     # Accept absolute paths.
3466     [[\\/]]* | ?:[[\\/]]*)
3467       re_direlt='/[[^/]][[^/]]*/\.\./'
3468       # Canonicalize the pathname of ld
3469       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3470       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3471         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3472       done
3473       test -z "$LD" && LD="$ac_prog"
3474       ;;
3475   "")
3476     # If it fails, then pretend we aren't using GCC.
3477     ac_prog=ld
3478     ;;
3479   *)
3480     # If it is relative, then search for the first ld in PATH.
3481     with_gnu_ld=unknown
3482     ;;
3483   esac
3484 elif test "$with_gnu_ld" = yes; then
3485   AC_MSG_CHECKING([for GNU ld])
3486 else
3487   AC_MSG_CHECKING([for non-GNU ld])
3488 fi
3489 AC_CACHE_VAL(lt_cv_path_LD,
3490 [if test -z "$LD"; then
3491   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3492   for ac_dir in $PATH; do
3493     IFS="$lt_save_ifs"
3494     test -z "$ac_dir" && ac_dir=.
3495     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3496       lt_cv_path_LD="$ac_dir/$ac_prog"
3497       # Check to see if the program is GNU ld.  I'd rather use --version,
3498       # but apparently some variants of GNU ld only accept -v.
3499       # Break only if it was the GNU/non-GNU ld that we prefer.
3500       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3501       *GNU* | *'with BFD'*)
3502         test "$with_gnu_ld" != no && break
3503         ;;
3504       *)
3505         test "$with_gnu_ld" != yes && break
3506         ;;
3507       esac
3508     fi
3509   done
3510   IFS="$lt_save_ifs"
3511 else
3512   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3513 fi])
3514 LD="$lt_cv_path_LD"
3515 if test -n "$LD"; then
3516   AC_MSG_RESULT($LD)
3517 else
3518   AC_MSG_RESULT(no)
3519 fi
3520 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3521 _LT_PATH_LD_GNU
3522 AC_SUBST([LD])
3523
3524 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3525 ])# LT_PATH_LD
3526
3527 # Old names:
3528 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3529 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3530 dnl aclocal-1.4 backwards compatibility:
3531 dnl AC_DEFUN([AM_PROG_LD], [])
3532 dnl AC_DEFUN([AC_PROG_LD], [])
3533
3534
3535 # _LT_PATH_LD_GNU
3536 #- --------------
3537 m4_defun([_LT_PATH_LD_GNU],
3538 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3539 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3540 case `$LD -v 2>&1 </dev/null` in
3541 *GNU* | *'with BFD'*)
3542   lt_cv_prog_gnu_ld=yes
3543   ;;
3544 *)
3545   lt_cv_prog_gnu_ld=no
3546   ;;
3547 esac])
3548 with_gnu_ld=$lt_cv_prog_gnu_ld
3549 ])# _LT_PATH_LD_GNU
3550
3551
3552 # _LT_CMD_RELOAD
3553 # --------------
3554 # find reload flag for linker
3555 #   -- PORTME Some linkers may need a different reload flag.
3556 m4_defun([_LT_CMD_RELOAD],
3557 [AC_CACHE_CHECK([for $LD option to reload object files],
3558   lt_cv_ld_reload_flag,
3559   [lt_cv_ld_reload_flag='-r'])
3560 reload_flag=$lt_cv_ld_reload_flag
3561 case $reload_flag in
3562 "" | " "*) ;;
3563 *) reload_flag=" $reload_flag" ;;
3564 esac
3565 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3566 case $host_os in
3567   darwin*)
3568     if test "$GCC" = yes; then
3569       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3570     else
3571       reload_cmds='$LD$reload_flag -o $output$reload_objs'
3572     fi
3573     ;;
3574 esac
3575 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3576 _LT_DECL([], [reload_cmds], [2])dnl
3577 ])# _LT_CMD_RELOAD
3578
3579
3580 # _LT_CHECK_MAGIC_METHOD
3581 # ----------------------
3582 # how to check for library dependencies
3583 #  -- PORTME fill in with the dynamic library characteristics
3584 m4_defun([_LT_CHECK_MAGIC_METHOD],
3585 [m4_require([_LT_DECL_EGREP])
3586 m4_require([_LT_DECL_OBJDUMP])
3587 AC_CACHE_CHECK([how to recognize dependent libraries],
3588 lt_cv_deplibs_check_method,
3589 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3590 lt_cv_file_magic_test_file=
3591 lt_cv_deplibs_check_method='unknown'
3592 # Need to set the preceding variable on all platforms that support
3593 # interlibrary dependencies.
3594 # 'none' -- dependencies not supported.
3595 # `unknown' -- same as none, but documents that we really don't know.
3596 # 'pass_all' -- all dependencies passed with no checks.
3597 # 'test_compile' -- check by making test program.
3598 # 'file_magic [[regex]]' -- check by looking for files in library path
3599 # which responds to the $file_magic_cmd with a given extended regex.
3600 # If you have `file' or equivalent on your system and you're not sure
3601 # whether `pass_all' will *always* work, you probably want this one.
3602
3603 case $host_os in
3604 aix[[4-9]]*)
3605   lt_cv_deplibs_check_method=pass_all
3606   ;;
3607
3608 beos*)
3609   lt_cv_deplibs_check_method=pass_all
3610   ;;
3611
3612 bsdi[[45]]*)
3613   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3614   lt_cv_file_magic_cmd='/usr/bin/file -L'
3615   lt_cv_file_magic_test_file=/shlib/libc.so
3616   ;;
3617
3618 cygwin*)
3619   # func_win32_libid is a shell function defined in ltmain.sh
3620   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3621   lt_cv_file_magic_cmd='func_win32_libid'
3622   ;;
3623
3624 mingw* | pw32*)
3625   # Base MSYS/MinGW do not provide the 'file' command needed by
3626   # func_win32_libid shell function, so use a weaker test based on 'objdump',
3627   # unless we find 'file', for example because we are cross-compiling.
3628   if ( file / ) >/dev/null 2>&1; then
3629     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3630     lt_cv_file_magic_cmd='func_win32_libid'
3631   else
3632     lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3633     lt_cv_file_magic_cmd='$OBJDUMP -f'
3634   fi
3635   ;;
3636
3637 cegcc)
3638   # use the weaker test based on 'objdump'. See mingw*.
3639   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3640   lt_cv_file_magic_cmd='$OBJDUMP -f'
3641   ;;
3642
3643 darwin* | rhapsody*)
3644   lt_cv_deplibs_check_method=pass_all
3645   ;;
3646
3647 freebsd* | dragonfly*)
3648   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3649     case $host_cpu in
3650     i*86 )
3651       # Not sure whether the presence of OpenBSD here was a mistake.
3652       # Let's accept both of them until this is cleared up.
3653       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3654       lt_cv_file_magic_cmd=/usr/bin/file
3655       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3656       ;;
3657     esac
3658   else
3659     lt_cv_deplibs_check_method=pass_all
3660   fi
3661   ;;
3662
3663 gnu*)
3664   lt_cv_deplibs_check_method=pass_all
3665   ;;
3666
3667 hpux10.20* | hpux11*)
3668   lt_cv_file_magic_cmd=/usr/bin/file
3669   case $host_cpu in
3670   ia64*)
3671     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3672     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3673     ;;
3674   hppa*64*)
3675     [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]']
3676     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3677     ;;
3678   *)
3679     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3680     lt_cv_file_magic_test_file=/usr/lib/libc.sl
3681     ;;
3682   esac
3683   ;;
3684
3685 interix[[3-9]]*)
3686   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3687   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3688   ;;
3689
3690 irix5* | irix6* | nonstopux*)
3691   case $LD in
3692   *-32|*"-32 ") libmagic=32-bit;;
3693   *-n32|*"-n32 ") libmagic=N32;;
3694   *-64|*"-64 ") libmagic=64-bit;;
3695   *) libmagic=never-match;;
3696   esac
3697   lt_cv_deplibs_check_method=pass_all
3698   ;;
3699
3700 # This must be Linux ELF.
3701 linux* | k*bsd*-gnu)
3702   lt_cv_deplibs_check_method=pass_all
3703   ;;
3704
3705 netbsd*)
3706   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3707     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3708   else
3709     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3710   fi
3711   ;;
3712
3713 newos6*)
3714   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3715   lt_cv_file_magic_cmd=/usr/bin/file
3716   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3717   ;;
3718
3719 *nto* | *qnx*)
3720   lt_cv_deplibs_check_method=pass_all
3721   ;;
3722
3723 openbsd*)
3724   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3725     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3726   else
3727     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3728   fi
3729   ;;
3730
3731 osf3* | osf4* | osf5*)
3732   lt_cv_deplibs_check_method=pass_all
3733   ;;
3734
3735 rdos*)
3736   lt_cv_deplibs_check_method=pass_all
3737   ;;
3738
3739 solaris*)
3740   lt_cv_deplibs_check_method=pass_all
3741   ;;
3742
3743 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3744   lt_cv_deplibs_check_method=pass_all
3745   ;;
3746
3747 sysv4 | sysv4.3*)
3748   case $host_vendor in
3749   motorola)
3750     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]]'
3751     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3752     ;;
3753   ncr)
3754     lt_cv_deplibs_check_method=pass_all
3755     ;;
3756   sequent)
3757     lt_cv_file_magic_cmd='/bin/file'
3758     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3759     ;;
3760   sni)
3761     lt_cv_file_magic_cmd='/bin/file'
3762     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3763     lt_cv_file_magic_test_file=/lib/libc.so
3764     ;;
3765   siemens)
3766     lt_cv_deplibs_check_method=pass_all
3767     ;;
3768   pc)
3769     lt_cv_deplibs_check_method=pass_all
3770     ;;
3771   esac
3772   ;;
3773
3774 tpf*)
3775   lt_cv_deplibs_check_method=pass_all
3776   ;;
3777 esac
3778 ])
3779 file_magic_cmd=$lt_cv_file_magic_cmd
3780 deplibs_check_method=$lt_cv_deplibs_check_method
3781 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3782
3783 _LT_DECL([], [deplibs_check_method], [1],
3784     [Method to check whether dependent libraries are shared objects])
3785 _LT_DECL([], [file_magic_cmd], [1],
3786     [Command to use when deplibs_check_method == "file_magic"])
3787 ])# _LT_CHECK_MAGIC_METHOD
3788
3789
3790 # LT_PATH_NM
3791 # ----------
3792 # find the pathname to a BSD- or MS-compatible name lister
3793 AC_DEFUN([LT_PATH_NM],
3794 [AC_REQUIRE([AC_PROG_CC])dnl
3795 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3796 [if test -n "$NM"; then
3797   # Let the user override the test.
3798   lt_cv_path_NM="$NM"
3799 else
3800   lt_nm_to_check="${ac_tool_prefix}nm"
3801   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3802     lt_nm_to_check="$lt_nm_to_check nm"
3803   fi
3804   for lt_tmp_nm in $lt_nm_to_check; do
3805     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3806     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3807       IFS="$lt_save_ifs"
3808       test -z "$ac_dir" && ac_dir=.
3809       tmp_nm="$ac_dir/$lt_tmp_nm"
3810       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3811         # Check to see if the nm accepts a BSD-compat flag.
3812         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3813         #   nm: unknown option "B" ignored
3814         # Tru64's nm complains that /dev/null is an invalid object file
3815         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3816         */dev/null* | *'Invalid file or object type'*)
3817           lt_cv_path_NM="$tmp_nm -B"
3818           break
3819           ;;
3820         *)
3821           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3822           */dev/null*)
3823             lt_cv_path_NM="$tmp_nm -p"
3824             break
3825             ;;
3826           *)
3827             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3828             continue # so that we can try to find one that supports BSD flags
3829             ;;
3830           esac
3831           ;;
3832         esac
3833       fi
3834     done
3835     IFS="$lt_save_ifs"
3836   done
3837   : ${lt_cv_path_NM=no}
3838 fi])
3839 if test "$lt_cv_path_NM" != "no"; then
3840   NM="$lt_cv_path_NM"
3841 else
3842   # Didn't find any BSD compatible name lister, look for dumpbin.
3843   AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3844   AC_SUBST([DUMPBIN])
3845   if test "$DUMPBIN" != ":"; then
3846     NM="$DUMPBIN"
3847   fi
3848 fi
3849 test -z "$NM" && NM=nm
3850 AC_SUBST([NM])
3851 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3852
3853 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3854   [lt_cv_nm_interface="BSD nm"
3855   echo "int some_variable = 0;" > conftest.$ac_ext
3856   (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3857   (eval "$ac_compile" 2>conftest.err)
3858   cat conftest.err >&AS_MESSAGE_LOG_FD
3859   (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3860   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3861   cat conftest.err >&AS_MESSAGE_LOG_FD
3862   (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3863   cat conftest.out >&AS_MESSAGE_LOG_FD
3864   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3865     lt_cv_nm_interface="MS dumpbin"
3866   fi
3867   rm -f conftest*])
3868 ])# LT_PATH_NM
3869
3870 # Old names:
3871 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3872 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3873 dnl aclocal-1.4 backwards compatibility:
3874 dnl AC_DEFUN([AM_PROG_NM], [])
3875 dnl AC_DEFUN([AC_PROG_NM], [])
3876
3877
3878 # LT_LIB_M
3879 # --------
3880 # check for math library
3881 AC_DEFUN([LT_LIB_M],
3882 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3883 LIBM=
3884 case $host in
3885 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3886   # These system don't have libm, or don't need it
3887   ;;
3888 *-ncr-sysv4.3*)
3889   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3890   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3891   ;;
3892 *)
3893   AC_CHECK_LIB(m, cos, LIBM="-lm")
3894   ;;
3895 esac
3896 AC_SUBST([LIBM])
3897 ])# LT_LIB_M
3898
3899 # Old name:
3900 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3901 dnl aclocal-1.4 backwards compatibility:
3902 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3903
3904
3905 # _LT_COMPILER_NO_RTTI([TAGNAME])
3906 # -------------------------------
3907 m4_defun([_LT_COMPILER_NO_RTTI],
3908 [m4_require([_LT_TAG_COMPILER])dnl
3909
3910 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3911
3912 if test "$GCC" = yes; then
3913   _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3914
3915   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3916     lt_cv_prog_compiler_rtti_exceptions,
3917     [-fno-rtti -fno-exceptions], [],
3918     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3919 fi
3920 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3921         [Compiler flag to turn off builtin functions])
3922 ])# _LT_COMPILER_NO_RTTI
3923
3924
3925 # _LT_CMD_GLOBAL_SYMBOLS
3926 # ----------------------
3927 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3928 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3929 AC_REQUIRE([AC_PROG_CC])dnl
3930 AC_REQUIRE([LT_PATH_NM])dnl
3931 AC_REQUIRE([LT_PATH_LD])dnl
3932 m4_require([_LT_DECL_SED])dnl
3933 m4_require([_LT_DECL_EGREP])dnl
3934 m4_require([_LT_TAG_COMPILER])dnl
3935
3936 # Check for command to grab the raw symbol name followed by C symbol from nm.
3937 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3938 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3939 [
3940 # These are sane defaults that work on at least a few old systems.
3941 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3942
3943 # Character class describing NM global symbol codes.
3944 symcode='[[BCDEGRST]]'
3945
3946 # Regexp to match symbols that can be accessed directly from C.
3947 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3948
3949 # Define system-specific variables.
3950 case $host_os in
3951 aix*)
3952   symcode='[[BCDT]]'
3953   ;;
3954 cygwin* | mingw* | pw32* | cegcc*)
3955   symcode='[[ABCDGISTW]]'
3956   ;;
3957 hpux*)
3958   if test "$host_cpu" = ia64; then
3959     symcode='[[ABCDEGRST]]'
3960   fi
3961   ;;
3962 irix* | nonstopux*)
3963   symcode='[[BCDEGRST]]'
3964   ;;
3965 osf*)
3966   symcode='[[BCDEGQRST]]'
3967   ;;
3968 solaris*)
3969   symcode='[[BDRT]]'
3970   ;;
3971 sco3.2v5*)
3972   symcode='[[DT]]'
3973   ;;
3974 sysv4.2uw2*)
3975   symcode='[[DT]]'
3976   ;;
3977 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3978   symcode='[[ABDT]]'
3979   ;;
3980 sysv4)
3981   symcode='[[DFNSTU]]'
3982   ;;
3983 esac
3984
3985 # If we're using GNU nm, then use its standard symbol codes.
3986 case `$NM -V 2>&1` in
3987 *GNU* | *'with BFD'*)
3988   symcode='[[ABCDGIRSTW]]' ;;
3989 esac
3990
3991 # Transform an extracted symbol line into a proper C declaration.
3992 # Some systems (esp. on ia64) link data and code symbols differently,
3993 # so use this general approach.
3994 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3995
3996 # Transform an extracted symbol line into symbol name and symbol address
3997 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3998 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
3999
4000 # Handle CRLF in mingw tool chain
4001 opt_cr=
4002 case $build_os in
4003 mingw*)
4004   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4005   ;;
4006 esac
4007
4008 # Try without a prefix underscore, then with it.
4009 for ac_symprfx in "" "_"; do
4010
4011   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4012   symxfrm="\\1 $ac_symprfx\\2 \\2"
4013
4014   # Write the raw and C identifiers.
4015   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4016     # Fake it for dumpbin and say T for any non-static function
4017     # and D for any global variable.
4018     # Also find C++ and __fastcall symbols from MSVC++,
4019     # which start with @ or ?.
4020     lt_cv_sys_global_symbol_pipe="$AWK ['"\
4021 "     {last_section=section; section=\$ 3};"\
4022 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4023 "     \$ 0!~/External *\|/{next};"\
4024 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4025 "     {if(hide[section]) next};"\
4026 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4027 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4028 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4029 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4030 "     ' prfx=^$ac_symprfx]"
4031   else
4032     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4033   fi
4034
4035   # Check to see that the pipe works correctly.
4036   pipe_works=no
4037
4038   rm -f conftest*
4039   cat > conftest.$ac_ext <<_LT_EOF
4040 #ifdef __cplusplus
4041 extern "C" {
4042 #endif
4043 char nm_test_var;
4044 void nm_test_func(void);
4045 void nm_test_func(void){}
4046 #ifdef __cplusplus
4047 }
4048 #endif
4049 int main(){nm_test_var='a';nm_test_func();return(0);}
4050 _LT_EOF
4051
4052   if AC_TRY_EVAL(ac_compile); then
4053     # Now try to grab the symbols.
4054     nlist=conftest.nm
4055     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4056       # Try sorting and uniquifying the output.
4057       if sort "$nlist" | uniq > "$nlist"T; then
4058         mv -f "$nlist"T "$nlist"
4059       else
4060         rm -f "$nlist"T
4061       fi
4062
4063       # Make sure that we snagged all the symbols we need.
4064       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4065         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4066           cat <<_LT_EOF > conftest.$ac_ext
4067 #ifdef __cplusplus
4068 extern "C" {
4069 #endif
4070
4071 _LT_EOF
4072           # Now generate the symbol file.
4073           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4074
4075           cat <<_LT_EOF >> conftest.$ac_ext
4076
4077 /* The mapping between symbol names and symbols.  */
4078 const struct {
4079   const char *name;
4080   void       *address;
4081 }
4082 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4083 {
4084   { "@PROGRAM@", (void *) 0 },
4085 _LT_EOF
4086           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4087           cat <<\_LT_EOF >> conftest.$ac_ext
4088   {0, (void *) 0}
4089 };
4090
4091 /* This works around a problem in FreeBSD linker */
4092 #ifdef FREEBSD_WORKAROUND
4093 static const void *lt_preloaded_setup() {
4094   return lt__PROGRAM__LTX_preloaded_symbols;
4095 }
4096 #endif
4097
4098 #ifdef __cplusplus
4099 }
4100 #endif
4101 _LT_EOF
4102           # Now try linking the two files.
4103           mv conftest.$ac_objext conftstm.$ac_objext
4104           lt_save_LIBS="$LIBS"
4105           lt_save_CFLAGS="$CFLAGS"
4106           LIBS="conftstm.$ac_objext"
4107           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4108           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4109             pipe_works=yes
4110           fi
4111           LIBS="$lt_save_LIBS"
4112           CFLAGS="$lt_save_CFLAGS"
4113         else
4114           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4115         fi
4116       else
4117         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4118       fi
4119     else
4120       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4121     fi
4122   else
4123     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4124     cat conftest.$ac_ext >&5
4125   fi
4126   rm -rf conftest* conftst*
4127
4128   # Do not use the global_symbol_pipe unless it works.
4129   if test "$pipe_works" = yes; then
4130     break
4131   else
4132     lt_cv_sys_global_symbol_pipe=
4133   fi
4134 done
4135 ])
4136 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4137   lt_cv_sys_global_symbol_to_cdecl=
4138 fi
4139 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4140   AC_MSG_RESULT(failed)
4141 else
4142   AC_MSG_RESULT(ok)
4143 fi
4144
4145 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4146     [Take the output of nm and produce a listing of raw symbols and C names])
4147 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4148     [Transform the output of nm in a proper C declaration])
4149 _LT_DECL([global_symbol_to_c_name_address],
4150     [lt_cv_sys_global_symbol_to_c_name_address], [1],
4151     [Transform the output of nm in a C name address pair])
4152 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4153     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4154     [Transform the output of nm in a C name address pair when lib prefix is needed])
4155 ]) # _LT_CMD_GLOBAL_SYMBOLS
4156
4157
4158 # _LT_COMPILER_PIC([TAGNAME])
4159 # ---------------------------
4160 m4_defun([_LT_COMPILER_PIC],
4161 [m4_require([_LT_TAG_COMPILER])dnl
4162 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4163 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4164 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4165
4166 AC_MSG_CHECKING([for $compiler option to produce PIC])
4167 m4_if([$1], [CXX], [
4168   # C++ specific cases for pic, static, wl, etc.
4169   if test "$GXX" = yes; then
4170     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4171     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4172
4173     case $host_os in
4174     aix*)
4175       # All AIX code is PIC.
4176       if test "$host_cpu" = ia64; then
4177         # AIX 5 now supports IA64 processor
4178         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4179       fi
4180       ;;
4181
4182     amigaos*)
4183       case $host_cpu in
4184       powerpc)
4185             # see comment about AmigaOS4 .so support
4186             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4187         ;;
4188       m68k)
4189             # FIXME: we need at least 68020 code to build shared libraries, but
4190             # adding the `-m68020' flag to GCC prevents building anything better,
4191             # like `-m68040'.
4192             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4193         ;;
4194       esac
4195       ;;
4196
4197     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4198       # PIC is the default for these OSes.
4199       ;;
4200     mingw* | cygwin* | os2* | pw32* | cegcc*)
4201       # This hack is so that the source file can tell whether it is being
4202       # built for inclusion in a dll (and should export symbols for example).
4203       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4204       # (--disable-auto-import) libraries
4205       m4_if([$1], [GCJ], [],
4206         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4207       ;;
4208     darwin* | rhapsody*)
4209       # PIC is the default on this platform
4210       # Common symbols not allowed in MH_DYLIB files
4211       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4212       ;;
4213     *djgpp*)
4214       # DJGPP does not support shared libraries at all
4215       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4216       ;;
4217     interix[[3-9]]*)
4218       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4219       # Instead, we relocate shared libraries at runtime.
4220       ;;
4221     sysv4*MP*)
4222       if test -d /usr/nec; then
4223         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4224       fi
4225       ;;
4226     hpux*)
4227       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4228       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4229       # sets the default TLS model and affects inlining.
4230       case $host_cpu in
4231       hppa*64*)
4232         ;;
4233       *)
4234         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4235         ;;
4236       esac
4237       ;;
4238     *qnx* | *nto*)
4239       # QNX uses GNU C++, but need to define -shared option too, otherwise
4240       # it will coredump.
4241       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4242       ;;
4243     *)
4244       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4245       ;;
4246     esac
4247   else
4248     case $host_os in
4249       aix[[4-9]]*)
4250         # All AIX code is PIC.
4251         if test "$host_cpu" = ia64; then
4252           # AIX 5 now supports IA64 processor
4253           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4254         else
4255           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4256         fi
4257         ;;
4258       chorus*)
4259         case $cc_basename in
4260         cxch68*)
4261           # Green Hills C++ Compiler
4262           # _LT_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"
4263           ;;
4264         esac
4265         ;;
4266       dgux*)
4267         case $cc_basename in
4268           ec++*)
4269             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4270             ;;
4271           ghcx*)
4272             # Green Hills C++ Compiler
4273             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4274             ;;
4275           *)
4276             ;;
4277         esac
4278         ;;
4279       freebsd* | dragonfly*)
4280         # FreeBSD uses GNU C++
4281         ;;
4282       hpux9* | hpux10* | hpux11*)
4283         case $cc_basename in
4284           CC*)
4285             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4286             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4287             if test "$host_cpu" != ia64; then
4288               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4289             fi
4290             ;;
4291           aCC*)
4292             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4293             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4294             case $host_cpu in
4295             hppa*64*|ia64*)
4296               # +Z the default
4297               ;;
4298             *)
4299               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4300               ;;
4301             esac
4302             ;;
4303           *)
4304             ;;
4305         esac
4306         ;;
4307       interix*)
4308         # This is c89, which is MS Visual C++ (no shared libs)
4309         # Anyone wants to do a port?
4310         ;;
4311       irix5* | irix6* | nonstopux*)
4312         case $cc_basename in
4313           CC*)
4314             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4315             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4316             # CC pic flag -KPIC is the default.
4317             ;;
4318           *)
4319             ;;
4320         esac
4321         ;;
4322       linux* | k*bsd*-gnu)
4323         case $cc_basename in
4324           KCC*)
4325             # KAI C++ Compiler
4326             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4327             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4328             ;;
4329           ecpc* )
4330             # old Intel C++ for x86_64 which still supported -KPIC.
4331             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4332             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4333             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4334             ;;
4335           icpc* )
4336             # Intel C++, used to be incompatible with GCC.
4337             # ICC 10 doesn't accept -KPIC any more.
4338             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4339             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4340             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4341             ;;
4342           pgCC* | pgcpp*)
4343             # Portland Group C++ compiler
4344             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4345             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4346             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4347             ;;
4348           cxx*)
4349             # Compaq C++
4350             # Make sure the PIC flag is empty.  It appears that all Alpha
4351             # Linux and Compaq Tru64 Unix objects are PIC.
4352             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4353             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4354             ;;
4355           xlc* | xlC*)
4356             # IBM XL 8.0 on PPC
4357             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4358             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4359             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4360             ;;
4361           *)
4362             case `$CC -V 2>&1 | sed 5q` in
4363             *Sun\ C*)
4364               # Sun C++ 5.9
4365               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4366               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4367               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4368               ;;
4369             esac
4370             ;;
4371         esac
4372         ;;
4373       lynxos*)
4374         ;;
4375       m88k*)
4376         ;;
4377       mvs*)
4378         case $cc_basename in
4379           cxx*)
4380             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4381             ;;
4382           *)
4383             ;;
4384         esac
4385         ;;
4386       netbsd*)
4387         ;;
4388       *qnx* | *nto*)
4389         # QNX uses GNU C++, but need to define -shared option too, otherwise
4390         # it will coredump.
4391         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4392         ;;
4393       osf3* | osf4* | osf5*)
4394         case $cc_basename in
4395           KCC*)
4396             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4397             ;;
4398           RCC*)
4399             # Rational C++ 2.4.1
4400             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4401             ;;
4402           cxx*)
4403             # Digital/Compaq C++
4404             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4405             # Make sure the PIC flag is empty.  It appears that all Alpha
4406             # Linux and Compaq Tru64 Unix objects are PIC.
4407             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4408             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4409             ;;
4410           *)
4411             ;;
4412         esac
4413         ;;
4414       psos*)
4415         ;;
4416       solaris*)
4417         case $cc_basename in
4418           CC*)
4419             # Sun C++ 4.2, 5.x and Centerline C++
4420             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4421             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4422             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4423             ;;
4424           gcx*)
4425             # Green Hills C++ Compiler
4426             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4427             ;;
4428           *)
4429             ;;
4430         esac
4431         ;;
4432       sunos4*)
4433         case $cc_basename in
4434           CC*)
4435             # Sun C++ 4.x
4436             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4437             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4438             ;;
4439           lcc*)
4440             # Lucid
4441             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4442             ;;
4443           *)
4444             ;;
4445         esac
4446         ;;
4447       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4448         case $cc_basename in
4449           CC*)
4450             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4451             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4452             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4453             ;;
4454         esac
4455         ;;
4456       tandem*)
4457         case $cc_basename in
4458           NCC*)
4459             # NonStop-UX NCC 3.20
4460             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4461             ;;
4462           *)
4463             ;;
4464         esac
4465         ;;
4466       vxworks*)
4467         ;;
4468       *)
4469         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4470         ;;
4471     esac
4472   fi
4473 ],
4474 [
4475   if test "$GCC" = yes; then
4476     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4477     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4478
4479     case $host_os in
4480       aix*)
4481       # All AIX code is PIC.
4482       if test "$host_cpu" = ia64; then
4483         # AIX 5 now supports IA64 processor
4484         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4485       fi
4486       ;;
4487
4488     amigaos*)
4489       case $host_cpu in
4490       powerpc)
4491             # see comment about AmigaOS4 .so support
4492             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4493         ;;
4494       m68k)
4495             # FIXME: we need at least 68020 code to build shared libraries, but
4496             # adding the `-m68020' flag to GCC prevents building anything better,
4497             # like `-m68040'.
4498             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4499         ;;
4500       esac
4501       ;;
4502
4503     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4504       # PIC is the default for these OSes.
4505       ;;
4506
4507     mingw* | cygwin* | pw32* | os2* | cegcc*)
4508       # This hack is so that the source file can tell whether it is being
4509       # built for inclusion in a dll (and should export symbols for example).
4510       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4511       # (--disable-auto-import) libraries
4512       m4_if([$1], [GCJ], [],
4513         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4514       ;;
4515
4516     darwin* | rhapsody*)
4517       # PIC is the default on this platform
4518       # Common symbols not allowed in MH_DYLIB files
4519       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4520       ;;
4521
4522     hpux*)
4523       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4524       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4525       # sets the default TLS model and affects inlining.
4526       case $host_cpu in
4527       hppa*64*)
4528         # +Z the default
4529         ;;
4530       *)
4531         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4532         ;;
4533       esac
4534       ;;
4535
4536     interix[[3-9]]*)
4537       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4538       # Instead, we relocate shared libraries at runtime.
4539       ;;
4540
4541     msdosdjgpp*)
4542       # Just because we use GCC doesn't mean we suddenly get shared libraries
4543       # on systems that don't support them.
4544       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4545       enable_shared=no
4546       ;;
4547
4548     *nto* | *qnx*)
4549       # QNX uses GNU C++, but need to define -shared option too, otherwise
4550       # it will coredump.
4551       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4552       ;;
4553
4554     sysv4*MP*)
4555       if test -d /usr/nec; then
4556         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4557       fi
4558       ;;
4559
4560     *)
4561       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4562       ;;
4563     esac
4564   else
4565     # PORTME Check for flag to pass linker flags through the system compiler.
4566     case $host_os in
4567     aix*)
4568       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4569       if test "$host_cpu" = ia64; then
4570         # AIX 5 now supports IA64 processor
4571         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4572       else
4573         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4574       fi
4575       ;;
4576
4577     mingw* | cygwin* | pw32* | os2* | cegcc*)
4578       # This hack is so that the source file can tell whether it is being
4579       # built for inclusion in a dll (and should export symbols for example).
4580       m4_if([$1], [GCJ], [],
4581         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4582       ;;
4583
4584     hpux9* | hpux10* | hpux11*)
4585       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4586       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4587       # not for PA HP-UX.
4588       case $host_cpu in
4589       hppa*64*|ia64*)
4590         # +Z the default
4591         ;;
4592       *)
4593         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4594         ;;
4595       esac
4596       # Is there a better lt_prog_compiler_static that works with the bundled CC?
4597       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4598       ;;
4599
4600     irix5* | irix6* | nonstopux*)
4601       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4602       # PIC (with -KPIC) is the default.
4603       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4604       ;;
4605
4606     linux* | k*bsd*-gnu)
4607       case $cc_basename in
4608       # old Intel for x86_64 which still supported -KPIC.
4609       ecc*)
4610         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4611         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4612         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4613         ;;
4614       # icc used to be incompatible with GCC.
4615       # ICC 10 doesn't accept -KPIC any more.
4616       icc* | ifort*)
4617         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4618         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4619         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4620         ;;
4621       # Lahey Fortran 8.1.
4622       lf95*)
4623         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4624         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4625         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4626         ;;
4627       pgcc* | pgf77* | pgf90* | pgf95*)
4628         # Portland Group compilers (*not* the Pentium gcc compiler,
4629         # which looks to be a dead project)
4630         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4631         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4632         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4633         ;;
4634       ccc*)
4635         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4636         # All Alpha code is PIC.
4637         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4638         ;;
4639       xl*)
4640         # IBM XL C 8.0/Fortran 10.1 on PPC
4641         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4642         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4643         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4644         ;;
4645       *)
4646         case `$CC -V 2>&1 | sed 5q` in
4647         *Sun\ C*)
4648           # Sun C 5.9
4649           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4650           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4651           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4652           ;;
4653         *Sun\ F*)
4654           # Sun Fortran 8.3 passes all unrecognized flags to the linker
4655           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4656           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4657           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4658           ;;
4659         esac
4660         ;;
4661       esac
4662       ;;
4663
4664     newsos6)
4665       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4666       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4667       ;;
4668
4669     *nto* | *qnx*)
4670       # QNX uses GNU C++, but need to define -shared option too, otherwise
4671       # it will coredump.
4672       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4673       ;;
4674
4675     osf3* | osf4* | osf5*)
4676       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4677       # All OSF/1 code is PIC.
4678       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4679       ;;
4680
4681     rdos*)
4682       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4683       ;;
4684
4685     solaris*)
4686       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4687       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4688       case $cc_basename in
4689       f77* | f90* | f95*)
4690         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4691       *)
4692         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4693       esac
4694       ;;
4695
4696     sunos4*)
4697       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4698       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4699       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4700       ;;
4701
4702     sysv4 | sysv4.2uw2* | sysv4.3*)
4703       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4704       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4705       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4706       ;;
4707
4708     sysv4*MP*)
4709       if test -d /usr/nec ;then
4710         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4711         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4712       fi
4713       ;;
4714
4715     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4716       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4717       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4718       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4719       ;;
4720
4721     unicos*)
4722       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4723       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4724       ;;
4725
4726     uts4*)
4727       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4728       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4729       ;;
4730
4731     *)
4732       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4733       ;;
4734     esac
4735   fi
4736 ])
4737 case $host_os in
4738   # For platforms which do not support PIC, -DPIC is meaningless:
4739   *djgpp*)
4740     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4741     ;;
4742   *)
4743     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4744     ;;
4745 esac
4746 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4747 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4748         [How to pass a linker flag through the compiler])
4749
4750 #
4751 # Check to make sure the PIC flag actually works.
4752 #
4753 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4754   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4755     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4756     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4757     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4758      "" | " "*) ;;
4759      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4760      esac],
4761     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4762      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4763 fi
4764 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4765         [Additional compiler flags for building library objects])
4766
4767 #
4768 # Check to make sure the static flag actually works.
4769 #
4770 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4771 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4772   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4773   $lt_tmp_static_flag,
4774   [],
4775   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4776 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4777         [Compiler flag to prevent dynamic linking])
4778 ])# _LT_COMPILER_PIC
4779
4780
4781 # _LT_LINKER_SHLIBS([TAGNAME])
4782 # ----------------------------
4783 # See if the linker supports building shared libraries.
4784 m4_defun([_LT_LINKER_SHLIBS],
4785 [AC_REQUIRE([LT_PATH_LD])dnl
4786 AC_REQUIRE([LT_PATH_NM])dnl
4787 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4788 m4_require([_LT_DECL_EGREP])dnl
4789 m4_require([_LT_DECL_SED])dnl
4790 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4791 m4_require([_LT_TAG_COMPILER])dnl
4792 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4793 m4_if([$1], [CXX], [
4794   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4795   case $host_os in
4796   aix[[4-9]]*)
4797     # If we're using GNU nm, then we don't want the "-C" option.
4798     # -C means demangle to AIX nm, but means don't demangle with GNU nm
4799     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4800       _LT_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'
4801     else
4802       _LT_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'
4803     fi
4804     ;;
4805   pw32*)
4806     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4807   ;;
4808   cygwin* | mingw* | cegcc*)
4809     _LT_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'
4810   ;;
4811   *)
4812     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4813   ;;
4814   esac
4815   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4816 ], [
4817   runpath_var=
4818   _LT_TAGVAR(allow_undefined_flag, $1)=
4819   _LT_TAGVAR(always_export_symbols, $1)=no
4820   _LT_TAGVAR(archive_cmds, $1)=
4821   _LT_TAGVAR(archive_expsym_cmds, $1)=
4822   _LT_TAGVAR(compiler_needs_object, $1)=no
4823   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4824   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4825   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4826   _LT_TAGVAR(hardcode_automatic, $1)=no
4827   _LT_TAGVAR(hardcode_direct, $1)=no
4828   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4829   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4830   _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4831   _LT_TAGVAR(hardcode_libdir_separator, $1)=
4832   _LT_TAGVAR(hardcode_minus_L, $1)=no
4833   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4834   _LT_TAGVAR(inherit_rpath, $1)=no
4835   _LT_TAGVAR(link_all_deplibs, $1)=unknown
4836   _LT_TAGVAR(module_cmds, $1)=
4837   _LT_TAGVAR(module_expsym_cmds, $1)=
4838   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4839   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4840   _LT_TAGVAR(thread_safe_flag_spec, $1)=
4841   _LT_TAGVAR(whole_archive_flag_spec, $1)=
4842   # include_expsyms should be a list of space-separated symbols to be *always*
4843   # included in the symbol list
4844   _LT_TAGVAR(include_expsyms, $1)=
4845   # exclude_expsyms can be an extended regexp of symbols to exclude
4846   # it will be wrapped by ` (' and `)$', so one must not match beginning or
4847   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4848   # as well as any symbol that contains `d'.
4849   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4850   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4851   # platforms (ab)use it in PIC code, but their linkers get confused if
4852   # the symbol is explicitly referenced.  Since portable code cannot
4853   # rely on this symbol name, it's probably fine to never include it in
4854   # preloaded symbol tables.
4855   # Exclude shared library initialization/finalization symbols.
4856 dnl Note also adjust exclude_expsyms for C++ above.
4857   extract_expsyms_cmds=
4858
4859   case $host_os in
4860   cygwin* | mingw* | pw32* | cegcc*)
4861     # FIXME: the MSVC++ port hasn't been tested in a loooong time
4862     # When not using gcc, we currently assume that we are using
4863     # Microsoft Visual C++.
4864     if test "$GCC" != yes; then
4865       with_gnu_ld=no
4866     fi
4867     ;;
4868   interix*)
4869     # we just hope/assume this is gcc and not c89 (= MSVC++)
4870     with_gnu_ld=yes
4871     ;;
4872   openbsd*)
4873     with_gnu_ld=no
4874     ;;
4875   esac
4876
4877   _LT_TAGVAR(ld_shlibs, $1)=yes
4878   if test "$with_gnu_ld" = yes; then
4879     # If archive_cmds runs LD, not CC, wlarc should be empty
4880     wlarc='${wl}'
4881
4882     # Set some defaults for GNU ld with shared library support. These
4883     # are reset later if shared libraries are not supported. Putting them
4884     # here allows them to be overridden if necessary.
4885     runpath_var=LD_RUN_PATH
4886     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4887     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4888     # ancient GNU ld didn't support --whole-archive et. al.
4889     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4890       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4891     else
4892       _LT_TAGVAR(whole_archive_flag_spec, $1)=
4893     fi
4894     supports_anon_versioning=no
4895     case `$LD -v 2>&1` in
4896       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4897       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4898       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4899       *\ 2.11.*) ;; # other 2.11 versions
4900       *) supports_anon_versioning=yes ;;
4901     esac
4902
4903     # See if GNU ld supports shared libraries.
4904     case $host_os in
4905     aix[[3-9]]*)
4906       # On AIX/PPC, the GNU linker is very broken
4907       if test "$host_cpu" != ia64; then
4908         _LT_TAGVAR(ld_shlibs, $1)=no
4909         cat <<_LT_EOF 1>&2
4910
4911 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4912 *** to be unable to reliably create shared libraries on AIX.
4913 *** Therefore, libtool is disabling shared libraries support.  If you
4914 *** really care for shared libraries, you may want to modify your PATH
4915 *** so that a non-GNU linker is found, and then restart.
4916
4917 _LT_EOF
4918       fi
4919       ;;
4920
4921     amigaos*)
4922       case $host_cpu in
4923       powerpc)
4924             # see comment about AmigaOS4 .so support
4925             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4926             _LT_TAGVAR(archive_expsym_cmds, $1)=''
4927         ;;
4928       m68k)
4929             _LT_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)'
4930             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4931             _LT_TAGVAR(hardcode_minus_L, $1)=yes
4932         ;;
4933       esac
4934       ;;
4935
4936     beos*)
4937       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4938         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4939         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4940         # support --undefined.  This deserves some investigation.  FIXME
4941         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4942       else
4943         _LT_TAGVAR(ld_shlibs, $1)=no
4944       fi
4945       ;;
4946
4947     cygwin* | mingw* | pw32* | cegcc*)
4948       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4949       # as there is no search path for DLLs.
4950       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4951       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4952       _LT_TAGVAR(always_export_symbols, $1)=no
4953       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4954       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
4955
4956       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4957         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4958         # If the export-symbols file already is a .def file (1st line
4959         # is EXPORTS), use it as is; otherwise, prepend...
4960         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4961           cp $export_symbols $output_objdir/$soname.def;
4962         else
4963           echo EXPORTS > $output_objdir/$soname.def;
4964           cat $export_symbols >> $output_objdir/$soname.def;
4965         fi~
4966         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4967       else
4968         _LT_TAGVAR(ld_shlibs, $1)=no
4969       fi
4970       ;;
4971
4972     interix[[3-9]]*)
4973       _LT_TAGVAR(hardcode_direct, $1)=no
4974       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4975       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4976       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4977       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4978       # Instead, shared libraries are loaded at an image base (0x10000000 by
4979       # default) and relocated if they conflict, which is a slow very memory
4980       # consuming and fragmenting process.  To avoid this, we pick a random,
4981       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4982       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4983       _LT_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'
4984       _LT_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'
4985       ;;
4986
4987     gnu* | linux* | tpf* | k*bsd*-gnu)
4988       tmp_diet=no
4989       if test "$host_os" = linux-dietlibc; then
4990         case $cc_basename in
4991           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
4992         esac
4993       fi
4994       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4995          && test "$tmp_diet" = no
4996       then
4997         tmp_addflag=
4998         tmp_sharedflag='-shared'
4999         case $cc_basename,$host_cpu in
5000         pgcc*)                          # Portland Group C compiler
5001           _LT_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'
5002           tmp_addflag=' $pic_flag'
5003           ;;
5004         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
5005           _LT_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'
5006           tmp_addflag=' $pic_flag -Mnomain' ;;
5007         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
5008           tmp_addflag=' -i_dynamic' ;;
5009         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
5010           tmp_addflag=' -i_dynamic -nofor_main' ;;
5011         ifc* | ifort*)                  # Intel Fortran compiler
5012           tmp_addflag=' -nofor_main' ;;
5013         lf95*)                          # Lahey Fortran 8.1
5014           _LT_TAGVAR(whole_archive_flag_spec, $1)=
5015           tmp_sharedflag='--shared' ;;
5016         xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
5017           tmp_sharedflag='-qmkshrobj'
5018           tmp_addflag= ;;
5019         esac
5020         case `$CC -V 2>&1 | sed 5q` in
5021         *Sun\ C*)                       # Sun C 5.9
5022           _LT_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'
5023           _LT_TAGVAR(compiler_needs_object, $1)=yes
5024           tmp_sharedflag='-G' ;;
5025         *Sun\ F*)                       # Sun Fortran 8.3
5026           tmp_sharedflag='-G' ;;
5027         esac
5028         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5029
5030         if test "x$supports_anon_versioning" = xyes; then
5031           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5032             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5033             echo "local: *; };" >> $output_objdir/$libname.ver~
5034             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5035         fi
5036
5037         case $cc_basename in
5038         xlf*)
5039           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5040           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5041           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5042           _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5043           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5044           if test "x$supports_anon_versioning" = xyes; then
5045             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5046               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5047               echo "local: *; };" >> $output_objdir/$libname.ver~
5048               $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5049           fi
5050           ;;
5051         esac
5052       else
5053         _LT_TAGVAR(ld_shlibs, $1)=no
5054       fi
5055       ;;
5056
5057     netbsd*)
5058       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5059         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5060         wlarc=
5061       else
5062         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5063         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5064       fi
5065       ;;
5066
5067     solaris*)
5068       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5069         _LT_TAGVAR(ld_shlibs, $1)=no
5070         cat <<_LT_EOF 1>&2
5071
5072 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5073 *** create shared libraries on Solaris systems.  Therefore, libtool
5074 *** is disabling shared libraries support.  We urge you to upgrade GNU
5075 *** binutils to release 2.9.1 or newer.  Another option is to modify
5076 *** your PATH or compiler configuration so that the native linker is
5077 *** used, and then restart.
5078
5079 _LT_EOF
5080       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5081         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5082         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5083       else
5084         _LT_TAGVAR(ld_shlibs, $1)=no
5085       fi
5086       ;;
5087
5088     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5089       case `$LD -v 2>&1` in
5090         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5091         _LT_TAGVAR(ld_shlibs, $1)=no
5092         cat <<_LT_EOF 1>&2
5093
5094 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5095 *** reliably create shared libraries on SCO systems.  Therefore, libtool
5096 *** is disabling shared libraries support.  We urge you to upgrade GNU
5097 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5098 *** your PATH or compiler configuration so that the native linker is
5099 *** used, and then restart.
5100
5101 _LT_EOF
5102         ;;
5103         *)
5104           # For security reasons, it is highly recommended that you always
5105           # use absolute paths for naming shared libraries, and exclude the
5106           # DT_RUNPATH tag from executables and libraries.  But doing so
5107           # requires that you compile everything twice, which is a pain.
5108           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5109             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5110             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5111             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5112           else
5113             _LT_TAGVAR(ld_shlibs, $1)=no
5114           fi
5115         ;;
5116       esac
5117       ;;
5118
5119     sunos4*)
5120       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5121       wlarc=
5122       _LT_TAGVAR(hardcode_direct, $1)=yes
5123       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5124       ;;
5125
5126     *)
5127       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5128         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5129         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5130       else
5131         _LT_TAGVAR(ld_shlibs, $1)=no
5132       fi
5133       ;;
5134     esac
5135
5136     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5137       runpath_var=
5138       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5139       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5140       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5141     fi
5142   else
5143     # PORTME fill in a description of your system's linker (not GNU ld)
5144     case $host_os in
5145     aix3*)
5146       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5147       _LT_TAGVAR(always_export_symbols, $1)=yes
5148       _LT_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'
5149       # Note: this linker hardcodes the directories in LIBPATH if there
5150       # are no directories specified by -L.
5151       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5152       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5153         # Neither direct hardcoding nor static linking is supported with a
5154         # broken collect2.
5155         _LT_TAGVAR(hardcode_direct, $1)=unsupported
5156       fi
5157       ;;
5158
5159     aix[[4-9]]*)
5160       if test "$host_cpu" = ia64; then
5161         # On IA64, the linker does run time linking by default, so we don't
5162         # have to do anything special.
5163         aix_use_runtimelinking=no
5164         exp_sym_flag='-Bexport'
5165         no_entry_flag=""
5166       else
5167         # If we're using GNU nm, then we don't want the "-C" option.
5168         # -C means demangle to AIX nm, but means don't demangle with GNU nm
5169         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5170           _LT_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'
5171         else
5172           _LT_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'
5173         fi
5174         aix_use_runtimelinking=no
5175
5176         # Test if we are trying to use run time linking or normal
5177         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5178         # need to do runtime linking.
5179         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5180           for ld_flag in $LDFLAGS; do
5181           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5182             aix_use_runtimelinking=yes
5183             break
5184           fi
5185           done
5186           ;;
5187         esac
5188
5189         exp_sym_flag='-bexport'
5190         no_entry_flag='-bnoentry'
5191       fi
5192
5193       # When large executables or shared objects are built, AIX ld can
5194       # have problems creating the table of contents.  If linking a library
5195       # or program results in "error TOC overflow" add -mminimal-toc to
5196       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5197       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5198
5199       _LT_TAGVAR(archive_cmds, $1)=''
5200       _LT_TAGVAR(hardcode_direct, $1)=yes
5201       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5202       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5203       _LT_TAGVAR(link_all_deplibs, $1)=yes
5204       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5205
5206       if test "$GCC" = yes; then
5207         case $host_os in aix4.[[012]]|aix4.[[012]].*)
5208         # We only want to do this on AIX 4.2 and lower, the check
5209         # below for broken collect2 doesn't work under 4.3+
5210           collect2name=`${CC} -print-prog-name=collect2`
5211           if test -f "$collect2name" &&
5212            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5213           then
5214           # We have reworked collect2
5215           :
5216           else
5217           # We have old collect2
5218           _LT_TAGVAR(hardcode_direct, $1)=unsupported
5219           # It fails to find uninstalled libraries when the uninstalled
5220           # path is not listed in the libpath.  Setting hardcode_minus_L
5221           # to unsupported forces relinking
5222           _LT_TAGVAR(hardcode_minus_L, $1)=yes
5223           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5224           _LT_TAGVAR(hardcode_libdir_separator, $1)=
5225           fi
5226           ;;
5227         esac
5228         shared_flag='-shared'
5229         if test "$aix_use_runtimelinking" = yes; then
5230           shared_flag="$shared_flag "'${wl}-G'
5231         fi
5232       else
5233         # not using gcc
5234         if test "$host_cpu" = ia64; then
5235         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5236         # chokes on -Wl,-G. The following line is correct:
5237           shared_flag='-G'
5238         else
5239           if test "$aix_use_runtimelinking" = yes; then
5240             shared_flag='${wl}-G'
5241           else
5242             shared_flag='${wl}-bM:SRE'
5243           fi
5244         fi
5245       fi
5246
5247       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5248       # It seems that -bexpall does not export symbols beginning with
5249       # underscore (_), so it is better to generate a list of symbols to export.
5250       _LT_TAGVAR(always_export_symbols, $1)=yes
5251       if test "$aix_use_runtimelinking" = yes; then
5252         # Warning - without using the other runtime loading flags (-brtl),
5253         # -berok will link without error, but may produce a broken library.
5254         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5255         # Determine the default libpath from the value encoded in an
5256         # empty executable.
5257         _LT_SYS_MODULE_PATH_AIX
5258         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5259         _LT_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 "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5260       else
5261         if test "$host_cpu" = ia64; then
5262           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5263           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5264           _LT_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"
5265         else
5266          # Determine the default libpath from the value encoded in an
5267          # empty executable.
5268          _LT_SYS_MODULE_PATH_AIX
5269          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5270           # Warning - without using the other run time loading flags,
5271           # -berok will link without error, but may produce a broken library.
5272           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5273           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5274           # Exported symbols can be pulled into shared objects from archives
5275           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5276           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5277           # This is similar to how AIX traditionally builds its shared libraries.
5278           _LT_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'
5279         fi
5280       fi
5281       ;;
5282
5283     amigaos*)
5284       case $host_cpu in
5285       powerpc)
5286             # see comment about AmigaOS4 .so support
5287             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5288             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5289         ;;
5290       m68k)
5291             _LT_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)'
5292             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5293             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5294         ;;
5295       esac
5296       ;;
5297
5298     bsdi[[45]]*)
5299       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5300       ;;
5301
5302     cygwin* | mingw* | pw32* | cegcc*)
5303       # When not using gcc, we currently assume that we are using
5304       # Microsoft Visual C++.
5305       # hardcode_libdir_flag_spec is actually meaningless, as there is
5306       # no search path for DLLs.
5307       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5308       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5309       # Tell ltmain to make .lib files, not .a files.
5310       libext=lib
5311       # Tell ltmain to make .dll files, not .so files.
5312       shrext_cmds=".dll"
5313       # FIXME: Setting linknames here is a bad hack.
5314       _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5315       # The linker will automatically build a .lib file if we build a DLL.
5316       _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5317       # FIXME: Should let the user specify the lib program.
5318       _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5319       _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5320       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5321       ;;
5322
5323     darwin* | rhapsody*)
5324       _LT_DARWIN_LINKER_FEATURES($1)
5325       ;;
5326
5327     dgux*)
5328       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5329       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5330       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5331       ;;
5332
5333     freebsd1*)
5334       _LT_TAGVAR(ld_shlibs, $1)=no
5335       ;;
5336
5337     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5338     # support.  Future versions do this automatically, but an explicit c++rt0.o
5339     # does not break anything, and helps significantly (at the cost of a little
5340     # extra space).
5341     freebsd2.2*)
5342       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5343       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5344       _LT_TAGVAR(hardcode_direct, $1)=yes
5345       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5346       ;;
5347
5348     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5349     freebsd2*)
5350       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5351       _LT_TAGVAR(hardcode_direct, $1)=yes
5352       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5353       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5354       ;;
5355
5356     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5357     freebsd* | dragonfly*)
5358       _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5359       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5360       _LT_TAGVAR(hardcode_direct, $1)=yes
5361       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5362       ;;
5363
5364     hpux9*)
5365       if test "$GCC" = yes; then
5366         _LT_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'
5367       else
5368         _LT_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'
5369       fi
5370       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5371       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5372       _LT_TAGVAR(hardcode_direct, $1)=yes
5373
5374       # hardcode_minus_L: Not really in the search PATH,
5375       # but as the default location of the library.
5376       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5377       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5378       ;;
5379
5380     hpux10*)
5381       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5382         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5383       else
5384         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5385       fi
5386       if test "$with_gnu_ld" = no; then
5387         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5388         _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5389         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5390         _LT_TAGVAR(hardcode_direct, $1)=yes
5391         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5392         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5393         # hardcode_minus_L: Not really in the search PATH,
5394         # but as the default location of the library.
5395         _LT_TAGVAR(hardcode_minus_L, $1)=yes
5396       fi
5397       ;;
5398
5399     hpux11*)
5400       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5401         case $host_cpu in
5402         hppa*64*)
5403           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5404           ;;
5405         ia64*)
5406           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5407           ;;
5408         *)
5409           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5410           ;;
5411         esac
5412       else
5413         case $host_cpu in
5414         hppa*64*)
5415           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5416           ;;
5417         ia64*)
5418           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5419           ;;
5420         *)
5421           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5422           ;;
5423         esac
5424       fi
5425       if test "$with_gnu_ld" = no; then
5426         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5427         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5428
5429         case $host_cpu in
5430         hppa*64*|ia64*)
5431           _LT_TAGVAR(hardcode_direct, $1)=no
5432           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5433           ;;
5434         *)
5435           _LT_TAGVAR(hardcode_direct, $1)=yes
5436           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5437           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5438
5439           # hardcode_minus_L: Not really in the search PATH,
5440           # but as the default location of the library.
5441           _LT_TAGVAR(hardcode_minus_L, $1)=yes
5442           ;;
5443         esac
5444       fi
5445       ;;
5446
5447     irix5* | irix6* | nonstopux*)
5448       if test "$GCC" = yes; then
5449         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5450         # Try to use the -exported_symbol ld option, if it does not
5451         # work, assume that -exports_file does not work either and
5452         # implicitly export all symbols.
5453         save_LDFLAGS="$LDFLAGS"
5454         LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5455         AC_LINK_IFELSE(int foo(void) {},
5456           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5457         )
5458         LDFLAGS="$save_LDFLAGS"
5459       else
5460         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5461         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5462       fi
5463       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5464       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5465       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5466       _LT_TAGVAR(inherit_rpath, $1)=yes
5467       _LT_TAGVAR(link_all_deplibs, $1)=yes
5468       ;;
5469
5470     netbsd*)
5471       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5472         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5473       else
5474         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5475       fi
5476       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5477       _LT_TAGVAR(hardcode_direct, $1)=yes
5478       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5479       ;;
5480
5481     newsos6)
5482       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5483       _LT_TAGVAR(hardcode_direct, $1)=yes
5484       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5485       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5486       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5487       ;;
5488
5489     *nto* | *qnx*)
5490       ;;
5491
5492     openbsd*)
5493       if test -f /usr/libexec/ld.so; then
5494         _LT_TAGVAR(hardcode_direct, $1)=yes
5495         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5496         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5497         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5498           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5499           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5500           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5501           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5502         else
5503           case $host_os in
5504            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5505              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5506              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5507              ;;
5508            *)
5509              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5510              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5511              ;;
5512           esac
5513         fi
5514       else
5515         _LT_TAGVAR(ld_shlibs, $1)=no
5516       fi
5517       ;;
5518
5519     os2*)
5520       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5521       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5522       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5523       _LT_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'
5524       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5525       ;;
5526
5527     osf3*)
5528       if test "$GCC" = yes; then
5529         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5530         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5531       else
5532         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5533         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5534       fi
5535       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5536       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5537       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5538       ;;
5539
5540     osf4* | osf5*)      # as osf3* with the addition of -msym flag
5541       if test "$GCC" = yes; then
5542         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5543         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5544         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5545       else
5546         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5547         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5548         _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5549         $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5550
5551         # Both c and cxx compiler support -rpath directly
5552         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5553       fi
5554       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5555       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5556       ;;
5557
5558     solaris*)
5559       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5560       if test "$GCC" = yes; then
5561         wlarc='${wl}'
5562         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5563         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5564           $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5565       else
5566         case `$CC -V 2>&1` in
5567         *"Compilers 5.0"*)
5568           wlarc=''
5569           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5570           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5571           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5572           ;;
5573         *)
5574           wlarc='${wl}'
5575           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5576           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5577           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5578           ;;
5579         esac
5580       fi
5581       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5582       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5583       case $host_os in
5584       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5585       *)
5586         # The compiler driver will combine and reorder linker options,
5587         # but understands `-z linker_flag'.  GCC discards it without `$wl',
5588         # but is careful enough not to reorder.
5589         # Supported since Solaris 2.6 (maybe 2.5.1?)
5590         if test "$GCC" = yes; then
5591           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5592         else
5593           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5594         fi
5595         ;;
5596       esac
5597       _LT_TAGVAR(link_all_deplibs, $1)=yes
5598       ;;
5599
5600     sunos4*)
5601       if test "x$host_vendor" = xsequent; then
5602         # Use $CC to link under sequent, because it throws in some extra .o
5603         # files that make .init and .fini sections work.
5604         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5605       else
5606         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5607       fi
5608       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5609       _LT_TAGVAR(hardcode_direct, $1)=yes
5610       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5611       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5612       ;;
5613
5614     sysv4)
5615       case $host_vendor in
5616         sni)
5617           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5618           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5619         ;;
5620         siemens)
5621           ## LD is ld it makes a PLAMLIB
5622           ## CC just makes a GrossModule.
5623           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5624           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5625           _LT_TAGVAR(hardcode_direct, $1)=no
5626         ;;
5627         motorola)
5628           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5629           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5630         ;;
5631       esac
5632       runpath_var='LD_RUN_PATH'
5633       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5634       ;;
5635
5636     sysv4.3*)
5637       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5638       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5639       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5640       ;;
5641
5642     sysv4*MP*)
5643       if test -d /usr/nec; then
5644         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5645         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5646         runpath_var=LD_RUN_PATH
5647         hardcode_runpath_var=yes
5648         _LT_TAGVAR(ld_shlibs, $1)=yes
5649       fi
5650       ;;
5651
5652     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5653       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5654       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5655       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5656       runpath_var='LD_RUN_PATH'
5657
5658       if test "$GCC" = yes; then
5659         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5660         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5661       else
5662         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5663         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5664       fi
5665       ;;
5666
5667     sysv5* | sco3.2v5* | sco5v6*)
5668       # Note: We can NOT use -z defs as we might desire, because we do not
5669       # link with -lc, and that would cause any symbols used from libc to
5670       # always be unresolved, which means just about no library would
5671       # ever link correctly.  If we're not using GNU ld we use -z text
5672       # though, which does catch some bad symbols but isn't as heavy-handed
5673       # as -z defs.
5674       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5675       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5676       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5677       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5678       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5679       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5680       _LT_TAGVAR(link_all_deplibs, $1)=yes
5681       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5682       runpath_var='LD_RUN_PATH'
5683
5684       if test "$GCC" = yes; then
5685         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5686         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5687       else
5688         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5689         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5690       fi
5691       ;;
5692
5693     uts4*)
5694       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5695       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5696       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5697       ;;
5698
5699     *)
5700       _LT_TAGVAR(ld_shlibs, $1)=no
5701       ;;
5702     esac
5703
5704     if test x$host_vendor = xsni; then
5705       case $host in
5706       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5707         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5708         ;;
5709       esac
5710     fi
5711   fi
5712 ])
5713 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5714 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5715
5716 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5717
5718 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5719 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5720 _LT_DECL([], [extract_expsyms_cmds], [2],
5721     [The commands to extract the exported symbol list from a shared archive])
5722
5723 #
5724 # Do we need to explicitly link libc?
5725 #
5726 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5727 x|xyes)
5728   # Assume -lc should be added
5729   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5730
5731   if test "$enable_shared" = yes && test "$GCC" = yes; then
5732     case $_LT_TAGVAR(archive_cmds, $1) in
5733     *'~'*)
5734       # FIXME: we may have to deal with multi-command sequences.
5735       ;;
5736     '$CC '*)
5737       # Test whether the compiler implicitly links with -lc since on some
5738       # systems, -lgcc has to come before -lc. If gcc already passes -lc
5739       # to ld, don't add -lc before -lgcc.
5740       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5741       $RM conftest*
5742       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5743
5744       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5745         soname=conftest
5746         lib=conftest
5747         libobjs=conftest.$ac_objext
5748         deplibs=
5749         wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5750         pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5751         compiler_flags=-v
5752         linker_flags=-v
5753         verstring=
5754         output_objdir=.
5755         libname=conftest
5756         lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5757         _LT_TAGVAR(allow_undefined_flag, $1)=
5758         if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5759         then
5760           _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5761         else
5762           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5763         fi
5764         _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5765       else
5766         cat conftest.err 1>&5
5767       fi
5768       $RM conftest*
5769       AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5770       ;;
5771     esac
5772   fi
5773   ;;
5774 esac
5775
5776 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5777     [Whether or not to add -lc for building shared libraries])
5778 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5779     [enable_shared_with_static_runtimes], [0],
5780     [Whether or not to disallow shared libs when runtime libs are static])
5781 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5782     [Compiler flag to allow reflexive dlopens])
5783 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5784     [Compiler flag to generate shared objects directly from archives])
5785 _LT_TAGDECL([], [compiler_needs_object], [1],
5786     [Whether the compiler copes with passing no objects directly])
5787 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5788     [Create an old-style archive from a shared archive])
5789 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5790     [Create a temporary old-style archive to link instead of a shared archive])
5791 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5792 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5793 _LT_TAGDECL([], [module_cmds], [2],
5794     [Commands used to build a loadable module if different from building
5795     a shared archive.])
5796 _LT_TAGDECL([], [module_expsym_cmds], [2])
5797 _LT_TAGDECL([], [with_gnu_ld], [1],
5798     [Whether we are building with GNU ld or not])
5799 _LT_TAGDECL([], [allow_undefined_flag], [1],
5800     [Flag that allows shared libraries with undefined symbols to be built])
5801 _LT_TAGDECL([], [no_undefined_flag], [1],
5802     [Flag that enforces no undefined symbols])
5803 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5804     [Flag to hardcode $libdir into a binary during linking.
5805     This must work even if $libdir does not exist])
5806 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5807     [[If ld is used when linking, flag to hardcode $libdir into a binary
5808     during linking.  This must work even if $libdir does not exist]])
5809 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5810     [Whether we need a single "-rpath" flag with a separated argument])
5811 _LT_TAGDECL([], [hardcode_direct], [0],
5812     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5813     DIR into the resulting binary])
5814 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5815     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5816     DIR into the resulting binary and the resulting library dependency is
5817     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5818     library is relocated])
5819 _LT_TAGDECL([], [hardcode_minus_L], [0],
5820     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5821     into the resulting binary])
5822 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5823     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5824     into the resulting binary])
5825 _LT_TAGDECL([], [hardcode_automatic], [0],
5826     [Set to "yes" if building a shared library automatically hardcodes DIR
5827     into the library and all subsequent libraries and executables linked
5828     against it])
5829 _LT_TAGDECL([], [inherit_rpath], [0],
5830     [Set to yes if linker adds runtime paths of dependent libraries
5831     to runtime path list])
5832 _LT_TAGDECL([], [link_all_deplibs], [0],
5833     [Whether libtool must link a program against all its dependency libraries])
5834 _LT_TAGDECL([], [fix_srcfile_path], [1],
5835     [Fix the shell variable $srcfile for the compiler])
5836 _LT_TAGDECL([], [always_export_symbols], [0],
5837     [Set to "yes" if exported symbols are required])
5838 _LT_TAGDECL([], [export_symbols_cmds], [2],
5839     [The commands to list exported symbols])
5840 _LT_TAGDECL([], [exclude_expsyms], [1],
5841     [Symbols that should not be listed in the preloaded symbols])
5842 _LT_TAGDECL([], [include_expsyms], [1],
5843     [Symbols that must always be exported])
5844 _LT_TAGDECL([], [prelink_cmds], [2],
5845     [Commands necessary for linking programs (against libraries) with templates])
5846 _LT_TAGDECL([], [file_list_spec], [1],
5847     [Specify filename containing input files])
5848 dnl FIXME: Not yet implemented
5849 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5850 dnl    [Compiler flag to generate thread safe objects])
5851 ])# _LT_LINKER_SHLIBS
5852
5853
5854 # _LT_LANG_C_CONFIG([TAG])
5855 # ------------------------
5856 # Ensure that the configuration variables for a C compiler are suitably
5857 # defined.  These variables are subsequently used by _LT_CONFIG to write
5858 # the compiler configuration to `libtool'.
5859 m4_defun([_LT_LANG_C_CONFIG],
5860 [m4_require([_LT_DECL_EGREP])dnl
5861 lt_save_CC="$CC"
5862 AC_LANG_PUSH(C)
5863
5864 # Source file extension for C test sources.
5865 ac_ext=c
5866
5867 # Object file extension for compiled C test sources.
5868 objext=o
5869 _LT_TAGVAR(objext, $1)=$objext
5870
5871 # Code to be used in simple compile tests
5872 lt_simple_compile_test_code="int some_variable = 0;"
5873
5874 # Code to be used in simple link tests
5875 lt_simple_link_test_code='int main(){return(0);}'
5876
5877 _LT_TAG_COMPILER
5878 # Save the default compiler, since it gets overwritten when the other
5879 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5880 compiler_DEFAULT=$CC
5881
5882 # save warnings/boilerplate of simple test code
5883 _LT_COMPILER_BOILERPLATE
5884 _LT_LINKER_BOILERPLATE
5885
5886 if test -n "$compiler"; then
5887   _LT_COMPILER_NO_RTTI($1)
5888   _LT_COMPILER_PIC($1)
5889   _LT_COMPILER_C_O($1)
5890   _LT_COMPILER_FILE_LOCKS($1)
5891   _LT_LINKER_SHLIBS($1)
5892   _LT_SYS_DYNAMIC_LINKER($1)
5893   _LT_LINKER_HARDCODE_LIBPATH($1)
5894   LT_SYS_DLOPEN_SELF
5895   _LT_CMD_STRIPLIB
5896
5897   # Report which library types will actually be built
5898   AC_MSG_CHECKING([if libtool supports shared libraries])
5899   AC_MSG_RESULT([$can_build_shared])
5900
5901   AC_MSG_CHECKING([whether to build shared libraries])
5902   test "$can_build_shared" = "no" && enable_shared=no
5903
5904   # On AIX, shared libraries and static libraries use the same namespace, and
5905   # are all built from PIC.
5906   case $host_os in
5907   aix3*)
5908     test "$enable_shared" = yes && enable_static=no
5909     if test -n "$RANLIB"; then
5910       archive_cmds="$archive_cmds~\$RANLIB \$lib"
5911       postinstall_cmds='$RANLIB $lib'
5912     fi
5913     ;;
5914
5915   aix[[4-9]]*)
5916     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5917       test "$enable_shared" = yes && enable_static=no
5918     fi
5919     ;;
5920   esac
5921   AC_MSG_RESULT([$enable_shared])
5922
5923   AC_MSG_CHECKING([whether to build static libraries])
5924   # Make sure either enable_shared or enable_static is yes.
5925   test "$enable_shared" = yes || enable_static=yes
5926   AC_MSG_RESULT([$enable_static])
5927
5928   _LT_CONFIG($1)
5929 fi
5930 AC_LANG_POP
5931 CC="$lt_save_CC"
5932 ])# _LT_LANG_C_CONFIG
5933
5934
5935 # _LT_PROG_CXX
5936 # ------------
5937 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5938 # compiler, we have our own version here.
5939 m4_defun([_LT_PROG_CXX],
5940 [
5941 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5942 AC_PROG_CXX
5943 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5944     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5945     (test "X$CXX" != "Xg++"))) ; then
5946   AC_PROG_CXXCPP
5947 else
5948   _lt_caught_CXX_error=yes
5949 fi
5950 popdef([AC_MSG_ERROR])
5951 ])# _LT_PROG_CXX
5952
5953 dnl aclocal-1.4 backwards compatibility:
5954 dnl AC_DEFUN([_LT_PROG_CXX], [])
5955
5956
5957 # _LT_LANG_CXX_CONFIG([TAG])
5958 # --------------------------
5959 # Ensure that the configuration variables for a C++ compiler are suitably
5960 # defined.  These variables are subsequently used by _LT_CONFIG to write
5961 # the compiler configuration to `libtool'.
5962 m4_defun([_LT_LANG_CXX_CONFIG],
5963 [AC_REQUIRE([_LT_PROG_CXX])dnl
5964 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5965 m4_require([_LT_DECL_EGREP])dnl
5966
5967 AC_LANG_PUSH(C++)
5968 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5969 _LT_TAGVAR(allow_undefined_flag, $1)=
5970 _LT_TAGVAR(always_export_symbols, $1)=no
5971 _LT_TAGVAR(archive_expsym_cmds, $1)=
5972 _LT_TAGVAR(compiler_needs_object, $1)=no
5973 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5974 _LT_TAGVAR(hardcode_direct, $1)=no
5975 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5976 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5977 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5978 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5979 _LT_TAGVAR(hardcode_minus_L, $1)=no
5980 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5981 _LT_TAGVAR(hardcode_automatic, $1)=no
5982 _LT_TAGVAR(inherit_rpath, $1)=no
5983 _LT_TAGVAR(module_cmds, $1)=
5984 _LT_TAGVAR(module_expsym_cmds, $1)=
5985 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5986 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5987 _LT_TAGVAR(no_undefined_flag, $1)=
5988 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5989 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5990
5991 # Source file extension for C++ test sources.
5992 ac_ext=cpp
5993
5994 # Object file extension for compiled C++ test sources.
5995 objext=o
5996 _LT_TAGVAR(objext, $1)=$objext
5997
5998 # No sense in running all these tests if we already determined that
5999 # the CXX compiler isn't working.  Some variables (like enable_shared)
6000 # are currently assumed to apply to all compilers on this platform,
6001 # and will be corrupted by setting them based on a non-working compiler.
6002 if test "$_lt_caught_CXX_error" != yes; then
6003   # Code to be used in simple compile tests
6004   lt_simple_compile_test_code="int some_variable = 0;"
6005
6006   # Code to be used in simple link tests
6007   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6008
6009   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6010   _LT_TAG_COMPILER
6011
6012   # save warnings/boilerplate of simple test code
6013   _LT_COMPILER_BOILERPLATE
6014   _LT_LINKER_BOILERPLATE
6015
6016   # Allow CC to be a program name with arguments.
6017   lt_save_CC=$CC
6018   lt_save_LD=$LD
6019   lt_save_GCC=$GCC
6020   GCC=$GXX
6021   lt_save_with_gnu_ld=$with_gnu_ld
6022   lt_save_path_LD=$lt_cv_path_LD
6023   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6024     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6025   else
6026     $as_unset lt_cv_prog_gnu_ld
6027   fi
6028   if test -n "${lt_cv_path_LDCXX+set}"; then
6029     lt_cv_path_LD=$lt_cv_path_LDCXX
6030   else
6031     $as_unset lt_cv_path_LD
6032   fi
6033   test -z "${LDCXX+set}" || LD=$LDCXX
6034   CC=${CXX-"c++"}
6035   compiler=$CC
6036   _LT_TAGVAR(compiler, $1)=$CC
6037   _LT_CC_BASENAME([$compiler])
6038
6039   if test -n "$compiler"; then
6040     # We don't want -fno-exception when compiling C++ code, so set the
6041     # no_builtin_flag separately
6042     if test "$GXX" = yes; then
6043       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6044     else
6045       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6046     fi
6047
6048     if test "$GXX" = yes; then
6049       # Set up default GNU C++ configuration
6050
6051       LT_PATH_LD
6052
6053       # Check if GNU C++ uses GNU ld as the underlying linker, since the
6054       # archiving commands below assume that GNU ld is being used.
6055       if test "$with_gnu_ld" = yes; then
6056         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6057         _LT_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'
6058
6059         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6060         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6061
6062         # If archive_cmds runs LD, not CC, wlarc should be empty
6063         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6064         #     investigate it a little bit more. (MM)
6065         wlarc='${wl}'
6066
6067         # ancient GNU ld didn't support --whole-archive et. al.
6068         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6069           $GREP 'no-whole-archive' > /dev/null; then
6070           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6071         else
6072           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6073         fi
6074       else
6075         with_gnu_ld=no
6076         wlarc=
6077
6078         # A generic and very simple default shared library creation
6079         # command for GNU C++ for the case where it uses the native
6080         # linker, instead of GNU ld.  If possible, this setting should
6081         # overridden to take advantage of the native linker features on
6082         # the platform it is being used on.
6083         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6084       fi
6085
6086       # Commands to make compiler produce verbose output that lists
6087       # what "hidden" libraries, object files and flags are used when
6088       # linking a shared library.
6089       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6090
6091     else
6092       GXX=no
6093       with_gnu_ld=no
6094       wlarc=
6095     fi
6096
6097     # PORTME: fill in a description of your system's C++ link characteristics
6098     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6099     _LT_TAGVAR(ld_shlibs, $1)=yes
6100     case $host_os in
6101       aix3*)
6102         # FIXME: insert proper C++ library support
6103         _LT_TAGVAR(ld_shlibs, $1)=no
6104         ;;
6105       aix[[4-9]]*)
6106         if test "$host_cpu" = ia64; then
6107           # On IA64, the linker does run time linking by default, so we don't
6108           # have to do anything special.
6109           aix_use_runtimelinking=no
6110           exp_sym_flag='-Bexport'
6111           no_entry_flag=""
6112         else
6113           aix_use_runtimelinking=no
6114
6115           # Test if we are trying to use run time linking or normal
6116           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6117           # need to do runtime linking.
6118           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6119             for ld_flag in $LDFLAGS; do
6120               case $ld_flag in
6121               *-brtl*)
6122                 aix_use_runtimelinking=yes
6123                 break
6124                 ;;
6125               esac
6126             done
6127             ;;
6128           esac
6129
6130           exp_sym_flag='-bexport'
6131           no_entry_flag='-bnoentry'
6132         fi
6133
6134         # When large executables or shared objects are built, AIX ld can
6135         # have problems creating the table of contents.  If linking a library
6136         # or program results in "error TOC overflow" add -mminimal-toc to
6137         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6138         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6139
6140         _LT_TAGVAR(archive_cmds, $1)=''
6141         _LT_TAGVAR(hardcode_direct, $1)=yes
6142         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6143         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6144         _LT_TAGVAR(link_all_deplibs, $1)=yes
6145         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6146
6147         if test "$GXX" = yes; then
6148           case $host_os in aix4.[[012]]|aix4.[[012]].*)
6149           # We only want to do this on AIX 4.2 and lower, the check
6150           # below for broken collect2 doesn't work under 4.3+
6151           collect2name=`${CC} -print-prog-name=collect2`
6152           if test -f "$collect2name" &&
6153              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6154           then
6155             # We have reworked collect2
6156             :
6157           else
6158             # We have old collect2
6159             _LT_TAGVAR(hardcode_direct, $1)=unsupported
6160             # It fails to find uninstalled libraries when the uninstalled
6161             # path is not listed in the libpath.  Setting hardcode_minus_L
6162             # to unsupported forces relinking
6163             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6164             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6165             _LT_TAGVAR(hardcode_libdir_separator, $1)=
6166           fi
6167           esac
6168           shared_flag='-shared'
6169           if test "$aix_use_runtimelinking" = yes; then
6170             shared_flag="$shared_flag "'${wl}-G'
6171           fi
6172         else
6173           # not using gcc
6174           if test "$host_cpu" = ia64; then
6175           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6176           # chokes on -Wl,-G. The following line is correct:
6177           shared_flag='-G'
6178           else
6179             if test "$aix_use_runtimelinking" = yes; then
6180               shared_flag='${wl}-G'
6181             else
6182               shared_flag='${wl}-bM:SRE'
6183             fi
6184           fi
6185         fi
6186
6187         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6188         # It seems that -bexpall does not export symbols beginning with
6189         # underscore (_), so it is better to generate a list of symbols to
6190         # export.
6191         _LT_TAGVAR(always_export_symbols, $1)=yes
6192         if test "$aix_use_runtimelinking" = yes; then
6193           # Warning - without using the other runtime loading flags (-brtl),
6194           # -berok will link without error, but may produce a broken library.
6195           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6196           # Determine the default libpath from the value encoded in an empty
6197           # executable.
6198           _LT_SYS_MODULE_PATH_AIX
6199           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6200
6201           _LT_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 "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6202         else
6203           if test "$host_cpu" = ia64; then
6204             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6205             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6206             _LT_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"
6207           else
6208             # Determine the default libpath from the value encoded in an
6209             # empty executable.
6210             _LT_SYS_MODULE_PATH_AIX
6211             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6212             # Warning - without using the other run time loading flags,
6213             # -berok will link without error, but may produce a broken library.
6214             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6215             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6216             # Exported symbols can be pulled into shared objects from archives
6217             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6218             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6219             # This is similar to how AIX traditionally builds its shared
6220             # libraries.
6221             _LT_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'
6222           fi
6223         fi
6224         ;;
6225
6226       beos*)
6227         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6228           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6229           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6230           # support --undefined.  This deserves some investigation.  FIXME
6231           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6232         else
6233           _LT_TAGVAR(ld_shlibs, $1)=no
6234         fi
6235         ;;
6236
6237       chorus*)
6238         case $cc_basename in
6239           *)
6240           # FIXME: insert proper C++ library support
6241           _LT_TAGVAR(ld_shlibs, $1)=no
6242           ;;
6243         esac
6244         ;;
6245
6246       cygwin* | mingw* | pw32* | cegcc*)
6247         # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6248         # as there is no search path for DLLs.
6249         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6250         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6251         _LT_TAGVAR(always_export_symbols, $1)=no
6252         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6253
6254         if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6255           _LT_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'
6256           # If the export-symbols file already is a .def file (1st line
6257           # is EXPORTS), use it as is; otherwise, prepend...
6258           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6259             cp $export_symbols $output_objdir/$soname.def;
6260           else
6261             echo EXPORTS > $output_objdir/$soname.def;
6262             cat $export_symbols >> $output_objdir/$soname.def;
6263           fi~
6264           $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'
6265         else
6266           _LT_TAGVAR(ld_shlibs, $1)=no
6267         fi
6268         ;;
6269       darwin* | rhapsody*)
6270         _LT_DARWIN_LINKER_FEATURES($1)
6271         ;;
6272
6273       dgux*)
6274         case $cc_basename in
6275           ec++*)
6276             # FIXME: insert proper C++ library support
6277             _LT_TAGVAR(ld_shlibs, $1)=no
6278             ;;
6279           ghcx*)
6280             # Green Hills C++ Compiler
6281             # FIXME: insert proper C++ library support
6282             _LT_TAGVAR(ld_shlibs, $1)=no
6283             ;;
6284           *)
6285             # FIXME: insert proper C++ library support
6286             _LT_TAGVAR(ld_shlibs, $1)=no
6287             ;;
6288         esac
6289         ;;
6290
6291       freebsd[[12]]*)
6292         # C++ shared libraries reported to be fairly broken before
6293         # switch to ELF
6294         _LT_TAGVAR(ld_shlibs, $1)=no
6295         ;;
6296
6297       freebsd-elf*)
6298         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6299         ;;
6300
6301       freebsd* | dragonfly*)
6302         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6303         # conventions
6304         _LT_TAGVAR(ld_shlibs, $1)=yes
6305         ;;
6306
6307       gnu*)
6308         ;;
6309
6310       hpux9*)
6311         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6312         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6313         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6314         _LT_TAGVAR(hardcode_direct, $1)=yes
6315         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6316                                              # but as the default
6317                                              # location of the library.
6318
6319         case $cc_basename in
6320           CC*)
6321             # FIXME: insert proper C++ library support
6322             _LT_TAGVAR(ld_shlibs, $1)=no
6323             ;;
6324           aCC*)
6325             _LT_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'
6326             # Commands to make compiler produce verbose output that lists
6327             # what "hidden" libraries, object files and flags are used when
6328             # linking a shared library.
6329             #
6330             # There doesn't appear to be a way to prevent this compiler from
6331             # explicitly linking system object files so we need to strip them
6332             # from the output so that they don't get included in the library
6333             # dependencies.
6334             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6335             ;;
6336           *)
6337             if test "$GXX" = yes; then
6338               _LT_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'
6339             else
6340               # FIXME: insert proper C++ library support
6341               _LT_TAGVAR(ld_shlibs, $1)=no
6342             fi
6343             ;;
6344         esac
6345         ;;
6346
6347       hpux10*|hpux11*)
6348         if test $with_gnu_ld = no; then
6349           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6350           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6351
6352           case $host_cpu in
6353             hppa*64*|ia64*)
6354               ;;
6355             *)
6356               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6357               ;;
6358           esac
6359         fi
6360         case $host_cpu in
6361           hppa*64*|ia64*)
6362             _LT_TAGVAR(hardcode_direct, $1)=no
6363             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6364             ;;
6365           *)
6366             _LT_TAGVAR(hardcode_direct, $1)=yes
6367             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6368             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6369                                                  # but as the default
6370                                                  # location of the library.
6371             ;;
6372         esac
6373
6374         case $cc_basename in
6375           CC*)
6376             # FIXME: insert proper C++ library support
6377             _LT_TAGVAR(ld_shlibs, $1)=no
6378             ;;
6379           aCC*)
6380             case $host_cpu in
6381               hppa*64*)
6382                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6383                 ;;
6384               ia64*)
6385                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6386                 ;;
6387               *)
6388                 _LT_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'
6389                 ;;
6390             esac
6391             # Commands to make compiler produce verbose output that lists
6392             # what "hidden" libraries, object files and flags are used when
6393             # linking a shared library.
6394             #
6395             # There doesn't appear to be a way to prevent this compiler from
6396             # explicitly linking system object files so we need to strip them
6397             # from the output so that they don't get included in the library
6398             # dependencies.
6399             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 "X$list" | $Xsed'
6400             ;;
6401           *)
6402             if test "$GXX" = yes; then
6403               if test $with_gnu_ld = no; then
6404                 case $host_cpu in
6405                   hppa*64*)
6406                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6407                     ;;
6408                   ia64*)
6409                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6410                     ;;
6411                   *)
6412                     _LT_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'
6413                     ;;
6414                 esac
6415               fi
6416             else
6417               # FIXME: insert proper C++ library support
6418               _LT_TAGVAR(ld_shlibs, $1)=no
6419             fi
6420             ;;
6421         esac
6422         ;;
6423
6424       interix[[3-9]]*)
6425         _LT_TAGVAR(hardcode_direct, $1)=no
6426         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6427         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6428         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6429         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6430         # Instead, shared libraries are loaded at an image base (0x10000000 by
6431         # default) and relocated if they conflict, which is a slow very memory
6432         # consuming and fragmenting process.  To avoid this, we pick a random,
6433         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6434         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6435         _LT_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'
6436         _LT_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'
6437         ;;
6438       irix5* | irix6*)
6439         case $cc_basename in
6440           CC*)
6441             # SGI C++
6442             _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6443
6444             # Archives containing C++ object files must be created using
6445             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6446             # necessary to make sure instantiated templates are included
6447             # in the archive.
6448             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6449             ;;
6450           *)
6451             if test "$GXX" = yes; then
6452               if test "$with_gnu_ld" = no; then
6453                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6454               else
6455                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
6456               fi
6457             fi
6458             _LT_TAGVAR(link_all_deplibs, $1)=yes
6459             ;;
6460         esac
6461         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6462         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6463         _LT_TAGVAR(inherit_rpath, $1)=yes
6464         ;;
6465
6466       linux* | k*bsd*-gnu)
6467         case $cc_basename in
6468           KCC*)
6469             # Kuck and Associates, Inc. (KAI) C++ Compiler
6470
6471             # KCC will only create a shared library if the output file
6472             # ends with ".so" (or ".sl" for HP-UX), so rename the library
6473             # to its proper name (with version) after linking.
6474             _LT_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'
6475             _LT_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'
6476             # Commands to make compiler produce verbose output that lists
6477             # what "hidden" libraries, object files and flags are used when
6478             # linking a shared library.
6479             #
6480             # There doesn't appear to be a way to prevent this compiler from
6481             # explicitly linking system object files so we need to strip them
6482             # from the output so that they don't get included in the library
6483             # dependencies.
6484             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 "X$list" | $Xsed'
6485
6486             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6487             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6488
6489             # Archives containing C++ object files must be created using
6490             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6491             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6492             ;;
6493           icpc* | ecpc* )
6494             # Intel C++
6495             with_gnu_ld=yes
6496             # version 8.0 and above of icpc choke on multiply defined symbols
6497             # if we add $predep_objects and $postdep_objects, however 7.1 and
6498             # earlier do not add the objects themselves.
6499             case `$CC -V 2>&1` in
6500               *"Version 7."*)
6501                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6502                 _LT_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'
6503                 ;;
6504               *)  # Version 8.0 or newer
6505                 tmp_idyn=
6506                 case $host_cpu in
6507                   ia64*) tmp_idyn=' -i_dynamic';;
6508                 esac
6509                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6510                 _LT_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'
6511                 ;;
6512             esac
6513             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6514             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6515             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6516             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6517             ;;
6518           pgCC* | pgcpp*)
6519             # Portland Group C++ compiler
6520             case `$CC -V` in
6521             *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
6522               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6523                 rm -rf $tpldir~
6524                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6525                 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
6526               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6527                 rm -rf $tpldir~
6528                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6529                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
6530                 $RANLIB $oldlib'
6531               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6532                 rm -rf $tpldir~
6533                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6534                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6535               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6536                 rm -rf $tpldir~
6537                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6538                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6539               ;;
6540             *) # Version 6 will use weak symbols
6541               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6542               _LT_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'
6543               ;;
6544             esac
6545
6546             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6547             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6548             _LT_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'
6549             ;;
6550           cxx*)
6551             # Compaq C++
6552             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6553             _LT_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'
6554
6555             runpath_var=LD_RUN_PATH
6556             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6557             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6558
6559             # Commands to make compiler produce verbose output that lists
6560             # what "hidden" libraries, object files and flags are used when
6561             # linking a shared library.
6562             #
6563             # There doesn't appear to be a way to prevent this compiler from
6564             # explicitly linking system object files so we need to strip them
6565             # from the output so that they don't get included in the library
6566             # dependencies.
6567             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
6568             ;;
6569           xl*)
6570             # IBM XL 8.0 on PPC, with GNU ld
6571             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6572             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6573             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6574             if test "x$supports_anon_versioning" = xyes; then
6575               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6576                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6577                 echo "local: *; };" >> $output_objdir/$libname.ver~
6578                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6579             fi
6580             ;;
6581           *)
6582             case `$CC -V 2>&1 | sed 5q` in
6583             *Sun\ C*)
6584               # Sun C++ 5.9
6585               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6586               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6587               _LT_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'
6588               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6589               _LT_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'
6590               _LT_TAGVAR(compiler_needs_object, $1)=yes
6591
6592               # Not sure whether something based on
6593               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6594               # would be better.
6595               output_verbose_link_cmd='echo'
6596
6597               # Archives containing C++ object files must be created using
6598               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6599               # necessary to make sure instantiated templates are included
6600               # in the archive.
6601               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6602               ;;
6603             esac
6604             ;;
6605         esac
6606         ;;
6607
6608       lynxos*)
6609         # FIXME: insert proper C++ library support
6610         _LT_TAGVAR(ld_shlibs, $1)=no
6611         ;;
6612
6613       m88k*)
6614         # FIXME: insert proper C++ library support
6615         _LT_TAGVAR(ld_shlibs, $1)=no
6616         ;;
6617
6618       mvs*)
6619         case $cc_basename in
6620           cxx*)
6621             # FIXME: insert proper C++ library support
6622             _LT_TAGVAR(ld_shlibs, $1)=no
6623             ;;
6624           *)
6625             # FIXME: insert proper C++ library support
6626             _LT_TAGVAR(ld_shlibs, $1)=no
6627             ;;
6628         esac
6629         ;;
6630
6631       netbsd*)
6632         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6633           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6634           wlarc=
6635           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6636           _LT_TAGVAR(hardcode_direct, $1)=yes
6637           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6638         fi
6639         # Workaround some broken pre-1.5 toolchains
6640         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6641         ;;
6642
6643       *nto* | *qnx*)
6644         _LT_TAGVAR(ld_shlibs, $1)=yes
6645         ;;
6646
6647       openbsd2*)
6648         # C++ shared libraries are fairly broken
6649         _LT_TAGVAR(ld_shlibs, $1)=no
6650         ;;
6651
6652       openbsd*)
6653         if test -f /usr/libexec/ld.so; then
6654           _LT_TAGVAR(hardcode_direct, $1)=yes
6655           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6656           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6657           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6658           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6659           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6660             _LT_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'
6661             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6662             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6663           fi
6664           output_verbose_link_cmd=echo
6665         else
6666           _LT_TAGVAR(ld_shlibs, $1)=no
6667         fi
6668         ;;
6669
6670       osf3* | osf4* | osf5*)
6671         case $cc_basename in
6672           KCC*)
6673             # Kuck and Associates, Inc. (KAI) C++ Compiler
6674
6675             # KCC will only create a shared library if the output file
6676             # ends with ".so" (or ".sl" for HP-UX), so rename the library
6677             # to its proper name (with version) after linking.
6678             _LT_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'
6679
6680             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6681             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6682
6683             # Archives containing C++ object files must be created using
6684             # the KAI C++ compiler.
6685             case $host in
6686               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6687               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6688             esac
6689             ;;
6690           RCC*)
6691             # Rational C++ 2.4.1
6692             # FIXME: insert proper C++ library support
6693             _LT_TAGVAR(ld_shlibs, $1)=no
6694             ;;
6695           cxx*)
6696             case $host in
6697               osf3*)
6698                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6699                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6700                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6701                 ;;
6702               *)
6703                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6704                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6705                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6706                   echo "-hidden">> $lib.exp~
6707                   $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
6708                   $RM $lib.exp'
6709                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6710                 ;;
6711             esac
6712
6713             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6714
6715             # Commands to make compiler produce verbose output that lists
6716             # what "hidden" libraries, object files and flags are used when
6717             # linking a shared library.
6718             #
6719             # There doesn't appear to be a way to prevent this compiler from
6720             # explicitly linking system object files so we need to strip them
6721             # from the output so that they don't get included in the library
6722             # dependencies.
6723             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
6724             ;;
6725           *)
6726             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6727               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6728               case $host in
6729                 osf3*)
6730                   _LT_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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6731                   ;;
6732                 *)
6733                   _LT_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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6734                   ;;
6735               esac
6736
6737               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6738               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6739
6740               # Commands to make compiler produce verbose output that lists
6741               # what "hidden" libraries, object files and flags are used when
6742               # linking a shared library.
6743               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6744
6745             else
6746               # FIXME: insert proper C++ library support
6747               _LT_TAGVAR(ld_shlibs, $1)=no
6748             fi
6749             ;;
6750         esac
6751         ;;
6752
6753       psos*)
6754         # FIXME: insert proper C++ library support
6755         _LT_TAGVAR(ld_shlibs, $1)=no
6756         ;;
6757
6758       sunos4*)
6759         case $cc_basename in
6760           CC*)
6761             # Sun C++ 4.x
6762             # FIXME: insert proper C++ library support
6763             _LT_TAGVAR(ld_shlibs, $1)=no
6764             ;;
6765           lcc*)
6766             # Lucid
6767             # FIXME: insert proper C++ library support
6768             _LT_TAGVAR(ld_shlibs, $1)=no
6769             ;;
6770           *)
6771             # FIXME: insert proper C++ library support
6772             _LT_TAGVAR(ld_shlibs, $1)=no
6773             ;;
6774         esac
6775         ;;
6776
6777       solaris*)
6778         case $cc_basename in
6779           CC*)
6780             # Sun C++ 4.2, 5.x and Centerline C++
6781             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6782             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6783             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6784             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6785               $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'
6786
6787             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6788             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6789             case $host_os in
6790               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6791               *)
6792                 # The compiler driver will combine and reorder linker options,
6793                 # but understands `-z linker_flag'.
6794                 # Supported since Solaris 2.6 (maybe 2.5.1?)
6795                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6796                 ;;
6797             esac
6798             _LT_TAGVAR(link_all_deplibs, $1)=yes
6799
6800             output_verbose_link_cmd='echo'
6801
6802             # Archives containing C++ object files must be created using
6803             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6804             # necessary to make sure instantiated templates are included
6805             # in the archive.
6806             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6807             ;;
6808           gcx*)
6809             # Green Hills C++ Compiler
6810             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6811
6812             # The C++ compiler must be used to create the archive.
6813             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6814             ;;
6815           *)
6816             # GNU C++ compiler with Solaris linker
6817             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6818               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6819               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6820                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6821                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6822                   $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6823
6824                 # Commands to make compiler produce verbose output that lists
6825                 # what "hidden" libraries, object files and flags are used when
6826                 # linking a shared library.
6827                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6828               else
6829                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6830                 # platform.
6831                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6832                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6833                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6834
6835                 # Commands to make compiler produce verbose output that lists
6836                 # what "hidden" libraries, object files and flags are used when
6837                 # linking a shared library.
6838                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6839               fi
6840
6841               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6842               case $host_os in
6843                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6844                 *)
6845                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6846                   ;;
6847               esac
6848             fi
6849             ;;
6850         esac
6851         ;;
6852
6853     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6854       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6855       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6856       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6857       runpath_var='LD_RUN_PATH'
6858
6859       case $cc_basename in
6860         CC*)
6861           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6862           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6863           ;;
6864         *)
6865           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6866           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6867           ;;
6868       esac
6869       ;;
6870
6871       sysv5* | sco3.2v5* | sco5v6*)
6872         # Note: We can NOT use -z defs as we might desire, because we do not
6873         # link with -lc, and that would cause any symbols used from libc to
6874         # always be unresolved, which means just about no library would
6875         # ever link correctly.  If we're not using GNU ld we use -z text
6876         # though, which does catch some bad symbols but isn't as heavy-handed
6877         # as -z defs.
6878         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6879         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6880         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6881         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6882         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6883         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6884         _LT_TAGVAR(link_all_deplibs, $1)=yes
6885         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6886         runpath_var='LD_RUN_PATH'
6887
6888         case $cc_basename in
6889           CC*)
6890             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6891             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6892             ;;
6893           *)
6894             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6895             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6896             ;;
6897         esac
6898       ;;
6899
6900       tandem*)
6901         case $cc_basename in
6902           NCC*)
6903             # NonStop-UX NCC 3.20
6904             # FIXME: insert proper C++ library support
6905             _LT_TAGVAR(ld_shlibs, $1)=no
6906             ;;
6907           *)
6908             # FIXME: insert proper C++ library support
6909             _LT_TAGVAR(ld_shlibs, $1)=no
6910             ;;
6911         esac
6912         ;;
6913
6914       vxworks*)
6915         # FIXME: insert proper C++ library support
6916         _LT_TAGVAR(ld_shlibs, $1)=no
6917         ;;
6918
6919       *)
6920         # FIXME: insert proper C++ library support
6921         _LT_TAGVAR(ld_shlibs, $1)=no
6922         ;;
6923     esac
6924
6925     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6926     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6927
6928     _LT_TAGVAR(GCC, $1)="$GXX"
6929     _LT_TAGVAR(LD, $1)="$LD"
6930
6931     ## CAVEAT EMPTOR:
6932     ## There is no encapsulation within the following macros, do not change
6933     ## the running order or otherwise move them around unless you know exactly
6934     ## what you are doing...
6935     _LT_SYS_HIDDEN_LIBDEPS($1)
6936     _LT_COMPILER_PIC($1)
6937     _LT_COMPILER_C_O($1)
6938     _LT_COMPILER_FILE_LOCKS($1)
6939     _LT_LINKER_SHLIBS($1)
6940     _LT_SYS_DYNAMIC_LINKER($1)
6941     _LT_LINKER_HARDCODE_LIBPATH($1)
6942
6943     _LT_CONFIG($1)
6944   fi # test -n "$compiler"
6945
6946   CC=$lt_save_CC
6947   LDCXX=$LD
6948   LD=$lt_save_LD
6949   GCC=$lt_save_GCC
6950   with_gnu_ld=$lt_save_with_gnu_ld
6951   lt_cv_path_LDCXX=$lt_cv_path_LD
6952   lt_cv_path_LD=$lt_save_path_LD
6953   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6954   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6955 fi # test "$_lt_caught_CXX_error" != yes
6956
6957 AC_LANG_POP
6958 ])# _LT_LANG_CXX_CONFIG
6959
6960
6961 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6962 # ---------------------------------
6963 # Figure out "hidden" library dependencies from verbose
6964 # compiler output when linking a shared library.
6965 # Parse the compiler output and extract the necessary
6966 # objects, libraries and library flags.
6967 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6968 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6969 # Dependencies to place before and after the object being linked:
6970 _LT_TAGVAR(predep_objects, $1)=
6971 _LT_TAGVAR(postdep_objects, $1)=
6972 _LT_TAGVAR(predeps, $1)=
6973 _LT_TAGVAR(postdeps, $1)=
6974 _LT_TAGVAR(compiler_lib_search_path, $1)=
6975
6976 dnl we can't use the lt_simple_compile_test_code here,
6977 dnl because it contains code intended for an executable,
6978 dnl not a library.  It's possible we should let each
6979 dnl tag define a new lt_????_link_test_code variable,
6980 dnl but it's only used here...
6981 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6982 int a;
6983 void foo (void) { a = 0; }
6984 _LT_EOF
6985 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6986 class Foo
6987 {
6988 public:
6989   Foo (void) { a = 0; }
6990 private:
6991   int a;
6992 };
6993 _LT_EOF
6994 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6995       subroutine foo
6996       implicit none
6997       integer*4 a
6998       a=0
6999       return
7000       end
7001 _LT_EOF
7002 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7003       subroutine foo
7004       implicit none
7005       integer a
7006       a=0
7007       return
7008       end
7009 _LT_EOF
7010 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7011 public class foo {
7012   private int a;
7013   public void bar (void) {
7014     a = 0;
7015   }
7016 };
7017 _LT_EOF
7018 ])
7019 dnl Parse the compiler output and extract the necessary
7020 dnl objects, libraries and library flags.
7021 if AC_TRY_EVAL(ac_compile); then
7022   # Parse the compiler output and extract the necessary
7023   # objects, libraries and library flags.
7024
7025   # Sentinel used to keep track of whether or not we are before
7026   # the conftest object file.
7027   pre_test_object_deps_done=no
7028
7029   for p in `eval "$output_verbose_link_cmd"`; do
7030     case $p in
7031
7032     -L* | -R* | -l*)
7033        # Some compilers place space between "-{L,R}" and the path.
7034        # Remove the space.
7035        if test $p = "-L" ||
7036           test $p = "-R"; then
7037          prev=$p
7038          continue
7039        else
7040          prev=
7041        fi
7042
7043        if test "$pre_test_object_deps_done" = no; then
7044          case $p in
7045          -L* | -R*)
7046            # Internal compiler library paths should come after those
7047            # provided the user.  The postdeps already come after the
7048            # user supplied libs so there is no need to process them.
7049            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7050              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7051            else
7052              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7053            fi
7054            ;;
7055          # The "-l" case would never come before the object being
7056          # linked, so don't bother handling this case.
7057          esac
7058        else
7059          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7060            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7061          else
7062            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7063          fi
7064        fi
7065        ;;
7066
7067     *.$objext)
7068        # This assumes that the test object file only shows up
7069        # once in the compiler output.
7070        if test "$p" = "conftest.$objext"; then
7071          pre_test_object_deps_done=yes
7072          continue
7073        fi
7074
7075        if test "$pre_test_object_deps_done" = no; then
7076          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7077            _LT_TAGVAR(predep_objects, $1)="$p"
7078          else
7079            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7080          fi
7081        else
7082          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7083            _LT_TAGVAR(postdep_objects, $1)="$p"
7084          else
7085            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7086          fi
7087        fi
7088        ;;
7089
7090     *) ;; # Ignore the rest.
7091
7092     esac
7093   done
7094
7095   # Clean up.
7096   rm -f a.out a.exe
7097 else
7098   echo "libtool.m4: error: problem compiling $1 test program"
7099 fi
7100
7101 $RM -f confest.$objext
7102
7103 # PORTME: override above test on systems where it is broken
7104 m4_if([$1], [CXX],
7105 [case $host_os in
7106 interix[[3-9]]*)
7107   # Interix 3.5 installs completely hosed .la files for C++, so rather than
7108   # hack all around it, let's just trust "g++" to DTRT.
7109   _LT_TAGVAR(predep_objects,$1)=
7110   _LT_TAGVAR(postdep_objects,$1)=
7111   _LT_TAGVAR(postdeps,$1)=
7112   ;;
7113
7114 linux*)
7115   case `$CC -V 2>&1 | sed 5q` in
7116   *Sun\ C*)
7117     # Sun C++ 5.9
7118
7119     # The more standards-conforming stlport4 library is
7120     # incompatible with the Cstd library. Avoid specifying
7121     # it if it's in CXXFLAGS. Ignore libCrun as
7122     # -library=stlport4 depends on it.
7123     case " $CXX $CXXFLAGS " in
7124     *" -library=stlport4 "*)
7125       solaris_use_stlport4=yes
7126       ;;
7127     esac
7128
7129     if test "$solaris_use_stlport4" != yes; then
7130       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7131     fi
7132     ;;
7133   esac
7134   ;;
7135
7136 solaris*)
7137   case $cc_basename in
7138   CC*)
7139     # The more standards-conforming stlport4 library is
7140     # incompatible with the Cstd library. Avoid specifying
7141     # it if it's in CXXFLAGS. Ignore libCrun as
7142     # -library=stlport4 depends on it.
7143     case " $CXX $CXXFLAGS " in
7144     *" -library=stlport4 "*)
7145       solaris_use_stlport4=yes
7146       ;;
7147     esac
7148
7149     # Adding this requires a known-good setup of shared libraries for
7150     # Sun compiler versions before 5.6, else PIC objects from an old
7151     # archive will be linked into the output, leading to subtle bugs.
7152     if test "$solaris_use_stlport4" != yes; then
7153       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7154     fi
7155     ;;
7156   esac
7157   ;;
7158 esac
7159 ])
7160
7161 case " $_LT_TAGVAR(postdeps, $1) " in
7162 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7163 esac
7164  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7165 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7166  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7167 fi
7168 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7169     [The directories searched by this compiler when creating a shared library])
7170 _LT_TAGDECL([], [predep_objects], [1],
7171     [Dependencies to place before and after the objects being linked to
7172     create a shared library])
7173 _LT_TAGDECL([], [postdep_objects], [1])
7174 _LT_TAGDECL([], [predeps], [1])
7175 _LT_TAGDECL([], [postdeps], [1])
7176 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7177     [The library search path used internally by the compiler when linking
7178     a shared library])
7179 ])# _LT_SYS_HIDDEN_LIBDEPS
7180
7181
7182 # _LT_PROG_F77
7183 # ------------
7184 # Since AC_PROG_F77 is broken, in that it returns the empty string
7185 # if there is no fortran compiler, we have our own version here.
7186 m4_defun([_LT_PROG_F77],
7187 [
7188 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
7189 AC_PROG_F77
7190 if test -z "$F77" || test "X$F77" = "Xno"; then
7191   _lt_disable_F77=yes
7192 fi
7193 popdef([AC_MSG_ERROR])
7194 ])# _LT_PROG_F77
7195
7196 dnl aclocal-1.4 backwards compatibility:
7197 dnl AC_DEFUN([_LT_PROG_F77], [])
7198
7199
7200 # _LT_LANG_F77_CONFIG([TAG])
7201 # --------------------------
7202 # Ensure that the configuration variables for a Fortran 77 compiler are
7203 # suitably defined.  These variables are subsequently used by _LT_CONFIG
7204 # to write the compiler configuration to `libtool'.
7205 m4_defun([_LT_LANG_F77_CONFIG],
7206 [AC_REQUIRE([_LT_PROG_F77])dnl
7207 AC_LANG_PUSH(Fortran 77)
7208
7209 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7210 _LT_TAGVAR(allow_undefined_flag, $1)=
7211 _LT_TAGVAR(always_export_symbols, $1)=no
7212 _LT_TAGVAR(archive_expsym_cmds, $1)=
7213 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7214 _LT_TAGVAR(hardcode_direct, $1)=no
7215 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7216 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7217 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7218 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7219 _LT_TAGVAR(hardcode_minus_L, $1)=no
7220 _LT_TAGVAR(hardcode_automatic, $1)=no
7221 _LT_TAGVAR(inherit_rpath, $1)=no
7222 _LT_TAGVAR(module_cmds, $1)=
7223 _LT_TAGVAR(module_expsym_cmds, $1)=
7224 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7225 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7226 _LT_TAGVAR(no_undefined_flag, $1)=
7227 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7228 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7229
7230 # Source file extension for f77 test sources.
7231 ac_ext=f
7232
7233 # Object file extension for compiled f77 test sources.
7234 objext=o
7235 _LT_TAGVAR(objext, $1)=$objext
7236
7237 # No sense in running all these tests if we already determined that
7238 # the F77 compiler isn't working.  Some variables (like enable_shared)
7239 # are currently assumed to apply to all compilers on this platform,
7240 # and will be corrupted by setting them based on a non-working compiler.
7241 if test "$_lt_disable_F77" != yes; then
7242   # Code to be used in simple compile tests
7243   lt_simple_compile_test_code="\
7244       subroutine t
7245       return
7246       end
7247 "
7248
7249   # Code to be used in simple link tests
7250   lt_simple_link_test_code="\
7251       program t
7252       end
7253 "
7254
7255   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7256   _LT_TAG_COMPILER
7257
7258   # save warnings/boilerplate of simple test code
7259   _LT_COMPILER_BOILERPLATE
7260   _LT_LINKER_BOILERPLATE
7261
7262   # Allow CC to be a program name with arguments.
7263   lt_save_CC="$CC"
7264   lt_save_GCC=$GCC
7265   CC=${F77-"f77"}
7266   compiler=$CC
7267   _LT_TAGVAR(compiler, $1)=$CC
7268   _LT_CC_BASENAME([$compiler])
7269   GCC=$G77
7270   if test -n "$compiler"; then
7271     AC_MSG_CHECKING([if libtool supports shared libraries])
7272     AC_MSG_RESULT([$can_build_shared])
7273
7274     AC_MSG_CHECKING([whether to build shared libraries])
7275     test "$can_build_shared" = "no" && enable_shared=no
7276
7277     # On AIX, shared libraries and static libraries use the same namespace, and
7278     # are all built from PIC.
7279     case $host_os in
7280       aix3*)
7281         test "$enable_shared" = yes && enable_static=no
7282         if test -n "$RANLIB"; then
7283           archive_cmds="$archive_cmds~\$RANLIB \$lib"
7284           postinstall_cmds='$RANLIB $lib'
7285         fi
7286         ;;
7287       aix[[4-9]]*)
7288         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7289           test "$enable_shared" = yes && enable_static=no
7290         fi
7291         ;;
7292     esac
7293     AC_MSG_RESULT([$enable_shared])
7294
7295     AC_MSG_CHECKING([whether to build static libraries])
7296     # Make sure either enable_shared or enable_static is yes.
7297     test "$enable_shared" = yes || enable_static=yes
7298     AC_MSG_RESULT([$enable_static])
7299
7300     _LT_TAGVAR(GCC, $1)="$G77"
7301     _LT_TAGVAR(LD, $1)="$LD"
7302
7303     ## CAVEAT EMPTOR:
7304     ## There is no encapsulation within the following macros, do not change
7305     ## the running order or otherwise move them around unless you know exactly
7306     ## what you are doing...
7307     _LT_COMPILER_PIC($1)
7308     _LT_COMPILER_C_O($1)
7309     _LT_COMPILER_FILE_LOCKS($1)
7310     _LT_LINKER_SHLIBS($1)
7311     _LT_SYS_DYNAMIC_LINKER($1)
7312     _LT_LINKER_HARDCODE_LIBPATH($1)
7313
7314     _LT_CONFIG($1)
7315   fi # test -n "$compiler"
7316
7317   GCC=$lt_save_GCC
7318   CC="$lt_save_CC"
7319 fi # test "$_lt_disable_F77" != yes
7320
7321 AC_LANG_POP
7322 ])# _LT_LANG_F77_CONFIG
7323
7324
7325 # _LT_PROG_FC
7326 # -----------
7327 # Since AC_PROG_FC is broken, in that it returns the empty string
7328 # if there is no fortran compiler, we have our own version here.
7329 m4_defun([_LT_PROG_FC],
7330 [
7331 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
7332 AC_PROG_FC
7333 if test -z "$FC" || test "X$FC" = "Xno"; then
7334   _lt_disable_FC=yes
7335 fi
7336 popdef([AC_MSG_ERROR])
7337 ])# _LT_PROG_FC
7338
7339 dnl aclocal-1.4 backwards compatibility:
7340 dnl AC_DEFUN([_LT_PROG_FC], [])
7341
7342
7343 # _LT_LANG_FC_CONFIG([TAG])
7344 # -------------------------
7345 # Ensure that the configuration variables for a Fortran compiler are
7346 # suitably defined.  These variables are subsequently used by _LT_CONFIG
7347 # to write the compiler configuration to `libtool'.
7348 m4_defun([_LT_LANG_FC_CONFIG],
7349 [AC_REQUIRE([_LT_PROG_FC])dnl
7350 AC_LANG_PUSH(Fortran)
7351
7352 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7353 _LT_TAGVAR(allow_undefined_flag, $1)=
7354 _LT_TAGVAR(always_export_symbols, $1)=no
7355 _LT_TAGVAR(archive_expsym_cmds, $1)=
7356 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7357 _LT_TAGVAR(hardcode_direct, $1)=no
7358 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7359 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7360 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7361 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7362 _LT_TAGVAR(hardcode_minus_L, $1)=no
7363 _LT_TAGVAR(hardcode_automatic, $1)=no
7364 _LT_TAGVAR(inherit_rpath, $1)=no
7365 _LT_TAGVAR(module_cmds, $1)=
7366 _LT_TAGVAR(module_expsym_cmds, $1)=
7367 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7368 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7369 _LT_TAGVAR(no_undefined_flag, $1)=
7370 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7371 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7372
7373 # Source file extension for fc test sources.
7374 ac_ext=${ac_fc_srcext-f}
7375
7376 # Object file extension for compiled fc test sources.
7377 objext=o
7378 _LT_TAGVAR(objext, $1)=$objext
7379
7380 # No sense in running all these tests if we already determined that
7381 # the FC compiler isn't working.  Some variables (like enable_shared)
7382 # are currently assumed to apply to all compilers on this platform,
7383 # and will be corrupted by setting them based on a non-working compiler.
7384 if test "$_lt_disable_FC" != yes; then
7385   # Code to be used in simple compile tests
7386   lt_simple_compile_test_code="\
7387       subroutine t
7388       return
7389       end
7390 "
7391
7392   # Code to be used in simple link tests
7393   lt_simple_link_test_code="\
7394       program t
7395       end
7396 "
7397
7398   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7399   _LT_TAG_COMPILER
7400
7401   # save warnings/boilerplate of simple test code
7402   _LT_COMPILER_BOILERPLATE
7403   _LT_LINKER_BOILERPLATE
7404
7405   # Allow CC to be a program name with arguments.
7406   lt_save_CC="$CC"
7407   lt_save_GCC=$GCC
7408   CC=${FC-"f95"}
7409   compiler=$CC
7410   GCC=$ac_cv_fc_compiler_gnu
7411
7412   _LT_TAGVAR(compiler, $1)=$CC
7413   _LT_CC_BASENAME([$compiler])
7414
7415   if test -n "$compiler"; then
7416     AC_MSG_CHECKING([if libtool supports shared libraries])
7417     AC_MSG_RESULT([$can_build_shared])
7418
7419     AC_MSG_CHECKING([whether to build shared libraries])
7420     test "$can_build_shared" = "no" && enable_shared=no
7421
7422     # On AIX, shared libraries and static libraries use the same namespace, and
7423     # are all built from PIC.
7424     case $host_os in
7425       aix3*)
7426         test "$enable_shared" = yes && enable_static=no
7427         if test -n "$RANLIB"; then
7428           archive_cmds="$archive_cmds~\$RANLIB \$lib"
7429           postinstall_cmds='$RANLIB $lib'
7430         fi
7431         ;;
7432       aix[[4-9]]*)
7433         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7434           test "$enable_shared" = yes && enable_static=no
7435         fi
7436         ;;
7437     esac
7438     AC_MSG_RESULT([$enable_shared])
7439
7440     AC_MSG_CHECKING([whether to build static libraries])
7441     # Make sure either enable_shared or enable_static is yes.
7442     test "$enable_shared" = yes || enable_static=yes
7443     AC_MSG_RESULT([$enable_static])
7444
7445     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7446     _LT_TAGVAR(LD, $1)="$LD"
7447
7448     ## CAVEAT EMPTOR:
7449     ## There is no encapsulation within the following macros, do not change
7450     ## the running order or otherwise move them around unless you know exactly
7451     ## what you are doing...
7452     _LT_SYS_HIDDEN_LIBDEPS($1)
7453     _LT_COMPILER_PIC($1)
7454     _LT_COMPILER_C_O($1)
7455     _LT_COMPILER_FILE_LOCKS($1)
7456     _LT_LINKER_SHLIBS($1)
7457     _LT_SYS_DYNAMIC_LINKER($1)
7458     _LT_LINKER_HARDCODE_LIBPATH($1)
7459
7460     _LT_CONFIG($1)
7461   fi # test -n "$compiler"
7462
7463   GCC=$lt_save_GCC
7464   CC="$lt_save_CC"
7465 fi # test "$_lt_disable_FC" != yes
7466
7467 AC_LANG_POP
7468 ])# _LT_LANG_FC_CONFIG
7469
7470
7471 # _LT_LANG_GCJ_CONFIG([TAG])
7472 # --------------------------
7473 # Ensure that the configuration variables for the GNU Java Compiler compiler
7474 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
7475 # to write the compiler configuration to `libtool'.
7476 m4_defun([_LT_LANG_GCJ_CONFIG],
7477 [AC_REQUIRE([LT_PROG_GCJ])dnl
7478 AC_LANG_SAVE
7479
7480 # Source file extension for Java test sources.
7481 ac_ext=java
7482
7483 # Object file extension for compiled Java test sources.
7484 objext=o
7485 _LT_TAGVAR(objext, $1)=$objext
7486
7487 # Code to be used in simple compile tests
7488 lt_simple_compile_test_code="class foo {}"
7489
7490 # Code to be used in simple link tests
7491 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7492
7493 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7494 _LT_TAG_COMPILER
7495
7496 # save warnings/boilerplate of simple test code
7497 _LT_COMPILER_BOILERPLATE
7498 _LT_LINKER_BOILERPLATE
7499
7500 # Allow CC to be a program name with arguments.
7501 lt_save_CC="$CC"
7502 lt_save_GCC=$GCC
7503 GCC=yes
7504 CC=${GCJ-"gcj"}
7505 compiler=$CC
7506 _LT_TAGVAR(compiler, $1)=$CC
7507 _LT_TAGVAR(LD, $1)="$LD"
7508 _LT_CC_BASENAME([$compiler])
7509
7510 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7511 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7512
7513 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7514
7515 if test -n "$compiler"; then
7516   _LT_COMPILER_NO_RTTI($1)
7517   _LT_COMPILER_PIC($1)
7518   _LT_COMPILER_C_O($1)
7519   _LT_COMPILER_FILE_LOCKS($1)
7520   _LT_LINKER_SHLIBS($1)
7521   _LT_LINKER_HARDCODE_LIBPATH($1)
7522
7523   _LT_CONFIG($1)
7524 fi
7525
7526 AC_LANG_RESTORE
7527
7528 GCC=$lt_save_GCC
7529 CC="$lt_save_CC"
7530 ])# _LT_LANG_GCJ_CONFIG
7531
7532
7533 # _LT_LANG_RC_CONFIG([TAG])
7534 # -------------------------
7535 # Ensure that the configuration variables for the Windows resource compiler
7536 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
7537 # to write the compiler configuration to `libtool'.
7538 m4_defun([_LT_LANG_RC_CONFIG],
7539 [AC_REQUIRE([LT_PROG_RC])dnl
7540 AC_LANG_SAVE
7541
7542 # Source file extension for RC test sources.
7543 ac_ext=rc
7544
7545 # Object file extension for compiled RC test sources.
7546 objext=o
7547 _LT_TAGVAR(objext, $1)=$objext
7548
7549 # Code to be used in simple compile tests
7550 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7551
7552 # Code to be used in simple link tests
7553 lt_simple_link_test_code="$lt_simple_compile_test_code"
7554
7555 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7556 _LT_TAG_COMPILER
7557
7558 # save warnings/boilerplate of simple test code
7559 _LT_COMPILER_BOILERPLATE
7560 _LT_LINKER_BOILERPLATE
7561
7562 # Allow CC to be a program name with arguments.
7563 lt_save_CC="$CC"
7564 lt_save_GCC=$GCC
7565 GCC=
7566 CC=${RC-"windres"}
7567 compiler=$CC
7568 _LT_TAGVAR(compiler, $1)=$CC
7569 _LT_CC_BASENAME([$compiler])
7570 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7571
7572 if test -n "$compiler"; then
7573   :
7574   _LT_CONFIG($1)
7575 fi
7576
7577 GCC=$lt_save_GCC
7578 AC_LANG_RESTORE
7579 CC="$lt_save_CC"
7580 ])# _LT_LANG_RC_CONFIG
7581
7582
7583 # LT_PROG_GCJ
7584 # -----------
7585 AC_DEFUN([LT_PROG_GCJ],
7586 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7587   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7588     [AC_CHECK_TOOL(GCJ, gcj,)
7589       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7590       AC_SUBST(GCJFLAGS)])])[]dnl
7591 ])
7592
7593 # Old name:
7594 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7595 dnl aclocal-1.4 backwards compatibility:
7596 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7597
7598
7599 # LT_PROG_RC
7600 # ----------
7601 AC_DEFUN([LT_PROG_RC],
7602 [AC_CHECK_TOOL(RC, windres,)
7603 ])
7604
7605 # Old name:
7606 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7607 dnl aclocal-1.4 backwards compatibility:
7608 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7609
7610
7611 # _LT_DECL_EGREP
7612 # --------------
7613 # If we don't have a new enough Autoconf to choose the best grep
7614 # available, choose the one first in the user's PATH.
7615 m4_defun([_LT_DECL_EGREP],
7616 [AC_REQUIRE([AC_PROG_EGREP])dnl
7617 AC_REQUIRE([AC_PROG_FGREP])dnl
7618 test -z "$GREP" && GREP=grep
7619 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7620 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7621 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7622 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7623 AC_SUBST([GREP])
7624 ])
7625
7626
7627 # _LT_DECL_OBJDUMP
7628 # --------------
7629 # If we don't have a new enough Autoconf to choose the best objdump
7630 # available, choose the one first in the user's PATH.
7631 m4_defun([_LT_DECL_OBJDUMP],
7632 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7633 test -z "$OBJDUMP" && OBJDUMP=objdump
7634 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7635 AC_SUBST([OBJDUMP])
7636 ])
7637
7638
7639 # _LT_DECL_SED
7640 # ------------
7641 # Check for a fully-functional sed program, that truncates
7642 # as few characters as possible.  Prefer GNU sed if found.
7643 m4_defun([_LT_DECL_SED],
7644 [AC_PROG_SED
7645 test -z "$SED" && SED=sed
7646 Xsed="$SED -e 1s/^X//"
7647 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7648 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7649     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7650 ])# _LT_DECL_SED
7651
7652 m4_ifndef([AC_PROG_SED], [
7653 # NOTE: This macro has been submitted for inclusion into   #
7654 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7655 #  a released version of Autoconf we should remove this    #
7656 #  macro and use it instead.                               #
7657
7658 m4_defun([AC_PROG_SED],
7659 [AC_MSG_CHECKING([for a sed that does not truncate output])
7660 AC_CACHE_VAL(lt_cv_path_SED,
7661 [# Loop through the user's path and test for sed and gsed.
7662 # Then use that list of sed's as ones to test for truncation.
7663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7664 for as_dir in $PATH
7665 do
7666   IFS=$as_save_IFS
7667   test -z "$as_dir" && as_dir=.
7668   for lt_ac_prog in sed gsed; do
7669     for ac_exec_ext in '' $ac_executable_extensions; do
7670       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7671         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7672       fi
7673     done
7674   done
7675 done
7676 IFS=$as_save_IFS
7677 lt_ac_max=0
7678 lt_ac_count=0
7679 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7680 # along with /bin/sed that truncates output.
7681 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7682   test ! -f $lt_ac_sed && continue
7683   cat /dev/null > conftest.in
7684   lt_ac_count=0
7685   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7686   # Check for GNU sed and select it if it is found.
7687   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7688     lt_cv_path_SED=$lt_ac_sed
7689     break
7690   fi
7691   while true; do
7692     cat conftest.in conftest.in >conftest.tmp
7693     mv conftest.tmp conftest.in
7694     cp conftest.in conftest.nl
7695     echo >>conftest.nl
7696     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7697     cmp -s conftest.out conftest.nl || break
7698     # 10000 chars as input seems more than enough
7699     test $lt_ac_count -gt 10 && break
7700     lt_ac_count=`expr $lt_ac_count + 1`
7701     if test $lt_ac_count -gt $lt_ac_max; then
7702       lt_ac_max=$lt_ac_count
7703       lt_cv_path_SED=$lt_ac_sed
7704     fi
7705   done
7706 done
7707 ])
7708 SED=$lt_cv_path_SED
7709 AC_SUBST([SED])
7710 AC_MSG_RESULT([$SED])
7711 ])#AC_PROG_SED
7712 ])#m4_ifndef
7713
7714 # Old name:
7715 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7716 dnl aclocal-1.4 backwards compatibility:
7717 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7718
7719
7720 # _LT_CHECK_SHELL_FEATURES
7721 # ------------------------
7722 # Find out whether the shell is Bourne or XSI compatible,
7723 # or has some other useful features.
7724 m4_defun([_LT_CHECK_SHELL_FEATURES],
7725 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7726 # Try some XSI features
7727 xsi_shell=no
7728 ( _lt_dummy="a/b/c"
7729   test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7730       = c,a/b,, \
7731     && eval 'test $(( 1 + 1 )) -eq 2 \
7732     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7733   && xsi_shell=yes
7734 AC_MSG_RESULT([$xsi_shell])
7735 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7736
7737 AC_MSG_CHECKING([whether the shell understands "+="])
7738 lt_shell_append=no
7739 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7740     >/dev/null 2>&1 \
7741   && lt_shell_append=yes
7742 AC_MSG_RESULT([$lt_shell_append])
7743 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7744
7745 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7746   lt_unset=unset
7747 else
7748   lt_unset=false
7749 fi
7750 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7751
7752 # test EBCDIC or ASCII
7753 case `echo X|tr X '\101'` in
7754  A) # ASCII based system
7755     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7756   lt_SP2NL='tr \040 \012'
7757   lt_NL2SP='tr \015\012 \040\040'
7758   ;;
7759  *) # EBCDIC based system
7760   lt_SP2NL='tr \100 \n'
7761   lt_NL2SP='tr \r\n \100\100'
7762   ;;
7763 esac
7764 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7765 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7766 ])# _LT_CHECK_SHELL_FEATURES
7767
7768
7769 # _LT_PROG_XSI_SHELLFNS
7770 # ---------------------
7771 # Bourne and XSI compatible variants of some useful shell functions.
7772 m4_defun([_LT_PROG_XSI_SHELLFNS],
7773 [case $xsi_shell in
7774   yes)
7775     cat << \_LT_EOF >> "$cfgfile"
7776
7777 # func_dirname file append nondir_replacement
7778 # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7779 # otherwise set result to NONDIR_REPLACEMENT.
7780 func_dirname ()
7781 {
7782   case ${1} in
7783     */*) func_dirname_result="${1%/*}${2}" ;;
7784     *  ) func_dirname_result="${3}" ;;
7785   esac
7786 }
7787
7788 # func_basename file
7789 func_basename ()
7790 {
7791   func_basename_result="${1##*/}"
7792 }
7793
7794 # func_dirname_and_basename file append nondir_replacement
7795 # perform func_basename and func_dirname in a single function
7796 # call:
7797 #   dirname:  Compute the dirname of FILE.  If nonempty,
7798 #             add APPEND to the result, otherwise set result
7799 #             to NONDIR_REPLACEMENT.
7800 #             value returned in "$func_dirname_result"
7801 #   basename: Compute filename of FILE.
7802 #             value retuned in "$func_basename_result"
7803 # Implementation must be kept synchronized with func_dirname
7804 # and func_basename. For efficiency, we do not delegate to
7805 # those functions but instead duplicate the functionality here.
7806 func_dirname_and_basename ()
7807 {
7808   case ${1} in
7809     */*) func_dirname_result="${1%/*}${2}" ;;
7810     *  ) func_dirname_result="${3}" ;;
7811   esac
7812   func_basename_result="${1##*/}"
7813 }
7814
7815 # func_stripname prefix suffix name
7816 # strip PREFIX and SUFFIX off of NAME.
7817 # PREFIX and SUFFIX must not contain globbing or regex special
7818 # characters, hashes, percent signs, but SUFFIX may contain a leading
7819 # dot (in which case that matches only a dot).
7820 func_stripname ()
7821 {
7822   # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7823   # positional parameters, so assign one to ordinary parameter first.
7824   func_stripname_result=${3}
7825   func_stripname_result=${func_stripname_result#"${1}"}
7826   func_stripname_result=${func_stripname_result%"${2}"}
7827 }
7828
7829 # func_opt_split
7830 func_opt_split ()
7831 {
7832   func_opt_split_opt=${1%%=*}
7833   func_opt_split_arg=${1#*=}
7834 }
7835
7836 # func_lo2o object
7837 func_lo2o ()
7838 {
7839   case ${1} in
7840     *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7841     *)    func_lo2o_result=${1} ;;
7842   esac
7843 }
7844
7845 # func_xform libobj-or-source
7846 func_xform ()
7847 {
7848   func_xform_result=${1%.*}.lo
7849 }
7850
7851 # func_arith arithmetic-term...
7852 func_arith ()
7853 {
7854   func_arith_result=$(( $[*] ))
7855 }
7856
7857 # func_len string
7858 # STRING may not start with a hyphen.
7859 func_len ()
7860 {
7861   func_len_result=${#1}
7862 }
7863
7864 _LT_EOF
7865     ;;
7866   *) # Bourne compatible functions.
7867     cat << \_LT_EOF >> "$cfgfile"
7868
7869 # func_dirname file append nondir_replacement
7870 # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7871 # otherwise set result to NONDIR_REPLACEMENT.
7872 func_dirname ()
7873 {
7874   # Extract subdirectory from the argument.
7875   func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7876   if test "X$func_dirname_result" = "X${1}"; then
7877     func_dirname_result="${3}"
7878   else
7879     func_dirname_result="$func_dirname_result${2}"
7880   fi
7881 }
7882
7883 # func_basename file
7884 func_basename ()
7885 {
7886   func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7887 }
7888
7889 dnl func_dirname_and_basename
7890 dnl A portable version of this function is already defined in general.m4sh
7891 dnl so there is no need for it here.
7892
7893 # func_stripname prefix suffix name
7894 # strip PREFIX and SUFFIX off of NAME.
7895 # PREFIX and SUFFIX must not contain globbing or regex special
7896 # characters, hashes, percent signs, but SUFFIX may contain a leading
7897 # dot (in which case that matches only a dot).
7898 # func_strip_suffix prefix name
7899 func_stripname ()
7900 {
7901   case ${2} in
7902     .*) func_stripname_result=`$ECHO "X${3}" \
7903            | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7904     *)  func_stripname_result=`$ECHO "X${3}" \
7905            | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7906   esac
7907 }
7908
7909 # sed scripts:
7910 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7911 my_sed_long_arg='1s/^-[[^=]]*=//'
7912
7913 # func_opt_split
7914 func_opt_split ()
7915 {
7916   func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7917   func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7918 }
7919
7920 # func_lo2o object
7921 func_lo2o ()
7922 {
7923   func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7924 }
7925
7926 # func_xform libobj-or-source
7927 func_xform ()
7928 {
7929   func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7930 }
7931
7932 # func_arith arithmetic-term...
7933 func_arith ()
7934 {
7935   func_arith_result=`expr "$[@]"`
7936 }
7937
7938 # func_len string
7939 # STRING may not start with a hyphen.
7940 func_len ()
7941 {
7942   func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7943 }
7944
7945 _LT_EOF
7946 esac
7947
7948 case $lt_shell_append in
7949   yes)
7950     cat << \_LT_EOF >> "$cfgfile"
7951
7952 # func_append var value
7953 # Append VALUE to the end of shell variable VAR.
7954 func_append ()
7955 {
7956   eval "$[1]+=\$[2]"
7957 }
7958 _LT_EOF
7959     ;;
7960   *)
7961     cat << \_LT_EOF >> "$cfgfile"
7962
7963 # func_append var value
7964 # Append VALUE to the end of shell variable VAR.
7965 func_append ()
7966 {
7967   eval "$[1]=\$$[1]\$[2]"
7968 }
7969
7970 _LT_EOF
7971     ;;
7972   esac
7973 ])
7974
7975 # Helper functions for option handling.                    -*- Autoconf -*-
7976 #
7977 #   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7978 #   Written by Gary V. Vaughan, 2004
7979 #
7980 # This file is free software; the Free Software Foundation gives
7981 # unlimited permission to copy and/or distribute it, with or without
7982 # modifications, as long as this notice is preserved.
7983
7984 # serial 6 ltoptions.m4
7985
7986 # This is to help aclocal find these macros, as it can't see m4_define.
7987 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7988
7989
7990 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
7991 # ------------------------------------------
7992 m4_define([_LT_MANGLE_OPTION],
7993 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
7994
7995
7996 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
7997 # ---------------------------------------
7998 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
7999 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8000 # saved as a flag.
8001 m4_define([_LT_SET_OPTION],
8002 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8003 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8004         _LT_MANGLE_DEFUN([$1], [$2]),
8005     [m4_warning([Unknown $1 option `$2'])])[]dnl
8006 ])
8007
8008
8009 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8010 # ------------------------------------------------------------
8011 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8012 m4_define([_LT_IF_OPTION],
8013 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8014
8015
8016 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8017 # -------------------------------------------------------
8018 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8019 # are set.
8020 m4_define([_LT_UNLESS_OPTIONS],
8021 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8022             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8023                       [m4_define([$0_found])])])[]dnl
8024 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8025 ])[]dnl
8026 ])
8027
8028
8029 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8030 # ----------------------------------------
8031 # OPTION-LIST is a space-separated list of Libtool options associated
8032 # with MACRO-NAME.  If any OPTION has a matching handler declared with
8033 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8034 # the unknown option and exit.
8035 m4_defun([_LT_SET_OPTIONS],
8036 [# Set options
8037 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8038     [_LT_SET_OPTION([$1], _LT_Option)])
8039
8040 m4_if([$1],[LT_INIT],[
8041   dnl
8042   dnl Simply set some default values (i.e off) if boolean options were not
8043   dnl specified:
8044   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8045   ])
8046   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8047   ])
8048   dnl
8049   dnl If no reference was made to various pairs of opposing options, then
8050   dnl we run the default mode handler for the pair.  For example, if neither
8051   dnl `shared' nor `disable-shared' was passed, we enable building of shared
8052   dnl archives by default:
8053   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8054   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8055   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8056   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8057                    [_LT_ENABLE_FAST_INSTALL])
8058   ])
8059 ])# _LT_SET_OPTIONS
8060
8061
8062
8063 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8064 # -----------------------------------------
8065 m4_define([_LT_MANGLE_DEFUN],
8066 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8067
8068
8069 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8070 # -----------------------------------------------
8071 m4_define([LT_OPTION_DEFINE],
8072 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8073 ])# LT_OPTION_DEFINE
8074
8075
8076 # dlopen
8077 # ------
8078 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8079 ])
8080
8081 AU_DEFUN([AC_LIBTOOL_DLOPEN],
8082 [_LT_SET_OPTION([LT_INIT], [dlopen])
8083 AC_DIAGNOSE([obsolete],
8084 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8085 put the `dlopen' option into LT_INIT's first parameter.])
8086 ])
8087
8088 dnl aclocal-1.4 backwards compatibility:
8089 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8090
8091
8092 # win32-dll
8093 # ---------
8094 # Declare package support for building win32 dll's.
8095 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8096 [enable_win32_dll=yes
8097
8098 case $host in
8099 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
8100   AC_CHECK_TOOL(AS, as, false)
8101   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8102   AC_CHECK_TOOL(OBJDUMP, objdump, false)
8103   ;;
8104 esac
8105
8106 test -z "$AS" && AS=as
8107 _LT_DECL([], [AS],      [0], [Assembler program])dnl
8108
8109 test -z "$DLLTOOL" && DLLTOOL=dlltool
8110 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
8111
8112 test -z "$OBJDUMP" && OBJDUMP=objdump
8113 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
8114 ])# win32-dll
8115
8116 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8117 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8118 _LT_SET_OPTION([LT_INIT], [win32-dll])
8119 AC_DIAGNOSE([obsolete],
8120 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8121 put the `win32-dll' option into LT_INIT's first parameter.])
8122 ])
8123
8124 dnl aclocal-1.4 backwards compatibility:
8125 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8126
8127
8128 # _LT_ENABLE_SHARED([DEFAULT])
8129 # ----------------------------
8130 # implement the --enable-shared flag, and supports the `shared' and
8131 # `disable-shared' LT_INIT options.
8132 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8133 m4_define([_LT_ENABLE_SHARED],
8134 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8135 AC_ARG_ENABLE([shared],
8136     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8137         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8138     [p=${PACKAGE-default}
8139     case $enableval in
8140     yes) enable_shared=yes ;;
8141     no) enable_shared=no ;;
8142     *)
8143       enable_shared=no
8144       # Look at the argument we got.  We use all the common list separators.
8145       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8146       for pkg in $enableval; do
8147         IFS="$lt_save_ifs"
8148         if test "X$pkg" = "X$p"; then
8149           enable_shared=yes
8150         fi
8151       done
8152       IFS="$lt_save_ifs"
8153       ;;
8154     esac],
8155     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8156
8157     _LT_DECL([build_libtool_libs], [enable_shared], [0],
8158         [Whether or not to build shared libraries])
8159 ])# _LT_ENABLE_SHARED
8160
8161 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8162 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8163
8164 # Old names:
8165 AC_DEFUN([AC_ENABLE_SHARED],
8166 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8167 ])
8168
8169 AC_DEFUN([AC_DISABLE_SHARED],
8170 [_LT_SET_OPTION([LT_INIT], [disable-shared])
8171 ])
8172
8173 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8174 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8175
8176 dnl aclocal-1.4 backwards compatibility:
8177 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8178 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8179
8180
8181
8182 # _LT_ENABLE_STATIC([DEFAULT])
8183 # ----------------------------
8184 # implement the --enable-static flag, and support the `static' and
8185 # `disable-static' LT_INIT options.
8186 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8187 m4_define([_LT_ENABLE_STATIC],
8188 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8189 AC_ARG_ENABLE([static],
8190     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8191         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8192     [p=${PACKAGE-default}
8193     case $enableval in
8194     yes) enable_static=yes ;;
8195     no) enable_static=no ;;
8196     *)
8197      enable_static=no
8198       # Look at the argument we got.  We use all the common list separators.
8199       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8200       for pkg in $enableval; do
8201         IFS="$lt_save_ifs"
8202         if test "X$pkg" = "X$p"; then
8203           enable_static=yes
8204         fi
8205       done
8206       IFS="$lt_save_ifs"
8207       ;;
8208     esac],
8209     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8210
8211     _LT_DECL([build_old_libs], [enable_static], [0],
8212         [Whether or not to build static libraries])
8213 ])# _LT_ENABLE_STATIC
8214
8215 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8216 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8217
8218 # Old names:
8219 AC_DEFUN([AC_ENABLE_STATIC],
8220 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8221 ])
8222
8223 AC_DEFUN([AC_DISABLE_STATIC],
8224 [_LT_SET_OPTION([LT_INIT], [disable-static])
8225 ])
8226
8227 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8228 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8229
8230 dnl aclocal-1.4 backwards compatibility:
8231 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8232 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8233
8234
8235
8236 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
8237 # ----------------------------------
8238 # implement the --enable-fast-install flag, and support the `fast-install'
8239 # and `disable-fast-install' LT_INIT options.
8240 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8241 m4_define([_LT_ENABLE_FAST_INSTALL],
8242 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8243 AC_ARG_ENABLE([fast-install],
8244     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8245     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8246     [p=${PACKAGE-default}
8247     case $enableval in
8248     yes) enable_fast_install=yes ;;
8249     no) enable_fast_install=no ;;
8250     *)
8251       enable_fast_install=no
8252       # Look at the argument we got.  We use all the common list separators.
8253       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8254       for pkg in $enableval; do
8255         IFS="$lt_save_ifs"
8256         if test "X$pkg" = "X$p"; then
8257           enable_fast_install=yes
8258         fi
8259       done
8260       IFS="$lt_save_ifs"
8261       ;;
8262     esac],
8263     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8264
8265 _LT_DECL([fast_install], [enable_fast_install], [0],
8266          [Whether or not to optimize for fast installation])dnl
8267 ])# _LT_ENABLE_FAST_INSTALL
8268
8269 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8270 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8271
8272 # Old names:
8273 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8274 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8275 AC_DIAGNOSE([obsolete],
8276 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
8277 the `fast-install' option into LT_INIT's first parameter.])
8278 ])
8279
8280 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8281 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8282 AC_DIAGNOSE([obsolete],
8283 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
8284 the `disable-fast-install' option into LT_INIT's first parameter.])
8285 ])
8286
8287 dnl aclocal-1.4 backwards compatibility:
8288 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8289 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8290
8291
8292 # _LT_WITH_PIC([MODE])
8293 # --------------------
8294 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
8295 # LT_INIT options.
8296 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
8297 m4_define([_LT_WITH_PIC],
8298 [AC_ARG_WITH([pic],
8299     [AS_HELP_STRING([--with-pic],
8300         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8301     [pic_mode="$withval"],
8302     [pic_mode=default])
8303
8304 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8305
8306 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8307 ])# _LT_WITH_PIC
8308
8309 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8310 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8311
8312 # Old name:
8313 AU_DEFUN([AC_LIBTOOL_PICMODE],
8314 [_LT_SET_OPTION([LT_INIT], [pic-only])
8315 AC_DIAGNOSE([obsolete],
8316 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8317 put the `pic-only' option into LT_INIT's first parameter.])
8318 ])
8319
8320 dnl aclocal-1.4 backwards compatibility:
8321 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8322
8323
8324 m4_define([_LTDL_MODE], [])
8325 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8326                  [m4_define([_LTDL_MODE], [nonrecursive])])
8327 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8328                  [m4_define([_LTDL_MODE], [recursive])])
8329 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8330                  [m4_define([_LTDL_MODE], [subproject])])
8331
8332 m4_define([_LTDL_TYPE], [])
8333 LT_OPTION_DEFINE([LTDL_INIT], [installable],
8334                  [m4_define([_LTDL_TYPE], [installable])])
8335 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8336                  [m4_define([_LTDL_TYPE], [convenience])])
8337
8338 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
8339 #
8340 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8341 # Written by Gary V. Vaughan, 2004
8342 #
8343 # This file is free software; the Free Software Foundation gives
8344 # unlimited permission to copy and/or distribute it, with or without
8345 # modifications, as long as this notice is preserved.
8346
8347 # serial 6 ltsugar.m4
8348
8349 # This is to help aclocal find these macros, as it can't see m4_define.
8350 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8351
8352
8353 # lt_join(SEP, ARG1, [ARG2...])
8354 # -----------------------------
8355 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8356 # associated separator.
8357 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8358 # versions in m4sugar had bugs.
8359 m4_define([lt_join],
8360 [m4_if([$#], [1], [],
8361        [$#], [2], [[$2]],
8362        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8363 m4_define([_lt_join],
8364 [m4_if([$#$2], [2], [],
8365        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8366
8367
8368 # lt_car(LIST)
8369 # lt_cdr(LIST)
8370 # ------------
8371 # Manipulate m4 lists.
8372 # These macros are necessary as long as will still need to support
8373 # Autoconf-2.59 which quotes differently.
8374 m4_define([lt_car], [[$1]])
8375 m4_define([lt_cdr],
8376 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8377        [$#], 1, [],
8378        [m4_dquote(m4_shift($@))])])
8379 m4_define([lt_unquote], $1)
8380
8381
8382 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
8383 # ------------------------------------------
8384 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8385 # Note that neither SEPARATOR nor STRING are expanded; they are appended
8386 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8387 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
8388 # than defined and empty).
8389 #
8390 # This macro is needed until we can rely on Autoconf 2.62, since earlier
8391 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8392 m4_define([lt_append],
8393 [m4_define([$1],
8394            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8395
8396
8397
8398 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8399 # ----------------------------------------------------------
8400 # Produce a SEP delimited list of all paired combinations of elements of
8401 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
8402 # has the form PREFIXmINFIXSUFFIXn.
8403 # Needed until we can rely on m4_combine added in Autoconf 2.62.
8404 m4_define([lt_combine],
8405 [m4_if(m4_eval([$# > 3]), [1],
8406        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8407 [[m4_foreach([_Lt_prefix], [$2],
8408              [m4_foreach([_Lt_suffix],
8409                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8410         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8411
8412
8413 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8414 # -----------------------------------------------------------------------
8415 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8416 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8417 m4_define([lt_if_append_uniq],
8418 [m4_ifdef([$1],
8419           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8420                  [lt_append([$1], [$2], [$3])$4],
8421                  [$5])],
8422           [lt_append([$1], [$2], [$3])$4])])
8423
8424
8425 # lt_dict_add(DICT, KEY, VALUE)
8426 # -----------------------------
8427 m4_define([lt_dict_add],
8428 [m4_define([$1($2)], [$3])])
8429
8430
8431 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8432 # --------------------------------------------
8433 m4_define([lt_dict_add_subkey],
8434 [m4_define([$1($2:$3)], [$4])])
8435
8436
8437 # lt_dict_fetch(DICT, KEY, [SUBKEY])
8438 # ----------------------------------
8439 m4_define([lt_dict_fetch],
8440 [m4_ifval([$3],
8441         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8442     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8443
8444
8445 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8446 # -----------------------------------------------------------------
8447 m4_define([lt_if_dict_fetch],
8448 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8449         [$5],
8450     [$6])])
8451
8452
8453 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8454 # --------------------------------------------------------------
8455 m4_define([lt_dict_filter],
8456 [m4_if([$5], [], [],
8457   [lt_join(m4_quote(m4_default([$4], [[, ]])),
8458            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8459                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8460 ])
8461
8462 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
8463 #
8464 #   Copyright (C) 2004 Free Software Foundation, Inc.
8465 #   Written by Scott James Remnant, 2004
8466 #
8467 # This file is free software; the Free Software Foundation gives
8468 # unlimited permission to copy and/or distribute it, with or without
8469 # modifications, as long as this notice is preserved.
8470
8471 # Generated from ltversion.in.
8472
8473 # serial 3012 ltversion.m4
8474 # This file is part of GNU Libtool
8475
8476 m4_define([LT_PACKAGE_VERSION], [2.2.6])
8477 m4_define([LT_PACKAGE_REVISION], [1.3012])
8478
8479 AC_DEFUN([LTVERSION_VERSION],
8480 [macro_version='2.2.6'
8481 macro_revision='1.3012'
8482 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8483 _LT_DECL(, macro_revision, 0)
8484 ])
8485
8486 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
8487 #
8488 #   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
8489 #   Written by Scott James Remnant, 2004.
8490 #
8491 # This file is free software; the Free Software Foundation gives
8492 # unlimited permission to copy and/or distribute it, with or without
8493 # modifications, as long as this notice is preserved.
8494
8495 # serial 4 lt~obsolete.m4
8496
8497 # These exist entirely to fool aclocal when bootstrapping libtool.
8498 #
8499 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8500 # which have later been changed to m4_define as they aren't part of the
8501 # exported API, or moved to Autoconf or Automake where they belong.
8502 #
8503 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
8504 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8505 # using a macro with the same name in our local m4/libtool.m4 it'll
8506 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8507 # and doesn't know about Autoconf macros at all.)
8508 #
8509 # So we provide this file, which has a silly filename so it's always
8510 # included after everything else.  This provides aclocal with the
8511 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8512 # because those macros already exist, or will be overwritten later.
8513 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
8514 #
8515 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8516 # Yes, that means every name once taken will need to remain here until
8517 # we give up compatibility with versions before 1.7, at which point
8518 # we need to keep only those names which we still refer to.
8519
8520 # This is to help aclocal find these macros, as it can't see m4_define.
8521 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8522
8523 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8524 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
8525 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8526 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
8527 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8528 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
8529 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
8530 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8531 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
8532 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
8533 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
8534 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8535 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8536 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8537 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8538 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8539 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
8540 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8541 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8542 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
8543 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
8544 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8545 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8546 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8547 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8548 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8549 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8550 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8551 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
8552 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
8553 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
8554 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8555 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8556 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
8557 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
8558 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8559 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8560 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
8561 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8562 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
8563 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
8564 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
8565 m4_ifndef([AC_LIBTOOL_RC],              [AC_DEFUN([AC_LIBTOOL_RC])])
8566 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8567 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8568 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8569 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8570 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8571 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8572 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8573 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8574 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8575 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8576 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
8577 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8578
8579 # nls.m4 serial 3 (gettext-0.15)
8580 dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
8581 dnl This file is free software; the Free Software Foundation
8582 dnl gives unlimited permission to copy and/or distribute it,
8583 dnl with or without modifications, as long as this notice is preserved.
8584 dnl
8585 dnl This file can can be used in projects which are not available under
8586 dnl the GNU General Public License or the GNU Library General Public
8587 dnl License but which still want to provide support for the GNU gettext
8588 dnl functionality.
8589 dnl Please note that the actual code of the GNU gettext library is covered
8590 dnl by the GNU Library General Public License, and the rest of the GNU
8591 dnl gettext package package is covered by the GNU General Public License.
8592 dnl They are *not* in the public domain.
8593
8594 dnl Authors:
8595 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
8596 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
8597
8598 AC_PREREQ(2.50)
8599
8600 AC_DEFUN([AM_NLS],
8601 [
8602   AC_MSG_CHECKING([whether NLS is requested])
8603   dnl Default is enabled NLS
8604   AC_ARG_ENABLE(nls,
8605     [  --disable-nls           do not use Native Language Support],
8606     USE_NLS=$enableval, USE_NLS=yes)
8607   AC_MSG_RESULT($USE_NLS)
8608   AC_SUBST(USE_NLS)
8609 ])
8610
8611 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
8612
8613 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
8614 #
8615 # This program is free software; you can redistribute it and/or modify
8616 # it under the terms of the GNU General Public License as published by
8617 # the Free Software Foundation; either version 2 of the License, or
8618 # (at your option) any later version.
8619 #
8620 # This program is distributed in the hope that it will be useful, but
8621 # WITHOUT ANY WARRANTY; without even the implied warranty of
8622 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8623 # General Public License for more details.
8624 #
8625 # You should have received a copy of the GNU General Public License
8626 # along with this program; if not, write to the Free Software
8627 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8628 #
8629 # As a special exception to the GNU General Public License, if you
8630 # distribute this file as part of a program that contains a
8631 # configuration script generated by Autoconf, you may include it under
8632 # the same distribution terms that you use for the rest of that program.
8633
8634 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
8635 # ----------------------------------
8636 AC_DEFUN([PKG_PROG_PKG_CONFIG],
8637 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8638 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8639 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8640 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8641         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8642 fi
8643 if test -n "$PKG_CONFIG"; then
8644         _pkg_min_version=m4_default([$1], [0.9.0])
8645         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8646         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8647                 AC_MSG_RESULT([yes])
8648         else
8649                 AC_MSG_RESULT([no])
8650                 PKG_CONFIG=""
8651         fi
8652                 
8653 fi[]dnl
8654 ])# PKG_PROG_PKG_CONFIG
8655
8656 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8657 #
8658 # Check to see whether a particular set of modules exists.  Similar
8659 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
8660 #
8661 #
8662 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
8663 # this or PKG_CHECK_MODULES is called, or make sure to call
8664 # PKG_CHECK_EXISTS manually
8665 # --------------------------------------------------------------
8666 AC_DEFUN([PKG_CHECK_EXISTS],
8667 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8668 if test -n "$PKG_CONFIG" && \
8669     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8670   m4_ifval([$2], [$2], [:])
8671 m4_ifvaln([$3], [else
8672   $3])dnl
8673 fi])
8674
8675
8676 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8677 # ---------------------------------------------
8678 m4_define([_PKG_CONFIG],
8679 [if test -n "$$1"; then
8680     pkg_cv_[]$1="$$1"
8681  elif test -n "$PKG_CONFIG"; then
8682     PKG_CHECK_EXISTS([$3],
8683                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8684                      [pkg_failed=yes])
8685  else
8686     pkg_failed=untried
8687 fi[]dnl
8688 ])# _PKG_CONFIG
8689
8690 # _PKG_SHORT_ERRORS_SUPPORTED
8691 # -----------------------------
8692 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8693 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8694 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8695         _pkg_short_errors_supported=yes
8696 else
8697         _pkg_short_errors_supported=no
8698 fi[]dnl
8699 ])# _PKG_SHORT_ERRORS_SUPPORTED
8700
8701
8702 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8703 # [ACTION-IF-NOT-FOUND])
8704 #
8705 #
8706 # Note that if there is a possibility the first call to
8707 # PKG_CHECK_MODULES might not happen, you should be sure to include an
8708 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8709 #
8710 #
8711 # --------------------------------------------------------------
8712 AC_DEFUN([PKG_CHECK_MODULES],
8713 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8714 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8715 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8716
8717 pkg_failed=no
8718 AC_MSG_CHECKING([for $1])
8719
8720 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8721 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
8722
8723 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8724 and $1[]_LIBS to avoid the need to call pkg-config.
8725 See the pkg-config man page for more details.])
8726
8727 if test $pkg_failed = yes; then
8728         _PKG_SHORT_ERRORS_SUPPORTED
8729         if test $_pkg_short_errors_supported = yes; then
8730                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8731         else 
8732                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8733         fi
8734         # Put the nasty error message in config.log where it belongs
8735         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8736
8737         ifelse([$4], , [AC_MSG_ERROR(dnl
8738 [Package requirements ($2) were not met:
8739
8740 $$1_PKG_ERRORS
8741
8742 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8743 installed software in a non-standard prefix.
8744
8745 _PKG_TEXT
8746 ])],
8747                 [AC_MSG_RESULT([no])
8748                 $4])
8749 elif test $pkg_failed = untried; then
8750         ifelse([$4], , [AC_MSG_FAILURE(dnl
8751 [The pkg-config script could not be found or is too old.  Make sure it
8752 is in your PATH or set the PKG_CONFIG environment variable to the full
8753 path to pkg-config.
8754
8755 _PKG_TEXT
8756
8757 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8758                 [$4])
8759 else
8760         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8761         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8762         AC_MSG_RESULT([yes])
8763         ifelse([$3], , :, [$3])
8764 fi[]dnl
8765 ])# PKG_CHECK_MODULES
8766
8767 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
8768 #
8769 # This file is free software; the Free Software Foundation
8770 # gives unlimited permission to copy and/or distribute it,
8771 # with or without modifications, as long as this notice is preserved.
8772
8773 # AM_AUTOMAKE_VERSION(VERSION)
8774 # ----------------------------
8775 # Automake X.Y traces this macro to ensure aclocal.m4 has been
8776 # generated from the m4 files accompanying Automake X.Y.
8777 # (This private macro should not be called outside this file.)
8778 AC_DEFUN([AM_AUTOMAKE_VERSION],
8779 [am__api_version='1.10'
8780 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8781 dnl require some minimum version.  Point them to the right macro.
8782 m4_if([$1], [1.10.2], [],
8783       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8784 ])
8785
8786 # _AM_AUTOCONF_VERSION(VERSION)
8787 # -----------------------------
8788 # aclocal traces this macro to find the Autoconf version.
8789 # This is a private macro too.  Using m4_define simplifies
8790 # the logic in aclocal, which can simply ignore this definition.
8791 m4_define([_AM_AUTOCONF_VERSION], [])
8792
8793 # AM_SET_CURRENT_AUTOMAKE_VERSION
8794 # -------------------------------
8795 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8796 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8797 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8798 [AM_AUTOMAKE_VERSION([1.10.2])dnl
8799 m4_ifndef([AC_AUTOCONF_VERSION],
8800   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8801 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8802
8803 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
8804
8805 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8806 #
8807 # This file is free software; the Free Software Foundation
8808 # gives unlimited permission to copy and/or distribute it,
8809 # with or without modifications, as long as this notice is preserved.
8810
8811 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8812 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
8813 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8814 #
8815 # Of course, Automake must honor this variable whenever it calls a
8816 # tool from the auxiliary directory.  The problem is that $srcdir (and
8817 # therefore $ac_aux_dir as well) can be either absolute or relative,
8818 # depending on how configure is run.  This is pretty annoying, since
8819 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
8820 # source directory, any form will work fine, but in subdirectories a
8821 # relative path needs to be adjusted first.
8822 #
8823 # $ac_aux_dir/missing
8824 #    fails when called from a subdirectory if $ac_aux_dir is relative
8825 # $top_srcdir/$ac_aux_dir/missing
8826 #    fails if $ac_aux_dir is absolute,
8827 #    fails when called from a subdirectory in a VPATH build with
8828 #          a relative $ac_aux_dir
8829 #
8830 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8831 # are both prefixed by $srcdir.  In an in-source build this is usually
8832 # harmless because $srcdir is `.', but things will broke when you
8833 # start a VPATH build or use an absolute $srcdir.
8834 #
8835 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8836 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
8837 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8838 # and then we would define $MISSING as
8839 #   MISSING="\${SHELL} $am_aux_dir/missing"
8840 # This will work as long as MISSING is not called from configure, because
8841 # unfortunately $(top_srcdir) has no meaning in configure.
8842 # However there are other variables, like CC, which are often used in
8843 # configure, and could therefore not use this "fixed" $ac_aux_dir.
8844 #
8845 # Another solution, used here, is to always expand $ac_aux_dir to an
8846 # absolute PATH.  The drawback is that using absolute paths prevent a
8847 # configured tree to be moved without reconfiguration.
8848
8849 AC_DEFUN([AM_AUX_DIR_EXPAND],
8850 [dnl Rely on autoconf to set up CDPATH properly.
8851 AC_PREREQ([2.50])dnl
8852 # expand $ac_aux_dir to an absolute path
8853 am_aux_dir=`cd $ac_aux_dir && pwd`
8854 ])
8855
8856
8857 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
8858 # Free Software Foundation, Inc.
8859 #
8860 # This file is free software; the Free Software Foundation
8861 # gives unlimited permission to copy and/or distribute it,
8862 # with or without modifications, as long as this notice is preserved.
8863
8864 # serial 4
8865
8866 # This was merged into AC_PROG_CC in Autoconf.
8867
8868 AU_DEFUN([AM_PROG_CC_STDC],
8869 [AC_PROG_CC
8870 AC_DIAGNOSE([obsolete], [$0:
8871         your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
8872         `ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
8873         you adjust the code.  You can also remove the above call to
8874         AC_PROG_CC if you already called it elsewhere.])
8875 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
8876 ])
8877 AU_DEFUN([fp_PROG_CC_STDC])
8878
8879 # AM_CONDITIONAL                                            -*- Autoconf -*-
8880
8881 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
8882 # Free Software Foundation, Inc.
8883 #
8884 # This file is free software; the Free Software Foundation
8885 # gives unlimited permission to copy and/or distribute it,
8886 # with or without modifications, as long as this notice is preserved.
8887
8888 # serial 8
8889
8890 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
8891 # -------------------------------------
8892 # Define a conditional.
8893 AC_DEFUN([AM_CONDITIONAL],
8894 [AC_PREREQ(2.52)dnl
8895  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8896         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8897 AC_SUBST([$1_TRUE])dnl
8898 AC_SUBST([$1_FALSE])dnl
8899 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
8900 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
8901 if $2; then
8902   $1_TRUE=
8903   $1_FALSE='#'
8904 else
8905   $1_TRUE='#'
8906   $1_FALSE=
8907 fi
8908 AC_CONFIG_COMMANDS_PRE(
8909 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8910   AC_MSG_ERROR([[conditional "$1" was never defined.
8911 Usually this means the macro was only invoked conditionally.]])
8912 fi])])
8913
8914 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
8915 # Free Software Foundation, Inc.
8916 #
8917 # This file is free software; the Free Software Foundation
8918 # gives unlimited permission to copy and/or distribute it,
8919 # with or without modifications, as long as this notice is preserved.
8920
8921 # serial 9
8922
8923 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
8924 # written in clear, in which case automake, when reading aclocal.m4,
8925 # will think it sees a *use*, and therefore will trigger all it's
8926 # C support machinery.  Also note that it means that autoscan, seeing
8927 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
8928
8929
8930 # _AM_DEPENDENCIES(NAME)
8931 # ----------------------
8932 # See how the compiler implements dependency checking.
8933 # NAME is "CC", "CXX", "GCJ", or "OBJC".
8934 # We try a few techniques and use that to set a single cache variable.
8935 #
8936 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8937 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8938 # dependency, and given that the user is not expected to run this macro,
8939 # just rely on AC_PROG_CC.
8940 AC_DEFUN([_AM_DEPENDENCIES],
8941 [AC_REQUIRE([AM_SET_DEPDIR])dnl
8942 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
8943 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
8944 AC_REQUIRE([AM_DEP_TRACK])dnl
8945
8946 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
8947        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
8948        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8949        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
8950        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
8951                    [depcc="$$1"   am_compiler_list=])
8952
8953 AC_CACHE_CHECK([dependency style of $depcc],
8954                [am_cv_$1_dependencies_compiler_type],
8955 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8956   # We make a subdir and do the tests there.  Otherwise we can end up
8957   # making bogus files that we don't know about and never remove.  For
8958   # instance it was reported that on HP-UX the gcc test will end up
8959   # making a dummy file named `D' -- because `-MD' means `put the output
8960   # in D'.
8961   mkdir conftest.dir
8962   # Copy depcomp to subdir because otherwise we won't find it if we're
8963   # using a relative directory.
8964   cp "$am_depcomp" conftest.dir
8965   cd conftest.dir
8966   # We will build objects and dependencies in a subdirectory because
8967   # it helps to detect inapplicable dependency modes.  For instance
8968   # both Tru64's cc and ICC support -MD to output dependencies as a
8969   # side effect of compilation, but ICC will put the dependencies in
8970   # the current directory while Tru64 will put them in the object
8971   # directory.
8972   mkdir sub
8973
8974   am_cv_$1_dependencies_compiler_type=none
8975   if test "$am_compiler_list" = ""; then
8976      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
8977   fi
8978   for depmode in $am_compiler_list; do
8979     # Setup a source with many dependencies, because some compilers
8980     # like to wrap large dependency lists on column 80 (with \), and
8981     # we should not choose a depcomp mode which is confused by this.
8982     #
8983     # We need to recreate these files for each test, as the compiler may
8984     # overwrite some of them when testing with obscure command lines.
8985     # This happens at least with the AIX C compiler.
8986     : > sub/conftest.c
8987     for i in 1 2 3 4 5 6; do
8988       echo '#include "conftst'$i'.h"' >> sub/conftest.c
8989       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
8990       # Solaris 8's {/usr,}/bin/sh.
8991       touch sub/conftst$i.h
8992     done
8993     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8994
8995     case $depmode in
8996     nosideeffect)
8997       # after this tag, mechanisms are not by side-effect, so they'll
8998       # only be used when explicitly requested
8999       if test "x$enable_dependency_tracking" = xyes; then
9000         continue
9001       else
9002         break
9003       fi
9004       ;;
9005     none) break ;;
9006     esac
9007     # We check with `-c' and `-o' for the sake of the "dashmstdout"
9008     # mode.  It turns out that the SunPro C++ compiler does not properly
9009     # handle `-M -o', and we need to detect this.
9010     if depmode=$depmode \
9011        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
9012        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9013        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
9014          >/dev/null 2>conftest.err &&
9015        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9016        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9017        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
9018        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9019       # icc doesn't choke on unknown options, it will just issue warnings
9020       # or remarks (even with -Werror).  So we grep stderr for any message
9021       # that says an option was ignored or not supported.
9022       # When given -MP, icc 7.0 and 7.1 complain thusly:
9023       #   icc: Command line warning: ignoring option '-M'; no argument required
9024       # The diagnosis changed in icc 8.0:
9025       #   icc: Command line remark: option '-MP' not supported
9026       if (grep 'ignoring option' conftest.err ||
9027           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9028         am_cv_$1_dependencies_compiler_type=$depmode
9029         break
9030       fi
9031     fi
9032   done
9033
9034   cd ..
9035   rm -rf conftest.dir
9036 else
9037   am_cv_$1_dependencies_compiler_type=none
9038 fi
9039 ])
9040 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9041 AM_CONDITIONAL([am__fastdep$1], [
9042   test "x$enable_dependency_tracking" != xno \
9043   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9044 ])
9045
9046
9047 # AM_SET_DEPDIR
9048 # -------------
9049 # Choose a directory name for dependency files.
9050 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
9051 AC_DEFUN([AM_SET_DEPDIR],
9052 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9053 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9054 ])
9055
9056
9057 # AM_DEP_TRACK
9058 # ------------
9059 AC_DEFUN([AM_DEP_TRACK],
9060 [AC_ARG_ENABLE(dependency-tracking,
9061 [  --disable-dependency-tracking  speeds up one-time build
9062   --enable-dependency-tracking   do not reject slow dependency extractors])
9063 if test "x$enable_dependency_tracking" != xno; then
9064   am_depcomp="$ac_aux_dir/depcomp"
9065   AMDEPBACKSLASH='\'
9066 fi
9067 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9068 AC_SUBST([AMDEPBACKSLASH])dnl
9069 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9070 ])
9071
9072 # Generate code to set up dependency tracking.              -*- Autoconf -*-
9073
9074 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9075 # Free Software Foundation, Inc.
9076 #
9077 # This file is free software; the Free Software Foundation
9078 # gives unlimited permission to copy and/or distribute it,
9079 # with or without modifications, as long as this notice is preserved.
9080
9081 #serial 4
9082
9083 # _AM_OUTPUT_DEPENDENCY_COMMANDS
9084 # ------------------------------
9085 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9086 [# Autoconf 2.62 quotes --file arguments for eval, but not when files
9087 # are listed without --file.  Let's play safe and only enable the eval
9088 # if we detect the quoting.
9089 case $CONFIG_FILES in
9090 *\'*) eval set x "$CONFIG_FILES" ;;
9091 *)   set x $CONFIG_FILES ;;
9092 esac
9093 shift
9094 for mf
9095 do
9096   # Strip MF so we end up with the name of the file.
9097   mf=`echo "$mf" | sed -e 's/:.*$//'`
9098   # Check whether this is an Automake generated Makefile or not.
9099   # We used to match only the files named `Makefile.in', but
9100   # some people rename them; so instead we look at the file content.
9101   # Grep'ing the first line is not enough: some people post-process
9102   # each Makefile.in and add a new line on top of each file to say so.
9103   # Grep'ing the whole file is not good either: AIX grep has a line
9104   # limit of 2048, but all sed's we know have understand at least 4000.
9105   if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9106     dirpart=`AS_DIRNAME("$mf")`
9107   else
9108     continue
9109   fi
9110   # Extract the definition of DEPDIR, am__include, and am__quote
9111   # from the Makefile without running `make'.
9112   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9113   test -z "$DEPDIR" && continue
9114   am__include=`sed -n 's/^am__include = //p' < "$mf"`
9115   test -z "am__include" && continue
9116   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9117   # When using ansi2knr, U may be empty or an underscore; expand it
9118   U=`sed -n 's/^U = //p' < "$mf"`
9119   # Find all dependency output files, they are included files with
9120   # $(DEPDIR) in their names.  We invoke sed twice because it is the
9121   # simplest approach to changing $(DEPDIR) to its actual value in the
9122   # expansion.
9123   for file in `sed -n "
9124     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9125        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9126     # Make sure the directory exists.
9127     test -f "$dirpart/$file" && continue
9128     fdir=`AS_DIRNAME(["$file"])`
9129     AS_MKDIR_P([$dirpart/$fdir])
9130     # echo "creating $dirpart/$file"
9131     echo '# dummy' > "$dirpart/$file"
9132   done
9133 done
9134 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9135
9136
9137 # AM_OUTPUT_DEPENDENCY_COMMANDS
9138 # -----------------------------
9139 # This macro should only be invoked once -- use via AC_REQUIRE.
9140 #
9141 # This code is only required when automatic dependency tracking
9142 # is enabled.  FIXME.  This creates each `.P' file that we will
9143 # need in order to bootstrap the dependency handling code.
9144 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9145 [AC_CONFIG_COMMANDS([depfiles],
9146      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9147      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9148 ])
9149
9150 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9151 # Free Software Foundation, Inc.
9152 #
9153 # This file is free software; the Free Software Foundation
9154 # gives unlimited permission to copy and/or distribute it,
9155 # with or without modifications, as long as this notice is preserved.
9156
9157 # serial 8
9158
9159 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
9160 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9161
9162 # Do all the work for Automake.                             -*- Autoconf -*-
9163
9164 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9165 # 2005, 2006, 2008 Free Software Foundation, Inc.
9166 #
9167 # This file is free software; the Free Software Foundation
9168 # gives unlimited permission to copy and/or distribute it,
9169 # with or without modifications, as long as this notice is preserved.
9170
9171 # serial 13
9172
9173 # This macro actually does too much.  Some checks are only needed if
9174 # your package does certain things.  But this isn't really a big deal.
9175
9176 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9177 # AM_INIT_AUTOMAKE([OPTIONS])
9178 # -----------------------------------------------
9179 # The call with PACKAGE and VERSION arguments is the old style
9180 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
9181 # and VERSION should now be passed to AC_INIT and removed from
9182 # the call to AM_INIT_AUTOMAKE.
9183 # We support both call styles for the transition.  After
9184 # the next Automake release, Autoconf can make the AC_INIT
9185 # arguments mandatory, and then we can depend on a new Autoconf
9186 # release and drop the old call support.
9187 AC_DEFUN([AM_INIT_AUTOMAKE],
9188 [AC_PREREQ([2.60])dnl
9189 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
9190 dnl the ones we care about.
9191 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9192 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9193 AC_REQUIRE([AC_PROG_INSTALL])dnl
9194 if test "`cd $srcdir && pwd`" != "`pwd`"; then
9195   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9196   # is not polluted with repeated "-I."
9197   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9198   # test to see if srcdir already configured
9199   if test -f $srcdir/config.status; then
9200     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9201   fi
9202 fi
9203
9204 # test whether we have cygpath
9205 if test -z "$CYGPATH_W"; then
9206   if (cygpath --version) >/dev/null 2>/dev/null; then
9207     CYGPATH_W='cygpath -w'
9208   else
9209     CYGPATH_W=echo
9210   fi
9211 fi
9212 AC_SUBST([CYGPATH_W])
9213
9214 # Define the identity of the package.
9215 dnl Distinguish between old-style and new-style calls.
9216 m4_ifval([$2],
9217 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9218  AC_SUBST([PACKAGE], [$1])dnl
9219  AC_SUBST([VERSION], [$2])],
9220 [_AM_SET_OPTIONS([$1])dnl
9221 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9222 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9223   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9224  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9225  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9226
9227 _AM_IF_OPTION([no-define],,
9228 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9229  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9230
9231 # Some tools Automake needs.
9232 AC_REQUIRE([AM_SANITY_CHECK])dnl
9233 AC_REQUIRE([AC_ARG_PROGRAM])dnl
9234 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9235 AM_MISSING_PROG(AUTOCONF, autoconf)
9236 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9237 AM_MISSING_PROG(AUTOHEADER, autoheader)
9238 AM_MISSING_PROG(MAKEINFO, makeinfo)
9239 AM_PROG_INSTALL_SH
9240 AM_PROG_INSTALL_STRIP
9241 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9242 # We need awk for the "check" target.  The system "awk" is bad on
9243 # some platforms.
9244 AC_REQUIRE([AC_PROG_AWK])dnl
9245 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9246 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9247 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9248               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9249                              [_AM_PROG_TAR([v7])])])
9250 _AM_IF_OPTION([no-dependencies],,
9251 [AC_PROVIDE_IFELSE([AC_PROG_CC],
9252                   [_AM_DEPENDENCIES(CC)],
9253                   [define([AC_PROG_CC],
9254                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9255 AC_PROVIDE_IFELSE([AC_PROG_CXX],
9256                   [_AM_DEPENDENCIES(CXX)],
9257                   [define([AC_PROG_CXX],
9258                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9259 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9260                   [_AM_DEPENDENCIES(OBJC)],
9261                   [define([AC_PROG_OBJC],
9262                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9263 ])
9264 ])
9265
9266
9267 # When config.status generates a header, we must update the stamp-h file.
9268 # This file resides in the same directory as the config header
9269 # that is generated.  The stamp files are numbered to have different names.
9270
9271 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9272 # loop where config.status creates the headers, so we can generate
9273 # our stamp files there.
9274 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9275 [# Compute $1's index in $config_headers.
9276 _am_arg=$1
9277 _am_stamp_count=1
9278 for _am_header in $config_headers :; do
9279   case $_am_header in
9280     $_am_arg | $_am_arg:* )
9281       break ;;
9282     * )
9283       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9284   esac
9285 done
9286 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9287
9288 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9289 #
9290 # This file is free software; the Free Software Foundation
9291 # gives unlimited permission to copy and/or distribute it,
9292 # with or without modifications, as long as this notice is preserved.
9293
9294 # AM_PROG_INSTALL_SH
9295 # ------------------
9296 # Define $install_sh.
9297 AC_DEFUN([AM_PROG_INSTALL_SH],
9298 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9299 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
9300 AC_SUBST(install_sh)])
9301
9302 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
9303 #
9304 # This file is free software; the Free Software Foundation
9305 # gives unlimited permission to copy and/or distribute it,
9306 # with or without modifications, as long as this notice is preserved.
9307
9308 # serial 2
9309
9310 # Check whether the underlying file-system supports filenames
9311 # with a leading dot.  For instance MS-DOS doesn't.
9312 AC_DEFUN([AM_SET_LEADING_DOT],
9313 [rm -rf .tst 2>/dev/null
9314 mkdir .tst 2>/dev/null
9315 if test -d .tst; then
9316   am__leading_dot=.
9317 else
9318   am__leading_dot=_
9319 fi
9320 rmdir .tst 2>/dev/null
9321 AC_SUBST([am__leading_dot])])
9322
9323 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
9324 # From Jim Meyering
9325
9326 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
9327 # Free Software Foundation, Inc.
9328 #
9329 # This file is free software; the Free Software Foundation
9330 # gives unlimited permission to copy and/or distribute it,
9331 # with or without modifications, as long as this notice is preserved.
9332
9333 # serial 4
9334
9335 AC_DEFUN([AM_MAINTAINER_MODE],
9336 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
9337   dnl maintainer-mode is disabled by default
9338   AC_ARG_ENABLE(maintainer-mode,
9339 [  --enable-maintainer-mode  enable make rules and dependencies not useful
9340                           (and sometimes confusing) to the casual installer],
9341       USE_MAINTAINER_MODE=$enableval,
9342       USE_MAINTAINER_MODE=no)
9343   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
9344   AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
9345   MAINT=$MAINTAINER_MODE_TRUE
9346   AC_SUBST(MAINT)dnl
9347 ]
9348 )
9349
9350 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9351
9352 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
9353
9354 # Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
9355 #
9356 # This file is free software; the Free Software Foundation
9357 # gives unlimited permission to copy and/or distribute it,
9358 # with or without modifications, as long as this notice is preserved.
9359
9360 # serial 3
9361
9362 # AM_MAKE_INCLUDE()
9363 # -----------------
9364 # Check to see how make treats includes.
9365 AC_DEFUN([AM_MAKE_INCLUDE],
9366 [am_make=${MAKE-make}
9367 cat > confinc << 'END'
9368 am__doit:
9369         @echo done
9370 .PHONY: am__doit
9371 END
9372 # If we don't find an include directive, just comment out the code.
9373 AC_MSG_CHECKING([for style of include used by $am_make])
9374 am__include="#"
9375 am__quote=
9376 _am_result=none
9377 # First try GNU make style include.
9378 echo "include confinc" > confmf
9379 # We grep out `Entering directory' and `Leaving directory'
9380 # messages which can occur if `w' ends up in MAKEFLAGS.
9381 # In particular we don't look at `^make:' because GNU make might
9382 # be invoked under some other name (usually "gmake"), in which
9383 # case it prints its new name instead of `make'.
9384 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
9385    am__include=include
9386    am__quote=
9387    _am_result=GNU
9388 fi
9389 # Now try BSD make style include.
9390 if test "$am__include" = "#"; then
9391    echo '.include "confinc"' > confmf
9392    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
9393       am__include=.include
9394       am__quote="\""
9395       _am_result=BSD
9396    fi
9397 fi
9398 AC_SUBST([am__include])
9399 AC_SUBST([am__quote])
9400 AC_MSG_RESULT([$_am_result])
9401 rm -f confinc confmf
9402 ])
9403
9404 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
9405
9406 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
9407 # Free Software Foundation, Inc.
9408 #
9409 # This file is free software; the Free Software Foundation
9410 # gives unlimited permission to copy and/or distribute it,
9411 # with or without modifications, as long as this notice is preserved.
9412
9413 # serial 5
9414
9415 # AM_MISSING_PROG(NAME, PROGRAM)
9416 # ------------------------------
9417 AC_DEFUN([AM_MISSING_PROG],
9418 [AC_REQUIRE([AM_MISSING_HAS_RUN])
9419 $1=${$1-"${am_missing_run}$2"}
9420 AC_SUBST($1)])
9421
9422
9423 # AM_MISSING_HAS_RUN
9424 # ------------------
9425 # Define MISSING if not defined so far and test if it supports --run.
9426 # If it does, set am_missing_run to use it, otherwise, to nothing.
9427 AC_DEFUN([AM_MISSING_HAS_RUN],
9428 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9429 AC_REQUIRE_AUX_FILE([missing])dnl
9430 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
9431 # Use eval to expand $SHELL
9432 if eval "$MISSING --run true"; then
9433   am_missing_run="$MISSING --run "
9434 else
9435   am_missing_run=
9436   AC_MSG_WARN([`missing' script is too old or missing])
9437 fi
9438 ])
9439
9440 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
9441 #
9442 # This file is free software; the Free Software Foundation
9443 # gives unlimited permission to copy and/or distribute it,
9444 # with or without modifications, as long as this notice is preserved.
9445
9446 # AM_PROG_MKDIR_P
9447 # ---------------
9448 # Check for `mkdir -p'.
9449 AC_DEFUN([AM_PROG_MKDIR_P],
9450 [AC_PREREQ([2.60])dnl
9451 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9452 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
9453 dnl while keeping a definition of mkdir_p for backward compatibility.
9454 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9455 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9456 dnl Makefile.ins that do not define MKDIR_P, so we do our own
9457 dnl adjustment using top_builddir (which is defined more often than
9458 dnl MKDIR_P).
9459 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9460 case $mkdir_p in
9461   [[\\/$]]* | ?:[[\\/]]*) ;;
9462   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9463 esac
9464 ])
9465
9466 # Helper functions for option handling.                     -*- Autoconf -*-
9467
9468 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
9469 #
9470 # This file is free software; the Free Software Foundation
9471 # gives unlimited permission to copy and/or distribute it,
9472 # with or without modifications, as long as this notice is preserved.
9473
9474 # serial 4
9475
9476 # _AM_MANGLE_OPTION(NAME)
9477 # -----------------------
9478 AC_DEFUN([_AM_MANGLE_OPTION],
9479 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9480
9481 # _AM_SET_OPTION(NAME)
9482 # ------------------------------
9483 # Set option NAME.  Presently that only means defining a flag for this option.
9484 AC_DEFUN([_AM_SET_OPTION],
9485 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9486
9487 # _AM_SET_OPTIONS(OPTIONS)
9488 # ----------------------------------
9489 # OPTIONS is a space-separated list of Automake options.
9490 AC_DEFUN([_AM_SET_OPTIONS],
9491 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9492
9493 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9494 # -------------------------------------------
9495 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9496 AC_DEFUN([_AM_IF_OPTION],
9497 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9498
9499 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
9500
9501 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9502 # Free Software Foundation, Inc.
9503 #
9504 # This file is free software; the Free Software Foundation
9505 # gives unlimited permission to copy and/or distribute it,
9506 # with or without modifications, as long as this notice is preserved.
9507
9508 # serial 4
9509
9510 # AM_SANITY_CHECK
9511 # ---------------
9512 AC_DEFUN([AM_SANITY_CHECK],
9513 [AC_MSG_CHECKING([whether build environment is sane])
9514 # Just in case
9515 sleep 1
9516 echo timestamp > conftest.file
9517 # Do `set' in a subshell so we don't clobber the current shell's
9518 # arguments.  Must try -L first in case configure is actually a
9519 # symlink; some systems play weird games with the mod time of symlinks
9520 # (eg FreeBSD returns the mod time of the symlink's containing
9521 # directory).
9522 if (
9523    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
9524    if test "$[*]" = "X"; then
9525       # -L didn't work.
9526       set X `ls -t $srcdir/configure conftest.file`
9527    fi
9528    rm -f conftest.file
9529    if test "$[*]" != "X $srcdir/configure conftest.file" \
9530       && test "$[*]" != "X conftest.file $srcdir/configure"; then
9531
9532       # If neither matched, then we have a broken ls.  This can happen
9533       # if, for instance, CONFIG_SHELL is bash and it inherits a
9534       # broken ls alias from the environment.  This has actually
9535       # happened.  Such a system could not be considered "sane".
9536       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
9537 alias in your environment])
9538    fi
9539
9540    test "$[2]" = conftest.file
9541    )
9542 then
9543    # Ok.
9544    :
9545 else
9546    AC_MSG_ERROR([newly created file is older than distributed files!
9547 Check your system clock])
9548 fi
9549 AC_MSG_RESULT(yes)])
9550
9551 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9552 #
9553 # This file is free software; the Free Software Foundation
9554 # gives unlimited permission to copy and/or distribute it,
9555 # with or without modifications, as long as this notice is preserved.
9556
9557 # AM_PROG_INSTALL_STRIP
9558 # ---------------------
9559 # One issue with vendor `install' (even GNU) is that you can't
9560 # specify the program used to strip binaries.  This is especially
9561 # annoying in cross-compiling environments, where the build's strip
9562 # is unlikely to handle the host's binaries.
9563 # Fortunately install-sh will honor a STRIPPROG variable, so we
9564 # always use install-sh in `make install-strip', and initialize
9565 # STRIPPROG with the value of the STRIP variable (set by the user).
9566 AC_DEFUN([AM_PROG_INSTALL_STRIP],
9567 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9568 # Installed binaries are usually stripped using `strip' when the user
9569 # run `make install-strip'.  However `strip' might not be the right
9570 # tool to use in cross-compilation environments, therefore Automake
9571 # will honor the `STRIP' environment variable to overrule this program.
9572 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9573 if test "$cross_compiling" != no; then
9574   AC_CHECK_TOOL([STRIP], [strip], :)
9575 fi
9576 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9577 AC_SUBST([INSTALL_STRIP_PROGRAM])])
9578
9579 # Copyright (C) 2006  Free Software Foundation, Inc.
9580 #
9581 # This file is free software; the Free Software Foundation
9582 # gives unlimited permission to copy and/or distribute it,
9583 # with or without modifications, as long as this notice is preserved.
9584
9585 # _AM_SUBST_NOTMAKE(VARIABLE)
9586 # ---------------------------
9587 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9588 # This macro is traced by Automake.
9589 AC_DEFUN([_AM_SUBST_NOTMAKE])
9590
9591 # Check how to create a tarball.                            -*- Autoconf -*-
9592
9593 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9594 #
9595 # This file is free software; the Free Software Foundation
9596 # gives unlimited permission to copy and/or distribute it,
9597 # with or without modifications, as long as this notice is preserved.
9598
9599 # serial 2
9600
9601 # _AM_PROG_TAR(FORMAT)
9602 # --------------------
9603 # Check how to create a tarball in format FORMAT.
9604 # FORMAT should be one of `v7', `ustar', or `pax'.
9605 #
9606 # Substitute a variable $(am__tar) that is a command
9607 # writing to stdout a FORMAT-tarball containing the directory
9608 # $tardir.
9609 #     tardir=directory && $(am__tar) > result.tar
9610 #
9611 # Substitute a variable $(am__untar) that extract such
9612 # a tarball read from stdin.
9613 #     $(am__untar) < result.tar
9614 AC_DEFUN([_AM_PROG_TAR],
9615 [# Always define AMTAR for backward compatibility.
9616 AM_MISSING_PROG([AMTAR], [tar])
9617 m4_if([$1], [v7],
9618      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9619      [m4_case([$1], [ustar],, [pax],,
9620               [m4_fatal([Unknown tar format])])
9621 AC_MSG_CHECKING([how to create a $1 tar archive])
9622 # Loop over all known methods to create a tar archive until one works.
9623 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9624 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
9625 # Do not fold the above two line into one, because Tru64 sh and
9626 # Solaris sh will not grok spaces in the rhs of `-'.
9627 for _am_tool in $_am_tools
9628 do
9629   case $_am_tool in
9630   gnutar)
9631     for _am_tar in tar gnutar gtar;
9632     do
9633       AM_RUN_LOG([$_am_tar --version]) && break
9634     done
9635     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9636     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9637     am__untar="$_am_tar -xf -"
9638     ;;
9639   plaintar)
9640     # Must skip GNU tar: if it does not support --format= it doesn't create
9641     # ustar tarball either.
9642     (tar --version) >/dev/null 2>&1 && continue
9643     am__tar='tar chf - "$$tardir"'
9644     am__tar_='tar chf - "$tardir"'
9645     am__untar='tar xf -'
9646     ;;
9647   pax)
9648     am__tar='pax -L -x $1 -w "$$tardir"'
9649     am__tar_='pax -L -x $1 -w "$tardir"'
9650     am__untar='pax -r'
9651     ;;
9652   cpio)
9653     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9654     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9655     am__untar='cpio -i -H $1 -d'
9656     ;;
9657   none)
9658     am__tar=false
9659     am__tar_=false
9660     am__untar=false
9661     ;;
9662   esac
9663
9664   # If the value was cached, stop now.  We just wanted to have am__tar
9665   # and am__untar set.
9666   test -n "${am_cv_prog_tar_$1}" && break
9667
9668   # tar/untar a dummy directory, and stop if the command works
9669   rm -rf conftest.dir
9670   mkdir conftest.dir
9671   echo GrepMe > conftest.dir/file
9672   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9673   rm -rf conftest.dir
9674   if test -s conftest.tar; then
9675     AM_RUN_LOG([$am__untar <conftest.tar])
9676     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9677   fi
9678 done
9679 rm -rf conftest.dir
9680
9681 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9682 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9683 AC_SUBST([am__tar])
9684 AC_SUBST([am__untar])
9685 ]) # _AM_PROG_TAR
9686