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