]> git.sur5r.net Git - glabels/blob - aclocal.m4
Imported Upstream version 2.2.8
[glabels] / aclocal.m4
1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_AUTOCONF_VERSION],
15   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17 [m4_warning([this file was generated for autoconf 2.63.
18 You have another version of autoconf.  It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
23 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
24 #
25 # This file is free software, distributed under the terms of the GNU
26 # General Public License.  As a special exception to the GNU General
27 # Public License, this file may be distributed as part of a program
28 # that contains a configuration script generated by Autoconf, under
29 # the same distribution terms as the rest of that program.
30 #
31 # This file can be copied and used freely without restrictions.  It can
32 # be used in projects which are not available under the GNU Public License
33 # but which still want to provide support for the GNU gettext functionality.
34 #
35 # Macro to add for using GNU gettext.
36 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
37 #
38 # Modified to never use included libintl. 
39 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
40 #
41 # Major rework to remove unused code
42 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
43 #
44 # Added better handling of ALL_LINGUAS from GNU gettext version 
45 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
46 #
47 # Modified to require ngettext
48 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
49 #
50 # We need this here as well, since someone might use autoconf-2.5x
51 # to configure GLib then an older version to configure a package
52 # using AM_GLIB_GNU_GETTEXT
53 AC_PREREQ(2.53)
54
55 dnl
56 dnl We go to great lengths to make sure that aclocal won't 
57 dnl try to pull in the installed version of these macros
58 dnl when running aclocal in the glib directory.
59 dnl
60 m4_copy([AC_DEFUN],[glib_DEFUN])
61 m4_copy([AC_REQUIRE],[glib_REQUIRE])
62 dnl
63 dnl At the end, if we're not within glib, we'll define the public
64 dnl definitions in terms of our private definitions.
65 dnl
66
67 # GLIB_LC_MESSAGES
68 #--------------------
69 glib_DEFUN([GLIB_LC_MESSAGES],
70   [AC_CHECK_HEADERS([locale.h])
71     if test $ac_cv_header_locale_h = yes; then
72     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
73       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
74        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
75     if test $am_cv_val_LC_MESSAGES = yes; then
76       AC_DEFINE(HAVE_LC_MESSAGES, 1,
77         [Define if your <locale.h> file defines LC_MESSAGES.])
78     fi
79   fi])
80
81 # GLIB_PATH_PROG_WITH_TEST
82 #----------------------------
83 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
84 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
85 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
86 [# Extract the first word of "$2", so it can be a program name with args.
87 set dummy $2; ac_word=[$]2
88 AC_MSG_CHECKING([for $ac_word])
89 AC_CACHE_VAL(ac_cv_path_$1,
90 [case "[$]$1" in
91   /*)
92   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
93   ;;
94   *)
95   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
96   for ac_dir in ifelse([$5], , $PATH, [$5]); do
97     test -z "$ac_dir" && ac_dir=.
98     if test -f $ac_dir/$ac_word; then
99       if [$3]; then
100         ac_cv_path_$1="$ac_dir/$ac_word"
101         break
102       fi
103     fi
104   done
105   IFS="$ac_save_ifs"
106 dnl If no 4th arg is given, leave the cache variable unset,
107 dnl so AC_PATH_PROGS will keep looking.
108 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
109 ])dnl
110   ;;
111 esac])dnl
112 $1="$ac_cv_path_$1"
113 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
114   AC_MSG_RESULT([$]$1)
115 else
116   AC_MSG_RESULT(no)
117 fi
118 AC_SUBST($1)dnl
119 ])
120
121 # GLIB_WITH_NLS
122 #-----------------
123 glib_DEFUN([GLIB_WITH_NLS],
124   dnl NLS is obligatory
125   [USE_NLS=yes
126     AC_SUBST(USE_NLS)
127
128     gt_cv_have_gettext=no
129
130     CATOBJEXT=NONE
131     XGETTEXT=:
132     INTLLIBS=
133
134     AC_CHECK_HEADER(libintl.h,
135      [gt_cv_func_dgettext_libintl="no"
136       libintl_extra_libs=""
137
138       #
139       # First check in libc
140       #
141       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
142         [AC_TRY_LINK([
143 #include <libintl.h>
144 ],
145          [return !ngettext ("","", 1)],
146           gt_cv_func_ngettext_libc=yes,
147           gt_cv_func_ngettext_libc=no)
148         ])
149   
150       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
151               AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
152                 [AC_TRY_LINK([
153 #include <libintl.h>
154 ],
155                   [return !dgettext ("","")],
156                   gt_cv_func_dgettext_libc=yes,
157                   gt_cv_func_dgettext_libc=no)
158                 ])
159       fi
160   
161       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
162         AC_CHECK_FUNCS(bind_textdomain_codeset)
163       fi
164
165       #
166       # If we don't have everything we want, check in libintl
167       #
168       if test "$gt_cv_func_dgettext_libc" != "yes" \
169          || test "$gt_cv_func_ngettext_libc" != "yes" \
170          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
171         
172         AC_CHECK_LIB(intl, bindtextdomain,
173             [AC_CHECK_LIB(intl, ngettext,
174                     [AC_CHECK_LIB(intl, dgettext,
175                                   gt_cv_func_dgettext_libintl=yes)])])
176
177         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
178           AC_MSG_CHECKING([if -liconv is needed to use gettext])
179           AC_MSG_RESULT([])
180           AC_CHECK_LIB(intl, ngettext,
181                 [AC_CHECK_LIB(intl, dcgettext,
182                        [gt_cv_func_dgettext_libintl=yes
183                         libintl_extra_libs=-liconv],
184                         :,-liconv)],
185                 :,-liconv)
186         fi
187
188         #
189         # If we found libintl, then check in it for bind_textdomain_codeset();
190         # we'll prefer libc if neither have bind_textdomain_codeset(),
191         # and both have dgettext and ngettext
192         #
193         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
194           glib_save_LIBS="$LIBS"
195           LIBS="$LIBS -lintl $libintl_extra_libs"
196           unset ac_cv_func_bind_textdomain_codeset
197           AC_CHECK_FUNCS(bind_textdomain_codeset)
198           LIBS="$glib_save_LIBS"
199
200           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
201             gt_cv_func_dgettext_libc=no
202           else
203             if test "$gt_cv_func_dgettext_libc" = "yes" \
204                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
205               gt_cv_func_dgettext_libintl=no
206             fi
207           fi
208         fi
209       fi
210
211       if test "$gt_cv_func_dgettext_libc" = "yes" \
212         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
213         gt_cv_have_gettext=yes
214       fi
215   
216       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
217         INTLLIBS="-lintl $libintl_extra_libs"
218       fi
219   
220       if test "$gt_cv_have_gettext" = "yes"; then
221         AC_DEFINE(HAVE_GETTEXT,1,
222           [Define if the GNU gettext() function is already present or preinstalled.])
223         GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
224           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
225         if test "$MSGFMT" != "no"; then
226           glib_save_LIBS="$LIBS"
227           LIBS="$LIBS $INTLLIBS"
228           AC_CHECK_FUNCS(dcgettext)
229           MSGFMT_OPTS=
230           AC_MSG_CHECKING([if msgfmt accepts -c])
231           GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
232 msgid ""
233 msgstr ""
234 "Content-Type: text/plain; charset=UTF-8\n"
235 "Project-Id-Version: test 1.0\n"
236 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
237 "Last-Translator: test <foo@bar.xx>\n"
238 "Language-Team: C <LL@li.org>\n"
239 "MIME-Version: 1.0\n"
240 "Content-Transfer-Encoding: 8bit\n"
241 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
242           AC_SUBST(MSGFMT_OPTS)
243           AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
244           GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
245             [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
246           AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
247                          return _nl_msg_cat_cntr],
248             [CATOBJEXT=.gmo 
249              DATADIRNAME=share],
250             [case $host in
251             *-*-solaris*)
252             dnl On Solaris, if bind_textdomain_codeset is in libc,
253             dnl GNU format message catalog is always supported,
254             dnl since both are added to the libc all together.
255             dnl Hence, we'd like to go with DATADIRNAME=share and
256             dnl and CATOBJEXT=.gmo in this case.
257             AC_CHECK_FUNC(bind_textdomain_codeset,
258               [CATOBJEXT=.gmo 
259                DATADIRNAME=share],
260               [CATOBJEXT=.mo
261                DATADIRNAME=lib])
262             ;;
263             *)
264             CATOBJEXT=.mo
265             DATADIRNAME=lib
266             ;;
267             esac])
268           LIBS="$glib_save_LIBS"
269           INSTOBJEXT=.mo
270         else
271           gt_cv_have_gettext=no
272         fi
273       fi
274     ])
275
276     if test "$gt_cv_have_gettext" = "yes" ; then
277       AC_DEFINE(ENABLE_NLS, 1,
278         [always defined to indicate that i18n is enabled])
279     fi
280
281     dnl Test whether we really found GNU xgettext.
282     if test "$XGETTEXT" != ":"; then
283       dnl If it is not GNU xgettext we define it as : so that the
284       dnl Makefiles still can work.
285       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
286         : ;
287       else
288         AC_MSG_RESULT(
289           [found xgettext program is not GNU xgettext; ignore it])
290         XGETTEXT=":"
291       fi
292     fi
293
294     # We need to process the po/ directory.
295     POSUB=po
296
297     AC_OUTPUT_COMMANDS(
298       [case "$CONFIG_FILES" in *po/Makefile.in*)
299         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
300       esac])
301
302     dnl These rules are solely for the distribution goal.  While doing this
303     dnl we only have to keep exactly one list of the available catalogs
304     dnl in configure.in.
305     for lang in $ALL_LINGUAS; do
306       GMOFILES="$GMOFILES $lang.gmo"
307       POFILES="$POFILES $lang.po"
308     done
309
310     dnl Make all variables we use known to autoconf.
311     AC_SUBST(CATALOGS)
312     AC_SUBST(CATOBJEXT)
313     AC_SUBST(DATADIRNAME)
314     AC_SUBST(GMOFILES)
315     AC_SUBST(INSTOBJEXT)
316     AC_SUBST(INTLLIBS)
317     AC_SUBST(PO_IN_DATADIR_TRUE)
318     AC_SUBST(PO_IN_DATADIR_FALSE)
319     AC_SUBST(POFILES)
320     AC_SUBST(POSUB)
321   ])
322
323 # AM_GLIB_GNU_GETTEXT
324 # -------------------
325 # Do checks necessary for use of gettext. If a suitable implementation 
326 # of gettext is found in either in libintl or in the C library,
327 # it will set INTLLIBS to the libraries needed for use of gettext
328 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
329 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
330 # on various variables needed by the Makefile.in.in installed by 
331 # glib-gettextize.
332 dnl
333 glib_DEFUN([GLIB_GNU_GETTEXT],
334   [AC_REQUIRE([AC_PROG_CC])dnl
335    AC_REQUIRE([AC_HEADER_STDC])dnl
336    
337    GLIB_LC_MESSAGES
338    GLIB_WITH_NLS
339
340    if test "$gt_cv_have_gettext" = "yes"; then
341      if test "x$ALL_LINGUAS" = "x"; then
342        LINGUAS=
343      else
344        AC_MSG_CHECKING(for catalogs to be installed)
345        NEW_LINGUAS=
346        for presentlang in $ALL_LINGUAS; do
347          useit=no
348          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
349            desiredlanguages="$LINGUAS"
350          else
351            desiredlanguages="$ALL_LINGUAS"
352          fi
353          for desiredlang in $desiredlanguages; do
354            # Use the presentlang catalog if desiredlang is
355            #   a. equal to presentlang, or
356            #   b. a variant of presentlang (because in this case,
357            #      presentlang can be used as a fallback for messages
358            #      which are not translated in the desiredlang catalog).
359            case "$desiredlang" in
360              "$presentlang"*) useit=yes;;
361            esac
362          done
363          if test $useit = yes; then
364            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
365          fi
366        done
367        LINGUAS=$NEW_LINGUAS
368        AC_MSG_RESULT($LINGUAS)
369      fi
370
371      dnl Construct list of names of catalog files to be constructed.
372      if test -n "$LINGUAS"; then
373        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
374      fi
375    fi
376
377    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
378    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
379    dnl Try to locate is.
380    MKINSTALLDIRS=
381    if test -n "$ac_aux_dir"; then
382      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
383    fi
384    if test -z "$MKINSTALLDIRS"; then
385      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
386    fi
387    AC_SUBST(MKINSTALLDIRS)
388
389    dnl Generate list of files to be processed by xgettext which will
390    dnl be included in po/Makefile.
391    test -d po || mkdir po
392    if test "x$srcdir" != "x."; then
393      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
394        posrcprefix="$srcdir/"
395      else
396        posrcprefix="../$srcdir/"
397      fi
398    else
399      posrcprefix="../"
400    fi
401    rm -f po/POTFILES
402    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
403         < $srcdir/po/POTFILES.in > po/POTFILES
404   ])
405
406 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
407 # -------------------------------
408 # Define VARIABLE to the location where catalog files will
409 # be installed by po/Makefile.
410 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
411 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
412 glib_save_prefix="$prefix"
413 glib_save_exec_prefix="$exec_prefix"
414 glib_save_datarootdir="$datarootdir"
415 test "x$prefix" = xNONE && prefix=$ac_default_prefix
416 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
417 datarootdir=`eval echo "${datarootdir}"`
418 if test "x$CATOBJEXT" = "x.mo" ; then
419   localedir=`eval echo "${libdir}/locale"`
420 else
421   localedir=`eval echo "${datadir}/locale"`
422 fi
423 prefix="$glib_save_prefix"
424 exec_prefix="$glib_save_exec_prefix"
425 datarootdir="$glib_save_datarootdir"
426 AC_DEFINE_UNQUOTED($1, "$localedir",
427   [Define the location where the catalogs will be installed])
428 ])
429
430 dnl
431 dnl Now the definitions that aclocal will find
432 dnl
433 ifdef(glib_configure_in,[],[
434 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
435 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
436 ])dnl
437
438 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
439
440 # Create a temporary file with TEST-FILE as its contents and pass the
441 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
442 # 0 and perform ACTION-IF-FAIL for any other exit status.
443 AC_DEFUN([GLIB_RUN_PROG],
444 [cat >conftest.foo <<_ACEOF
445 $2
446 _ACEOF
447 if AC_RUN_LOG([$1 conftest.foo]); then
448   m4_ifval([$3], [$3], [:])
449 m4_ifvaln([$4], [else $4])dnl
450 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
451 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
452 fi])
453
454
455 dnl GNOME_COMPILE_WARNINGS
456 dnl Turn on many useful compiler warnings
457 dnl For now, only works on GCC
458 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
459     dnl ******************************
460     dnl More compiler warnings
461     dnl ******************************
462
463     AC_ARG_ENABLE(compile-warnings, 
464                   AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
465                                  [Turn on compiler warnings]),,
466                   [enable_compile_warnings="m4_default([$1],[yes])"])
467
468     warnCFLAGS=
469     if test "x$GCC" != xyes; then
470         enable_compile_warnings=no
471     fi
472
473     warning_flags=
474     realsave_CFLAGS="$CFLAGS"
475
476     case "$enable_compile_warnings" in
477     no)
478         warning_flags=
479         ;;
480     minimum)
481         warning_flags="-Wall"
482         ;;
483     yes)
484         warning_flags="-Wall -Wmissing-prototypes"
485         ;;
486     maximum|error)
487         warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
488         CFLAGS="$warning_flags $CFLAGS"
489         for option in -Wno-sign-compare; do
490                 SAVE_CFLAGS="$CFLAGS"
491                 CFLAGS="$CFLAGS $option"
492                 AC_MSG_CHECKING([whether gcc understands $option])
493                 AC_TRY_COMPILE([], [],
494                         has_option=yes,
495                         has_option=no,)
496                 CFLAGS="$SAVE_CFLAGS"
497                 AC_MSG_RESULT($has_option)
498                 if test $has_option = yes; then
499                   warning_flags="$warning_flags $option"
500                 fi
501                 unset has_option
502                 unset SAVE_CFLAGS
503         done
504         unset option
505         if test "$enable_compile_warnings" = "error" ; then
506             warning_flags="$warning_flags -Werror"
507         fi
508         ;;
509     *)
510         AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
511         ;;
512     esac
513     CFLAGS="$realsave_CFLAGS"
514     AC_MSG_CHECKING(what warning flags to pass to the C compiler)
515     AC_MSG_RESULT($warning_flags)
516
517     AC_ARG_ENABLE(iso-c,
518                   AC_HELP_STRING([--enable-iso-c],
519                                  [Try to warn if code is not ISO C ]),,
520                   [enable_iso_c=no])
521
522     AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
523     complCFLAGS=
524     if test "x$enable_iso_c" != "xno"; then
525         if test "x$GCC" = "xyes"; then
526         case " $CFLAGS " in
527             *[\ \       ]-ansi[\ \      ]*) ;;
528             *) complCFLAGS="$complCFLAGS -ansi" ;;
529         esac
530         case " $CFLAGS " in
531             *[\ \       ]-pedantic[\ \  ]*) ;;
532             *) complCFLAGS="$complCFLAGS -pedantic" ;;
533         esac
534         fi
535     fi
536     AC_MSG_RESULT($complCFLAGS)
537
538     WARN_CFLAGS="$warning_flags $complCFLAGS"
539     AC_SUBST(WARN_CFLAGS)
540 ])
541
542 dnl For C++, do basically the same thing.
543
544 AC_DEFUN([GNOME_CXX_WARNINGS],[
545   AC_ARG_ENABLE(cxx-warnings,
546                 AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
547                                [Turn on compiler warnings.]),,
548                 [enable_cxx_warnings="m4_default([$1],[minimum])"])
549
550   AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
551   warnCXXFLAGS=
552   if test "x$GXX" != xyes; then
553     enable_cxx_warnings=no
554   fi
555   if test "x$enable_cxx_warnings" != "xno"; then
556     if test "x$GXX" = "xyes"; then
557       case " $CXXFLAGS " in
558       *[\ \     ]-Wall[\ \      ]*) ;;
559       *) warnCXXFLAGS="-Wall -Wno-unused" ;;
560       esac
561
562       ## -W is not all that useful.  And it cannot be controlled
563       ## with individual -Wno-xxx flags, unlike -Wall
564       if test "x$enable_cxx_warnings" = "xyes"; then
565         warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
566       fi
567     fi
568   fi
569   AC_MSG_RESULT($warnCXXFLAGS)
570
571    AC_ARG_ENABLE(iso-cxx,
572                  AC_HELP_STRING([--enable-iso-cxx],
573                                 [Try to warn if code is not ISO C++ ]),,
574                  [enable_iso_cxx=no])
575
576    AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
577    complCXXFLAGS=
578    if test "x$enable_iso_cxx" != "xno"; then
579      if test "x$GXX" = "xyes"; then
580       case " $CXXFLAGS " in
581       *[\ \     ]-ansi[\ \      ]*) ;;
582       *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
583       esac
584
585       case " $CXXFLAGS " in
586       *[\ \     ]-pedantic[\ \  ]*) ;;
587       *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
588       esac
589      fi
590    fi
591   AC_MSG_RESULT($complCXXFLAGS)
592
593   WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
594   AC_SUBST(WARN_CXXFLAGS)
595 ])
596
597 dnl Do not call GNOME_DOC_DEFINES directly.  It is split out from
598 dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself.
599 AC_DEFUN([GNOME_DOC_DEFINES],
600 [
601 AC_ARG_WITH([help-dir],
602   AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
603   [with_help_dir='${datadir}/gnome/help'])
604 HELP_DIR="$with_help_dir"
605 AC_SUBST(HELP_DIR)
606
607 AC_ARG_WITH([omf-dir],
608   AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
609   [with_omf_dir='${datadir}/omf'])
610 OMF_DIR="$with_omf_dir"
611 AC_SUBST(OMF_DIR)
612
613 AC_ARG_WITH([help-formats],
614   AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
615   [with_help_formats=''])
616 DOC_USER_FORMATS="$with_help_formats"
617 AC_SUBST(DOC_USER_FORMATS)
618
619 AC_ARG_ENABLE([scrollkeeper],
620         [AC_HELP_STRING([--disable-scrollkeeper],
621                         [do not make updates to the scrollkeeper database])],,
622         enable_scrollkeeper=yes)
623 AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
624
625 dnl disable scrollkeeper automatically for distcheck
626 DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS"
627 AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
628
629 AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
630 ])
631
632 # GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
633 #
634 AC_DEFUN([GNOME_DOC_INIT],
635 [AC_REQUIRE([AC_PROG_LN_S])dnl
636
637 ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
638
639 AC_MSG_CHECKING([gnome-doc-utils >= $gdu_cv_version_required])
640 PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
641         [gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no])
642
643 if test "$gdu_cv_have_gdu" = "yes"; then
644         AC_MSG_RESULT([yes])
645         ifelse([$2],,[:],[$2])
646 else
647         AC_MSG_RESULT([no])
648         ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3])
649 fi
650
651 GNOME_DOC_DEFINES
652 ])
653
654 dnl -*- mode: autoconf -*-
655
656 # serial 1
657
658 dnl Usage:
659 dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
660 AC_DEFUN([GTK_DOC_CHECK],
661 [
662   AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
663   AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
664   dnl for overriding the documentation installation directory
665   AC_ARG_WITH([html-dir],
666     AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
667     [with_html_dir='${datadir}/gtk-doc/html'])
668   HTML_DIR="$with_html_dir"
669   AC_SUBST([HTML_DIR])
670
671   dnl enable/disable documentation building
672   AC_ARG_ENABLE([gtk-doc],
673     AS_HELP_STRING([--enable-gtk-doc],
674                    [use gtk-doc to build documentation [[default=no]]]),,
675     [enable_gtk_doc=no])
676
677   if test x$enable_gtk_doc = xyes; then
678     ifelse([$1],[],
679       [PKG_CHECK_EXISTS([gtk-doc],,
680                         AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
681       [PKG_CHECK_EXISTS([gtk-doc >= $1],,
682                         AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))])
683   fi
684
685   AC_MSG_CHECKING([whether to build gtk-doc documentation])
686   AC_MSG_RESULT($enable_gtk_doc)
687
688   AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,)
689
690   AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
691   AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
692 ])
693
694
695 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
696 # serial 40 IT_PROG_INTLTOOL
697 AC_DEFUN([IT_PROG_INTLTOOL], [
698 AC_PREREQ([2.50])dnl
699 AC_REQUIRE([AM_NLS])dnl
700
701 case "$am__api_version" in
702     1.[01234])
703         AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
704     ;;
705     *)
706     ;;
707 esac
708
709 if test -n "$1"; then
710     AC_MSG_CHECKING([for intltool >= $1])
711
712     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
713     INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
714     [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
715     ]
716     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
717     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
718         AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
719 fi
720
721 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
722 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
723 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
724 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
725     AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
726 fi
727
728   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 $< [$]@' 
729 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 $< [$]@' 
730      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 $< [$]@' 
731      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 $< [$]@' 
732       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
733      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 $< [$]@' 
734    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 $< [$]@' 
735     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 $< [$]@' 
736 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 $< [$]@' 
737        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 $< [$]@' 
738       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 $< [$]@' 
739       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
740       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 $< [$]@' 
741       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 $< [$]@' 
742     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 $< [$]@' 
743   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 $< [$]@' 
744     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 $< [$]@' 
745     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 $< [$]@'
746    INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
747
748 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
749 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
750 _IT_SUBST(INTLTOOL_KEYS_RULE)
751 _IT_SUBST(INTLTOOL_PROP_RULE)
752 _IT_SUBST(INTLTOOL_OAF_RULE)
753 _IT_SUBST(INTLTOOL_PONG_RULE)
754 _IT_SUBST(INTLTOOL_SERVER_RULE)
755 _IT_SUBST(INTLTOOL_SHEET_RULE)
756 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
757 _IT_SUBST(INTLTOOL_UI_RULE)
758 _IT_SUBST(INTLTOOL_XAM_RULE)
759 _IT_SUBST(INTLTOOL_KBD_RULE)
760 _IT_SUBST(INTLTOOL_XML_RULE)
761 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
762 _IT_SUBST(INTLTOOL_CAVES_RULE)
763 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
764 _IT_SUBST(INTLTOOL_THEME_RULE)
765 _IT_SUBST(INTLTOOL_SERVICE_RULE)
766 _IT_SUBST(INTLTOOL_POLICY_RULE)
767
768 # Check the gettext tools to make sure they are GNU
769 AC_PATH_PROG(XGETTEXT, xgettext)
770 AC_PATH_PROG(MSGMERGE, msgmerge)
771 AC_PATH_PROG(MSGFMT, msgfmt)
772 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
773 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
774     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
775 fi
776 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
777 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
778 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
779 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
780     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
781 fi
782
783 AC_PATH_PROG(INTLTOOL_PERL, perl)
784 if test -z "$INTLTOOL_PERL"; then
785    AC_MSG_ERROR([perl not found])
786 fi
787 AC_MSG_CHECKING([for perl >= 5.8.1])
788 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
789 if test $? -ne 0; then
790    AC_MSG_ERROR([perl 5.8.1 is required for intltool])
791 else
792    IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
793    AC_MSG_RESULT([$IT_PERL_VERSION])
794 fi
795 if test "x$2" != "xno-xml"; then
796    AC_MSG_CHECKING([for XML::Parser])
797    if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
798        AC_MSG_RESULT([ok])
799    else
800        AC_MSG_ERROR([XML::Parser perl module is required for intltool])
801    fi
802 fi
803
804 # Substitute ALL_LINGUAS so we can use it in po/Makefile
805 AC_SUBST(ALL_LINGUAS)
806
807 # Set DATADIRNAME correctly if it is not set yet
808 # (copied from glib-gettext.m4)
809 if test -z "$DATADIRNAME"; then
810   AC_LINK_IFELSE(
811     [AC_LANG_PROGRAM([[]],
812                      [[extern int _nl_msg_cat_cntr;
813                        return _nl_msg_cat_cntr]])],
814     [DATADIRNAME=share],
815     [case $host in
816     *-*-solaris*)
817     dnl On Solaris, if bind_textdomain_codeset is in libc,
818     dnl GNU format message catalog is always supported,
819     dnl since both are added to the libc all together.
820     dnl Hence, we'd like to go with DATADIRNAME=share
821     dnl in this case.
822     AC_CHECK_FUNC(bind_textdomain_codeset,
823       [DATADIRNAME=share], [DATADIRNAME=lib])
824     ;;
825     *)
826     [DATADIRNAME=lib]
827     ;;
828     esac])
829 fi
830 AC_SUBST(DATADIRNAME)
831
832 IT_PO_SUBDIR([po])
833
834 ])
835
836
837 # IT_PO_SUBDIR(DIRNAME)
838 # ---------------------
839 # All po subdirs have to be declared with this macro; the subdir "po" is
840 # declared by IT_PROG_INTLTOOL.
841 #
842 AC_DEFUN([IT_PO_SUBDIR],
843 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
844 dnl
845 dnl The following CONFIG_COMMANDS should be exetuted at the very end
846 dnl of config.status.
847 AC_CONFIG_COMMANDS_PRE([
848   AC_CONFIG_COMMANDS([$1/stamp-it], [
849     if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
850        AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
851     fi
852     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
853     >"$1/stamp-it.tmp"
854     [sed '/^#/d
855          s/^[[].*] *//
856          /^[    ]*$/d
857         '"s|^|  $ac_top_srcdir/|" \
858       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
859     ]
860     [sed '/^POTFILES =/,/[^\\]$/ {
861                 /^POTFILES =/!d
862                 r $1/POTFILES
863           }
864          ' "$1/Makefile.in" >"$1/Makefile"]
865     rm -f "$1/Makefile.tmp"
866     mv "$1/stamp-it.tmp" "$1/stamp-it"
867   ])
868 ])dnl
869 ])
870
871 # _IT_SUBST(VARIABLE)
872 # -------------------
873 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
874 #
875 AC_DEFUN([_IT_SUBST],
876 [
877 AC_SUBST([$1])
878 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
879 ]
880 )
881
882 # deprecated macros
883 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
884 # A hint is needed for aclocal from Automake <= 1.9.4:
885 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
886
887
888 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
889 #
890 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
891 #                 2006, 2007, 2008 Free Software Foundation, Inc.
892 #   Written by Gordon Matzigkeit, 1996
893 #
894 # This file is free software; the Free Software Foundation gives
895 # unlimited permission to copy and/or distribute it, with or without
896 # modifications, as long as this notice is preserved.
897
898 m4_define([_LT_COPYING], [dnl
899 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
900 #                 2006, 2007, 2008 Free Software Foundation, Inc.
901 #   Written by Gordon Matzigkeit, 1996
902 #
903 #   This file is part of GNU Libtool.
904 #
905 # GNU Libtool is free software; you can redistribute it and/or
906 # modify it under the terms of the GNU General Public License as
907 # published by the Free Software Foundation; either version 2 of
908 # the License, or (at your option) any later version.
909 #
910 # As a special exception to the GNU General Public License,
911 # if you distribute this file as part of a program or library that
912 # is built using GNU Libtool, you may include this file under the
913 # same distribution terms that you use for the rest of that program.
914 #
915 # GNU Libtool is distributed in the hope that it will be useful,
916 # but WITHOUT ANY WARRANTY; without even the implied warranty of
917 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
918 # GNU General Public License for more details.
919 #
920 # You should have received a copy of the GNU General Public License
921 # along with GNU Libtool; see the file COPYING.  If not, a copy
922 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
923 # obtained by writing to the Free Software Foundation, Inc.,
924 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
925 ])
926
927 # serial 56 LT_INIT
928
929
930 # LT_PREREQ(VERSION)
931 # ------------------
932 # Complain and exit if this libtool version is less that VERSION.
933 m4_defun([LT_PREREQ],
934 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
935        [m4_default([$3],
936                    [m4_fatal([Libtool version $1 or higher is required],
937                              63)])],
938        [$2])])
939
940
941 # _LT_CHECK_BUILDDIR
942 # ------------------
943 # Complain if the absolute build directory name contains unusual characters
944 m4_defun([_LT_CHECK_BUILDDIR],
945 [case `pwd` in
946   *\ * | *\     *)
947     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
948 esac
949 ])
950
951
952 # LT_INIT([OPTIONS])
953 # ------------------
954 AC_DEFUN([LT_INIT],
955 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
956 AC_BEFORE([$0], [LT_LANG])dnl
957 AC_BEFORE([$0], [LT_OUTPUT])dnl
958 AC_BEFORE([$0], [LTDL_INIT])dnl
959 m4_require([_LT_CHECK_BUILDDIR])dnl
960
961 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
962 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
963 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
964 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
965 dnl unless we require an AC_DEFUNed macro:
966 AC_REQUIRE([LTOPTIONS_VERSION])dnl
967 AC_REQUIRE([LTSUGAR_VERSION])dnl
968 AC_REQUIRE([LTVERSION_VERSION])dnl
969 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
970 m4_require([_LT_PROG_LTMAIN])dnl
971
972 dnl Parse OPTIONS
973 _LT_SET_OPTIONS([$0], [$1])
974
975 # This can be used to rebuild libtool when needed
976 LIBTOOL_DEPS="$ltmain"
977
978 # Always use our own libtool.
979 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
980 AC_SUBST(LIBTOOL)dnl
981
982 _LT_SETUP
983
984 # Only expand once:
985 m4_define([LT_INIT])
986 ])# LT_INIT
987
988 # Old names:
989 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
990 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
991 dnl aclocal-1.4 backwards compatibility:
992 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
993 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
994
995
996 # _LT_CC_BASENAME(CC)
997 # -------------------
998 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
999 m4_defun([_LT_CC_BASENAME],
1000 [for cc_temp in $1""; do
1001   case $cc_temp in
1002     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1003     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1004     \-*) ;;
1005     *) break;;
1006   esac
1007 done
1008 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1009 ])
1010
1011
1012 # _LT_FILEUTILS_DEFAULTS
1013 # ----------------------
1014 # It is okay to use these file commands and assume they have been set
1015 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1016 m4_defun([_LT_FILEUTILS_DEFAULTS],
1017 [: ${CP="cp -f"}
1018 : ${MV="mv -f"}
1019 : ${RM="rm -f"}
1020 ])# _LT_FILEUTILS_DEFAULTS
1021
1022
1023 # _LT_SETUP
1024 # ---------
1025 m4_defun([_LT_SETUP],
1026 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1027 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1028 _LT_DECL([], [host_alias], [0], [The host system])dnl
1029 _LT_DECL([], [host], [0])dnl
1030 _LT_DECL([], [host_os], [0])dnl
1031 dnl
1032 _LT_DECL([], [build_alias], [0], [The build system])dnl
1033 _LT_DECL([], [build], [0])dnl
1034 _LT_DECL([], [build_os], [0])dnl
1035 dnl
1036 AC_REQUIRE([AC_PROG_CC])dnl
1037 AC_REQUIRE([LT_PATH_LD])dnl
1038 AC_REQUIRE([LT_PATH_NM])dnl
1039 dnl
1040 AC_REQUIRE([AC_PROG_LN_S])dnl
1041 test -z "$LN_S" && LN_S="ln -s"
1042 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1043 dnl
1044 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1045 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1046 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1047 dnl
1048 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1049 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1050 m4_require([_LT_CMD_RELOAD])dnl
1051 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1052 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1053 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1054
1055 _LT_CONFIG_LIBTOOL_INIT([
1056 # See if we are running on zsh, and set the options which allow our
1057 # commands through without removal of \ escapes INIT.
1058 if test -n "\${ZSH_VERSION+set}" ; then
1059    setopt NO_GLOB_SUBST
1060 fi
1061 ])
1062 if test -n "${ZSH_VERSION+set}" ; then
1063    setopt NO_GLOB_SUBST
1064 fi
1065
1066 _LT_CHECK_OBJDIR
1067
1068 m4_require([_LT_TAG_COMPILER])dnl
1069 _LT_PROG_ECHO_BACKSLASH
1070
1071 case $host_os in
1072 aix3*)
1073   # AIX sometimes has problems with the GCC collect2 program.  For some
1074   # reason, if we set the COLLECT_NAMES environment variable, the problems
1075   # vanish in a puff of smoke.
1076   if test "X${COLLECT_NAMES+set}" != Xset; then
1077     COLLECT_NAMES=
1078     export COLLECT_NAMES
1079   fi
1080   ;;
1081 esac
1082
1083 # Sed substitution that helps us do robust quoting.  It backslashifies
1084 # metacharacters that are still active within double-quoted strings.
1085 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1086
1087 # Same as above, but do not quote variable references.
1088 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1089
1090 # Sed substitution to delay expansion of an escaped shell variable in a
1091 # double_quote_subst'ed string.
1092 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1093
1094 # Sed substitution to delay expansion of an escaped single quote.
1095 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1096
1097 # Sed substitution to avoid accidental globbing in evaled expressions
1098 no_glob_subst='s/\*/\\\*/g'
1099
1100 # Global variables:
1101 ofile=libtool
1102 can_build_shared=yes
1103
1104 # All known linkers require a `.a' archive for static linking (except MSVC,
1105 # which needs '.lib').
1106 libext=a
1107
1108 with_gnu_ld="$lt_cv_prog_gnu_ld"
1109
1110 old_CC="$CC"
1111 old_CFLAGS="$CFLAGS"
1112
1113 # Set sane defaults for various variables
1114 test -z "$CC" && CC=cc
1115 test -z "$LTCC" && LTCC=$CC
1116 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1117 test -z "$LD" && LD=ld
1118 test -z "$ac_objext" && ac_objext=o
1119
1120 _LT_CC_BASENAME([$compiler])
1121
1122 # Only perform the check for file, if the check method requires it
1123 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1124 case $deplibs_check_method in
1125 file_magic*)
1126   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1127     _LT_PATH_MAGIC
1128   fi
1129   ;;
1130 esac
1131
1132 # Use C for the default configuration in the libtool script
1133 LT_SUPPORTED_TAG([CC])
1134 _LT_LANG_C_CONFIG
1135 _LT_LANG_DEFAULT_CONFIG
1136 _LT_CONFIG_COMMANDS
1137 ])# _LT_SETUP
1138
1139
1140 # _LT_PROG_LTMAIN
1141 # ---------------
1142 # Note that this code is called both from `configure', and `config.status'
1143 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1144 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1145 # so we pass a copy along to make sure it has a sensible value anyway.
1146 m4_defun([_LT_PROG_LTMAIN],
1147 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1148 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1149 ltmain="$ac_aux_dir/ltmain.sh"
1150 ])# _LT_PROG_LTMAIN
1151
1152
1153
1154 # So that we can recreate a full libtool script including additional
1155 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1156 # in macros and then make a single call at the end using the `libtool'
1157 # label.
1158
1159
1160 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1161 # ----------------------------------------
1162 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1163 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1164 [m4_ifval([$1],
1165           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1166                      [$1
1167 ])])])
1168
1169 # Initialize.
1170 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1171
1172
1173 # _LT_CONFIG_LIBTOOL([COMMANDS])
1174 # ------------------------------
1175 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1176 m4_define([_LT_CONFIG_LIBTOOL],
1177 [m4_ifval([$1],
1178           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1179                      [$1
1180 ])])])
1181
1182 # Initialize.
1183 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1184
1185
1186 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1187 # -----------------------------------------------------
1188 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1189 [_LT_CONFIG_LIBTOOL([$1])
1190 _LT_CONFIG_LIBTOOL_INIT([$2])
1191 ])
1192
1193
1194 # _LT_FORMAT_COMMENT([COMMENT])
1195 # -----------------------------
1196 # Add leading comment marks to the start of each line, and a trailing
1197 # full-stop to the whole comment if one is not present already.
1198 m4_define([_LT_FORMAT_COMMENT],
1199 [m4_ifval([$1], [
1200 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1201               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1202 )])
1203
1204
1205
1206
1207
1208 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1209 # -------------------------------------------------------------------
1210 # CONFIGNAME is the name given to the value in the libtool script.
1211 # VARNAME is the (base) name used in the configure script.
1212 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1213 # VARNAME.  Any other value will be used directly.
1214 m4_define([_LT_DECL],
1215 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1216     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1217         [m4_ifval([$1], [$1], [$2])])
1218     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1219     m4_ifval([$4],
1220         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1221     lt_dict_add_subkey([lt_decl_dict], [$2],
1222         [tagged?], [m4_ifval([$5], [yes], [no])])])
1223 ])
1224
1225
1226 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1227 # --------------------------------------------------------
1228 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1229
1230
1231 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1232 # ------------------------------------------------
1233 m4_define([lt_decl_tag_varnames],
1234 [_lt_decl_filter([tagged?], [yes], $@)])
1235
1236
1237 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1238 # ---------------------------------------------------------
1239 m4_define([_lt_decl_filter],
1240 [m4_case([$#],
1241   [0], [m4_fatal([$0: too few arguments: $#])],
1242   [1], [m4_fatal([$0: too few arguments: $#: $1])],
1243   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1244   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1245   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1246 ])
1247
1248
1249 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1250 # --------------------------------------------------
1251 m4_define([lt_decl_quote_varnames],
1252 [_lt_decl_filter([value], [1], $@)])
1253
1254
1255 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1256 # ---------------------------------------------------
1257 m4_define([lt_decl_dquote_varnames],
1258 [_lt_decl_filter([value], [2], $@)])
1259
1260
1261 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1262 # ---------------------------------------------------
1263 m4_define([lt_decl_varnames_tagged],
1264 [m4_assert([$# <= 2])dnl
1265 _$0(m4_quote(m4_default([$1], [[, ]])),
1266     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1267     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1268 m4_define([_lt_decl_varnames_tagged],
1269 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1270
1271
1272 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1273 # ------------------------------------------------
1274 m4_define([lt_decl_all_varnames],
1275 [_$0(m4_quote(m4_default([$1], [[, ]])),
1276      m4_if([$2], [],
1277            m4_quote(lt_decl_varnames),
1278         m4_quote(m4_shift($@))))[]dnl
1279 ])
1280 m4_define([_lt_decl_all_varnames],
1281 [lt_join($@, lt_decl_varnames_tagged([$1],
1282                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1283 ])
1284
1285
1286 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1287 # ------------------------------------
1288 # Quote a variable value, and forward it to `config.status' so that its
1289 # declaration there will have the same value as in `configure'.  VARNAME
1290 # must have a single quote delimited value for this to work.
1291 m4_define([_LT_CONFIG_STATUS_DECLARE],
1292 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1293
1294
1295 # _LT_CONFIG_STATUS_DECLARATIONS
1296 # ------------------------------
1297 # We delimit libtool config variables with single quotes, so when
1298 # we write them to config.status, we have to be sure to quote all
1299 # embedded single quotes properly.  In configure, this macro expands
1300 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1301 #
1302 #    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1303 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1304 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1305     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1306
1307
1308 # _LT_LIBTOOL_TAGS
1309 # ----------------
1310 # Output comment and list of tags supported by the script
1311 m4_defun([_LT_LIBTOOL_TAGS],
1312 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1313 available_tags="_LT_TAGS"dnl
1314 ])
1315
1316
1317 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1318 # -----------------------------------
1319 # Extract the dictionary values for VARNAME (optionally with TAG) and
1320 # expand to a commented shell variable setting:
1321 #
1322 #    # Some comment about what VAR is for.
1323 #    visible_name=$lt_internal_name
1324 m4_define([_LT_LIBTOOL_DECLARE],
1325 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1326                                            [description])))[]dnl
1327 m4_pushdef([_libtool_name],
1328     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1329 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1330     [0], [_libtool_name=[$]$1],
1331     [1], [_libtool_name=$lt_[]$1],
1332     [2], [_libtool_name=$lt_[]$1],
1333     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1334 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1335 ])
1336
1337
1338 # _LT_LIBTOOL_CONFIG_VARS
1339 # -----------------------
1340 # Produce commented declarations of non-tagged libtool config variables
1341 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1342 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1343 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1344 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1345 [m4_foreach([_lt_var],
1346     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1347     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1348
1349
1350 # _LT_LIBTOOL_TAG_VARS(TAG)
1351 # -------------------------
1352 m4_define([_LT_LIBTOOL_TAG_VARS],
1353 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1354     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1355
1356
1357 # _LT_TAGVAR(VARNAME, [TAGNAME])
1358 # ------------------------------
1359 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1360
1361
1362 # _LT_CONFIG_COMMANDS
1363 # -------------------
1364 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1365 # variables for single and double quote escaping we saved from calls
1366 # to _LT_DECL, we can put quote escaped variables declarations
1367 # into `config.status', and then the shell code to quote escape them in
1368 # for loops in `config.status'.  Finally, any additional code accumulated
1369 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1370 m4_defun([_LT_CONFIG_COMMANDS],
1371 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1372         dnl If the libtool generation code has been placed in $CONFIG_LT,
1373         dnl instead of duplicating it all over again into config.status,
1374         dnl then we will have config.status run $CONFIG_LT later, so it
1375         dnl needs to know what name is stored there:
1376         [AC_CONFIG_COMMANDS([libtool],
1377             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1378     dnl If the libtool generation code is destined for config.status,
1379     dnl expand the accumulated commands and init code now:
1380     [AC_CONFIG_COMMANDS([libtool],
1381         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1382 ])#_LT_CONFIG_COMMANDS
1383
1384
1385 # Initialize.
1386 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1387 [
1388
1389 # The HP-UX ksh and POSIX shell print the target directory to stdout
1390 # if CDPATH is set.
1391 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1392
1393 sed_quote_subst='$sed_quote_subst'
1394 double_quote_subst='$double_quote_subst'
1395 delay_variable_subst='$delay_variable_subst'
1396 _LT_CONFIG_STATUS_DECLARATIONS
1397 LTCC='$LTCC'
1398 LTCFLAGS='$LTCFLAGS'
1399 compiler='$compiler_DEFAULT'
1400
1401 # Quote evaled strings.
1402 for var in lt_decl_all_varnames([[ \
1403 ]], lt_decl_quote_varnames); do
1404     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1405     *[[\\\\\\\`\\"\\\$]]*)
1406       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1407       ;;
1408     *)
1409       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1410       ;;
1411     esac
1412 done
1413
1414 # Double-quote double-evaled strings.
1415 for var in lt_decl_all_varnames([[ \
1416 ]], lt_decl_dquote_varnames); do
1417     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1418     *[[\\\\\\\`\\"\\\$]]*)
1419       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1420       ;;
1421     *)
1422       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1423       ;;
1424     esac
1425 done
1426
1427 # Fix-up fallback echo if it was mangled by the above quoting rules.
1428 case \$lt_ECHO in
1429 *'\\\[$]0 --fallback-echo"')dnl "
1430   lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1431   ;;
1432 esac
1433
1434 _LT_OUTPUT_LIBTOOL_INIT
1435 ])
1436
1437
1438 # LT_OUTPUT
1439 # ---------
1440 # This macro allows early generation of the libtool script (before
1441 # AC_OUTPUT is called), incase it is used in configure for compilation
1442 # tests.
1443 AC_DEFUN([LT_OUTPUT],
1444 [: ${CONFIG_LT=./config.lt}
1445 AC_MSG_NOTICE([creating $CONFIG_LT])
1446 cat >"$CONFIG_LT" <<_LTEOF
1447 #! $SHELL
1448 # Generated by $as_me.
1449 # Run this file to recreate a libtool stub with the current configuration.
1450
1451 lt_cl_silent=false
1452 SHELL=\${CONFIG_SHELL-$SHELL}
1453 _LTEOF
1454
1455 cat >>"$CONFIG_LT" <<\_LTEOF
1456 AS_SHELL_SANITIZE
1457 _AS_PREPARE
1458
1459 exec AS_MESSAGE_FD>&1
1460 exec AS_MESSAGE_LOG_FD>>config.log
1461 {
1462   echo
1463   AS_BOX([Running $as_me.])
1464 } >&AS_MESSAGE_LOG_FD
1465
1466 lt_cl_help="\
1467 \`$as_me' creates a local libtool stub from the current configuration,
1468 for use in further configure time tests before the real libtool is
1469 generated.
1470
1471 Usage: $[0] [[OPTIONS]]
1472
1473   -h, --help      print this help, then exit
1474   -V, --version   print version number, then exit
1475   -q, --quiet     do not print progress messages
1476   -d, --debug     don't remove temporary files
1477
1478 Report bugs to <bug-libtool@gnu.org>."
1479
1480 lt_cl_version="\
1481 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1482 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1483 configured by $[0], generated by m4_PACKAGE_STRING.
1484
1485 Copyright (C) 2008 Free Software Foundation, Inc.
1486 This config.lt script is free software; the Free Software Foundation
1487 gives unlimited permision to copy, distribute and modify it."
1488
1489 while test $[#] != 0
1490 do
1491   case $[1] in
1492     --version | --v* | -V )
1493       echo "$lt_cl_version"; exit 0 ;;
1494     --help | --h* | -h )
1495       echo "$lt_cl_help"; exit 0 ;;
1496     --debug | --d* | -d )
1497       debug=: ;;
1498     --quiet | --q* | --silent | --s* | -q )
1499       lt_cl_silent=: ;;
1500
1501     -*) AC_MSG_ERROR([unrecognized option: $[1]
1502 Try \`$[0] --help' for more information.]) ;;
1503
1504     *) AC_MSG_ERROR([unrecognized argument: $[1]
1505 Try \`$[0] --help' for more information.]) ;;
1506   esac
1507   shift
1508 done
1509
1510 if $lt_cl_silent; then
1511   exec AS_MESSAGE_FD>/dev/null
1512 fi
1513 _LTEOF
1514
1515 cat >>"$CONFIG_LT" <<_LTEOF
1516 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1517 _LTEOF
1518
1519 cat >>"$CONFIG_LT" <<\_LTEOF
1520 AC_MSG_NOTICE([creating $ofile])
1521 _LT_OUTPUT_LIBTOOL_COMMANDS
1522 AS_EXIT(0)
1523 _LTEOF
1524 chmod +x "$CONFIG_LT"
1525
1526 # configure is writing to config.log, but config.lt does its own redirection,
1527 # appending to config.log, which fails on DOS, as config.log is still kept
1528 # open by configure.  Here we exec the FD to /dev/null, effectively closing
1529 # config.log, so it can be properly (re)opened and appended to by config.lt.
1530 if test "$no_create" != yes; then
1531   lt_cl_success=:
1532   test "$silent" = yes &&
1533     lt_config_lt_args="$lt_config_lt_args --quiet"
1534   exec AS_MESSAGE_LOG_FD>/dev/null
1535   $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1536   exec AS_MESSAGE_LOG_FD>>config.log
1537   $lt_cl_success || AS_EXIT(1)
1538 fi
1539 ])# LT_OUTPUT
1540
1541
1542 # _LT_CONFIG(TAG)
1543 # ---------------
1544 # If TAG is the built-in tag, create an initial libtool script with a
1545 # default configuration from the untagged config vars.  Otherwise add code
1546 # to config.status for appending the configuration named by TAG from the
1547 # matching tagged config vars.
1548 m4_defun([_LT_CONFIG],
1549 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1550 _LT_CONFIG_SAVE_COMMANDS([
1551   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1552   m4_if(_LT_TAG, [C], [
1553     # See if we are running on zsh, and set the options which allow our
1554     # commands through without removal of \ escapes.
1555     if test -n "${ZSH_VERSION+set}" ; then
1556       setopt NO_GLOB_SUBST
1557     fi
1558
1559     cfgfile="${ofile}T"
1560     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1561     $RM "$cfgfile"
1562
1563     cat <<_LT_EOF >> "$cfgfile"
1564 #! $SHELL
1565
1566 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1567 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1568 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1569 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1570 #
1571 _LT_COPYING
1572 _LT_LIBTOOL_TAGS
1573
1574 # ### BEGIN LIBTOOL CONFIG
1575 _LT_LIBTOOL_CONFIG_VARS
1576 _LT_LIBTOOL_TAG_VARS
1577 # ### END LIBTOOL CONFIG
1578
1579 _LT_EOF
1580
1581   case $host_os in
1582   aix3*)
1583     cat <<\_LT_EOF >> "$cfgfile"
1584 # AIX sometimes has problems with the GCC collect2 program.  For some
1585 # reason, if we set the COLLECT_NAMES environment variable, the problems
1586 # vanish in a puff of smoke.
1587 if test "X${COLLECT_NAMES+set}" != Xset; then
1588   COLLECT_NAMES=
1589   export COLLECT_NAMES
1590 fi
1591 _LT_EOF
1592     ;;
1593   esac
1594
1595   _LT_PROG_LTMAIN
1596
1597   # We use sed instead of cat because bash on DJGPP gets confused if
1598   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1599   # text mode, it properly converts lines to CR/LF.  This bash problem
1600   # is reportedly fixed, but why not run on old versions too?
1601   sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
1602     || (rm -f "$cfgfile"; exit 1)
1603
1604   _LT_PROG_XSI_SHELLFNS
1605
1606   sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
1607     || (rm -f "$cfgfile"; exit 1)
1608
1609   mv -f "$cfgfile" "$ofile" ||
1610     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1611   chmod +x "$ofile"
1612 ],
1613 [cat <<_LT_EOF >> "$ofile"
1614
1615 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1616 dnl in a comment (ie after a #).
1617 # ### BEGIN LIBTOOL TAG CONFIG: $1
1618 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
1619 # ### END LIBTOOL TAG CONFIG: $1
1620 _LT_EOF
1621 ])dnl /m4_if
1622 ],
1623 [m4_if([$1], [], [
1624     PACKAGE='$PACKAGE'
1625     VERSION='$VERSION'
1626     TIMESTAMP='$TIMESTAMP'
1627     RM='$RM'
1628     ofile='$ofile'], [])
1629 ])dnl /_LT_CONFIG_SAVE_COMMANDS
1630 ])# _LT_CONFIG
1631
1632
1633 # LT_SUPPORTED_TAG(TAG)
1634 # ---------------------
1635 # Trace this macro to discover what tags are supported by the libtool
1636 # --tag option, using:
1637 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1638 AC_DEFUN([LT_SUPPORTED_TAG], [])
1639
1640
1641 # C support is built-in for now
1642 m4_define([_LT_LANG_C_enabled], [])
1643 m4_define([_LT_TAGS], [])
1644
1645
1646 # LT_LANG(LANG)
1647 # -------------
1648 # Enable libtool support for the given language if not already enabled.
1649 AC_DEFUN([LT_LANG],
1650 [AC_BEFORE([$0], [LT_OUTPUT])dnl
1651 m4_case([$1],
1652   [C],                  [_LT_LANG(C)],
1653   [C++],                [_LT_LANG(CXX)],
1654   [Java],               [_LT_LANG(GCJ)],
1655   [Fortran 77],         [_LT_LANG(F77)],
1656   [Fortran],            [_LT_LANG(FC)],
1657   [Windows Resource],   [_LT_LANG(RC)],
1658   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1659     [_LT_LANG($1)],
1660     [m4_fatal([$0: unsupported language: "$1"])])])dnl
1661 ])# LT_LANG
1662
1663
1664 # _LT_LANG(LANGNAME)
1665 # ------------------
1666 m4_defun([_LT_LANG],
1667 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
1668   [LT_SUPPORTED_TAG([$1])dnl
1669   m4_append([_LT_TAGS], [$1 ])dnl
1670   m4_define([_LT_LANG_]$1[_enabled], [])dnl
1671   _LT_LANG_$1_CONFIG($1)])dnl
1672 ])# _LT_LANG
1673
1674
1675 # _LT_LANG_DEFAULT_CONFIG
1676 # -----------------------
1677 m4_defun([_LT_LANG_DEFAULT_CONFIG],
1678 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
1679   [LT_LANG(CXX)],
1680   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1681
1682 AC_PROVIDE_IFELSE([AC_PROG_F77],
1683   [LT_LANG(F77)],
1684   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1685
1686 AC_PROVIDE_IFELSE([AC_PROG_FC],
1687   [LT_LANG(FC)],
1688   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1689
1690 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1691 dnl pulling things in needlessly.
1692 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1693   [LT_LANG(GCJ)],
1694   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1695     [LT_LANG(GCJ)],
1696     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1697       [LT_LANG(GCJ)],
1698       [m4_ifdef([AC_PROG_GCJ],
1699         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1700        m4_ifdef([A][M_PROG_GCJ],
1701         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1702        m4_ifdef([LT_PROG_GCJ],
1703         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1704
1705 AC_PROVIDE_IFELSE([LT_PROG_RC],
1706   [LT_LANG(RC)],
1707   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1708 ])# _LT_LANG_DEFAULT_CONFIG
1709
1710 # Obsolete macros:
1711 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1712 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1713 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1714 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1715 dnl aclocal-1.4 backwards compatibility:
1716 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1717 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1718 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1719 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1720
1721
1722 # _LT_TAG_COMPILER
1723 # ----------------
1724 m4_defun([_LT_TAG_COMPILER],
1725 [AC_REQUIRE([AC_PROG_CC])dnl
1726
1727 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1728 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1729 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1730 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1731
1732 # If no C compiler was specified, use CC.
1733 LTCC=${LTCC-"$CC"}
1734
1735 # If no C compiler flags were specified, use CFLAGS.
1736 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1737
1738 # Allow CC to be a program name with arguments.
1739 compiler=$CC
1740 ])# _LT_TAG_COMPILER
1741
1742
1743 # _LT_COMPILER_BOILERPLATE
1744 # ------------------------
1745 # Check for compiler boilerplate output or warnings with
1746 # the simple compiler test code.
1747 m4_defun([_LT_COMPILER_BOILERPLATE],
1748 [m4_require([_LT_DECL_SED])dnl
1749 ac_outfile=conftest.$ac_objext
1750 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1751 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1752 _lt_compiler_boilerplate=`cat conftest.err`
1753 $RM conftest*
1754 ])# _LT_COMPILER_BOILERPLATE
1755
1756
1757 # _LT_LINKER_BOILERPLATE
1758 # ----------------------
1759 # Check for linker boilerplate output or warnings with
1760 # the simple link test code.
1761 m4_defun([_LT_LINKER_BOILERPLATE],
1762 [m4_require([_LT_DECL_SED])dnl
1763 ac_outfile=conftest.$ac_objext
1764 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1765 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1766 _lt_linker_boilerplate=`cat conftest.err`
1767 $RM -r conftest*
1768 ])# _LT_LINKER_BOILERPLATE
1769
1770 # _LT_REQUIRED_DARWIN_CHECKS
1771 # -------------------------
1772 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1773   case $host_os in
1774     rhapsody* | darwin*)
1775     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1776     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1777     AC_CHECK_TOOL([LIPO], [lipo], [:])
1778     AC_CHECK_TOOL([OTOOL], [otool], [:])
1779     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1780     _LT_DECL([], [DSYMUTIL], [1],
1781       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1782     _LT_DECL([], [NMEDIT], [1],
1783       [Tool to change global to local symbols on Mac OS X])
1784     _LT_DECL([], [LIPO], [1],
1785       [Tool to manipulate fat objects and archives on Mac OS X])
1786     _LT_DECL([], [OTOOL], [1],
1787       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1788     _LT_DECL([], [OTOOL64], [1],
1789       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1790
1791     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1792       [lt_cv_apple_cc_single_mod=no
1793       if test -z "${LT_MULTI_MODULE}"; then
1794         # By default we will add the -single_module flag. You can override
1795         # by either setting the environment variable LT_MULTI_MODULE
1796         # non-empty at configure time, or by adding -multi_module to the
1797         # link flags.
1798         rm -rf libconftest.dylib*
1799         echo "int foo(void){return 1;}" > conftest.c
1800         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1801 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1802         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1803           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1804         _lt_result=$?
1805         if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1806           lt_cv_apple_cc_single_mod=yes
1807         else
1808           cat conftest.err >&AS_MESSAGE_LOG_FD
1809         fi
1810         rm -rf libconftest.dylib*
1811         rm -f conftest.*
1812       fi])
1813     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1814       [lt_cv_ld_exported_symbols_list],
1815       [lt_cv_ld_exported_symbols_list=no
1816       save_LDFLAGS=$LDFLAGS
1817       echo "_main" > conftest.sym
1818       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1819       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1820         [lt_cv_ld_exported_symbols_list=yes],
1821         [lt_cv_ld_exported_symbols_list=no])
1822         LDFLAGS="$save_LDFLAGS"
1823     ])
1824     case $host_os in
1825     rhapsody* | darwin1.[[012]])
1826       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1827     darwin1.*)
1828       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1829     darwin*) # darwin 5.x on
1830       # if running on 10.5 or later, the deployment target defaults
1831       # to the OS version, if on x86, and 10.4, the deployment
1832       # target defaults to 10.4. Don't you love it?
1833       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1834         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1835           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1836         10.[[012]]*)
1837           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1838         10.*)
1839           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1840       esac
1841     ;;
1842   esac
1843     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1844       _lt_dar_single_mod='$single_module'
1845     fi
1846     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1847       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1848     else
1849       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1850     fi
1851     if test "$DSYMUTIL" != ":"; then
1852       _lt_dsymutil='~$DSYMUTIL $lib || :'
1853     else
1854       _lt_dsymutil=
1855     fi
1856     ;;
1857   esac
1858 ])
1859
1860
1861 # _LT_DARWIN_LINKER_FEATURES
1862 # --------------------------
1863 # Checks for linker and compiler features on darwin
1864 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1865 [
1866   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1867   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1868   _LT_TAGVAR(hardcode_direct, $1)=no
1869   _LT_TAGVAR(hardcode_automatic, $1)=yes
1870   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1871   _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1872   _LT_TAGVAR(link_all_deplibs, $1)=yes
1873   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1874   case $cc_basename in
1875      ifort*) _lt_dar_can_shared=yes ;;
1876      *) _lt_dar_can_shared=$GCC ;;
1877   esac
1878   if test "$_lt_dar_can_shared" = "yes"; then
1879     output_verbose_link_cmd=echo
1880     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1881     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1882     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1883     _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1884     m4_if([$1], [CXX],
1885 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1886       _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1887       _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1888     fi
1889 ],[])
1890   else
1891   _LT_TAGVAR(ld_shlibs, $1)=no
1892   fi
1893 ])
1894
1895 # _LT_SYS_MODULE_PATH_AIX
1896 # -----------------------
1897 # Links a minimal program and checks the executable
1898 # for the system default hardcoded library path. In most cases,
1899 # this is /usr/lib:/lib, but when the MPI compilers are used
1900 # the location of the communication and MPI libs are included too.
1901 # If we don't find anything, use the default library path according
1902 # to the aix ld manual.
1903 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1904 [m4_require([_LT_DECL_SED])dnl
1905 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1906 lt_aix_libpath_sed='
1907     /Import File Strings/,/^$/ {
1908         /^0/ {
1909             s/^0  *\(.*\)$/\1/
1910             p
1911         }
1912     }'
1913 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1914 # Check for a 64-bit object if we didn't find anything.
1915 if test -z "$aix_libpath"; then
1916   aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1917 fi],[])
1918 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1919 ])# _LT_SYS_MODULE_PATH_AIX
1920
1921
1922 # _LT_SHELL_INIT(ARG)
1923 # -------------------
1924 m4_define([_LT_SHELL_INIT],
1925 [ifdef([AC_DIVERSION_NOTICE],
1926              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1927          [AC_DIVERT_PUSH(NOTICE)])
1928 $1
1929 AC_DIVERT_POP
1930 ])# _LT_SHELL_INIT
1931
1932
1933 # _LT_PROG_ECHO_BACKSLASH
1934 # -----------------------
1935 # Add some code to the start of the generated configure script which
1936 # will find an echo command which doesn't interpret backslashes.
1937 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1938 [_LT_SHELL_INIT([
1939 # Check that we are running under the correct shell.
1940 SHELL=${CONFIG_SHELL-/bin/sh}
1941
1942 case X$lt_ECHO in
1943 X*--fallback-echo)
1944   # Remove one level of quotation (which was required for Make).
1945   ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1946   ;;
1947 esac
1948
1949 ECHO=${lt_ECHO-echo}
1950 if test "X[$]1" = X--no-reexec; then
1951   # Discard the --no-reexec flag, and continue.
1952   shift
1953 elif test "X[$]1" = X--fallback-echo; then
1954   # Avoid inline document here, it may be left over
1955   :
1956 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1957   # Yippee, $ECHO works!
1958   :
1959 else
1960   # Restart under the correct shell.
1961   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1962 fi
1963
1964 if test "X[$]1" = X--fallback-echo; then
1965   # used as fallback echo
1966   shift
1967   cat <<_LT_EOF
1968 [$]*
1969 _LT_EOF
1970   exit 0
1971 fi
1972
1973 # The HP-UX ksh and POSIX shell print the target directory to stdout
1974 # if CDPATH is set.
1975 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1976
1977 if test -z "$lt_ECHO"; then
1978   if test "X${echo_test_string+set}" != Xset; then
1979     # find a string as large as possible, as long as the shell can cope with it
1980     for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1981       # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1982       if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1983          { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1984       then
1985         break
1986       fi
1987     done
1988   fi
1989
1990   if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1991      echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1992      test "X$echo_testing_string" = "X$echo_test_string"; then
1993     :
1994   else
1995     # The Solaris, AIX, and Digital Unix default echo programs unquote
1996     # backslashes.  This makes it impossible to quote backslashes using
1997     #   echo "$something" | sed 's/\\/\\\\/g'
1998     #
1999     # So, first we look for a working echo in the user's PATH.
2000
2001     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2002     for dir in $PATH /usr/ucb; do
2003       IFS="$lt_save_ifs"
2004       if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2005          test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2006          echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2007          test "X$echo_testing_string" = "X$echo_test_string"; then
2008         ECHO="$dir/echo"
2009         break
2010       fi
2011     done
2012     IFS="$lt_save_ifs"
2013
2014     if test "X$ECHO" = Xecho; then
2015       # We didn't find a better echo, so look for alternatives.
2016       if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
2017          echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
2018          test "X$echo_testing_string" = "X$echo_test_string"; then
2019         # This shell has a builtin print -r that does the trick.
2020         ECHO='print -r'
2021       elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
2022            test "X$CONFIG_SHELL" != X/bin/ksh; then
2023         # If we have ksh, try running configure again with it.
2024         ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2025         export ORIGINAL_CONFIG_SHELL
2026         CONFIG_SHELL=/bin/ksh
2027         export CONFIG_SHELL
2028         exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2029       else
2030         # Try using printf.
2031         ECHO='printf %s\n'
2032         if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2033            echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2034            test "X$echo_testing_string" = "X$echo_test_string"; then
2035           # Cool, printf works
2036           :
2037         elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2038              test "X$echo_testing_string" = 'X\t' &&
2039              echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2040              test "X$echo_testing_string" = "X$echo_test_string"; then
2041           CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2042           export CONFIG_SHELL
2043           SHELL="$CONFIG_SHELL"
2044           export SHELL
2045           ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2046         elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2047              test "X$echo_testing_string" = 'X\t' &&
2048              echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2049              test "X$echo_testing_string" = "X$echo_test_string"; then
2050           ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2051         else
2052           # maybe with a smaller string...
2053           prev=:
2054
2055           for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2056             if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
2057             then
2058               break
2059             fi
2060             prev="$cmd"
2061           done
2062
2063           if test "$prev" != 'sed 50q "[$]0"'; then
2064             echo_test_string=`eval $prev`
2065             export echo_test_string
2066             exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2067           else
2068             # Oops.  We lost completely, so just stick with echo.
2069             ECHO=echo
2070           fi
2071         fi
2072       fi
2073     fi
2074   fi
2075 fi
2076
2077 # Copy echo and quote the copy suitably for passing to libtool from
2078 # the Makefile, instead of quoting the original, which is used later.
2079 lt_ECHO=$ECHO
2080 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2081    lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2082 fi
2083
2084 AC_SUBST(lt_ECHO)
2085 ])
2086 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2087 _LT_DECL([], [ECHO], [1],
2088     [An echo program that does not interpret backslashes])
2089 ])# _LT_PROG_ECHO_BACKSLASH
2090
2091
2092 # _LT_ENABLE_LOCK
2093 # ---------------
2094 m4_defun([_LT_ENABLE_LOCK],
2095 [AC_ARG_ENABLE([libtool-lock],
2096   [AS_HELP_STRING([--disable-libtool-lock],
2097     [avoid locking (might break parallel builds)])])
2098 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2099
2100 # Some flags need to be propagated to the compiler or linker for good
2101 # libtool support.
2102 case $host in
2103 ia64-*-hpux*)
2104   # Find out which ABI we are using.
2105   echo 'int i;' > conftest.$ac_ext
2106   if AC_TRY_EVAL(ac_compile); then
2107     case `/usr/bin/file conftest.$ac_objext` in
2108       *ELF-32*)
2109         HPUX_IA64_MODE="32"
2110         ;;
2111       *ELF-64*)
2112         HPUX_IA64_MODE="64"
2113         ;;
2114     esac
2115   fi
2116   rm -rf conftest*
2117   ;;
2118 *-*-irix6*)
2119   # Find out which ABI we are using.
2120   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2121   if AC_TRY_EVAL(ac_compile); then
2122     if test "$lt_cv_prog_gnu_ld" = yes; then
2123       case `/usr/bin/file conftest.$ac_objext` in
2124         *32-bit*)
2125           LD="${LD-ld} -melf32bsmip"
2126           ;;
2127         *N32*)
2128           LD="${LD-ld} -melf32bmipn32"
2129           ;;
2130         *64-bit*)
2131           LD="${LD-ld} -melf64bmip"
2132         ;;
2133       esac
2134     else
2135       case `/usr/bin/file conftest.$ac_objext` in
2136         *32-bit*)
2137           LD="${LD-ld} -32"
2138           ;;
2139         *N32*)
2140           LD="${LD-ld} -n32"
2141           ;;
2142         *64-bit*)
2143           LD="${LD-ld} -64"
2144           ;;
2145       esac
2146     fi
2147   fi
2148   rm -rf conftest*
2149   ;;
2150
2151 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2152 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2153   # Find out which ABI we are using.
2154   echo 'int i;' > conftest.$ac_ext
2155   if AC_TRY_EVAL(ac_compile); then
2156     case `/usr/bin/file conftest.o` in
2157       *32-bit*)
2158         case $host in
2159           x86_64-*kfreebsd*-gnu)
2160             LD="${LD-ld} -m elf_i386_fbsd"
2161             ;;
2162           x86_64-*linux*)
2163             LD="${LD-ld} -m elf_i386"
2164             ;;
2165           ppc64-*linux*|powerpc64-*linux*)
2166             LD="${LD-ld} -m elf32ppclinux"
2167             ;;
2168           s390x-*linux*)
2169             LD="${LD-ld} -m elf_s390"
2170             ;;
2171           sparc64-*linux*)
2172             LD="${LD-ld} -m elf32_sparc"
2173             ;;
2174         esac
2175         ;;
2176       *64-bit*)
2177         case $host in
2178           x86_64-*kfreebsd*-gnu)
2179             LD="${LD-ld} -m elf_x86_64_fbsd"
2180             ;;
2181           x86_64-*linux*)
2182             LD="${LD-ld} -m elf_x86_64"
2183             ;;
2184           ppc*-*linux*|powerpc*-*linux*)
2185             LD="${LD-ld} -m elf64ppc"
2186             ;;
2187           s390*-*linux*|s390*-*tpf*)
2188             LD="${LD-ld} -m elf64_s390"
2189             ;;
2190           sparc*-*linux*)
2191             LD="${LD-ld} -m elf64_sparc"
2192             ;;
2193         esac
2194         ;;
2195     esac
2196   fi
2197   rm -rf conftest*
2198   ;;
2199
2200 *-*-sco3.2v5*)
2201   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2202   SAVE_CFLAGS="$CFLAGS"
2203   CFLAGS="$CFLAGS -belf"
2204   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2205     [AC_LANG_PUSH(C)
2206      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2207      AC_LANG_POP])
2208   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2209     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2210     CFLAGS="$SAVE_CFLAGS"
2211   fi
2212   ;;
2213 sparc*-*solaris*)
2214   # Find out which ABI we are using.
2215   echo 'int i;' > conftest.$ac_ext
2216   if AC_TRY_EVAL(ac_compile); then
2217     case `/usr/bin/file conftest.o` in
2218     *64-bit*)
2219       case $lt_cv_prog_gnu_ld in
2220       yes*) LD="${LD-ld} -m elf64_sparc" ;;
2221       *)
2222         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2223           LD="${LD-ld} -64"
2224         fi
2225         ;;
2226       esac
2227       ;;
2228     esac
2229   fi
2230   rm -rf conftest*
2231   ;;
2232 esac
2233
2234 need_locks="$enable_libtool_lock"
2235 ])# _LT_ENABLE_LOCK
2236
2237
2238 # _LT_CMD_OLD_ARCHIVE
2239 # -------------------
2240 m4_defun([_LT_CMD_OLD_ARCHIVE],
2241 [AC_CHECK_TOOL(AR, ar, false)
2242 test -z "$AR" && AR=ar
2243 test -z "$AR_FLAGS" && AR_FLAGS=cru
2244 _LT_DECL([], [AR], [1], [The archiver])
2245 _LT_DECL([], [AR_FLAGS], [1])
2246
2247 AC_CHECK_TOOL(STRIP, strip, :)
2248 test -z "$STRIP" && STRIP=:
2249 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2250
2251 AC_CHECK_TOOL(RANLIB, ranlib, :)
2252 test -z "$RANLIB" && RANLIB=:
2253 _LT_DECL([], [RANLIB], [1],
2254     [Commands used to install an old-style archive])
2255
2256 # Determine commands to create old-style static archives.
2257 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2258 old_postinstall_cmds='chmod 644 $oldlib'
2259 old_postuninstall_cmds=
2260
2261 if test -n "$RANLIB"; then
2262   case $host_os in
2263   openbsd*)
2264     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2265     ;;
2266   *)
2267     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2268     ;;
2269   esac
2270   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2271 fi
2272 _LT_DECL([], [old_postinstall_cmds], [2])
2273 _LT_DECL([], [old_postuninstall_cmds], [2])
2274 _LT_TAGDECL([], [old_archive_cmds], [2],
2275     [Commands used to build an old-style archive])
2276 ])# _LT_CMD_OLD_ARCHIVE
2277
2278
2279 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2280 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2281 # ----------------------------------------------------------------
2282 # Check whether the given compiler option works
2283 AC_DEFUN([_LT_COMPILER_OPTION],
2284 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2285 m4_require([_LT_DECL_SED])dnl
2286 AC_CACHE_CHECK([$1], [$2],
2287   [$2=no
2288    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2289    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2290    lt_compiler_flag="$3"
2291    # Insert the option either (1) after the last *FLAGS variable, or
2292    # (2) before a word containing "conftest.", or (3) at the end.
2293    # Note that $ac_compile itself does not contain backslashes and begins
2294    # with a dollar sign (not a hyphen), so the echo should work correctly.
2295    # The option is referenced via a variable to avoid confusing sed.
2296    lt_compile=`echo "$ac_compile" | $SED \
2297    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2298    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2299    -e 's:$: $lt_compiler_flag:'`
2300    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2301    (eval "$lt_compile" 2>conftest.err)
2302    ac_status=$?
2303    cat conftest.err >&AS_MESSAGE_LOG_FD
2304    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2305    if (exit $ac_status) && test -s "$ac_outfile"; then
2306      # The compiler can only warn and ignore the option if not recognized
2307      # So say no if there are warnings other than the usual output.
2308      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2309      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2310      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2311        $2=yes
2312      fi
2313    fi
2314    $RM conftest*
2315 ])
2316
2317 if test x"[$]$2" = xyes; then
2318     m4_if([$5], , :, [$5])
2319 else
2320     m4_if([$6], , :, [$6])
2321 fi
2322 ])# _LT_COMPILER_OPTION
2323
2324 # Old name:
2325 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2326 dnl aclocal-1.4 backwards compatibility:
2327 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2328
2329
2330 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2331 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
2332 # ----------------------------------------------------
2333 # Check whether the given linker option works
2334 AC_DEFUN([_LT_LINKER_OPTION],
2335 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2336 m4_require([_LT_DECL_SED])dnl
2337 AC_CACHE_CHECK([$1], [$2],
2338   [$2=no
2339    save_LDFLAGS="$LDFLAGS"
2340    LDFLAGS="$LDFLAGS $3"
2341    echo "$lt_simple_link_test_code" > conftest.$ac_ext
2342    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2343      # The linker can only warn and ignore the option if not recognized
2344      # So say no if there are warnings
2345      if test -s conftest.err; then
2346        # Append any errors to the config.log.
2347        cat conftest.err 1>&AS_MESSAGE_LOG_FD
2348        $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2349        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2350        if diff conftest.exp conftest.er2 >/dev/null; then
2351          $2=yes
2352        fi
2353      else
2354        $2=yes
2355      fi
2356    fi
2357    $RM -r conftest*
2358    LDFLAGS="$save_LDFLAGS"
2359 ])
2360
2361 if test x"[$]$2" = xyes; then
2362     m4_if([$4], , :, [$4])
2363 else
2364     m4_if([$5], , :, [$5])
2365 fi
2366 ])# _LT_LINKER_OPTION
2367
2368 # Old name:
2369 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2370 dnl aclocal-1.4 backwards compatibility:
2371 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2372
2373
2374 # LT_CMD_MAX_LEN
2375 #---------------
2376 AC_DEFUN([LT_CMD_MAX_LEN],
2377 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2378 # find the maximum length of command line arguments
2379 AC_MSG_CHECKING([the maximum length of command line arguments])
2380 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2381   i=0
2382   teststring="ABCD"
2383
2384   case $build_os in
2385   msdosdjgpp*)
2386     # On DJGPP, this test can blow up pretty badly due to problems in libc
2387     # (any single argument exceeding 2000 bytes causes a buffer overrun
2388     # during glob expansion).  Even if it were fixed, the result of this
2389     # check would be larger than it should be.
2390     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2391     ;;
2392
2393   gnu*)
2394     # Under GNU Hurd, this test is not required because there is
2395     # no limit to the length of command line arguments.
2396     # Libtool will interpret -1 as no limit whatsoever
2397     lt_cv_sys_max_cmd_len=-1;
2398     ;;
2399
2400   cygwin* | mingw* | cegcc*)
2401     # On Win9x/ME, this test blows up -- it succeeds, but takes
2402     # about 5 minutes as the teststring grows exponentially.
2403     # Worse, since 9x/ME are not pre-emptively multitasking,
2404     # you end up with a "frozen" computer, even though with patience
2405     # the test eventually succeeds (with a max line length of 256k).
2406     # Instead, let's just punt: use the minimum linelength reported by
2407     # all of the supported platforms: 8192 (on NT/2K/XP).
2408     lt_cv_sys_max_cmd_len=8192;
2409     ;;
2410
2411   amigaos*)
2412     # On AmigaOS with pdksh, this test takes hours, literally.
2413     # So we just punt and use a minimum line length of 8192.
2414     lt_cv_sys_max_cmd_len=8192;
2415     ;;
2416
2417   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2418     # This has been around since 386BSD, at least.  Likely further.
2419     if test -x /sbin/sysctl; then
2420       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2421     elif test -x /usr/sbin/sysctl; then
2422       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2423     else
2424       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
2425     fi
2426     # And add a safety zone
2427     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2428     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2429     ;;
2430
2431   interix*)
2432     # We know the value 262144 and hardcode it with a safety zone (like BSD)
2433     lt_cv_sys_max_cmd_len=196608
2434     ;;
2435
2436   osf*)
2437     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2438     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2439     # nice to cause kernel panics so lets avoid the loop below.
2440     # First set a reasonable default.
2441     lt_cv_sys_max_cmd_len=16384
2442     #
2443     if test -x /sbin/sysconfig; then
2444       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2445         *1*) lt_cv_sys_max_cmd_len=-1 ;;
2446       esac
2447     fi
2448     ;;
2449   sco3.2v5*)
2450     lt_cv_sys_max_cmd_len=102400
2451     ;;
2452   sysv5* | sco5v6* | sysv4.2uw2*)
2453     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2454     if test -n "$kargmax"; then
2455       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
2456     else
2457       lt_cv_sys_max_cmd_len=32768
2458     fi
2459     ;;
2460   *)
2461     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2462     if test -n "$lt_cv_sys_max_cmd_len"; then
2463       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2464       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2465     else
2466       # Make teststring a little bigger before we do anything with it.
2467       # a 1K string should be a reasonable start.
2468       for i in 1 2 3 4 5 6 7 8 ; do
2469         teststring=$teststring$teststring
2470       done
2471       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2472       # If test is not a shell built-in, we'll probably end up computing a
2473       # maximum length that is only half of the actual maximum length, but
2474       # we can't tell.
2475       while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2476                  = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
2477               test $i != 17 # 1/2 MB should be enough
2478       do
2479         i=`expr $i + 1`
2480         teststring=$teststring$teststring
2481       done
2482       # Only check the string length outside the loop.
2483       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2484       teststring=
2485       # Add a significant safety factor because C++ compilers can tack on
2486       # massive amounts of additional arguments before passing them to the
2487       # linker.  It appears as though 1/2 is a usable value.
2488       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2489     fi
2490     ;;
2491   esac
2492 ])
2493 if test -n $lt_cv_sys_max_cmd_len ; then
2494   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2495 else
2496   AC_MSG_RESULT(none)
2497 fi
2498 max_cmd_len=$lt_cv_sys_max_cmd_len
2499 _LT_DECL([], [max_cmd_len], [0],
2500     [What is the maximum length of a command?])
2501 ])# LT_CMD_MAX_LEN
2502
2503 # Old name:
2504 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2505 dnl aclocal-1.4 backwards compatibility:
2506 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2507
2508
2509 # _LT_HEADER_DLFCN
2510 # ----------------
2511 m4_defun([_LT_HEADER_DLFCN],
2512 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2513 ])# _LT_HEADER_DLFCN
2514
2515
2516 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2517 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2518 # ----------------------------------------------------------------
2519 m4_defun([_LT_TRY_DLOPEN_SELF],
2520 [m4_require([_LT_HEADER_DLFCN])dnl
2521 if test "$cross_compiling" = yes; then :
2522   [$4]
2523 else
2524   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2525   lt_status=$lt_dlunknown
2526   cat > conftest.$ac_ext <<_LT_EOF
2527 [#line __oline__ "configure"
2528 #include "confdefs.h"
2529
2530 #if HAVE_DLFCN_H
2531 #include <dlfcn.h>
2532 #endif
2533
2534 #include <stdio.h>
2535
2536 #ifdef RTLD_GLOBAL
2537 #  define LT_DLGLOBAL           RTLD_GLOBAL
2538 #else
2539 #  ifdef DL_GLOBAL
2540 #    define LT_DLGLOBAL         DL_GLOBAL
2541 #  else
2542 #    define LT_DLGLOBAL         0
2543 #  endif
2544 #endif
2545
2546 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2547    find out it does not work in some platform. */
2548 #ifndef LT_DLLAZY_OR_NOW
2549 #  ifdef RTLD_LAZY
2550 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
2551 #  else
2552 #    ifdef DL_LAZY
2553 #      define LT_DLLAZY_OR_NOW          DL_LAZY
2554 #    else
2555 #      ifdef RTLD_NOW
2556 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
2557 #      else
2558 #        ifdef DL_NOW
2559 #          define LT_DLLAZY_OR_NOW      DL_NOW
2560 #        else
2561 #          define LT_DLLAZY_OR_NOW      0
2562 #        endif
2563 #      endif
2564 #    endif
2565 #  endif
2566 #endif
2567
2568 void fnord() { int i=42;}
2569 int main ()
2570 {
2571   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2572   int status = $lt_dlunknown;
2573
2574   if (self)
2575     {
2576       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2577       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2578       /* dlclose (self); */
2579     }
2580   else
2581     puts (dlerror ());
2582
2583   return status;
2584 }]
2585 _LT_EOF
2586   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2587     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2588     lt_status=$?
2589     case x$lt_status in
2590       x$lt_dlno_uscore) $1 ;;
2591       x$lt_dlneed_uscore) $2 ;;
2592       x$lt_dlunknown|x*) $3 ;;
2593     esac
2594   else :
2595     # compilation failed
2596     $3
2597   fi
2598 fi
2599 rm -fr conftest*
2600 ])# _LT_TRY_DLOPEN_SELF
2601
2602
2603 # LT_SYS_DLOPEN_SELF
2604 # ------------------
2605 AC_DEFUN([LT_SYS_DLOPEN_SELF],
2606 [m4_require([_LT_HEADER_DLFCN])dnl
2607 if test "x$enable_dlopen" != xyes; then
2608   enable_dlopen=unknown
2609   enable_dlopen_self=unknown
2610   enable_dlopen_self_static=unknown
2611 else
2612   lt_cv_dlopen=no
2613   lt_cv_dlopen_libs=
2614
2615   case $host_os in
2616   beos*)
2617     lt_cv_dlopen="load_add_on"
2618     lt_cv_dlopen_libs=
2619     lt_cv_dlopen_self=yes
2620     ;;
2621
2622   mingw* | pw32* | cegcc*)
2623     lt_cv_dlopen="LoadLibrary"
2624     lt_cv_dlopen_libs=
2625     ;;
2626
2627   cygwin*)
2628     lt_cv_dlopen="dlopen"
2629     lt_cv_dlopen_libs=
2630     ;;
2631
2632   darwin*)
2633   # if libdl is installed we need to link against it
2634     AC_CHECK_LIB([dl], [dlopen],
2635                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2636     lt_cv_dlopen="dyld"
2637     lt_cv_dlopen_libs=
2638     lt_cv_dlopen_self=yes
2639     ])
2640     ;;
2641
2642   *)
2643     AC_CHECK_FUNC([shl_load],
2644           [lt_cv_dlopen="shl_load"],
2645       [AC_CHECK_LIB([dld], [shl_load],
2646             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2647         [AC_CHECK_FUNC([dlopen],
2648               [lt_cv_dlopen="dlopen"],
2649           [AC_CHECK_LIB([dl], [dlopen],
2650                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2651             [AC_CHECK_LIB([svld], [dlopen],
2652                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2653               [AC_CHECK_LIB([dld], [dld_link],
2654                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2655               ])
2656             ])
2657           ])
2658         ])
2659       ])
2660     ;;
2661   esac
2662
2663   if test "x$lt_cv_dlopen" != xno; then
2664     enable_dlopen=yes
2665   else
2666     enable_dlopen=no
2667   fi
2668
2669   case $lt_cv_dlopen in
2670   dlopen)
2671     save_CPPFLAGS="$CPPFLAGS"
2672     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2673
2674     save_LDFLAGS="$LDFLAGS"
2675     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2676
2677     save_LIBS="$LIBS"
2678     LIBS="$lt_cv_dlopen_libs $LIBS"
2679
2680     AC_CACHE_CHECK([whether a program can dlopen itself],
2681           lt_cv_dlopen_self, [dnl
2682           _LT_TRY_DLOPEN_SELF(
2683             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2684             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2685     ])
2686
2687     if test "x$lt_cv_dlopen_self" = xyes; then
2688       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2689       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2690           lt_cv_dlopen_self_static, [dnl
2691           _LT_TRY_DLOPEN_SELF(
2692             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2693             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2694       ])
2695     fi
2696
2697     CPPFLAGS="$save_CPPFLAGS"
2698     LDFLAGS="$save_LDFLAGS"
2699     LIBS="$save_LIBS"
2700     ;;
2701   esac
2702
2703   case $lt_cv_dlopen_self in
2704   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2705   *) enable_dlopen_self=unknown ;;
2706   esac
2707
2708   case $lt_cv_dlopen_self_static in
2709   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2710   *) enable_dlopen_self_static=unknown ;;
2711   esac
2712 fi
2713 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2714          [Whether dlopen is supported])
2715 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2716          [Whether dlopen of programs is supported])
2717 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2718          [Whether dlopen of statically linked programs is supported])
2719 ])# LT_SYS_DLOPEN_SELF
2720
2721 # Old name:
2722 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2723 dnl aclocal-1.4 backwards compatibility:
2724 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2725
2726
2727 # _LT_COMPILER_C_O([TAGNAME])
2728 # ---------------------------
2729 # Check to see if options -c and -o are simultaneously supported by compiler.
2730 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2731 m4_defun([_LT_COMPILER_C_O],
2732 [m4_require([_LT_DECL_SED])dnl
2733 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2734 m4_require([_LT_TAG_COMPILER])dnl
2735 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2736   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2737   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2738    $RM -r conftest 2>/dev/null
2739    mkdir conftest
2740    cd conftest
2741    mkdir out
2742    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2743
2744    lt_compiler_flag="-o out/conftest2.$ac_objext"
2745    # Insert the option either (1) after the last *FLAGS variable, or
2746    # (2) before a word containing "conftest.", or (3) at the end.
2747    # Note that $ac_compile itself does not contain backslashes and begins
2748    # with a dollar sign (not a hyphen), so the echo should work correctly.
2749    lt_compile=`echo "$ac_compile" | $SED \
2750    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2751    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2752    -e 's:$: $lt_compiler_flag:'`
2753    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2754    (eval "$lt_compile" 2>out/conftest.err)
2755    ac_status=$?
2756    cat out/conftest.err >&AS_MESSAGE_LOG_FD
2757    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2758    if (exit $ac_status) && test -s out/conftest2.$ac_objext
2759    then
2760      # The compiler can only warn and ignore the option if not recognized
2761      # So say no if there are warnings
2762      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2763      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2764      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2765        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2766      fi
2767    fi
2768    chmod u+w . 2>&AS_MESSAGE_LOG_FD
2769    $RM conftest*
2770    # SGI C++ compiler will create directory out/ii_files/ for
2771    # template instantiation
2772    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2773    $RM out/* && rmdir out
2774    cd ..
2775    $RM -r conftest
2776    $RM conftest*
2777 ])
2778 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2779         [Does compiler simultaneously support -c and -o options?])
2780 ])# _LT_COMPILER_C_O
2781
2782
2783 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2784 # ----------------------------------
2785 # Check to see if we can do hard links to lock some files if needed
2786 m4_defun([_LT_COMPILER_FILE_LOCKS],
2787 [m4_require([_LT_ENABLE_LOCK])dnl
2788 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2789 _LT_COMPILER_C_O([$1])
2790
2791 hard_links="nottested"
2792 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2793   # do not overwrite the value of need_locks provided by the user
2794   AC_MSG_CHECKING([if we can lock with hard links])
2795   hard_links=yes
2796   $RM conftest*
2797   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2798   touch conftest.a
2799   ln conftest.a conftest.b 2>&5 || hard_links=no
2800   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2801   AC_MSG_RESULT([$hard_links])
2802   if test "$hard_links" = no; then
2803     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2804     need_locks=warn
2805   fi
2806 else
2807   need_locks=no
2808 fi
2809 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2810 ])# _LT_COMPILER_FILE_LOCKS
2811
2812
2813 # _LT_CHECK_OBJDIR
2814 # ----------------
2815 m4_defun([_LT_CHECK_OBJDIR],
2816 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2817 [rm -f .libs 2>/dev/null
2818 mkdir .libs 2>/dev/null
2819 if test -d .libs; then
2820   lt_cv_objdir=.libs
2821 else
2822   # MS-DOS does not allow filenames that begin with a dot.
2823   lt_cv_objdir=_libs
2824 fi
2825 rmdir .libs 2>/dev/null])
2826 objdir=$lt_cv_objdir
2827 _LT_DECL([], [objdir], [0],
2828          [The name of the directory that contains temporary libtool files])dnl
2829 m4_pattern_allow([LT_OBJDIR])dnl
2830 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2831   [Define to the sub-directory in which libtool stores uninstalled libraries.])
2832 ])# _LT_CHECK_OBJDIR
2833
2834
2835 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2836 # --------------------------------------
2837 # Check hardcoding attributes.
2838 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2839 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2840 _LT_TAGVAR(hardcode_action, $1)=
2841 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2842    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2843    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2844
2845   # We can hardcode non-existent directories.
2846   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2847      # If the only mechanism to avoid hardcoding is shlibpath_var, we
2848      # have to relink, otherwise we might link with an installed library
2849      # when we should be linking with a yet-to-be-installed one
2850      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2851      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2852     # Linking always hardcodes the temporary library directory.
2853     _LT_TAGVAR(hardcode_action, $1)=relink
2854   else
2855     # We can link without hardcoding, and we can hardcode nonexisting dirs.
2856     _LT_TAGVAR(hardcode_action, $1)=immediate
2857   fi
2858 else
2859   # We cannot hardcode anything, or else we can only hardcode existing
2860   # directories.
2861   _LT_TAGVAR(hardcode_action, $1)=unsupported
2862 fi
2863 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2864
2865 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2866    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2867   # Fast installation is not supported
2868   enable_fast_install=no
2869 elif test "$shlibpath_overrides_runpath" = yes ||
2870      test "$enable_shared" = no; then
2871   # Fast installation is not necessary
2872   enable_fast_install=needless
2873 fi
2874 _LT_TAGDECL([], [hardcode_action], [0],
2875     [How to hardcode a shared library path into an executable])
2876 ])# _LT_LINKER_HARDCODE_LIBPATH
2877
2878
2879 # _LT_CMD_STRIPLIB
2880 # ----------------
2881 m4_defun([_LT_CMD_STRIPLIB],
2882 [m4_require([_LT_DECL_EGREP])
2883 striplib=
2884 old_striplib=
2885 AC_MSG_CHECKING([whether stripping libraries is possible])
2886 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2887   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2888   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2889   AC_MSG_RESULT([yes])
2890 else
2891 # FIXME - insert some real tests, host_os isn't really good enough
2892   case $host_os in
2893   darwin*)
2894     if test -n "$STRIP" ; then
2895       striplib="$STRIP -x"
2896       old_striplib="$STRIP -S"
2897       AC_MSG_RESULT([yes])
2898     else
2899       AC_MSG_RESULT([no])
2900     fi
2901     ;;
2902   *)
2903     AC_MSG_RESULT([no])
2904     ;;
2905   esac
2906 fi
2907 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2908 _LT_DECL([], [striplib], [1])
2909 ])# _LT_CMD_STRIPLIB
2910
2911
2912 # _LT_SYS_DYNAMIC_LINKER([TAG])
2913 # -----------------------------
2914 # PORTME Fill in your ld.so characteristics
2915 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2916 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2917 m4_require([_LT_DECL_EGREP])dnl
2918 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2919 m4_require([_LT_DECL_OBJDUMP])dnl
2920 m4_require([_LT_DECL_SED])dnl
2921 AC_MSG_CHECKING([dynamic linker characteristics])
2922 m4_if([$1],
2923         [], [
2924 if test "$GCC" = yes; then
2925   case $host_os in
2926     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2927     *) lt_awk_arg="/^libraries:/" ;;
2928   esac
2929   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2930   if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2931     # if the path contains ";" then we assume it to be the separator
2932     # otherwise default to the standard path separator (i.e. ":") - it is
2933     # assumed that no part of a normal pathname contains ";" but that should
2934     # okay in the real world where ";" in dirpaths is itself problematic.
2935     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2936   else
2937     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2938   fi
2939   # Ok, now we have the path, separated by spaces, we can step through it
2940   # and add multilib dir if necessary.
2941   lt_tmp_lt_search_path_spec=
2942   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2943   for lt_sys_path in $lt_search_path_spec; do
2944     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2945       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2946     else
2947       test -d "$lt_sys_path" && \
2948         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2949     fi
2950   done
2951   lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2952 BEGIN {RS=" "; FS="/|\n";} {
2953   lt_foo="";
2954   lt_count=0;
2955   for (lt_i = NF; lt_i > 0; lt_i--) {
2956     if ($lt_i != "" && $lt_i != ".") {
2957       if ($lt_i == "..") {
2958         lt_count++;
2959       } else {
2960         if (lt_count == 0) {
2961           lt_foo="/" $lt_i lt_foo;
2962         } else {
2963           lt_count--;
2964         }
2965       }
2966     }
2967   }
2968   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2969   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2970 }'`
2971   sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2972 else
2973   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2974 fi])
2975 library_names_spec=
2976 libname_spec='lib$name'
2977 soname_spec=
2978 shrext_cmds=".so"
2979 postinstall_cmds=
2980 postuninstall_cmds=
2981 finish_cmds=
2982 finish_eval=
2983 shlibpath_var=
2984 shlibpath_overrides_runpath=unknown
2985 version_type=none
2986 dynamic_linker="$host_os ld.so"
2987 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2988 need_lib_prefix=unknown
2989 hardcode_into_libs=no
2990
2991 # when you set need_version to no, make sure it does not cause -set_version
2992 # flags to be left without arguments
2993 need_version=unknown
2994
2995 case $host_os in
2996 aix3*)
2997   version_type=linux
2998   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2999   shlibpath_var=LIBPATH
3000
3001   # AIX 3 has no versioning support, so we append a major version to the name.
3002   soname_spec='${libname}${release}${shared_ext}$major'
3003   ;;
3004
3005 aix[[4-9]]*)
3006   version_type=linux
3007   need_lib_prefix=no
3008   need_version=no
3009   hardcode_into_libs=yes
3010   if test "$host_cpu" = ia64; then
3011     # AIX 5 supports IA64
3012     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3013     shlibpath_var=LD_LIBRARY_PATH
3014   else
3015     # With GCC up to 2.95.x, collect2 would create an import file
3016     # for dependence libraries.  The import file would start with
3017     # the line `#! .'.  This would cause the generated library to
3018     # depend on `.', always an invalid library.  This was fixed in
3019     # development snapshots of GCC prior to 3.0.
3020     case $host_os in
3021       aix4 | aix4.[[01]] | aix4.[[01]].*)
3022       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3023            echo ' yes '
3024            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3025         :
3026       else
3027         can_build_shared=no
3028       fi
3029       ;;
3030     esac
3031     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3032     # soname into executable. Probably we can add versioning support to
3033     # collect2, so additional links can be useful in future.
3034     if test "$aix_use_runtimelinking" = yes; then
3035       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3036       # instead of lib<name>.a to let people know that these are not
3037       # typical AIX shared libraries.
3038       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3039     else
3040       # We preserve .a as extension for shared libraries through AIX4.2
3041       # and later when we are not doing run time linking.
3042       library_names_spec='${libname}${release}.a $libname.a'
3043       soname_spec='${libname}${release}${shared_ext}$major'
3044     fi
3045     shlibpath_var=LIBPATH
3046   fi
3047   ;;
3048
3049 amigaos*)
3050   case $host_cpu in
3051   powerpc)
3052     # Since July 2007 AmigaOS4 officially supports .so libraries.
3053     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3054     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3055     ;;
3056   m68k)
3057     library_names_spec='$libname.ixlibrary $libname.a'
3058     # Create ${libname}_ixlibrary.a entries in /sys/libs.
3059     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'
3060     ;;
3061   esac
3062   ;;
3063
3064 beos*)
3065   library_names_spec='${libname}${shared_ext}'
3066   dynamic_linker="$host_os ld.so"
3067   shlibpath_var=LIBRARY_PATH
3068   ;;
3069
3070 bsdi[[45]]*)
3071   version_type=linux
3072   need_version=no
3073   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3074   soname_spec='${libname}${release}${shared_ext}$major'
3075   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3076   shlibpath_var=LD_LIBRARY_PATH
3077   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3078   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3079   # the default ld.so.conf also contains /usr/contrib/lib and
3080   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3081   # libtool to hard-code these into programs
3082   ;;
3083
3084 cygwin* | mingw* | pw32* | cegcc*)
3085   version_type=windows
3086   shrext_cmds=".dll"
3087   need_version=no
3088   need_lib_prefix=no
3089
3090   case $GCC,$host_os in
3091   yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
3092     library_names_spec='$libname.dll.a'
3093     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3094     postinstall_cmds='base_file=`basename \${file}`~
3095       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3096       dldir=$destdir/`dirname \$dlpath`~
3097       test -d \$dldir || mkdir -p \$dldir~
3098       $install_prog $dir/$dlname \$dldir/$dlname~
3099       chmod a+x \$dldir/$dlname~
3100       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3101         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3102       fi'
3103     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3104       dlpath=$dir/\$dldll~
3105        $RM \$dlpath'
3106     shlibpath_overrides_runpath=yes
3107
3108     case $host_os in
3109     cygwin*)
3110       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3111       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3112       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3113       ;;
3114     mingw* | cegcc*)
3115       # MinGW DLLs use traditional 'lib' prefix
3116       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3117       sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3118       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3119         # It is most probably a Windows format PATH printed by
3120         # mingw gcc, but we are running on Cygwin. Gcc prints its search
3121         # path with ; separators, and with drive letters. We can handle the
3122         # drive letters (cygwin fileutils understands them), so leave them,
3123         # especially as we might pass files found there to a mingw objdump,
3124         # which wouldn't understand a cygwinified path. Ahh.
3125         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3126       else
3127         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3128       fi
3129       ;;
3130     pw32*)
3131       # pw32 DLLs use 'pw' prefix rather than 'lib'
3132       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3133       ;;
3134     esac
3135     ;;
3136
3137   *)
3138     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3139     ;;
3140   esac
3141   dynamic_linker='Win32 ld.exe'
3142   # FIXME: first we should search . and the directory the executable is in
3143   shlibpath_var=PATH
3144   ;;
3145
3146 darwin* | rhapsody*)
3147   dynamic_linker="$host_os dyld"
3148   version_type=darwin
3149   need_lib_prefix=no
3150   need_version=no
3151   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3152   soname_spec='${libname}${release}${major}$shared_ext'
3153   shlibpath_overrides_runpath=yes
3154   shlibpath_var=DYLD_LIBRARY_PATH
3155   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3156 m4_if([$1], [],[
3157   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3158   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3159   ;;
3160
3161 dgux*)
3162   version_type=linux
3163   need_lib_prefix=no
3164   need_version=no
3165   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3166   soname_spec='${libname}${release}${shared_ext}$major'
3167   shlibpath_var=LD_LIBRARY_PATH
3168   ;;
3169
3170 freebsd1*)
3171   dynamic_linker=no
3172   ;;
3173
3174 freebsd* | dragonfly*)
3175   # DragonFly does not have aout.  When/if they implement a new
3176   # versioning mechanism, adjust this.
3177   if test -x /usr/bin/objformat; then
3178     objformat=`/usr/bin/objformat`
3179   else
3180     case $host_os in
3181     freebsd[[123]]*) objformat=aout ;;
3182     *) objformat=elf ;;
3183     esac
3184   fi
3185   version_type=freebsd-$objformat
3186   case $version_type in
3187     freebsd-elf*)
3188       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3189       need_version=no
3190       need_lib_prefix=no
3191       ;;
3192     freebsd-*)
3193       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3194       need_version=yes
3195       ;;
3196   esac
3197   shlibpath_var=LD_LIBRARY_PATH
3198   case $host_os in
3199   freebsd2*)
3200     shlibpath_overrides_runpath=yes
3201     ;;
3202   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3203     shlibpath_overrides_runpath=yes
3204     hardcode_into_libs=yes
3205     ;;
3206   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3207   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3208     shlibpath_overrides_runpath=no
3209     hardcode_into_libs=yes
3210     ;;
3211   *) # from 4.6 on, and DragonFly
3212     shlibpath_overrides_runpath=yes
3213     hardcode_into_libs=yes
3214     ;;
3215   esac
3216   ;;
3217
3218 gnu*)
3219   version_type=linux
3220   need_lib_prefix=no
3221   need_version=no
3222   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3223   soname_spec='${libname}${release}${shared_ext}$major'
3224   shlibpath_var=LD_LIBRARY_PATH
3225   hardcode_into_libs=yes
3226   ;;
3227
3228 hpux9* | hpux10* | hpux11*)
3229   # Give a soname corresponding to the major version so that dld.sl refuses to
3230   # link against other versions.
3231   version_type=sunos
3232   need_lib_prefix=no
3233   need_version=no
3234   case $host_cpu in
3235   ia64*)
3236     shrext_cmds='.so'
3237     hardcode_into_libs=yes
3238     dynamic_linker="$host_os dld.so"
3239     shlibpath_var=LD_LIBRARY_PATH
3240     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3241     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3242     soname_spec='${libname}${release}${shared_ext}$major'
3243     if test "X$HPUX_IA64_MODE" = X32; then
3244       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3245     else
3246       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3247     fi
3248     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3249     ;;
3250   hppa*64*)
3251     shrext_cmds='.sl'
3252     hardcode_into_libs=yes
3253     dynamic_linker="$host_os dld.sl"
3254     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3255     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3256     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3257     soname_spec='${libname}${release}${shared_ext}$major'
3258     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3259     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3260     ;;
3261   *)
3262     shrext_cmds='.sl'
3263     dynamic_linker="$host_os dld.sl"
3264     shlibpath_var=SHLIB_PATH
3265     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3266     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3267     soname_spec='${libname}${release}${shared_ext}$major'
3268     ;;
3269   esac
3270   # HP-UX runs *really* slowly unless shared libraries are mode 555.
3271   postinstall_cmds='chmod 555 $lib'
3272   ;;
3273
3274 interix[[3-9]]*)
3275   version_type=linux
3276   need_lib_prefix=no
3277   need_version=no
3278   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3279   soname_spec='${libname}${release}${shared_ext}$major'
3280   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3281   shlibpath_var=LD_LIBRARY_PATH
3282   shlibpath_overrides_runpath=no
3283   hardcode_into_libs=yes
3284   ;;
3285
3286 irix5* | irix6* | nonstopux*)
3287   case $host_os in
3288     nonstopux*) version_type=nonstopux ;;
3289     *)
3290         if test "$lt_cv_prog_gnu_ld" = yes; then
3291                 version_type=linux
3292         else
3293                 version_type=irix
3294         fi ;;
3295   esac
3296   need_lib_prefix=no
3297   need_version=no
3298   soname_spec='${libname}${release}${shared_ext}$major'
3299   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3300   case $host_os in
3301   irix5* | nonstopux*)
3302     libsuff= shlibsuff=
3303     ;;
3304   *)
3305     case $LD in # libtool.m4 will add one of these switches to LD
3306     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3307       libsuff= shlibsuff= libmagic=32-bit;;
3308     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3309       libsuff=32 shlibsuff=N32 libmagic=N32;;
3310     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3311       libsuff=64 shlibsuff=64 libmagic=64-bit;;
3312     *) libsuff= shlibsuff= libmagic=never-match;;
3313     esac
3314     ;;
3315   esac
3316   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3317   shlibpath_overrides_runpath=no
3318   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3319   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3320   hardcode_into_libs=yes
3321   ;;
3322
3323 # No shared lib support for Linux oldld, aout, or coff.
3324 linux*oldld* | linux*aout* | linux*coff*)
3325   dynamic_linker=no
3326   ;;
3327
3328 # This must be Linux ELF.
3329 linux* | k*bsd*-gnu)
3330   version_type=linux
3331   need_lib_prefix=no
3332   need_version=no
3333   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3334   soname_spec='${libname}${release}${shared_ext}$major'
3335   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3336   shlibpath_var=LD_LIBRARY_PATH
3337   shlibpath_overrides_runpath=no
3338   # Some binutils ld are patched to set DT_RUNPATH
3339   save_LDFLAGS=$LDFLAGS
3340   save_libdir=$libdir
3341   eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3342        LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3343   AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3344     [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3345        [shlibpath_overrides_runpath=yes])])
3346   LDFLAGS=$save_LDFLAGS
3347   libdir=$save_libdir
3348
3349   # This implies no fast_install, which is unacceptable.
3350   # Some rework will be needed to allow for fast_install
3351   # before this can be enabled.
3352   hardcode_into_libs=yes
3353
3354   # Add ABI-specific directories to the system library path.
3355   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
3356
3357   # Append ld.so.conf contents to the search path
3358   if test -f /etc/ld.so.conf; then
3359     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' ' '`
3360     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
3361   fi
3362
3363   # We used to test for /lib/ld.so.1 and disable shared libraries on
3364   # powerpc, because MkLinux only supported shared libraries with the
3365   # GNU dynamic linker.  Since this was broken with cross compilers,
3366   # most powerpc-linux boxes support dynamic linking these days and
3367   # people can always --disable-shared, the test was removed, and we
3368   # assume the GNU/Linux dynamic linker is in use.
3369   dynamic_linker='GNU/Linux ld.so'
3370   ;;
3371
3372 netbsd*)
3373   version_type=sunos
3374   need_lib_prefix=no
3375   need_version=no
3376   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3377     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3378     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3379     dynamic_linker='NetBSD (a.out) ld.so'
3380   else
3381     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3382     soname_spec='${libname}${release}${shared_ext}$major'
3383     dynamic_linker='NetBSD ld.elf_so'
3384   fi
3385   shlibpath_var=LD_LIBRARY_PATH
3386   shlibpath_overrides_runpath=yes
3387   hardcode_into_libs=yes
3388   ;;
3389
3390 newsos6)
3391   version_type=linux
3392   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3393   shlibpath_var=LD_LIBRARY_PATH
3394   shlibpath_overrides_runpath=yes
3395   ;;
3396
3397 *nto* | *qnx*)
3398   version_type=qnx
3399   need_lib_prefix=no
3400   need_version=no
3401   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3402   soname_spec='${libname}${release}${shared_ext}$major'
3403   shlibpath_var=LD_LIBRARY_PATH
3404   shlibpath_overrides_runpath=no
3405   hardcode_into_libs=yes
3406   dynamic_linker='ldqnx.so'
3407   ;;
3408
3409 openbsd*)
3410   version_type=sunos
3411   sys_lib_dlsearch_path_spec="/usr/lib"
3412   need_lib_prefix=no
3413   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3414   case $host_os in
3415     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
3416     *)                          need_version=no  ;;
3417   esac
3418   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3419   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3420   shlibpath_var=LD_LIBRARY_PATH
3421   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3422     case $host_os in
3423       openbsd2.[[89]] | openbsd2.[[89]].*)
3424         shlibpath_overrides_runpath=no
3425         ;;
3426       *)
3427         shlibpath_overrides_runpath=yes
3428         ;;
3429       esac
3430   else
3431     shlibpath_overrides_runpath=yes
3432   fi
3433   ;;
3434
3435 os2*)
3436   libname_spec='$name'
3437   shrext_cmds=".dll"
3438   need_lib_prefix=no
3439   library_names_spec='$libname${shared_ext} $libname.a'
3440   dynamic_linker='OS/2 ld.exe'
3441   shlibpath_var=LIBPATH
3442   ;;
3443
3444 osf3* | osf4* | osf5*)
3445   version_type=osf
3446   need_lib_prefix=no
3447   need_version=no
3448   soname_spec='${libname}${release}${shared_ext}$major'
3449   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3450   shlibpath_var=LD_LIBRARY_PATH
3451   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3452   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3453   ;;
3454
3455 rdos*)
3456   dynamic_linker=no
3457   ;;
3458
3459 solaris*)
3460   version_type=linux
3461   need_lib_prefix=no
3462   need_version=no
3463   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3464   soname_spec='${libname}${release}${shared_ext}$major'
3465   shlibpath_var=LD_LIBRARY_PATH
3466   shlibpath_overrides_runpath=yes
3467   hardcode_into_libs=yes
3468   # ldd complains unless libraries are executable
3469   postinstall_cmds='chmod +x $lib'
3470   ;;
3471
3472 sunos4*)
3473   version_type=sunos
3474   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3475   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3476   shlibpath_var=LD_LIBRARY_PATH
3477   shlibpath_overrides_runpath=yes
3478   if test "$with_gnu_ld" = yes; then
3479     need_lib_prefix=no
3480   fi
3481   need_version=yes
3482   ;;
3483
3484 sysv4 | sysv4.3*)
3485   version_type=linux
3486   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3487   soname_spec='${libname}${release}${shared_ext}$major'
3488   shlibpath_var=LD_LIBRARY_PATH
3489   case $host_vendor in
3490     sni)
3491       shlibpath_overrides_runpath=no
3492       need_lib_prefix=no
3493       runpath_var=LD_RUN_PATH
3494       ;;
3495     siemens)
3496       need_lib_prefix=no
3497       ;;
3498     motorola)
3499       need_lib_prefix=no
3500       need_version=no
3501       shlibpath_overrides_runpath=no
3502       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3503       ;;
3504   esac
3505   ;;
3506
3507 sysv4*MP*)
3508   if test -d /usr/nec ;then
3509     version_type=linux
3510     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3511     soname_spec='$libname${shared_ext}.$major'
3512     shlibpath_var=LD_LIBRARY_PATH
3513   fi
3514   ;;
3515
3516 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3517   version_type=freebsd-elf
3518   need_lib_prefix=no
3519   need_version=no
3520   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3521   soname_spec='${libname}${release}${shared_ext}$major'
3522   shlibpath_var=LD_LIBRARY_PATH
3523   shlibpath_overrides_runpath=yes
3524   hardcode_into_libs=yes
3525   if test "$with_gnu_ld" = yes; then
3526     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3527   else
3528     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3529     case $host_os in
3530       sco3.2v5*)
3531         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3532         ;;
3533     esac
3534   fi
3535   sys_lib_dlsearch_path_spec='/usr/lib'
3536   ;;
3537
3538 tpf*)
3539   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3540   version_type=linux
3541   need_lib_prefix=no
3542   need_version=no
3543   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3544   shlibpath_var=LD_LIBRARY_PATH
3545   shlibpath_overrides_runpath=no
3546   hardcode_into_libs=yes
3547   ;;
3548
3549 uts4*)
3550   version_type=linux
3551   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3552   soname_spec='${libname}${release}${shared_ext}$major'
3553   shlibpath_var=LD_LIBRARY_PATH
3554   ;;
3555
3556 *)
3557   dynamic_linker=no
3558   ;;
3559 esac
3560 AC_MSG_RESULT([$dynamic_linker])
3561 test "$dynamic_linker" = no && can_build_shared=no
3562
3563 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3564 if test "$GCC" = yes; then
3565   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3566 fi
3567
3568 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3569   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3570 fi
3571 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3572   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3573 fi
3574
3575 _LT_DECL([], [variables_saved_for_relink], [1],
3576     [Variables whose values should be saved in libtool wrapper scripts and
3577     restored at link time])
3578 _LT_DECL([], [need_lib_prefix], [0],
3579     [Do we need the "lib" prefix for modules?])
3580 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3581 _LT_DECL([], [version_type], [0], [Library versioning type])
3582 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3583 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3584 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3585     [Is shlibpath searched before the hard-coded library search path?])
3586 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3587 _LT_DECL([], [library_names_spec], [1],
3588     [[List of archive names.  First name is the real one, the rest are links.
3589     The last name is the one that the linker finds with -lNAME]])
3590 _LT_DECL([], [soname_spec], [1],
3591     [[The coded name of the library, if different from the real name]])
3592 _LT_DECL([], [postinstall_cmds], [2],
3593     [Command to use after installation of a shared archive])
3594 _LT_DECL([], [postuninstall_cmds], [2],
3595     [Command to use after uninstallation of a shared archive])
3596 _LT_DECL([], [finish_cmds], [2],
3597     [Commands used to finish a libtool library installation in a directory])
3598 _LT_DECL([], [finish_eval], [1],
3599     [[As "finish_cmds", except a single script fragment to be evaled but
3600     not shown]])
3601 _LT_DECL([], [hardcode_into_libs], [0],
3602     [Whether we should hardcode library paths into libraries])
3603 _LT_DECL([], [sys_lib_search_path_spec], [2],
3604     [Compile-time system search path for libraries])
3605 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3606     [Run-time system search path for libraries])
3607 ])# _LT_SYS_DYNAMIC_LINKER
3608
3609
3610 # _LT_PATH_TOOL_PREFIX(TOOL)
3611 # --------------------------
3612 # find a file program which can recognize shared library
3613 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3614 [m4_require([_LT_DECL_EGREP])dnl
3615 AC_MSG_CHECKING([for $1])
3616 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3617 [case $MAGIC_CMD in
3618 [[\\/*] |  ?:[\\/]*])
3619   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3620   ;;
3621 *)
3622   lt_save_MAGIC_CMD="$MAGIC_CMD"
3623   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3624 dnl $ac_dummy forces splitting on constant user-supplied paths.
3625 dnl POSIX.2 word splitting is done only on the output of word expansions,
3626 dnl not every word.  This closes a longstanding sh security hole.
3627   ac_dummy="m4_if([$2], , $PATH, [$2])"
3628   for ac_dir in $ac_dummy; do
3629     IFS="$lt_save_ifs"
3630     test -z "$ac_dir" && ac_dir=.
3631     if test -f $ac_dir/$1; then
3632       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3633       if test -n "$file_magic_test_file"; then
3634         case $deplibs_check_method in
3635         "file_magic "*)
3636           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3637           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3638           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3639             $EGREP "$file_magic_regex" > /dev/null; then
3640             :
3641           else
3642             cat <<_LT_EOF 1>&2
3643
3644 *** Warning: the command libtool uses to detect shared libraries,
3645 *** $file_magic_cmd, produces output that libtool cannot recognize.
3646 *** The result is that libtool may fail to recognize shared libraries
3647 *** as such.  This will affect the creation of libtool libraries that
3648 *** depend on shared libraries, but programs linked with such libtool
3649 *** libraries will work regardless of this problem.  Nevertheless, you
3650 *** may want to report the problem to your system manager and/or to
3651 *** bug-libtool@gnu.org
3652
3653 _LT_EOF
3654           fi ;;
3655         esac
3656       fi
3657       break
3658     fi
3659   done
3660   IFS="$lt_save_ifs"
3661   MAGIC_CMD="$lt_save_MAGIC_CMD"
3662   ;;
3663 esac])
3664 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3665 if test -n "$MAGIC_CMD"; then
3666   AC_MSG_RESULT($MAGIC_CMD)
3667 else
3668   AC_MSG_RESULT(no)
3669 fi
3670 _LT_DECL([], [MAGIC_CMD], [0],
3671          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3672 ])# _LT_PATH_TOOL_PREFIX
3673
3674 # Old name:
3675 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3676 dnl aclocal-1.4 backwards compatibility:
3677 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3678
3679
3680 # _LT_PATH_MAGIC
3681 # --------------
3682 # find a file program which can recognize a shared library
3683 m4_defun([_LT_PATH_MAGIC],
3684 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3685 if test -z "$lt_cv_path_MAGIC_CMD"; then
3686   if test -n "$ac_tool_prefix"; then
3687     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3688   else
3689     MAGIC_CMD=:
3690   fi
3691 fi
3692 ])# _LT_PATH_MAGIC
3693
3694
3695 # LT_PATH_LD
3696 # ----------
3697 # find the pathname to the GNU or non-GNU linker
3698 AC_DEFUN([LT_PATH_LD],
3699 [AC_REQUIRE([AC_PROG_CC])dnl
3700 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3701 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3702 m4_require([_LT_DECL_SED])dnl
3703 m4_require([_LT_DECL_EGREP])dnl
3704
3705 AC_ARG_WITH([gnu-ld],
3706     [AS_HELP_STRING([--with-gnu-ld],
3707         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3708     [test "$withval" = no || with_gnu_ld=yes],
3709     [with_gnu_ld=no])dnl
3710
3711 ac_prog=ld
3712 if test "$GCC" = yes; then
3713   # Check if gcc -print-prog-name=ld gives a path.
3714   AC_MSG_CHECKING([for ld used by $CC])
3715   case $host in
3716   *-*-mingw*)
3717     # gcc leaves a trailing carriage return which upsets mingw
3718     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3719   *)
3720     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3721   esac
3722   case $ac_prog in
3723     # Accept absolute paths.
3724     [[\\/]]* | ?:[[\\/]]*)
3725       re_direlt='/[[^/]][[^/]]*/\.\./'
3726       # Canonicalize the pathname of ld
3727       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3728       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3729         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3730       done
3731       test -z "$LD" && LD="$ac_prog"
3732       ;;
3733   "")
3734     # If it fails, then pretend we aren't using GCC.
3735     ac_prog=ld
3736     ;;
3737   *)
3738     # If it is relative, then search for the first ld in PATH.
3739     with_gnu_ld=unknown
3740     ;;
3741   esac
3742 elif test "$with_gnu_ld" = yes; then
3743   AC_MSG_CHECKING([for GNU ld])
3744 else
3745   AC_MSG_CHECKING([for non-GNU ld])
3746 fi
3747 AC_CACHE_VAL(lt_cv_path_LD,
3748 [if test -z "$LD"; then
3749   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3750   for ac_dir in $PATH; do
3751     IFS="$lt_save_ifs"
3752     test -z "$ac_dir" && ac_dir=.
3753     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3754       lt_cv_path_LD="$ac_dir/$ac_prog"
3755       # Check to see if the program is GNU ld.  I'd rather use --version,
3756       # but apparently some variants of GNU ld only accept -v.
3757       # Break only if it was the GNU/non-GNU ld that we prefer.
3758       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3759       *GNU* | *'with BFD'*)
3760         test "$with_gnu_ld" != no && break
3761         ;;
3762       *)
3763         test "$with_gnu_ld" != yes && break
3764         ;;
3765       esac
3766     fi
3767   done
3768   IFS="$lt_save_ifs"
3769 else
3770   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3771 fi])
3772 LD="$lt_cv_path_LD"
3773 if test -n "$LD"; then
3774   AC_MSG_RESULT($LD)
3775 else
3776   AC_MSG_RESULT(no)
3777 fi
3778 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3779 _LT_PATH_LD_GNU
3780 AC_SUBST([LD])
3781
3782 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3783 ])# LT_PATH_LD
3784
3785 # Old names:
3786 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3787 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3788 dnl aclocal-1.4 backwards compatibility:
3789 dnl AC_DEFUN([AM_PROG_LD], [])
3790 dnl AC_DEFUN([AC_PROG_LD], [])
3791
3792
3793 # _LT_PATH_LD_GNU
3794 #- --------------
3795 m4_defun([_LT_PATH_LD_GNU],
3796 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3797 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3798 case `$LD -v 2>&1 </dev/null` in
3799 *GNU* | *'with BFD'*)
3800   lt_cv_prog_gnu_ld=yes
3801   ;;
3802 *)
3803   lt_cv_prog_gnu_ld=no
3804   ;;
3805 esac])
3806 with_gnu_ld=$lt_cv_prog_gnu_ld
3807 ])# _LT_PATH_LD_GNU
3808
3809
3810 # _LT_CMD_RELOAD
3811 # --------------
3812 # find reload flag for linker
3813 #   -- PORTME Some linkers may need a different reload flag.
3814 m4_defun([_LT_CMD_RELOAD],
3815 [AC_CACHE_CHECK([for $LD option to reload object files],
3816   lt_cv_ld_reload_flag,
3817   [lt_cv_ld_reload_flag='-r'])
3818 reload_flag=$lt_cv_ld_reload_flag
3819 case $reload_flag in
3820 "" | " "*) ;;
3821 *) reload_flag=" $reload_flag" ;;
3822 esac
3823 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3824 case $host_os in
3825   darwin*)
3826     if test "$GCC" = yes; then
3827       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3828     else
3829       reload_cmds='$LD$reload_flag -o $output$reload_objs'
3830     fi
3831     ;;
3832 esac
3833 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3834 _LT_DECL([], [reload_cmds], [2])dnl
3835 ])# _LT_CMD_RELOAD
3836
3837
3838 # _LT_CHECK_MAGIC_METHOD
3839 # ----------------------
3840 # how to check for library dependencies
3841 #  -- PORTME fill in with the dynamic library characteristics
3842 m4_defun([_LT_CHECK_MAGIC_METHOD],
3843 [m4_require([_LT_DECL_EGREP])
3844 m4_require([_LT_DECL_OBJDUMP])
3845 AC_CACHE_CHECK([how to recognize dependent libraries],
3846 lt_cv_deplibs_check_method,
3847 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3848 lt_cv_file_magic_test_file=
3849 lt_cv_deplibs_check_method='unknown'
3850 # Need to set the preceding variable on all platforms that support
3851 # interlibrary dependencies.
3852 # 'none' -- dependencies not supported.
3853 # `unknown' -- same as none, but documents that we really don't know.
3854 # 'pass_all' -- all dependencies passed with no checks.
3855 # 'test_compile' -- check by making test program.
3856 # 'file_magic [[regex]]' -- check by looking for files in library path
3857 # which responds to the $file_magic_cmd with a given extended regex.
3858 # If you have `file' or equivalent on your system and you're not sure
3859 # whether `pass_all' will *always* work, you probably want this one.
3860
3861 case $host_os in
3862 aix[[4-9]]*)
3863   lt_cv_deplibs_check_method=pass_all
3864   ;;
3865
3866 beos*)
3867   lt_cv_deplibs_check_method=pass_all
3868   ;;
3869
3870 bsdi[[45]]*)
3871   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3872   lt_cv_file_magic_cmd='/usr/bin/file -L'
3873   lt_cv_file_magic_test_file=/shlib/libc.so
3874   ;;
3875
3876 cygwin*)
3877   # func_win32_libid is a shell function defined in ltmain.sh
3878   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3879   lt_cv_file_magic_cmd='func_win32_libid'
3880   ;;
3881
3882 mingw* | pw32*)
3883   # Base MSYS/MinGW do not provide the 'file' command needed by
3884   # func_win32_libid shell function, so use a weaker test based on 'objdump',
3885   # unless we find 'file', for example because we are cross-compiling.
3886   if ( file / ) >/dev/null 2>&1; then
3887     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3888     lt_cv_file_magic_cmd='func_win32_libid'
3889   else
3890     lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3891     lt_cv_file_magic_cmd='$OBJDUMP -f'
3892   fi
3893   ;;
3894
3895 cegcc)
3896   # use the weaker test based on 'objdump'. See mingw*.
3897   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3898   lt_cv_file_magic_cmd='$OBJDUMP -f'
3899   ;;
3900
3901 darwin* | rhapsody*)
3902   lt_cv_deplibs_check_method=pass_all
3903   ;;
3904
3905 freebsd* | dragonfly*)
3906   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3907     case $host_cpu in
3908     i*86 )
3909       # Not sure whether the presence of OpenBSD here was a mistake.
3910       # Let's accept both of them until this is cleared up.
3911       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3912       lt_cv_file_magic_cmd=/usr/bin/file
3913       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3914       ;;
3915     esac
3916   else
3917     lt_cv_deplibs_check_method=pass_all
3918   fi
3919   ;;
3920
3921 gnu*)
3922   lt_cv_deplibs_check_method=pass_all
3923   ;;
3924
3925 hpux10.20* | hpux11*)
3926   lt_cv_file_magic_cmd=/usr/bin/file
3927   case $host_cpu in
3928   ia64*)
3929     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3930     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3931     ;;
3932   hppa*64*)
3933     [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]']
3934     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3935     ;;
3936   *)
3937     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3938     lt_cv_file_magic_test_file=/usr/lib/libc.sl
3939     ;;
3940   esac
3941   ;;
3942
3943 interix[[3-9]]*)
3944   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3945   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3946   ;;
3947
3948 irix5* | irix6* | nonstopux*)
3949   case $LD in
3950   *-32|*"-32 ") libmagic=32-bit;;
3951   *-n32|*"-n32 ") libmagic=N32;;
3952   *-64|*"-64 ") libmagic=64-bit;;
3953   *) libmagic=never-match;;
3954   esac
3955   lt_cv_deplibs_check_method=pass_all
3956   ;;
3957
3958 # This must be Linux ELF.
3959 linux* | k*bsd*-gnu)
3960   lt_cv_deplibs_check_method=pass_all
3961   ;;
3962
3963 netbsd*)
3964   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3965     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3966   else
3967     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3968   fi
3969   ;;
3970
3971 newos6*)
3972   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3973   lt_cv_file_magic_cmd=/usr/bin/file
3974   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3975   ;;
3976
3977 *nto* | *qnx*)
3978   lt_cv_deplibs_check_method=pass_all
3979   ;;
3980
3981 openbsd*)
3982   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3983     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3984   else
3985     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3986   fi
3987   ;;
3988
3989 osf3* | osf4* | osf5*)
3990   lt_cv_deplibs_check_method=pass_all
3991   ;;
3992
3993 rdos*)
3994   lt_cv_deplibs_check_method=pass_all
3995   ;;
3996
3997 solaris*)
3998   lt_cv_deplibs_check_method=pass_all
3999   ;;
4000
4001 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4002   lt_cv_deplibs_check_method=pass_all
4003   ;;
4004
4005 sysv4 | sysv4.3*)
4006   case $host_vendor in
4007   motorola)
4008     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]]'
4009     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4010     ;;
4011   ncr)
4012     lt_cv_deplibs_check_method=pass_all
4013     ;;
4014   sequent)
4015     lt_cv_file_magic_cmd='/bin/file'
4016     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4017     ;;
4018   sni)
4019     lt_cv_file_magic_cmd='/bin/file'
4020     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4021     lt_cv_file_magic_test_file=/lib/libc.so
4022     ;;
4023   siemens)
4024     lt_cv_deplibs_check_method=pass_all
4025     ;;
4026   pc)
4027     lt_cv_deplibs_check_method=pass_all
4028     ;;
4029   esac
4030   ;;
4031
4032 tpf*)
4033   lt_cv_deplibs_check_method=pass_all
4034   ;;
4035 esac
4036 ])
4037 file_magic_cmd=$lt_cv_file_magic_cmd
4038 deplibs_check_method=$lt_cv_deplibs_check_method
4039 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4040
4041 _LT_DECL([], [deplibs_check_method], [1],
4042     [Method to check whether dependent libraries are shared objects])
4043 _LT_DECL([], [file_magic_cmd], [1],
4044     [Command to use when deplibs_check_method == "file_magic"])
4045 ])# _LT_CHECK_MAGIC_METHOD
4046
4047
4048 # LT_PATH_NM
4049 # ----------
4050 # find the pathname to a BSD- or MS-compatible name lister
4051 AC_DEFUN([LT_PATH_NM],
4052 [AC_REQUIRE([AC_PROG_CC])dnl
4053 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4054 [if test -n "$NM"; then
4055   # Let the user override the test.
4056   lt_cv_path_NM="$NM"
4057 else
4058   lt_nm_to_check="${ac_tool_prefix}nm"
4059   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4060     lt_nm_to_check="$lt_nm_to_check nm"
4061   fi
4062   for lt_tmp_nm in $lt_nm_to_check; do
4063     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4064     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4065       IFS="$lt_save_ifs"
4066       test -z "$ac_dir" && ac_dir=.
4067       tmp_nm="$ac_dir/$lt_tmp_nm"
4068       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4069         # Check to see if the nm accepts a BSD-compat flag.
4070         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4071         #   nm: unknown option "B" ignored
4072         # Tru64's nm complains that /dev/null is an invalid object file
4073         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4074         */dev/null* | *'Invalid file or object type'*)
4075           lt_cv_path_NM="$tmp_nm -B"
4076           break
4077           ;;
4078         *)
4079           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4080           */dev/null*)
4081             lt_cv_path_NM="$tmp_nm -p"
4082             break
4083             ;;
4084           *)
4085             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4086             continue # so that we can try to find one that supports BSD flags
4087             ;;
4088           esac
4089           ;;
4090         esac
4091       fi
4092     done
4093     IFS="$lt_save_ifs"
4094   done
4095   : ${lt_cv_path_NM=no}
4096 fi])
4097 if test "$lt_cv_path_NM" != "no"; then
4098   NM="$lt_cv_path_NM"
4099 else
4100   # Didn't find any BSD compatible name lister, look for dumpbin.
4101   AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
4102   AC_SUBST([DUMPBIN])
4103   if test "$DUMPBIN" != ":"; then
4104     NM="$DUMPBIN"
4105   fi
4106 fi
4107 test -z "$NM" && NM=nm
4108 AC_SUBST([NM])
4109 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4110
4111 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4112   [lt_cv_nm_interface="BSD nm"
4113   echo "int some_variable = 0;" > conftest.$ac_ext
4114   (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4115   (eval "$ac_compile" 2>conftest.err)
4116   cat conftest.err >&AS_MESSAGE_LOG_FD
4117   (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4118   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4119   cat conftest.err >&AS_MESSAGE_LOG_FD
4120   (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
4121   cat conftest.out >&AS_MESSAGE_LOG_FD
4122   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4123     lt_cv_nm_interface="MS dumpbin"
4124   fi
4125   rm -f conftest*])
4126 ])# LT_PATH_NM
4127
4128 # Old names:
4129 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4130 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4131 dnl aclocal-1.4 backwards compatibility:
4132 dnl AC_DEFUN([AM_PROG_NM], [])
4133 dnl AC_DEFUN([AC_PROG_NM], [])
4134
4135
4136 # LT_LIB_M
4137 # --------
4138 # check for math library
4139 AC_DEFUN([LT_LIB_M],
4140 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4141 LIBM=
4142 case $host in
4143 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4144   # These system don't have libm, or don't need it
4145   ;;
4146 *-ncr-sysv4.3*)
4147   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4148   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4149   ;;
4150 *)
4151   AC_CHECK_LIB(m, cos, LIBM="-lm")
4152   ;;
4153 esac
4154 AC_SUBST([LIBM])
4155 ])# LT_LIB_M
4156
4157 # Old name:
4158 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4159 dnl aclocal-1.4 backwards compatibility:
4160 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4161
4162
4163 # _LT_COMPILER_NO_RTTI([TAGNAME])
4164 # -------------------------------
4165 m4_defun([_LT_COMPILER_NO_RTTI],
4166 [m4_require([_LT_TAG_COMPILER])dnl
4167
4168 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4169
4170 if test "$GCC" = yes; then
4171   _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4172
4173   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4174     lt_cv_prog_compiler_rtti_exceptions,
4175     [-fno-rtti -fno-exceptions], [],
4176     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4177 fi
4178 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4179         [Compiler flag to turn off builtin functions])
4180 ])# _LT_COMPILER_NO_RTTI
4181
4182
4183 # _LT_CMD_GLOBAL_SYMBOLS
4184 # ----------------------
4185 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4186 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4187 AC_REQUIRE([AC_PROG_CC])dnl
4188 AC_REQUIRE([LT_PATH_NM])dnl
4189 AC_REQUIRE([LT_PATH_LD])dnl
4190 m4_require([_LT_DECL_SED])dnl
4191 m4_require([_LT_DECL_EGREP])dnl
4192 m4_require([_LT_TAG_COMPILER])dnl
4193
4194 # Check for command to grab the raw symbol name followed by C symbol from nm.
4195 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4196 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4197 [
4198 # These are sane defaults that work on at least a few old systems.
4199 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4200
4201 # Character class describing NM global symbol codes.
4202 symcode='[[BCDEGRST]]'
4203
4204 # Regexp to match symbols that can be accessed directly from C.
4205 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4206
4207 # Define system-specific variables.
4208 case $host_os in
4209 aix*)
4210   symcode='[[BCDT]]'
4211   ;;
4212 cygwin* | mingw* | pw32* | cegcc*)
4213   symcode='[[ABCDGISTW]]'
4214   ;;
4215 hpux*)
4216   if test "$host_cpu" = ia64; then
4217     symcode='[[ABCDEGRST]]'
4218   fi
4219   ;;
4220 irix* | nonstopux*)
4221   symcode='[[BCDEGRST]]'
4222   ;;
4223 osf*)
4224   symcode='[[BCDEGQRST]]'
4225   ;;
4226 solaris*)
4227   symcode='[[BDRT]]'
4228   ;;
4229 sco3.2v5*)
4230   symcode='[[DT]]'
4231   ;;
4232 sysv4.2uw2*)
4233   symcode='[[DT]]'
4234   ;;
4235 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4236   symcode='[[ABDT]]'
4237   ;;
4238 sysv4)
4239   symcode='[[DFNSTU]]'
4240   ;;
4241 esac
4242
4243 # If we're using GNU nm, then use its standard symbol codes.
4244 case `$NM -V 2>&1` in
4245 *GNU* | *'with BFD'*)
4246   symcode='[[ABCDGIRSTW]]' ;;
4247 esac
4248
4249 # Transform an extracted symbol line into a proper C declaration.
4250 # Some systems (esp. on ia64) link data and code symbols differently,
4251 # so use this general approach.
4252 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4253
4254 # Transform an extracted symbol line into symbol name and symbol address
4255 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4256 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
4257
4258 # Handle CRLF in mingw tool chain
4259 opt_cr=
4260 case $build_os in
4261 mingw*)
4262   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4263   ;;
4264 esac
4265
4266 # Try without a prefix underscore, then with it.
4267 for ac_symprfx in "" "_"; do
4268
4269   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4270   symxfrm="\\1 $ac_symprfx\\2 \\2"
4271
4272   # Write the raw and C identifiers.
4273   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4274     # Fake it for dumpbin and say T for any non-static function
4275     # and D for any global variable.
4276     # Also find C++ and __fastcall symbols from MSVC++,
4277     # which start with @ or ?.
4278     lt_cv_sys_global_symbol_pipe="$AWK ['"\
4279 "     {last_section=section; section=\$ 3};"\
4280 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4281 "     \$ 0!~/External *\|/{next};"\
4282 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4283 "     {if(hide[section]) next};"\
4284 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4285 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4286 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4287 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4288 "     ' prfx=^$ac_symprfx]"
4289   else
4290     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4291   fi
4292
4293   # Check to see that the pipe works correctly.
4294   pipe_works=no
4295
4296   rm -f conftest*
4297   cat > conftest.$ac_ext <<_LT_EOF
4298 #ifdef __cplusplus
4299 extern "C" {
4300 #endif
4301 char nm_test_var;
4302 void nm_test_func(void);
4303 void nm_test_func(void){}
4304 #ifdef __cplusplus
4305 }
4306 #endif
4307 int main(){nm_test_var='a';nm_test_func();return(0);}
4308 _LT_EOF
4309
4310   if AC_TRY_EVAL(ac_compile); then
4311     # Now try to grab the symbols.
4312     nlist=conftest.nm
4313     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4314       # Try sorting and uniquifying the output.
4315       if sort "$nlist" | uniq > "$nlist"T; then
4316         mv -f "$nlist"T "$nlist"
4317       else
4318         rm -f "$nlist"T
4319       fi
4320
4321       # Make sure that we snagged all the symbols we need.
4322       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4323         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4324           cat <<_LT_EOF > conftest.$ac_ext
4325 #ifdef __cplusplus
4326 extern "C" {
4327 #endif
4328
4329 _LT_EOF
4330           # Now generate the symbol file.
4331           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4332
4333           cat <<_LT_EOF >> conftest.$ac_ext
4334
4335 /* The mapping between symbol names and symbols.  */
4336 const struct {
4337   const char *name;
4338   void       *address;
4339 }
4340 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4341 {
4342   { "@PROGRAM@", (void *) 0 },
4343 _LT_EOF
4344           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4345           cat <<\_LT_EOF >> conftest.$ac_ext
4346   {0, (void *) 0}
4347 };
4348
4349 /* This works around a problem in FreeBSD linker */
4350 #ifdef FREEBSD_WORKAROUND
4351 static const void *lt_preloaded_setup() {
4352   return lt__PROGRAM__LTX_preloaded_symbols;
4353 }
4354 #endif
4355
4356 #ifdef __cplusplus
4357 }
4358 #endif
4359 _LT_EOF
4360           # Now try linking the two files.
4361           mv conftest.$ac_objext conftstm.$ac_objext
4362           lt_save_LIBS="$LIBS"
4363           lt_save_CFLAGS="$CFLAGS"
4364           LIBS="conftstm.$ac_objext"
4365           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4366           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4367             pipe_works=yes
4368           fi
4369           LIBS="$lt_save_LIBS"
4370           CFLAGS="$lt_save_CFLAGS"
4371         else
4372           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4373         fi
4374       else
4375         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4376       fi
4377     else
4378       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4379     fi
4380   else
4381     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4382     cat conftest.$ac_ext >&5
4383   fi
4384   rm -rf conftest* conftst*
4385
4386   # Do not use the global_symbol_pipe unless it works.
4387   if test "$pipe_works" = yes; then
4388     break
4389   else
4390     lt_cv_sys_global_symbol_pipe=
4391   fi
4392 done
4393 ])
4394 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4395   lt_cv_sys_global_symbol_to_cdecl=
4396 fi
4397 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4398   AC_MSG_RESULT(failed)
4399 else
4400   AC_MSG_RESULT(ok)
4401 fi
4402
4403 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4404     [Take the output of nm and produce a listing of raw symbols and C names])
4405 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4406     [Transform the output of nm in a proper C declaration])
4407 _LT_DECL([global_symbol_to_c_name_address],
4408     [lt_cv_sys_global_symbol_to_c_name_address], [1],
4409     [Transform the output of nm in a C name address pair])
4410 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4411     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4412     [Transform the output of nm in a C name address pair when lib prefix is needed])
4413 ]) # _LT_CMD_GLOBAL_SYMBOLS
4414
4415
4416 # _LT_COMPILER_PIC([TAGNAME])
4417 # ---------------------------
4418 m4_defun([_LT_COMPILER_PIC],
4419 [m4_require([_LT_TAG_COMPILER])dnl
4420 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4421 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4422 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4423
4424 AC_MSG_CHECKING([for $compiler option to produce PIC])
4425 m4_if([$1], [CXX], [
4426   # C++ specific cases for pic, static, wl, etc.
4427   if test "$GXX" = yes; then
4428     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4429     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4430
4431     case $host_os in
4432     aix*)
4433       # All AIX code is PIC.
4434       if test "$host_cpu" = ia64; then
4435         # AIX 5 now supports IA64 processor
4436         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4437       fi
4438       ;;
4439
4440     amigaos*)
4441       case $host_cpu in
4442       powerpc)
4443             # see comment about AmigaOS4 .so support
4444             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4445         ;;
4446       m68k)
4447             # FIXME: we need at least 68020 code to build shared libraries, but
4448             # adding the `-m68020' flag to GCC prevents building anything better,
4449             # like `-m68040'.
4450             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4451         ;;
4452       esac
4453       ;;
4454
4455     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4456       # PIC is the default for these OSes.
4457       ;;
4458     mingw* | cygwin* | os2* | pw32* | cegcc*)
4459       # This hack is so that the source file can tell whether it is being
4460       # built for inclusion in a dll (and should export symbols for example).
4461       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4462       # (--disable-auto-import) libraries
4463       m4_if([$1], [GCJ], [],
4464         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4465       ;;
4466     darwin* | rhapsody*)
4467       # PIC is the default on this platform
4468       # Common symbols not allowed in MH_DYLIB files
4469       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4470       ;;
4471     *djgpp*)
4472       # DJGPP does not support shared libraries at all
4473       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4474       ;;
4475     interix[[3-9]]*)
4476       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4477       # Instead, we relocate shared libraries at runtime.
4478       ;;
4479     sysv4*MP*)
4480       if test -d /usr/nec; then
4481         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4482       fi
4483       ;;
4484     hpux*)
4485       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4486       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4487       # sets the default TLS model and affects inlining.
4488       case $host_cpu in
4489       hppa*64*)
4490         ;;
4491       *)
4492         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4493         ;;
4494       esac
4495       ;;
4496     *qnx* | *nto*)
4497       # QNX uses GNU C++, but need to define -shared option too, otherwise
4498       # it will coredump.
4499       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4500       ;;
4501     *)
4502       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4503       ;;
4504     esac
4505   else
4506     case $host_os in
4507       aix[[4-9]]*)
4508         # All AIX code is PIC.
4509         if test "$host_cpu" = ia64; then
4510           # AIX 5 now supports IA64 processor
4511           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4512         else
4513           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4514         fi
4515         ;;
4516       chorus*)
4517         case $cc_basename in
4518         cxch68*)
4519           # Green Hills C++ Compiler
4520           # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4521           ;;
4522         esac
4523         ;;
4524       dgux*)
4525         case $cc_basename in
4526           ec++*)
4527             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4528             ;;
4529           ghcx*)
4530             # Green Hills C++ Compiler
4531             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4532             ;;
4533           *)
4534             ;;
4535         esac
4536         ;;
4537       freebsd* | dragonfly*)
4538         # FreeBSD uses GNU C++
4539         ;;
4540       hpux9* | hpux10* | hpux11*)
4541         case $cc_basename in
4542           CC*)
4543             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4544             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4545             if test "$host_cpu" != ia64; then
4546               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4547             fi
4548             ;;
4549           aCC*)
4550             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4551             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4552             case $host_cpu in
4553             hppa*64*|ia64*)
4554               # +Z the default
4555               ;;
4556             *)
4557               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4558               ;;
4559             esac
4560             ;;
4561           *)
4562             ;;
4563         esac
4564         ;;
4565       interix*)
4566         # This is c89, which is MS Visual C++ (no shared libs)
4567         # Anyone wants to do a port?
4568         ;;
4569       irix5* | irix6* | nonstopux*)
4570         case $cc_basename in
4571           CC*)
4572             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4573             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4574             # CC pic flag -KPIC is the default.
4575             ;;
4576           *)
4577             ;;
4578         esac
4579         ;;
4580       linux* | k*bsd*-gnu)
4581         case $cc_basename in
4582           KCC*)
4583             # KAI C++ Compiler
4584             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4585             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4586             ;;
4587           ecpc* )
4588             # old Intel C++ for x86_64 which still supported -KPIC.
4589             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4590             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4591             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4592             ;;
4593           icpc* )
4594             # Intel C++, used to be incompatible with GCC.
4595             # ICC 10 doesn't accept -KPIC any more.
4596             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4597             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4598             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4599             ;;
4600           pgCC* | pgcpp*)
4601             # Portland Group C++ compiler
4602             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4603             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4604             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4605             ;;
4606           cxx*)
4607             # Compaq C++
4608             # Make sure the PIC flag is empty.  It appears that all Alpha
4609             # Linux and Compaq Tru64 Unix objects are PIC.
4610             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4611             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4612             ;;
4613           xlc* | xlC*)
4614             # IBM XL 8.0 on PPC
4615             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4616             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4617             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4618             ;;
4619           *)
4620             case `$CC -V 2>&1 | sed 5q` in
4621             *Sun\ C*)
4622               # Sun C++ 5.9
4623               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4624               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4625               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4626               ;;
4627             esac
4628             ;;
4629         esac
4630         ;;
4631       lynxos*)
4632         ;;
4633       m88k*)
4634         ;;
4635       mvs*)
4636         case $cc_basename in
4637           cxx*)
4638             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4639             ;;
4640           *)
4641             ;;
4642         esac
4643         ;;
4644       netbsd*)
4645         ;;
4646       *qnx* | *nto*)
4647         # QNX uses GNU C++, but need to define -shared option too, otherwise
4648         # it will coredump.
4649         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4650         ;;
4651       osf3* | osf4* | osf5*)
4652         case $cc_basename in
4653           KCC*)
4654             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4655             ;;
4656           RCC*)
4657             # Rational C++ 2.4.1
4658             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4659             ;;
4660           cxx*)
4661             # Digital/Compaq C++
4662             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4663             # Make sure the PIC flag is empty.  It appears that all Alpha
4664             # Linux and Compaq Tru64 Unix objects are PIC.
4665             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4666             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4667             ;;
4668           *)
4669             ;;
4670         esac
4671         ;;
4672       psos*)
4673         ;;
4674       solaris*)
4675         case $cc_basename in
4676           CC*)
4677             # Sun C++ 4.2, 5.x and Centerline C++
4678             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4679             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4680             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4681             ;;
4682           gcx*)
4683             # Green Hills C++ Compiler
4684             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4685             ;;
4686           *)
4687             ;;
4688         esac
4689         ;;
4690       sunos4*)
4691         case $cc_basename in
4692           CC*)
4693             # Sun C++ 4.x
4694             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4695             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4696             ;;
4697           lcc*)
4698             # Lucid
4699             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4700             ;;
4701           *)
4702             ;;
4703         esac
4704         ;;
4705       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4706         case $cc_basename in
4707           CC*)
4708             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4709             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4710             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4711             ;;
4712         esac
4713         ;;
4714       tandem*)
4715         case $cc_basename in
4716           NCC*)
4717             # NonStop-UX NCC 3.20
4718             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4719             ;;
4720           *)
4721             ;;
4722         esac
4723         ;;
4724       vxworks*)
4725         ;;
4726       *)
4727         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4728         ;;
4729     esac
4730   fi
4731 ],
4732 [
4733   if test "$GCC" = yes; then
4734     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4735     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4736
4737     case $host_os in
4738       aix*)
4739       # All AIX code is PIC.
4740       if test "$host_cpu" = ia64; then
4741         # AIX 5 now supports IA64 processor
4742         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4743       fi
4744       ;;
4745
4746     amigaos*)
4747       case $host_cpu in
4748       powerpc)
4749             # see comment about AmigaOS4 .so support
4750             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4751         ;;
4752       m68k)
4753             # FIXME: we need at least 68020 code to build shared libraries, but
4754             # adding the `-m68020' flag to GCC prevents building anything better,
4755             # like `-m68040'.
4756             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4757         ;;
4758       esac
4759       ;;
4760
4761     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4762       # PIC is the default for these OSes.
4763       ;;
4764
4765     mingw* | cygwin* | pw32* | os2* | cegcc*)
4766       # This hack is so that the source file can tell whether it is being
4767       # built for inclusion in a dll (and should export symbols for example).
4768       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4769       # (--disable-auto-import) libraries
4770       m4_if([$1], [GCJ], [],
4771         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4772       ;;
4773
4774     darwin* | rhapsody*)
4775       # PIC is the default on this platform
4776       # Common symbols not allowed in MH_DYLIB files
4777       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4778       ;;
4779
4780     hpux*)
4781       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4782       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4783       # sets the default TLS model and affects inlining.
4784       case $host_cpu in
4785       hppa*64*)
4786         # +Z the default
4787         ;;
4788       *)
4789         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4790         ;;
4791       esac
4792       ;;
4793
4794     interix[[3-9]]*)
4795       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4796       # Instead, we relocate shared libraries at runtime.
4797       ;;
4798
4799     msdosdjgpp*)
4800       # Just because we use GCC doesn't mean we suddenly get shared libraries
4801       # on systems that don't support them.
4802       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4803       enable_shared=no
4804       ;;
4805
4806     *nto* | *qnx*)
4807       # QNX uses GNU C++, but need to define -shared option too, otherwise
4808       # it will coredump.
4809       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4810       ;;
4811
4812     sysv4*MP*)
4813       if test -d /usr/nec; then
4814         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4815       fi
4816       ;;
4817
4818     *)
4819       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4820       ;;
4821     esac
4822   else
4823     # PORTME Check for flag to pass linker flags through the system compiler.
4824     case $host_os in
4825     aix*)
4826       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4827       if test "$host_cpu" = ia64; then
4828         # AIX 5 now supports IA64 processor
4829         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4830       else
4831         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4832       fi
4833       ;;
4834
4835     mingw* | cygwin* | pw32* | os2* | cegcc*)
4836       # This hack is so that the source file can tell whether it is being
4837       # built for inclusion in a dll (and should export symbols for example).
4838       m4_if([$1], [GCJ], [],
4839         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4840       ;;
4841
4842     hpux9* | hpux10* | hpux11*)
4843       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4844       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4845       # not for PA HP-UX.
4846       case $host_cpu in
4847       hppa*64*|ia64*)
4848         # +Z the default
4849         ;;
4850       *)
4851         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4852         ;;
4853       esac
4854       # Is there a better lt_prog_compiler_static that works with the bundled CC?
4855       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4856       ;;
4857
4858     irix5* | irix6* | nonstopux*)
4859       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4860       # PIC (with -KPIC) is the default.
4861       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4862       ;;
4863
4864     linux* | k*bsd*-gnu)
4865       case $cc_basename in
4866       # old Intel for x86_64 which still supported -KPIC.
4867       ecc*)
4868         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4869         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4870         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4871         ;;
4872       # icc used to be incompatible with GCC.
4873       # ICC 10 doesn't accept -KPIC any more.
4874       icc* | ifort*)
4875         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4876         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4877         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4878         ;;
4879       # Lahey Fortran 8.1.
4880       lf95*)
4881         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4882         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4883         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4884         ;;
4885       pgcc* | pgf77* | pgf90* | pgf95*)
4886         # Portland Group compilers (*not* the Pentium gcc compiler,
4887         # which looks to be a dead project)
4888         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4889         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4890         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4891         ;;
4892       ccc*)
4893         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4894         # All Alpha code is PIC.
4895         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4896         ;;
4897       xl*)
4898         # IBM XL C 8.0/Fortran 10.1 on PPC
4899         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4900         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4901         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4902         ;;
4903       *)
4904         case `$CC -V 2>&1 | sed 5q` in
4905         *Sun\ C*)
4906           # Sun C 5.9
4907           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4908           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4909           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4910           ;;
4911         *Sun\ F*)
4912           # Sun Fortran 8.3 passes all unrecognized flags to the linker
4913           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4914           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4915           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4916           ;;
4917         esac
4918         ;;
4919       esac
4920       ;;
4921
4922     newsos6)
4923       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4924       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4925       ;;
4926
4927     *nto* | *qnx*)
4928       # QNX uses GNU C++, but need to define -shared option too, otherwise
4929       # it will coredump.
4930       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4931       ;;
4932
4933     osf3* | osf4* | osf5*)
4934       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4935       # All OSF/1 code is PIC.
4936       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4937       ;;
4938
4939     rdos*)
4940       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4941       ;;
4942
4943     solaris*)
4944       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4945       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4946       case $cc_basename in
4947       f77* | f90* | f95*)
4948         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4949       *)
4950         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4951       esac
4952       ;;
4953
4954     sunos4*)
4955       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4956       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4957       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4958       ;;
4959
4960     sysv4 | sysv4.2uw2* | sysv4.3*)
4961       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4962       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4963       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4964       ;;
4965
4966     sysv4*MP*)
4967       if test -d /usr/nec ;then
4968         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4969         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4970       fi
4971       ;;
4972
4973     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4974       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4975       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4976       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4977       ;;
4978
4979     unicos*)
4980       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4981       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4982       ;;
4983
4984     uts4*)
4985       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4986       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4987       ;;
4988
4989     *)
4990       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4991       ;;
4992     esac
4993   fi
4994 ])
4995 case $host_os in
4996   # For platforms which do not support PIC, -DPIC is meaningless:
4997   *djgpp*)
4998     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4999     ;;
5000   *)
5001     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5002     ;;
5003 esac
5004 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5005 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5006         [How to pass a linker flag through the compiler])
5007
5008 #
5009 # Check to make sure the PIC flag actually works.
5010 #
5011 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5012   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5013     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5014     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5015     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5016      "" | " "*) ;;
5017      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5018      esac],
5019     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5020      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5021 fi
5022 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5023         [Additional compiler flags for building library objects])
5024
5025 #
5026 # Check to make sure the static flag actually works.
5027 #
5028 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5029 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5030   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5031   $lt_tmp_static_flag,
5032   [],
5033   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5034 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5035         [Compiler flag to prevent dynamic linking])
5036 ])# _LT_COMPILER_PIC
5037
5038
5039 # _LT_LINKER_SHLIBS([TAGNAME])
5040 # ----------------------------
5041 # See if the linker supports building shared libraries.
5042 m4_defun([_LT_LINKER_SHLIBS],
5043 [AC_REQUIRE([LT_PATH_LD])dnl
5044 AC_REQUIRE([LT_PATH_NM])dnl
5045 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5046 m4_require([_LT_DECL_EGREP])dnl
5047 m4_require([_LT_DECL_SED])dnl
5048 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5049 m4_require([_LT_TAG_COMPILER])dnl
5050 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5051 m4_if([$1], [CXX], [
5052   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5053   case $host_os in
5054   aix[[4-9]]*)
5055     # If we're using GNU nm, then we don't want the "-C" option.
5056     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5057     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5058       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5059     else
5060       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5061     fi
5062     ;;
5063   pw32*)
5064     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5065   ;;
5066   cygwin* | mingw* | cegcc*)
5067     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5068   ;;
5069   *)
5070     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5071   ;;
5072   esac
5073   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5074 ], [
5075   runpath_var=
5076   _LT_TAGVAR(allow_undefined_flag, $1)=
5077   _LT_TAGVAR(always_export_symbols, $1)=no
5078   _LT_TAGVAR(archive_cmds, $1)=
5079   _LT_TAGVAR(archive_expsym_cmds, $1)=
5080   _LT_TAGVAR(compiler_needs_object, $1)=no
5081   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5082   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5083   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5084   _LT_TAGVAR(hardcode_automatic, $1)=no
5085   _LT_TAGVAR(hardcode_direct, $1)=no
5086   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5087   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5088   _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5089   _LT_TAGVAR(hardcode_libdir_separator, $1)=
5090   _LT_TAGVAR(hardcode_minus_L, $1)=no
5091   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5092   _LT_TAGVAR(inherit_rpath, $1)=no
5093   _LT_TAGVAR(link_all_deplibs, $1)=unknown
5094   _LT_TAGVAR(module_cmds, $1)=
5095   _LT_TAGVAR(module_expsym_cmds, $1)=
5096   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5097   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5098   _LT_TAGVAR(thread_safe_flag_spec, $1)=
5099   _LT_TAGVAR(whole_archive_flag_spec, $1)=
5100   # include_expsyms should be a list of space-separated symbols to be *always*
5101   # included in the symbol list
5102   _LT_TAGVAR(include_expsyms, $1)=
5103   # exclude_expsyms can be an extended regexp of symbols to exclude
5104   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5105   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5106   # as well as any symbol that contains `d'.
5107   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5108   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5109   # platforms (ab)use it in PIC code, but their linkers get confused if
5110   # the symbol is explicitly referenced.  Since portable code cannot
5111   # rely on this symbol name, it's probably fine to never include it in
5112   # preloaded symbol tables.
5113   # Exclude shared library initialization/finalization symbols.
5114 dnl Note also adjust exclude_expsyms for C++ above.
5115   extract_expsyms_cmds=
5116
5117   case $host_os in
5118   cygwin* | mingw* | pw32* | cegcc*)
5119     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5120     # When not using gcc, we currently assume that we are using
5121     # Microsoft Visual C++.
5122     if test "$GCC" != yes; then
5123       with_gnu_ld=no
5124     fi
5125     ;;
5126   interix*)
5127     # we just hope/assume this is gcc and not c89 (= MSVC++)
5128     with_gnu_ld=yes
5129     ;;
5130   openbsd*)
5131     with_gnu_ld=no
5132     ;;
5133   esac
5134
5135   _LT_TAGVAR(ld_shlibs, $1)=yes
5136   if test "$with_gnu_ld" = yes; then
5137     # If archive_cmds runs LD, not CC, wlarc should be empty
5138     wlarc='${wl}'
5139
5140     # Set some defaults for GNU ld with shared library support. These
5141     # are reset later if shared libraries are not supported. Putting them
5142     # here allows them to be overridden if necessary.
5143     runpath_var=LD_RUN_PATH
5144     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5145     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5146     # ancient GNU ld didn't support --whole-archive et. al.
5147     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5148       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5149     else
5150       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5151     fi
5152     supports_anon_versioning=no
5153     case `$LD -v 2>&1` in
5154       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5155       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5156       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5157       *\ 2.11.*) ;; # other 2.11 versions
5158       *) supports_anon_versioning=yes ;;
5159     esac
5160
5161     # See if GNU ld supports shared libraries.
5162     case $host_os in
5163     aix[[3-9]]*)
5164       # On AIX/PPC, the GNU linker is very broken
5165       if test "$host_cpu" != ia64; then
5166         _LT_TAGVAR(ld_shlibs, $1)=no
5167         cat <<_LT_EOF 1>&2
5168
5169 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5170 *** to be unable to reliably create shared libraries on AIX.
5171 *** Therefore, libtool is disabling shared libraries support.  If you
5172 *** really care for shared libraries, you may want to modify your PATH
5173 *** so that a non-GNU linker is found, and then restart.
5174
5175 _LT_EOF
5176       fi
5177       ;;
5178
5179     amigaos*)
5180       case $host_cpu in
5181       powerpc)
5182             # see comment about AmigaOS4 .so support
5183             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5184             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5185         ;;
5186       m68k)
5187             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5188             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5189             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5190         ;;
5191       esac
5192       ;;
5193
5194     beos*)
5195       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5196         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5197         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5198         # support --undefined.  This deserves some investigation.  FIXME
5199         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5200       else
5201         _LT_TAGVAR(ld_shlibs, $1)=no
5202       fi
5203       ;;
5204
5205     cygwin* | mingw* | pw32* | cegcc*)
5206       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5207       # as there is no search path for DLLs.
5208       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5209       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5210       _LT_TAGVAR(always_export_symbols, $1)=no
5211       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5212       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5213
5214       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5215         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5216         # If the export-symbols file already is a .def file (1st line
5217         # is EXPORTS), use it as is; otherwise, prepend...
5218         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5219           cp $export_symbols $output_objdir/$soname.def;
5220         else
5221           echo EXPORTS > $output_objdir/$soname.def;
5222           cat $export_symbols >> $output_objdir/$soname.def;
5223         fi~
5224         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5225       else
5226         _LT_TAGVAR(ld_shlibs, $1)=no
5227       fi
5228       ;;
5229
5230     interix[[3-9]]*)
5231       _LT_TAGVAR(hardcode_direct, $1)=no
5232       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5233       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5234       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5235       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5236       # Instead, shared libraries are loaded at an image base (0x10000000 by
5237       # default) and relocated if they conflict, which is a slow very memory
5238       # consuming and fragmenting process.  To avoid this, we pick a random,
5239       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5240       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5241       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5242       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5243       ;;
5244
5245     gnu* | linux* | tpf* | k*bsd*-gnu)
5246       tmp_diet=no
5247       if test "$host_os" = linux-dietlibc; then
5248         case $cc_basename in
5249           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
5250         esac
5251       fi
5252       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5253          && test "$tmp_diet" = no
5254       then
5255         tmp_addflag=
5256         tmp_sharedflag='-shared'
5257         case $cc_basename,$host_cpu in
5258         pgcc*)                          # Portland Group C compiler
5259           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5260           tmp_addflag=' $pic_flag'
5261           ;;
5262         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
5263           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5264           tmp_addflag=' $pic_flag -Mnomain' ;;
5265         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
5266           tmp_addflag=' -i_dynamic' ;;
5267         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
5268           tmp_addflag=' -i_dynamic -nofor_main' ;;
5269         ifc* | ifort*)                  # Intel Fortran compiler
5270           tmp_addflag=' -nofor_main' ;;
5271         lf95*)                          # Lahey Fortran 8.1
5272           _LT_TAGVAR(whole_archive_flag_spec, $1)=
5273           tmp_sharedflag='--shared' ;;
5274         xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
5275           tmp_sharedflag='-qmkshrobj'
5276           tmp_addflag= ;;
5277         esac
5278         case `$CC -V 2>&1 | sed 5q` in
5279         *Sun\ C*)                       # Sun C 5.9
5280           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5281           _LT_TAGVAR(compiler_needs_object, $1)=yes
5282           tmp_sharedflag='-G' ;;
5283         *Sun\ F*)                       # Sun Fortran 8.3
5284           tmp_sharedflag='-G' ;;
5285         esac
5286         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5287
5288         if test "x$supports_anon_versioning" = xyes; then
5289           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5290             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5291             echo "local: *; };" >> $output_objdir/$libname.ver~
5292             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5293         fi
5294
5295         case $cc_basename in
5296         xlf*)
5297           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5298           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5299           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5300           _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5301           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5302           if test "x$supports_anon_versioning" = xyes; then
5303             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5304               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5305               echo "local: *; };" >> $output_objdir/$libname.ver~
5306               $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5307           fi
5308           ;;
5309         esac
5310       else
5311         _LT_TAGVAR(ld_shlibs, $1)=no
5312       fi
5313       ;;
5314
5315     netbsd*)
5316       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5317         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5318         wlarc=
5319       else
5320         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5321         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5322       fi
5323       ;;
5324
5325     solaris*)
5326       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5327         _LT_TAGVAR(ld_shlibs, $1)=no
5328         cat <<_LT_EOF 1>&2
5329
5330 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5331 *** create shared libraries on Solaris systems.  Therefore, libtool
5332 *** is disabling shared libraries support.  We urge you to upgrade GNU
5333 *** binutils to release 2.9.1 or newer.  Another option is to modify
5334 *** your PATH or compiler configuration so that the native linker is
5335 *** used, and then restart.
5336
5337 _LT_EOF
5338       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5339         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5340         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5341       else
5342         _LT_TAGVAR(ld_shlibs, $1)=no
5343       fi
5344       ;;
5345
5346     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5347       case `$LD -v 2>&1` in
5348         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5349         _LT_TAGVAR(ld_shlibs, $1)=no
5350         cat <<_LT_EOF 1>&2
5351
5352 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5353 *** reliably create shared libraries on SCO systems.  Therefore, libtool
5354 *** is disabling shared libraries support.  We urge you to upgrade GNU
5355 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5356 *** your PATH or compiler configuration so that the native linker is
5357 *** used, and then restart.
5358
5359 _LT_EOF
5360         ;;
5361         *)
5362           # For security reasons, it is highly recommended that you always
5363           # use absolute paths for naming shared libraries, and exclude the
5364           # DT_RUNPATH tag from executables and libraries.  But doing so
5365           # requires that you compile everything twice, which is a pain.
5366           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5367             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5368             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5369             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5370           else
5371             _LT_TAGVAR(ld_shlibs, $1)=no
5372           fi
5373         ;;
5374       esac
5375       ;;
5376
5377     sunos4*)
5378       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5379       wlarc=
5380       _LT_TAGVAR(hardcode_direct, $1)=yes
5381       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5382       ;;
5383
5384     *)
5385       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5386         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5387         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5388       else
5389         _LT_TAGVAR(ld_shlibs, $1)=no
5390       fi
5391       ;;
5392     esac
5393
5394     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5395       runpath_var=
5396       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5397       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5398       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5399     fi
5400   else
5401     # PORTME fill in a description of your system's linker (not GNU ld)
5402     case $host_os in
5403     aix3*)
5404       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5405       _LT_TAGVAR(always_export_symbols, $1)=yes
5406       _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5407       # Note: this linker hardcodes the directories in LIBPATH if there
5408       # are no directories specified by -L.
5409       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5410       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5411         # Neither direct hardcoding nor static linking is supported with a
5412         # broken collect2.
5413         _LT_TAGVAR(hardcode_direct, $1)=unsupported
5414       fi
5415       ;;
5416
5417     aix[[4-9]]*)
5418       if test "$host_cpu" = ia64; then
5419         # On IA64, the linker does run time linking by default, so we don't
5420         # have to do anything special.
5421         aix_use_runtimelinking=no
5422         exp_sym_flag='-Bexport'
5423         no_entry_flag=""
5424       else
5425         # If we're using GNU nm, then we don't want the "-C" option.
5426         # -C means demangle to AIX nm, but means don't demangle with GNU nm
5427         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5428           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5429         else
5430           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5431         fi
5432         aix_use_runtimelinking=no
5433
5434         # Test if we are trying to use run time linking or normal
5435         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5436         # need to do runtime linking.
5437         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5438           for ld_flag in $LDFLAGS; do
5439           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5440             aix_use_runtimelinking=yes
5441             break
5442           fi
5443           done
5444           ;;
5445         esac
5446
5447         exp_sym_flag='-bexport'
5448         no_entry_flag='-bnoentry'
5449       fi
5450
5451       # When large executables or shared objects are built, AIX ld can
5452       # have problems creating the table of contents.  If linking a library
5453       # or program results in "error TOC overflow" add -mminimal-toc to
5454       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5455       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5456
5457       _LT_TAGVAR(archive_cmds, $1)=''
5458       _LT_TAGVAR(hardcode_direct, $1)=yes
5459       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5460       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5461       _LT_TAGVAR(link_all_deplibs, $1)=yes
5462       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5463
5464       if test "$GCC" = yes; then
5465         case $host_os in aix4.[[012]]|aix4.[[012]].*)
5466         # We only want to do this on AIX 4.2 and lower, the check
5467         # below for broken collect2 doesn't work under 4.3+
5468           collect2name=`${CC} -print-prog-name=collect2`
5469           if test -f "$collect2name" &&
5470            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5471           then
5472           # We have reworked collect2
5473           :
5474           else
5475           # We have old collect2
5476           _LT_TAGVAR(hardcode_direct, $1)=unsupported
5477           # It fails to find uninstalled libraries when the uninstalled
5478           # path is not listed in the libpath.  Setting hardcode_minus_L
5479           # to unsupported forces relinking
5480           _LT_TAGVAR(hardcode_minus_L, $1)=yes
5481           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5482           _LT_TAGVAR(hardcode_libdir_separator, $1)=
5483           fi
5484           ;;
5485         esac
5486         shared_flag='-shared'
5487         if test "$aix_use_runtimelinking" = yes; then
5488           shared_flag="$shared_flag "'${wl}-G'
5489         fi
5490       else
5491         # not using gcc
5492         if test "$host_cpu" = ia64; then
5493         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5494         # chokes on -Wl,-G. The following line is correct:
5495           shared_flag='-G'
5496         else
5497           if test "$aix_use_runtimelinking" = yes; then
5498             shared_flag='${wl}-G'
5499           else
5500             shared_flag='${wl}-bM:SRE'
5501           fi
5502         fi
5503       fi
5504
5505       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5506       # It seems that -bexpall does not export symbols beginning with
5507       # underscore (_), so it is better to generate a list of symbols to export.
5508       _LT_TAGVAR(always_export_symbols, $1)=yes
5509       if test "$aix_use_runtimelinking" = yes; then
5510         # Warning - without using the other runtime loading flags (-brtl),
5511         # -berok will link without error, but may produce a broken library.
5512         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5513         # Determine the default libpath from the value encoded in an
5514         # empty executable.
5515         _LT_SYS_MODULE_PATH_AIX
5516         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5517         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5518       else
5519         if test "$host_cpu" = ia64; then
5520           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5521           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5522           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5523         else
5524          # Determine the default libpath from the value encoded in an
5525          # empty executable.
5526          _LT_SYS_MODULE_PATH_AIX
5527          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5528           # Warning - without using the other run time loading flags,
5529           # -berok will link without error, but may produce a broken library.
5530           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5531           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5532           # Exported symbols can be pulled into shared objects from archives
5533           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5534           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5535           # This is similar to how AIX traditionally builds its shared libraries.
5536           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5537         fi
5538       fi
5539       ;;
5540
5541     amigaos*)
5542       case $host_cpu in
5543       powerpc)
5544             # see comment about AmigaOS4 .so support
5545             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5546             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5547         ;;
5548       m68k)
5549             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5550             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5551             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5552         ;;
5553       esac
5554       ;;
5555
5556     bsdi[[45]]*)
5557       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5558       ;;
5559
5560     cygwin* | mingw* | pw32* | cegcc*)
5561       # When not using gcc, we currently assume that we are using
5562       # Microsoft Visual C++.
5563       # hardcode_libdir_flag_spec is actually meaningless, as there is
5564       # no search path for DLLs.
5565       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5566       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5567       # Tell ltmain to make .lib files, not .a files.
5568       libext=lib
5569       # Tell ltmain to make .dll files, not .so files.
5570       shrext_cmds=".dll"
5571       # FIXME: Setting linknames here is a bad hack.
5572       _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5573       # The linker will automatically build a .lib file if we build a DLL.
5574       _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5575       # FIXME: Should let the user specify the lib program.
5576       _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5577       _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5578       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5579       ;;
5580
5581     darwin* | rhapsody*)
5582       _LT_DARWIN_LINKER_FEATURES($1)
5583       ;;
5584
5585     dgux*)
5586       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5587       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5588       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5589       ;;
5590
5591     freebsd1*)
5592       _LT_TAGVAR(ld_shlibs, $1)=no
5593       ;;
5594
5595     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5596     # support.  Future versions do this automatically, but an explicit c++rt0.o
5597     # does not break anything, and helps significantly (at the cost of a little
5598     # extra space).
5599     freebsd2.2*)
5600       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5601       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5602       _LT_TAGVAR(hardcode_direct, $1)=yes
5603       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5604       ;;
5605
5606     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5607     freebsd2*)
5608       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5609       _LT_TAGVAR(hardcode_direct, $1)=yes
5610       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5611       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5612       ;;
5613
5614     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5615     freebsd* | dragonfly*)
5616       _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5617       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5618       _LT_TAGVAR(hardcode_direct, $1)=yes
5619       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5620       ;;
5621
5622     hpux9*)
5623       if test "$GCC" = yes; then
5624         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5625       else
5626         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5627       fi
5628       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5629       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5630       _LT_TAGVAR(hardcode_direct, $1)=yes
5631
5632       # hardcode_minus_L: Not really in the search PATH,
5633       # but as the default location of the library.
5634       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5635       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5636       ;;
5637
5638     hpux10*)
5639       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5640         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5641       else
5642         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5643       fi
5644       if test "$with_gnu_ld" = no; then
5645         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5646         _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5647         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5648         _LT_TAGVAR(hardcode_direct, $1)=yes
5649         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5650         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5651         # hardcode_minus_L: Not really in the search PATH,
5652         # but as the default location of the library.
5653         _LT_TAGVAR(hardcode_minus_L, $1)=yes
5654       fi
5655       ;;
5656
5657     hpux11*)
5658       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5659         case $host_cpu in
5660         hppa*64*)
5661           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5662           ;;
5663         ia64*)
5664           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5665           ;;
5666         *)
5667           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5668           ;;
5669         esac
5670       else
5671         case $host_cpu in
5672         hppa*64*)
5673           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5674           ;;
5675         ia64*)
5676           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5677           ;;
5678         *)
5679           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5680           ;;
5681         esac
5682       fi
5683       if test "$with_gnu_ld" = no; then
5684         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5685         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5686
5687         case $host_cpu in
5688         hppa*64*|ia64*)
5689           _LT_TAGVAR(hardcode_direct, $1)=no
5690           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5691           ;;
5692         *)
5693           _LT_TAGVAR(hardcode_direct, $1)=yes
5694           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5695           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5696
5697           # hardcode_minus_L: Not really in the search PATH,
5698           # but as the default location of the library.
5699           _LT_TAGVAR(hardcode_minus_L, $1)=yes
5700           ;;
5701         esac
5702       fi
5703       ;;
5704
5705     irix5* | irix6* | nonstopux*)
5706       if test "$GCC" = yes; then
5707         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5708         # Try to use the -exported_symbol ld option, if it does not
5709         # work, assume that -exports_file does not work either and
5710         # implicitly export all symbols.
5711         save_LDFLAGS="$LDFLAGS"
5712         LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5713         AC_LINK_IFELSE(int foo(void) {},
5714           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5715         )
5716         LDFLAGS="$save_LDFLAGS"
5717       else
5718         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5719         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5720       fi
5721       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5722       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5723       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5724       _LT_TAGVAR(inherit_rpath, $1)=yes
5725       _LT_TAGVAR(link_all_deplibs, $1)=yes
5726       ;;
5727
5728     netbsd*)
5729       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5730         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5731       else
5732         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5733       fi
5734       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5735       _LT_TAGVAR(hardcode_direct, $1)=yes
5736       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5737       ;;
5738
5739     newsos6)
5740       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5741       _LT_TAGVAR(hardcode_direct, $1)=yes
5742       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5743       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5744       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5745       ;;
5746
5747     *nto* | *qnx*)
5748       ;;
5749
5750     openbsd*)
5751       if test -f /usr/libexec/ld.so; then
5752         _LT_TAGVAR(hardcode_direct, $1)=yes
5753         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5754         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5755         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5756           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5757           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5758           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5759           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5760         else
5761           case $host_os in
5762            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5763              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5764              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5765              ;;
5766            *)
5767              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5768              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5769              ;;
5770           esac
5771         fi
5772       else
5773         _LT_TAGVAR(ld_shlibs, $1)=no
5774       fi
5775       ;;
5776
5777     os2*)
5778       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5779       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5780       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5781       _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5782       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5783       ;;
5784
5785     osf3*)
5786       if test "$GCC" = yes; then
5787         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5788         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5789       else
5790         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5791         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5792       fi
5793       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5794       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5795       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5796       ;;
5797
5798     osf4* | osf5*)      # as osf3* with the addition of -msym flag
5799       if test "$GCC" = yes; then
5800         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5801         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5802         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5803       else
5804         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5805         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5806         _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5807         $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5808
5809         # Both c and cxx compiler support -rpath directly
5810         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5811       fi
5812       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5813       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5814       ;;
5815
5816     solaris*)
5817       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5818       if test "$GCC" = yes; then
5819         wlarc='${wl}'
5820         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5821         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5822           $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5823       else
5824         case `$CC -V 2>&1` in
5825         *"Compilers 5.0"*)
5826           wlarc=''
5827           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5828           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5829           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5830           ;;
5831         *)
5832           wlarc='${wl}'
5833           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5834           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5835           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5836           ;;
5837         esac
5838       fi
5839       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5840       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5841       case $host_os in
5842       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5843       *)
5844         # The compiler driver will combine and reorder linker options,
5845         # but understands `-z linker_flag'.  GCC discards it without `$wl',
5846         # but is careful enough not to reorder.
5847         # Supported since Solaris 2.6 (maybe 2.5.1?)
5848         if test "$GCC" = yes; then
5849           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5850         else
5851           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5852         fi
5853         ;;
5854       esac
5855       _LT_TAGVAR(link_all_deplibs, $1)=yes
5856       ;;
5857
5858     sunos4*)
5859       if test "x$host_vendor" = xsequent; then
5860         # Use $CC to link under sequent, because it throws in some extra .o
5861         # files that make .init and .fini sections work.
5862         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5863       else
5864         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5865       fi
5866       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5867       _LT_TAGVAR(hardcode_direct, $1)=yes
5868       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5869       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5870       ;;
5871
5872     sysv4)
5873       case $host_vendor in
5874         sni)
5875           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5876           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5877         ;;
5878         siemens)
5879           ## LD is ld it makes a PLAMLIB
5880           ## CC just makes a GrossModule.
5881           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5882           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5883           _LT_TAGVAR(hardcode_direct, $1)=no
5884         ;;
5885         motorola)
5886           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5887           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5888         ;;
5889       esac
5890       runpath_var='LD_RUN_PATH'
5891       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5892       ;;
5893
5894     sysv4.3*)
5895       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5896       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5897       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5898       ;;
5899
5900     sysv4*MP*)
5901       if test -d /usr/nec; then
5902         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5903         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5904         runpath_var=LD_RUN_PATH
5905         hardcode_runpath_var=yes
5906         _LT_TAGVAR(ld_shlibs, $1)=yes
5907       fi
5908       ;;
5909
5910     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5911       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5912       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5913       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5914       runpath_var='LD_RUN_PATH'
5915
5916       if test "$GCC" = yes; then
5917         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5918         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5919       else
5920         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5921         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5922       fi
5923       ;;
5924
5925     sysv5* | sco3.2v5* | sco5v6*)
5926       # Note: We can NOT use -z defs as we might desire, because we do not
5927       # link with -lc, and that would cause any symbols used from libc to
5928       # always be unresolved, which means just about no library would
5929       # ever link correctly.  If we're not using GNU ld we use -z text
5930       # though, which does catch some bad symbols but isn't as heavy-handed
5931       # as -z defs.
5932       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5933       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5934       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5935       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5936       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5937       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5938       _LT_TAGVAR(link_all_deplibs, $1)=yes
5939       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5940       runpath_var='LD_RUN_PATH'
5941
5942       if test "$GCC" = yes; then
5943         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5944         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5945       else
5946         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5947         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5948       fi
5949       ;;
5950
5951     uts4*)
5952       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5953       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5954       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5955       ;;
5956
5957     *)
5958       _LT_TAGVAR(ld_shlibs, $1)=no
5959       ;;
5960     esac
5961
5962     if test x$host_vendor = xsni; then
5963       case $host in
5964       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5965         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5966         ;;
5967       esac
5968     fi
5969   fi
5970 ])
5971 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5972 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5973
5974 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5975
5976 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5977 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5978 _LT_DECL([], [extract_expsyms_cmds], [2],
5979     [The commands to extract the exported symbol list from a shared archive])
5980
5981 #
5982 # Do we need to explicitly link libc?
5983 #
5984 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5985 x|xyes)
5986   # Assume -lc should be added
5987   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5988
5989   if test "$enable_shared" = yes && test "$GCC" = yes; then
5990     case $_LT_TAGVAR(archive_cmds, $1) in
5991     *'~'*)
5992       # FIXME: we may have to deal with multi-command sequences.
5993       ;;
5994     '$CC '*)
5995       # Test whether the compiler implicitly links with -lc since on some
5996       # systems, -lgcc has to come before -lc. If gcc already passes -lc
5997       # to ld, don't add -lc before -lgcc.
5998       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5999       $RM conftest*
6000       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6001
6002       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6003         soname=conftest
6004         lib=conftest
6005         libobjs=conftest.$ac_objext
6006         deplibs=
6007         wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6008         pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6009         compiler_flags=-v
6010         linker_flags=-v
6011         verstring=
6012         output_objdir=.
6013         libname=conftest
6014         lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6015         _LT_TAGVAR(allow_undefined_flag, $1)=
6016         if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6017         then
6018           _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6019         else
6020           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6021         fi
6022         _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6023       else
6024         cat conftest.err 1>&5
6025       fi
6026       $RM conftest*
6027       AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
6028       ;;
6029     esac
6030   fi
6031   ;;
6032 esac
6033
6034 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6035     [Whether or not to add -lc for building shared libraries])
6036 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6037     [enable_shared_with_static_runtimes], [0],
6038     [Whether or not to disallow shared libs when runtime libs are static])
6039 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6040     [Compiler flag to allow reflexive dlopens])
6041 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6042     [Compiler flag to generate shared objects directly from archives])
6043 _LT_TAGDECL([], [compiler_needs_object], [1],
6044     [Whether the compiler copes with passing no objects directly])
6045 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6046     [Create an old-style archive from a shared archive])
6047 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6048     [Create a temporary old-style archive to link instead of a shared archive])
6049 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6050 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6051 _LT_TAGDECL([], [module_cmds], [2],
6052     [Commands used to build a loadable module if different from building
6053     a shared archive.])
6054 _LT_TAGDECL([], [module_expsym_cmds], [2])
6055 _LT_TAGDECL([], [with_gnu_ld], [1],
6056     [Whether we are building with GNU ld or not])
6057 _LT_TAGDECL([], [allow_undefined_flag], [1],
6058     [Flag that allows shared libraries with undefined symbols to be built])
6059 _LT_TAGDECL([], [no_undefined_flag], [1],
6060     [Flag that enforces no undefined symbols])
6061 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6062     [Flag to hardcode $libdir into a binary during linking.
6063     This must work even if $libdir does not exist])
6064 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6065     [[If ld is used when linking, flag to hardcode $libdir into a binary
6066     during linking.  This must work even if $libdir does not exist]])
6067 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6068     [Whether we need a single "-rpath" flag with a separated argument])
6069 _LT_TAGDECL([], [hardcode_direct], [0],
6070     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6071     DIR into the resulting binary])
6072 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6073     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6074     DIR into the resulting binary and the resulting library dependency is
6075     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6076     library is relocated])
6077 _LT_TAGDECL([], [hardcode_minus_L], [0],
6078     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6079     into the resulting binary])
6080 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6081     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6082     into the resulting binary])
6083 _LT_TAGDECL([], [hardcode_automatic], [0],
6084     [Set to "yes" if building a shared library automatically hardcodes DIR
6085     into the library and all subsequent libraries and executables linked
6086     against it])
6087 _LT_TAGDECL([], [inherit_rpath], [0],
6088     [Set to yes if linker adds runtime paths of dependent libraries
6089     to runtime path list])
6090 _LT_TAGDECL([], [link_all_deplibs], [0],
6091     [Whether libtool must link a program against all its dependency libraries])
6092 _LT_TAGDECL([], [fix_srcfile_path], [1],
6093     [Fix the shell variable $srcfile for the compiler])
6094 _LT_TAGDECL([], [always_export_symbols], [0],
6095     [Set to "yes" if exported symbols are required])
6096 _LT_TAGDECL([], [export_symbols_cmds], [2],
6097     [The commands to list exported symbols])
6098 _LT_TAGDECL([], [exclude_expsyms], [1],
6099     [Symbols that should not be listed in the preloaded symbols])
6100 _LT_TAGDECL([], [include_expsyms], [1],
6101     [Symbols that must always be exported])
6102 _LT_TAGDECL([], [prelink_cmds], [2],
6103     [Commands necessary for linking programs (against libraries) with templates])
6104 _LT_TAGDECL([], [file_list_spec], [1],
6105     [Specify filename containing input files])
6106 dnl FIXME: Not yet implemented
6107 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6108 dnl    [Compiler flag to generate thread safe objects])
6109 ])# _LT_LINKER_SHLIBS
6110
6111
6112 # _LT_LANG_C_CONFIG([TAG])
6113 # ------------------------
6114 # Ensure that the configuration variables for a C compiler are suitably
6115 # defined.  These variables are subsequently used by _LT_CONFIG to write
6116 # the compiler configuration to `libtool'.
6117 m4_defun([_LT_LANG_C_CONFIG],
6118 [m4_require([_LT_DECL_EGREP])dnl
6119 lt_save_CC="$CC"
6120 AC_LANG_PUSH(C)
6121
6122 # Source file extension for C test sources.
6123 ac_ext=c
6124
6125 # Object file extension for compiled C test sources.
6126 objext=o
6127 _LT_TAGVAR(objext, $1)=$objext
6128
6129 # Code to be used in simple compile tests
6130 lt_simple_compile_test_code="int some_variable = 0;"
6131
6132 # Code to be used in simple link tests
6133 lt_simple_link_test_code='int main(){return(0);}'
6134
6135 _LT_TAG_COMPILER
6136 # Save the default compiler, since it gets overwritten when the other
6137 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6138 compiler_DEFAULT=$CC
6139
6140 # save warnings/boilerplate of simple test code
6141 _LT_COMPILER_BOILERPLATE
6142 _LT_LINKER_BOILERPLATE
6143
6144 if test -n "$compiler"; then
6145   _LT_COMPILER_NO_RTTI($1)
6146   _LT_COMPILER_PIC($1)
6147   _LT_COMPILER_C_O($1)
6148   _LT_COMPILER_FILE_LOCKS($1)
6149   _LT_LINKER_SHLIBS($1)
6150   _LT_SYS_DYNAMIC_LINKER($1)
6151   _LT_LINKER_HARDCODE_LIBPATH($1)
6152   LT_SYS_DLOPEN_SELF
6153   _LT_CMD_STRIPLIB
6154
6155   # Report which library types will actually be built
6156   AC_MSG_CHECKING([if libtool supports shared libraries])
6157   AC_MSG_RESULT([$can_build_shared])
6158
6159   AC_MSG_CHECKING([whether to build shared libraries])
6160   test "$can_build_shared" = "no" && enable_shared=no
6161
6162   # On AIX, shared libraries and static libraries use the same namespace, and
6163   # are all built from PIC.
6164   case $host_os in
6165   aix3*)
6166     test "$enable_shared" = yes && enable_static=no
6167     if test -n "$RANLIB"; then
6168       archive_cmds="$archive_cmds~\$RANLIB \$lib"
6169       postinstall_cmds='$RANLIB $lib'
6170     fi
6171     ;;
6172
6173   aix[[4-9]]*)
6174     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6175       test "$enable_shared" = yes && enable_static=no
6176     fi
6177     ;;
6178   esac
6179   AC_MSG_RESULT([$enable_shared])
6180
6181   AC_MSG_CHECKING([whether to build static libraries])
6182   # Make sure either enable_shared or enable_static is yes.
6183   test "$enable_shared" = yes || enable_static=yes
6184   AC_MSG_RESULT([$enable_static])
6185
6186   _LT_CONFIG($1)
6187 fi
6188 AC_LANG_POP
6189 CC="$lt_save_CC"
6190 ])# _LT_LANG_C_CONFIG
6191
6192
6193 # _LT_PROG_CXX
6194 # ------------
6195 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
6196 # compiler, we have our own version here.
6197 m4_defun([_LT_PROG_CXX],
6198 [
6199 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6200 AC_PROG_CXX
6201 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6202     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6203     (test "X$CXX" != "Xg++"))) ; then
6204   AC_PROG_CXXCPP
6205 else
6206   _lt_caught_CXX_error=yes
6207 fi
6208 popdef([AC_MSG_ERROR])
6209 ])# _LT_PROG_CXX
6210
6211 dnl aclocal-1.4 backwards compatibility:
6212 dnl AC_DEFUN([_LT_PROG_CXX], [])
6213
6214
6215 # _LT_LANG_CXX_CONFIG([TAG])
6216 # --------------------------
6217 # Ensure that the configuration variables for a C++ compiler are suitably
6218 # defined.  These variables are subsequently used by _LT_CONFIG to write
6219 # the compiler configuration to `libtool'.
6220 m4_defun([_LT_LANG_CXX_CONFIG],
6221 [AC_REQUIRE([_LT_PROG_CXX])dnl
6222 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6223 m4_require([_LT_DECL_EGREP])dnl
6224
6225 AC_LANG_PUSH(C++)
6226 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6227 _LT_TAGVAR(allow_undefined_flag, $1)=
6228 _LT_TAGVAR(always_export_symbols, $1)=no
6229 _LT_TAGVAR(archive_expsym_cmds, $1)=
6230 _LT_TAGVAR(compiler_needs_object, $1)=no
6231 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6232 _LT_TAGVAR(hardcode_direct, $1)=no
6233 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6234 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6235 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6236 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6237 _LT_TAGVAR(hardcode_minus_L, $1)=no
6238 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6239 _LT_TAGVAR(hardcode_automatic, $1)=no
6240 _LT_TAGVAR(inherit_rpath, $1)=no
6241 _LT_TAGVAR(module_cmds, $1)=
6242 _LT_TAGVAR(module_expsym_cmds, $1)=
6243 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6244 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6245 _LT_TAGVAR(no_undefined_flag, $1)=
6246 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6247 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6248
6249 # Source file extension for C++ test sources.
6250 ac_ext=cpp
6251
6252 # Object file extension for compiled C++ test sources.
6253 objext=o
6254 _LT_TAGVAR(objext, $1)=$objext
6255
6256 # No sense in running all these tests if we already determined that
6257 # the CXX compiler isn't working.  Some variables (like enable_shared)
6258 # are currently assumed to apply to all compilers on this platform,
6259 # and will be corrupted by setting them based on a non-working compiler.
6260 if test "$_lt_caught_CXX_error" != yes; then
6261   # Code to be used in simple compile tests
6262   lt_simple_compile_test_code="int some_variable = 0;"
6263
6264   # Code to be used in simple link tests
6265   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6266
6267   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6268   _LT_TAG_COMPILER
6269
6270   # save warnings/boilerplate of simple test code
6271   _LT_COMPILER_BOILERPLATE
6272   _LT_LINKER_BOILERPLATE
6273
6274   # Allow CC to be a program name with arguments.
6275   lt_save_CC=$CC
6276   lt_save_LD=$LD
6277   lt_save_GCC=$GCC
6278   GCC=$GXX
6279   lt_save_with_gnu_ld=$with_gnu_ld
6280   lt_save_path_LD=$lt_cv_path_LD
6281   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6282     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6283   else
6284     $as_unset lt_cv_prog_gnu_ld
6285   fi
6286   if test -n "${lt_cv_path_LDCXX+set}"; then
6287     lt_cv_path_LD=$lt_cv_path_LDCXX
6288   else
6289     $as_unset lt_cv_path_LD
6290   fi
6291   test -z "${LDCXX+set}" || LD=$LDCXX
6292   CC=${CXX-"c++"}
6293   compiler=$CC
6294   _LT_TAGVAR(compiler, $1)=$CC
6295   _LT_CC_BASENAME([$compiler])
6296
6297   if test -n "$compiler"; then
6298     # We don't want -fno-exception when compiling C++ code, so set the
6299     # no_builtin_flag separately
6300     if test "$GXX" = yes; then
6301       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6302     else
6303       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6304     fi
6305
6306     if test "$GXX" = yes; then
6307       # Set up default GNU C++ configuration
6308
6309       LT_PATH_LD
6310
6311       # Check if GNU C++ uses GNU ld as the underlying linker, since the
6312       # archiving commands below assume that GNU ld is being used.
6313       if test "$with_gnu_ld" = yes; then
6314         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6315         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6316
6317         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6318         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6319
6320         # If archive_cmds runs LD, not CC, wlarc should be empty
6321         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6322         #     investigate it a little bit more. (MM)
6323         wlarc='${wl}'
6324
6325         # ancient GNU ld didn't support --whole-archive et. al.
6326         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6327           $GREP 'no-whole-archive' > /dev/null; then
6328           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6329         else
6330           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6331         fi
6332       else
6333         with_gnu_ld=no
6334         wlarc=
6335
6336         # A generic and very simple default shared library creation
6337         # command for GNU C++ for the case where it uses the native
6338         # linker, instead of GNU ld.  If possible, this setting should
6339         # overridden to take advantage of the native linker features on
6340         # the platform it is being used on.
6341         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6342       fi
6343
6344       # Commands to make compiler produce verbose output that lists
6345       # what "hidden" libraries, object files and flags are used when
6346       # linking a shared library.
6347       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6348
6349     else
6350       GXX=no
6351       with_gnu_ld=no
6352       wlarc=
6353     fi
6354
6355     # PORTME: fill in a description of your system's C++ link characteristics
6356     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6357     _LT_TAGVAR(ld_shlibs, $1)=yes
6358     case $host_os in
6359       aix3*)
6360         # FIXME: insert proper C++ library support
6361         _LT_TAGVAR(ld_shlibs, $1)=no
6362         ;;
6363       aix[[4-9]]*)
6364         if test "$host_cpu" = ia64; then
6365           # On IA64, the linker does run time linking by default, so we don't
6366           # have to do anything special.
6367           aix_use_runtimelinking=no
6368           exp_sym_flag='-Bexport'
6369           no_entry_flag=""
6370         else
6371           aix_use_runtimelinking=no
6372
6373           # Test if we are trying to use run time linking or normal
6374           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6375           # need to do runtime linking.
6376           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6377             for ld_flag in $LDFLAGS; do
6378               case $ld_flag in
6379               *-brtl*)
6380                 aix_use_runtimelinking=yes
6381                 break
6382                 ;;
6383               esac
6384             done
6385             ;;
6386           esac
6387
6388           exp_sym_flag='-bexport'
6389           no_entry_flag='-bnoentry'
6390         fi
6391
6392         # When large executables or shared objects are built, AIX ld can
6393         # have problems creating the table of contents.  If linking a library
6394         # or program results in "error TOC overflow" add -mminimal-toc to
6395         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6396         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6397
6398         _LT_TAGVAR(archive_cmds, $1)=''
6399         _LT_TAGVAR(hardcode_direct, $1)=yes
6400         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6401         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6402         _LT_TAGVAR(link_all_deplibs, $1)=yes
6403         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6404
6405         if test "$GXX" = yes; then
6406           case $host_os in aix4.[[012]]|aix4.[[012]].*)
6407           # We only want to do this on AIX 4.2 and lower, the check
6408           # below for broken collect2 doesn't work under 4.3+
6409           collect2name=`${CC} -print-prog-name=collect2`
6410           if test -f "$collect2name" &&
6411              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6412           then
6413             # We have reworked collect2
6414             :
6415           else
6416             # We have old collect2
6417             _LT_TAGVAR(hardcode_direct, $1)=unsupported
6418             # It fails to find uninstalled libraries when the uninstalled
6419             # path is not listed in the libpath.  Setting hardcode_minus_L
6420             # to unsupported forces relinking
6421             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6422             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6423             _LT_TAGVAR(hardcode_libdir_separator, $1)=
6424           fi
6425           esac
6426           shared_flag='-shared'
6427           if test "$aix_use_runtimelinking" = yes; then
6428             shared_flag="$shared_flag "'${wl}-G'
6429           fi
6430         else
6431           # not using gcc
6432           if test "$host_cpu" = ia64; then
6433           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6434           # chokes on -Wl,-G. The following line is correct:
6435           shared_flag='-G'
6436           else
6437             if test "$aix_use_runtimelinking" = yes; then
6438               shared_flag='${wl}-G'
6439             else
6440               shared_flag='${wl}-bM:SRE'
6441             fi
6442           fi
6443         fi
6444
6445         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6446         # It seems that -bexpall does not export symbols beginning with
6447         # underscore (_), so it is better to generate a list of symbols to
6448         # export.
6449         _LT_TAGVAR(always_export_symbols, $1)=yes
6450         if test "$aix_use_runtimelinking" = yes; then
6451           # Warning - without using the other runtime loading flags (-brtl),
6452           # -berok will link without error, but may produce a broken library.
6453           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6454           # Determine the default libpath from the value encoded in an empty
6455           # executable.
6456           _LT_SYS_MODULE_PATH_AIX
6457           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6458
6459           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6460         else
6461           if test "$host_cpu" = ia64; then
6462             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6463             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6464             _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6465           else
6466             # Determine the default libpath from the value encoded in an
6467             # empty executable.
6468             _LT_SYS_MODULE_PATH_AIX
6469             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6470             # Warning - without using the other run time loading flags,
6471             # -berok will link without error, but may produce a broken library.
6472             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6473             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6474             # Exported symbols can be pulled into shared objects from archives
6475             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6476             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6477             # This is similar to how AIX traditionally builds its shared
6478             # libraries.
6479             _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6480           fi
6481         fi
6482         ;;
6483
6484       beos*)
6485         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6486           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6487           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6488           # support --undefined.  This deserves some investigation.  FIXME
6489           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6490         else
6491           _LT_TAGVAR(ld_shlibs, $1)=no
6492         fi
6493         ;;
6494
6495       chorus*)
6496         case $cc_basename in
6497           *)
6498           # FIXME: insert proper C++ library support
6499           _LT_TAGVAR(ld_shlibs, $1)=no
6500           ;;
6501         esac
6502         ;;
6503
6504       cygwin* | mingw* | pw32* | cegcc*)
6505         # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6506         # as there is no search path for DLLs.
6507         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6508         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6509         _LT_TAGVAR(always_export_symbols, $1)=no
6510         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6511
6512         if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6513           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6514           # If the export-symbols file already is a .def file (1st line
6515           # is EXPORTS), use it as is; otherwise, prepend...
6516           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6517             cp $export_symbols $output_objdir/$soname.def;
6518           else
6519             echo EXPORTS > $output_objdir/$soname.def;
6520             cat $export_symbols >> $output_objdir/$soname.def;
6521           fi~
6522           $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'
6523         else
6524           _LT_TAGVAR(ld_shlibs, $1)=no
6525         fi
6526         ;;
6527       darwin* | rhapsody*)
6528         _LT_DARWIN_LINKER_FEATURES($1)
6529         ;;
6530
6531       dgux*)
6532         case $cc_basename in
6533           ec++*)
6534             # FIXME: insert proper C++ library support
6535             _LT_TAGVAR(ld_shlibs, $1)=no
6536             ;;
6537           ghcx*)
6538             # Green Hills C++ Compiler
6539             # FIXME: insert proper C++ library support
6540             _LT_TAGVAR(ld_shlibs, $1)=no
6541             ;;
6542           *)
6543             # FIXME: insert proper C++ library support
6544             _LT_TAGVAR(ld_shlibs, $1)=no
6545             ;;
6546         esac
6547         ;;
6548
6549       freebsd[[12]]*)
6550         # C++ shared libraries reported to be fairly broken before
6551         # switch to ELF
6552         _LT_TAGVAR(ld_shlibs, $1)=no
6553         ;;
6554
6555       freebsd-elf*)
6556         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6557         ;;
6558
6559       freebsd* | dragonfly*)
6560         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6561         # conventions
6562         _LT_TAGVAR(ld_shlibs, $1)=yes
6563         ;;
6564
6565       gnu*)
6566         ;;
6567
6568       hpux9*)
6569         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6570         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6571         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6572         _LT_TAGVAR(hardcode_direct, $1)=yes
6573         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6574                                              # but as the default
6575                                              # location of the library.
6576
6577         case $cc_basename in
6578           CC*)
6579             # FIXME: insert proper C++ library support
6580             _LT_TAGVAR(ld_shlibs, $1)=no
6581             ;;
6582           aCC*)
6583             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6584             # Commands to make compiler produce verbose output that lists
6585             # what "hidden" libraries, object files and flags are used when
6586             # linking a shared library.
6587             #
6588             # There doesn't appear to be a way to prevent this compiler from
6589             # explicitly linking system object files so we need to strip them
6590             # from the output so that they don't get included in the library
6591             # dependencies.
6592             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6593             ;;
6594           *)
6595             if test "$GXX" = yes; then
6596               _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6597             else
6598               # FIXME: insert proper C++ library support
6599               _LT_TAGVAR(ld_shlibs, $1)=no
6600             fi
6601             ;;
6602         esac
6603         ;;
6604
6605       hpux10*|hpux11*)
6606         if test $with_gnu_ld = no; then
6607           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6608           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6609
6610           case $host_cpu in
6611             hppa*64*|ia64*)
6612               ;;
6613             *)
6614               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6615               ;;
6616           esac
6617         fi
6618         case $host_cpu in
6619           hppa*64*|ia64*)
6620             _LT_TAGVAR(hardcode_direct, $1)=no
6621             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6622             ;;
6623           *)
6624             _LT_TAGVAR(hardcode_direct, $1)=yes
6625             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6626             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6627                                                  # but as the default
6628                                                  # location of the library.
6629             ;;
6630         esac
6631
6632         case $cc_basename in
6633           CC*)
6634             # FIXME: insert proper C++ library support
6635             _LT_TAGVAR(ld_shlibs, $1)=no
6636             ;;
6637           aCC*)
6638             case $host_cpu in
6639               hppa*64*)
6640                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6641                 ;;
6642               ia64*)
6643                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6644                 ;;
6645               *)
6646                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6647                 ;;
6648             esac
6649             # Commands to make compiler produce verbose output that lists
6650             # what "hidden" libraries, object files and flags are used when
6651             # linking a shared library.
6652             #
6653             # There doesn't appear to be a way to prevent this compiler from
6654             # explicitly linking system object files so we need to strip them
6655             # from the output so that they don't get included in the library
6656             # dependencies.
6657             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6658             ;;
6659           *)
6660             if test "$GXX" = yes; then
6661               if test $with_gnu_ld = no; then
6662                 case $host_cpu in
6663                   hppa*64*)
6664                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6665                     ;;
6666                   ia64*)
6667                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6668                     ;;
6669                   *)
6670                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6671                     ;;
6672                 esac
6673               fi
6674             else
6675               # FIXME: insert proper C++ library support
6676               _LT_TAGVAR(ld_shlibs, $1)=no
6677             fi
6678             ;;
6679         esac
6680         ;;
6681
6682       interix[[3-9]]*)
6683         _LT_TAGVAR(hardcode_direct, $1)=no
6684         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6685         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6686         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6687         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6688         # Instead, shared libraries are loaded at an image base (0x10000000 by
6689         # default) and relocated if they conflict, which is a slow very memory
6690         # consuming and fragmenting process.  To avoid this, we pick a random,
6691         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6692         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6693         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6694         _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6695         ;;
6696       irix5* | irix6*)
6697         case $cc_basename in
6698           CC*)
6699             # SGI C++
6700             _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6701
6702             # Archives containing C++ object files must be created using
6703             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6704             # necessary to make sure instantiated templates are included
6705             # in the archive.
6706             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6707             ;;
6708           *)
6709             if test "$GXX" = yes; then
6710               if test "$with_gnu_ld" = no; then
6711                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6712               else
6713                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
6714               fi
6715             fi
6716             _LT_TAGVAR(link_all_deplibs, $1)=yes
6717             ;;
6718         esac
6719         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6720         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6721         _LT_TAGVAR(inherit_rpath, $1)=yes
6722         ;;
6723
6724       linux* | k*bsd*-gnu)
6725         case $cc_basename in
6726           KCC*)
6727             # Kuck and Associates, Inc. (KAI) C++ Compiler
6728
6729             # KCC will only create a shared library if the output file
6730             # ends with ".so" (or ".sl" for HP-UX), so rename the library
6731             # to its proper name (with version) after linking.
6732             _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6733             _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6734             # Commands to make compiler produce verbose output that lists
6735             # what "hidden" libraries, object files and flags are used when
6736             # linking a shared library.
6737             #
6738             # There doesn't appear to be a way to prevent this compiler from
6739             # explicitly linking system object files so we need to strip them
6740             # from the output so that they don't get included in the library
6741             # dependencies.
6742             output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6743
6744             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6745             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6746
6747             # Archives containing C++ object files must be created using
6748             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6749             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6750             ;;
6751           icpc* | ecpc* )
6752             # Intel C++
6753             with_gnu_ld=yes
6754             # version 8.0 and above of icpc choke on multiply defined symbols
6755             # if we add $predep_objects and $postdep_objects, however 7.1 and
6756             # earlier do not add the objects themselves.
6757             case `$CC -V 2>&1` in
6758               *"Version 7."*)
6759                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6760                 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6761                 ;;
6762               *)  # Version 8.0 or newer
6763                 tmp_idyn=
6764                 case $host_cpu in
6765                   ia64*) tmp_idyn=' -i_dynamic';;
6766                 esac
6767                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6768                 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6769                 ;;
6770             esac
6771             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6772             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6773             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6774             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6775             ;;
6776           pgCC* | pgcpp*)
6777             # Portland Group C++ compiler
6778             case `$CC -V` in
6779             *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
6780               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6781                 rm -rf $tpldir~
6782                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6783                 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
6784               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6785                 rm -rf $tpldir~
6786                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6787                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
6788                 $RANLIB $oldlib'
6789               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6790                 rm -rf $tpldir~
6791                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6792                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6793               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6794                 rm -rf $tpldir~
6795                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6796                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6797               ;;
6798             *) # Version 6 will use weak symbols
6799               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6800               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6801               ;;
6802             esac
6803
6804             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6805             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6806             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6807             ;;
6808           cxx*)
6809             # Compaq C++
6810             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6811             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
6812
6813             runpath_var=LD_RUN_PATH
6814             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6815             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6816
6817             # Commands to make compiler produce verbose output that lists
6818             # what "hidden" libraries, object files and flags are used when
6819             # linking a shared library.
6820             #
6821             # There doesn't appear to be a way to prevent this compiler from
6822             # explicitly linking system object files so we need to strip them
6823             # from the output so that they don't get included in the library
6824             # dependencies.
6825             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6826             ;;
6827           xl*)
6828             # IBM XL 8.0 on PPC, with GNU ld
6829             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6830             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6831             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6832             if test "x$supports_anon_versioning" = xyes; then
6833               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6834                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6835                 echo "local: *; };" >> $output_objdir/$libname.ver~
6836                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6837             fi
6838             ;;
6839           *)
6840             case `$CC -V 2>&1 | sed 5q` in
6841             *Sun\ C*)
6842               # Sun C++ 5.9
6843               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6844               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6845               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6846               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6847               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6848               _LT_TAGVAR(compiler_needs_object, $1)=yes
6849
6850               # Not sure whether something based on
6851               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6852               # would be better.
6853               output_verbose_link_cmd='echo'
6854
6855               # Archives containing C++ object files must be created using
6856               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6857               # necessary to make sure instantiated templates are included
6858               # in the archive.
6859               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6860               ;;
6861             esac
6862             ;;
6863         esac
6864         ;;
6865
6866       lynxos*)
6867         # FIXME: insert proper C++ library support
6868         _LT_TAGVAR(ld_shlibs, $1)=no
6869         ;;
6870
6871       m88k*)
6872         # FIXME: insert proper C++ library support
6873         _LT_TAGVAR(ld_shlibs, $1)=no
6874         ;;
6875
6876       mvs*)
6877         case $cc_basename in
6878           cxx*)
6879             # FIXME: insert proper C++ library support
6880             _LT_TAGVAR(ld_shlibs, $1)=no
6881             ;;
6882           *)
6883             # FIXME: insert proper C++ library support
6884             _LT_TAGVAR(ld_shlibs, $1)=no
6885             ;;
6886         esac
6887         ;;
6888
6889       netbsd*)
6890         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6891           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6892           wlarc=
6893           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6894           _LT_TAGVAR(hardcode_direct, $1)=yes
6895           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6896         fi
6897         # Workaround some broken pre-1.5 toolchains
6898         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6899         ;;
6900
6901       *nto* | *qnx*)
6902         _LT_TAGVAR(ld_shlibs, $1)=yes
6903         ;;
6904
6905       openbsd2*)
6906         # C++ shared libraries are fairly broken
6907         _LT_TAGVAR(ld_shlibs, $1)=no
6908         ;;
6909
6910       openbsd*)
6911         if test -f /usr/libexec/ld.so; then
6912           _LT_TAGVAR(hardcode_direct, $1)=yes
6913           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6914           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6915           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6916           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6917           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6918             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6919             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6920             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6921           fi
6922           output_verbose_link_cmd=echo
6923         else
6924           _LT_TAGVAR(ld_shlibs, $1)=no
6925         fi
6926         ;;
6927
6928       osf3* | osf4* | osf5*)
6929         case $cc_basename in
6930           KCC*)
6931             # Kuck and Associates, Inc. (KAI) C++ Compiler
6932
6933             # KCC will only create a shared library if the output file
6934             # ends with ".so" (or ".sl" for HP-UX), so rename the library
6935             # to its proper name (with version) after linking.
6936             _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6937
6938             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6939             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6940
6941             # Archives containing C++ object files must be created using
6942             # the KAI C++ compiler.
6943             case $host in
6944               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6945               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6946             esac
6947             ;;
6948           RCC*)
6949             # Rational C++ 2.4.1
6950             # FIXME: insert proper C++ library support
6951             _LT_TAGVAR(ld_shlibs, $1)=no
6952             ;;
6953           cxx*)
6954             case $host in
6955               osf3*)
6956                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6957                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6958                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6959                 ;;
6960               *)
6961                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6962                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6963                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6964                   echo "-hidden">> $lib.exp~
6965                   $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
6966                   $RM $lib.exp'
6967                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6968                 ;;
6969             esac
6970
6971             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6972
6973             # Commands to make compiler produce verbose output that lists
6974             # what "hidden" libraries, object files and flags are used when
6975             # linking a shared library.
6976             #
6977             # There doesn't appear to be a way to prevent this compiler from
6978             # explicitly linking system object files so we need to strip them
6979             # from the output so that they don't get included in the library
6980             # dependencies.
6981             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6982             ;;
6983           *)
6984             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6985               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6986               case $host in
6987                 osf3*)
6988                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6989                   ;;
6990                 *)
6991                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6992                   ;;
6993               esac
6994
6995               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6996               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6997
6998               # Commands to make compiler produce verbose output that lists
6999               # what "hidden" libraries, object files and flags are used when
7000               # linking a shared library.
7001               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7002
7003             else
7004               # FIXME: insert proper C++ library support
7005               _LT_TAGVAR(ld_shlibs, $1)=no
7006             fi
7007             ;;
7008         esac
7009         ;;
7010
7011       psos*)
7012         # FIXME: insert proper C++ library support
7013         _LT_TAGVAR(ld_shlibs, $1)=no
7014         ;;
7015
7016       sunos4*)
7017         case $cc_basename in
7018           CC*)
7019             # Sun C++ 4.x
7020             # FIXME: insert proper C++ library support
7021             _LT_TAGVAR(ld_shlibs, $1)=no
7022             ;;
7023           lcc*)
7024             # Lucid
7025             # FIXME: insert proper C++ library support
7026             _LT_TAGVAR(ld_shlibs, $1)=no
7027             ;;
7028           *)
7029             # FIXME: insert proper C++ library support
7030             _LT_TAGVAR(ld_shlibs, $1)=no
7031             ;;
7032         esac
7033         ;;
7034
7035       solaris*)
7036         case $cc_basename in
7037           CC*)
7038             # Sun C++ 4.2, 5.x and Centerline C++
7039             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7040             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7041             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7042             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7043               $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'
7044
7045             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7046             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7047             case $host_os in
7048               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7049               *)
7050                 # The compiler driver will combine and reorder linker options,
7051                 # but understands `-z linker_flag'.
7052                 # Supported since Solaris 2.6 (maybe 2.5.1?)
7053                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7054                 ;;
7055             esac
7056             _LT_TAGVAR(link_all_deplibs, $1)=yes
7057
7058             output_verbose_link_cmd='echo'
7059
7060             # Archives containing C++ object files must be created using
7061             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7062             # necessary to make sure instantiated templates are included
7063             # in the archive.
7064             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7065             ;;
7066           gcx*)
7067             # Green Hills C++ Compiler
7068             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7069
7070             # The C++ compiler must be used to create the archive.
7071             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7072             ;;
7073           *)
7074             # GNU C++ compiler with Solaris linker
7075             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7076               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7077               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7078                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7079                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7080                   $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7081
7082                 # Commands to make compiler produce verbose output that lists
7083                 # what "hidden" libraries, object files and flags are used when
7084                 # linking a shared library.
7085                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7086               else
7087                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7088                 # platform.
7089                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7090                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7091                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7092
7093                 # Commands to make compiler produce verbose output that lists
7094                 # what "hidden" libraries, object files and flags are used when
7095                 # linking a shared library.
7096                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7097               fi
7098
7099               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7100               case $host_os in
7101                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7102                 *)
7103                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7104                   ;;
7105               esac
7106             fi
7107             ;;
7108         esac
7109         ;;
7110
7111     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7112       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7113       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7114       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7115       runpath_var='LD_RUN_PATH'
7116
7117       case $cc_basename in
7118         CC*)
7119           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7120           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7121           ;;
7122         *)
7123           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7124           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7125           ;;
7126       esac
7127       ;;
7128
7129       sysv5* | sco3.2v5* | sco5v6*)
7130         # Note: We can NOT use -z defs as we might desire, because we do not
7131         # link with -lc, and that would cause any symbols used from libc to
7132         # always be unresolved, which means just about no library would
7133         # ever link correctly.  If we're not using GNU ld we use -z text
7134         # though, which does catch some bad symbols but isn't as heavy-handed
7135         # as -z defs.
7136         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7137         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7138         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7139         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7140         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7141         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7142         _LT_TAGVAR(link_all_deplibs, $1)=yes
7143         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7144         runpath_var='LD_RUN_PATH'
7145
7146         case $cc_basename in
7147           CC*)
7148             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7149             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7150             ;;
7151           *)
7152             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7153             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7154             ;;
7155         esac
7156       ;;
7157
7158       tandem*)
7159         case $cc_basename in
7160           NCC*)
7161             # NonStop-UX NCC 3.20
7162             # FIXME: insert proper C++ library support
7163             _LT_TAGVAR(ld_shlibs, $1)=no
7164             ;;
7165           *)
7166             # FIXME: insert proper C++ library support
7167             _LT_TAGVAR(ld_shlibs, $1)=no
7168             ;;
7169         esac
7170         ;;
7171
7172       vxworks*)
7173         # FIXME: insert proper C++ library support
7174         _LT_TAGVAR(ld_shlibs, $1)=no
7175         ;;
7176
7177       *)
7178         # FIXME: insert proper C++ library support
7179         _LT_TAGVAR(ld_shlibs, $1)=no
7180         ;;
7181     esac
7182
7183     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7184     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7185
7186     _LT_TAGVAR(GCC, $1)="$GXX"
7187     _LT_TAGVAR(LD, $1)="$LD"
7188
7189     ## CAVEAT EMPTOR:
7190     ## There is no encapsulation within the following macros, do not change
7191     ## the running order or otherwise move them around unless you know exactly
7192     ## what you are doing...
7193     _LT_SYS_HIDDEN_LIBDEPS($1)
7194     _LT_COMPILER_PIC($1)
7195     _LT_COMPILER_C_O($1)
7196     _LT_COMPILER_FILE_LOCKS($1)
7197     _LT_LINKER_SHLIBS($1)
7198     _LT_SYS_DYNAMIC_LINKER($1)
7199     _LT_LINKER_HARDCODE_LIBPATH($1)
7200
7201     _LT_CONFIG($1)
7202   fi # test -n "$compiler"
7203
7204   CC=$lt_save_CC
7205   LDCXX=$LD
7206   LD=$lt_save_LD
7207   GCC=$lt_save_GCC
7208   with_gnu_ld=$lt_save_with_gnu_ld
7209   lt_cv_path_LDCXX=$lt_cv_path_LD
7210   lt_cv_path_LD=$lt_save_path_LD
7211   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7212   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7213 fi # test "$_lt_caught_CXX_error" != yes
7214
7215 AC_LANG_POP
7216 ])# _LT_LANG_CXX_CONFIG
7217
7218
7219 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7220 # ---------------------------------
7221 # Figure out "hidden" library dependencies from verbose
7222 # compiler output when linking a shared library.
7223 # Parse the compiler output and extract the necessary
7224 # objects, libraries and library flags.
7225 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7226 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7227 # Dependencies to place before and after the object being linked:
7228 _LT_TAGVAR(predep_objects, $1)=
7229 _LT_TAGVAR(postdep_objects, $1)=
7230 _LT_TAGVAR(predeps, $1)=
7231 _LT_TAGVAR(postdeps, $1)=
7232 _LT_TAGVAR(compiler_lib_search_path, $1)=
7233
7234 dnl we can't use the lt_simple_compile_test_code here,
7235 dnl because it contains code intended for an executable,
7236 dnl not a library.  It's possible we should let each
7237 dnl tag define a new lt_????_link_test_code variable,
7238 dnl but it's only used here...
7239 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7240 int a;
7241 void foo (void) { a = 0; }
7242 _LT_EOF
7243 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7244 class Foo
7245 {
7246 public:
7247   Foo (void) { a = 0; }
7248 private:
7249   int a;
7250 };
7251 _LT_EOF
7252 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7253       subroutine foo
7254       implicit none
7255       integer*4 a
7256       a=0
7257       return
7258       end
7259 _LT_EOF
7260 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7261       subroutine foo
7262       implicit none
7263       integer a
7264       a=0
7265       return
7266       end
7267 _LT_EOF
7268 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7269 public class foo {
7270   private int a;
7271   public void bar (void) {
7272     a = 0;
7273   }
7274 };
7275 _LT_EOF
7276 ])
7277 dnl Parse the compiler output and extract the necessary
7278 dnl objects, libraries and library flags.
7279 if AC_TRY_EVAL(ac_compile); then
7280   # Parse the compiler output and extract the necessary
7281   # objects, libraries and library flags.
7282
7283   # Sentinel used to keep track of whether or not we are before
7284   # the conftest object file.
7285   pre_test_object_deps_done=no
7286
7287   for p in `eval "$output_verbose_link_cmd"`; do
7288     case $p in
7289
7290     -L* | -R* | -l*)
7291        # Some compilers place space between "-{L,R}" and the path.
7292        # Remove the space.
7293        if test $p = "-L" ||
7294           test $p = "-R"; then
7295          prev=$p
7296          continue
7297        else
7298          prev=
7299        fi
7300
7301        if test "$pre_test_object_deps_done" = no; then
7302          case $p in
7303          -L* | -R*)
7304            # Internal compiler library paths should come after those
7305            # provided the user.  The postdeps already come after the
7306            # user supplied libs so there is no need to process them.
7307            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7308              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7309            else
7310              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7311            fi
7312            ;;
7313          # The "-l" case would never come before the object being
7314          # linked, so don't bother handling this case.
7315          esac
7316        else
7317          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7318            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7319          else
7320            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7321          fi
7322        fi
7323        ;;
7324
7325     *.$objext)
7326        # This assumes that the test object file only shows up
7327        # once in the compiler output.
7328        if test "$p" = "conftest.$objext"; then
7329          pre_test_object_deps_done=yes
7330          continue
7331        fi
7332
7333        if test "$pre_test_object_deps_done" = no; then
7334          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7335            _LT_TAGVAR(predep_objects, $1)="$p"
7336          else
7337            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7338          fi
7339        else
7340          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7341            _LT_TAGVAR(postdep_objects, $1)="$p"
7342          else
7343            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7344          fi
7345        fi
7346        ;;
7347
7348     *) ;; # Ignore the rest.
7349
7350     esac
7351   done
7352
7353   # Clean up.
7354   rm -f a.out a.exe
7355 else
7356   echo "libtool.m4: error: problem compiling $1 test program"
7357 fi
7358
7359 $RM -f confest.$objext
7360
7361 # PORTME: override above test on systems where it is broken
7362 m4_if([$1], [CXX],
7363 [case $host_os in
7364 interix[[3-9]]*)
7365   # Interix 3.5 installs completely hosed .la files for C++, so rather than
7366   # hack all around it, let's just trust "g++" to DTRT.
7367   _LT_TAGVAR(predep_objects,$1)=
7368   _LT_TAGVAR(postdep_objects,$1)=
7369   _LT_TAGVAR(postdeps,$1)=
7370   ;;
7371
7372 linux*)
7373   case `$CC -V 2>&1 | sed 5q` in
7374   *Sun\ C*)
7375     # Sun C++ 5.9
7376
7377     # The more standards-conforming stlport4 library is
7378     # incompatible with the Cstd library. Avoid specifying
7379     # it if it's in CXXFLAGS. Ignore libCrun as
7380     # -library=stlport4 depends on it.
7381     case " $CXX $CXXFLAGS " in
7382     *" -library=stlport4 "*)
7383       solaris_use_stlport4=yes
7384       ;;
7385     esac
7386
7387     if test "$solaris_use_stlport4" != yes; then
7388       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7389     fi
7390     ;;
7391   esac
7392   ;;
7393
7394 solaris*)
7395   case $cc_basename in
7396   CC*)
7397     # The more standards-conforming stlport4 library is
7398     # incompatible with the Cstd library. Avoid specifying
7399     # it if it's in CXXFLAGS. Ignore libCrun as
7400     # -library=stlport4 depends on it.
7401     case " $CXX $CXXFLAGS " in
7402     *" -library=stlport4 "*)
7403       solaris_use_stlport4=yes
7404       ;;
7405     esac
7406
7407     # Adding this requires a known-good setup of shared libraries for
7408     # Sun compiler versions before 5.6, else PIC objects from an old
7409     # archive will be linked into the output, leading to subtle bugs.
7410     if test "$solaris_use_stlport4" != yes; then
7411       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7412     fi
7413     ;;
7414   esac
7415   ;;
7416 esac
7417 ])
7418
7419 case " $_LT_TAGVAR(postdeps, $1) " in
7420 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7421 esac
7422  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7423 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7424  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7425 fi
7426 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7427     [The directories searched by this compiler when creating a shared library])
7428 _LT_TAGDECL([], [predep_objects], [1],
7429     [Dependencies to place before and after the objects being linked to
7430     create a shared library])
7431 _LT_TAGDECL([], [postdep_objects], [1])
7432 _LT_TAGDECL([], [predeps], [1])
7433 _LT_TAGDECL([], [postdeps], [1])
7434 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7435     [The library search path used internally by the compiler when linking
7436     a shared library])
7437 ])# _LT_SYS_HIDDEN_LIBDEPS
7438
7439
7440 # _LT_PROG_F77
7441 # ------------
7442 # Since AC_PROG_F77 is broken, in that it returns the empty string
7443 # if there is no fortran compiler, we have our own version here.
7444 m4_defun([_LT_PROG_F77],
7445 [
7446 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
7447 AC_PROG_F77
7448 if test -z "$F77" || test "X$F77" = "Xno"; then
7449   _lt_disable_F77=yes
7450 fi
7451 popdef([AC_MSG_ERROR])
7452 ])# _LT_PROG_F77
7453
7454 dnl aclocal-1.4 backwards compatibility:
7455 dnl AC_DEFUN([_LT_PROG_F77], [])
7456
7457
7458 # _LT_LANG_F77_CONFIG([TAG])
7459 # --------------------------
7460 # Ensure that the configuration variables for a Fortran 77 compiler are
7461 # suitably defined.  These variables are subsequently used by _LT_CONFIG
7462 # to write the compiler configuration to `libtool'.
7463 m4_defun([_LT_LANG_F77_CONFIG],
7464 [AC_REQUIRE([_LT_PROG_F77])dnl
7465 AC_LANG_PUSH(Fortran 77)
7466
7467 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7468 _LT_TAGVAR(allow_undefined_flag, $1)=
7469 _LT_TAGVAR(always_export_symbols, $1)=no
7470 _LT_TAGVAR(archive_expsym_cmds, $1)=
7471 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7472 _LT_TAGVAR(hardcode_direct, $1)=no
7473 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7474 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7475 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7476 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7477 _LT_TAGVAR(hardcode_minus_L, $1)=no
7478 _LT_TAGVAR(hardcode_automatic, $1)=no
7479 _LT_TAGVAR(inherit_rpath, $1)=no
7480 _LT_TAGVAR(module_cmds, $1)=
7481 _LT_TAGVAR(module_expsym_cmds, $1)=
7482 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7483 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7484 _LT_TAGVAR(no_undefined_flag, $1)=
7485 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7486 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7487
7488 # Source file extension for f77 test sources.
7489 ac_ext=f
7490
7491 # Object file extension for compiled f77 test sources.
7492 objext=o
7493 _LT_TAGVAR(objext, $1)=$objext
7494
7495 # No sense in running all these tests if we already determined that
7496 # the F77 compiler isn't working.  Some variables (like enable_shared)
7497 # are currently assumed to apply to all compilers on this platform,
7498 # and will be corrupted by setting them based on a non-working compiler.
7499 if test "$_lt_disable_F77" != yes; then
7500   # Code to be used in simple compile tests
7501   lt_simple_compile_test_code="\
7502       subroutine t
7503       return
7504       end
7505 "
7506
7507   # Code to be used in simple link tests
7508   lt_simple_link_test_code="\
7509       program t
7510       end
7511 "
7512
7513   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7514   _LT_TAG_COMPILER
7515
7516   # save warnings/boilerplate of simple test code
7517   _LT_COMPILER_BOILERPLATE
7518   _LT_LINKER_BOILERPLATE
7519
7520   # Allow CC to be a program name with arguments.
7521   lt_save_CC="$CC"
7522   lt_save_GCC=$GCC
7523   CC=${F77-"f77"}
7524   compiler=$CC
7525   _LT_TAGVAR(compiler, $1)=$CC
7526   _LT_CC_BASENAME([$compiler])
7527   GCC=$G77
7528   if test -n "$compiler"; then
7529     AC_MSG_CHECKING([if libtool supports shared libraries])
7530     AC_MSG_RESULT([$can_build_shared])
7531
7532     AC_MSG_CHECKING([whether to build shared libraries])
7533     test "$can_build_shared" = "no" && enable_shared=no
7534
7535     # On AIX, shared libraries and static libraries use the same namespace, and
7536     # are all built from PIC.
7537     case $host_os in
7538       aix3*)
7539         test "$enable_shared" = yes && enable_static=no
7540         if test -n "$RANLIB"; then
7541           archive_cmds="$archive_cmds~\$RANLIB \$lib"
7542           postinstall_cmds='$RANLIB $lib'
7543         fi
7544         ;;
7545       aix[[4-9]]*)
7546         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7547           test "$enable_shared" = yes && enable_static=no
7548         fi
7549         ;;
7550     esac
7551     AC_MSG_RESULT([$enable_shared])
7552
7553     AC_MSG_CHECKING([whether to build static libraries])
7554     # Make sure either enable_shared or enable_static is yes.
7555     test "$enable_shared" = yes || enable_static=yes
7556     AC_MSG_RESULT([$enable_static])
7557
7558     _LT_TAGVAR(GCC, $1)="$G77"
7559     _LT_TAGVAR(LD, $1)="$LD"
7560
7561     ## CAVEAT EMPTOR:
7562     ## There is no encapsulation within the following macros, do not change
7563     ## the running order or otherwise move them around unless you know exactly
7564     ## what you are doing...
7565     _LT_COMPILER_PIC($1)
7566     _LT_COMPILER_C_O($1)
7567     _LT_COMPILER_FILE_LOCKS($1)
7568     _LT_LINKER_SHLIBS($1)
7569     _LT_SYS_DYNAMIC_LINKER($1)
7570     _LT_LINKER_HARDCODE_LIBPATH($1)
7571
7572     _LT_CONFIG($1)
7573   fi # test -n "$compiler"
7574
7575   GCC=$lt_save_GCC
7576   CC="$lt_save_CC"
7577 fi # test "$_lt_disable_F77" != yes
7578
7579 AC_LANG_POP
7580 ])# _LT_LANG_F77_CONFIG
7581
7582
7583 # _LT_PROG_FC
7584 # -----------
7585 # Since AC_PROG_FC is broken, in that it returns the empty string
7586 # if there is no fortran compiler, we have our own version here.
7587 m4_defun([_LT_PROG_FC],
7588 [
7589 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
7590 AC_PROG_FC
7591 if test -z "$FC" || test "X$FC" = "Xno"; then
7592   _lt_disable_FC=yes
7593 fi
7594 popdef([AC_MSG_ERROR])
7595 ])# _LT_PROG_FC
7596
7597 dnl aclocal-1.4 backwards compatibility:
7598 dnl AC_DEFUN([_LT_PROG_FC], [])
7599
7600
7601 # _LT_LANG_FC_CONFIG([TAG])
7602 # -------------------------
7603 # Ensure that the configuration variables for a Fortran compiler are
7604 # suitably defined.  These variables are subsequently used by _LT_CONFIG
7605 # to write the compiler configuration to `libtool'.
7606 m4_defun([_LT_LANG_FC_CONFIG],
7607 [AC_REQUIRE([_LT_PROG_FC])dnl
7608 AC_LANG_PUSH(Fortran)
7609
7610 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7611 _LT_TAGVAR(allow_undefined_flag, $1)=
7612 _LT_TAGVAR(always_export_symbols, $1)=no
7613 _LT_TAGVAR(archive_expsym_cmds, $1)=
7614 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7615 _LT_TAGVAR(hardcode_direct, $1)=no
7616 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7617 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7618 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7619 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7620 _LT_TAGVAR(hardcode_minus_L, $1)=no
7621 _LT_TAGVAR(hardcode_automatic, $1)=no
7622 _LT_TAGVAR(inherit_rpath, $1)=no
7623 _LT_TAGVAR(module_cmds, $1)=
7624 _LT_TAGVAR(module_expsym_cmds, $1)=
7625 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7626 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7627 _LT_TAGVAR(no_undefined_flag, $1)=
7628 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7629 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7630
7631 # Source file extension for fc test sources.
7632 ac_ext=${ac_fc_srcext-f}
7633
7634 # Object file extension for compiled fc test sources.
7635 objext=o
7636 _LT_TAGVAR(objext, $1)=$objext
7637
7638 # No sense in running all these tests if we already determined that
7639 # the FC compiler isn't working.  Some variables (like enable_shared)
7640 # are currently assumed to apply to all compilers on this platform,
7641 # and will be corrupted by setting them based on a non-working compiler.
7642 if test "$_lt_disable_FC" != yes; then
7643   # Code to be used in simple compile tests
7644   lt_simple_compile_test_code="\
7645       subroutine t
7646       return
7647       end
7648 "
7649
7650   # Code to be used in simple link tests
7651   lt_simple_link_test_code="\
7652       program t
7653       end
7654 "
7655
7656   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7657   _LT_TAG_COMPILER
7658
7659   # save warnings/boilerplate of simple test code
7660   _LT_COMPILER_BOILERPLATE
7661   _LT_LINKER_BOILERPLATE
7662
7663   # Allow CC to be a program name with arguments.
7664   lt_save_CC="$CC"
7665   lt_save_GCC=$GCC
7666   CC=${FC-"f95"}
7667   compiler=$CC
7668   GCC=$ac_cv_fc_compiler_gnu
7669
7670   _LT_TAGVAR(compiler, $1)=$CC
7671   _LT_CC_BASENAME([$compiler])
7672
7673   if test -n "$compiler"; then
7674     AC_MSG_CHECKING([if libtool supports shared libraries])
7675     AC_MSG_RESULT([$can_build_shared])
7676
7677     AC_MSG_CHECKING([whether to build shared libraries])
7678     test "$can_build_shared" = "no" && enable_shared=no
7679
7680     # On AIX, shared libraries and static libraries use the same namespace, and
7681     # are all built from PIC.
7682     case $host_os in
7683       aix3*)
7684         test "$enable_shared" = yes && enable_static=no
7685         if test -n "$RANLIB"; then
7686           archive_cmds="$archive_cmds~\$RANLIB \$lib"
7687           postinstall_cmds='$RANLIB $lib'
7688         fi
7689         ;;
7690       aix[[4-9]]*)
7691         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7692           test "$enable_shared" = yes && enable_static=no
7693         fi
7694         ;;
7695     esac
7696     AC_MSG_RESULT([$enable_shared])
7697
7698     AC_MSG_CHECKING([whether to build static libraries])
7699     # Make sure either enable_shared or enable_static is yes.
7700     test "$enable_shared" = yes || enable_static=yes
7701     AC_MSG_RESULT([$enable_static])
7702
7703     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7704     _LT_TAGVAR(LD, $1)="$LD"
7705
7706     ## CAVEAT EMPTOR:
7707     ## There is no encapsulation within the following macros, do not change
7708     ## the running order or otherwise move them around unless you know exactly
7709     ## what you are doing...
7710     _LT_SYS_HIDDEN_LIBDEPS($1)
7711     _LT_COMPILER_PIC($1)
7712     _LT_COMPILER_C_O($1)
7713     _LT_COMPILER_FILE_LOCKS($1)
7714     _LT_LINKER_SHLIBS($1)
7715     _LT_SYS_DYNAMIC_LINKER($1)
7716     _LT_LINKER_HARDCODE_LIBPATH($1)
7717
7718     _LT_CONFIG($1)
7719   fi # test -n "$compiler"
7720
7721   GCC=$lt_save_GCC
7722   CC="$lt_save_CC"
7723 fi # test "$_lt_disable_FC" != yes
7724
7725 AC_LANG_POP
7726 ])# _LT_LANG_FC_CONFIG
7727
7728
7729 # _LT_LANG_GCJ_CONFIG([TAG])
7730 # --------------------------
7731 # Ensure that the configuration variables for the GNU Java Compiler compiler
7732 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
7733 # to write the compiler configuration to `libtool'.
7734 m4_defun([_LT_LANG_GCJ_CONFIG],
7735 [AC_REQUIRE([LT_PROG_GCJ])dnl
7736 AC_LANG_SAVE
7737
7738 # Source file extension for Java test sources.
7739 ac_ext=java
7740
7741 # Object file extension for compiled Java test sources.
7742 objext=o
7743 _LT_TAGVAR(objext, $1)=$objext
7744
7745 # Code to be used in simple compile tests
7746 lt_simple_compile_test_code="class foo {}"
7747
7748 # Code to be used in simple link tests
7749 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7750
7751 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7752 _LT_TAG_COMPILER
7753
7754 # save warnings/boilerplate of simple test code
7755 _LT_COMPILER_BOILERPLATE
7756 _LT_LINKER_BOILERPLATE
7757
7758 # Allow CC to be a program name with arguments.
7759 lt_save_CC="$CC"
7760 lt_save_GCC=$GCC
7761 GCC=yes
7762 CC=${GCJ-"gcj"}
7763 compiler=$CC
7764 _LT_TAGVAR(compiler, $1)=$CC
7765 _LT_TAGVAR(LD, $1)="$LD"
7766 _LT_CC_BASENAME([$compiler])
7767
7768 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7769 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7770
7771 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7772
7773 if test -n "$compiler"; then
7774   _LT_COMPILER_NO_RTTI($1)
7775   _LT_COMPILER_PIC($1)
7776   _LT_COMPILER_C_O($1)
7777   _LT_COMPILER_FILE_LOCKS($1)
7778   _LT_LINKER_SHLIBS($1)
7779   _LT_LINKER_HARDCODE_LIBPATH($1)
7780
7781   _LT_CONFIG($1)
7782 fi
7783
7784 AC_LANG_RESTORE
7785
7786 GCC=$lt_save_GCC
7787 CC="$lt_save_CC"
7788 ])# _LT_LANG_GCJ_CONFIG
7789
7790
7791 # _LT_LANG_RC_CONFIG([TAG])
7792 # -------------------------
7793 # Ensure that the configuration variables for the Windows resource compiler
7794 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
7795 # to write the compiler configuration to `libtool'.
7796 m4_defun([_LT_LANG_RC_CONFIG],
7797 [AC_REQUIRE([LT_PROG_RC])dnl
7798 AC_LANG_SAVE
7799
7800 # Source file extension for RC test sources.
7801 ac_ext=rc
7802
7803 # Object file extension for compiled RC test sources.
7804 objext=o
7805 _LT_TAGVAR(objext, $1)=$objext
7806
7807 # Code to be used in simple compile tests
7808 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7809
7810 # Code to be used in simple link tests
7811 lt_simple_link_test_code="$lt_simple_compile_test_code"
7812
7813 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7814 _LT_TAG_COMPILER
7815
7816 # save warnings/boilerplate of simple test code
7817 _LT_COMPILER_BOILERPLATE
7818 _LT_LINKER_BOILERPLATE
7819
7820 # Allow CC to be a program name with arguments.
7821 lt_save_CC="$CC"
7822 lt_save_GCC=$GCC
7823 GCC=
7824 CC=${RC-"windres"}
7825 compiler=$CC
7826 _LT_TAGVAR(compiler, $1)=$CC
7827 _LT_CC_BASENAME([$compiler])
7828 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7829
7830 if test -n "$compiler"; then
7831   :
7832   _LT_CONFIG($1)
7833 fi
7834
7835 GCC=$lt_save_GCC
7836 AC_LANG_RESTORE
7837 CC="$lt_save_CC"
7838 ])# _LT_LANG_RC_CONFIG
7839
7840
7841 # LT_PROG_GCJ
7842 # -----------
7843 AC_DEFUN([LT_PROG_GCJ],
7844 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7845   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7846     [AC_CHECK_TOOL(GCJ, gcj,)
7847       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7848       AC_SUBST(GCJFLAGS)])])[]dnl
7849 ])
7850
7851 # Old name:
7852 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7853 dnl aclocal-1.4 backwards compatibility:
7854 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7855
7856
7857 # LT_PROG_RC
7858 # ----------
7859 AC_DEFUN([LT_PROG_RC],
7860 [AC_CHECK_TOOL(RC, windres,)
7861 ])
7862
7863 # Old name:
7864 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7865 dnl aclocal-1.4 backwards compatibility:
7866 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7867
7868
7869 # _LT_DECL_EGREP
7870 # --------------
7871 # If we don't have a new enough Autoconf to choose the best grep
7872 # available, choose the one first in the user's PATH.
7873 m4_defun([_LT_DECL_EGREP],
7874 [AC_REQUIRE([AC_PROG_EGREP])dnl
7875 AC_REQUIRE([AC_PROG_FGREP])dnl
7876 test -z "$GREP" && GREP=grep
7877 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7878 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7879 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7880 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7881 AC_SUBST([GREP])
7882 ])
7883
7884
7885 # _LT_DECL_OBJDUMP
7886 # --------------
7887 # If we don't have a new enough Autoconf to choose the best objdump
7888 # available, choose the one first in the user's PATH.
7889 m4_defun([_LT_DECL_OBJDUMP],
7890 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7891 test -z "$OBJDUMP" && OBJDUMP=objdump
7892 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7893 AC_SUBST([OBJDUMP])
7894 ])
7895
7896
7897 # _LT_DECL_SED
7898 # ------------
7899 # Check for a fully-functional sed program, that truncates
7900 # as few characters as possible.  Prefer GNU sed if found.
7901 m4_defun([_LT_DECL_SED],
7902 [AC_PROG_SED
7903 test -z "$SED" && SED=sed
7904 Xsed="$SED -e 1s/^X//"
7905 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7906 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7907     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7908 ])# _LT_DECL_SED
7909
7910 m4_ifndef([AC_PROG_SED], [
7911 # NOTE: This macro has been submitted for inclusion into   #
7912 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7913 #  a released version of Autoconf we should remove this    #
7914 #  macro and use it instead.                               #
7915
7916 m4_defun([AC_PROG_SED],
7917 [AC_MSG_CHECKING([for a sed that does not truncate output])
7918 AC_CACHE_VAL(lt_cv_path_SED,
7919 [# Loop through the user's path and test for sed and gsed.
7920 # Then use that list of sed's as ones to test for truncation.
7921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7922 for as_dir in $PATH
7923 do
7924   IFS=$as_save_IFS
7925   test -z "$as_dir" && as_dir=.
7926   for lt_ac_prog in sed gsed; do
7927     for ac_exec_ext in '' $ac_executable_extensions; do
7928       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7929         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7930       fi
7931     done
7932   done
7933 done
7934 IFS=$as_save_IFS
7935 lt_ac_max=0
7936 lt_ac_count=0
7937 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7938 # along with /bin/sed that truncates output.
7939 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7940   test ! -f $lt_ac_sed && continue
7941   cat /dev/null > conftest.in
7942   lt_ac_count=0
7943   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7944   # Check for GNU sed and select it if it is found.
7945   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7946     lt_cv_path_SED=$lt_ac_sed
7947     break
7948   fi
7949   while true; do
7950     cat conftest.in conftest.in >conftest.tmp
7951     mv conftest.tmp conftest.in
7952     cp conftest.in conftest.nl
7953     echo >>conftest.nl
7954     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7955     cmp -s conftest.out conftest.nl || break
7956     # 10000 chars as input seems more than enough
7957     test $lt_ac_count -gt 10 && break
7958     lt_ac_count=`expr $lt_ac_count + 1`
7959     if test $lt_ac_count -gt $lt_ac_max; then
7960       lt_ac_max=$lt_ac_count
7961       lt_cv_path_SED=$lt_ac_sed
7962     fi
7963   done
7964 done
7965 ])
7966 SED=$lt_cv_path_SED
7967 AC_SUBST([SED])
7968 AC_MSG_RESULT([$SED])
7969 ])#AC_PROG_SED
7970 ])#m4_ifndef
7971
7972 # Old name:
7973 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7974 dnl aclocal-1.4 backwards compatibility:
7975 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7976
7977
7978 # _LT_CHECK_SHELL_FEATURES
7979 # ------------------------
7980 # Find out whether the shell is Bourne or XSI compatible,
7981 # or has some other useful features.
7982 m4_defun([_LT_CHECK_SHELL_FEATURES],
7983 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7984 # Try some XSI features
7985 xsi_shell=no
7986 ( _lt_dummy="a/b/c"
7987   test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7988       = c,a/b,, \
7989     && eval 'test $(( 1 + 1 )) -eq 2 \
7990     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7991   && xsi_shell=yes
7992 AC_MSG_RESULT([$xsi_shell])
7993 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7994
7995 AC_MSG_CHECKING([whether the shell understands "+="])
7996 lt_shell_append=no
7997 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7998     >/dev/null 2>&1 \
7999   && lt_shell_append=yes
8000 AC_MSG_RESULT([$lt_shell_append])
8001 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8002
8003 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8004   lt_unset=unset
8005 else
8006   lt_unset=false
8007 fi
8008 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8009
8010 # test EBCDIC or ASCII
8011 case `echo X|tr X '\101'` in
8012  A) # ASCII based system
8013     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8014   lt_SP2NL='tr \040 \012'
8015   lt_NL2SP='tr \015\012 \040\040'
8016   ;;
8017  *) # EBCDIC based system
8018   lt_SP2NL='tr \100 \n'
8019   lt_NL2SP='tr \r\n \100\100'
8020   ;;
8021 esac
8022 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8023 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8024 ])# _LT_CHECK_SHELL_FEATURES
8025
8026
8027 # _LT_PROG_XSI_SHELLFNS
8028 # ---------------------
8029 # Bourne and XSI compatible variants of some useful shell functions.
8030 m4_defun([_LT_PROG_XSI_SHELLFNS],
8031 [case $xsi_shell in
8032   yes)
8033     cat << \_LT_EOF >> "$cfgfile"
8034
8035 # func_dirname file append nondir_replacement
8036 # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8037 # otherwise set result to NONDIR_REPLACEMENT.
8038 func_dirname ()
8039 {
8040   case ${1} in
8041     */*) func_dirname_result="${1%/*}${2}" ;;
8042     *  ) func_dirname_result="${3}" ;;
8043   esac
8044 }
8045
8046 # func_basename file
8047 func_basename ()
8048 {
8049   func_basename_result="${1##*/}"
8050 }
8051
8052 # func_dirname_and_basename file append nondir_replacement
8053 # perform func_basename and func_dirname in a single function
8054 # call:
8055 #   dirname:  Compute the dirname of FILE.  If nonempty,
8056 #             add APPEND to the result, otherwise set result
8057 #             to NONDIR_REPLACEMENT.
8058 #             value returned in "$func_dirname_result"
8059 #   basename: Compute filename of FILE.
8060 #             value retuned in "$func_basename_result"
8061 # Implementation must be kept synchronized with func_dirname
8062 # and func_basename. For efficiency, we do not delegate to
8063 # those functions but instead duplicate the functionality here.
8064 func_dirname_and_basename ()
8065 {
8066   case ${1} in
8067     */*) func_dirname_result="${1%/*}${2}" ;;
8068     *  ) func_dirname_result="${3}" ;;
8069   esac
8070   func_basename_result="${1##*/}"
8071 }
8072
8073 # func_stripname prefix suffix name
8074 # strip PREFIX and SUFFIX off of NAME.
8075 # PREFIX and SUFFIX must not contain globbing or regex special
8076 # characters, hashes, percent signs, but SUFFIX may contain a leading
8077 # dot (in which case that matches only a dot).
8078 func_stripname ()
8079 {
8080   # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8081   # positional parameters, so assign one to ordinary parameter first.
8082   func_stripname_result=${3}
8083   func_stripname_result=${func_stripname_result#"${1}"}
8084   func_stripname_result=${func_stripname_result%"${2}"}
8085 }
8086
8087 # func_opt_split
8088 func_opt_split ()
8089 {
8090   func_opt_split_opt=${1%%=*}
8091   func_opt_split_arg=${1#*=}
8092 }
8093
8094 # func_lo2o object
8095 func_lo2o ()
8096 {
8097   case ${1} in
8098     *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8099     *)    func_lo2o_result=${1} ;;
8100   esac
8101 }
8102
8103 # func_xform libobj-or-source
8104 func_xform ()
8105 {
8106   func_xform_result=${1%.*}.lo
8107 }
8108
8109 # func_arith arithmetic-term...
8110 func_arith ()
8111 {
8112   func_arith_result=$(( $[*] ))
8113 }
8114
8115 # func_len string
8116 # STRING may not start with a hyphen.
8117 func_len ()
8118 {
8119   func_len_result=${#1}
8120 }
8121
8122 _LT_EOF
8123     ;;
8124   *) # Bourne compatible functions.
8125     cat << \_LT_EOF >> "$cfgfile"
8126
8127 # func_dirname file append nondir_replacement
8128 # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8129 # otherwise set result to NONDIR_REPLACEMENT.
8130 func_dirname ()
8131 {
8132   # Extract subdirectory from the argument.
8133   func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
8134   if test "X$func_dirname_result" = "X${1}"; then
8135     func_dirname_result="${3}"
8136   else
8137     func_dirname_result="$func_dirname_result${2}"
8138   fi
8139 }
8140
8141 # func_basename file
8142 func_basename ()
8143 {
8144   func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
8145 }
8146
8147 dnl func_dirname_and_basename
8148 dnl A portable version of this function is already defined in general.m4sh
8149 dnl so there is no need for it here.
8150
8151 # func_stripname prefix suffix name
8152 # strip PREFIX and SUFFIX off of NAME.
8153 # PREFIX and SUFFIX must not contain globbing or regex special
8154 # characters, hashes, percent signs, but SUFFIX may contain a leading
8155 # dot (in which case that matches only a dot).
8156 # func_strip_suffix prefix name
8157 func_stripname ()
8158 {
8159   case ${2} in
8160     .*) func_stripname_result=`$ECHO "X${3}" \
8161            | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
8162     *)  func_stripname_result=`$ECHO "X${3}" \
8163            | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
8164   esac
8165 }
8166
8167 # sed scripts:
8168 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8169 my_sed_long_arg='1s/^-[[^=]]*=//'
8170
8171 # func_opt_split
8172 func_opt_split ()
8173 {
8174   func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
8175   func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
8176 }
8177
8178 # func_lo2o object
8179 func_lo2o ()
8180 {
8181   func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8182 }
8183
8184 # func_xform libobj-or-source
8185 func_xform ()
8186 {
8187   func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8188 }
8189
8190 # func_arith arithmetic-term...
8191 func_arith ()
8192 {
8193   func_arith_result=`expr "$[@]"`
8194 }
8195
8196 # func_len string
8197 # STRING may not start with a hyphen.
8198 func_len ()
8199 {
8200   func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8201 }
8202
8203 _LT_EOF
8204 esac
8205
8206 case $lt_shell_append in
8207   yes)
8208     cat << \_LT_EOF >> "$cfgfile"
8209
8210 # func_append var value
8211 # Append VALUE to the end of shell variable VAR.
8212 func_append ()
8213 {
8214   eval "$[1]+=\$[2]"
8215 }
8216 _LT_EOF
8217     ;;
8218   *)
8219     cat << \_LT_EOF >> "$cfgfile"
8220
8221 # func_append var value
8222 # Append VALUE to the end of shell variable VAR.
8223 func_append ()
8224 {
8225   eval "$[1]=\$$[1]\$[2]"
8226 }
8227
8228 _LT_EOF
8229     ;;
8230   esac
8231 ])
8232
8233 # Helper functions for option handling.                    -*- Autoconf -*-
8234 #
8235 #   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8236 #   Written by Gary V. Vaughan, 2004
8237 #
8238 # This file is free software; the Free Software Foundation gives
8239 # unlimited permission to copy and/or distribute it, with or without
8240 # modifications, as long as this notice is preserved.
8241
8242 # serial 6 ltoptions.m4
8243
8244 # This is to help aclocal find these macros, as it can't see m4_define.
8245 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8246
8247
8248 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8249 # ------------------------------------------
8250 m4_define([_LT_MANGLE_OPTION],
8251 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8252
8253
8254 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8255 # ---------------------------------------
8256 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8257 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8258 # saved as a flag.
8259 m4_define([_LT_SET_OPTION],
8260 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8261 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8262         _LT_MANGLE_DEFUN([$1], [$2]),
8263     [m4_warning([Unknown $1 option `$2'])])[]dnl
8264 ])
8265
8266
8267 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8268 # ------------------------------------------------------------
8269 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8270 m4_define([_LT_IF_OPTION],
8271 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8272
8273
8274 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8275 # -------------------------------------------------------
8276 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8277 # are set.
8278 m4_define([_LT_UNLESS_OPTIONS],
8279 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8280             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8281                       [m4_define([$0_found])])])[]dnl
8282 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8283 ])[]dnl
8284 ])
8285
8286
8287 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8288 # ----------------------------------------
8289 # OPTION-LIST is a space-separated list of Libtool options associated
8290 # with MACRO-NAME.  If any OPTION has a matching handler declared with
8291 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8292 # the unknown option and exit.
8293 m4_defun([_LT_SET_OPTIONS],
8294 [# Set options
8295 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8296     [_LT_SET_OPTION([$1], _LT_Option)])
8297
8298 m4_if([$1],[LT_INIT],[
8299   dnl
8300   dnl Simply set some default values (i.e off) if boolean options were not
8301   dnl specified:
8302   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8303   ])
8304   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8305   ])
8306   dnl
8307   dnl If no reference was made to various pairs of opposing options, then
8308   dnl we run the default mode handler for the pair.  For example, if neither
8309   dnl `shared' nor `disable-shared' was passed, we enable building of shared
8310   dnl archives by default:
8311   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8312   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8313   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8314   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8315                    [_LT_ENABLE_FAST_INSTALL])
8316   ])
8317 ])# _LT_SET_OPTIONS
8318
8319
8320
8321 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8322 # -----------------------------------------
8323 m4_define([_LT_MANGLE_DEFUN],
8324 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8325
8326
8327 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8328 # -----------------------------------------------
8329 m4_define([LT_OPTION_DEFINE],
8330 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8331 ])# LT_OPTION_DEFINE
8332
8333
8334 # dlopen
8335 # ------
8336 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8337 ])
8338
8339 AU_DEFUN([AC_LIBTOOL_DLOPEN],
8340 [_LT_SET_OPTION([LT_INIT], [dlopen])
8341 AC_DIAGNOSE([obsolete],
8342 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8343 put the `dlopen' option into LT_INIT's first parameter.])
8344 ])
8345
8346 dnl aclocal-1.4 backwards compatibility:
8347 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8348
8349
8350 # win32-dll
8351 # ---------
8352 # Declare package support for building win32 dll's.
8353 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8354 [enable_win32_dll=yes
8355
8356 case $host in
8357 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
8358   AC_CHECK_TOOL(AS, as, false)
8359   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8360   AC_CHECK_TOOL(OBJDUMP, objdump, false)
8361   ;;
8362 esac
8363
8364 test -z "$AS" && AS=as
8365 _LT_DECL([], [AS],      [0], [Assembler program])dnl
8366
8367 test -z "$DLLTOOL" && DLLTOOL=dlltool
8368 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
8369
8370 test -z "$OBJDUMP" && OBJDUMP=objdump
8371 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
8372 ])# win32-dll
8373
8374 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8375 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8376 _LT_SET_OPTION([LT_INIT], [win32-dll])
8377 AC_DIAGNOSE([obsolete],
8378 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8379 put the `win32-dll' option into LT_INIT's first parameter.])
8380 ])
8381
8382 dnl aclocal-1.4 backwards compatibility:
8383 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8384
8385
8386 # _LT_ENABLE_SHARED([DEFAULT])
8387 # ----------------------------
8388 # implement the --enable-shared flag, and supports the `shared' and
8389 # `disable-shared' LT_INIT options.
8390 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8391 m4_define([_LT_ENABLE_SHARED],
8392 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8393 AC_ARG_ENABLE([shared],
8394     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8395         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8396     [p=${PACKAGE-default}
8397     case $enableval in
8398     yes) enable_shared=yes ;;
8399     no) enable_shared=no ;;
8400     *)
8401       enable_shared=no
8402       # Look at the argument we got.  We use all the common list separators.
8403       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8404       for pkg in $enableval; do
8405         IFS="$lt_save_ifs"
8406         if test "X$pkg" = "X$p"; then
8407           enable_shared=yes
8408         fi
8409       done
8410       IFS="$lt_save_ifs"
8411       ;;
8412     esac],
8413     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8414
8415     _LT_DECL([build_libtool_libs], [enable_shared], [0],
8416         [Whether or not to build shared libraries])
8417 ])# _LT_ENABLE_SHARED
8418
8419 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8420 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8421
8422 # Old names:
8423 AC_DEFUN([AC_ENABLE_SHARED],
8424 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8425 ])
8426
8427 AC_DEFUN([AC_DISABLE_SHARED],
8428 [_LT_SET_OPTION([LT_INIT], [disable-shared])
8429 ])
8430
8431 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8432 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8433
8434 dnl aclocal-1.4 backwards compatibility:
8435 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8436 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8437
8438
8439
8440 # _LT_ENABLE_STATIC([DEFAULT])
8441 # ----------------------------
8442 # implement the --enable-static flag, and support the `static' and
8443 # `disable-static' LT_INIT options.
8444 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8445 m4_define([_LT_ENABLE_STATIC],
8446 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8447 AC_ARG_ENABLE([static],
8448     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8449         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8450     [p=${PACKAGE-default}
8451     case $enableval in
8452     yes) enable_static=yes ;;
8453     no) enable_static=no ;;
8454     *)
8455      enable_static=no
8456       # Look at the argument we got.  We use all the common list separators.
8457       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8458       for pkg in $enableval; do
8459         IFS="$lt_save_ifs"
8460         if test "X$pkg" = "X$p"; then
8461           enable_static=yes
8462         fi
8463       done
8464       IFS="$lt_save_ifs"
8465       ;;
8466     esac],
8467     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8468
8469     _LT_DECL([build_old_libs], [enable_static], [0],
8470         [Whether or not to build static libraries])
8471 ])# _LT_ENABLE_STATIC
8472
8473 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8474 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8475
8476 # Old names:
8477 AC_DEFUN([AC_ENABLE_STATIC],
8478 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8479 ])
8480
8481 AC_DEFUN([AC_DISABLE_STATIC],
8482 [_LT_SET_OPTION([LT_INIT], [disable-static])
8483 ])
8484
8485 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8486 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8487
8488 dnl aclocal-1.4 backwards compatibility:
8489 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8490 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8491
8492
8493
8494 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
8495 # ----------------------------------
8496 # implement the --enable-fast-install flag, and support the `fast-install'
8497 # and `disable-fast-install' LT_INIT options.
8498 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8499 m4_define([_LT_ENABLE_FAST_INSTALL],
8500 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8501 AC_ARG_ENABLE([fast-install],
8502     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8503     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8504     [p=${PACKAGE-default}
8505     case $enableval in
8506     yes) enable_fast_install=yes ;;
8507     no) enable_fast_install=no ;;
8508     *)
8509       enable_fast_install=no
8510       # Look at the argument we got.  We use all the common list separators.
8511       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8512       for pkg in $enableval; do
8513         IFS="$lt_save_ifs"
8514         if test "X$pkg" = "X$p"; then
8515           enable_fast_install=yes
8516         fi
8517       done
8518       IFS="$lt_save_ifs"
8519       ;;
8520     esac],
8521     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8522
8523 _LT_DECL([fast_install], [enable_fast_install], [0],
8524          [Whether or not to optimize for fast installation])dnl
8525 ])# _LT_ENABLE_FAST_INSTALL
8526
8527 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8528 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8529
8530 # Old names:
8531 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8532 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8533 AC_DIAGNOSE([obsolete],
8534 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
8535 the `fast-install' option into LT_INIT's first parameter.])
8536 ])
8537
8538 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8539 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8540 AC_DIAGNOSE([obsolete],
8541 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
8542 the `disable-fast-install' option into LT_INIT's first parameter.])
8543 ])
8544
8545 dnl aclocal-1.4 backwards compatibility:
8546 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8547 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8548
8549
8550 # _LT_WITH_PIC([MODE])
8551 # --------------------
8552 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
8553 # LT_INIT options.
8554 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
8555 m4_define([_LT_WITH_PIC],
8556 [AC_ARG_WITH([pic],
8557     [AS_HELP_STRING([--with-pic],
8558         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8559     [pic_mode="$withval"],
8560     [pic_mode=default])
8561
8562 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8563
8564 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8565 ])# _LT_WITH_PIC
8566
8567 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8568 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8569
8570 # Old name:
8571 AU_DEFUN([AC_LIBTOOL_PICMODE],
8572 [_LT_SET_OPTION([LT_INIT], [pic-only])
8573 AC_DIAGNOSE([obsolete],
8574 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8575 put the `pic-only' option into LT_INIT's first parameter.])
8576 ])
8577
8578 dnl aclocal-1.4 backwards compatibility:
8579 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8580
8581
8582 m4_define([_LTDL_MODE], [])
8583 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8584                  [m4_define([_LTDL_MODE], [nonrecursive])])
8585 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8586                  [m4_define([_LTDL_MODE], [recursive])])
8587 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8588                  [m4_define([_LTDL_MODE], [subproject])])
8589
8590 m4_define([_LTDL_TYPE], [])
8591 LT_OPTION_DEFINE([LTDL_INIT], [installable],
8592                  [m4_define([_LTDL_TYPE], [installable])])
8593 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8594                  [m4_define([_LTDL_TYPE], [convenience])])
8595
8596 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
8597 #
8598 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8599 # Written by Gary V. Vaughan, 2004
8600 #
8601 # This file is free software; the Free Software Foundation gives
8602 # unlimited permission to copy and/or distribute it, with or without
8603 # modifications, as long as this notice is preserved.
8604
8605 # serial 6 ltsugar.m4
8606
8607 # This is to help aclocal find these macros, as it can't see m4_define.
8608 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8609
8610
8611 # lt_join(SEP, ARG1, [ARG2...])
8612 # -----------------------------
8613 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8614 # associated separator.
8615 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8616 # versions in m4sugar had bugs.
8617 m4_define([lt_join],
8618 [m4_if([$#], [1], [],
8619        [$#], [2], [[$2]],
8620        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8621 m4_define([_lt_join],
8622 [m4_if([$#$2], [2], [],
8623        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8624
8625
8626 # lt_car(LIST)
8627 # lt_cdr(LIST)
8628 # ------------
8629 # Manipulate m4 lists.
8630 # These macros are necessary as long as will still need to support
8631 # Autoconf-2.59 which quotes differently.
8632 m4_define([lt_car], [[$1]])
8633 m4_define([lt_cdr],
8634 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8635        [$#], 1, [],
8636        [m4_dquote(m4_shift($@))])])
8637 m4_define([lt_unquote], $1)
8638
8639
8640 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
8641 # ------------------------------------------
8642 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8643 # Note that neither SEPARATOR nor STRING are expanded; they are appended
8644 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8645 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
8646 # than defined and empty).
8647 #
8648 # This macro is needed until we can rely on Autoconf 2.62, since earlier
8649 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8650 m4_define([lt_append],
8651 [m4_define([$1],
8652            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8653
8654
8655
8656 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8657 # ----------------------------------------------------------
8658 # Produce a SEP delimited list of all paired combinations of elements of
8659 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
8660 # has the form PREFIXmINFIXSUFFIXn.
8661 # Needed until we can rely on m4_combine added in Autoconf 2.62.
8662 m4_define([lt_combine],
8663 [m4_if(m4_eval([$# > 3]), [1],
8664        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8665 [[m4_foreach([_Lt_prefix], [$2],
8666              [m4_foreach([_Lt_suffix],
8667                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8668         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8669
8670
8671 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8672 # -----------------------------------------------------------------------
8673 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8674 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8675 m4_define([lt_if_append_uniq],
8676 [m4_ifdef([$1],
8677           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8678                  [lt_append([$1], [$2], [$3])$4],
8679                  [$5])],
8680           [lt_append([$1], [$2], [$3])$4])])
8681
8682
8683 # lt_dict_add(DICT, KEY, VALUE)
8684 # -----------------------------
8685 m4_define([lt_dict_add],
8686 [m4_define([$1($2)], [$3])])
8687
8688
8689 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8690 # --------------------------------------------
8691 m4_define([lt_dict_add_subkey],
8692 [m4_define([$1($2:$3)], [$4])])
8693
8694
8695 # lt_dict_fetch(DICT, KEY, [SUBKEY])
8696 # ----------------------------------
8697 m4_define([lt_dict_fetch],
8698 [m4_ifval([$3],
8699         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8700     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8701
8702
8703 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8704 # -----------------------------------------------------------------
8705 m4_define([lt_if_dict_fetch],
8706 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8707         [$5],
8708     [$6])])
8709
8710
8711 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8712 # --------------------------------------------------------------
8713 m4_define([lt_dict_filter],
8714 [m4_if([$5], [], [],
8715   [lt_join(m4_quote(m4_default([$4], [[, ]])),
8716            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8717                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8718 ])
8719
8720 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
8721 #
8722 #   Copyright (C) 2004 Free Software Foundation, Inc.
8723 #   Written by Scott James Remnant, 2004
8724 #
8725 # This file is free software; the Free Software Foundation gives
8726 # unlimited permission to copy and/or distribute it, with or without
8727 # modifications, as long as this notice is preserved.
8728
8729 # Generated from ltversion.in.
8730
8731 # serial 3017 ltversion.m4
8732 # This file is part of GNU Libtool
8733
8734 m4_define([LT_PACKAGE_VERSION], [2.2.6b])
8735 m4_define([LT_PACKAGE_REVISION], [1.3017])
8736
8737 AC_DEFUN([LTVERSION_VERSION],
8738 [macro_version='2.2.6b'
8739 macro_revision='1.3017'
8740 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8741 _LT_DECL(, macro_revision, 0)
8742 ])
8743
8744 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
8745 #
8746 #   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
8747 #   Written by Scott James Remnant, 2004.
8748 #
8749 # This file is free software; the Free Software Foundation gives
8750 # unlimited permission to copy and/or distribute it, with or without
8751 # modifications, as long as this notice is preserved.
8752
8753 # serial 4 lt~obsolete.m4
8754
8755 # These exist entirely to fool aclocal when bootstrapping libtool.
8756 #
8757 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8758 # which have later been changed to m4_define as they aren't part of the
8759 # exported API, or moved to Autoconf or Automake where they belong.
8760 #
8761 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
8762 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8763 # using a macro with the same name in our local m4/libtool.m4 it'll
8764 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8765 # and doesn't know about Autoconf macros at all.)
8766 #
8767 # So we provide this file, which has a silly filename so it's always
8768 # included after everything else.  This provides aclocal with the
8769 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8770 # because those macros already exist, or will be overwritten later.
8771 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
8772 #
8773 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8774 # Yes, that means every name once taken will need to remain here until
8775 # we give up compatibility with versions before 1.7, at which point
8776 # we need to keep only those names which we still refer to.
8777
8778 # This is to help aclocal find these macros, as it can't see m4_define.
8779 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8780
8781 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8782 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
8783 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8784 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
8785 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8786 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
8787 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
8788 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8789 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
8790 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
8791 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
8792 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8793 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8794 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8795 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8796 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8797 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
8798 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8799 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8800 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
8801 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
8802 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8803 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8804 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8805 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8806 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8807 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8808 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8809 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
8810 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
8811 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
8812 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8813 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8814 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
8815 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
8816 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8817 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8818 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
8819 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8820 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
8821 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
8822 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
8823 m4_ifndef([AC_LIBTOOL_RC],              [AC_DEFUN([AC_LIBTOOL_RC])])
8824 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8825 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8826 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8827 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8828 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8829 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8830 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8831 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8832 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8833 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8834 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
8835 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8836
8837 # nls.m4 serial 3 (gettext-0.15)
8838 dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
8839 dnl This file is free software; the Free Software Foundation
8840 dnl gives unlimited permission to copy and/or distribute it,
8841 dnl with or without modifications, as long as this notice is preserved.
8842 dnl
8843 dnl This file can can be used in projects which are not available under
8844 dnl the GNU General Public License or the GNU Library General Public
8845 dnl License but which still want to provide support for the GNU gettext
8846 dnl functionality.
8847 dnl Please note that the actual code of the GNU gettext library is covered
8848 dnl by the GNU Library General Public License, and the rest of the GNU
8849 dnl gettext package package is covered by the GNU General Public License.
8850 dnl They are *not* in the public domain.
8851
8852 dnl Authors:
8853 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
8854 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
8855
8856 AC_PREREQ(2.50)
8857
8858 AC_DEFUN([AM_NLS],
8859 [
8860   AC_MSG_CHECKING([whether NLS is requested])
8861   dnl Default is enabled NLS
8862   AC_ARG_ENABLE(nls,
8863     [  --disable-nls           do not use Native Language Support],
8864     USE_NLS=$enableval, USE_NLS=yes)
8865   AC_MSG_RESULT($USE_NLS)
8866   AC_SUBST(USE_NLS)
8867 ])
8868
8869 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
8870
8871 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
8872 #
8873 # This program is free software; you can redistribute it and/or modify
8874 # it under the terms of the GNU General Public License as published by
8875 # the Free Software Foundation; either version 2 of the License, or
8876 # (at your option) any later version.
8877 #
8878 # This program is distributed in the hope that it will be useful, but
8879 # WITHOUT ANY WARRANTY; without even the implied warranty of
8880 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8881 # General Public License for more details.
8882 #
8883 # You should have received a copy of the GNU General Public License
8884 # along with this program; if not, write to the Free Software
8885 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8886 #
8887 # As a special exception to the GNU General Public License, if you
8888 # distribute this file as part of a program that contains a
8889 # configuration script generated by Autoconf, you may include it under
8890 # the same distribution terms that you use for the rest of that program.
8891
8892 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
8893 # ----------------------------------
8894 AC_DEFUN([PKG_PROG_PKG_CONFIG],
8895 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8896 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8897 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8898 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8899         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8900 fi
8901 if test -n "$PKG_CONFIG"; then
8902         _pkg_min_version=m4_default([$1], [0.9.0])
8903         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8904         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8905                 AC_MSG_RESULT([yes])
8906         else
8907                 AC_MSG_RESULT([no])
8908                 PKG_CONFIG=""
8909         fi
8910                 
8911 fi[]dnl
8912 ])# PKG_PROG_PKG_CONFIG
8913
8914 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8915 #
8916 # Check to see whether a particular set of modules exists.  Similar
8917 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
8918 #
8919 #
8920 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
8921 # this or PKG_CHECK_MODULES is called, or make sure to call
8922 # PKG_CHECK_EXISTS manually
8923 # --------------------------------------------------------------
8924 AC_DEFUN([PKG_CHECK_EXISTS],
8925 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8926 if test -n "$PKG_CONFIG" && \
8927     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8928   m4_ifval([$2], [$2], [:])
8929 m4_ifvaln([$3], [else
8930   $3])dnl
8931 fi])
8932
8933
8934 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8935 # ---------------------------------------------
8936 m4_define([_PKG_CONFIG],
8937 [if test -n "$$1"; then
8938     pkg_cv_[]$1="$$1"
8939  elif test -n "$PKG_CONFIG"; then
8940     PKG_CHECK_EXISTS([$3],
8941                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8942                      [pkg_failed=yes])
8943  else
8944     pkg_failed=untried
8945 fi[]dnl
8946 ])# _PKG_CONFIG
8947
8948 # _PKG_SHORT_ERRORS_SUPPORTED
8949 # -----------------------------
8950 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8951 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8952 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8953         _pkg_short_errors_supported=yes
8954 else
8955         _pkg_short_errors_supported=no
8956 fi[]dnl
8957 ])# _PKG_SHORT_ERRORS_SUPPORTED
8958
8959
8960 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8961 # [ACTION-IF-NOT-FOUND])
8962 #
8963 #
8964 # Note that if there is a possibility the first call to
8965 # PKG_CHECK_MODULES might not happen, you should be sure to include an
8966 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8967 #
8968 #
8969 # --------------------------------------------------------------
8970 AC_DEFUN([PKG_CHECK_MODULES],
8971 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8972 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8973 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8974
8975 pkg_failed=no
8976 AC_MSG_CHECKING([for $1])
8977
8978 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8979 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
8980
8981 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8982 and $1[]_LIBS to avoid the need to call pkg-config.
8983 See the pkg-config man page for more details.])
8984
8985 if test $pkg_failed = yes; then
8986         _PKG_SHORT_ERRORS_SUPPORTED
8987         if test $_pkg_short_errors_supported = yes; then
8988                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8989         else 
8990                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8991         fi
8992         # Put the nasty error message in config.log where it belongs
8993         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8994
8995         ifelse([$4], , [AC_MSG_ERROR(dnl
8996 [Package requirements ($2) were not met:
8997
8998 $$1_PKG_ERRORS
8999
9000 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9001 installed software in a non-standard prefix.
9002
9003 _PKG_TEXT
9004 ])],
9005                 [AC_MSG_RESULT([no])
9006                 $4])
9007 elif test $pkg_failed = untried; then
9008         ifelse([$4], , [AC_MSG_FAILURE(dnl
9009 [The pkg-config script could not be found or is too old.  Make sure it
9010 is in your PATH or set the PKG_CONFIG environment variable to the full
9011 path to pkg-config.
9012
9013 _PKG_TEXT
9014
9015 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
9016                 [$4])
9017 else
9018         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9019         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9020         AC_MSG_RESULT([yes])
9021         ifelse([$3], , :, [$3])
9022 fi[]dnl
9023 ])# PKG_CHECK_MODULES
9024
9025 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
9026 #
9027 # This file is free software; the Free Software Foundation
9028 # gives unlimited permission to copy and/or distribute it,
9029 # with or without modifications, as long as this notice is preserved.
9030
9031 # AM_AUTOMAKE_VERSION(VERSION)
9032 # ----------------------------
9033 # Automake X.Y traces this macro to ensure aclocal.m4 has been
9034 # generated from the m4 files accompanying Automake X.Y.
9035 # (This private macro should not be called outside this file.)
9036 AC_DEFUN([AM_AUTOMAKE_VERSION],
9037 [am__api_version='1.11'
9038 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9039 dnl require some minimum version.  Point them to the right macro.
9040 m4_if([$1], [1.11.1], [],
9041       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9042 ])
9043
9044 # _AM_AUTOCONF_VERSION(VERSION)
9045 # -----------------------------
9046 # aclocal traces this macro to find the Autoconf version.
9047 # This is a private macro too.  Using m4_define simplifies
9048 # the logic in aclocal, which can simply ignore this definition.
9049 m4_define([_AM_AUTOCONF_VERSION], [])
9050
9051 # AM_SET_CURRENT_AUTOMAKE_VERSION
9052 # -------------------------------
9053 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9054 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9055 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9056 [AM_AUTOMAKE_VERSION([1.11.1])dnl
9057 m4_ifndef([AC_AUTOCONF_VERSION],
9058   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9059 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9060
9061 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
9062
9063 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9064 #
9065 # This file is free software; the Free Software Foundation
9066 # gives unlimited permission to copy and/or distribute it,
9067 # with or without modifications, as long as this notice is preserved.
9068
9069 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9070 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
9071 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9072 #
9073 # Of course, Automake must honor this variable whenever it calls a
9074 # tool from the auxiliary directory.  The problem is that $srcdir (and
9075 # therefore $ac_aux_dir as well) can be either absolute or relative,
9076 # depending on how configure is run.  This is pretty annoying, since
9077 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
9078 # source directory, any form will work fine, but in subdirectories a
9079 # relative path needs to be adjusted first.
9080 #
9081 # $ac_aux_dir/missing
9082 #    fails when called from a subdirectory if $ac_aux_dir is relative
9083 # $top_srcdir/$ac_aux_dir/missing
9084 #    fails if $ac_aux_dir is absolute,
9085 #    fails when called from a subdirectory in a VPATH build with
9086 #          a relative $ac_aux_dir
9087 #
9088 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9089 # are both prefixed by $srcdir.  In an in-source build this is usually
9090 # harmless because $srcdir is `.', but things will broke when you
9091 # start a VPATH build or use an absolute $srcdir.
9092 #
9093 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9094 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9095 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9096 # and then we would define $MISSING as
9097 #   MISSING="\${SHELL} $am_aux_dir/missing"
9098 # This will work as long as MISSING is not called from configure, because
9099 # unfortunately $(top_srcdir) has no meaning in configure.
9100 # However there are other variables, like CC, which are often used in
9101 # configure, and could therefore not use this "fixed" $ac_aux_dir.
9102 #
9103 # Another solution, used here, is to always expand $ac_aux_dir to an
9104 # absolute PATH.  The drawback is that using absolute paths prevent a
9105 # configured tree to be moved without reconfiguration.
9106
9107 AC_DEFUN([AM_AUX_DIR_EXPAND],
9108 [dnl Rely on autoconf to set up CDPATH properly.
9109 AC_PREREQ([2.50])dnl
9110 # expand $ac_aux_dir to an absolute path
9111 am_aux_dir=`cd $ac_aux_dir && pwd`
9112 ])
9113
9114
9115 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
9116 # Free Software Foundation, Inc.
9117 #
9118 # This file is free software; the Free Software Foundation
9119 # gives unlimited permission to copy and/or distribute it,
9120 # with or without modifications, as long as this notice is preserved.
9121
9122 # serial 4
9123
9124 # This was merged into AC_PROG_CC in Autoconf.
9125
9126 AU_DEFUN([AM_PROG_CC_STDC],
9127 [AC_PROG_CC
9128 AC_DIAGNOSE([obsolete], [$0:
9129         your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
9130         `ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
9131         you adjust the code.  You can also remove the above call to
9132         AC_PROG_CC if you already called it elsewhere.])
9133 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
9134 ])
9135 AU_DEFUN([fp_PROG_CC_STDC])
9136
9137 # AM_CONDITIONAL                                            -*- Autoconf -*-
9138
9139 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9140 # Free Software Foundation, Inc.
9141 #
9142 # This file is free software; the Free Software Foundation
9143 # gives unlimited permission to copy and/or distribute it,
9144 # with or without modifications, as long as this notice is preserved.
9145
9146 # serial 9
9147
9148 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
9149 # -------------------------------------
9150 # Define a conditional.
9151 AC_DEFUN([AM_CONDITIONAL],
9152 [AC_PREREQ(2.52)dnl
9153  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
9154         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9155 AC_SUBST([$1_TRUE])dnl
9156 AC_SUBST([$1_FALSE])dnl
9157 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
9158 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
9159 m4_define([_AM_COND_VALUE_$1], [$2])dnl
9160 if $2; then
9161   $1_TRUE=
9162   $1_FALSE='#'
9163 else
9164   $1_TRUE='#'
9165   $1_FALSE=
9166 fi
9167 AC_CONFIG_COMMANDS_PRE(
9168 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9169   AC_MSG_ERROR([[conditional "$1" was never defined.
9170 Usually this means the macro was only invoked conditionally.]])
9171 fi])])
9172
9173 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9174 # Free Software Foundation, Inc.
9175 #
9176 # This file is free software; the Free Software Foundation
9177 # gives unlimited permission to copy and/or distribute it,
9178 # with or without modifications, as long as this notice is preserved.
9179
9180 # serial 10
9181
9182 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9183 # written in clear, in which case automake, when reading aclocal.m4,
9184 # will think it sees a *use*, and therefore will trigger all it's
9185 # C support machinery.  Also note that it means that autoscan, seeing
9186 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9187
9188
9189 # _AM_DEPENDENCIES(NAME)
9190 # ----------------------
9191 # See how the compiler implements dependency checking.
9192 # NAME is "CC", "CXX", "GCJ", or "OBJC".
9193 # We try a few techniques and use that to set a single cache variable.
9194 #
9195 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9196 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9197 # dependency, and given that the user is not expected to run this macro,
9198 # just rely on AC_PROG_CC.
9199 AC_DEFUN([_AM_DEPENDENCIES],
9200 [AC_REQUIRE([AM_SET_DEPDIR])dnl
9201 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9202 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9203 AC_REQUIRE([AM_DEP_TRACK])dnl
9204
9205 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
9206        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
9207        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9208        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
9209        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9210                    [depcc="$$1"   am_compiler_list=])
9211
9212 AC_CACHE_CHECK([dependency style of $depcc],
9213                [am_cv_$1_dependencies_compiler_type],
9214 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9215   # We make a subdir and do the tests there.  Otherwise we can end up
9216   # making bogus files that we don't know about and never remove.  For
9217   # instance it was reported that on HP-UX the gcc test will end up
9218   # making a dummy file named `D' -- because `-MD' means `put the output
9219   # in D'.
9220   mkdir conftest.dir
9221   # Copy depcomp to subdir because otherwise we won't find it if we're
9222   # using a relative directory.
9223   cp "$am_depcomp" conftest.dir
9224   cd conftest.dir
9225   # We will build objects and dependencies in a subdirectory because
9226   # it helps to detect inapplicable dependency modes.  For instance
9227   # both Tru64's cc and ICC support -MD to output dependencies as a
9228   # side effect of compilation, but ICC will put the dependencies in
9229   # the current directory while Tru64 will put them in the object
9230   # directory.
9231   mkdir sub
9232
9233   am_cv_$1_dependencies_compiler_type=none
9234   if test "$am_compiler_list" = ""; then
9235      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9236   fi
9237   am__universal=false
9238   m4_case([$1], [CC],
9239     [case " $depcc " in #(
9240      *\ -arch\ *\ -arch\ *) am__universal=true ;;
9241      esac],
9242     [CXX],
9243     [case " $depcc " in #(
9244      *\ -arch\ *\ -arch\ *) am__universal=true ;;
9245      esac])
9246
9247   for depmode in $am_compiler_list; do
9248     # Setup a source with many dependencies, because some compilers
9249     # like to wrap large dependency lists on column 80 (with \), and
9250     # we should not choose a depcomp mode which is confused by this.
9251     #
9252     # We need to recreate these files for each test, as the compiler may
9253     # overwrite some of them when testing with obscure command lines.
9254     # This happens at least with the AIX C compiler.
9255     : > sub/conftest.c
9256     for i in 1 2 3 4 5 6; do
9257       echo '#include "conftst'$i'.h"' >> sub/conftest.c
9258       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9259       # Solaris 8's {/usr,}/bin/sh.
9260       touch sub/conftst$i.h
9261     done
9262     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9263
9264     # We check with `-c' and `-o' for the sake of the "dashmstdout"
9265     # mode.  It turns out that the SunPro C++ compiler does not properly
9266     # handle `-M -o', and we need to detect this.  Also, some Intel
9267     # versions had trouble with output in subdirs
9268     am__obj=sub/conftest.${OBJEXT-o}
9269     am__minus_obj="-o $am__obj"
9270     case $depmode in
9271     gcc)
9272       # This depmode causes a compiler race in universal mode.
9273       test "$am__universal" = false || continue
9274       ;;
9275     nosideeffect)
9276       # after this tag, mechanisms are not by side-effect, so they'll
9277       # only be used when explicitly requested
9278       if test "x$enable_dependency_tracking" = xyes; then
9279         continue
9280       else
9281         break
9282       fi
9283       ;;
9284     msvisualcpp | msvcmsys)
9285       # This compiler won't grok `-c -o', but also, the minuso test has
9286       # not run yet.  These depmodes are late enough in the game, and
9287       # so weak that their functioning should not be impacted.
9288       am__obj=conftest.${OBJEXT-o}
9289       am__minus_obj=
9290       ;;
9291     none) break ;;
9292     esac
9293     if depmode=$depmode \
9294        source=sub/conftest.c object=$am__obj \
9295        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9296        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9297          >/dev/null 2>conftest.err &&
9298        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9299        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9300        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9301        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9302       # icc doesn't choke on unknown options, it will just issue warnings
9303       # or remarks (even with -Werror).  So we grep stderr for any message
9304       # that says an option was ignored or not supported.
9305       # When given -MP, icc 7.0 and 7.1 complain thusly:
9306       #   icc: Command line warning: ignoring option '-M'; no argument required
9307       # The diagnosis changed in icc 8.0:
9308       #   icc: Command line remark: option '-MP' not supported
9309       if (grep 'ignoring option' conftest.err ||
9310           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9311         am_cv_$1_dependencies_compiler_type=$depmode
9312         break
9313       fi
9314     fi
9315   done
9316
9317   cd ..
9318   rm -rf conftest.dir
9319 else
9320   am_cv_$1_dependencies_compiler_type=none
9321 fi
9322 ])
9323 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9324 AM_CONDITIONAL([am__fastdep$1], [
9325   test "x$enable_dependency_tracking" != xno \
9326   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9327 ])
9328
9329
9330 # AM_SET_DEPDIR
9331 # -------------
9332 # Choose a directory name for dependency files.
9333 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
9334 AC_DEFUN([AM_SET_DEPDIR],
9335 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9336 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9337 ])
9338
9339
9340 # AM_DEP_TRACK
9341 # ------------
9342 AC_DEFUN([AM_DEP_TRACK],
9343 [AC_ARG_ENABLE(dependency-tracking,
9344 [  --disable-dependency-tracking  speeds up one-time build
9345   --enable-dependency-tracking   do not reject slow dependency extractors])
9346 if test "x$enable_dependency_tracking" != xno; then
9347   am_depcomp="$ac_aux_dir/depcomp"
9348   AMDEPBACKSLASH='\'
9349 fi
9350 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9351 AC_SUBST([AMDEPBACKSLASH])dnl
9352 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9353 ])
9354
9355 # Generate code to set up dependency tracking.              -*- Autoconf -*-
9356
9357 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9358 # Free Software Foundation, Inc.
9359 #
9360 # This file is free software; the Free Software Foundation
9361 # gives unlimited permission to copy and/or distribute it,
9362 # with or without modifications, as long as this notice is preserved.
9363
9364 #serial 5
9365
9366 # _AM_OUTPUT_DEPENDENCY_COMMANDS
9367 # ------------------------------
9368 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9369 [{
9370   # Autoconf 2.62 quotes --file arguments for eval, but not when files
9371   # are listed without --file.  Let's play safe and only enable the eval
9372   # if we detect the quoting.
9373   case $CONFIG_FILES in
9374   *\'*) eval set x "$CONFIG_FILES" ;;
9375   *)   set x $CONFIG_FILES ;;
9376   esac
9377   shift
9378   for mf
9379   do
9380     # Strip MF so we end up with the name of the file.
9381     mf=`echo "$mf" | sed -e 's/:.*$//'`
9382     # Check whether this is an Automake generated Makefile or not.
9383     # We used to match only the files named `Makefile.in', but
9384     # some people rename them; so instead we look at the file content.
9385     # Grep'ing the first line is not enough: some people post-process
9386     # each Makefile.in and add a new line on top of each file to say so.
9387     # Grep'ing the whole file is not good either: AIX grep has a line
9388     # limit of 2048, but all sed's we know have understand at least 4000.
9389     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9390       dirpart=`AS_DIRNAME("$mf")`
9391     else
9392       continue
9393     fi
9394     # Extract the definition of DEPDIR, am__include, and am__quote
9395     # from the Makefile without running `make'.
9396     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9397     test -z "$DEPDIR" && continue
9398     am__include=`sed -n 's/^am__include = //p' < "$mf"`
9399     test -z "am__include" && continue
9400     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9401     # When using ansi2knr, U may be empty or an underscore; expand it
9402     U=`sed -n 's/^U = //p' < "$mf"`
9403     # Find all dependency output files, they are included files with
9404     # $(DEPDIR) in their names.  We invoke sed twice because it is the
9405     # simplest approach to changing $(DEPDIR) to its actual value in the
9406     # expansion.
9407     for file in `sed -n "
9408       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9409          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9410       # Make sure the directory exists.
9411       test -f "$dirpart/$file" && continue
9412       fdir=`AS_DIRNAME(["$file"])`
9413       AS_MKDIR_P([$dirpart/$fdir])
9414       # echo "creating $dirpart/$file"
9415       echo '# dummy' > "$dirpart/$file"
9416     done
9417   done
9418 }
9419 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9420
9421
9422 # AM_OUTPUT_DEPENDENCY_COMMANDS
9423 # -----------------------------
9424 # This macro should only be invoked once -- use via AC_REQUIRE.
9425 #
9426 # This code is only required when automatic dependency tracking
9427 # is enabled.  FIXME.  This creates each `.P' file that we will
9428 # need in order to bootstrap the dependency handling code.
9429 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9430 [AC_CONFIG_COMMANDS([depfiles],
9431      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9432      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9433 ])
9434
9435 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9436 # Free Software Foundation, Inc.
9437 #
9438 # This file is free software; the Free Software Foundation
9439 # gives unlimited permission to copy and/or distribute it,
9440 # with or without modifications, as long as this notice is preserved.
9441
9442 # serial 8
9443
9444 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
9445 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9446
9447 # Do all the work for Automake.                             -*- Autoconf -*-
9448
9449 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9450 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9451 #
9452 # This file is free software; the Free Software Foundation
9453 # gives unlimited permission to copy and/or distribute it,
9454 # with or without modifications, as long as this notice is preserved.
9455
9456 # serial 16
9457
9458 # This macro actually does too much.  Some checks are only needed if
9459 # your package does certain things.  But this isn't really a big deal.
9460
9461 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9462 # AM_INIT_AUTOMAKE([OPTIONS])
9463 # -----------------------------------------------
9464 # The call with PACKAGE and VERSION arguments is the old style
9465 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
9466 # and VERSION should now be passed to AC_INIT and removed from
9467 # the call to AM_INIT_AUTOMAKE.
9468 # We support both call styles for the transition.  After
9469 # the next Automake release, Autoconf can make the AC_INIT
9470 # arguments mandatory, and then we can depend on a new Autoconf
9471 # release and drop the old call support.
9472 AC_DEFUN([AM_INIT_AUTOMAKE],
9473 [AC_PREREQ([2.62])dnl
9474 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
9475 dnl the ones we care about.
9476 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9477 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9478 AC_REQUIRE([AC_PROG_INSTALL])dnl
9479 if test "`cd $srcdir && pwd`" != "`pwd`"; then
9480   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9481   # is not polluted with repeated "-I."
9482   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9483   # test to see if srcdir already configured
9484   if test -f $srcdir/config.status; then
9485     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9486   fi
9487 fi
9488
9489 # test whether we have cygpath
9490 if test -z "$CYGPATH_W"; then
9491   if (cygpath --version) >/dev/null 2>/dev/null; then
9492     CYGPATH_W='cygpath -w'
9493   else
9494     CYGPATH_W=echo
9495   fi
9496 fi
9497 AC_SUBST([CYGPATH_W])
9498
9499 # Define the identity of the package.
9500 dnl Distinguish between old-style and new-style calls.
9501 m4_ifval([$2],
9502 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9503  AC_SUBST([PACKAGE], [$1])dnl
9504  AC_SUBST([VERSION], [$2])],
9505 [_AM_SET_OPTIONS([$1])dnl
9506 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9507 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9508   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9509  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9510  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9511
9512 _AM_IF_OPTION([no-define],,
9513 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9514  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9515
9516 # Some tools Automake needs.
9517 AC_REQUIRE([AM_SANITY_CHECK])dnl
9518 AC_REQUIRE([AC_ARG_PROGRAM])dnl
9519 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9520 AM_MISSING_PROG(AUTOCONF, autoconf)
9521 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9522 AM_MISSING_PROG(AUTOHEADER, autoheader)
9523 AM_MISSING_PROG(MAKEINFO, makeinfo)
9524 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9525 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9526 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9527 # We need awk for the "check" target.  The system "awk" is bad on
9528 # some platforms.
9529 AC_REQUIRE([AC_PROG_AWK])dnl
9530 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9531 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9532 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9533               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9534                              [_AM_PROG_TAR([v7])])])
9535 _AM_IF_OPTION([no-dependencies],,
9536 [AC_PROVIDE_IFELSE([AC_PROG_CC],
9537                   [_AM_DEPENDENCIES(CC)],
9538                   [define([AC_PROG_CC],
9539                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9540 AC_PROVIDE_IFELSE([AC_PROG_CXX],
9541                   [_AM_DEPENDENCIES(CXX)],
9542                   [define([AC_PROG_CXX],
9543                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9544 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9545                   [_AM_DEPENDENCIES(OBJC)],
9546                   [define([AC_PROG_OBJC],
9547                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9548 ])
9549 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9550 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9551 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
9552 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9553 AC_CONFIG_COMMANDS_PRE(dnl
9554 [m4_provide_if([_AM_COMPILER_EXEEXT],
9555   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9556 ])
9557
9558 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
9559 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9560 dnl mangled by Autoconf and run in a shell conditional statement.
9561 m4_define([_AC_COMPILER_EXEEXT],
9562 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9563
9564
9565 # When config.status generates a header, we must update the stamp-h file.
9566 # This file resides in the same directory as the config header
9567 # that is generated.  The stamp files are numbered to have different names.
9568
9569 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9570 # loop where config.status creates the headers, so we can generate
9571 # our stamp files there.
9572 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9573 [# Compute $1's index in $config_headers.
9574 _am_arg=$1
9575 _am_stamp_count=1
9576 for _am_header in $config_headers :; do
9577   case $_am_header in
9578     $_am_arg | $_am_arg:* )
9579       break ;;
9580     * )
9581       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9582   esac
9583 done
9584 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9585
9586 # Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
9587 #
9588 # This file is free software; the Free Software Foundation
9589 # gives unlimited permission to copy and/or distribute it,
9590 # with or without modifications, as long as this notice is preserved.
9591
9592 # AM_PROG_INSTALL_SH
9593 # ------------------
9594 # Define $install_sh.
9595 AC_DEFUN([AM_PROG_INSTALL_SH],
9596 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9597 if test x"${install_sh}" != xset; then
9598   case $am_aux_dir in
9599   *\ * | *\     *)
9600     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9601   *)
9602     install_sh="\${SHELL} $am_aux_dir/install-sh"
9603   esac
9604 fi
9605 AC_SUBST(install_sh)])
9606
9607 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
9608 #
9609 # This file is free software; the Free Software Foundation
9610 # gives unlimited permission to copy and/or distribute it,
9611 # with or without modifications, as long as this notice is preserved.
9612
9613 # serial 2
9614
9615 # Check whether the underlying file-system supports filenames
9616 # with a leading dot.  For instance MS-DOS doesn't.
9617 AC_DEFUN([AM_SET_LEADING_DOT],
9618 [rm -rf .tst 2>/dev/null
9619 mkdir .tst 2>/dev/null
9620 if test -d .tst; then
9621   am__leading_dot=.
9622 else
9623   am__leading_dot=_
9624 fi
9625 rmdir .tst 2>/dev/null
9626 AC_SUBST([am__leading_dot])])
9627
9628 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
9629 # From Jim Meyering
9630
9631 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9632 # Free Software Foundation, Inc.
9633 #
9634 # This file is free software; the Free Software Foundation
9635 # gives unlimited permission to copy and/or distribute it,
9636 # with or without modifications, as long as this notice is preserved.
9637
9638 # serial 5
9639
9640 # AM_MAINTAINER_MODE([DEFAULT-MODE])
9641 # ----------------------------------
9642 # Control maintainer-specific portions of Makefiles.
9643 # Default is to disable them, unless `enable' is passed literally.
9644 # For symmetry, `disable' may be passed as well.  Anyway, the user
9645 # can override the default with the --enable/--disable switch.
9646 AC_DEFUN([AM_MAINTAINER_MODE],
9647 [m4_case(m4_default([$1], [disable]),
9648        [enable], [m4_define([am_maintainer_other], [disable])],
9649        [disable], [m4_define([am_maintainer_other], [enable])],
9650        [m4_define([am_maintainer_other], [enable])
9651         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
9652 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
9653   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
9654   AC_ARG_ENABLE([maintainer-mode],
9655 [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
9656                           (and sometimes confusing) to the casual installer],
9657       [USE_MAINTAINER_MODE=$enableval],
9658       [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
9659   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
9660   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
9661   MAINT=$MAINTAINER_MODE_TRUE
9662   AC_SUBST([MAINT])dnl
9663 ]
9664 )
9665
9666 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9667
9668 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
9669
9670 # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
9671 #
9672 # This file is free software; the Free Software Foundation
9673 # gives unlimited permission to copy and/or distribute it,
9674 # with or without modifications, as long as this notice is preserved.
9675
9676 # serial 4
9677
9678 # AM_MAKE_INCLUDE()
9679 # -----------------
9680 # Check to see how make treats includes.
9681 AC_DEFUN([AM_MAKE_INCLUDE],
9682 [am_make=${MAKE-make}
9683 cat > confinc << 'END'
9684 am__doit:
9685         @echo this is the am__doit target
9686 .PHONY: am__doit
9687 END
9688 # If we don't find an include directive, just comment out the code.
9689 AC_MSG_CHECKING([for style of include used by $am_make])
9690 am__include="#"
9691 am__quote=
9692 _am_result=none
9693 # First try GNU make style include.
9694 echo "include confinc" > confmf
9695 # Ignore all kinds of additional output from `make'.
9696 case `$am_make -s -f confmf 2> /dev/null` in #(
9697 *the\ am__doit\ target*)
9698   am__include=include
9699   am__quote=
9700   _am_result=GNU
9701   ;;
9702 esac
9703 # Now try BSD make style include.
9704 if test "$am__include" = "#"; then
9705    echo '.include "confinc"' > confmf
9706    case `$am_make -s -f confmf 2> /dev/null` in #(
9707    *the\ am__doit\ target*)
9708      am__include=.include
9709      am__quote="\""
9710      _am_result=BSD
9711      ;;
9712    esac
9713 fi
9714 AC_SUBST([am__include])
9715 AC_SUBST([am__quote])
9716 AC_MSG_RESULT([$_am_result])
9717 rm -f confinc confmf
9718 ])
9719
9720 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
9721
9722 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
9723 # Free Software Foundation, Inc.
9724 #
9725 # This file is free software; the Free Software Foundation
9726 # gives unlimited permission to copy and/or distribute it,
9727 # with or without modifications, as long as this notice is preserved.
9728
9729 # serial 6
9730
9731 # AM_MISSING_PROG(NAME, PROGRAM)
9732 # ------------------------------
9733 AC_DEFUN([AM_MISSING_PROG],
9734 [AC_REQUIRE([AM_MISSING_HAS_RUN])
9735 $1=${$1-"${am_missing_run}$2"}
9736 AC_SUBST($1)])
9737
9738
9739 # AM_MISSING_HAS_RUN
9740 # ------------------
9741 # Define MISSING if not defined so far and test if it supports --run.
9742 # If it does, set am_missing_run to use it, otherwise, to nothing.
9743 AC_DEFUN([AM_MISSING_HAS_RUN],
9744 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9745 AC_REQUIRE_AUX_FILE([missing])dnl
9746 if test x"${MISSING+set}" != xset; then
9747   case $am_aux_dir in
9748   *\ * | *\     *)
9749     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
9750   *)
9751     MISSING="\${SHELL} $am_aux_dir/missing" ;;
9752   esac
9753 fi
9754 # Use eval to expand $SHELL
9755 if eval "$MISSING --run true"; then
9756   am_missing_run="$MISSING --run "
9757 else
9758   am_missing_run=
9759   AC_MSG_WARN([`missing' script is too old or missing])
9760 fi
9761 ])
9762
9763 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
9764 #
9765 # This file is free software; the Free Software Foundation
9766 # gives unlimited permission to copy and/or distribute it,
9767 # with or without modifications, as long as this notice is preserved.
9768
9769 # AM_PROG_MKDIR_P
9770 # ---------------
9771 # Check for `mkdir -p'.
9772 AC_DEFUN([AM_PROG_MKDIR_P],
9773 [AC_PREREQ([2.60])dnl
9774 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
9775 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
9776 dnl while keeping a definition of mkdir_p for backward compatibility.
9777 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
9778 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
9779 dnl Makefile.ins that do not define MKDIR_P, so we do our own
9780 dnl adjustment using top_builddir (which is defined more often than
9781 dnl MKDIR_P).
9782 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
9783 case $mkdir_p in
9784   [[\\/$]]* | ?:[[\\/]]*) ;;
9785   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
9786 esac
9787 ])
9788
9789 # Helper functions for option handling.                     -*- Autoconf -*-
9790
9791 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
9792 #
9793 # This file is free software; the Free Software Foundation
9794 # gives unlimited permission to copy and/or distribute it,
9795 # with or without modifications, as long as this notice is preserved.
9796
9797 # serial 4
9798
9799 # _AM_MANGLE_OPTION(NAME)
9800 # -----------------------
9801 AC_DEFUN([_AM_MANGLE_OPTION],
9802 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9803
9804 # _AM_SET_OPTION(NAME)
9805 # ------------------------------
9806 # Set option NAME.  Presently that only means defining a flag for this option.
9807 AC_DEFUN([_AM_SET_OPTION],
9808 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9809
9810 # _AM_SET_OPTIONS(OPTIONS)
9811 # ----------------------------------
9812 # OPTIONS is a space-separated list of Automake options.
9813 AC_DEFUN([_AM_SET_OPTIONS],
9814 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9815
9816 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9817 # -------------------------------------------
9818 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9819 AC_DEFUN([_AM_IF_OPTION],
9820 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9821
9822 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
9823
9824 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
9825 # Free Software Foundation, Inc.
9826 #
9827 # This file is free software; the Free Software Foundation
9828 # gives unlimited permission to copy and/or distribute it,
9829 # with or without modifications, as long as this notice is preserved.
9830
9831 # serial 5
9832
9833 # AM_SANITY_CHECK
9834 # ---------------
9835 AC_DEFUN([AM_SANITY_CHECK],
9836 [AC_MSG_CHECKING([whether build environment is sane])
9837 # Just in case
9838 sleep 1
9839 echo timestamp > conftest.file
9840 # Reject unsafe characters in $srcdir or the absolute working directory
9841 # name.  Accept space and tab only in the latter.
9842 am_lf='
9843 '
9844 case `pwd` in
9845   *[[\\\"\#\$\&\'\`$am_lf]]*)
9846     AC_MSG_ERROR([unsafe absolute working directory name]);;
9847 esac
9848 case $srcdir in
9849   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
9850     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
9851 esac
9852
9853 # Do `set' in a subshell so we don't clobber the current shell's
9854 # arguments.  Must try -L first in case configure is actually a
9855 # symlink; some systems play weird games with the mod time of symlinks
9856 # (eg FreeBSD returns the mod time of the symlink's containing
9857 # directory).
9858 if (
9859    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
9860    if test "$[*]" = "X"; then
9861       # -L didn't work.
9862       set X `ls -t "$srcdir/configure" conftest.file`
9863    fi
9864    rm -f conftest.file
9865    if test "$[*]" != "X $srcdir/configure conftest.file" \
9866       && test "$[*]" != "X conftest.file $srcdir/configure"; then
9867
9868       # If neither matched, then we have a broken ls.  This can happen
9869       # if, for instance, CONFIG_SHELL is bash and it inherits a
9870       # broken ls alias from the environment.  This has actually
9871       # happened.  Such a system could not be considered "sane".
9872       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
9873 alias in your environment])
9874    fi
9875
9876    test "$[2]" = conftest.file
9877    )
9878 then
9879    # Ok.
9880    :
9881 else
9882    AC_MSG_ERROR([newly created file is older than distributed files!
9883 Check your system clock])
9884 fi
9885 AC_MSG_RESULT(yes)])
9886
9887 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9888 #
9889 # This file is free software; the Free Software Foundation
9890 # gives unlimited permission to copy and/or distribute it,
9891 # with or without modifications, as long as this notice is preserved.
9892
9893 # AM_PROG_INSTALL_STRIP
9894 # ---------------------
9895 # One issue with vendor `install' (even GNU) is that you can't
9896 # specify the program used to strip binaries.  This is especially
9897 # annoying in cross-compiling environments, where the build's strip
9898 # is unlikely to handle the host's binaries.
9899 # Fortunately install-sh will honor a STRIPPROG variable, so we
9900 # always use install-sh in `make install-strip', and initialize
9901 # STRIPPROG with the value of the STRIP variable (set by the user).
9902 AC_DEFUN([AM_PROG_INSTALL_STRIP],
9903 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9904 # Installed binaries are usually stripped using `strip' when the user
9905 # run `make install-strip'.  However `strip' might not be the right
9906 # tool to use in cross-compilation environments, therefore Automake
9907 # will honor the `STRIP' environment variable to overrule this program.
9908 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9909 if test "$cross_compiling" != no; then
9910   AC_CHECK_TOOL([STRIP], [strip], :)
9911 fi
9912 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9913 AC_SUBST([INSTALL_STRIP_PROGRAM])])
9914
9915 # Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9916 #
9917 # This file is free software; the Free Software Foundation
9918 # gives unlimited permission to copy and/or distribute it,
9919 # with or without modifications, as long as this notice is preserved.
9920
9921 # serial 2
9922
9923 # _AM_SUBST_NOTMAKE(VARIABLE)
9924 # ---------------------------
9925 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9926 # This macro is traced by Automake.
9927 AC_DEFUN([_AM_SUBST_NOTMAKE])
9928
9929 # AM_SUBST_NOTMAKE(VARIABLE)
9930 # ---------------------------
9931 # Public sister of _AM_SUBST_NOTMAKE.
9932 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9933
9934 # Check how to create a tarball.                            -*- Autoconf -*-
9935
9936 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9937 #
9938 # This file is free software; the Free Software Foundation
9939 # gives unlimited permission to copy and/or distribute it,
9940 # with or without modifications, as long as this notice is preserved.
9941
9942 # serial 2
9943
9944 # _AM_PROG_TAR(FORMAT)
9945 # --------------------
9946 # Check how to create a tarball in format FORMAT.
9947 # FORMAT should be one of `v7', `ustar', or `pax'.
9948 #
9949 # Substitute a variable $(am__tar) that is a command
9950 # writing to stdout a FORMAT-tarball containing the directory
9951 # $tardir.
9952 #     tardir=directory && $(am__tar) > result.tar
9953 #
9954 # Substitute a variable $(am__untar) that extract such
9955 # a tarball read from stdin.
9956 #     $(am__untar) < result.tar
9957 AC_DEFUN([_AM_PROG_TAR],
9958 [# Always define AMTAR for backward compatibility.
9959 AM_MISSING_PROG([AMTAR], [tar])
9960 m4_if([$1], [v7],
9961      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9962      [m4_case([$1], [ustar],, [pax],,
9963               [m4_fatal([Unknown tar format])])
9964 AC_MSG_CHECKING([how to create a $1 tar archive])
9965 # Loop over all known methods to create a tar archive until one works.
9966 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9967 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
9968 # Do not fold the above two line into one, because Tru64 sh and
9969 # Solaris sh will not grok spaces in the rhs of `-'.
9970 for _am_tool in $_am_tools
9971 do
9972   case $_am_tool in
9973   gnutar)
9974     for _am_tar in tar gnutar gtar;
9975     do
9976       AM_RUN_LOG([$_am_tar --version]) && break
9977     done
9978     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9979     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9980     am__untar="$_am_tar -xf -"
9981     ;;
9982   plaintar)
9983     # Must skip GNU tar: if it does not support --format= it doesn't create
9984     # ustar tarball either.
9985     (tar --version) >/dev/null 2>&1 && continue
9986     am__tar='tar chf - "$$tardir"'
9987     am__tar_='tar chf - "$tardir"'
9988     am__untar='tar xf -'
9989     ;;
9990   pax)
9991     am__tar='pax -L -x $1 -w "$$tardir"'
9992     am__tar_='pax -L -x $1 -w "$tardir"'
9993     am__untar='pax -r'
9994     ;;
9995   cpio)
9996     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9997     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9998     am__untar='cpio -i -H $1 -d'
9999     ;;
10000   none)
10001     am__tar=false
10002     am__tar_=false
10003     am__untar=false
10004     ;;
10005   esac
10006
10007   # If the value was cached, stop now.  We just wanted to have am__tar
10008   # and am__untar set.
10009   test -n "${am_cv_prog_tar_$1}" && break
10010
10011   # tar/untar a dummy directory, and stop if the command works
10012   rm -rf conftest.dir
10013   mkdir conftest.dir
10014   echo GrepMe > conftest.dir/file
10015   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10016   rm -rf conftest.dir
10017   if test -s conftest.tar; then
10018     AM_RUN_LOG([$am__untar <conftest.tar])
10019     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10020   fi
10021 done
10022 rm -rf conftest.dir
10023
10024 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10025 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10026 AC_SUBST([am__tar])
10027 AC_SUBST([am__untar])
10028 ]) # _AM_PROG_TAR
10029