Code

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