]> git.sur5r.net Git - glabels/blob - aclocal.m4
Prepare 3.2.1-1
[glabels] / aclocal.m4
1 # generated automatically by aclocal 1.14.1 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
4
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_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 m4_ifndef([AC_AUTOCONF_VERSION],
16   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf.  It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
24 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
25 #
26 # This file is free software, distributed under the terms of the GNU
27 # General Public License.  As a special exception to the GNU General
28 # Public License, this file may be distributed as part of a program
29 # that contains a configuration script generated by Autoconf, under
30 # the same distribution terms as the rest of that program.
31 #
32 # This file can be copied and used freely without restrictions.  It can
33 # be used in projects which are not available under the GNU Public License
34 # but which still want to provide support for the GNU gettext functionality.
35 #
36 # Macro to add for using GNU gettext.
37 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
38 #
39 # Modified to never use included libintl. 
40 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
41 #
42 # Major rework to remove unused code
43 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
44 #
45 # Added better handling of ALL_LINGUAS from GNU gettext version 
46 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
47 #
48 # Modified to require ngettext
49 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
50 #
51 # We need this here as well, since someone might use autoconf-2.5x
52 # to configure GLib then an older version to configure a package
53 # using AM_GLIB_GNU_GETTEXT
54 AC_PREREQ(2.53)
55
56 dnl
57 dnl We go to great lengths to make sure that aclocal won't 
58 dnl try to pull in the installed version of these macros
59 dnl when running aclocal in the glib directory.
60 dnl
61 m4_copy([AC_DEFUN],[glib_DEFUN])
62 m4_copy([AC_REQUIRE],[glib_REQUIRE])
63 dnl
64 dnl At the end, if we're not within glib, we'll define the public
65 dnl definitions in terms of our private definitions.
66 dnl
67
68 # GLIB_LC_MESSAGES
69 #--------------------
70 glib_DEFUN([GLIB_LC_MESSAGES],
71   [AC_CHECK_HEADERS([locale.h])
72     if test $ac_cv_header_locale_h = yes; then
73     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
74       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
75        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
76     if test $am_cv_val_LC_MESSAGES = yes; then
77       AC_DEFINE(HAVE_LC_MESSAGES, 1,
78         [Define if your <locale.h> file defines LC_MESSAGES.])
79     fi
80   fi])
81
82 # GLIB_PATH_PROG_WITH_TEST
83 #----------------------------
84 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
85 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
86 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
87 [# Extract the first word of "$2", so it can be a program name with args.
88 set dummy $2; ac_word=[$]2
89 AC_MSG_CHECKING([for $ac_word])
90 AC_CACHE_VAL(ac_cv_path_$1,
91 [case "[$]$1" in
92   /*)
93   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
94   ;;
95   *)
96   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
97   for ac_dir in ifelse([$5], , $PATH, [$5]); do
98     test -z "$ac_dir" && ac_dir=.
99     if test -f $ac_dir/$ac_word; then
100       if [$3]; then
101         ac_cv_path_$1="$ac_dir/$ac_word"
102         break
103       fi
104     fi
105   done
106   IFS="$ac_save_ifs"
107 dnl If no 4th arg is given, leave the cache variable unset,
108 dnl so AC_PATH_PROGS will keep looking.
109 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
110 ])dnl
111   ;;
112 esac])dnl
113 $1="$ac_cv_path_$1"
114 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
115   AC_MSG_RESULT([$]$1)
116 else
117   AC_MSG_RESULT(no)
118 fi
119 AC_SUBST($1)dnl
120 ])
121
122 # GLIB_WITH_NLS
123 #-----------------
124 glib_DEFUN([GLIB_WITH_NLS],
125   dnl NLS is obligatory
126   [USE_NLS=yes
127     AC_SUBST(USE_NLS)
128
129     gt_cv_have_gettext=no
130
131     CATOBJEXT=NONE
132     XGETTEXT=:
133     INTLLIBS=
134
135     AC_CHECK_HEADER(libintl.h,
136      [gt_cv_func_dgettext_libintl="no"
137       libintl_extra_libs=""
138
139       #
140       # First check in libc
141       #
142       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
143         [AC_TRY_LINK([
144 #include <libintl.h>
145 ],
146          [return !ngettext ("","", 1)],
147           gt_cv_func_ngettext_libc=yes,
148           gt_cv_func_ngettext_libc=no)
149         ])
150   
151       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
152               AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
153                 [AC_TRY_LINK([
154 #include <libintl.h>
155 ],
156                   [return !dgettext ("","")],
157                   gt_cv_func_dgettext_libc=yes,
158                   gt_cv_func_dgettext_libc=no)
159                 ])
160       fi
161   
162       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
163         AC_CHECK_FUNCS(bind_textdomain_codeset)
164       fi
165
166       #
167       # If we don't have everything we want, check in libintl
168       #
169       if test "$gt_cv_func_dgettext_libc" != "yes" \
170          || test "$gt_cv_func_ngettext_libc" != "yes" \
171          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
172         
173         AC_CHECK_LIB(intl, bindtextdomain,
174             [AC_CHECK_LIB(intl, ngettext,
175                     [AC_CHECK_LIB(intl, dgettext,
176                                   gt_cv_func_dgettext_libintl=yes)])])
177
178         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
179           AC_MSG_CHECKING([if -liconv is needed to use gettext])
180           AC_MSG_RESULT([])
181           AC_CHECK_LIB(intl, ngettext,
182                 [AC_CHECK_LIB(intl, dcgettext,
183                        [gt_cv_func_dgettext_libintl=yes
184                         libintl_extra_libs=-liconv],
185                         :,-liconv)],
186                 :,-liconv)
187         fi
188
189         #
190         # If we found libintl, then check in it for bind_textdomain_codeset();
191         # we'll prefer libc if neither have bind_textdomain_codeset(),
192         # and both have dgettext and ngettext
193         #
194         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
195           glib_save_LIBS="$LIBS"
196           LIBS="$LIBS -lintl $libintl_extra_libs"
197           unset ac_cv_func_bind_textdomain_codeset
198           AC_CHECK_FUNCS(bind_textdomain_codeset)
199           LIBS="$glib_save_LIBS"
200
201           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
202             gt_cv_func_dgettext_libc=no
203           else
204             if test "$gt_cv_func_dgettext_libc" = "yes" \
205                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
206               gt_cv_func_dgettext_libintl=no
207             fi
208           fi
209         fi
210       fi
211
212       if test "$gt_cv_func_dgettext_libc" = "yes" \
213         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
214         gt_cv_have_gettext=yes
215       fi
216   
217       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
218         INTLLIBS="-lintl $libintl_extra_libs"
219       fi
220   
221       if test "$gt_cv_have_gettext" = "yes"; then
222         AC_DEFINE(HAVE_GETTEXT,1,
223           [Define if the GNU gettext() function is already present or preinstalled.])
224         GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
225           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
226         if test "$MSGFMT" != "no"; then
227           glib_save_LIBS="$LIBS"
228           LIBS="$LIBS $INTLLIBS"
229           AC_CHECK_FUNCS(dcgettext)
230           MSGFMT_OPTS=
231           AC_MSG_CHECKING([if msgfmt accepts -c])
232           GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
233 msgid ""
234 msgstr ""
235 "Content-Type: text/plain; charset=UTF-8\n"
236 "Project-Id-Version: test 1.0\n"
237 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
238 "Last-Translator: test <foo@bar.xx>\n"
239 "Language-Team: C <LL@li.org>\n"
240 "MIME-Version: 1.0\n"
241 "Content-Transfer-Encoding: 8bit\n"
242 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
243           AC_SUBST(MSGFMT_OPTS)
244           AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
245           GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
246             [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
247           AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
248                          return _nl_msg_cat_cntr],
249             [CATOBJEXT=.gmo 
250              DATADIRNAME=share],
251             [case $host in
252             *-*-solaris*)
253             dnl On Solaris, if bind_textdomain_codeset is in libc,
254             dnl GNU format message catalog is always supported,
255             dnl since both are added to the libc all together.
256             dnl Hence, we'd like to go with DATADIRNAME=share and
257             dnl and CATOBJEXT=.gmo in this case.
258             AC_CHECK_FUNC(bind_textdomain_codeset,
259               [CATOBJEXT=.gmo 
260                DATADIRNAME=share],
261               [CATOBJEXT=.mo
262                DATADIRNAME=lib])
263             ;;
264             *-*-openbsd*)
265             CATOBJEXT=.mo
266             DATADIRNAME=share
267             ;;
268             *)
269             CATOBJEXT=.mo
270             DATADIRNAME=lib
271             ;;
272             esac])
273           LIBS="$glib_save_LIBS"
274           INSTOBJEXT=.mo
275         else
276           gt_cv_have_gettext=no
277         fi
278       fi
279     ])
280
281     if test "$gt_cv_have_gettext" = "yes" ; then
282       AC_DEFINE(ENABLE_NLS, 1,
283         [always defined to indicate that i18n is enabled])
284     fi
285
286     dnl Test whether we really found GNU xgettext.
287     if test "$XGETTEXT" != ":"; then
288       dnl If it is not GNU xgettext we define it as : so that the
289       dnl Makefiles still can work.
290       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
291         : ;
292       else
293         AC_MSG_RESULT(
294           [found xgettext program is not GNU xgettext; ignore it])
295         XGETTEXT=":"
296       fi
297     fi
298
299     # We need to process the po/ directory.
300     POSUB=po
301
302     AC_OUTPUT_COMMANDS(
303       [case "$CONFIG_FILES" in *po/Makefile.in*)
304         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
305       esac])
306
307     dnl These rules are solely for the distribution goal.  While doing this
308     dnl we only have to keep exactly one list of the available catalogs
309     dnl in configure.ac.
310     for lang in $ALL_LINGUAS; do
311       GMOFILES="$GMOFILES $lang.gmo"
312       POFILES="$POFILES $lang.po"
313     done
314
315     dnl Make all variables we use known to autoconf.
316     AC_SUBST(CATALOGS)
317     AC_SUBST(CATOBJEXT)
318     AC_SUBST(DATADIRNAME)
319     AC_SUBST(GMOFILES)
320     AC_SUBST(INSTOBJEXT)
321     AC_SUBST(INTLLIBS)
322     AC_SUBST(PO_IN_DATADIR_TRUE)
323     AC_SUBST(PO_IN_DATADIR_FALSE)
324     AC_SUBST(POFILES)
325     AC_SUBST(POSUB)
326   ])
327
328 # AM_GLIB_GNU_GETTEXT
329 # -------------------
330 # Do checks necessary for use of gettext. If a suitable implementation 
331 # of gettext is found in either in libintl or in the C library,
332 # it will set INTLLIBS to the libraries needed for use of gettext
333 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
334 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
335 # on various variables needed by the Makefile.in.in installed by 
336 # glib-gettextize.
337 dnl
338 glib_DEFUN([GLIB_GNU_GETTEXT],
339   [AC_REQUIRE([AC_PROG_CC])dnl
340    
341    GLIB_LC_MESSAGES
342    GLIB_WITH_NLS
343
344    if test "$gt_cv_have_gettext" = "yes"; then
345      if test "x$ALL_LINGUAS" = "x"; then
346        LINGUAS=
347      else
348        AC_MSG_CHECKING(for catalogs to be installed)
349        NEW_LINGUAS=
350        for presentlang in $ALL_LINGUAS; do
351          useit=no
352          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
353            desiredlanguages="$LINGUAS"
354          else
355            desiredlanguages="$ALL_LINGUAS"
356          fi
357          for desiredlang in $desiredlanguages; do
358            # Use the presentlang catalog if desiredlang is
359            #   a. equal to presentlang, or
360            #   b. a variant of presentlang (because in this case,
361            #      presentlang can be used as a fallback for messages
362            #      which are not translated in the desiredlang catalog).
363            case "$desiredlang" in
364              "$presentlang"*) useit=yes;;
365            esac
366          done
367          if test $useit = yes; then
368            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
369          fi
370        done
371        LINGUAS=$NEW_LINGUAS
372        AC_MSG_RESULT($LINGUAS)
373      fi
374
375      dnl Construct list of names of catalog files to be constructed.
376      if test -n "$LINGUAS"; then
377        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
378      fi
379    fi
380
381    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
382    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
383    dnl Try to locate is.
384    MKINSTALLDIRS=
385    if test -n "$ac_aux_dir"; then
386      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
387    fi
388    if test -z "$MKINSTALLDIRS"; then
389      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
390    fi
391    AC_SUBST(MKINSTALLDIRS)
392
393    dnl Generate list of files to be processed by xgettext which will
394    dnl be included in po/Makefile.
395    test -d po || mkdir po
396    if test "x$srcdir" != "x."; then
397      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
398        posrcprefix="$srcdir/"
399      else
400        posrcprefix="../$srcdir/"
401      fi
402    else
403      posrcprefix="../"
404    fi
405    rm -f po/POTFILES
406    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
407         < $srcdir/po/POTFILES.in > po/POTFILES
408   ])
409
410 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
411 # -------------------------------
412 # Define VARIABLE to the location where catalog files will
413 # be installed by po/Makefile.
414 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
415 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
416 glib_save_prefix="$prefix"
417 glib_save_exec_prefix="$exec_prefix"
418 glib_save_datarootdir="$datarootdir"
419 test "x$prefix" = xNONE && prefix=$ac_default_prefix
420 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
421 datarootdir=`eval echo "${datarootdir}"`
422 if test "x$CATOBJEXT" = "x.mo" ; then
423   localedir=`eval echo "${libdir}/locale"`
424 else
425   localedir=`eval echo "${datadir}/locale"`
426 fi
427 prefix="$glib_save_prefix"
428 exec_prefix="$glib_save_exec_prefix"
429 datarootdir="$glib_save_datarootdir"
430 AC_DEFINE_UNQUOTED($1, "$localedir",
431   [Define the location where the catalogs will be installed])
432 ])
433
434 dnl
435 dnl Now the definitions that aclocal will find
436 dnl
437 ifdef(glib_configure_ac,[],[
438 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
439 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
440 ])dnl
441
442 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
443
444 # Create a temporary file with TEST-FILE as its contents and pass the
445 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
446 # 0 and perform ACTION-IF-FAIL for any other exit status.
447 AC_DEFUN([GLIB_RUN_PROG],
448 [cat >conftest.foo <<_ACEOF
449 $2
450 _ACEOF
451 if AC_RUN_LOG([$1 conftest.foo]); then
452   m4_ifval([$3], [$3], [:])
453 m4_ifvaln([$4], [else $4])dnl
454 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
455 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
456 fi])
457
458
459 # gnome-compiler-flags.m4
460 #
461 # serial 2
462 #
463
464 dnl GNOME_COMPILE_WARNINGS
465 dnl Turn on many useful compiler warnings and substitute the result into
466 dnl WARN_CFLAGS
467 dnl For now, only works on GCC
468 dnl Pass the default value of the --enable-compile-warnings configure option as
469 dnl the first argument to the macro, defaulting to 'yes'.
470 dnl Additional warning/error flags can be passed as an optional second argument.
471 dnl
472 dnl For example: GNOME_COMPILE_WARNINGS([maximum],[-Werror=some-flag -Wfoobar])
473 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
474     dnl ******************************
475     dnl More compiler warnings
476     dnl ******************************
477
478     AC_ARG_ENABLE(compile-warnings, 
479                   AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
480                                  [Turn on compiler warnings]),,
481                   [enable_compile_warnings="m4_default([$1],[yes])"])
482
483     if test "x$GCC" != xyes; then
484         enable_compile_warnings=no
485     fi
486
487     warning_flags=
488     realsave_CFLAGS="$CFLAGS"
489
490     dnl These are warning flags that aren't marked as fatal.  Can be
491     dnl overridden on a per-project basis with -Wno-foo.
492     base_warn_flags=" \
493         -Wall \
494         -Wstrict-prototypes \
495         -Wnested-externs \
496     "
497
498     dnl These compiler flags typically indicate very broken or suspicious
499     dnl code.  Some of them such as implicit-function-declaration are
500     dnl just not default because gcc compiles a lot of legacy code.
501     dnl We choose to make this set into explicit errors.
502     base_error_flags=" \
503         -Werror=missing-prototypes \
504         -Werror=implicit-function-declaration \
505         -Werror=pointer-arith \
506         -Werror=init-self \
507         -Werror=format-security \
508         -Werror=format=2 \
509         -Werror=missing-include-dirs \
510     "
511
512     dnl Additional warning or error flags provided by the module author to
513     dnl allow stricter standards to be imposed on a per-module basis.
514     dnl The author can pass -W or -Werror flags here as they see fit.
515     additional_flags="m4_default([$2],[])"
516
517     case "$enable_compile_warnings" in
518     no)
519         warning_flags=
520         ;;
521     minimum)
522         warning_flags="-Wall"
523         ;;
524     yes)
525         warning_flags="$base_warn_flags $base_error_flags $additional_flags"
526         ;;
527     maximum|error)
528         warning_flags="$base_warn_flags $base_error_flags $additional_flags"
529         ;;
530     *)
531         AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
532         ;;
533     esac
534
535     if test "$enable_compile_warnings" = "error" ; then
536         warning_flags="$warning_flags -Werror"
537     fi
538
539     dnl Check whether GCC supports the warning options
540     for option in $warning_flags; do
541         save_CFLAGS="$CFLAGS"
542         CFLAGS="$CFLAGS $option"
543         AC_MSG_CHECKING([whether gcc understands $option])
544         AC_TRY_COMPILE([], [],
545             has_option=yes,
546             has_option=no,)
547         CFLAGS="$save_CFLAGS"
548         AC_MSG_RESULT([$has_option])
549         if test $has_option = yes; then
550             tested_warning_flags="$tested_warning_flags $option"
551         fi
552         unset has_option
553         unset save_CFLAGS
554     done
555     unset option
556     CFLAGS="$realsave_CFLAGS"
557     AC_MSG_CHECKING(what warning flags to pass to the C compiler)
558     AC_MSG_RESULT($tested_warning_flags)
559
560     AC_ARG_ENABLE(iso-c,
561                   AC_HELP_STRING([--enable-iso-c],
562                                  [Try to warn if code is not ISO C ]),,
563                   [enable_iso_c=no])
564
565     AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
566     complCFLAGS=
567     if test "x$enable_iso_c" != "xno"; then
568         if test "x$GCC" = "xyes"; then
569         case " $CFLAGS " in
570             *[\ \       ]-ansi[\ \      ]*) ;;
571             *) complCFLAGS="$complCFLAGS -ansi" ;;
572         esac
573         case " $CFLAGS " in
574             *[\ \       ]-pedantic[\ \  ]*) ;;
575             *) complCFLAGS="$complCFLAGS -pedantic" ;;
576         esac
577         fi
578     fi
579     AC_MSG_RESULT($complCFLAGS)
580
581     WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
582     AC_SUBST(WARN_CFLAGS)
583 ])
584
585 dnl For C++, do basically the same thing.
586
587 AC_DEFUN([GNOME_CXX_WARNINGS],[
588   AC_ARG_ENABLE(cxx-warnings,
589                 AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
590                                [Turn on compiler warnings.]),,
591                 [enable_cxx_warnings="m4_default([$1],[minimum])"])
592
593   AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
594   warnCXXFLAGS=
595   if test "x$GXX" != xyes; then
596     enable_cxx_warnings=no
597   fi
598   if test "x$enable_cxx_warnings" != "xno"; then
599     if test "x$GXX" = "xyes"; then
600       case " $CXXFLAGS " in
601       *[\ \     ]-Wall[\ \      ]*) ;;
602       *) warnCXXFLAGS="-Wall -Wno-unused" ;;
603       esac
604
605       ## -W is not all that useful.  And it cannot be controlled
606       ## with individual -Wno-xxx flags, unlike -Wall
607       if test "x$enable_cxx_warnings" = "xyes"; then
608         warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
609       fi
610     fi
611   fi
612   AC_MSG_RESULT($warnCXXFLAGS)
613
614    AC_ARG_ENABLE(iso-cxx,
615                  AC_HELP_STRING([--enable-iso-cxx],
616                                 [Try to warn if code is not ISO C++ ]),,
617                  [enable_iso_cxx=no])
618
619    AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
620    complCXXFLAGS=
621    if test "x$enable_iso_cxx" != "xno"; then
622      if test "x$GXX" = "xyes"; then
623       case " $CXXFLAGS " in
624       *[\ \     ]-ansi[\ \      ]*) ;;
625       *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
626       esac
627
628       case " $CXXFLAGS " in
629       *[\ \     ]-pedantic[\ \  ]*) ;;
630       *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
631       esac
632      fi
633    fi
634   AC_MSG_RESULT($complCXXFLAGS)
635
636   WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
637   AC_SUBST(WARN_CXXFLAGS)
638 ])
639
640 dnl GLIB_GSETTINGS
641 dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
642 dnl the schema should be compiled
643 dnl
644
645 AC_DEFUN([GLIB_GSETTINGS],
646 [
647   m4_pattern_allow([AM_V_GEN])
648   AC_ARG_ENABLE(schemas-compile,
649                 AS_HELP_STRING([--disable-schemas-compile],
650                                [Disable regeneration of gschemas.compiled on install]),
651                 [case ${enableval} in
652                   yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
653                   no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
654                   *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
655                  esac])
656   AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
657   PKG_PROG_PKG_CONFIG([0.16])
658   AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
659   if test x$cross_compiling != xyes; then
660     GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
661   else
662     AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
663   fi
664   AC_SUBST(GLIB_COMPILE_SCHEMAS)
665   if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
666     ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
667   else
668     ifelse([$1],,[:],[$1])
669   fi
670
671   GSETTINGS_RULES='
672 .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
673
674 mostlyclean-am: clean-gsettings-schemas
675
676 gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
677
678 %.gschema.valid: %.gschema.xml $(gsettings__enum_file)
679         $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p [$](@D) && touch [$]@
680
681 all-am: $(gsettings_SCHEMAS:.xml=.valid)
682 uninstall-am: uninstall-gsettings-schemas
683 install-data-am: install-gsettings-schemas
684
685 .SECONDARY: $(gsettings_SCHEMAS)
686
687 install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
688         @$(NORMAL_INSTALL)
689         if test -n "$^"; then \
690                 test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
691                 $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
692                 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
693         fi
694
695 uninstall-gsettings-schemas:
696         @$(NORMAL_UNINSTALL)
697         @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
698         files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
699         test -n "$$files" || exit 0; \
700         echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
701         cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
702         test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
703
704 clean-gsettings-schemas:
705         rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
706
707 ifdef gsettings_ENUM_NAMESPACE
708 $(gsettings__enum_file): $(gsettings_ENUM_FILES)
709         $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead "  <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod "    <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail "  </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
710 endif
711 '
712   _GSETTINGS_SUBST(GSETTINGS_RULES)
713 ])
714
715 dnl _GSETTINGS_SUBST(VARIABLE)
716 dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
717 AC_DEFUN([_GSETTINGS_SUBST],
718 [
719 AC_SUBST([$1])
720 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
721 ]
722 )
723
724 dnl -*- mode: autoconf -*-
725
726 # serial 2
727
728 dnl Usage:
729 dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
730 AC_DEFUN([GTK_DOC_CHECK],
731 [
732   AC_REQUIRE([PKG_PROG_PKG_CONFIG])
733   AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
734   AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
735
736   ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"])
737   AC_MSG_CHECKING([for gtk-doc])
738   PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
739   AC_MSG_RESULT($have_gtk_doc)
740
741   if test "$have_gtk_doc" = "no"; then
742       AC_MSG_WARN([
743   You will not be able to create source packages with 'make dist'
744   because $gtk_doc_requires is not found.])
745   fi
746
747   dnl check for tools we added during development
748   dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that
749   dnl may not be writable by the user. Currently, automake requires that the
750   dnl test name must end in '.test'.
751   dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638
752   AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test])
753   AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check])
754   AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
755   AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
756
757   dnl for overriding the documentation installation directory
758   AC_ARG_WITH([html-dir],
759     AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
760     [with_html_dir='${datadir}/gtk-doc/html'])
761   HTML_DIR="$with_html_dir"
762   AC_SUBST([HTML_DIR])
763
764   dnl enable/disable documentation building
765   AC_ARG_ENABLE([gtk-doc],
766     AS_HELP_STRING([--enable-gtk-doc],
767                    [use gtk-doc to build documentation [[default=no]]]),,
768     [enable_gtk_doc=no])
769
770   AC_MSG_CHECKING([whether to build gtk-doc documentation])
771   AC_MSG_RESULT($enable_gtk_doc)
772
773   if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then
774     AC_MSG_ERROR([
775   You must have $gtk_doc_requires installed to build documentation for
776   $PACKAGE_NAME. Please install gtk-doc or disable building the
777   documentation by adding '--disable-gtk-doc' to '[$]0'.])
778   fi
779
780   dnl don't check for glib if we build glib
781   if test "x$PACKAGE_NAME" != "xglib"; then
782     dnl don't fail if someone does not have glib
783     PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,[:])
784   fi
785
786   dnl enable/disable output formats
787   AC_ARG_ENABLE([gtk-doc-html],
788     AS_HELP_STRING([--enable-gtk-doc-html],
789                    [build documentation in html format [[default=yes]]]),,
790     [enable_gtk_doc_html=yes])
791     AC_ARG_ENABLE([gtk-doc-pdf],
792       AS_HELP_STRING([--enable-gtk-doc-pdf],
793                      [build documentation in pdf format [[default=no]]]),,
794       [enable_gtk_doc_pdf=no])
795
796   if test -z "$GTKDOC_MKPDF"; then
797     enable_gtk_doc_pdf=no
798   fi
799
800   if test -z "$AM_DEFAULT_VERBOSITY"; then
801     AM_DEFAULT_VERBOSITY=1
802   fi
803   AC_SUBST([AM_DEFAULT_VERBOSITY])
804
805   AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes])
806   AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
807   AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
808   AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
809   AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
810   AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
811 ])
812
813
814 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
815 # serial 42 IT_PROG_INTLTOOL
816 AC_DEFUN([IT_PROG_INTLTOOL], [
817 AC_PREREQ([2.50])dnl
818 AC_REQUIRE([AM_NLS])dnl
819
820 case "$am__api_version" in
821     1.[01234])
822         AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
823     ;;
824     *)
825     ;;
826 esac
827
828 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
829 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
830 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
831 if test -n "$1"; then
832     AC_MSG_CHECKING([for intltool >= $1])
833     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
834     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
835         AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
836 fi
837
838 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
839 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
840 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
841 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
842     AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
843 fi
844
845 if test -z "$AM_DEFAULT_VERBOSITY"; then
846   AM_DEFAULT_VERBOSITY=1
847 fi
848 AC_SUBST([AM_DEFAULT_VERBOSITY])
849
850 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
851 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
852 INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
853 AC_SUBST(INTLTOOL_V_MERGE)
854 AC_SUBST(INTLTOOL__v_MERGE_)
855 AC_SUBST(INTLTOOL__v_MERGE_0)
856
857 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
858 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
859 intltool__v_merge_options_0='-q'
860 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
861 AC_SUBST(intltool__v_merge_options_)
862 AC_SUBST(intltool__v_merge_options_0)
863
864   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
865 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
866      INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
867      INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
868       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
869      INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
870    INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
871     INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
872 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
873        INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
874       INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
875 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
876       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
877 else
878       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
879 fi
880       INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
881       INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
882     INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
883   INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
884     INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
885     INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
886    INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
887
888 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
889 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
890 _IT_SUBST(INTLTOOL_KEYS_RULE)
891 _IT_SUBST(INTLTOOL_PROP_RULE)
892 _IT_SUBST(INTLTOOL_OAF_RULE)
893 _IT_SUBST(INTLTOOL_PONG_RULE)
894 _IT_SUBST(INTLTOOL_SERVER_RULE)
895 _IT_SUBST(INTLTOOL_SHEET_RULE)
896 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
897 _IT_SUBST(INTLTOOL_UI_RULE)
898 _IT_SUBST(INTLTOOL_XAM_RULE)
899 _IT_SUBST(INTLTOOL_KBD_RULE)
900 _IT_SUBST(INTLTOOL_XML_RULE)
901 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
902 _IT_SUBST(INTLTOOL_CAVES_RULE)
903 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
904 _IT_SUBST(INTLTOOL_THEME_RULE)
905 _IT_SUBST(INTLTOOL_SERVICE_RULE)
906 _IT_SUBST(INTLTOOL_POLICY_RULE)
907
908 # Check the gettext tools to make sure they are GNU
909 AC_PATH_PROG(XGETTEXT, xgettext)
910 AC_PATH_PROG(MSGMERGE, msgmerge)
911 AC_PATH_PROG(MSGFMT, msgfmt)
912 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
913 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
914     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
915 fi
916 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
917 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
918 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
919 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
920     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
921 fi
922
923 AC_PATH_PROG(INTLTOOL_PERL, perl)
924 if test -z "$INTLTOOL_PERL"; then
925    AC_MSG_ERROR([perl not found])
926 fi
927 AC_MSG_CHECKING([for perl >= 5.8.1])
928 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
929 if test $? -ne 0; then
930    AC_MSG_ERROR([perl 5.8.1 is required for intltool])
931 else
932    IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
933    AC_MSG_RESULT([$IT_PERL_VERSION])
934 fi
935 if test "x$2" != "xno-xml"; then
936    AC_MSG_CHECKING([for XML::Parser])
937    if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
938        AC_MSG_RESULT([ok])
939    else
940        AC_MSG_ERROR([XML::Parser perl module is required for intltool])
941    fi
942 fi
943
944 # Substitute ALL_LINGUAS so we can use it in po/Makefile
945 AC_SUBST(ALL_LINGUAS)
946
947 # Set DATADIRNAME correctly if it is not set yet
948 # (copied from glib-gettext.m4)
949 if test -z "$DATADIRNAME"; then
950   AC_LINK_IFELSE(
951     [AC_LANG_PROGRAM([[]],
952                      [[extern int _nl_msg_cat_cntr;
953                        return _nl_msg_cat_cntr]])],
954     [DATADIRNAME=share],
955     [case $host in
956     *-*-solaris*)
957     dnl On Solaris, if bind_textdomain_codeset is in libc,
958     dnl GNU format message catalog is always supported,
959     dnl since both are added to the libc all together.
960     dnl Hence, we'd like to go with DATADIRNAME=share
961     dnl in this case.
962     AC_CHECK_FUNC(bind_textdomain_codeset,
963       [DATADIRNAME=share], [DATADIRNAME=lib])
964     ;;
965     *)
966     [DATADIRNAME=lib]
967     ;;
968     esac])
969 fi
970 AC_SUBST(DATADIRNAME)
971
972 IT_PO_SUBDIR([po])
973
974 ])
975
976
977 # IT_PO_SUBDIR(DIRNAME)
978 # ---------------------
979 # All po subdirs have to be declared with this macro; the subdir "po" is
980 # declared by IT_PROG_INTLTOOL.
981 #
982 AC_DEFUN([IT_PO_SUBDIR],
983 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
984 dnl
985 dnl The following CONFIG_COMMANDS should be executed at the very end
986 dnl of config.status.
987 AC_CONFIG_COMMANDS_PRE([
988   AC_CONFIG_COMMANDS([$1/stamp-it], [
989     if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
990        AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
991     fi
992     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
993     >"$1/stamp-it.tmp"
994     [sed '/^#/d
995          s/^[[].*] *//
996          /^[    ]*$/d
997         '"s|^|  $ac_top_srcdir/|" \
998       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
999     ]
1000     [sed '/^POTFILES =/,/[^\\]$/ {
1001                 /^POTFILES =/!d
1002                 r $1/POTFILES
1003           }
1004          ' "$1/Makefile.in" >"$1/Makefile"]
1005     rm -f "$1/Makefile.tmp"
1006     mv "$1/stamp-it.tmp" "$1/stamp-it"
1007   ])
1008 ])dnl
1009 ])
1010
1011 # _IT_SUBST(VARIABLE)
1012 # -------------------
1013 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1014 #
1015 AC_DEFUN([_IT_SUBST],
1016 [
1017 AC_SUBST([$1])
1018 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1019 ]
1020 )
1021
1022 # deprecated macros
1023 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1024 # A hint is needed for aclocal from Automake <= 1.9.4:
1025 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
1026
1027
1028 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1029 #
1030 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1031 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1032 #                 Foundation, Inc.
1033 #   Written by Gordon Matzigkeit, 1996
1034 #
1035 # This file is free software; the Free Software Foundation gives
1036 # unlimited permission to copy and/or distribute it, with or without
1037 # modifications, as long as this notice is preserved.
1038
1039 m4_define([_LT_COPYING], [dnl
1040 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1041 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1042 #                 Foundation, Inc.
1043 #   Written by Gordon Matzigkeit, 1996
1044 #
1045 #   This file is part of GNU Libtool.
1046 #
1047 # GNU Libtool is free software; you can redistribute it and/or
1048 # modify it under the terms of the GNU General Public License as
1049 # published by the Free Software Foundation; either version 2 of
1050 # the License, or (at your option) any later version.
1051 #
1052 # As a special exception to the GNU General Public License,
1053 # if you distribute this file as part of a program or library that
1054 # is built using GNU Libtool, you may include this file under the
1055 # same distribution terms that you use for the rest of that program.
1056 #
1057 # GNU Libtool is distributed in the hope that it will be useful,
1058 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1059 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1060 # GNU General Public License for more details.
1061 #
1062 # You should have received a copy of the GNU General Public License
1063 # along with GNU Libtool; see the file COPYING.  If not, a copy
1064 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1065 # obtained by writing to the Free Software Foundation, Inc.,
1066 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1067 ])
1068
1069 # serial 57 LT_INIT
1070
1071
1072 # LT_PREREQ(VERSION)
1073 # ------------------
1074 # Complain and exit if this libtool version is less that VERSION.
1075 m4_defun([LT_PREREQ],
1076 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1077        [m4_default([$3],
1078                    [m4_fatal([Libtool version $1 or higher is required],
1079                              63)])],
1080        [$2])])
1081
1082
1083 # _LT_CHECK_BUILDDIR
1084 # ------------------
1085 # Complain if the absolute build directory name contains unusual characters
1086 m4_defun([_LT_CHECK_BUILDDIR],
1087 [case `pwd` in
1088   *\ * | *\     *)
1089     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1090 esac
1091 ])
1092
1093
1094 # LT_INIT([OPTIONS])
1095 # ------------------
1096 AC_DEFUN([LT_INIT],
1097 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1098 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1099 AC_BEFORE([$0], [LT_LANG])dnl
1100 AC_BEFORE([$0], [LT_OUTPUT])dnl
1101 AC_BEFORE([$0], [LTDL_INIT])dnl
1102 m4_require([_LT_CHECK_BUILDDIR])dnl
1103
1104 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1105 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1106 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1107 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1108 dnl unless we require an AC_DEFUNed macro:
1109 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1110 AC_REQUIRE([LTSUGAR_VERSION])dnl
1111 AC_REQUIRE([LTVERSION_VERSION])dnl
1112 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1113 m4_require([_LT_PROG_LTMAIN])dnl
1114
1115 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1116
1117 dnl Parse OPTIONS
1118 _LT_SET_OPTIONS([$0], [$1])
1119
1120 # This can be used to rebuild libtool when needed
1121 LIBTOOL_DEPS="$ltmain"
1122
1123 # Always use our own libtool.
1124 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1125 AC_SUBST(LIBTOOL)dnl
1126
1127 _LT_SETUP
1128
1129 # Only expand once:
1130 m4_define([LT_INIT])
1131 ])# LT_INIT
1132
1133 # Old names:
1134 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1135 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1136 dnl aclocal-1.4 backwards compatibility:
1137 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1138 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1139
1140
1141 # _LT_CC_BASENAME(CC)
1142 # -------------------
1143 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1144 m4_defun([_LT_CC_BASENAME],
1145 [for cc_temp in $1""; do
1146   case $cc_temp in
1147     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1148     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1149     \-*) ;;
1150     *) break;;
1151   esac
1152 done
1153 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1154 ])
1155
1156
1157 # _LT_FILEUTILS_DEFAULTS
1158 # ----------------------
1159 # It is okay to use these file commands and assume they have been set
1160 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1161 m4_defun([_LT_FILEUTILS_DEFAULTS],
1162 [: ${CP="cp -f"}
1163 : ${MV="mv -f"}
1164 : ${RM="rm -f"}
1165 ])# _LT_FILEUTILS_DEFAULTS
1166
1167
1168 # _LT_SETUP
1169 # ---------
1170 m4_defun([_LT_SETUP],
1171 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1172 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1173 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1174 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1175
1176 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1177 dnl
1178 _LT_DECL([], [host_alias], [0], [The host system])dnl
1179 _LT_DECL([], [host], [0])dnl
1180 _LT_DECL([], [host_os], [0])dnl
1181 dnl
1182 _LT_DECL([], [build_alias], [0], [The build system])dnl
1183 _LT_DECL([], [build], [0])dnl
1184 _LT_DECL([], [build_os], [0])dnl
1185 dnl
1186 AC_REQUIRE([AC_PROG_CC])dnl
1187 AC_REQUIRE([LT_PATH_LD])dnl
1188 AC_REQUIRE([LT_PATH_NM])dnl
1189 dnl
1190 AC_REQUIRE([AC_PROG_LN_S])dnl
1191 test -z "$LN_S" && LN_S="ln -s"
1192 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1193 dnl
1194 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1195 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1196 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1197 dnl
1198 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1199 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1200 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1201 m4_require([_LT_CMD_RELOAD])dnl
1202 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1203 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1204 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1205 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1206 m4_require([_LT_WITH_SYSROOT])dnl
1207
1208 _LT_CONFIG_LIBTOOL_INIT([
1209 # See if we are running on zsh, and set the options which allow our
1210 # commands through without removal of \ escapes INIT.
1211 if test -n "\${ZSH_VERSION+set}" ; then
1212    setopt NO_GLOB_SUBST
1213 fi
1214 ])
1215 if test -n "${ZSH_VERSION+set}" ; then
1216    setopt NO_GLOB_SUBST
1217 fi
1218
1219 _LT_CHECK_OBJDIR
1220
1221 m4_require([_LT_TAG_COMPILER])dnl
1222
1223 case $host_os in
1224 aix3*)
1225   # AIX sometimes has problems with the GCC collect2 program.  For some
1226   # reason, if we set the COLLECT_NAMES environment variable, the problems
1227   # vanish in a puff of smoke.
1228   if test "X${COLLECT_NAMES+set}" != Xset; then
1229     COLLECT_NAMES=
1230     export COLLECT_NAMES
1231   fi
1232   ;;
1233 esac
1234
1235 # Global variables:
1236 ofile=libtool
1237 can_build_shared=yes
1238
1239 # All known linkers require a `.a' archive for static linking (except MSVC,
1240 # which needs '.lib').
1241 libext=a
1242
1243 with_gnu_ld="$lt_cv_prog_gnu_ld"
1244
1245 old_CC="$CC"
1246 old_CFLAGS="$CFLAGS"
1247
1248 # Set sane defaults for various variables
1249 test -z "$CC" && CC=cc
1250 test -z "$LTCC" && LTCC=$CC
1251 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1252 test -z "$LD" && LD=ld
1253 test -z "$ac_objext" && ac_objext=o
1254
1255 _LT_CC_BASENAME([$compiler])
1256
1257 # Only perform the check for file, if the check method requires it
1258 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1259 case $deplibs_check_method in
1260 file_magic*)
1261   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1262     _LT_PATH_MAGIC
1263   fi
1264   ;;
1265 esac
1266
1267 # Use C for the default configuration in the libtool script
1268 LT_SUPPORTED_TAG([CC])
1269 _LT_LANG_C_CONFIG
1270 _LT_LANG_DEFAULT_CONFIG
1271 _LT_CONFIG_COMMANDS
1272 ])# _LT_SETUP
1273
1274
1275 # _LT_PREPARE_SED_QUOTE_VARS
1276 # --------------------------
1277 # Define a few sed substitution that help us do robust quoting.
1278 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1279 [# Backslashify metacharacters that are still active within
1280 # double-quoted strings.
1281 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1282
1283 # Same as above, but do not quote variable references.
1284 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1285
1286 # Sed substitution to delay expansion of an escaped shell variable in a
1287 # double_quote_subst'ed string.
1288 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1289
1290 # Sed substitution to delay expansion of an escaped single quote.
1291 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1292
1293 # Sed substitution to avoid accidental globbing in evaled expressions
1294 no_glob_subst='s/\*/\\\*/g'
1295 ])
1296
1297 # _LT_PROG_LTMAIN
1298 # ---------------
1299 # Note that this code is called both from `configure', and `config.status'
1300 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1301 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1302 # so we pass a copy along to make sure it has a sensible value anyway.
1303 m4_defun([_LT_PROG_LTMAIN],
1304 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1305 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1306 ltmain="$ac_aux_dir/ltmain.sh"
1307 ])# _LT_PROG_LTMAIN
1308
1309
1310
1311 # So that we can recreate a full libtool script including additional
1312 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1313 # in macros and then make a single call at the end using the `libtool'
1314 # label.
1315
1316
1317 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1318 # ----------------------------------------
1319 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1320 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1321 [m4_ifval([$1],
1322           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1323                      [$1
1324 ])])])
1325
1326 # Initialize.
1327 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1328
1329
1330 # _LT_CONFIG_LIBTOOL([COMMANDS])
1331 # ------------------------------
1332 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1333 m4_define([_LT_CONFIG_LIBTOOL],
1334 [m4_ifval([$1],
1335           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1336                      [$1
1337 ])])])
1338
1339 # Initialize.
1340 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1341
1342
1343 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1344 # -----------------------------------------------------
1345 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1346 [_LT_CONFIG_LIBTOOL([$1])
1347 _LT_CONFIG_LIBTOOL_INIT([$2])
1348 ])
1349
1350
1351 # _LT_FORMAT_COMMENT([COMMENT])
1352 # -----------------------------
1353 # Add leading comment marks to the start of each line, and a trailing
1354 # full-stop to the whole comment if one is not present already.
1355 m4_define([_LT_FORMAT_COMMENT],
1356 [m4_ifval([$1], [
1357 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1358               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1359 )])
1360
1361
1362
1363
1364
1365 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1366 # -------------------------------------------------------------------
1367 # CONFIGNAME is the name given to the value in the libtool script.
1368 # VARNAME is the (base) name used in the configure script.
1369 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1370 # VARNAME.  Any other value will be used directly.
1371 m4_define([_LT_DECL],
1372 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1373     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1374         [m4_ifval([$1], [$1], [$2])])
1375     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1376     m4_ifval([$4],
1377         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1378     lt_dict_add_subkey([lt_decl_dict], [$2],
1379         [tagged?], [m4_ifval([$5], [yes], [no])])])
1380 ])
1381
1382
1383 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1384 # --------------------------------------------------------
1385 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1386
1387
1388 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1389 # ------------------------------------------------
1390 m4_define([lt_decl_tag_varnames],
1391 [_lt_decl_filter([tagged?], [yes], $@)])
1392
1393
1394 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1395 # ---------------------------------------------------------
1396 m4_define([_lt_decl_filter],
1397 [m4_case([$#],
1398   [0], [m4_fatal([$0: too few arguments: $#])],
1399   [1], [m4_fatal([$0: too few arguments: $#: $1])],
1400   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1401   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1402   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1403 ])
1404
1405
1406 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1407 # --------------------------------------------------
1408 m4_define([lt_decl_quote_varnames],
1409 [_lt_decl_filter([value], [1], $@)])
1410
1411
1412 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1413 # ---------------------------------------------------
1414 m4_define([lt_decl_dquote_varnames],
1415 [_lt_decl_filter([value], [2], $@)])
1416
1417
1418 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1419 # ---------------------------------------------------
1420 m4_define([lt_decl_varnames_tagged],
1421 [m4_assert([$# <= 2])dnl
1422 _$0(m4_quote(m4_default([$1], [[, ]])),
1423     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1424     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1425 m4_define([_lt_decl_varnames_tagged],
1426 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1427
1428
1429 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1430 # ------------------------------------------------
1431 m4_define([lt_decl_all_varnames],
1432 [_$0(m4_quote(m4_default([$1], [[, ]])),
1433      m4_if([$2], [],
1434            m4_quote(lt_decl_varnames),
1435         m4_quote(m4_shift($@))))[]dnl
1436 ])
1437 m4_define([_lt_decl_all_varnames],
1438 [lt_join($@, lt_decl_varnames_tagged([$1],
1439                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1440 ])
1441
1442
1443 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1444 # ------------------------------------
1445 # Quote a variable value, and forward it to `config.status' so that its
1446 # declaration there will have the same value as in `configure'.  VARNAME
1447 # must have a single quote delimited value for this to work.
1448 m4_define([_LT_CONFIG_STATUS_DECLARE],
1449 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1450
1451
1452 # _LT_CONFIG_STATUS_DECLARATIONS
1453 # ------------------------------
1454 # We delimit libtool config variables with single quotes, so when
1455 # we write them to config.status, we have to be sure to quote all
1456 # embedded single quotes properly.  In configure, this macro expands
1457 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1458 #
1459 #    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1460 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1461 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1462     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1463
1464
1465 # _LT_LIBTOOL_TAGS
1466 # ----------------
1467 # Output comment and list of tags supported by the script
1468 m4_defun([_LT_LIBTOOL_TAGS],
1469 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1470 available_tags="_LT_TAGS"dnl
1471 ])
1472
1473
1474 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1475 # -----------------------------------
1476 # Extract the dictionary values for VARNAME (optionally with TAG) and
1477 # expand to a commented shell variable setting:
1478 #
1479 #    # Some comment about what VAR is for.
1480 #    visible_name=$lt_internal_name
1481 m4_define([_LT_LIBTOOL_DECLARE],
1482 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1483                                            [description])))[]dnl
1484 m4_pushdef([_libtool_name],
1485     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1486 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1487     [0], [_libtool_name=[$]$1],
1488     [1], [_libtool_name=$lt_[]$1],
1489     [2], [_libtool_name=$lt_[]$1],
1490     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1491 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1492 ])
1493
1494
1495 # _LT_LIBTOOL_CONFIG_VARS
1496 # -----------------------
1497 # Produce commented declarations of non-tagged libtool config variables
1498 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1499 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1500 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1501 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1502 [m4_foreach([_lt_var],
1503     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1504     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1505
1506
1507 # _LT_LIBTOOL_TAG_VARS(TAG)
1508 # -------------------------
1509 m4_define([_LT_LIBTOOL_TAG_VARS],
1510 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1511     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1512
1513
1514 # _LT_TAGVAR(VARNAME, [TAGNAME])
1515 # ------------------------------
1516 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1517
1518
1519 # _LT_CONFIG_COMMANDS
1520 # -------------------
1521 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1522 # variables for single and double quote escaping we saved from calls
1523 # to _LT_DECL, we can put quote escaped variables declarations
1524 # into `config.status', and then the shell code to quote escape them in
1525 # for loops in `config.status'.  Finally, any additional code accumulated
1526 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1527 m4_defun([_LT_CONFIG_COMMANDS],
1528 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1529         dnl If the libtool generation code has been placed in $CONFIG_LT,
1530         dnl instead of duplicating it all over again into config.status,
1531         dnl then we will have config.status run $CONFIG_LT later, so it
1532         dnl needs to know what name is stored there:
1533         [AC_CONFIG_COMMANDS([libtool],
1534             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1535     dnl If the libtool generation code is destined for config.status,
1536     dnl expand the accumulated commands and init code now:
1537     [AC_CONFIG_COMMANDS([libtool],
1538         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1539 ])#_LT_CONFIG_COMMANDS
1540
1541
1542 # Initialize.
1543 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1544 [
1545
1546 # The HP-UX ksh and POSIX shell print the target directory to stdout
1547 # if CDPATH is set.
1548 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1549
1550 sed_quote_subst='$sed_quote_subst'
1551 double_quote_subst='$double_quote_subst'
1552 delay_variable_subst='$delay_variable_subst'
1553 _LT_CONFIG_STATUS_DECLARATIONS
1554 LTCC='$LTCC'
1555 LTCFLAGS='$LTCFLAGS'
1556 compiler='$compiler_DEFAULT'
1557
1558 # A function that is used when there is no print builtin or printf.
1559 func_fallback_echo ()
1560 {
1561   eval 'cat <<_LTECHO_EOF
1562 \$[]1
1563 _LTECHO_EOF'
1564 }
1565
1566 # Quote evaled strings.
1567 for var in lt_decl_all_varnames([[ \
1568 ]], lt_decl_quote_varnames); do
1569     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1570     *[[\\\\\\\`\\"\\\$]]*)
1571       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1572       ;;
1573     *)
1574       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1575       ;;
1576     esac
1577 done
1578
1579 # Double-quote double-evaled strings.
1580 for var in lt_decl_all_varnames([[ \
1581 ]], lt_decl_dquote_varnames); do
1582     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1583     *[[\\\\\\\`\\"\\\$]]*)
1584       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1585       ;;
1586     *)
1587       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1588       ;;
1589     esac
1590 done
1591
1592 _LT_OUTPUT_LIBTOOL_INIT
1593 ])
1594
1595 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1596 # ------------------------------------
1597 # Generate a child script FILE with all initialization necessary to
1598 # reuse the environment learned by the parent script, and make the
1599 # file executable.  If COMMENT is supplied, it is inserted after the
1600 # `#!' sequence but before initialization text begins.  After this
1601 # macro, additional text can be appended to FILE to form the body of
1602 # the child script.  The macro ends with non-zero status if the
1603 # file could not be fully written (such as if the disk is full).
1604 m4_ifdef([AS_INIT_GENERATED],
1605 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1606 [m4_defun([_LT_GENERATED_FILE_INIT],
1607 [m4_require([AS_PREPARE])]dnl
1608 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1609 [lt_write_fail=0
1610 cat >$1 <<_ASEOF || lt_write_fail=1
1611 #! $SHELL
1612 # Generated by $as_me.
1613 $2
1614 SHELL=\${CONFIG_SHELL-$SHELL}
1615 export SHELL
1616 _ASEOF
1617 cat >>$1 <<\_ASEOF || lt_write_fail=1
1618 AS_SHELL_SANITIZE
1619 _AS_PREPARE
1620 exec AS_MESSAGE_FD>&1
1621 _ASEOF
1622 test $lt_write_fail = 0 && chmod +x $1[]dnl
1623 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1624
1625 # LT_OUTPUT
1626 # ---------
1627 # This macro allows early generation of the libtool script (before
1628 # AC_OUTPUT is called), incase it is used in configure for compilation
1629 # tests.
1630 AC_DEFUN([LT_OUTPUT],
1631 [: ${CONFIG_LT=./config.lt}
1632 AC_MSG_NOTICE([creating $CONFIG_LT])
1633 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1634 [# Run this file to recreate a libtool stub with the current configuration.])
1635
1636 cat >>"$CONFIG_LT" <<\_LTEOF
1637 lt_cl_silent=false
1638 exec AS_MESSAGE_LOG_FD>>config.log
1639 {
1640   echo
1641   AS_BOX([Running $as_me.])
1642 } >&AS_MESSAGE_LOG_FD
1643
1644 lt_cl_help="\
1645 \`$as_me' creates a local libtool stub from the current configuration,
1646 for use in further configure time tests before the real libtool is
1647 generated.
1648
1649 Usage: $[0] [[OPTIONS]]
1650
1651   -h, --help      print this help, then exit
1652   -V, --version   print version number, then exit
1653   -q, --quiet     do not print progress messages
1654   -d, --debug     don't remove temporary files
1655
1656 Report bugs to <bug-libtool@gnu.org>."
1657
1658 lt_cl_version="\
1659 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1660 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1661 configured by $[0], generated by m4_PACKAGE_STRING.
1662
1663 Copyright (C) 2011 Free Software Foundation, Inc.
1664 This config.lt script is free software; the Free Software Foundation
1665 gives unlimited permision to copy, distribute and modify it."
1666
1667 while test $[#] != 0
1668 do
1669   case $[1] in
1670     --version | --v* | -V )
1671       echo "$lt_cl_version"; exit 0 ;;
1672     --help | --h* | -h )
1673       echo "$lt_cl_help"; exit 0 ;;
1674     --debug | --d* | -d )
1675       debug=: ;;
1676     --quiet | --q* | --silent | --s* | -q )
1677       lt_cl_silent=: ;;
1678
1679     -*) AC_MSG_ERROR([unrecognized option: $[1]
1680 Try \`$[0] --help' for more information.]) ;;
1681
1682     *) AC_MSG_ERROR([unrecognized argument: $[1]
1683 Try \`$[0] --help' for more information.]) ;;
1684   esac
1685   shift
1686 done
1687
1688 if $lt_cl_silent; then
1689   exec AS_MESSAGE_FD>/dev/null
1690 fi
1691 _LTEOF
1692
1693 cat >>"$CONFIG_LT" <<_LTEOF
1694 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1695 _LTEOF
1696
1697 cat >>"$CONFIG_LT" <<\_LTEOF
1698 AC_MSG_NOTICE([creating $ofile])
1699 _LT_OUTPUT_LIBTOOL_COMMANDS
1700 AS_EXIT(0)
1701 _LTEOF
1702 chmod +x "$CONFIG_LT"
1703
1704 # configure is writing to config.log, but config.lt does its own redirection,
1705 # appending to config.log, which fails on DOS, as config.log is still kept
1706 # open by configure.  Here we exec the FD to /dev/null, effectively closing
1707 # config.log, so it can be properly (re)opened and appended to by config.lt.
1708 lt_cl_success=:
1709 test "$silent" = yes &&
1710   lt_config_lt_args="$lt_config_lt_args --quiet"
1711 exec AS_MESSAGE_LOG_FD>/dev/null
1712 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1713 exec AS_MESSAGE_LOG_FD>>config.log
1714 $lt_cl_success || AS_EXIT(1)
1715 ])# LT_OUTPUT
1716
1717
1718 # _LT_CONFIG(TAG)
1719 # ---------------
1720 # If TAG is the built-in tag, create an initial libtool script with a
1721 # default configuration from the untagged config vars.  Otherwise add code
1722 # to config.status for appending the configuration named by TAG from the
1723 # matching tagged config vars.
1724 m4_defun([_LT_CONFIG],
1725 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1726 _LT_CONFIG_SAVE_COMMANDS([
1727   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1728   m4_if(_LT_TAG, [C], [
1729     # See if we are running on zsh, and set the options which allow our
1730     # commands through without removal of \ escapes.
1731     if test -n "${ZSH_VERSION+set}" ; then
1732       setopt NO_GLOB_SUBST
1733     fi
1734
1735     cfgfile="${ofile}T"
1736     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1737     $RM "$cfgfile"
1738
1739     cat <<_LT_EOF >> "$cfgfile"
1740 #! $SHELL
1741
1742 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1743 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1744 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1745 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1746 #
1747 _LT_COPYING
1748 _LT_LIBTOOL_TAGS
1749
1750 # ### BEGIN LIBTOOL CONFIG
1751 _LT_LIBTOOL_CONFIG_VARS
1752 _LT_LIBTOOL_TAG_VARS
1753 # ### END LIBTOOL CONFIG
1754
1755 _LT_EOF
1756
1757   case $host_os in
1758   aix3*)
1759     cat <<\_LT_EOF >> "$cfgfile"
1760 # AIX sometimes has problems with the GCC collect2 program.  For some
1761 # reason, if we set the COLLECT_NAMES environment variable, the problems
1762 # vanish in a puff of smoke.
1763 if test "X${COLLECT_NAMES+set}" != Xset; then
1764   COLLECT_NAMES=
1765   export COLLECT_NAMES
1766 fi
1767 _LT_EOF
1768     ;;
1769   esac
1770
1771   _LT_PROG_LTMAIN
1772
1773   # We use sed instead of cat because bash on DJGPP gets confused if
1774   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1775   # text mode, it properly converts lines to CR/LF.  This bash problem
1776   # is reportedly fixed, but why not run on old versions too?
1777   sed '$q' "$ltmain" >> "$cfgfile" \
1778      || (rm -f "$cfgfile"; exit 1)
1779
1780   _LT_PROG_REPLACE_SHELLFNS
1781
1782    mv -f "$cfgfile" "$ofile" ||
1783     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1784   chmod +x "$ofile"
1785 ],
1786 [cat <<_LT_EOF >> "$ofile"
1787
1788 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1789 dnl in a comment (ie after a #).
1790 # ### BEGIN LIBTOOL TAG CONFIG: $1
1791 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
1792 # ### END LIBTOOL TAG CONFIG: $1
1793 _LT_EOF
1794 ])dnl /m4_if
1795 ],
1796 [m4_if([$1], [], [
1797     PACKAGE='$PACKAGE'
1798     VERSION='$VERSION'
1799     TIMESTAMP='$TIMESTAMP'
1800     RM='$RM'
1801     ofile='$ofile'], [])
1802 ])dnl /_LT_CONFIG_SAVE_COMMANDS
1803 ])# _LT_CONFIG
1804
1805
1806 # LT_SUPPORTED_TAG(TAG)
1807 # ---------------------
1808 # Trace this macro to discover what tags are supported by the libtool
1809 # --tag option, using:
1810 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1811 AC_DEFUN([LT_SUPPORTED_TAG], [])
1812
1813
1814 # C support is built-in for now
1815 m4_define([_LT_LANG_C_enabled], [])
1816 m4_define([_LT_TAGS], [])
1817
1818
1819 # LT_LANG(LANG)
1820 # -------------
1821 # Enable libtool support for the given language if not already enabled.
1822 AC_DEFUN([LT_LANG],
1823 [AC_BEFORE([$0], [LT_OUTPUT])dnl
1824 m4_case([$1],
1825   [C],                  [_LT_LANG(C)],
1826   [C++],                [_LT_LANG(CXX)],
1827   [Go],                 [_LT_LANG(GO)],
1828   [Java],               [_LT_LANG(GCJ)],
1829   [Fortran 77],         [_LT_LANG(F77)],
1830   [Fortran],            [_LT_LANG(FC)],
1831   [Windows Resource],   [_LT_LANG(RC)],
1832   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1833     [_LT_LANG($1)],
1834     [m4_fatal([$0: unsupported language: "$1"])])])dnl
1835 ])# LT_LANG
1836
1837
1838 # _LT_LANG(LANGNAME)
1839 # ------------------
1840 m4_defun([_LT_LANG],
1841 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
1842   [LT_SUPPORTED_TAG([$1])dnl
1843   m4_append([_LT_TAGS], [$1 ])dnl
1844   m4_define([_LT_LANG_]$1[_enabled], [])dnl
1845   _LT_LANG_$1_CONFIG($1)])dnl
1846 ])# _LT_LANG
1847
1848
1849 m4_ifndef([AC_PROG_GO], [
1850 # NOTE: This macro has been submitted for inclusion into   #
1851 #  GNU Autoconf as AC_PROG_GO.  When it is available in    #
1852 #  a released version of Autoconf we should remove this    #
1853 #  macro and use it instead.                               #
1854 m4_defun([AC_PROG_GO],
1855 [AC_LANG_PUSH(Go)dnl
1856 AC_ARG_VAR([GOC],     [Go compiler command])dnl
1857 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1858 _AC_ARG_VAR_LDFLAGS()dnl
1859 AC_CHECK_TOOL(GOC, gccgo)
1860 if test -z "$GOC"; then
1861   if test -n "$ac_tool_prefix"; then
1862     AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1863   fi
1864 fi
1865 if test -z "$GOC"; then
1866   AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1867 fi
1868 ])#m4_defun
1869 ])#m4_ifndef
1870
1871
1872 # _LT_LANG_DEFAULT_CONFIG
1873 # -----------------------
1874 m4_defun([_LT_LANG_DEFAULT_CONFIG],
1875 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
1876   [LT_LANG(CXX)],
1877   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1878
1879 AC_PROVIDE_IFELSE([AC_PROG_F77],
1880   [LT_LANG(F77)],
1881   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1882
1883 AC_PROVIDE_IFELSE([AC_PROG_FC],
1884   [LT_LANG(FC)],
1885   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1886
1887 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1888 dnl pulling things in needlessly.
1889 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1890   [LT_LANG(GCJ)],
1891   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1892     [LT_LANG(GCJ)],
1893     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1894       [LT_LANG(GCJ)],
1895       [m4_ifdef([AC_PROG_GCJ],
1896         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1897        m4_ifdef([A][M_PROG_GCJ],
1898         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1899        m4_ifdef([LT_PROG_GCJ],
1900         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1901
1902 AC_PROVIDE_IFELSE([AC_PROG_GO],
1903   [LT_LANG(GO)],
1904   [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
1905
1906 AC_PROVIDE_IFELSE([LT_PROG_RC],
1907   [LT_LANG(RC)],
1908   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1909 ])# _LT_LANG_DEFAULT_CONFIG
1910
1911 # Obsolete macros:
1912 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1913 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1914 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1915 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1916 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1917 dnl aclocal-1.4 backwards compatibility:
1918 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1919 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1920 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1921 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1922 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1923
1924
1925 # _LT_TAG_COMPILER
1926 # ----------------
1927 m4_defun([_LT_TAG_COMPILER],
1928 [AC_REQUIRE([AC_PROG_CC])dnl
1929
1930 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1931 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1932 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1933 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1934
1935 # If no C compiler was specified, use CC.
1936 LTCC=${LTCC-"$CC"}
1937
1938 # If no C compiler flags were specified, use CFLAGS.
1939 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1940
1941 # Allow CC to be a program name with arguments.
1942 compiler=$CC
1943 ])# _LT_TAG_COMPILER
1944
1945
1946 # _LT_COMPILER_BOILERPLATE
1947 # ------------------------
1948 # Check for compiler boilerplate output or warnings with
1949 # the simple compiler test code.
1950 m4_defun([_LT_COMPILER_BOILERPLATE],
1951 [m4_require([_LT_DECL_SED])dnl
1952 ac_outfile=conftest.$ac_objext
1953 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1954 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1955 _lt_compiler_boilerplate=`cat conftest.err`
1956 $RM conftest*
1957 ])# _LT_COMPILER_BOILERPLATE
1958
1959
1960 # _LT_LINKER_BOILERPLATE
1961 # ----------------------
1962 # Check for linker boilerplate output or warnings with
1963 # the simple link test code.
1964 m4_defun([_LT_LINKER_BOILERPLATE],
1965 [m4_require([_LT_DECL_SED])dnl
1966 ac_outfile=conftest.$ac_objext
1967 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1968 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1969 _lt_linker_boilerplate=`cat conftest.err`
1970 $RM -r conftest*
1971 ])# _LT_LINKER_BOILERPLATE
1972
1973 # _LT_REQUIRED_DARWIN_CHECKS
1974 # -------------------------
1975 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1976   case $host_os in
1977     rhapsody* | darwin*)
1978     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1979     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1980     AC_CHECK_TOOL([LIPO], [lipo], [:])
1981     AC_CHECK_TOOL([OTOOL], [otool], [:])
1982     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1983     _LT_DECL([], [DSYMUTIL], [1],
1984       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1985     _LT_DECL([], [NMEDIT], [1],
1986       [Tool to change global to local symbols on Mac OS X])
1987     _LT_DECL([], [LIPO], [1],
1988       [Tool to manipulate fat objects and archives on Mac OS X])
1989     _LT_DECL([], [OTOOL], [1],
1990       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1991     _LT_DECL([], [OTOOL64], [1],
1992       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1993
1994     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1995       [lt_cv_apple_cc_single_mod=no
1996       if test -z "${LT_MULTI_MODULE}"; then
1997         # By default we will add the -single_module flag. You can override
1998         # by either setting the environment variable LT_MULTI_MODULE
1999         # non-empty at configure time, or by adding -multi_module to the
2000         # link flags.
2001         rm -rf libconftest.dylib*
2002         echo "int foo(void){return 1;}" > conftest.c
2003         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2004 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2005         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2006           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2007         _lt_result=$?
2008         # If there is a non-empty error log, and "single_module"
2009         # appears in it, assume the flag caused a linker warning
2010         if test -s conftest.err && $GREP single_module conftest.err; then
2011           cat conftest.err >&AS_MESSAGE_LOG_FD
2012         # Otherwise, if the output was created with a 0 exit code from
2013         # the compiler, it worked.
2014         elif test -f libconftest.dylib && test $_lt_result -eq 0; then
2015           lt_cv_apple_cc_single_mod=yes
2016         else
2017           cat conftest.err >&AS_MESSAGE_LOG_FD
2018         fi
2019         rm -rf libconftest.dylib*
2020         rm -f conftest.*
2021       fi])
2022
2023     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2024       [lt_cv_ld_exported_symbols_list],
2025       [lt_cv_ld_exported_symbols_list=no
2026       save_LDFLAGS=$LDFLAGS
2027       echo "_main" > conftest.sym
2028       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2029       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2030         [lt_cv_ld_exported_symbols_list=yes],
2031         [lt_cv_ld_exported_symbols_list=no])
2032         LDFLAGS="$save_LDFLAGS"
2033     ])
2034
2035     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2036       [lt_cv_ld_force_load=no
2037       cat > conftest.c << _LT_EOF
2038 int forced_loaded() { return 2;}
2039 _LT_EOF
2040       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2041       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2042       echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2043       $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2044       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2045       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2046       cat > conftest.c << _LT_EOF
2047 int main() { return 0;}
2048 _LT_EOF
2049       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2050       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2051       _lt_result=$?
2052       if test -s conftest.err && $GREP force_load conftest.err; then
2053         cat conftest.err >&AS_MESSAGE_LOG_FD
2054       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
2055         lt_cv_ld_force_load=yes
2056       else
2057         cat conftest.err >&AS_MESSAGE_LOG_FD
2058       fi
2059         rm -f conftest.err libconftest.a conftest conftest.c
2060         rm -rf conftest.dSYM
2061     ])
2062     case $host_os in
2063     rhapsody* | darwin1.[[012]])
2064       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2065     darwin1.*)
2066       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2067     darwin*) # darwin 5.x on
2068       # if running on 10.5 or later, the deployment target defaults
2069       # to the OS version, if on x86, and 10.4, the deployment
2070       # target defaults to 10.4. Don't you love it?
2071       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2072         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2073           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2074         10.[[012]]*)
2075           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2076         10.*)
2077           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2078       esac
2079     ;;
2080   esac
2081     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2082       _lt_dar_single_mod='$single_module'
2083     fi
2084     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2085       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2086     else
2087       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2088     fi
2089     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2090       _lt_dsymutil='~$DSYMUTIL $lib || :'
2091     else
2092       _lt_dsymutil=
2093     fi
2094     ;;
2095   esac
2096 ])
2097
2098
2099 # _LT_DARWIN_LINKER_FEATURES([TAG])
2100 # ---------------------------------
2101 # Checks for linker and compiler features on darwin
2102 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2103 [
2104   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2105   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2106   _LT_TAGVAR(hardcode_direct, $1)=no
2107   _LT_TAGVAR(hardcode_automatic, $1)=yes
2108   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2109   if test "$lt_cv_ld_force_load" = "yes"; then
2110     _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
2111     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2112                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2113   else
2114     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2115   fi
2116   _LT_TAGVAR(link_all_deplibs, $1)=yes
2117   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2118   case $cc_basename in
2119      ifort*) _lt_dar_can_shared=yes ;;
2120      *) _lt_dar_can_shared=$GCC ;;
2121   esac
2122   if test "$_lt_dar_can_shared" = "yes"; then
2123     output_verbose_link_cmd=func_echo_all
2124     _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}"
2125     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2126     _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}"
2127     _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}"
2128     m4_if([$1], [CXX],
2129 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2130       _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}"
2131       _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}"
2132     fi
2133 ],[])
2134   else
2135   _LT_TAGVAR(ld_shlibs, $1)=no
2136   fi
2137 ])
2138
2139 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2140 # ----------------------------------
2141 # Links a minimal program and checks the executable
2142 # for the system default hardcoded library path. In most cases,
2143 # this is /usr/lib:/lib, but when the MPI compilers are used
2144 # the location of the communication and MPI libs are included too.
2145 # If we don't find anything, use the default library path according
2146 # to the aix ld manual.
2147 # Store the results from the different compilers for each TAGNAME.
2148 # Allow to override them for all tags through lt_cv_aix_libpath.
2149 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2150 [m4_require([_LT_DECL_SED])dnl
2151 if test "${lt_cv_aix_libpath+set}" = set; then
2152   aix_libpath=$lt_cv_aix_libpath
2153 else
2154   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2155   [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2156   lt_aix_libpath_sed='[
2157       /Import File Strings/,/^$/ {
2158           /^0/ {
2159               s/^0  *\([^ ]*\) *$/\1/
2160               p
2161           }
2162       }]'
2163   _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2164   # Check for a 64-bit object if we didn't find anything.
2165   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2166     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2167   fi],[])
2168   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2169     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2170   fi
2171   ])
2172   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2173 fi
2174 ])# _LT_SYS_MODULE_PATH_AIX
2175
2176
2177 # _LT_SHELL_INIT(ARG)
2178 # -------------------
2179 m4_define([_LT_SHELL_INIT],
2180 [m4_divert_text([M4SH-INIT], [$1
2181 ])])# _LT_SHELL_INIT
2182
2183
2184
2185 # _LT_PROG_ECHO_BACKSLASH
2186 # -----------------------
2187 # Find how we can fake an echo command that does not interpret backslash.
2188 # In particular, with Autoconf 2.60 or later we add some code to the start
2189 # of the generated configure script which will find a shell with a builtin
2190 # printf (which we can use as an echo command).
2191 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2192 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2193 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2194 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2195
2196 AC_MSG_CHECKING([how to print strings])
2197 # Test print first, because it will be a builtin if present.
2198 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2199    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2200   ECHO='print -r --'
2201 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2202   ECHO='printf %s\n'
2203 else
2204   # Use this function as a fallback that always works.
2205   func_fallback_echo ()
2206   {
2207     eval 'cat <<_LTECHO_EOF
2208 $[]1
2209 _LTECHO_EOF'
2210   }
2211   ECHO='func_fallback_echo'
2212 fi
2213
2214 # func_echo_all arg...
2215 # Invoke $ECHO with all args, space-separated.
2216 func_echo_all ()
2217 {
2218     $ECHO "$*" 
2219 }
2220
2221 case "$ECHO" in
2222   printf*) AC_MSG_RESULT([printf]) ;;
2223   print*) AC_MSG_RESULT([print -r]) ;;
2224   *) AC_MSG_RESULT([cat]) ;;
2225 esac
2226
2227 m4_ifdef([_AS_DETECT_SUGGESTED],
2228 [_AS_DETECT_SUGGESTED([
2229   test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2230     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2231     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2232     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2233     PATH=/empty FPATH=/empty; export PATH FPATH
2234     test "X`printf %s $ECHO`" = "X$ECHO" \
2235       || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2236
2237 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2238 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2239 ])# _LT_PROG_ECHO_BACKSLASH
2240
2241
2242 # _LT_WITH_SYSROOT
2243 # ----------------
2244 AC_DEFUN([_LT_WITH_SYSROOT],
2245 [AC_MSG_CHECKING([for sysroot])
2246 AC_ARG_WITH([sysroot],
2247 [  --with-sysroot[=DIR] Search for dependent libraries within DIR
2248                         (or the compiler's sysroot if not specified).],
2249 [], [with_sysroot=no])
2250
2251 dnl lt_sysroot will always be passed unquoted.  We quote it here
2252 dnl in case the user passed a directory name.
2253 lt_sysroot=
2254 case ${with_sysroot} in #(
2255  yes)
2256    if test "$GCC" = yes; then
2257      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2258    fi
2259    ;; #(
2260  /*)
2261    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2262    ;; #(
2263  no|'')
2264    ;; #(
2265  *)
2266    AC_MSG_RESULT([${with_sysroot}])
2267    AC_MSG_ERROR([The sysroot must be an absolute path.])
2268    ;;
2269 esac
2270
2271  AC_MSG_RESULT([${lt_sysroot:-no}])
2272 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2273 [dependent libraries, and in which our libraries should be installed.])])
2274
2275 # _LT_ENABLE_LOCK
2276 # ---------------
2277 m4_defun([_LT_ENABLE_LOCK],
2278 [AC_ARG_ENABLE([libtool-lock],
2279   [AS_HELP_STRING([--disable-libtool-lock],
2280     [avoid locking (might break parallel builds)])])
2281 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2282
2283 # Some flags need to be propagated to the compiler or linker for good
2284 # libtool support.
2285 case $host in
2286 ia64-*-hpux*)
2287   # Find out which ABI we are using.
2288   echo 'int i;' > conftest.$ac_ext
2289   if AC_TRY_EVAL(ac_compile); then
2290     case `/usr/bin/file conftest.$ac_objext` in
2291       *ELF-32*)
2292         HPUX_IA64_MODE="32"
2293         ;;
2294       *ELF-64*)
2295         HPUX_IA64_MODE="64"
2296         ;;
2297     esac
2298   fi
2299   rm -rf conftest*
2300   ;;
2301 *-*-irix6*)
2302   # Find out which ABI we are using.
2303   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2304   if AC_TRY_EVAL(ac_compile); then
2305     if test "$lt_cv_prog_gnu_ld" = yes; then
2306       case `/usr/bin/file conftest.$ac_objext` in
2307         *32-bit*)
2308           LD="${LD-ld} -melf32bsmip"
2309           ;;
2310         *N32*)
2311           LD="${LD-ld} -melf32bmipn32"
2312           ;;
2313         *64-bit*)
2314           LD="${LD-ld} -melf64bmip"
2315         ;;
2316       esac
2317     else
2318       case `/usr/bin/file conftest.$ac_objext` in
2319         *32-bit*)
2320           LD="${LD-ld} -32"
2321           ;;
2322         *N32*)
2323           LD="${LD-ld} -n32"
2324           ;;
2325         *64-bit*)
2326           LD="${LD-ld} -64"
2327           ;;
2328       esac
2329     fi
2330   fi
2331   rm -rf conftest*
2332   ;;
2333
2334 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
2335 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2336   # Find out which ABI we are using.
2337   echo 'int i;' > conftest.$ac_ext
2338   if AC_TRY_EVAL(ac_compile); then
2339     case `/usr/bin/file conftest.o` in
2340       *32-bit*)
2341         case $host in
2342           x86_64-*kfreebsd*-gnu)
2343             LD="${LD-ld} -m elf_i386_fbsd"
2344             ;;
2345           x86_64-*linux*)
2346             case `/usr/bin/file conftest.o` in
2347               *x86-64*)
2348                 LD="${LD-ld} -m elf32_x86_64"
2349                 ;;
2350               *)
2351                 LD="${LD-ld} -m elf_i386"
2352                 ;;
2353             esac
2354             ;;
2355           powerpc64le-*)
2356             LD="${LD-ld} -m elf32lppclinux"
2357             ;;
2358           powerpc64-*)
2359             LD="${LD-ld} -m elf32ppclinux"
2360             ;;
2361           s390x-*linux*)
2362             LD="${LD-ld} -m elf_s390"
2363             ;;
2364           sparc64-*linux*)
2365             LD="${LD-ld} -m elf32_sparc"
2366             ;;
2367         esac
2368         ;;
2369       *64-bit*)
2370         case $host in
2371           x86_64-*kfreebsd*-gnu)
2372             LD="${LD-ld} -m elf_x86_64_fbsd"
2373             ;;
2374           x86_64-*linux*)
2375             LD="${LD-ld} -m elf_x86_64"
2376             ;;
2377           powerpcle-*)
2378             LD="${LD-ld} -m elf64lppc"
2379             ;;
2380           powerpc-*)
2381             LD="${LD-ld} -m elf64ppc"
2382             ;;
2383           s390*-*linux*|s390*-*tpf*)
2384             LD="${LD-ld} -m elf64_s390"
2385             ;;
2386           sparc*-*linux*)
2387             LD="${LD-ld} -m elf64_sparc"
2388             ;;
2389         esac
2390         ;;
2391     esac
2392   fi
2393   rm -rf conftest*
2394   ;;
2395
2396 *-*-sco3.2v5*)
2397   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2398   SAVE_CFLAGS="$CFLAGS"
2399   CFLAGS="$CFLAGS -belf"
2400   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2401     [AC_LANG_PUSH(C)
2402      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2403      AC_LANG_POP])
2404   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2405     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2406     CFLAGS="$SAVE_CFLAGS"
2407   fi
2408   ;;
2409 *-*solaris*)
2410   # Find out which ABI we are using.
2411   echo 'int i;' > conftest.$ac_ext
2412   if AC_TRY_EVAL(ac_compile); then
2413     case `/usr/bin/file conftest.o` in
2414     *64-bit*)
2415       case $lt_cv_prog_gnu_ld in
2416       yes*)
2417         case $host in
2418         i?86-*-solaris*)
2419           LD="${LD-ld} -m elf_x86_64"
2420           ;;
2421         sparc*-*-solaris*)
2422           LD="${LD-ld} -m elf64_sparc"
2423           ;;
2424         esac
2425         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
2426         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2427           LD="${LD-ld}_sol2"
2428         fi
2429         ;;
2430       *)
2431         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2432           LD="${LD-ld} -64"
2433         fi
2434         ;;
2435       esac
2436       ;;
2437     esac
2438   fi
2439   rm -rf conftest*
2440   ;;
2441 esac
2442
2443 need_locks="$enable_libtool_lock"
2444 ])# _LT_ENABLE_LOCK
2445
2446
2447 # _LT_PROG_AR
2448 # -----------
2449 m4_defun([_LT_PROG_AR],
2450 [AC_CHECK_TOOLS(AR, [ar], false)
2451 : ${AR=ar}
2452 : ${AR_FLAGS=cru}
2453 _LT_DECL([], [AR], [1], [The archiver])
2454 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2455
2456 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2457   [lt_cv_ar_at_file=no
2458    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2459      [echo conftest.$ac_objext > conftest.lst
2460       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2461       AC_TRY_EVAL([lt_ar_try])
2462       if test "$ac_status" -eq 0; then
2463         # Ensure the archiver fails upon bogus file names.
2464         rm -f conftest.$ac_objext libconftest.a
2465         AC_TRY_EVAL([lt_ar_try])
2466         if test "$ac_status" -ne 0; then
2467           lt_cv_ar_at_file=@
2468         fi
2469       fi
2470       rm -f conftest.* libconftest.a
2471      ])
2472   ])
2473
2474 if test "x$lt_cv_ar_at_file" = xno; then
2475   archiver_list_spec=
2476 else
2477   archiver_list_spec=$lt_cv_ar_at_file
2478 fi
2479 _LT_DECL([], [archiver_list_spec], [1],
2480   [How to feed a file listing to the archiver])
2481 ])# _LT_PROG_AR
2482
2483
2484 # _LT_CMD_OLD_ARCHIVE
2485 # -------------------
2486 m4_defun([_LT_CMD_OLD_ARCHIVE],
2487 [_LT_PROG_AR
2488
2489 AC_CHECK_TOOL(STRIP, strip, :)
2490 test -z "$STRIP" && STRIP=:
2491 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2492
2493 AC_CHECK_TOOL(RANLIB, ranlib, :)
2494 test -z "$RANLIB" && RANLIB=:
2495 _LT_DECL([], [RANLIB], [1],
2496     [Commands used to install an old-style archive])
2497
2498 # Determine commands to create old-style static archives.
2499 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2500 old_postinstall_cmds='chmod 644 $oldlib'
2501 old_postuninstall_cmds=
2502
2503 if test -n "$RANLIB"; then
2504   case $host_os in
2505   openbsd*)
2506     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2507     ;;
2508   *)
2509     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2510     ;;
2511   esac
2512   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2513 fi
2514
2515 case $host_os in
2516   darwin*)
2517     lock_old_archive_extraction=yes ;;
2518   *)
2519     lock_old_archive_extraction=no ;;
2520 esac
2521 _LT_DECL([], [old_postinstall_cmds], [2])
2522 _LT_DECL([], [old_postuninstall_cmds], [2])
2523 _LT_TAGDECL([], [old_archive_cmds], [2],
2524     [Commands used to build an old-style archive])
2525 _LT_DECL([], [lock_old_archive_extraction], [0],
2526     [Whether to use a lock for old archive extraction])
2527 ])# _LT_CMD_OLD_ARCHIVE
2528
2529
2530 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2531 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2532 # ----------------------------------------------------------------
2533 # Check whether the given compiler option works
2534 AC_DEFUN([_LT_COMPILER_OPTION],
2535 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2536 m4_require([_LT_DECL_SED])dnl
2537 AC_CACHE_CHECK([$1], [$2],
2538   [$2=no
2539    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2540    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2541    lt_compiler_flag="$3"
2542    # Insert the option either (1) after the last *FLAGS variable, or
2543    # (2) before a word containing "conftest.", or (3) at the end.
2544    # Note that $ac_compile itself does not contain backslashes and begins
2545    # with a dollar sign (not a hyphen), so the echo should work correctly.
2546    # The option is referenced via a variable to avoid confusing sed.
2547    lt_compile=`echo "$ac_compile" | $SED \
2548    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2549    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2550    -e 's:$: $lt_compiler_flag:'`
2551    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2552    (eval "$lt_compile" 2>conftest.err)
2553    ac_status=$?
2554    cat conftest.err >&AS_MESSAGE_LOG_FD
2555    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2556    if (exit $ac_status) && test -s "$ac_outfile"; then
2557      # The compiler can only warn and ignore the option if not recognized
2558      # So say no if there are warnings other than the usual output.
2559      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2560      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2561      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2562        $2=yes
2563      fi
2564    fi
2565    $RM conftest*
2566 ])
2567
2568 if test x"[$]$2" = xyes; then
2569     m4_if([$5], , :, [$5])
2570 else
2571     m4_if([$6], , :, [$6])
2572 fi
2573 ])# _LT_COMPILER_OPTION
2574
2575 # Old name:
2576 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2577 dnl aclocal-1.4 backwards compatibility:
2578 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2579
2580
2581 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2582 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
2583 # ----------------------------------------------------
2584 # Check whether the given linker option works
2585 AC_DEFUN([_LT_LINKER_OPTION],
2586 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2587 m4_require([_LT_DECL_SED])dnl
2588 AC_CACHE_CHECK([$1], [$2],
2589   [$2=no
2590    save_LDFLAGS="$LDFLAGS"
2591    LDFLAGS="$LDFLAGS $3"
2592    echo "$lt_simple_link_test_code" > conftest.$ac_ext
2593    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2594      # The linker can only warn and ignore the option if not recognized
2595      # So say no if there are warnings
2596      if test -s conftest.err; then
2597        # Append any errors to the config.log.
2598        cat conftest.err 1>&AS_MESSAGE_LOG_FD
2599        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2600        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2601        if diff conftest.exp conftest.er2 >/dev/null; then
2602          $2=yes
2603        fi
2604      else
2605        $2=yes
2606      fi
2607    fi
2608    $RM -r conftest*
2609    LDFLAGS="$save_LDFLAGS"
2610 ])
2611
2612 if test x"[$]$2" = xyes; then
2613     m4_if([$4], , :, [$4])
2614 else
2615     m4_if([$5], , :, [$5])
2616 fi
2617 ])# _LT_LINKER_OPTION
2618
2619 # Old name:
2620 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2621 dnl aclocal-1.4 backwards compatibility:
2622 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2623
2624
2625 # LT_CMD_MAX_LEN
2626 #---------------
2627 AC_DEFUN([LT_CMD_MAX_LEN],
2628 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2629 # find the maximum length of command line arguments
2630 AC_MSG_CHECKING([the maximum length of command line arguments])
2631 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2632   i=0
2633   teststring="ABCD"
2634
2635   case $build_os in
2636   msdosdjgpp*)
2637     # On DJGPP, this test can blow up pretty badly due to problems in libc
2638     # (any single argument exceeding 2000 bytes causes a buffer overrun
2639     # during glob expansion).  Even if it were fixed, the result of this
2640     # check would be larger than it should be.
2641     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2642     ;;
2643
2644   gnu*)
2645     # Under GNU Hurd, this test is not required because there is
2646     # no limit to the length of command line arguments.
2647     # Libtool will interpret -1 as no limit whatsoever
2648     lt_cv_sys_max_cmd_len=-1;
2649     ;;
2650
2651   cygwin* | mingw* | cegcc*)
2652     # On Win9x/ME, this test blows up -- it succeeds, but takes
2653     # about 5 minutes as the teststring grows exponentially.
2654     # Worse, since 9x/ME are not pre-emptively multitasking,
2655     # you end up with a "frozen" computer, even though with patience
2656     # the test eventually succeeds (with a max line length of 256k).
2657     # Instead, let's just punt: use the minimum linelength reported by
2658     # all of the supported platforms: 8192 (on NT/2K/XP).
2659     lt_cv_sys_max_cmd_len=8192;
2660     ;;
2661
2662   mint*)
2663     # On MiNT this can take a long time and run out of memory.
2664     lt_cv_sys_max_cmd_len=8192;
2665     ;;
2666
2667   amigaos*)
2668     # On AmigaOS with pdksh, this test takes hours, literally.
2669     # So we just punt and use a minimum line length of 8192.
2670     lt_cv_sys_max_cmd_len=8192;
2671     ;;
2672
2673   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2674     # This has been around since 386BSD, at least.  Likely further.
2675     if test -x /sbin/sysctl; then
2676       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2677     elif test -x /usr/sbin/sysctl; then
2678       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2679     else
2680       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
2681     fi
2682     # And add a safety zone
2683     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2684     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2685     ;;
2686
2687   interix*)
2688     # We know the value 262144 and hardcode it with a safety zone (like BSD)
2689     lt_cv_sys_max_cmd_len=196608
2690     ;;
2691
2692   os2*)
2693     # The test takes a long time on OS/2.
2694     lt_cv_sys_max_cmd_len=8192
2695     ;;
2696
2697   osf*)
2698     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2699     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2700     # nice to cause kernel panics so lets avoid the loop below.
2701     # First set a reasonable default.
2702     lt_cv_sys_max_cmd_len=16384
2703     #
2704     if test -x /sbin/sysconfig; then
2705       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2706         *1*) lt_cv_sys_max_cmd_len=-1 ;;
2707       esac
2708     fi
2709     ;;
2710   sco3.2v5*)
2711     lt_cv_sys_max_cmd_len=102400
2712     ;;
2713   sysv5* | sco5v6* | sysv4.2uw2*)
2714     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2715     if test -n "$kargmax"; then
2716       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
2717     else
2718       lt_cv_sys_max_cmd_len=32768
2719     fi
2720     ;;
2721   *)
2722     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2723     if test -n "$lt_cv_sys_max_cmd_len" && \
2724         test undefined != "$lt_cv_sys_max_cmd_len"; then
2725       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2726       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2727     else
2728       # Make teststring a little bigger before we do anything with it.
2729       # a 1K string should be a reasonable start.
2730       for i in 1 2 3 4 5 6 7 8 ; do
2731         teststring=$teststring$teststring
2732       done
2733       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2734       # If test is not a shell built-in, we'll probably end up computing a
2735       # maximum length that is only half of the actual maximum length, but
2736       # we can't tell.
2737       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
2738                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2739               test $i != 17 # 1/2 MB should be enough
2740       do
2741         i=`expr $i + 1`
2742         teststring=$teststring$teststring
2743       done
2744       # Only check the string length outside the loop.
2745       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2746       teststring=
2747       # Add a significant safety factor because C++ compilers can tack on
2748       # massive amounts of additional arguments before passing them to the
2749       # linker.  It appears as though 1/2 is a usable value.
2750       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2751     fi
2752     ;;
2753   esac
2754 ])
2755 if test -n $lt_cv_sys_max_cmd_len ; then
2756   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2757 else
2758   AC_MSG_RESULT(none)
2759 fi
2760 max_cmd_len=$lt_cv_sys_max_cmd_len
2761 _LT_DECL([], [max_cmd_len], [0],
2762     [What is the maximum length of a command?])
2763 ])# LT_CMD_MAX_LEN
2764
2765 # Old name:
2766 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2767 dnl aclocal-1.4 backwards compatibility:
2768 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2769
2770
2771 # _LT_HEADER_DLFCN
2772 # ----------------
2773 m4_defun([_LT_HEADER_DLFCN],
2774 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2775 ])# _LT_HEADER_DLFCN
2776
2777
2778 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2779 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2780 # ----------------------------------------------------------------
2781 m4_defun([_LT_TRY_DLOPEN_SELF],
2782 [m4_require([_LT_HEADER_DLFCN])dnl
2783 if test "$cross_compiling" = yes; then :
2784   [$4]
2785 else
2786   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2787   lt_status=$lt_dlunknown
2788   cat > conftest.$ac_ext <<_LT_EOF
2789 [#line $LINENO "configure"
2790 #include "confdefs.h"
2791
2792 #if HAVE_DLFCN_H
2793 #include <dlfcn.h>
2794 #endif
2795
2796 #include <stdio.h>
2797
2798 #ifdef RTLD_GLOBAL
2799 #  define LT_DLGLOBAL           RTLD_GLOBAL
2800 #else
2801 #  ifdef DL_GLOBAL
2802 #    define LT_DLGLOBAL         DL_GLOBAL
2803 #  else
2804 #    define LT_DLGLOBAL         0
2805 #  endif
2806 #endif
2807
2808 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2809    find out it does not work in some platform. */
2810 #ifndef LT_DLLAZY_OR_NOW
2811 #  ifdef RTLD_LAZY
2812 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
2813 #  else
2814 #    ifdef DL_LAZY
2815 #      define LT_DLLAZY_OR_NOW          DL_LAZY
2816 #    else
2817 #      ifdef RTLD_NOW
2818 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
2819 #      else
2820 #        ifdef DL_NOW
2821 #          define LT_DLLAZY_OR_NOW      DL_NOW
2822 #        else
2823 #          define LT_DLLAZY_OR_NOW      0
2824 #        endif
2825 #      endif
2826 #    endif
2827 #  endif
2828 #endif
2829
2830 /* When -fvisbility=hidden is used, assume the code has been annotated
2831    correspondingly for the symbols needed.  */
2832 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2833 int fnord () __attribute__((visibility("default")));
2834 #endif
2835
2836 int fnord () { return 42; }
2837 int main ()
2838 {
2839   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2840   int status = $lt_dlunknown;
2841
2842   if (self)
2843     {
2844       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2845       else
2846         {
2847           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2848           else puts (dlerror ());
2849         }
2850       /* dlclose (self); */
2851     }
2852   else
2853     puts (dlerror ());
2854
2855   return status;
2856 }]
2857 _LT_EOF
2858   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2859     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2860     lt_status=$?
2861     case x$lt_status in
2862       x$lt_dlno_uscore) $1 ;;
2863       x$lt_dlneed_uscore) $2 ;;
2864       x$lt_dlunknown|x*) $3 ;;
2865     esac
2866   else :
2867     # compilation failed
2868     $3
2869   fi
2870 fi
2871 rm -fr conftest*
2872 ])# _LT_TRY_DLOPEN_SELF
2873
2874
2875 # LT_SYS_DLOPEN_SELF
2876 # ------------------
2877 AC_DEFUN([LT_SYS_DLOPEN_SELF],
2878 [m4_require([_LT_HEADER_DLFCN])dnl
2879 if test "x$enable_dlopen" != xyes; then
2880   enable_dlopen=unknown
2881   enable_dlopen_self=unknown
2882   enable_dlopen_self_static=unknown
2883 else
2884   lt_cv_dlopen=no
2885   lt_cv_dlopen_libs=
2886
2887   case $host_os in
2888   beos*)
2889     lt_cv_dlopen="load_add_on"
2890     lt_cv_dlopen_libs=
2891     lt_cv_dlopen_self=yes
2892     ;;
2893
2894   mingw* | pw32* | cegcc*)
2895     lt_cv_dlopen="LoadLibrary"
2896     lt_cv_dlopen_libs=
2897     ;;
2898
2899   cygwin*)
2900     lt_cv_dlopen="dlopen"
2901     lt_cv_dlopen_libs=
2902     ;;
2903
2904   darwin*)
2905   # if libdl is installed we need to link against it
2906     AC_CHECK_LIB([dl], [dlopen],
2907                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2908     lt_cv_dlopen="dyld"
2909     lt_cv_dlopen_libs=
2910     lt_cv_dlopen_self=yes
2911     ])
2912     ;;
2913
2914   *)
2915     AC_CHECK_FUNC([shl_load],
2916           [lt_cv_dlopen="shl_load"],
2917       [AC_CHECK_LIB([dld], [shl_load],
2918             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2919         [AC_CHECK_FUNC([dlopen],
2920               [lt_cv_dlopen="dlopen"],
2921           [AC_CHECK_LIB([dl], [dlopen],
2922                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2923             [AC_CHECK_LIB([svld], [dlopen],
2924                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2925               [AC_CHECK_LIB([dld], [dld_link],
2926                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2927               ])
2928             ])
2929           ])
2930         ])
2931       ])
2932     ;;
2933   esac
2934
2935   if test "x$lt_cv_dlopen" != xno; then
2936     enable_dlopen=yes
2937   else
2938     enable_dlopen=no
2939   fi
2940
2941   case $lt_cv_dlopen in
2942   dlopen)
2943     save_CPPFLAGS="$CPPFLAGS"
2944     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2945
2946     save_LDFLAGS="$LDFLAGS"
2947     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2948
2949     save_LIBS="$LIBS"
2950     LIBS="$lt_cv_dlopen_libs $LIBS"
2951
2952     AC_CACHE_CHECK([whether a program can dlopen itself],
2953           lt_cv_dlopen_self, [dnl
2954           _LT_TRY_DLOPEN_SELF(
2955             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2956             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2957     ])
2958
2959     if test "x$lt_cv_dlopen_self" = xyes; then
2960       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2961       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2962           lt_cv_dlopen_self_static, [dnl
2963           _LT_TRY_DLOPEN_SELF(
2964             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2965             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2966       ])
2967     fi
2968
2969     CPPFLAGS="$save_CPPFLAGS"
2970     LDFLAGS="$save_LDFLAGS"
2971     LIBS="$save_LIBS"
2972     ;;
2973   esac
2974
2975   case $lt_cv_dlopen_self in
2976   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2977   *) enable_dlopen_self=unknown ;;
2978   esac
2979
2980   case $lt_cv_dlopen_self_static in
2981   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2982   *) enable_dlopen_self_static=unknown ;;
2983   esac
2984 fi
2985 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2986          [Whether dlopen is supported])
2987 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2988          [Whether dlopen of programs is supported])
2989 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2990          [Whether dlopen of statically linked programs is supported])
2991 ])# LT_SYS_DLOPEN_SELF
2992
2993 # Old name:
2994 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2995 dnl aclocal-1.4 backwards compatibility:
2996 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2997
2998
2999 # _LT_COMPILER_C_O([TAGNAME])
3000 # ---------------------------
3001 # Check to see if options -c and -o are simultaneously supported by compiler.
3002 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3003 m4_defun([_LT_COMPILER_C_O],
3004 [m4_require([_LT_DECL_SED])dnl
3005 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3006 m4_require([_LT_TAG_COMPILER])dnl
3007 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3008   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3009   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3010    $RM -r conftest 2>/dev/null
3011    mkdir conftest
3012    cd conftest
3013    mkdir out
3014    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3015
3016    lt_compiler_flag="-o out/conftest2.$ac_objext"
3017    # Insert the option either (1) after the last *FLAGS variable, or
3018    # (2) before a word containing "conftest.", or (3) at the end.
3019    # Note that $ac_compile itself does not contain backslashes and begins
3020    # with a dollar sign (not a hyphen), so the echo should work correctly.
3021    lt_compile=`echo "$ac_compile" | $SED \
3022    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3023    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3024    -e 's:$: $lt_compiler_flag:'`
3025    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3026    (eval "$lt_compile" 2>out/conftest.err)
3027    ac_status=$?
3028    cat out/conftest.err >&AS_MESSAGE_LOG_FD
3029    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3030    if (exit $ac_status) && test -s out/conftest2.$ac_objext
3031    then
3032      # The compiler can only warn and ignore the option if not recognized
3033      # So say no if there are warnings
3034      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3035      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3036      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3037        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3038      fi
3039    fi
3040    chmod u+w . 2>&AS_MESSAGE_LOG_FD
3041    $RM conftest*
3042    # SGI C++ compiler will create directory out/ii_files/ for
3043    # template instantiation
3044    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3045    $RM out/* && rmdir out
3046    cd ..
3047    $RM -r conftest
3048    $RM conftest*
3049 ])
3050 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3051         [Does compiler simultaneously support -c and -o options?])
3052 ])# _LT_COMPILER_C_O
3053
3054
3055 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3056 # ----------------------------------
3057 # Check to see if we can do hard links to lock some files if needed
3058 m4_defun([_LT_COMPILER_FILE_LOCKS],
3059 [m4_require([_LT_ENABLE_LOCK])dnl
3060 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3061 _LT_COMPILER_C_O([$1])
3062
3063 hard_links="nottested"
3064 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3065   # do not overwrite the value of need_locks provided by the user
3066   AC_MSG_CHECKING([if we can lock with hard links])
3067   hard_links=yes
3068   $RM conftest*
3069   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3070   touch conftest.a
3071   ln conftest.a conftest.b 2>&5 || hard_links=no
3072   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3073   AC_MSG_RESULT([$hard_links])
3074   if test "$hard_links" = no; then
3075     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3076     need_locks=warn
3077   fi
3078 else
3079   need_locks=no
3080 fi
3081 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3082 ])# _LT_COMPILER_FILE_LOCKS
3083
3084
3085 # _LT_CHECK_OBJDIR
3086 # ----------------
3087 m4_defun([_LT_CHECK_OBJDIR],
3088 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3089 [rm -f .libs 2>/dev/null
3090 mkdir .libs 2>/dev/null
3091 if test -d .libs; then
3092   lt_cv_objdir=.libs
3093 else
3094   # MS-DOS does not allow filenames that begin with a dot.
3095   lt_cv_objdir=_libs
3096 fi
3097 rmdir .libs 2>/dev/null])
3098 objdir=$lt_cv_objdir
3099 _LT_DECL([], [objdir], [0],
3100          [The name of the directory that contains temporary libtool files])dnl
3101 m4_pattern_allow([LT_OBJDIR])dnl
3102 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3103   [Define to the sub-directory in which libtool stores uninstalled libraries.])
3104 ])# _LT_CHECK_OBJDIR
3105
3106
3107 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3108 # --------------------------------------
3109 # Check hardcoding attributes.
3110 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3111 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3112 _LT_TAGVAR(hardcode_action, $1)=
3113 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3114    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3115    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3116
3117   # We can hardcode non-existent directories.
3118   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3119      # If the only mechanism to avoid hardcoding is shlibpath_var, we
3120      # have to relink, otherwise we might link with an installed library
3121      # when we should be linking with a yet-to-be-installed one
3122      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3123      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3124     # Linking always hardcodes the temporary library directory.
3125     _LT_TAGVAR(hardcode_action, $1)=relink
3126   else
3127     # We can link without hardcoding, and we can hardcode nonexisting dirs.
3128     _LT_TAGVAR(hardcode_action, $1)=immediate
3129   fi
3130 else
3131   # We cannot hardcode anything, or else we can only hardcode existing
3132   # directories.
3133   _LT_TAGVAR(hardcode_action, $1)=unsupported
3134 fi
3135 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3136
3137 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3138    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3139   # Fast installation is not supported
3140   enable_fast_install=no
3141 elif test "$shlibpath_overrides_runpath" = yes ||
3142      test "$enable_shared" = no; then
3143   # Fast installation is not necessary
3144   enable_fast_install=needless
3145 fi
3146 _LT_TAGDECL([], [hardcode_action], [0],
3147     [How to hardcode a shared library path into an executable])
3148 ])# _LT_LINKER_HARDCODE_LIBPATH
3149
3150
3151 # _LT_CMD_STRIPLIB
3152 # ----------------
3153 m4_defun([_LT_CMD_STRIPLIB],
3154 [m4_require([_LT_DECL_EGREP])
3155 striplib=
3156 old_striplib=
3157 AC_MSG_CHECKING([whether stripping libraries is possible])
3158 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3159   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3160   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3161   AC_MSG_RESULT([yes])
3162 else
3163 # FIXME - insert some real tests, host_os isn't really good enough
3164   case $host_os in
3165   darwin*)
3166     if test -n "$STRIP" ; then
3167       striplib="$STRIP -x"
3168       old_striplib="$STRIP -S"
3169       AC_MSG_RESULT([yes])
3170     else
3171       AC_MSG_RESULT([no])
3172     fi
3173     ;;
3174   *)
3175     AC_MSG_RESULT([no])
3176     ;;
3177   esac
3178 fi
3179 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3180 _LT_DECL([], [striplib], [1])
3181 ])# _LT_CMD_STRIPLIB
3182
3183
3184 # _LT_SYS_DYNAMIC_LINKER([TAG])
3185 # -----------------------------
3186 # PORTME Fill in your ld.so characteristics
3187 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3188 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3189 m4_require([_LT_DECL_EGREP])dnl
3190 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3191 m4_require([_LT_DECL_OBJDUMP])dnl
3192 m4_require([_LT_DECL_SED])dnl
3193 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3194 AC_MSG_CHECKING([dynamic linker characteristics])
3195 m4_if([$1],
3196         [], [
3197 if test "$GCC" = yes; then
3198   case $host_os in
3199     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3200     *) lt_awk_arg="/^libraries:/" ;;
3201   esac
3202   case $host_os in
3203     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3204     *) lt_sed_strip_eq="s,=/,/,g" ;;
3205   esac
3206   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3207   case $lt_search_path_spec in
3208   *\;*)
3209     # if the path contains ";" then we assume it to be the separator
3210     # otherwise default to the standard path separator (i.e. ":") - it is
3211     # assumed that no part of a normal pathname contains ";" but that should
3212     # okay in the real world where ";" in dirpaths is itself problematic.
3213     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3214     ;;
3215   *)
3216     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3217     ;;
3218   esac
3219   # Ok, now we have the path, separated by spaces, we can step through it
3220   # and add multilib dir if necessary.
3221   lt_tmp_lt_search_path_spec=
3222   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3223   for lt_sys_path in $lt_search_path_spec; do
3224     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3225       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3226     else
3227       test -d "$lt_sys_path" && \
3228         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3229     fi
3230   done
3231   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3232 BEGIN {RS=" "; FS="/|\n";} {
3233   lt_foo="";
3234   lt_count=0;
3235   for (lt_i = NF; lt_i > 0; lt_i--) {
3236     if ($lt_i != "" && $lt_i != ".") {
3237       if ($lt_i == "..") {
3238         lt_count++;
3239       } else {
3240         if (lt_count == 0) {
3241           lt_foo="/" $lt_i lt_foo;
3242         } else {
3243           lt_count--;
3244         }
3245       }
3246     }
3247   }
3248   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3249   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3250 }'`
3251   # AWK program above erroneously prepends '/' to C:/dos/paths
3252   # for these hosts.
3253   case $host_os in
3254     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3255       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3256   esac
3257   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3258 else
3259   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3260 fi])
3261 library_names_spec=
3262 libname_spec='lib$name'
3263 soname_spec=
3264 shrext_cmds=".so"
3265 postinstall_cmds=
3266 postuninstall_cmds=
3267 finish_cmds=
3268 finish_eval=
3269 shlibpath_var=
3270 shlibpath_overrides_runpath=unknown
3271 version_type=none
3272 dynamic_linker="$host_os ld.so"
3273 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3274 need_lib_prefix=unknown
3275 hardcode_into_libs=no
3276
3277 # when you set need_version to no, make sure it does not cause -set_version
3278 # flags to be left without arguments
3279 need_version=unknown
3280
3281 case $host_os in
3282 aix3*)
3283   version_type=linux # correct to gnu/linux during the next big refactor
3284   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3285   shlibpath_var=LIBPATH
3286
3287   # AIX 3 has no versioning support, so we append a major version to the name.
3288   soname_spec='${libname}${release}${shared_ext}$major'
3289   ;;
3290
3291 aix[[4-9]]*)
3292   version_type=linux # correct to gnu/linux during the next big refactor
3293   need_lib_prefix=no
3294   need_version=no
3295   hardcode_into_libs=yes
3296   if test "$host_cpu" = ia64; then
3297     # AIX 5 supports IA64
3298     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3299     shlibpath_var=LD_LIBRARY_PATH
3300   else
3301     # With GCC up to 2.95.x, collect2 would create an import file
3302     # for dependence libraries.  The import file would start with
3303     # the line `#! .'.  This would cause the generated library to
3304     # depend on `.', always an invalid library.  This was fixed in
3305     # development snapshots of GCC prior to 3.0.
3306     case $host_os in
3307       aix4 | aix4.[[01]] | aix4.[[01]].*)
3308       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3309            echo ' yes '
3310            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3311         :
3312       else
3313         can_build_shared=no
3314       fi
3315       ;;
3316     esac
3317     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3318     # soname into executable. Probably we can add versioning support to
3319     # collect2, so additional links can be useful in future.
3320     if test "$aix_use_runtimelinking" = yes; then
3321       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3322       # instead of lib<name>.a to let people know that these are not
3323       # typical AIX shared libraries.
3324       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3325     else
3326       # We preserve .a as extension for shared libraries through AIX4.2
3327       # and later when we are not doing run time linking.
3328       library_names_spec='${libname}${release}.a $libname.a'
3329       soname_spec='${libname}${release}${shared_ext}$major'
3330     fi
3331     shlibpath_var=LIBPATH
3332   fi
3333   ;;
3334
3335 amigaos*)
3336   case $host_cpu in
3337   powerpc)
3338     # Since July 2007 AmigaOS4 officially supports .so libraries.
3339     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3340     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3341     ;;
3342   m68k)
3343     library_names_spec='$libname.ixlibrary $libname.a'
3344     # Create ${libname}_ixlibrary.a entries in /sys/libs.
3345     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
3346     ;;
3347   esac
3348   ;;
3349
3350 beos*)
3351   library_names_spec='${libname}${shared_ext}'
3352   dynamic_linker="$host_os ld.so"
3353   shlibpath_var=LIBRARY_PATH
3354   ;;
3355
3356 bsdi[[45]]*)
3357   version_type=linux # correct to gnu/linux during the next big refactor
3358   need_version=no
3359   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3360   soname_spec='${libname}${release}${shared_ext}$major'
3361   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3362   shlibpath_var=LD_LIBRARY_PATH
3363   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3364   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3365   # the default ld.so.conf also contains /usr/contrib/lib and
3366   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3367   # libtool to hard-code these into programs
3368   ;;
3369
3370 cygwin* | mingw* | pw32* | cegcc*)
3371   version_type=windows
3372   shrext_cmds=".dll"
3373   need_version=no
3374   need_lib_prefix=no
3375
3376   case $GCC,$cc_basename in
3377   yes,*)
3378     # gcc
3379     library_names_spec='$libname.dll.a'
3380     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3381     postinstall_cmds='base_file=`basename \${file}`~
3382       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3383       dldir=$destdir/`dirname \$dlpath`~
3384       test -d \$dldir || mkdir -p \$dldir~
3385       $install_prog $dir/$dlname \$dldir/$dlname~
3386       chmod a+x \$dldir/$dlname~
3387       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3388         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3389       fi'
3390     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3391       dlpath=$dir/\$dldll~
3392        $RM \$dlpath'
3393     shlibpath_overrides_runpath=yes
3394
3395     case $host_os in
3396     cygwin*)
3397       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3398       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3399 m4_if([$1], [],[
3400       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3401       ;;
3402     mingw* | cegcc*)
3403       # MinGW DLLs use traditional 'lib' prefix
3404       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3405       ;;
3406     pw32*)
3407       # pw32 DLLs use 'pw' prefix rather than 'lib'
3408       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3409       ;;
3410     esac
3411     dynamic_linker='Win32 ld.exe'
3412     ;;
3413
3414   *,cl*)
3415     # Native MSVC
3416     libname_spec='$name'
3417     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3418     library_names_spec='${libname}.dll.lib'
3419
3420     case $build_os in
3421     mingw*)
3422       sys_lib_search_path_spec=
3423       lt_save_ifs=$IFS
3424       IFS=';'
3425       for lt_path in $LIB
3426       do
3427         IFS=$lt_save_ifs
3428         # Let DOS variable expansion print the short 8.3 style file name.
3429         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3430         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3431       done
3432       IFS=$lt_save_ifs
3433       # Convert to MSYS style.
3434       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3435       ;;
3436     cygwin*)
3437       # Convert to unix form, then to dos form, then back to unix form
3438       # but this time dos style (no spaces!) so that the unix form looks
3439       # like /cygdrive/c/PROGRA~1:/cygdr...
3440       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3441       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3442       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3443       ;;
3444     *)
3445       sys_lib_search_path_spec="$LIB"
3446       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3447         # It is most probably a Windows format PATH.
3448         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3449       else
3450         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3451       fi
3452       # FIXME: find the short name or the path components, as spaces are
3453       # common. (e.g. "Program Files" -> "PROGRA~1")
3454       ;;
3455     esac
3456
3457     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3458     postinstall_cmds='base_file=`basename \${file}`~
3459       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3460       dldir=$destdir/`dirname \$dlpath`~
3461       test -d \$dldir || mkdir -p \$dldir~
3462       $install_prog $dir/$dlname \$dldir/$dlname'
3463     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3464       dlpath=$dir/\$dldll~
3465        $RM \$dlpath'
3466     shlibpath_overrides_runpath=yes
3467     dynamic_linker='Win32 link.exe'
3468     ;;
3469
3470   *)
3471     # Assume MSVC wrapper
3472     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3473     dynamic_linker='Win32 ld.exe'
3474     ;;
3475   esac
3476   # FIXME: first we should search . and the directory the executable is in
3477   shlibpath_var=PATH
3478   ;;
3479
3480 darwin* | rhapsody*)
3481   dynamic_linker="$host_os dyld"
3482   version_type=darwin
3483   need_lib_prefix=no
3484   need_version=no
3485   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3486   soname_spec='${libname}${release}${major}$shared_ext'
3487   shlibpath_overrides_runpath=yes
3488   shlibpath_var=DYLD_LIBRARY_PATH
3489   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3490 m4_if([$1], [],[
3491   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3492   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3493   ;;
3494
3495 dgux*)
3496   version_type=linux # correct to gnu/linux during the next big refactor
3497   need_lib_prefix=no
3498   need_version=no
3499   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3500   soname_spec='${libname}${release}${shared_ext}$major'
3501   shlibpath_var=LD_LIBRARY_PATH
3502   ;;
3503
3504 freebsd* | dragonfly*)
3505   # DragonFly does not have aout.  When/if they implement a new
3506   # versioning mechanism, adjust this.
3507   if test -x /usr/bin/objformat; then
3508     objformat=`/usr/bin/objformat`
3509   else
3510     case $host_os in
3511     freebsd[[23]].*) objformat=aout ;;
3512     *) objformat=elf ;;
3513     esac
3514   fi
3515   version_type=freebsd-$objformat
3516   case $version_type in
3517     freebsd-elf*)
3518       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3519       need_version=no
3520       need_lib_prefix=no
3521       ;;
3522     freebsd-*)
3523       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3524       need_version=yes
3525       ;;
3526   esac
3527   shlibpath_var=LD_LIBRARY_PATH
3528   case $host_os in
3529   freebsd2.*)
3530     shlibpath_overrides_runpath=yes
3531     ;;
3532   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3533     shlibpath_overrides_runpath=yes
3534     hardcode_into_libs=yes
3535     ;;
3536   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3537   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3538     shlibpath_overrides_runpath=no
3539     hardcode_into_libs=yes
3540     ;;
3541   *) # from 4.6 on, and DragonFly
3542     shlibpath_overrides_runpath=yes
3543     hardcode_into_libs=yes
3544     ;;
3545   esac
3546   ;;
3547
3548 haiku*)
3549   version_type=linux # correct to gnu/linux during the next big refactor
3550   need_lib_prefix=no
3551   need_version=no
3552   dynamic_linker="$host_os runtime_loader"
3553   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3554   soname_spec='${libname}${release}${shared_ext}$major'
3555   shlibpath_var=LIBRARY_PATH
3556   shlibpath_overrides_runpath=yes
3557   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3558   hardcode_into_libs=yes
3559   ;;
3560
3561 hpux9* | hpux10* | hpux11*)
3562   # Give a soname corresponding to the major version so that dld.sl refuses to
3563   # link against other versions.
3564   version_type=sunos
3565   need_lib_prefix=no
3566   need_version=no
3567   case $host_cpu in
3568   ia64*)
3569     shrext_cmds='.so'
3570     hardcode_into_libs=yes
3571     dynamic_linker="$host_os dld.so"
3572     shlibpath_var=LD_LIBRARY_PATH
3573     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3574     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3575     soname_spec='${libname}${release}${shared_ext}$major'
3576     if test "X$HPUX_IA64_MODE" = X32; then
3577       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3578     else
3579       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3580     fi
3581     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3582     ;;
3583   hppa*64*)
3584     shrext_cmds='.sl'
3585     hardcode_into_libs=yes
3586     dynamic_linker="$host_os dld.sl"
3587     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3588     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3589     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3590     soname_spec='${libname}${release}${shared_ext}$major'
3591     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3592     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3593     ;;
3594   *)
3595     shrext_cmds='.sl'
3596     dynamic_linker="$host_os dld.sl"
3597     shlibpath_var=SHLIB_PATH
3598     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3599     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3600     soname_spec='${libname}${release}${shared_ext}$major'
3601     ;;
3602   esac
3603   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3604   postinstall_cmds='chmod 555 $lib'
3605   # or fails outright, so override atomically:
3606   install_override_mode=555
3607   ;;
3608
3609 interix[[3-9]]*)
3610   version_type=linux # correct to gnu/linux during the next big refactor
3611   need_lib_prefix=no
3612   need_version=no
3613   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3614   soname_spec='${libname}${release}${shared_ext}$major'
3615   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3616   shlibpath_var=LD_LIBRARY_PATH
3617   shlibpath_overrides_runpath=no
3618   hardcode_into_libs=yes
3619   ;;
3620
3621 irix5* | irix6* | nonstopux*)
3622   case $host_os in
3623     nonstopux*) version_type=nonstopux ;;
3624     *)
3625         if test "$lt_cv_prog_gnu_ld" = yes; then
3626                 version_type=linux # correct to gnu/linux during the next big refactor
3627         else
3628                 version_type=irix
3629         fi ;;
3630   esac
3631   need_lib_prefix=no
3632   need_version=no
3633   soname_spec='${libname}${release}${shared_ext}$major'
3634   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3635   case $host_os in
3636   irix5* | nonstopux*)
3637     libsuff= shlibsuff=
3638     ;;
3639   *)
3640     case $LD in # libtool.m4 will add one of these switches to LD
3641     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3642       libsuff= shlibsuff= libmagic=32-bit;;
3643     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3644       libsuff=32 shlibsuff=N32 libmagic=N32;;
3645     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3646       libsuff=64 shlibsuff=64 libmagic=64-bit;;
3647     *) libsuff= shlibsuff= libmagic=never-match;;
3648     esac
3649     ;;
3650   esac
3651   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3652   shlibpath_overrides_runpath=no
3653   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3654   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3655   hardcode_into_libs=yes
3656   ;;
3657
3658 # No shared lib support for Linux oldld, aout, or coff.
3659 linux*oldld* | linux*aout* | linux*coff*)
3660   dynamic_linker=no
3661   ;;
3662
3663 # This must be glibc/ELF.
3664 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3665   version_type=linux # correct to gnu/linux during the next big refactor
3666   need_lib_prefix=no
3667   need_version=no
3668   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3669   soname_spec='${libname}${release}${shared_ext}$major'
3670   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3671   shlibpath_var=LD_LIBRARY_PATH
3672   shlibpath_overrides_runpath=no
3673
3674   # Some binutils ld are patched to set DT_RUNPATH
3675   AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3676     [lt_cv_shlibpath_overrides_runpath=no
3677     save_LDFLAGS=$LDFLAGS
3678     save_libdir=$libdir
3679     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3680          LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3681     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3682       [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3683          [lt_cv_shlibpath_overrides_runpath=yes])])
3684     LDFLAGS=$save_LDFLAGS
3685     libdir=$save_libdir
3686     ])
3687   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3688
3689   # This implies no fast_install, which is unacceptable.
3690   # Some rework will be needed to allow for fast_install
3691   # before this can be enabled.
3692   hardcode_into_libs=yes
3693
3694   # Append ld.so.conf contents to the search path
3695   if test -f /etc/ld.so.conf; then
3696     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;s/"//g;/^$/d' | tr '\n' ' '`
3697     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3698   fi
3699
3700   # We used to test for /lib/ld.so.1 and disable shared libraries on
3701   # powerpc, because MkLinux only supported shared libraries with the
3702   # GNU dynamic linker.  Since this was broken with cross compilers,
3703   # most powerpc-linux boxes support dynamic linking these days and
3704   # people can always --disable-shared, the test was removed, and we
3705   # assume the GNU/Linux dynamic linker is in use.
3706   dynamic_linker='GNU/Linux ld.so'
3707   ;;
3708
3709 netbsdelf*-gnu)
3710   version_type=linux
3711   need_lib_prefix=no
3712   need_version=no
3713   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3714   soname_spec='${libname}${release}${shared_ext}$major'
3715   shlibpath_var=LD_LIBRARY_PATH
3716   shlibpath_overrides_runpath=no
3717   hardcode_into_libs=yes
3718   dynamic_linker='NetBSD ld.elf_so'
3719   ;;
3720
3721 netbsd*)
3722   version_type=sunos
3723   need_lib_prefix=no
3724   need_version=no
3725   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3726     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3727     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3728     dynamic_linker='NetBSD (a.out) ld.so'
3729   else
3730     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3731     soname_spec='${libname}${release}${shared_ext}$major'
3732     dynamic_linker='NetBSD ld.elf_so'
3733   fi
3734   shlibpath_var=LD_LIBRARY_PATH
3735   shlibpath_overrides_runpath=yes
3736   hardcode_into_libs=yes
3737   ;;
3738
3739 newsos6)
3740   version_type=linux # correct to gnu/linux during the next big refactor
3741   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3742   shlibpath_var=LD_LIBRARY_PATH
3743   shlibpath_overrides_runpath=yes
3744   ;;
3745
3746 *nto* | *qnx*)
3747   version_type=qnx
3748   need_lib_prefix=no
3749   need_version=no
3750   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3751   soname_spec='${libname}${release}${shared_ext}$major'
3752   shlibpath_var=LD_LIBRARY_PATH
3753   shlibpath_overrides_runpath=no
3754   hardcode_into_libs=yes
3755   dynamic_linker='ldqnx.so'
3756   ;;
3757
3758 openbsd*)
3759   version_type=sunos
3760   sys_lib_dlsearch_path_spec="/usr/lib"
3761   need_lib_prefix=no
3762   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3763   case $host_os in
3764     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
3765     *)                          need_version=no  ;;
3766   esac
3767   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3768   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3769   shlibpath_var=LD_LIBRARY_PATH
3770   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3771     case $host_os in
3772       openbsd2.[[89]] | openbsd2.[[89]].*)
3773         shlibpath_overrides_runpath=no
3774         ;;
3775       *)
3776         shlibpath_overrides_runpath=yes
3777         ;;
3778       esac
3779   else
3780     shlibpath_overrides_runpath=yes
3781   fi
3782   ;;
3783
3784 os2*)
3785   libname_spec='$name'
3786   shrext_cmds=".dll"
3787   need_lib_prefix=no
3788   library_names_spec='$libname${shared_ext} $libname.a'
3789   dynamic_linker='OS/2 ld.exe'
3790   shlibpath_var=LIBPATH
3791   ;;
3792
3793 osf3* | osf4* | osf5*)
3794   version_type=osf
3795   need_lib_prefix=no
3796   need_version=no
3797   soname_spec='${libname}${release}${shared_ext}$major'
3798   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3799   shlibpath_var=LD_LIBRARY_PATH
3800   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3801   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3802   ;;
3803
3804 rdos*)
3805   dynamic_linker=no
3806   ;;
3807
3808 solaris*)
3809   version_type=linux # correct to gnu/linux during the next big refactor
3810   need_lib_prefix=no
3811   need_version=no
3812   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3813   soname_spec='${libname}${release}${shared_ext}$major'
3814   shlibpath_var=LD_LIBRARY_PATH
3815   shlibpath_overrides_runpath=yes
3816   hardcode_into_libs=yes
3817   # ldd complains unless libraries are executable
3818   postinstall_cmds='chmod +x $lib'
3819   ;;
3820
3821 sunos4*)
3822   version_type=sunos
3823   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3824   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3825   shlibpath_var=LD_LIBRARY_PATH
3826   shlibpath_overrides_runpath=yes
3827   if test "$with_gnu_ld" = yes; then
3828     need_lib_prefix=no
3829   fi
3830   need_version=yes
3831   ;;
3832
3833 sysv4 | sysv4.3*)
3834   version_type=linux # correct to gnu/linux during the next big refactor
3835   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3836   soname_spec='${libname}${release}${shared_ext}$major'
3837   shlibpath_var=LD_LIBRARY_PATH
3838   case $host_vendor in
3839     sni)
3840       shlibpath_overrides_runpath=no
3841       need_lib_prefix=no
3842       runpath_var=LD_RUN_PATH
3843       ;;
3844     siemens)
3845       need_lib_prefix=no
3846       ;;
3847     motorola)
3848       need_lib_prefix=no
3849       need_version=no
3850       shlibpath_overrides_runpath=no
3851       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3852       ;;
3853   esac
3854   ;;
3855
3856 sysv4*MP*)
3857   if test -d /usr/nec ;then
3858     version_type=linux # correct to gnu/linux during the next big refactor
3859     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3860     soname_spec='$libname${shared_ext}.$major'
3861     shlibpath_var=LD_LIBRARY_PATH
3862   fi
3863   ;;
3864
3865 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3866   version_type=freebsd-elf
3867   need_lib_prefix=no
3868   need_version=no
3869   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3870   soname_spec='${libname}${release}${shared_ext}$major'
3871   shlibpath_var=LD_LIBRARY_PATH
3872   shlibpath_overrides_runpath=yes
3873   hardcode_into_libs=yes
3874   if test "$with_gnu_ld" = yes; then
3875     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3876   else
3877     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3878     case $host_os in
3879       sco3.2v5*)
3880         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3881         ;;
3882     esac
3883   fi
3884   sys_lib_dlsearch_path_spec='/usr/lib'
3885   ;;
3886
3887 tpf*)
3888   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3889   version_type=linux # correct to gnu/linux during the next big refactor
3890   need_lib_prefix=no
3891   need_version=no
3892   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3893   shlibpath_var=LD_LIBRARY_PATH
3894   shlibpath_overrides_runpath=no
3895   hardcode_into_libs=yes
3896   ;;
3897
3898 uts4*)
3899   version_type=linux # correct to gnu/linux during the next big refactor
3900   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3901   soname_spec='${libname}${release}${shared_ext}$major'
3902   shlibpath_var=LD_LIBRARY_PATH
3903   ;;
3904
3905 *)
3906   dynamic_linker=no
3907   ;;
3908 esac
3909 AC_MSG_RESULT([$dynamic_linker])
3910 test "$dynamic_linker" = no && can_build_shared=no
3911
3912 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3913 if test "$GCC" = yes; then
3914   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3915 fi
3916
3917 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3918   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3919 fi
3920 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3921   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3922 fi
3923
3924 _LT_DECL([], [variables_saved_for_relink], [1],
3925     [Variables whose values should be saved in libtool wrapper scripts and
3926     restored at link time])
3927 _LT_DECL([], [need_lib_prefix], [0],
3928     [Do we need the "lib" prefix for modules?])
3929 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3930 _LT_DECL([], [version_type], [0], [Library versioning type])
3931 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3932 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3933 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3934     [Is shlibpath searched before the hard-coded library search path?])
3935 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3936 _LT_DECL([], [library_names_spec], [1],
3937     [[List of archive names.  First name is the real one, the rest are links.
3938     The last name is the one that the linker finds with -lNAME]])
3939 _LT_DECL([], [soname_spec], [1],
3940     [[The coded name of the library, if different from the real name]])
3941 _LT_DECL([], [install_override_mode], [1],
3942     [Permission mode override for installation of shared libraries])
3943 _LT_DECL([], [postinstall_cmds], [2],
3944     [Command to use after installation of a shared archive])
3945 _LT_DECL([], [postuninstall_cmds], [2],
3946     [Command to use after uninstallation of a shared archive])
3947 _LT_DECL([], [finish_cmds], [2],
3948     [Commands used to finish a libtool library installation in a directory])
3949 _LT_DECL([], [finish_eval], [1],
3950     [[As "finish_cmds", except a single script fragment to be evaled but
3951     not shown]])
3952 _LT_DECL([], [hardcode_into_libs], [0],
3953     [Whether we should hardcode library paths into libraries])
3954 _LT_DECL([], [sys_lib_search_path_spec], [2],
3955     [Compile-time system search path for libraries])
3956 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3957     [Run-time system search path for libraries])
3958 ])# _LT_SYS_DYNAMIC_LINKER
3959
3960
3961 # _LT_PATH_TOOL_PREFIX(TOOL)
3962 # --------------------------
3963 # find a file program which can recognize shared library
3964 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3965 [m4_require([_LT_DECL_EGREP])dnl
3966 AC_MSG_CHECKING([for $1])
3967 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3968 [case $MAGIC_CMD in
3969 [[\\/*] |  ?:[\\/]*])
3970   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3971   ;;
3972 *)
3973   lt_save_MAGIC_CMD="$MAGIC_CMD"
3974   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3975 dnl $ac_dummy forces splitting on constant user-supplied paths.
3976 dnl POSIX.2 word splitting is done only on the output of word expansions,
3977 dnl not every word.  This closes a longstanding sh security hole.
3978   ac_dummy="m4_if([$2], , $PATH, [$2])"
3979   for ac_dir in $ac_dummy; do
3980     IFS="$lt_save_ifs"
3981     test -z "$ac_dir" && ac_dir=.
3982     if test -f $ac_dir/$1; then
3983       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3984       if test -n "$file_magic_test_file"; then
3985         case $deplibs_check_method in
3986         "file_magic "*)
3987           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3988           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3989           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3990             $EGREP "$file_magic_regex" > /dev/null; then
3991             :
3992           else
3993             cat <<_LT_EOF 1>&2
3994
3995 *** Warning: the command libtool uses to detect shared libraries,
3996 *** $file_magic_cmd, produces output that libtool cannot recognize.
3997 *** The result is that libtool may fail to recognize shared libraries
3998 *** as such.  This will affect the creation of libtool libraries that
3999 *** depend on shared libraries, but programs linked with such libtool
4000 *** libraries will work regardless of this problem.  Nevertheless, you
4001 *** may want to report the problem to your system manager and/or to
4002 *** bug-libtool@gnu.org
4003
4004 _LT_EOF
4005           fi ;;
4006         esac
4007       fi
4008       break
4009     fi
4010   done
4011   IFS="$lt_save_ifs"
4012   MAGIC_CMD="$lt_save_MAGIC_CMD"
4013   ;;
4014 esac])
4015 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4016 if test -n "$MAGIC_CMD"; then
4017   AC_MSG_RESULT($MAGIC_CMD)
4018 else
4019   AC_MSG_RESULT(no)
4020 fi
4021 _LT_DECL([], [MAGIC_CMD], [0],
4022          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4023 ])# _LT_PATH_TOOL_PREFIX
4024
4025 # Old name:
4026 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4027 dnl aclocal-1.4 backwards compatibility:
4028 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4029
4030
4031 # _LT_PATH_MAGIC
4032 # --------------
4033 # find a file program which can recognize a shared library
4034 m4_defun([_LT_PATH_MAGIC],
4035 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4036 if test -z "$lt_cv_path_MAGIC_CMD"; then
4037   if test -n "$ac_tool_prefix"; then
4038     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4039   else
4040     MAGIC_CMD=:
4041   fi
4042 fi
4043 ])# _LT_PATH_MAGIC
4044
4045
4046 # LT_PATH_LD
4047 # ----------
4048 # find the pathname to the GNU or non-GNU linker
4049 AC_DEFUN([LT_PATH_LD],
4050 [AC_REQUIRE([AC_PROG_CC])dnl
4051 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4052 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4053 m4_require([_LT_DECL_SED])dnl
4054 m4_require([_LT_DECL_EGREP])dnl
4055 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4056
4057 AC_ARG_WITH([gnu-ld],
4058     [AS_HELP_STRING([--with-gnu-ld],
4059         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4060     [test "$withval" = no || with_gnu_ld=yes],
4061     [with_gnu_ld=no])dnl
4062
4063 ac_prog=ld
4064 if test "$GCC" = yes; then
4065   # Check if gcc -print-prog-name=ld gives a path.
4066   AC_MSG_CHECKING([for ld used by $CC])
4067   case $host in
4068   *-*-mingw*)
4069     # gcc leaves a trailing carriage return which upsets mingw
4070     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4071   *)
4072     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4073   esac
4074   case $ac_prog in
4075     # Accept absolute paths.
4076     [[\\/]]* | ?:[[\\/]]*)
4077       re_direlt='/[[^/]][[^/]]*/\.\./'
4078       # Canonicalize the pathname of ld
4079       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4080       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4081         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4082       done
4083       test -z "$LD" && LD="$ac_prog"
4084       ;;
4085   "")
4086     # If it fails, then pretend we aren't using GCC.
4087     ac_prog=ld
4088     ;;
4089   *)
4090     # If it is relative, then search for the first ld in PATH.
4091     with_gnu_ld=unknown
4092     ;;
4093   esac
4094 elif test "$with_gnu_ld" = yes; then
4095   AC_MSG_CHECKING([for GNU ld])
4096 else
4097   AC_MSG_CHECKING([for non-GNU ld])
4098 fi
4099 AC_CACHE_VAL(lt_cv_path_LD,
4100 [if test -z "$LD"; then
4101   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4102   for ac_dir in $PATH; do
4103     IFS="$lt_save_ifs"
4104     test -z "$ac_dir" && ac_dir=.
4105     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4106       lt_cv_path_LD="$ac_dir/$ac_prog"
4107       # Check to see if the program is GNU ld.  I'd rather use --version,
4108       # but apparently some variants of GNU ld only accept -v.
4109       # Break only if it was the GNU/non-GNU ld that we prefer.
4110       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4111       *GNU* | *'with BFD'*)
4112         test "$with_gnu_ld" != no && break
4113         ;;
4114       *)
4115         test "$with_gnu_ld" != yes && break
4116         ;;
4117       esac
4118     fi
4119   done
4120   IFS="$lt_save_ifs"
4121 else
4122   lt_cv_path_LD="$LD" # Let the user override the test with a path.
4123 fi])
4124 LD="$lt_cv_path_LD"
4125 if test -n "$LD"; then
4126   AC_MSG_RESULT($LD)
4127 else
4128   AC_MSG_RESULT(no)
4129 fi
4130 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4131 _LT_PATH_LD_GNU
4132 AC_SUBST([LD])
4133
4134 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4135 ])# LT_PATH_LD
4136
4137 # Old names:
4138 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4139 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4140 dnl aclocal-1.4 backwards compatibility:
4141 dnl AC_DEFUN([AM_PROG_LD], [])
4142 dnl AC_DEFUN([AC_PROG_LD], [])
4143
4144
4145 # _LT_PATH_LD_GNU
4146 #- --------------
4147 m4_defun([_LT_PATH_LD_GNU],
4148 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4149 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4150 case `$LD -v 2>&1 </dev/null` in
4151 *GNU* | *'with BFD'*)
4152   lt_cv_prog_gnu_ld=yes
4153   ;;
4154 *)
4155   lt_cv_prog_gnu_ld=no
4156   ;;
4157 esac])
4158 with_gnu_ld=$lt_cv_prog_gnu_ld
4159 ])# _LT_PATH_LD_GNU
4160
4161
4162 # _LT_CMD_RELOAD
4163 # --------------
4164 # find reload flag for linker
4165 #   -- PORTME Some linkers may need a different reload flag.
4166 m4_defun([_LT_CMD_RELOAD],
4167 [AC_CACHE_CHECK([for $LD option to reload object files],
4168   lt_cv_ld_reload_flag,
4169   [lt_cv_ld_reload_flag='-r'])
4170 reload_flag=$lt_cv_ld_reload_flag
4171 case $reload_flag in
4172 "" | " "*) ;;
4173 *) reload_flag=" $reload_flag" ;;
4174 esac
4175 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4176 case $host_os in
4177   cygwin* | mingw* | pw32* | cegcc*)
4178     if test "$GCC" != yes; then
4179       reload_cmds=false
4180     fi
4181     ;;
4182   darwin*)
4183     if test "$GCC" = yes; then
4184       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4185     else
4186       reload_cmds='$LD$reload_flag -o $output$reload_objs'
4187     fi
4188     ;;
4189 esac
4190 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4191 _LT_TAGDECL([], [reload_cmds], [2])dnl
4192 ])# _LT_CMD_RELOAD
4193
4194
4195 # _LT_CHECK_MAGIC_METHOD
4196 # ----------------------
4197 # how to check for library dependencies
4198 #  -- PORTME fill in with the dynamic library characteristics
4199 m4_defun([_LT_CHECK_MAGIC_METHOD],
4200 [m4_require([_LT_DECL_EGREP])
4201 m4_require([_LT_DECL_OBJDUMP])
4202 AC_CACHE_CHECK([how to recognize dependent libraries],
4203 lt_cv_deplibs_check_method,
4204 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4205 lt_cv_file_magic_test_file=
4206 lt_cv_deplibs_check_method='unknown'
4207 # Need to set the preceding variable on all platforms that support
4208 # interlibrary dependencies.
4209 # 'none' -- dependencies not supported.
4210 # `unknown' -- same as none, but documents that we really don't know.
4211 # 'pass_all' -- all dependencies passed with no checks.
4212 # 'test_compile' -- check by making test program.
4213 # 'file_magic [[regex]]' -- check by looking for files in library path
4214 # which responds to the $file_magic_cmd with a given extended regex.
4215 # If you have `file' or equivalent on your system and you're not sure
4216 # whether `pass_all' will *always* work, you probably want this one.
4217
4218 case $host_os in
4219 aix[[4-9]]*)
4220   lt_cv_deplibs_check_method=pass_all
4221   ;;
4222
4223 beos*)
4224   lt_cv_deplibs_check_method=pass_all
4225   ;;
4226
4227 bsdi[[45]]*)
4228   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4229   lt_cv_file_magic_cmd='/usr/bin/file -L'
4230   lt_cv_file_magic_test_file=/shlib/libc.so
4231   ;;
4232
4233 cygwin*)
4234   # func_win32_libid is a shell function defined in ltmain.sh
4235   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4236   lt_cv_file_magic_cmd='func_win32_libid'
4237   ;;
4238
4239 mingw* | pw32*)
4240   # Base MSYS/MinGW do not provide the 'file' command needed by
4241   # func_win32_libid shell function, so use a weaker test based on 'objdump',
4242   # unless we find 'file', for example because we are cross-compiling.
4243   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4244   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4245     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4246     lt_cv_file_magic_cmd='func_win32_libid'
4247   else
4248     # Keep this pattern in sync with the one in func_win32_libid.
4249     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4250     lt_cv_file_magic_cmd='$OBJDUMP -f'
4251   fi
4252   ;;
4253
4254 cegcc*)
4255   # use the weaker test based on 'objdump'. See mingw*.
4256   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4257   lt_cv_file_magic_cmd='$OBJDUMP -f'
4258   ;;
4259
4260 darwin* | rhapsody*)
4261   lt_cv_deplibs_check_method=pass_all
4262   ;;
4263
4264 freebsd* | dragonfly*)
4265   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4266     case $host_cpu in
4267     i*86 )
4268       # Not sure whether the presence of OpenBSD here was a mistake.
4269       # Let's accept both of them until this is cleared up.
4270       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4271       lt_cv_file_magic_cmd=/usr/bin/file
4272       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4273       ;;
4274     esac
4275   else
4276     lt_cv_deplibs_check_method=pass_all
4277   fi
4278   ;;
4279
4280 haiku*)
4281   lt_cv_deplibs_check_method=pass_all
4282   ;;
4283
4284 hpux10.20* | hpux11*)
4285   lt_cv_file_magic_cmd=/usr/bin/file
4286   case $host_cpu in
4287   ia64*)
4288     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4289     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4290     ;;
4291   hppa*64*)
4292     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
4293     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4294     ;;
4295   *)
4296     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4297     lt_cv_file_magic_test_file=/usr/lib/libc.sl
4298     ;;
4299   esac
4300   ;;
4301
4302 interix[[3-9]]*)
4303   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4304   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4305   ;;
4306
4307 irix5* | irix6* | nonstopux*)
4308   case $LD in
4309   *-32|*"-32 ") libmagic=32-bit;;
4310   *-n32|*"-n32 ") libmagic=N32;;
4311   *-64|*"-64 ") libmagic=64-bit;;
4312   *) libmagic=never-match;;
4313   esac
4314   lt_cv_deplibs_check_method=pass_all
4315   ;;
4316
4317 # This must be glibc/ELF.
4318 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4319   lt_cv_deplibs_check_method=pass_all
4320   ;;
4321
4322 netbsd* | netbsdelf*-gnu)
4323   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4324     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4325   else
4326     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4327   fi
4328   ;;
4329
4330 newos6*)
4331   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4332   lt_cv_file_magic_cmd=/usr/bin/file
4333   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4334   ;;
4335
4336 *nto* | *qnx*)
4337   lt_cv_deplibs_check_method=pass_all
4338   ;;
4339
4340 openbsd*)
4341   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4342     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4343   else
4344     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4345   fi
4346   ;;
4347
4348 osf3* | osf4* | osf5*)
4349   lt_cv_deplibs_check_method=pass_all
4350   ;;
4351
4352 rdos*)
4353   lt_cv_deplibs_check_method=pass_all
4354   ;;
4355
4356 solaris*)
4357   lt_cv_deplibs_check_method=pass_all
4358   ;;
4359
4360 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4361   lt_cv_deplibs_check_method=pass_all
4362   ;;
4363
4364 sysv4 | sysv4.3*)
4365   case $host_vendor in
4366   motorola)
4367     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]]'
4368     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4369     ;;
4370   ncr)
4371     lt_cv_deplibs_check_method=pass_all
4372     ;;
4373   sequent)
4374     lt_cv_file_magic_cmd='/bin/file'
4375     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4376     ;;
4377   sni)
4378     lt_cv_file_magic_cmd='/bin/file'
4379     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4380     lt_cv_file_magic_test_file=/lib/libc.so
4381     ;;
4382   siemens)
4383     lt_cv_deplibs_check_method=pass_all
4384     ;;
4385   pc)
4386     lt_cv_deplibs_check_method=pass_all
4387     ;;
4388   esac
4389   ;;
4390
4391 tpf*)
4392   lt_cv_deplibs_check_method=pass_all
4393   ;;
4394 esac
4395 ])
4396
4397 file_magic_glob=
4398 want_nocaseglob=no
4399 if test "$build" = "$host"; then
4400   case $host_os in
4401   mingw* | pw32*)
4402     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4403       want_nocaseglob=yes
4404     else
4405       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4406     fi
4407     ;;
4408   esac
4409 fi
4410
4411 file_magic_cmd=$lt_cv_file_magic_cmd
4412 deplibs_check_method=$lt_cv_deplibs_check_method
4413 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4414
4415 _LT_DECL([], [deplibs_check_method], [1],
4416     [Method to check whether dependent libraries are shared objects])
4417 _LT_DECL([], [file_magic_cmd], [1],
4418     [Command to use when deplibs_check_method = "file_magic"])
4419 _LT_DECL([], [file_magic_glob], [1],
4420     [How to find potential files when deplibs_check_method = "file_magic"])
4421 _LT_DECL([], [want_nocaseglob], [1],
4422     [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4423 ])# _LT_CHECK_MAGIC_METHOD
4424
4425
4426 # LT_PATH_NM
4427 # ----------
4428 # find the pathname to a BSD- or MS-compatible name lister
4429 AC_DEFUN([LT_PATH_NM],
4430 [AC_REQUIRE([AC_PROG_CC])dnl
4431 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4432 [if test -n "$NM"; then
4433   # Let the user override the test.
4434   lt_cv_path_NM="$NM"
4435 else
4436   lt_nm_to_check="${ac_tool_prefix}nm"
4437   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4438     lt_nm_to_check="$lt_nm_to_check nm"
4439   fi
4440   for lt_tmp_nm in $lt_nm_to_check; do
4441     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4442     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4443       IFS="$lt_save_ifs"
4444       test -z "$ac_dir" && ac_dir=.
4445       tmp_nm="$ac_dir/$lt_tmp_nm"
4446       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4447         # Check to see if the nm accepts a BSD-compat flag.
4448         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4449         #   nm: unknown option "B" ignored
4450         # Tru64's nm complains that /dev/null is an invalid object file
4451         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4452         */dev/null* | *'Invalid file or object type'*)
4453           lt_cv_path_NM="$tmp_nm -B"
4454           break
4455           ;;
4456         *)
4457           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4458           */dev/null*)
4459             lt_cv_path_NM="$tmp_nm -p"
4460             break
4461             ;;
4462           *)
4463             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4464             continue # so that we can try to find one that supports BSD flags
4465             ;;
4466           esac
4467           ;;
4468         esac
4469       fi
4470     done
4471     IFS="$lt_save_ifs"
4472   done
4473   : ${lt_cv_path_NM=no}
4474 fi])
4475 if test "$lt_cv_path_NM" != "no"; then
4476   NM="$lt_cv_path_NM"
4477 else
4478   # Didn't find any BSD compatible name lister, look for dumpbin.
4479   if test -n "$DUMPBIN"; then :
4480     # Let the user override the test.
4481   else
4482     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4483     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4484     *COFF*)
4485       DUMPBIN="$DUMPBIN -symbols"
4486       ;;
4487     *)
4488       DUMPBIN=:
4489       ;;
4490     esac
4491   fi
4492   AC_SUBST([DUMPBIN])
4493   if test "$DUMPBIN" != ":"; then
4494     NM="$DUMPBIN"
4495   fi
4496 fi
4497 test -z "$NM" && NM=nm
4498 AC_SUBST([NM])
4499 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4500
4501 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4502   [lt_cv_nm_interface="BSD nm"
4503   echo "int some_variable = 0;" > conftest.$ac_ext
4504   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4505   (eval "$ac_compile" 2>conftest.err)
4506   cat conftest.err >&AS_MESSAGE_LOG_FD
4507   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4508   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4509   cat conftest.err >&AS_MESSAGE_LOG_FD
4510   (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4511   cat conftest.out >&AS_MESSAGE_LOG_FD
4512   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4513     lt_cv_nm_interface="MS dumpbin"
4514   fi
4515   rm -f conftest*])
4516 ])# LT_PATH_NM
4517
4518 # Old names:
4519 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4520 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4521 dnl aclocal-1.4 backwards compatibility:
4522 dnl AC_DEFUN([AM_PROG_NM], [])
4523 dnl AC_DEFUN([AC_PROG_NM], [])
4524
4525 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4526 # --------------------------------
4527 # how to determine the name of the shared library
4528 # associated with a specific link library.
4529 #  -- PORTME fill in with the dynamic library characteristics
4530 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4531 [m4_require([_LT_DECL_EGREP])
4532 m4_require([_LT_DECL_OBJDUMP])
4533 m4_require([_LT_DECL_DLLTOOL])
4534 AC_CACHE_CHECK([how to associate runtime and link libraries],
4535 lt_cv_sharedlib_from_linklib_cmd,
4536 [lt_cv_sharedlib_from_linklib_cmd='unknown'
4537
4538 case $host_os in
4539 cygwin* | mingw* | pw32* | cegcc*)
4540   # two different shell functions defined in ltmain.sh
4541   # decide which to use based on capabilities of $DLLTOOL
4542   case `$DLLTOOL --help 2>&1` in
4543   *--identify-strict*)
4544     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4545     ;;
4546   *)
4547     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4548     ;;
4549   esac
4550   ;;
4551 *)
4552   # fallback: assume linklib IS sharedlib
4553   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4554   ;;
4555 esac
4556 ])
4557 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4558 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4559
4560 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4561     [Command to associate shared and link libraries])
4562 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4563
4564
4565 # _LT_PATH_MANIFEST_TOOL
4566 # ----------------------
4567 # locate the manifest tool
4568 m4_defun([_LT_PATH_MANIFEST_TOOL],
4569 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4570 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4571 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4572   [lt_cv_path_mainfest_tool=no
4573   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4574   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4575   cat conftest.err >&AS_MESSAGE_LOG_FD
4576   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4577     lt_cv_path_mainfest_tool=yes
4578   fi
4579   rm -f conftest*])
4580 if test "x$lt_cv_path_mainfest_tool" != xyes; then
4581   MANIFEST_TOOL=:
4582 fi
4583 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4584 ])# _LT_PATH_MANIFEST_TOOL
4585
4586
4587 # LT_LIB_M
4588 # --------
4589 # check for math library
4590 AC_DEFUN([LT_LIB_M],
4591 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4592 LIBM=
4593 case $host in
4594 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4595   # These system don't have libm, or don't need it
4596   ;;
4597 *-ncr-sysv4.3*)
4598   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4599   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4600   ;;
4601 *)
4602   AC_CHECK_LIB(m, cos, LIBM="-lm")
4603   ;;
4604 esac
4605 AC_SUBST([LIBM])
4606 ])# LT_LIB_M
4607
4608 # Old name:
4609 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4610 dnl aclocal-1.4 backwards compatibility:
4611 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4612
4613
4614 # _LT_COMPILER_NO_RTTI([TAGNAME])
4615 # -------------------------------
4616 m4_defun([_LT_COMPILER_NO_RTTI],
4617 [m4_require([_LT_TAG_COMPILER])dnl
4618
4619 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4620
4621 if test "$GCC" = yes; then
4622   case $cc_basename in
4623   nvcc*)
4624     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4625   *)
4626     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4627   esac
4628
4629   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4630     lt_cv_prog_compiler_rtti_exceptions,
4631     [-fno-rtti -fno-exceptions], [],
4632     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4633 fi
4634 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4635         [Compiler flag to turn off builtin functions])
4636 ])# _LT_COMPILER_NO_RTTI
4637
4638
4639 # _LT_CMD_GLOBAL_SYMBOLS
4640 # ----------------------
4641 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4642 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4643 AC_REQUIRE([AC_PROG_CC])dnl
4644 AC_REQUIRE([AC_PROG_AWK])dnl
4645 AC_REQUIRE([LT_PATH_NM])dnl
4646 AC_REQUIRE([LT_PATH_LD])dnl
4647 m4_require([_LT_DECL_SED])dnl
4648 m4_require([_LT_DECL_EGREP])dnl
4649 m4_require([_LT_TAG_COMPILER])dnl
4650
4651 # Check for command to grab the raw symbol name followed by C symbol from nm.
4652 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4653 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4654 [
4655 # These are sane defaults that work on at least a few old systems.
4656 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4657
4658 # Character class describing NM global symbol codes.
4659 symcode='[[BCDEGRST]]'
4660
4661 # Regexp to match symbols that can be accessed directly from C.
4662 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4663
4664 # Define system-specific variables.
4665 case $host_os in
4666 aix*)
4667   symcode='[[BCDT]]'
4668   ;;
4669 cygwin* | mingw* | pw32* | cegcc*)
4670   symcode='[[ABCDGISTW]]'
4671   ;;
4672 hpux*)
4673   if test "$host_cpu" = ia64; then
4674     symcode='[[ABCDEGRST]]'
4675   fi
4676   ;;
4677 irix* | nonstopux*)
4678   symcode='[[BCDEGRST]]'
4679   ;;
4680 osf*)
4681   symcode='[[BCDEGQRST]]'
4682   ;;
4683 solaris*)
4684   symcode='[[BDRT]]'
4685   ;;
4686 sco3.2v5*)
4687   symcode='[[DT]]'
4688   ;;
4689 sysv4.2uw2*)
4690   symcode='[[DT]]'
4691   ;;
4692 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4693   symcode='[[ABDT]]'
4694   ;;
4695 sysv4)
4696   symcode='[[DFNSTU]]'
4697   ;;
4698 esac
4699
4700 # If we're using GNU nm, then use its standard symbol codes.
4701 case `$NM -V 2>&1` in
4702 *GNU* | *'with BFD'*)
4703   symcode='[[ABCDGIRSTW]]' ;;
4704 esac
4705
4706 # Transform an extracted symbol line into a proper C declaration.
4707 # Some systems (esp. on ia64) link data and code symbols differently,
4708 # so use this general approach.
4709 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4710
4711 # Transform an extracted symbol line into symbol name and symbol address
4712 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4713 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'"
4714
4715 # Handle CRLF in mingw tool chain
4716 opt_cr=
4717 case $build_os in
4718 mingw*)
4719   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4720   ;;
4721 esac
4722
4723 # Try without a prefix underscore, then with it.
4724 for ac_symprfx in "" "_"; do
4725
4726   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4727   symxfrm="\\1 $ac_symprfx\\2 \\2"
4728
4729   # Write the raw and C identifiers.
4730   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4731     # Fake it for dumpbin and say T for any non-static function
4732     # and D for any global variable.
4733     # Also find C++ and __fastcall symbols from MSVC++,
4734     # which start with @ or ?.
4735     lt_cv_sys_global_symbol_pipe="$AWK ['"\
4736 "     {last_section=section; section=\$ 3};"\
4737 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4738 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4739 "     \$ 0!~/External *\|/{next};"\
4740 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4741 "     {if(hide[section]) next};"\
4742 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4743 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4744 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4745 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4746 "     ' prfx=^$ac_symprfx]"
4747   else
4748     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4749   fi
4750   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4751
4752   # Check to see that the pipe works correctly.
4753   pipe_works=no
4754
4755   rm -f conftest*
4756   cat > conftest.$ac_ext <<_LT_EOF
4757 #ifdef __cplusplus
4758 extern "C" {
4759 #endif
4760 char nm_test_var;
4761 void nm_test_func(void);
4762 void nm_test_func(void){}
4763 #ifdef __cplusplus
4764 }
4765 #endif
4766 int main(){nm_test_var='a';nm_test_func();return(0);}
4767 _LT_EOF
4768
4769   if AC_TRY_EVAL(ac_compile); then
4770     # Now try to grab the symbols.
4771     nlist=conftest.nm
4772     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4773       # Try sorting and uniquifying the output.
4774       if sort "$nlist" | uniq > "$nlist"T; then
4775         mv -f "$nlist"T "$nlist"
4776       else
4777         rm -f "$nlist"T
4778       fi
4779
4780       # Make sure that we snagged all the symbols we need.
4781       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4782         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4783           cat <<_LT_EOF > conftest.$ac_ext
4784 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4785 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4786 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4787    relocations are performed -- see ld's documentation on pseudo-relocs.  */
4788 # define LT@&t@_DLSYM_CONST
4789 #elif defined(__osf__)
4790 /* This system does not cope well with relocations in const data.  */
4791 # define LT@&t@_DLSYM_CONST
4792 #else
4793 # define LT@&t@_DLSYM_CONST const
4794 #endif
4795
4796 #ifdef __cplusplus
4797 extern "C" {
4798 #endif
4799
4800 _LT_EOF
4801           # Now generate the symbol file.
4802           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4803
4804           cat <<_LT_EOF >> conftest.$ac_ext
4805
4806 /* The mapping between symbol names and symbols.  */
4807 LT@&t@_DLSYM_CONST struct {
4808   const char *name;
4809   void       *address;
4810 }
4811 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4812 {
4813   { "@PROGRAM@", (void *) 0 },
4814 _LT_EOF
4815           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4816           cat <<\_LT_EOF >> conftest.$ac_ext
4817   {0, (void *) 0}
4818 };
4819
4820 /* This works around a problem in FreeBSD linker */
4821 #ifdef FREEBSD_WORKAROUND
4822 static const void *lt_preloaded_setup() {
4823   return lt__PROGRAM__LTX_preloaded_symbols;
4824 }
4825 #endif
4826
4827 #ifdef __cplusplus
4828 }
4829 #endif
4830 _LT_EOF
4831           # Now try linking the two files.
4832           mv conftest.$ac_objext conftstm.$ac_objext
4833           lt_globsym_save_LIBS=$LIBS
4834           lt_globsym_save_CFLAGS=$CFLAGS
4835           LIBS="conftstm.$ac_objext"
4836           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4837           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4838             pipe_works=yes
4839           fi
4840           LIBS=$lt_globsym_save_LIBS
4841           CFLAGS=$lt_globsym_save_CFLAGS
4842         else
4843           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4844         fi
4845       else
4846         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4847       fi
4848     else
4849       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4850     fi
4851   else
4852     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4853     cat conftest.$ac_ext >&5
4854   fi
4855   rm -rf conftest* conftst*
4856
4857   # Do not use the global_symbol_pipe unless it works.
4858   if test "$pipe_works" = yes; then
4859     break
4860   else
4861     lt_cv_sys_global_symbol_pipe=
4862   fi
4863 done
4864 ])
4865 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4866   lt_cv_sys_global_symbol_to_cdecl=
4867 fi
4868 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4869   AC_MSG_RESULT(failed)
4870 else
4871   AC_MSG_RESULT(ok)
4872 fi
4873
4874 # Response file support.
4875 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4876   nm_file_list_spec='@'
4877 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4878   nm_file_list_spec='@'
4879 fi
4880
4881 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4882     [Take the output of nm and produce a listing of raw symbols and C names])
4883 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4884     [Transform the output of nm in a proper C declaration])
4885 _LT_DECL([global_symbol_to_c_name_address],
4886     [lt_cv_sys_global_symbol_to_c_name_address], [1],
4887     [Transform the output of nm in a C name address pair])
4888 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4889     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4890     [Transform the output of nm in a C name address pair when lib prefix is needed])
4891 _LT_DECL([], [nm_file_list_spec], [1],
4892     [Specify filename containing input files for $NM])
4893 ]) # _LT_CMD_GLOBAL_SYMBOLS
4894
4895
4896 # _LT_COMPILER_PIC([TAGNAME])
4897 # ---------------------------
4898 m4_defun([_LT_COMPILER_PIC],
4899 [m4_require([_LT_TAG_COMPILER])dnl
4900 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4901 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4902 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4903
4904 m4_if([$1], [CXX], [
4905   # C++ specific cases for pic, static, wl, etc.
4906   if test "$GXX" = yes; then
4907     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4908     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4909
4910     case $host_os in
4911     aix*)
4912       # All AIX code is PIC.
4913       if test "$host_cpu" = ia64; then
4914         # AIX 5 now supports IA64 processor
4915         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4916       fi
4917       ;;
4918
4919     amigaos*)
4920       case $host_cpu in
4921       powerpc)
4922             # see comment about AmigaOS4 .so support
4923             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4924         ;;
4925       m68k)
4926             # FIXME: we need at least 68020 code to build shared libraries, but
4927             # adding the `-m68020' flag to GCC prevents building anything better,
4928             # like `-m68040'.
4929             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4930         ;;
4931       esac
4932       ;;
4933
4934     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4935       # PIC is the default for these OSes.
4936       ;;
4937     mingw* | cygwin* | os2* | pw32* | cegcc*)
4938       # This hack is so that the source file can tell whether it is being
4939       # built for inclusion in a dll (and should export symbols for example).
4940       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4941       # (--disable-auto-import) libraries
4942       m4_if([$1], [GCJ], [],
4943         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4944       ;;
4945     darwin* | rhapsody*)
4946       # PIC is the default on this platform
4947       # Common symbols not allowed in MH_DYLIB files
4948       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4949       ;;
4950     *djgpp*)
4951       # DJGPP does not support shared libraries at all
4952       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4953       ;;
4954     haiku*)
4955       # PIC is the default for Haiku.
4956       # The "-static" flag exists, but is broken.
4957       _LT_TAGVAR(lt_prog_compiler_static, $1)=
4958       ;;
4959     interix[[3-9]]*)
4960       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4961       # Instead, we relocate shared libraries at runtime.
4962       ;;
4963     sysv4*MP*)
4964       if test -d /usr/nec; then
4965         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4966       fi
4967       ;;
4968     hpux*)
4969       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4970       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4971       # sets the default TLS model and affects inlining.
4972       case $host_cpu in
4973       hppa*64*)
4974         ;;
4975       *)
4976         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4977         ;;
4978       esac
4979       ;;
4980     *qnx* | *nto*)
4981       # QNX uses GNU C++, but need to define -shared option too, otherwise
4982       # it will coredump.
4983       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4984       ;;
4985     *)
4986       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4987       ;;
4988     esac
4989   else
4990     case $host_os in
4991       aix[[4-9]]*)
4992         # All AIX code is PIC.
4993         if test "$host_cpu" = ia64; then
4994           # AIX 5 now supports IA64 processor
4995           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4996         else
4997           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4998         fi
4999         ;;
5000       chorus*)
5001         case $cc_basename in
5002         cxch68*)
5003           # Green Hills C++ Compiler
5004           # _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"
5005           ;;
5006         esac
5007         ;;
5008       mingw* | cygwin* | os2* | pw32* | cegcc*)
5009         # This hack is so that the source file can tell whether it is being
5010         # built for inclusion in a dll (and should export symbols for example).
5011         m4_if([$1], [GCJ], [],
5012           [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5013         ;;
5014       dgux*)
5015         case $cc_basename in
5016           ec++*)
5017             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5018             ;;
5019           ghcx*)
5020             # Green Hills C++ Compiler
5021             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5022             ;;
5023           *)
5024             ;;
5025         esac
5026         ;;
5027       freebsd* | dragonfly*)
5028         # FreeBSD uses GNU C++
5029         ;;
5030       hpux9* | hpux10* | hpux11*)
5031         case $cc_basename in
5032           CC*)
5033             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5034             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5035             if test "$host_cpu" != ia64; then
5036               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5037             fi
5038             ;;
5039           aCC*)
5040             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5041             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5042             case $host_cpu in
5043             hppa*64*|ia64*)
5044               # +Z the default
5045               ;;
5046             *)
5047               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5048               ;;
5049             esac
5050             ;;
5051           *)
5052             ;;
5053         esac
5054         ;;
5055       interix*)
5056         # This is c89, which is MS Visual C++ (no shared libs)
5057         # Anyone wants to do a port?
5058         ;;
5059       irix5* | irix6* | nonstopux*)
5060         case $cc_basename in
5061           CC*)
5062             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5063             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5064             # CC pic flag -KPIC is the default.
5065             ;;
5066           *)
5067             ;;
5068         esac
5069         ;;
5070       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5071         case $cc_basename in
5072           KCC*)
5073             # KAI C++ Compiler
5074             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5075             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5076             ;;
5077           ecpc* )
5078             # old Intel C++ for x86_64 which still supported -KPIC.
5079             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5080             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5081             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5082             ;;
5083           icpc* )
5084             # Intel C++, used to be incompatible with GCC.
5085             # ICC 10 doesn't accept -KPIC any more.
5086             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5087             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5088             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5089             ;;
5090           pgCC* | pgcpp*)
5091             # Portland Group C++ compiler
5092             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5093             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5094             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5095             ;;
5096           cxx*)
5097             # Compaq C++
5098             # Make sure the PIC flag is empty.  It appears that all Alpha
5099             # Linux and Compaq Tru64 Unix objects are PIC.
5100             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5101             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5102             ;;
5103           xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5104             # IBM XL 8.0, 9.0 on PPC and BlueGene
5105             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5106             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5107             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5108             ;;
5109           *)
5110             case `$CC -V 2>&1 | sed 5q` in
5111             *Sun\ C*)
5112               # Sun C++ 5.9
5113               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5114               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5115               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5116               ;;
5117             esac
5118             ;;
5119         esac
5120         ;;
5121       lynxos*)
5122         ;;
5123       m88k*)
5124         ;;
5125       mvs*)
5126         case $cc_basename in
5127           cxx*)
5128             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5129             ;;
5130           *)
5131             ;;
5132         esac
5133         ;;
5134       netbsd* | netbsdelf*-gnu)
5135         ;;
5136       *qnx* | *nto*)
5137         # QNX uses GNU C++, but need to define -shared option too, otherwise
5138         # it will coredump.
5139         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5140         ;;
5141       osf3* | osf4* | osf5*)
5142         case $cc_basename in
5143           KCC*)
5144             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5145             ;;
5146           RCC*)
5147             # Rational C++ 2.4.1
5148             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5149             ;;
5150           cxx*)
5151             # Digital/Compaq C++
5152             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5153             # Make sure the PIC flag is empty.  It appears that all Alpha
5154             # Linux and Compaq Tru64 Unix objects are PIC.
5155             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5156             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5157             ;;
5158           *)
5159             ;;
5160         esac
5161         ;;
5162       psos*)
5163         ;;
5164       solaris*)
5165         case $cc_basename in
5166           CC* | sunCC*)
5167             # Sun C++ 4.2, 5.x and Centerline C++
5168             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5169             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5170             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5171             ;;
5172           gcx*)
5173             # Green Hills C++ Compiler
5174             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5175             ;;
5176           *)
5177             ;;
5178         esac
5179         ;;
5180       sunos4*)
5181         case $cc_basename in
5182           CC*)
5183             # Sun C++ 4.x
5184             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5185             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5186             ;;
5187           lcc*)
5188             # Lucid
5189             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5190             ;;
5191           *)
5192             ;;
5193         esac
5194         ;;
5195       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5196         case $cc_basename in
5197           CC*)
5198             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5199             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5200             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5201             ;;
5202         esac
5203         ;;
5204       tandem*)
5205         case $cc_basename in
5206           NCC*)
5207             # NonStop-UX NCC 3.20
5208             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5209             ;;
5210           *)
5211             ;;
5212         esac
5213         ;;
5214       vxworks*)
5215         ;;
5216       *)
5217         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5218         ;;
5219     esac
5220   fi
5221 ],
5222 [
5223   if test "$GCC" = yes; then
5224     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5225     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5226
5227     case $host_os in
5228       aix*)
5229       # All AIX code is PIC.
5230       if test "$host_cpu" = ia64; then
5231         # AIX 5 now supports IA64 processor
5232         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5233       fi
5234       ;;
5235
5236     amigaos*)
5237       case $host_cpu in
5238       powerpc)
5239             # see comment about AmigaOS4 .so support
5240             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5241         ;;
5242       m68k)
5243             # FIXME: we need at least 68020 code to build shared libraries, but
5244             # adding the `-m68020' flag to GCC prevents building anything better,
5245             # like `-m68040'.
5246             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5247         ;;
5248       esac
5249       ;;
5250
5251     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5252       # PIC is the default for these OSes.
5253       ;;
5254
5255     mingw* | cygwin* | pw32* | os2* | cegcc*)
5256       # This hack is so that the source file can tell whether it is being
5257       # built for inclusion in a dll (and should export symbols for example).
5258       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5259       # (--disable-auto-import) libraries
5260       m4_if([$1], [GCJ], [],
5261         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5262       ;;
5263
5264     darwin* | rhapsody*)
5265       # PIC is the default on this platform
5266       # Common symbols not allowed in MH_DYLIB files
5267       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5268       ;;
5269
5270     haiku*)
5271       # PIC is the default for Haiku.
5272       # The "-static" flag exists, but is broken.
5273       _LT_TAGVAR(lt_prog_compiler_static, $1)=
5274       ;;
5275
5276     hpux*)
5277       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5278       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5279       # sets the default TLS model and affects inlining.
5280       case $host_cpu in
5281       hppa*64*)
5282         # +Z the default
5283         ;;
5284       *)
5285         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5286         ;;
5287       esac
5288       ;;
5289
5290     interix[[3-9]]*)
5291       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5292       # Instead, we relocate shared libraries at runtime.
5293       ;;
5294
5295     msdosdjgpp*)
5296       # Just because we use GCC doesn't mean we suddenly get shared libraries
5297       # on systems that don't support them.
5298       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5299       enable_shared=no
5300       ;;
5301
5302     *nto* | *qnx*)
5303       # QNX uses GNU C++, but need to define -shared option too, otherwise
5304       # it will coredump.
5305       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5306       ;;
5307
5308     sysv4*MP*)
5309       if test -d /usr/nec; then
5310         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5311       fi
5312       ;;
5313
5314     *)
5315       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5316       ;;
5317     esac
5318
5319     case $cc_basename in
5320     nvcc*) # Cuda Compiler Driver 2.2
5321       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5322       if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5323         _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5324       fi
5325       ;;
5326     esac
5327   else
5328     # PORTME Check for flag to pass linker flags through the system compiler.
5329     case $host_os in
5330     aix*)
5331       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5332       if test "$host_cpu" = ia64; then
5333         # AIX 5 now supports IA64 processor
5334         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5335       else
5336         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5337       fi
5338       ;;
5339
5340     mingw* | cygwin* | pw32* | os2* | cegcc*)
5341       # This hack is so that the source file can tell whether it is being
5342       # built for inclusion in a dll (and should export symbols for example).
5343       m4_if([$1], [GCJ], [],
5344         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5345       ;;
5346
5347     hpux9* | hpux10* | hpux11*)
5348       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5349       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5350       # not for PA HP-UX.
5351       case $host_cpu in
5352       hppa*64*|ia64*)
5353         # +Z the default
5354         ;;
5355       *)
5356         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5357         ;;
5358       esac
5359       # Is there a better lt_prog_compiler_static that works with the bundled CC?
5360       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5361       ;;
5362
5363     irix5* | irix6* | nonstopux*)
5364       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5365       # PIC (with -KPIC) is the default.
5366       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5367       ;;
5368
5369     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5370       case $cc_basename in
5371       # old Intel for x86_64 which still supported -KPIC.
5372       ecc*)
5373         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5374         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5375         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5376         ;;
5377       # icc used to be incompatible with GCC.
5378       # ICC 10 doesn't accept -KPIC any more.
5379       icc* | ifort*)
5380         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5381         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5382         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5383         ;;
5384       # Lahey Fortran 8.1.
5385       lf95*)
5386         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5387         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5388         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5389         ;;
5390       nagfor*)
5391         # NAG Fortran compiler
5392         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5393         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5394         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5395         ;;
5396       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5397         # Portland Group compilers (*not* the Pentium gcc compiler,
5398         # which looks to be a dead project)
5399         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5400         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5401         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5402         ;;
5403       ccc*)
5404         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5405         # All Alpha code is PIC.
5406         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5407         ;;
5408       xl* | bgxl* | bgf* | mpixl*)
5409         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5410         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5411         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5412         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5413         ;;
5414       *)
5415         case `$CC -V 2>&1 | sed 5q` in
5416         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5417           # Sun Fortran 8.3 passes all unrecognized flags to the linker
5418           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5419           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5420           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5421           ;;
5422         *Sun\ F* | *Sun*Fortran*)
5423           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5424           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5425           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5426           ;;
5427         *Sun\ C*)
5428           # Sun C 5.9
5429           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5430           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5431           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5432           ;;
5433         *Intel*\ [[CF]]*Compiler*)
5434           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5435           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5436           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5437           ;;
5438         *Portland\ Group*)
5439           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5440           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5441           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5442           ;;
5443         esac
5444         ;;
5445       esac
5446       ;;
5447
5448     newsos6)
5449       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5450       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5451       ;;
5452
5453     *nto* | *qnx*)
5454       # QNX uses GNU C++, but need to define -shared option too, otherwise
5455       # it will coredump.
5456       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5457       ;;
5458
5459     osf3* | osf4* | osf5*)
5460       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5461       # All OSF/1 code is PIC.
5462       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5463       ;;
5464
5465     rdos*)
5466       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5467       ;;
5468
5469     solaris*)
5470       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5471       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5472       case $cc_basename in
5473       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5474         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5475       *)
5476         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5477       esac
5478       ;;
5479
5480     sunos4*)
5481       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5482       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5483       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5484       ;;
5485
5486     sysv4 | sysv4.2uw2* | sysv4.3*)
5487       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5488       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5489       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5490       ;;
5491
5492     sysv4*MP*)
5493       if test -d /usr/nec ;then
5494         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5495         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5496       fi
5497       ;;
5498
5499     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5500       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5501       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5502       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5503       ;;
5504
5505     unicos*)
5506       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5507       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5508       ;;
5509
5510     uts4*)
5511       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5512       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5513       ;;
5514
5515     *)
5516       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5517       ;;
5518     esac
5519   fi
5520 ])
5521 case $host_os in
5522   # For platforms which do not support PIC, -DPIC is meaningless:
5523   *djgpp*)
5524     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5525     ;;
5526   *)
5527     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5528     ;;
5529 esac
5530
5531 AC_CACHE_CHECK([for $compiler option to produce PIC],
5532   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5533   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5534 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5535
5536 #
5537 # Check to make sure the PIC flag actually works.
5538 #
5539 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5540   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5541     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5542     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5543     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5544      "" | " "*) ;;
5545      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5546      esac],
5547     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5548      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5549 fi
5550 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5551         [Additional compiler flags for building library objects])
5552
5553 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5554         [How to pass a linker flag through the compiler])
5555 #
5556 # Check to make sure the static flag actually works.
5557 #
5558 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5559 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5560   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5561   $lt_tmp_static_flag,
5562   [],
5563   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5564 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5565         [Compiler flag to prevent dynamic linking])
5566 ])# _LT_COMPILER_PIC
5567
5568
5569 # _LT_LINKER_SHLIBS([TAGNAME])
5570 # ----------------------------
5571 # See if the linker supports building shared libraries.
5572 m4_defun([_LT_LINKER_SHLIBS],
5573 [AC_REQUIRE([LT_PATH_LD])dnl
5574 AC_REQUIRE([LT_PATH_NM])dnl
5575 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5576 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5577 m4_require([_LT_DECL_EGREP])dnl
5578 m4_require([_LT_DECL_SED])dnl
5579 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5580 m4_require([_LT_TAG_COMPILER])dnl
5581 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5582 m4_if([$1], [CXX], [
5583   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5584   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5585   case $host_os in
5586   aix[[4-9]]*)
5587     # If we're using GNU nm, then we don't want the "-C" option.
5588     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5589     # Also, AIX nm treats weak defined symbols like other global defined
5590     # symbols, whereas GNU nm marks them as "W".
5591     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5592       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5593     else
5594       _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'
5595     fi
5596     ;;
5597   pw32*)
5598     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5599     ;;
5600   cygwin* | mingw* | cegcc*)
5601     case $cc_basename in
5602     cl*)
5603       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5604       ;;
5605     *)
5606       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5607       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5608       ;;
5609     esac
5610     ;;
5611   linux* | k*bsd*-gnu | gnu*)
5612     _LT_TAGVAR(link_all_deplibs, $1)=no
5613     ;;
5614   *)
5615     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5616     ;;
5617   esac
5618 ], [
5619   runpath_var=
5620   _LT_TAGVAR(allow_undefined_flag, $1)=
5621   _LT_TAGVAR(always_export_symbols, $1)=no
5622   _LT_TAGVAR(archive_cmds, $1)=
5623   _LT_TAGVAR(archive_expsym_cmds, $1)=
5624   _LT_TAGVAR(compiler_needs_object, $1)=no
5625   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5626   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5627   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5628   _LT_TAGVAR(hardcode_automatic, $1)=no
5629   _LT_TAGVAR(hardcode_direct, $1)=no
5630   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5631   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5632   _LT_TAGVAR(hardcode_libdir_separator, $1)=
5633   _LT_TAGVAR(hardcode_minus_L, $1)=no
5634   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5635   _LT_TAGVAR(inherit_rpath, $1)=no
5636   _LT_TAGVAR(link_all_deplibs, $1)=unknown
5637   _LT_TAGVAR(module_cmds, $1)=
5638   _LT_TAGVAR(module_expsym_cmds, $1)=
5639   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5640   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5641   _LT_TAGVAR(thread_safe_flag_spec, $1)=
5642   _LT_TAGVAR(whole_archive_flag_spec, $1)=
5643   # include_expsyms should be a list of space-separated symbols to be *always*
5644   # included in the symbol list
5645   _LT_TAGVAR(include_expsyms, $1)=
5646   # exclude_expsyms can be an extended regexp of symbols to exclude
5647   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5648   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5649   # as well as any symbol that contains `d'.
5650   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5651   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5652   # platforms (ab)use it in PIC code, but their linkers get confused if
5653   # the symbol is explicitly referenced.  Since portable code cannot
5654   # rely on this symbol name, it's probably fine to never include it in
5655   # preloaded symbol tables.
5656   # Exclude shared library initialization/finalization symbols.
5657 dnl Note also adjust exclude_expsyms for C++ above.
5658   extract_expsyms_cmds=
5659
5660   case $host_os in
5661   cygwin* | mingw* | pw32* | cegcc*)
5662     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5663     # When not using gcc, we currently assume that we are using
5664     # Microsoft Visual C++.
5665     if test "$GCC" != yes; then
5666       with_gnu_ld=no
5667     fi
5668     ;;
5669   interix*)
5670     # we just hope/assume this is gcc and not c89 (= MSVC++)
5671     with_gnu_ld=yes
5672     ;;
5673   openbsd*)
5674     with_gnu_ld=no
5675     ;;
5676   linux* | k*bsd*-gnu | gnu*)
5677     _LT_TAGVAR(link_all_deplibs, $1)=no
5678     ;;
5679   esac
5680
5681   _LT_TAGVAR(ld_shlibs, $1)=yes
5682
5683   # On some targets, GNU ld is compatible enough with the native linker
5684   # that we're better off using the native interface for both.
5685   lt_use_gnu_ld_interface=no
5686   if test "$with_gnu_ld" = yes; then
5687     case $host_os in
5688       aix*)
5689         # The AIX port of GNU ld has always aspired to compatibility
5690         # with the native linker.  However, as the warning in the GNU ld
5691         # block says, versions before 2.19.5* couldn't really create working
5692         # shared libraries, regardless of the interface used.
5693         case `$LD -v 2>&1` in
5694           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5695           *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5696           *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5697           *)
5698             lt_use_gnu_ld_interface=yes
5699             ;;
5700         esac
5701         ;;
5702       *)
5703         lt_use_gnu_ld_interface=yes
5704         ;;
5705     esac
5706   fi
5707
5708   if test "$lt_use_gnu_ld_interface" = yes; then
5709     # If archive_cmds runs LD, not CC, wlarc should be empty
5710     wlarc='${wl}'
5711
5712     # Set some defaults for GNU ld with shared library support. These
5713     # are reset later if shared libraries are not supported. Putting them
5714     # here allows them to be overridden if necessary.
5715     runpath_var=LD_RUN_PATH
5716     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5717     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5718     # ancient GNU ld didn't support --whole-archive et. al.
5719     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5720       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5721     else
5722       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5723     fi
5724     supports_anon_versioning=no
5725     case `$LD -v 2>&1` in
5726       *GNU\ gold*) supports_anon_versioning=yes ;;
5727       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5728       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5729       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5730       *\ 2.11.*) ;; # other 2.11 versions
5731       *) supports_anon_versioning=yes ;;
5732     esac
5733
5734     # See if GNU ld supports shared libraries.
5735     case $host_os in
5736     aix[[3-9]]*)
5737       # On AIX/PPC, the GNU linker is very broken
5738       if test "$host_cpu" != ia64; then
5739         _LT_TAGVAR(ld_shlibs, $1)=no
5740         cat <<_LT_EOF 1>&2
5741
5742 *** Warning: the GNU linker, at least up to release 2.19, is reported
5743 *** to be unable to reliably create shared libraries on AIX.
5744 *** Therefore, libtool is disabling shared libraries support.  If you
5745 *** really care for shared libraries, you may want to install binutils
5746 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5747 *** You will then need to restart the configuration process.
5748
5749 _LT_EOF
5750       fi
5751       ;;
5752
5753     amigaos*)
5754       case $host_cpu in
5755       powerpc)
5756             # see comment about AmigaOS4 .so support
5757             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5758             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5759         ;;
5760       m68k)
5761             _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)'
5762             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5763             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5764         ;;
5765       esac
5766       ;;
5767
5768     beos*)
5769       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5770         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5771         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5772         # support --undefined.  This deserves some investigation.  FIXME
5773         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5774       else
5775         _LT_TAGVAR(ld_shlibs, $1)=no
5776       fi
5777       ;;
5778
5779     cygwin* | mingw* | pw32* | cegcc*)
5780       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5781       # as there is no search path for DLLs.
5782       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5783       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5784       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5785       _LT_TAGVAR(always_export_symbols, $1)=no
5786       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5787       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5788       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5789
5790       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5791         _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'
5792         # If the export-symbols file already is a .def file (1st line
5793         # is EXPORTS), use it as is; otherwise, prepend...
5794         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5795           cp $export_symbols $output_objdir/$soname.def;
5796         else
5797           echo EXPORTS > $output_objdir/$soname.def;
5798           cat $export_symbols >> $output_objdir/$soname.def;
5799         fi~
5800         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5801       else
5802         _LT_TAGVAR(ld_shlibs, $1)=no
5803       fi
5804       ;;
5805
5806     haiku*)
5807       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5808       _LT_TAGVAR(link_all_deplibs, $1)=yes
5809       ;;
5810
5811     interix[[3-9]]*)
5812       _LT_TAGVAR(hardcode_direct, $1)=no
5813       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5814       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5815       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5816       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5817       # Instead, shared libraries are loaded at an image base (0x10000000 by
5818       # default) and relocated if they conflict, which is a slow very memory
5819       # consuming and fragmenting process.  To avoid this, we pick a random,
5820       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5821       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5822       _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'
5823       _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'
5824       ;;
5825
5826     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5827       tmp_diet=no
5828       if test "$host_os" = linux-dietlibc; then
5829         case $cc_basename in
5830           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
5831         esac
5832       fi
5833       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5834          && test "$tmp_diet" = no
5835       then
5836         tmp_addflag=' $pic_flag'
5837         tmp_sharedflag='-shared'
5838         case $cc_basename,$host_cpu in
5839         pgcc*)                          # Portland Group C compiler
5840           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5841           tmp_addflag=' $pic_flag'
5842           ;;
5843         pgf77* | pgf90* | pgf95* | pgfortran*)
5844                                         # Portland Group f77 and f90 compilers
5845           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5846           tmp_addflag=' $pic_flag -Mnomain' ;;
5847         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
5848           tmp_addflag=' -i_dynamic' ;;
5849         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
5850           tmp_addflag=' -i_dynamic -nofor_main' ;;
5851         ifc* | ifort*)                  # Intel Fortran compiler
5852           tmp_addflag=' -nofor_main' ;;
5853         lf95*)                          # Lahey Fortran 8.1
5854           _LT_TAGVAR(whole_archive_flag_spec, $1)=
5855           tmp_sharedflag='--shared' ;;
5856         xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5857           tmp_sharedflag='-qmkshrobj'
5858           tmp_addflag= ;;
5859         nvcc*)  # Cuda Compiler Driver 2.2
5860           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5861           _LT_TAGVAR(compiler_needs_object, $1)=yes
5862           ;;
5863         esac
5864         case `$CC -V 2>&1 | sed 5q` in
5865         *Sun\ C*)                       # Sun C 5.9
5866           _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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5867           _LT_TAGVAR(compiler_needs_object, $1)=yes
5868           tmp_sharedflag='-G' ;;
5869         *Sun\ F*)                       # Sun Fortran 8.3
5870           tmp_sharedflag='-G' ;;
5871         esac
5872         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5873
5874         if test "x$supports_anon_versioning" = xyes; then
5875           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5876             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5877             echo "local: *; };" >> $output_objdir/$libname.ver~
5878             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5879         fi
5880
5881         case $cc_basename in
5882         xlf* | bgf* | bgxlf* | mpixlf*)
5883           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5884           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5885           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5886           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5887           if test "x$supports_anon_versioning" = xyes; then
5888             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5889               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5890               echo "local: *; };" >> $output_objdir/$libname.ver~
5891               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5892           fi
5893           ;;
5894         esac
5895       else
5896         _LT_TAGVAR(ld_shlibs, $1)=no
5897       fi
5898       ;;
5899
5900     netbsd* | netbsdelf*-gnu)
5901       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5902         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5903         wlarc=
5904       else
5905         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5906         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5907       fi
5908       ;;
5909
5910     solaris*)
5911       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5912         _LT_TAGVAR(ld_shlibs, $1)=no
5913         cat <<_LT_EOF 1>&2
5914
5915 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5916 *** create shared libraries on Solaris systems.  Therefore, libtool
5917 *** is disabling shared libraries support.  We urge you to upgrade GNU
5918 *** binutils to release 2.9.1 or newer.  Another option is to modify
5919 *** your PATH or compiler configuration so that the native linker is
5920 *** used, and then restart.
5921
5922 _LT_EOF
5923       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5924         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5925         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5926       else
5927         _LT_TAGVAR(ld_shlibs, $1)=no
5928       fi
5929       ;;
5930
5931     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5932       case `$LD -v 2>&1` in
5933         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5934         _LT_TAGVAR(ld_shlibs, $1)=no
5935         cat <<_LT_EOF 1>&2
5936
5937 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5938 *** reliably create shared libraries on SCO systems.  Therefore, libtool
5939 *** is disabling shared libraries support.  We urge you to upgrade GNU
5940 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5941 *** your PATH or compiler configuration so that the native linker is
5942 *** used, and then restart.
5943
5944 _LT_EOF
5945         ;;
5946         *)
5947           # For security reasons, it is highly recommended that you always
5948           # use absolute paths for naming shared libraries, and exclude the
5949           # DT_RUNPATH tag from executables and libraries.  But doing so
5950           # requires that you compile everything twice, which is a pain.
5951           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5952             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5953             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5954             _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'
5955           else
5956             _LT_TAGVAR(ld_shlibs, $1)=no
5957           fi
5958         ;;
5959       esac
5960       ;;
5961
5962     sunos4*)
5963       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5964       wlarc=
5965       _LT_TAGVAR(hardcode_direct, $1)=yes
5966       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5967       ;;
5968
5969     *)
5970       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5971         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5972         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5973       else
5974         _LT_TAGVAR(ld_shlibs, $1)=no
5975       fi
5976       ;;
5977     esac
5978
5979     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5980       runpath_var=
5981       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5982       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5983       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5984     fi
5985   else
5986     # PORTME fill in a description of your system's linker (not GNU ld)
5987     case $host_os in
5988     aix3*)
5989       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5990       _LT_TAGVAR(always_export_symbols, $1)=yes
5991       _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'
5992       # Note: this linker hardcodes the directories in LIBPATH if there
5993       # are no directories specified by -L.
5994       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5995       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5996         # Neither direct hardcoding nor static linking is supported with a
5997         # broken collect2.
5998         _LT_TAGVAR(hardcode_direct, $1)=unsupported
5999       fi
6000       ;;
6001
6002     aix[[4-9]]*)
6003       if test "$host_cpu" = ia64; then
6004         # On IA64, the linker does run time linking by default, so we don't
6005         # have to do anything special.
6006         aix_use_runtimelinking=no
6007         exp_sym_flag='-Bexport'
6008         no_entry_flag=""
6009       else
6010         # If we're using GNU nm, then we don't want the "-C" option.
6011         # -C means demangle to AIX nm, but means don't demangle with GNU nm
6012         # Also, AIX nm treats weak defined symbols like other global
6013         # defined symbols, whereas GNU nm marks them as "W".
6014         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6015           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6016         else
6017           _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'
6018         fi
6019         aix_use_runtimelinking=no
6020
6021         # Test if we are trying to use run time linking or normal
6022         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6023         # need to do runtime linking.
6024         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6025           for ld_flag in $LDFLAGS; do
6026           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6027             aix_use_runtimelinking=yes
6028             break
6029           fi
6030           done
6031           ;;
6032         esac
6033
6034         exp_sym_flag='-bexport'
6035         no_entry_flag='-bnoentry'
6036       fi
6037
6038       # When large executables or shared objects are built, AIX ld can
6039       # have problems creating the table of contents.  If linking a library
6040       # or program results in "error TOC overflow" add -mminimal-toc to
6041       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6042       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6043
6044       _LT_TAGVAR(archive_cmds, $1)=''
6045       _LT_TAGVAR(hardcode_direct, $1)=yes
6046       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6047       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6048       _LT_TAGVAR(link_all_deplibs, $1)=yes
6049       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6050
6051       if test "$GCC" = yes; then
6052         case $host_os in aix4.[[012]]|aix4.[[012]].*)
6053         # We only want to do this on AIX 4.2 and lower, the check
6054         # below for broken collect2 doesn't work under 4.3+
6055           collect2name=`${CC} -print-prog-name=collect2`
6056           if test -f "$collect2name" &&
6057            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6058           then
6059           # We have reworked collect2
6060           :
6061           else
6062           # We have old collect2
6063           _LT_TAGVAR(hardcode_direct, $1)=unsupported
6064           # It fails to find uninstalled libraries when the uninstalled
6065           # path is not listed in the libpath.  Setting hardcode_minus_L
6066           # to unsupported forces relinking
6067           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6068           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6069           _LT_TAGVAR(hardcode_libdir_separator, $1)=
6070           fi
6071           ;;
6072         esac
6073         shared_flag='-shared'
6074         if test "$aix_use_runtimelinking" = yes; then
6075           shared_flag="$shared_flag "'${wl}-G'
6076         fi
6077         _LT_TAGVAR(link_all_deplibs, $1)=no
6078       else
6079         # not using gcc
6080         if test "$host_cpu" = ia64; then
6081         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6082         # chokes on -Wl,-G. The following line is correct:
6083           shared_flag='-G'
6084         else
6085           if test "$aix_use_runtimelinking" = yes; then
6086             shared_flag='${wl}-G'
6087           else
6088             shared_flag='${wl}-bM:SRE'
6089           fi
6090         fi
6091       fi
6092
6093       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6094       # It seems that -bexpall does not export symbols beginning with
6095       # underscore (_), so it is better to generate a list of symbols to export.
6096       _LT_TAGVAR(always_export_symbols, $1)=yes
6097       if test "$aix_use_runtimelinking" = yes; then
6098         # Warning - without using the other runtime loading flags (-brtl),
6099         # -berok will link without error, but may produce a broken library.
6100         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6101         # Determine the default libpath from the value encoded in an
6102         # empty executable.
6103         _LT_SYS_MODULE_PATH_AIX([$1])
6104         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6105         _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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6106       else
6107         if test "$host_cpu" = ia64; then
6108           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6109           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6110           _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"
6111         else
6112          # Determine the default libpath from the value encoded in an
6113          # empty executable.
6114          _LT_SYS_MODULE_PATH_AIX([$1])
6115          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6116           # Warning - without using the other run time loading flags,
6117           # -berok will link without error, but may produce a broken library.
6118           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6119           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6120           if test "$with_gnu_ld" = yes; then
6121             # We only use this code for GNU lds that support --whole-archive.
6122             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6123           else
6124             # Exported symbols can be pulled into shared objects from archives
6125             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6126           fi
6127           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6128           # This is similar to how AIX traditionally builds its shared libraries.
6129           _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'
6130         fi
6131       fi
6132       ;;
6133
6134     amigaos*)
6135       case $host_cpu in
6136       powerpc)
6137             # see comment about AmigaOS4 .so support
6138             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6139             _LT_TAGVAR(archive_expsym_cmds, $1)=''
6140         ;;
6141       m68k)
6142             _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)'
6143             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6144             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6145         ;;
6146       esac
6147       ;;
6148
6149     bsdi[[45]]*)
6150       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6151       ;;
6152
6153     cygwin* | mingw* | pw32* | cegcc*)
6154       # When not using gcc, we currently assume that we are using
6155       # Microsoft Visual C++.
6156       # hardcode_libdir_flag_spec is actually meaningless, as there is
6157       # no search path for DLLs.
6158       case $cc_basename in
6159       cl*)
6160         # Native MSVC
6161         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6162         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6163         _LT_TAGVAR(always_export_symbols, $1)=yes
6164         _LT_TAGVAR(file_list_spec, $1)='@'
6165         # Tell ltmain to make .lib files, not .a files.
6166         libext=lib
6167         # Tell ltmain to make .dll files, not .so files.
6168         shrext_cmds=".dll"
6169         # FIXME: Setting linknames here is a bad hack.
6170         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6171         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6172             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6173           else
6174             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6175           fi~
6176           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6177           linknames='
6178         # The linker will not automatically build a static lib if we build a DLL.
6179         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6180         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6181         _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6182         _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'
6183         # Don't use ranlib
6184         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6185         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6186           lt_tool_outputfile="@TOOL_OUTPUT@"~
6187           case $lt_outputfile in
6188             *.exe|*.EXE) ;;
6189             *)
6190               lt_outputfile="$lt_outputfile.exe"
6191               lt_tool_outputfile="$lt_tool_outputfile.exe"
6192               ;;
6193           esac~
6194           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6195             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6196             $RM "$lt_outputfile.manifest";
6197           fi'
6198         ;;
6199       *)
6200         # Assume MSVC wrapper
6201         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6202         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6203         # Tell ltmain to make .lib files, not .a files.
6204         libext=lib
6205         # Tell ltmain to make .dll files, not .so files.
6206         shrext_cmds=".dll"
6207         # FIXME: Setting linknames here is a bad hack.
6208         _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6209         # The linker will automatically build a .lib file if we build a DLL.
6210         _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6211         # FIXME: Should let the user specify the lib program.
6212         _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6213         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6214         ;;
6215       esac
6216       ;;
6217
6218     darwin* | rhapsody*)
6219       _LT_DARWIN_LINKER_FEATURES($1)
6220       ;;
6221
6222     dgux*)
6223       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6224       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6225       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6226       ;;
6227
6228     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6229     # support.  Future versions do this automatically, but an explicit c++rt0.o
6230     # does not break anything, and helps significantly (at the cost of a little
6231     # extra space).
6232     freebsd2.2*)
6233       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6234       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6235       _LT_TAGVAR(hardcode_direct, $1)=yes
6236       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6237       ;;
6238
6239     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6240     freebsd2.*)
6241       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6242       _LT_TAGVAR(hardcode_direct, $1)=yes
6243       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6244       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6245       ;;
6246
6247     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6248     freebsd* | dragonfly*)
6249       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6250       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6251       _LT_TAGVAR(hardcode_direct, $1)=yes
6252       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6253       ;;
6254
6255     hpux9*)
6256       if test "$GCC" = yes; then
6257         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6258       else
6259         _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'
6260       fi
6261       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6262       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6263       _LT_TAGVAR(hardcode_direct, $1)=yes
6264
6265       # hardcode_minus_L: Not really in the search PATH,
6266       # but as the default location of the library.
6267       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6268       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6269       ;;
6270
6271     hpux10*)
6272       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6273         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6274       else
6275         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6276       fi
6277       if test "$with_gnu_ld" = no; then
6278         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6279         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6280         _LT_TAGVAR(hardcode_direct, $1)=yes
6281         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6282         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6283         # hardcode_minus_L: Not really in the search PATH,
6284         # but as the default location of the library.
6285         _LT_TAGVAR(hardcode_minus_L, $1)=yes
6286       fi
6287       ;;
6288
6289     hpux11*)
6290       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6291         case $host_cpu in
6292         hppa*64*)
6293           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6294           ;;
6295         ia64*)
6296           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6297           ;;
6298         *)
6299           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6300           ;;
6301         esac
6302       else
6303         case $host_cpu in
6304         hppa*64*)
6305           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6306           ;;
6307         ia64*)
6308           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6309           ;;
6310         *)
6311         m4_if($1, [], [
6312           # Older versions of the 11.00 compiler do not understand -b yet
6313           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6314           _LT_LINKER_OPTION([if $CC understands -b],
6315             _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6316             [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6317             [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6318           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6319           ;;
6320         esac
6321       fi
6322       if test "$with_gnu_ld" = no; then
6323         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6324         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6325
6326         case $host_cpu in
6327         hppa*64*|ia64*)
6328           _LT_TAGVAR(hardcode_direct, $1)=no
6329           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6330           ;;
6331         *)
6332           _LT_TAGVAR(hardcode_direct, $1)=yes
6333           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6334           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6335
6336           # hardcode_minus_L: Not really in the search PATH,
6337           # but as the default location of the library.
6338           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6339           ;;
6340         esac
6341       fi
6342       ;;
6343
6344     irix5* | irix6* | nonstopux*)
6345       if test "$GCC" = yes; then
6346         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6347         # Try to use the -exported_symbol ld option, if it does not
6348         # work, assume that -exports_file does not work either and
6349         # implicitly export all symbols.
6350         # This should be the same for all languages, so no per-tag cache variable.
6351         AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6352           [lt_cv_irix_exported_symbol],
6353           [save_LDFLAGS="$LDFLAGS"
6354            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6355            AC_LINK_IFELSE(
6356              [AC_LANG_SOURCE(
6357                 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6358                               [C++], [[int foo (void) { return 0; }]],
6359                               [Fortran 77], [[
6360       subroutine foo
6361       end]],
6362                               [Fortran], [[
6363       subroutine foo
6364       end]])])],
6365               [lt_cv_irix_exported_symbol=yes],
6366               [lt_cv_irix_exported_symbol=no])
6367            LDFLAGS="$save_LDFLAGS"])
6368         if test "$lt_cv_irix_exported_symbol" = yes; then
6369           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6370         fi
6371       else
6372         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6373         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6374       fi
6375       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6376       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6377       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6378       _LT_TAGVAR(inherit_rpath, $1)=yes
6379       _LT_TAGVAR(link_all_deplibs, $1)=yes
6380       ;;
6381
6382     netbsd* | netbsdelf*-gnu)
6383       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6384         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6385       else
6386         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6387       fi
6388       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6389       _LT_TAGVAR(hardcode_direct, $1)=yes
6390       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6391       ;;
6392
6393     newsos6)
6394       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6395       _LT_TAGVAR(hardcode_direct, $1)=yes
6396       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6397       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6398       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6399       ;;
6400
6401     *nto* | *qnx*)
6402       ;;
6403
6404     openbsd*)
6405       if test -f /usr/libexec/ld.so; then
6406         _LT_TAGVAR(hardcode_direct, $1)=yes
6407         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6408         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6409         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6410           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6411           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6412           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6413           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6414         else
6415           case $host_os in
6416            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6417              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6418              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6419              ;;
6420            *)
6421              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6422              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6423              ;;
6424           esac
6425         fi
6426       else
6427         _LT_TAGVAR(ld_shlibs, $1)=no
6428       fi
6429       ;;
6430
6431     os2*)
6432       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6433       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6434       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6435       _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'
6436       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6437       ;;
6438
6439     osf3*)
6440       if test "$GCC" = yes; then
6441         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6442         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6443       else
6444         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6445         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6446       fi
6447       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6448       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6449       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6450       ;;
6451
6452     osf4* | osf5*)      # as osf3* with the addition of -msym flag
6453       if test "$GCC" = yes; then
6454         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6455         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6456         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6457       else
6458         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6459         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6460         _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~
6461         $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6462
6463         # Both c and cxx compiler support -rpath directly
6464         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6465       fi
6466       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6467       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6468       ;;
6469
6470     solaris*)
6471       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6472       if test "$GCC" = yes; then
6473         wlarc='${wl}'
6474         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6475         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6476           $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6477       else
6478         case `$CC -V 2>&1` in
6479         *"Compilers 5.0"*)
6480           wlarc=''
6481           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6482           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6483           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6484           ;;
6485         *)
6486           wlarc='${wl}'
6487           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6488           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6489           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6490           ;;
6491         esac
6492       fi
6493       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6494       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6495       case $host_os in
6496       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6497       *)
6498         # The compiler driver will combine and reorder linker options,
6499         # but understands `-z linker_flag'.  GCC discards it without `$wl',
6500         # but is careful enough not to reorder.
6501         # Supported since Solaris 2.6 (maybe 2.5.1?)
6502         if test "$GCC" = yes; then
6503           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6504         else
6505           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6506         fi
6507         ;;
6508       esac
6509       _LT_TAGVAR(link_all_deplibs, $1)=yes
6510       ;;
6511
6512     sunos4*)
6513       if test "x$host_vendor" = xsequent; then
6514         # Use $CC to link under sequent, because it throws in some extra .o
6515         # files that make .init and .fini sections work.
6516         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6517       else
6518         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6519       fi
6520       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6521       _LT_TAGVAR(hardcode_direct, $1)=yes
6522       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6523       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6524       ;;
6525
6526     sysv4)
6527       case $host_vendor in
6528         sni)
6529           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6530           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6531         ;;
6532         siemens)
6533           ## LD is ld it makes a PLAMLIB
6534           ## CC just makes a GrossModule.
6535           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6536           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6537           _LT_TAGVAR(hardcode_direct, $1)=no
6538         ;;
6539         motorola)
6540           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6541           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6542         ;;
6543       esac
6544       runpath_var='LD_RUN_PATH'
6545       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6546       ;;
6547
6548     sysv4.3*)
6549       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6550       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6551       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6552       ;;
6553
6554     sysv4*MP*)
6555       if test -d /usr/nec; then
6556         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6557         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6558         runpath_var=LD_RUN_PATH
6559         hardcode_runpath_var=yes
6560         _LT_TAGVAR(ld_shlibs, $1)=yes
6561       fi
6562       ;;
6563
6564     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6565       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6566       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6567       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6568       runpath_var='LD_RUN_PATH'
6569
6570       if test "$GCC" = yes; then
6571         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6572         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6573       else
6574         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6575         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6576       fi
6577       ;;
6578
6579     sysv5* | sco3.2v5* | sco5v6*)
6580       # Note: We can NOT use -z defs as we might desire, because we do not
6581       # link with -lc, and that would cause any symbols used from libc to
6582       # always be unresolved, which means just about no library would
6583       # ever link correctly.  If we're not using GNU ld we use -z text
6584       # though, which does catch some bad symbols but isn't as heavy-handed
6585       # as -z defs.
6586       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6587       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6588       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6589       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6590       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6591       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6592       _LT_TAGVAR(link_all_deplibs, $1)=yes
6593       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6594       runpath_var='LD_RUN_PATH'
6595
6596       if test "$GCC" = yes; then
6597         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6598         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6599       else
6600         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6601         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6602       fi
6603       ;;
6604
6605     uts4*)
6606       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6607       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6608       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6609       ;;
6610
6611     *)
6612       _LT_TAGVAR(ld_shlibs, $1)=no
6613       ;;
6614     esac
6615
6616     if test x$host_vendor = xsni; then
6617       case $host in
6618       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6619         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6620         ;;
6621       esac
6622     fi
6623   fi
6624 ])
6625 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6626 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6627
6628 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6629
6630 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6631 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6632 _LT_DECL([], [extract_expsyms_cmds], [2],
6633     [The commands to extract the exported symbol list from a shared archive])
6634
6635 #
6636 # Do we need to explicitly link libc?
6637 #
6638 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6639 x|xyes)
6640   # Assume -lc should be added
6641   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6642
6643   if test "$enable_shared" = yes && test "$GCC" = yes; then
6644     case $_LT_TAGVAR(archive_cmds, $1) in
6645     *'~'*)
6646       # FIXME: we may have to deal with multi-command sequences.
6647       ;;
6648     '$CC '*)
6649       # Test whether the compiler implicitly links with -lc since on some
6650       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6651       # to ld, don't add -lc before -lgcc.
6652       AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6653         [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6654         [$RM conftest*
6655         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6656
6657         if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6658           soname=conftest
6659           lib=conftest
6660           libobjs=conftest.$ac_objext
6661           deplibs=
6662           wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6663           pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6664           compiler_flags=-v
6665           linker_flags=-v
6666           verstring=
6667           output_objdir=.
6668           libname=conftest
6669           lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6670           _LT_TAGVAR(allow_undefined_flag, $1)=
6671           if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6672           then
6673             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6674           else
6675             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6676           fi
6677           _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6678         else
6679           cat conftest.err 1>&5
6680         fi
6681         $RM conftest*
6682         ])
6683       _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6684       ;;
6685     esac
6686   fi
6687   ;;
6688 esac
6689
6690 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6691     [Whether or not to add -lc for building shared libraries])
6692 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6693     [enable_shared_with_static_runtimes], [0],
6694     [Whether or not to disallow shared libs when runtime libs are static])
6695 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6696     [Compiler flag to allow reflexive dlopens])
6697 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6698     [Compiler flag to generate shared objects directly from archives])
6699 _LT_TAGDECL([], [compiler_needs_object], [1],
6700     [Whether the compiler copes with passing no objects directly])
6701 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6702     [Create an old-style archive from a shared archive])
6703 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6704     [Create a temporary old-style archive to link instead of a shared archive])
6705 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6706 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6707 _LT_TAGDECL([], [module_cmds], [2],
6708     [Commands used to build a loadable module if different from building
6709     a shared archive.])
6710 _LT_TAGDECL([], [module_expsym_cmds], [2])
6711 _LT_TAGDECL([], [with_gnu_ld], [1],
6712     [Whether we are building with GNU ld or not])
6713 _LT_TAGDECL([], [allow_undefined_flag], [1],
6714     [Flag that allows shared libraries with undefined symbols to be built])
6715 _LT_TAGDECL([], [no_undefined_flag], [1],
6716     [Flag that enforces no undefined symbols])
6717 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6718     [Flag to hardcode $libdir into a binary during linking.
6719     This must work even if $libdir does not exist])
6720 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6721     [Whether we need a single "-rpath" flag with a separated argument])
6722 _LT_TAGDECL([], [hardcode_direct], [0],
6723     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6724     DIR into the resulting binary])
6725 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6726     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6727     DIR into the resulting binary and the resulting library dependency is
6728     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6729     library is relocated])
6730 _LT_TAGDECL([], [hardcode_minus_L], [0],
6731     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6732     into the resulting binary])
6733 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6734     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6735     into the resulting binary])
6736 _LT_TAGDECL([], [hardcode_automatic], [0],
6737     [Set to "yes" if building a shared library automatically hardcodes DIR
6738     into the library and all subsequent libraries and executables linked
6739     against it])
6740 _LT_TAGDECL([], [inherit_rpath], [0],
6741     [Set to yes if linker adds runtime paths of dependent libraries
6742     to runtime path list])
6743 _LT_TAGDECL([], [link_all_deplibs], [0],
6744     [Whether libtool must link a program against all its dependency libraries])
6745 _LT_TAGDECL([], [always_export_symbols], [0],
6746     [Set to "yes" if exported symbols are required])
6747 _LT_TAGDECL([], [export_symbols_cmds], [2],
6748     [The commands to list exported symbols])
6749 _LT_TAGDECL([], [exclude_expsyms], [1],
6750     [Symbols that should not be listed in the preloaded symbols])
6751 _LT_TAGDECL([], [include_expsyms], [1],
6752     [Symbols that must always be exported])
6753 _LT_TAGDECL([], [prelink_cmds], [2],
6754     [Commands necessary for linking programs (against libraries) with templates])
6755 _LT_TAGDECL([], [postlink_cmds], [2],
6756     [Commands necessary for finishing linking programs])
6757 _LT_TAGDECL([], [file_list_spec], [1],
6758     [Specify filename containing input files])
6759 dnl FIXME: Not yet implemented
6760 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6761 dnl    [Compiler flag to generate thread safe objects])
6762 ])# _LT_LINKER_SHLIBS
6763
6764
6765 # _LT_LANG_C_CONFIG([TAG])
6766 # ------------------------
6767 # Ensure that the configuration variables for a C compiler are suitably
6768 # defined.  These variables are subsequently used by _LT_CONFIG to write
6769 # the compiler configuration to `libtool'.
6770 m4_defun([_LT_LANG_C_CONFIG],
6771 [m4_require([_LT_DECL_EGREP])dnl
6772 lt_save_CC="$CC"
6773 AC_LANG_PUSH(C)
6774
6775 # Source file extension for C test sources.
6776 ac_ext=c
6777
6778 # Object file extension for compiled C test sources.
6779 objext=o
6780 _LT_TAGVAR(objext, $1)=$objext
6781
6782 # Code to be used in simple compile tests
6783 lt_simple_compile_test_code="int some_variable = 0;"
6784
6785 # Code to be used in simple link tests
6786 lt_simple_link_test_code='int main(){return(0);}'
6787
6788 _LT_TAG_COMPILER
6789 # Save the default compiler, since it gets overwritten when the other
6790 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6791 compiler_DEFAULT=$CC
6792
6793 # save warnings/boilerplate of simple test code
6794 _LT_COMPILER_BOILERPLATE
6795 _LT_LINKER_BOILERPLATE
6796
6797 if test -n "$compiler"; then
6798   _LT_COMPILER_NO_RTTI($1)
6799   _LT_COMPILER_PIC($1)
6800   _LT_COMPILER_C_O($1)
6801   _LT_COMPILER_FILE_LOCKS($1)
6802   _LT_LINKER_SHLIBS($1)
6803   _LT_SYS_DYNAMIC_LINKER($1)
6804   _LT_LINKER_HARDCODE_LIBPATH($1)
6805   LT_SYS_DLOPEN_SELF
6806   _LT_CMD_STRIPLIB
6807
6808   # Report which library types will actually be built
6809   AC_MSG_CHECKING([if libtool supports shared libraries])
6810   AC_MSG_RESULT([$can_build_shared])
6811
6812   AC_MSG_CHECKING([whether to build shared libraries])
6813   test "$can_build_shared" = "no" && enable_shared=no
6814
6815   # On AIX, shared libraries and static libraries use the same namespace, and
6816   # are all built from PIC.
6817   case $host_os in
6818   aix3*)
6819     test "$enable_shared" = yes && enable_static=no
6820     if test -n "$RANLIB"; then
6821       archive_cmds="$archive_cmds~\$RANLIB \$lib"
6822       postinstall_cmds='$RANLIB $lib'
6823     fi
6824     ;;
6825
6826   aix[[4-9]]*)
6827     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6828       test "$enable_shared" = yes && enable_static=no
6829     fi
6830     ;;
6831   esac
6832   AC_MSG_RESULT([$enable_shared])
6833
6834   AC_MSG_CHECKING([whether to build static libraries])
6835   # Make sure either enable_shared or enable_static is yes.
6836   test "$enable_shared" = yes || enable_static=yes
6837   AC_MSG_RESULT([$enable_static])
6838
6839   _LT_CONFIG($1)
6840 fi
6841 AC_LANG_POP
6842 CC="$lt_save_CC"
6843 ])# _LT_LANG_C_CONFIG
6844
6845
6846 # _LT_LANG_CXX_CONFIG([TAG])
6847 # --------------------------
6848 # Ensure that the configuration variables for a C++ compiler are suitably
6849 # defined.  These variables are subsequently used by _LT_CONFIG to write
6850 # the compiler configuration to `libtool'.
6851 m4_defun([_LT_LANG_CXX_CONFIG],
6852 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6853 m4_require([_LT_DECL_EGREP])dnl
6854 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6855 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6856     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6857     (test "X$CXX" != "Xg++"))) ; then
6858   AC_PROG_CXXCPP
6859 else
6860   _lt_caught_CXX_error=yes
6861 fi
6862
6863 AC_LANG_PUSH(C++)
6864 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6865 _LT_TAGVAR(allow_undefined_flag, $1)=
6866 _LT_TAGVAR(always_export_symbols, $1)=no
6867 _LT_TAGVAR(archive_expsym_cmds, $1)=
6868 _LT_TAGVAR(compiler_needs_object, $1)=no
6869 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6870 _LT_TAGVAR(hardcode_direct, $1)=no
6871 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6872 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6873 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6874 _LT_TAGVAR(hardcode_minus_L, $1)=no
6875 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6876 _LT_TAGVAR(hardcode_automatic, $1)=no
6877 _LT_TAGVAR(inherit_rpath, $1)=no
6878 _LT_TAGVAR(module_cmds, $1)=
6879 _LT_TAGVAR(module_expsym_cmds, $1)=
6880 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6881 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6882 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6883 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6884 _LT_TAGVAR(no_undefined_flag, $1)=
6885 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6886 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6887
6888 # Source file extension for C++ test sources.
6889 ac_ext=cpp
6890
6891 # Object file extension for compiled C++ test sources.
6892 objext=o
6893 _LT_TAGVAR(objext, $1)=$objext
6894
6895 # No sense in running all these tests if we already determined that
6896 # the CXX compiler isn't working.  Some variables (like enable_shared)
6897 # are currently assumed to apply to all compilers on this platform,
6898 # and will be corrupted by setting them based on a non-working compiler.
6899 if test "$_lt_caught_CXX_error" != yes; then
6900   # Code to be used in simple compile tests
6901   lt_simple_compile_test_code="int some_variable = 0;"
6902
6903   # Code to be used in simple link tests
6904   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6905
6906   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6907   _LT_TAG_COMPILER
6908
6909   # save warnings/boilerplate of simple test code
6910   _LT_COMPILER_BOILERPLATE
6911   _LT_LINKER_BOILERPLATE
6912
6913   # Allow CC to be a program name with arguments.
6914   lt_save_CC=$CC
6915   lt_save_CFLAGS=$CFLAGS
6916   lt_save_LD=$LD
6917   lt_save_GCC=$GCC
6918   GCC=$GXX
6919   lt_save_with_gnu_ld=$with_gnu_ld
6920   lt_save_path_LD=$lt_cv_path_LD
6921   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6922     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6923   else
6924     $as_unset lt_cv_prog_gnu_ld
6925   fi
6926   if test -n "${lt_cv_path_LDCXX+set}"; then
6927     lt_cv_path_LD=$lt_cv_path_LDCXX
6928   else
6929     $as_unset lt_cv_path_LD
6930   fi
6931   test -z "${LDCXX+set}" || LD=$LDCXX
6932   CC=${CXX-"c++"}
6933   CFLAGS=$CXXFLAGS
6934   compiler=$CC
6935   _LT_TAGVAR(compiler, $1)=$CC
6936   _LT_CC_BASENAME([$compiler])
6937
6938   if test -n "$compiler"; then
6939     # We don't want -fno-exception when compiling C++ code, so set the
6940     # no_builtin_flag separately
6941     if test "$GXX" = yes; then
6942       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6943     else
6944       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6945     fi
6946
6947     if test "$GXX" = yes; then
6948       # Set up default GNU C++ configuration
6949
6950       LT_PATH_LD
6951
6952       # Check if GNU C++ uses GNU ld as the underlying linker, since the
6953       # archiving commands below assume that GNU ld is being used.
6954       if test "$with_gnu_ld" = yes; then
6955         _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6956         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6957
6958         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6959         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6960
6961         # If archive_cmds runs LD, not CC, wlarc should be empty
6962         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6963         #     investigate it a little bit more. (MM)
6964         wlarc='${wl}'
6965
6966         # ancient GNU ld didn't support --whole-archive et. al.
6967         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6968           $GREP 'no-whole-archive' > /dev/null; then
6969           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6970         else
6971           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6972         fi
6973       else
6974         with_gnu_ld=no
6975         wlarc=
6976
6977         # A generic and very simple default shared library creation
6978         # command for GNU C++ for the case where it uses the native
6979         # linker, instead of GNU ld.  If possible, this setting should
6980         # overridden to take advantage of the native linker features on
6981         # the platform it is being used on.
6982         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6983       fi
6984
6985       # Commands to make compiler produce verbose output that lists
6986       # what "hidden" libraries, object files and flags are used when
6987       # linking a shared library.
6988       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6989
6990     else
6991       GXX=no
6992       with_gnu_ld=no
6993       wlarc=
6994     fi
6995
6996     # PORTME: fill in a description of your system's C++ link characteristics
6997     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6998     _LT_TAGVAR(ld_shlibs, $1)=yes
6999     case $host_os in
7000       aix3*)
7001         # FIXME: insert proper C++ library support
7002         _LT_TAGVAR(ld_shlibs, $1)=no
7003         ;;
7004       aix[[4-9]]*)
7005         if test "$host_cpu" = ia64; then
7006           # On IA64, the linker does run time linking by default, so we don't
7007           # have to do anything special.
7008           aix_use_runtimelinking=no
7009           exp_sym_flag='-Bexport'
7010           no_entry_flag=""
7011         else
7012           aix_use_runtimelinking=no
7013
7014           # Test if we are trying to use run time linking or normal
7015           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7016           # need to do runtime linking.
7017           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7018             for ld_flag in $LDFLAGS; do
7019               case $ld_flag in
7020               *-brtl*)
7021                 aix_use_runtimelinking=yes
7022                 break
7023                 ;;
7024               esac
7025             done
7026             ;;
7027           esac
7028
7029           exp_sym_flag='-bexport'
7030           no_entry_flag='-bnoentry'
7031         fi
7032
7033         # When large executables or shared objects are built, AIX ld can
7034         # have problems creating the table of contents.  If linking a library
7035         # or program results in "error TOC overflow" add -mminimal-toc to
7036         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7037         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7038
7039         _LT_TAGVAR(archive_cmds, $1)=''
7040         _LT_TAGVAR(hardcode_direct, $1)=yes
7041         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7042         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7043         _LT_TAGVAR(link_all_deplibs, $1)=yes
7044         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7045
7046         if test "$GXX" = yes; then
7047           case $host_os in aix4.[[012]]|aix4.[[012]].*)
7048           # We only want to do this on AIX 4.2 and lower, the check
7049           # below for broken collect2 doesn't work under 4.3+
7050           collect2name=`${CC} -print-prog-name=collect2`
7051           if test -f "$collect2name" &&
7052              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7053           then
7054             # We have reworked collect2
7055             :
7056           else
7057             # We have old collect2
7058             _LT_TAGVAR(hardcode_direct, $1)=unsupported
7059             # It fails to find uninstalled libraries when the uninstalled
7060             # path is not listed in the libpath.  Setting hardcode_minus_L
7061             # to unsupported forces relinking
7062             _LT_TAGVAR(hardcode_minus_L, $1)=yes
7063             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7064             _LT_TAGVAR(hardcode_libdir_separator, $1)=
7065           fi
7066           esac
7067           shared_flag='-shared'
7068           if test "$aix_use_runtimelinking" = yes; then
7069             shared_flag="$shared_flag "'${wl}-G'
7070           fi
7071         else
7072           # not using gcc
7073           if test "$host_cpu" = ia64; then
7074           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7075           # chokes on -Wl,-G. The following line is correct:
7076           shared_flag='-G'
7077           else
7078             if test "$aix_use_runtimelinking" = yes; then
7079               shared_flag='${wl}-G'
7080             else
7081               shared_flag='${wl}-bM:SRE'
7082             fi
7083           fi
7084         fi
7085
7086         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7087         # It seems that -bexpall does not export symbols beginning with
7088         # underscore (_), so it is better to generate a list of symbols to
7089         # export.
7090         _LT_TAGVAR(always_export_symbols, $1)=yes
7091         if test "$aix_use_runtimelinking" = yes; then
7092           # Warning - without using the other runtime loading flags (-brtl),
7093           # -berok will link without error, but may produce a broken library.
7094           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7095           # Determine the default libpath from the value encoded in an empty
7096           # executable.
7097           _LT_SYS_MODULE_PATH_AIX([$1])
7098           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7099
7100           _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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7101         else
7102           if test "$host_cpu" = ia64; then
7103             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7104             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7105             _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"
7106           else
7107             # Determine the default libpath from the value encoded in an
7108             # empty executable.
7109             _LT_SYS_MODULE_PATH_AIX([$1])
7110             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7111             # Warning - without using the other run time loading flags,
7112             # -berok will link without error, but may produce a broken library.
7113             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7114             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7115             if test "$with_gnu_ld" = yes; then
7116               # We only use this code for GNU lds that support --whole-archive.
7117               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7118             else
7119               # Exported symbols can be pulled into shared objects from archives
7120               _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7121             fi
7122             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7123             # This is similar to how AIX traditionally builds its shared
7124             # libraries.
7125             _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'
7126           fi
7127         fi
7128         ;;
7129
7130       beos*)
7131         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7132           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7133           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7134           # support --undefined.  This deserves some investigation.  FIXME
7135           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7136         else
7137           _LT_TAGVAR(ld_shlibs, $1)=no
7138         fi
7139         ;;
7140
7141       chorus*)
7142         case $cc_basename in
7143           *)
7144           # FIXME: insert proper C++ library support
7145           _LT_TAGVAR(ld_shlibs, $1)=no
7146           ;;
7147         esac
7148         ;;
7149
7150       cygwin* | mingw* | pw32* | cegcc*)
7151         case $GXX,$cc_basename in
7152         ,cl* | no,cl*)
7153           # Native MSVC
7154           # hardcode_libdir_flag_spec is actually meaningless, as there is
7155           # no search path for DLLs.
7156           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7157           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7158           _LT_TAGVAR(always_export_symbols, $1)=yes
7159           _LT_TAGVAR(file_list_spec, $1)='@'
7160           # Tell ltmain to make .lib files, not .a files.
7161           libext=lib
7162           # Tell ltmain to make .dll files, not .so files.
7163           shrext_cmds=".dll"
7164           # FIXME: Setting linknames here is a bad hack.
7165           _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7166           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7167               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7168             else
7169               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7170             fi~
7171             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7172             linknames='
7173           # The linker will not automatically build a static lib if we build a DLL.
7174           # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7175           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7176           # Don't use ranlib
7177           _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7178           _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7179             lt_tool_outputfile="@TOOL_OUTPUT@"~
7180             case $lt_outputfile in
7181               *.exe|*.EXE) ;;
7182               *)
7183                 lt_outputfile="$lt_outputfile.exe"
7184                 lt_tool_outputfile="$lt_tool_outputfile.exe"
7185                 ;;
7186             esac~
7187             func_to_tool_file "$lt_outputfile"~
7188             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7189               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7190               $RM "$lt_outputfile.manifest";
7191             fi'
7192           ;;
7193         *)
7194           # g++
7195           # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7196           # as there is no search path for DLLs.
7197           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7198           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7199           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7200           _LT_TAGVAR(always_export_symbols, $1)=no
7201           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7202
7203           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7204             _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'
7205             # If the export-symbols file already is a .def file (1st line
7206             # is EXPORTS), use it as is; otherwise, prepend...
7207             _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7208               cp $export_symbols $output_objdir/$soname.def;
7209             else
7210               echo EXPORTS > $output_objdir/$soname.def;
7211               cat $export_symbols >> $output_objdir/$soname.def;
7212             fi~
7213             $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'
7214           else
7215             _LT_TAGVAR(ld_shlibs, $1)=no
7216           fi
7217           ;;
7218         esac
7219         ;;
7220       darwin* | rhapsody*)
7221         _LT_DARWIN_LINKER_FEATURES($1)
7222         ;;
7223
7224       dgux*)
7225         case $cc_basename in
7226           ec++*)
7227             # FIXME: insert proper C++ library support
7228             _LT_TAGVAR(ld_shlibs, $1)=no
7229             ;;
7230           ghcx*)
7231             # Green Hills C++ Compiler
7232             # FIXME: insert proper C++ library support
7233             _LT_TAGVAR(ld_shlibs, $1)=no
7234             ;;
7235           *)
7236             # FIXME: insert proper C++ library support
7237             _LT_TAGVAR(ld_shlibs, $1)=no
7238             ;;
7239         esac
7240         ;;
7241
7242       freebsd2.*)
7243         # C++ shared libraries reported to be fairly broken before
7244         # switch to ELF
7245         _LT_TAGVAR(ld_shlibs, $1)=no
7246         ;;
7247
7248       freebsd-elf*)
7249         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7250         ;;
7251
7252       freebsd* | dragonfly*)
7253         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7254         # conventions
7255         _LT_TAGVAR(ld_shlibs, $1)=yes
7256         ;;
7257
7258       haiku*)
7259         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7260         _LT_TAGVAR(link_all_deplibs, $1)=yes
7261         ;;
7262
7263       hpux9*)
7264         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7265         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7266         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7267         _LT_TAGVAR(hardcode_direct, $1)=yes
7268         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7269                                              # but as the default
7270                                              # location of the library.
7271
7272         case $cc_basename in
7273           CC*)
7274             # FIXME: insert proper C++ library support
7275             _LT_TAGVAR(ld_shlibs, $1)=no
7276             ;;
7277           aCC*)
7278             _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'
7279             # Commands to make compiler produce verbose output that lists
7280             # what "hidden" libraries, object files and flags are used when
7281             # linking a shared library.
7282             #
7283             # There doesn't appear to be a way to prevent this compiler from
7284             # explicitly linking system object files so we need to strip them
7285             # from the output so that they don't get included in the library
7286             # dependencies.
7287             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; func_echo_all "$list"'
7288             ;;
7289           *)
7290             if test "$GXX" = yes; then
7291               _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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'
7292             else
7293               # FIXME: insert proper C++ library support
7294               _LT_TAGVAR(ld_shlibs, $1)=no
7295             fi
7296             ;;
7297         esac
7298         ;;
7299
7300       hpux10*|hpux11*)
7301         if test $with_gnu_ld = no; then
7302           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7303           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7304
7305           case $host_cpu in
7306             hppa*64*|ia64*)
7307               ;;
7308             *)
7309               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7310               ;;
7311           esac
7312         fi
7313         case $host_cpu in
7314           hppa*64*|ia64*)
7315             _LT_TAGVAR(hardcode_direct, $1)=no
7316             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7317             ;;
7318           *)
7319             _LT_TAGVAR(hardcode_direct, $1)=yes
7320             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7321             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7322                                                  # but as the default
7323                                                  # location of the library.
7324             ;;
7325         esac
7326
7327         case $cc_basename in
7328           CC*)
7329             # FIXME: insert proper C++ library support
7330             _LT_TAGVAR(ld_shlibs, $1)=no
7331             ;;
7332           aCC*)
7333             case $host_cpu in
7334               hppa*64*)
7335                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7336                 ;;
7337               ia64*)
7338                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7339                 ;;
7340               *)
7341                 _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'
7342                 ;;
7343             esac
7344             # Commands to make compiler produce verbose output that lists
7345             # what "hidden" libraries, object files and flags are used when
7346             # linking a shared library.
7347             #
7348             # There doesn't appear to be a way to prevent this compiler from
7349             # explicitly linking system object files so we need to strip them
7350             # from the output so that they don't get included in the library
7351             # dependencies.
7352             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; func_echo_all "$list"'
7353             ;;
7354           *)
7355             if test "$GXX" = yes; then
7356               if test $with_gnu_ld = no; then
7357                 case $host_cpu in
7358                   hppa*64*)
7359                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7360                     ;;
7361                   ia64*)
7362                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7363                     ;;
7364                   *)
7365                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7366                     ;;
7367                 esac
7368               fi
7369             else
7370               # FIXME: insert proper C++ library support
7371               _LT_TAGVAR(ld_shlibs, $1)=no
7372             fi
7373             ;;
7374         esac
7375         ;;
7376
7377       interix[[3-9]]*)
7378         _LT_TAGVAR(hardcode_direct, $1)=no
7379         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7380         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7381         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7382         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7383         # Instead, shared libraries are loaded at an image base (0x10000000 by
7384         # default) and relocated if they conflict, which is a slow very memory
7385         # consuming and fragmenting process.  To avoid this, we pick a random,
7386         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7387         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7388         _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'
7389         _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'
7390         ;;
7391       irix5* | irix6*)
7392         case $cc_basename in
7393           CC*)
7394             # SGI C++
7395             _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7396
7397             # Archives containing C++ object files must be created using
7398             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7399             # necessary to make sure instantiated templates are included
7400             # in the archive.
7401             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7402             ;;
7403           *)
7404             if test "$GXX" = yes; then
7405               if test "$with_gnu_ld" = no; then
7406                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7407               else
7408                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
7409               fi
7410             fi
7411             _LT_TAGVAR(link_all_deplibs, $1)=yes
7412             ;;
7413         esac
7414         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7415         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7416         _LT_TAGVAR(inherit_rpath, $1)=yes
7417         ;;
7418
7419       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7420         case $cc_basename in
7421           KCC*)
7422             # Kuck and Associates, Inc. (KAI) C++ Compiler
7423
7424             # KCC will only create a shared library if the output file
7425             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7426             # to its proper name (with version) after linking.
7427             _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'
7428             _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'
7429             # Commands to make compiler produce verbose output that lists
7430             # what "hidden" libraries, object files and flags are used when
7431             # linking a shared library.
7432             #
7433             # There doesn't appear to be a way to prevent this compiler from
7434             # explicitly linking system object files so we need to strip them
7435             # from the output so that they don't get included in the library
7436             # dependencies.
7437             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; func_echo_all "$list"'
7438
7439             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7440             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7441
7442             # Archives containing C++ object files must be created using
7443             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7444             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7445             ;;
7446           icpc* | ecpc* )
7447             # Intel C++
7448             with_gnu_ld=yes
7449             # version 8.0 and above of icpc choke on multiply defined symbols
7450             # if we add $predep_objects and $postdep_objects, however 7.1 and
7451             # earlier do not add the objects themselves.
7452             case `$CC -V 2>&1` in
7453               *"Version 7."*)
7454                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7455                 _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'
7456                 ;;
7457               *)  # Version 8.0 or newer
7458                 tmp_idyn=
7459                 case $host_cpu in
7460                   ia64*) tmp_idyn=' -i_dynamic';;
7461                 esac
7462                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7463                 _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'
7464                 ;;
7465             esac
7466             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7467             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7468             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7469             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7470             ;;
7471           pgCC* | pgcpp*)
7472             # Portland Group C++ compiler
7473             case `$CC -V` in
7474             *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7475               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7476                 rm -rf $tpldir~
7477                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7478                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7479               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7480                 rm -rf $tpldir~
7481                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7482                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7483                 $RANLIB $oldlib'
7484               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7485                 rm -rf $tpldir~
7486                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7487                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7488               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7489                 rm -rf $tpldir~
7490                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7491                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7492               ;;
7493             *) # Version 6 and above use weak symbols
7494               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7495               _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'
7496               ;;
7497             esac
7498
7499             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7500             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7501             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7502             ;;
7503           cxx*)
7504             # Compaq C++
7505             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7506             _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'
7507
7508             runpath_var=LD_RUN_PATH
7509             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7510             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7511
7512             # Commands to make compiler produce verbose output that lists
7513             # what "hidden" libraries, object files and flags are used when
7514             # linking a shared library.
7515             #
7516             # There doesn't appear to be a way to prevent this compiler from
7517             # explicitly linking system object files so we need to strip them
7518             # from the output so that they don't get included in the library
7519             # dependencies.
7520             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
7521             ;;
7522           xl* | mpixl* | bgxl*)
7523             # IBM XL 8.0 on PPC, with GNU ld
7524             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7525             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7526             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7527             if test "x$supports_anon_versioning" = xyes; then
7528               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7529                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7530                 echo "local: *; };" >> $output_objdir/$libname.ver~
7531                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7532             fi
7533             ;;
7534           *)
7535             case `$CC -V 2>&1 | sed 5q` in
7536             *Sun\ C*)
7537               # Sun C++ 5.9
7538               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7539               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7540               _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'
7541               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7542               _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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7543               _LT_TAGVAR(compiler_needs_object, $1)=yes
7544
7545               # Not sure whether something based on
7546               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7547               # would be better.
7548               output_verbose_link_cmd='func_echo_all'
7549
7550               # Archives containing C++ object files must be created using
7551               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7552               # necessary to make sure instantiated templates are included
7553               # in the archive.
7554               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7555               ;;
7556             esac
7557             ;;
7558         esac
7559         ;;
7560
7561       lynxos*)
7562         # FIXME: insert proper C++ library support
7563         _LT_TAGVAR(ld_shlibs, $1)=no
7564         ;;
7565
7566       m88k*)
7567         # FIXME: insert proper C++ library support
7568         _LT_TAGVAR(ld_shlibs, $1)=no
7569         ;;
7570
7571       mvs*)
7572         case $cc_basename in
7573           cxx*)
7574             # FIXME: insert proper C++ library support
7575             _LT_TAGVAR(ld_shlibs, $1)=no
7576             ;;
7577           *)
7578             # FIXME: insert proper C++ library support
7579             _LT_TAGVAR(ld_shlibs, $1)=no
7580             ;;
7581         esac
7582         ;;
7583
7584       netbsd*)
7585         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7586           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7587           wlarc=
7588           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7589           _LT_TAGVAR(hardcode_direct, $1)=yes
7590           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7591         fi
7592         # Workaround some broken pre-1.5 toolchains
7593         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7594         ;;
7595
7596       *nto* | *qnx*)
7597         _LT_TAGVAR(ld_shlibs, $1)=yes
7598         ;;
7599
7600       openbsd2*)
7601         # C++ shared libraries are fairly broken
7602         _LT_TAGVAR(ld_shlibs, $1)=no
7603         ;;
7604
7605       openbsd*)
7606         if test -f /usr/libexec/ld.so; then
7607           _LT_TAGVAR(hardcode_direct, $1)=yes
7608           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7609           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7610           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7611           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7612           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7613             _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'
7614             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7615             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7616           fi
7617           output_verbose_link_cmd=func_echo_all
7618         else
7619           _LT_TAGVAR(ld_shlibs, $1)=no
7620         fi
7621         ;;
7622
7623       osf3* | osf4* | osf5*)
7624         case $cc_basename in
7625           KCC*)
7626             # Kuck and Associates, Inc. (KAI) C++ Compiler
7627
7628             # KCC will only create a shared library if the output file
7629             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7630             # to its proper name (with version) after linking.
7631             _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'
7632
7633             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7634             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7635
7636             # Archives containing C++ object files must be created using
7637             # the KAI C++ compiler.
7638             case $host in
7639               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7640               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7641             esac
7642             ;;
7643           RCC*)
7644             # Rational C++ 2.4.1
7645             # FIXME: insert proper C++ library support
7646             _LT_TAGVAR(ld_shlibs, $1)=no
7647             ;;
7648           cxx*)
7649             case $host in
7650               osf3*)
7651                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7652                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7653                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7654                 ;;
7655               *)
7656                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7657                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7658                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7659                   echo "-hidden">> $lib.exp~
7660                   $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
7661                   $RM $lib.exp'
7662                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7663                 ;;
7664             esac
7665
7666             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7667
7668             # Commands to make compiler produce verbose output that lists
7669             # what "hidden" libraries, object files and flags are used when
7670             # linking a shared library.
7671             #
7672             # There doesn't appear to be a way to prevent this compiler from
7673             # explicitly linking system object files so we need to strip them
7674             # from the output so that they don't get included in the library
7675             # dependencies.
7676             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7677             ;;
7678           *)
7679             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7680               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7681               case $host in
7682                 osf3*)
7683                   _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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7684                   ;;
7685                 *)
7686                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7687                   ;;
7688               esac
7689
7690               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7691               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7692
7693               # Commands to make compiler produce verbose output that lists
7694               # what "hidden" libraries, object files and flags are used when
7695               # linking a shared library.
7696               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7697
7698             else
7699               # FIXME: insert proper C++ library support
7700               _LT_TAGVAR(ld_shlibs, $1)=no
7701             fi
7702             ;;
7703         esac
7704         ;;
7705
7706       psos*)
7707         # FIXME: insert proper C++ library support
7708         _LT_TAGVAR(ld_shlibs, $1)=no
7709         ;;
7710
7711       sunos4*)
7712         case $cc_basename in
7713           CC*)
7714             # Sun C++ 4.x
7715             # FIXME: insert proper C++ library support
7716             _LT_TAGVAR(ld_shlibs, $1)=no
7717             ;;
7718           lcc*)
7719             # Lucid
7720             # FIXME: insert proper C++ library support
7721             _LT_TAGVAR(ld_shlibs, $1)=no
7722             ;;
7723           *)
7724             # FIXME: insert proper C++ library support
7725             _LT_TAGVAR(ld_shlibs, $1)=no
7726             ;;
7727         esac
7728         ;;
7729
7730       solaris*)
7731         case $cc_basename in
7732           CC* | sunCC*)
7733             # Sun C++ 4.2, 5.x and Centerline C++
7734             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7735             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7736             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7737             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7738               $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'
7739
7740             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7741             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7742             case $host_os in
7743               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7744               *)
7745                 # The compiler driver will combine and reorder linker options,
7746                 # but understands `-z linker_flag'.
7747                 # Supported since Solaris 2.6 (maybe 2.5.1?)
7748                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7749                 ;;
7750             esac
7751             _LT_TAGVAR(link_all_deplibs, $1)=yes
7752
7753             output_verbose_link_cmd='func_echo_all'
7754
7755             # Archives containing C++ object files must be created using
7756             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7757             # necessary to make sure instantiated templates are included
7758             # in the archive.
7759             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7760             ;;
7761           gcx*)
7762             # Green Hills C++ Compiler
7763             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7764
7765             # The C++ compiler must be used to create the archive.
7766             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7767             ;;
7768           *)
7769             # GNU C++ compiler with Solaris linker
7770             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7771               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7772               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7773                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7774                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7775                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7776
7777                 # Commands to make compiler produce verbose output that lists
7778                 # what "hidden" libraries, object files and flags are used when
7779                 # linking a shared library.
7780                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7781               else
7782                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7783                 # platform.
7784                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7785                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7786                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7787
7788                 # Commands to make compiler produce verbose output that lists
7789                 # what "hidden" libraries, object files and flags are used when
7790                 # linking a shared library.
7791                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7792               fi
7793
7794               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7795               case $host_os in
7796                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7797                 *)
7798                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7799                   ;;
7800               esac
7801             fi
7802             ;;
7803         esac
7804         ;;
7805
7806     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7807       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7808       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7809       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7810       runpath_var='LD_RUN_PATH'
7811
7812       case $cc_basename in
7813         CC*)
7814           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7815           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7816           ;;
7817         *)
7818           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7819           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7820           ;;
7821       esac
7822       ;;
7823
7824       sysv5* | sco3.2v5* | sco5v6*)
7825         # Note: We can NOT use -z defs as we might desire, because we do not
7826         # link with -lc, and that would cause any symbols used from libc to
7827         # always be unresolved, which means just about no library would
7828         # ever link correctly.  If we're not using GNU ld we use -z text
7829         # though, which does catch some bad symbols but isn't as heavy-handed
7830         # as -z defs.
7831         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7832         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7833         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7834         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7835         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7836         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7837         _LT_TAGVAR(link_all_deplibs, $1)=yes
7838         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7839         runpath_var='LD_RUN_PATH'
7840
7841         case $cc_basename in
7842           CC*)
7843             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7844             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7845             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7846               '"$_LT_TAGVAR(old_archive_cmds, $1)"
7847             _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7848               '"$_LT_TAGVAR(reload_cmds, $1)"
7849             ;;
7850           *)
7851             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7852             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7853             ;;
7854         esac
7855       ;;
7856
7857       tandem*)
7858         case $cc_basename in
7859           NCC*)
7860             # NonStop-UX NCC 3.20
7861             # FIXME: insert proper C++ library support
7862             _LT_TAGVAR(ld_shlibs, $1)=no
7863             ;;
7864           *)
7865             # FIXME: insert proper C++ library support
7866             _LT_TAGVAR(ld_shlibs, $1)=no
7867             ;;
7868         esac
7869         ;;
7870
7871       vxworks*)
7872         # FIXME: insert proper C++ library support
7873         _LT_TAGVAR(ld_shlibs, $1)=no
7874         ;;
7875
7876       *)
7877         # FIXME: insert proper C++ library support
7878         _LT_TAGVAR(ld_shlibs, $1)=no
7879         ;;
7880     esac
7881
7882     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7883     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7884
7885     _LT_TAGVAR(GCC, $1)="$GXX"
7886     _LT_TAGVAR(LD, $1)="$LD"
7887
7888     ## CAVEAT EMPTOR:
7889     ## There is no encapsulation within the following macros, do not change
7890     ## the running order or otherwise move them around unless you know exactly
7891     ## what you are doing...
7892     _LT_SYS_HIDDEN_LIBDEPS($1)
7893     _LT_COMPILER_PIC($1)
7894     _LT_COMPILER_C_O($1)
7895     _LT_COMPILER_FILE_LOCKS($1)
7896     _LT_LINKER_SHLIBS($1)
7897     _LT_SYS_DYNAMIC_LINKER($1)
7898     _LT_LINKER_HARDCODE_LIBPATH($1)
7899
7900     _LT_CONFIG($1)
7901   fi # test -n "$compiler"
7902
7903   CC=$lt_save_CC
7904   CFLAGS=$lt_save_CFLAGS
7905   LDCXX=$LD
7906   LD=$lt_save_LD
7907   GCC=$lt_save_GCC
7908   with_gnu_ld=$lt_save_with_gnu_ld
7909   lt_cv_path_LDCXX=$lt_cv_path_LD
7910   lt_cv_path_LD=$lt_save_path_LD
7911   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7912   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7913 fi # test "$_lt_caught_CXX_error" != yes
7914
7915 AC_LANG_POP
7916 ])# _LT_LANG_CXX_CONFIG
7917
7918
7919 # _LT_FUNC_STRIPNAME_CNF
7920 # ----------------------
7921 # func_stripname_cnf prefix suffix name
7922 # strip PREFIX and SUFFIX off of NAME.
7923 # PREFIX and SUFFIX must not contain globbing or regex special
7924 # characters, hashes, percent signs, but SUFFIX may contain a leading
7925 # dot (in which case that matches only a dot).
7926 #
7927 # This function is identical to the (non-XSI) version of func_stripname,
7928 # except this one can be used by m4 code that may be executed by configure,
7929 # rather than the libtool script.
7930 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7931 AC_REQUIRE([_LT_DECL_SED])
7932 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7933 func_stripname_cnf ()
7934 {
7935   case ${2} in
7936   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7937   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7938   esac
7939 } # func_stripname_cnf
7940 ])# _LT_FUNC_STRIPNAME_CNF
7941
7942 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7943 # ---------------------------------
7944 # Figure out "hidden" library dependencies from verbose
7945 # compiler output when linking a shared library.
7946 # Parse the compiler output and extract the necessary
7947 # objects, libraries and library flags.
7948 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7949 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7950 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7951 # Dependencies to place before and after the object being linked:
7952 _LT_TAGVAR(predep_objects, $1)=
7953 _LT_TAGVAR(postdep_objects, $1)=
7954 _LT_TAGVAR(predeps, $1)=
7955 _LT_TAGVAR(postdeps, $1)=
7956 _LT_TAGVAR(compiler_lib_search_path, $1)=
7957
7958 dnl we can't use the lt_simple_compile_test_code here,
7959 dnl because it contains code intended for an executable,
7960 dnl not a library.  It's possible we should let each
7961 dnl tag define a new lt_????_link_test_code variable,
7962 dnl but it's only used here...
7963 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7964 int a;
7965 void foo (void) { a = 0; }
7966 _LT_EOF
7967 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7968 class Foo
7969 {
7970 public:
7971   Foo (void) { a = 0; }
7972 private:
7973   int a;
7974 };
7975 _LT_EOF
7976 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7977       subroutine foo
7978       implicit none
7979       integer*4 a
7980       a=0
7981       return
7982       end
7983 _LT_EOF
7984 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7985       subroutine foo
7986       implicit none
7987       integer a
7988       a=0
7989       return
7990       end
7991 _LT_EOF
7992 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7993 public class foo {
7994   private int a;
7995   public void bar (void) {
7996     a = 0;
7997   }
7998 };
7999 _LT_EOF
8000 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
8001 package foo
8002 func foo() {
8003 }
8004 _LT_EOF
8005 ])
8006
8007 _lt_libdeps_save_CFLAGS=$CFLAGS
8008 case "$CC $CFLAGS " in #(
8009 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8010 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8011 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
8012 esac
8013
8014 dnl Parse the compiler output and extract the necessary
8015 dnl objects, libraries and library flags.
8016 if AC_TRY_EVAL(ac_compile); then
8017   # Parse the compiler output and extract the necessary
8018   # objects, libraries and library flags.
8019
8020   # Sentinel used to keep track of whether or not we are before
8021   # the conftest object file.
8022   pre_test_object_deps_done=no
8023
8024   for p in `eval "$output_verbose_link_cmd"`; do
8025     case ${prev}${p} in
8026
8027     -L* | -R* | -l*)
8028        # Some compilers place space between "-{L,R}" and the path.
8029        # Remove the space.
8030        if test $p = "-L" ||
8031           test $p = "-R"; then
8032          prev=$p
8033          continue
8034        fi
8035
8036        # Expand the sysroot to ease extracting the directories later.
8037        if test -z "$prev"; then
8038          case $p in
8039          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8040          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8041          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8042          esac
8043        fi
8044        case $p in
8045        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8046        esac
8047        if test "$pre_test_object_deps_done" = no; then
8048          case ${prev} in
8049          -L | -R)
8050            # Internal compiler library paths should come after those
8051            # provided the user.  The postdeps already come after the
8052            # user supplied libs so there is no need to process them.
8053            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8054              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8055            else
8056              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8057            fi
8058            ;;
8059          # The "-l" case would never come before the object being
8060          # linked, so don't bother handling this case.
8061          esac
8062        else
8063          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8064            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8065          else
8066            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8067          fi
8068        fi
8069        prev=
8070        ;;
8071
8072     *.lto.$objext) ;; # Ignore GCC LTO objects
8073     *.$objext)
8074        # This assumes that the test object file only shows up
8075        # once in the compiler output.
8076        if test "$p" = "conftest.$objext"; then
8077          pre_test_object_deps_done=yes
8078          continue
8079        fi
8080
8081        if test "$pre_test_object_deps_done" = no; then
8082          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8083            _LT_TAGVAR(predep_objects, $1)="$p"
8084          else
8085            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8086          fi
8087        else
8088          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8089            _LT_TAGVAR(postdep_objects, $1)="$p"
8090          else
8091            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8092          fi
8093        fi
8094        ;;
8095
8096     *) ;; # Ignore the rest.
8097
8098     esac
8099   done
8100
8101   # Clean up.
8102   rm -f a.out a.exe
8103 else
8104   echo "libtool.m4: error: problem compiling $1 test program"
8105 fi
8106
8107 $RM -f confest.$objext
8108 CFLAGS=$_lt_libdeps_save_CFLAGS
8109
8110 # PORTME: override above test on systems where it is broken
8111 m4_if([$1], [CXX],
8112 [case $host_os in
8113 interix[[3-9]]*)
8114   # Interix 3.5 installs completely hosed .la files for C++, so rather than
8115   # hack all around it, let's just trust "g++" to DTRT.
8116   _LT_TAGVAR(predep_objects,$1)=
8117   _LT_TAGVAR(postdep_objects,$1)=
8118   _LT_TAGVAR(postdeps,$1)=
8119   ;;
8120
8121 linux*)
8122   case `$CC -V 2>&1 | sed 5q` in
8123   *Sun\ C*)
8124     # Sun C++ 5.9
8125
8126     # The more standards-conforming stlport4 library is
8127     # incompatible with the Cstd library. Avoid specifying
8128     # it if it's in CXXFLAGS. Ignore libCrun as
8129     # -library=stlport4 depends on it.
8130     case " $CXX $CXXFLAGS " in
8131     *" -library=stlport4 "*)
8132       solaris_use_stlport4=yes
8133       ;;
8134     esac
8135
8136     if test "$solaris_use_stlport4" != yes; then
8137       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8138     fi
8139     ;;
8140   esac
8141   ;;
8142
8143 solaris*)
8144   case $cc_basename in
8145   CC* | sunCC*)
8146     # The more standards-conforming stlport4 library is
8147     # incompatible with the Cstd library. Avoid specifying
8148     # it if it's in CXXFLAGS. Ignore libCrun as
8149     # -library=stlport4 depends on it.
8150     case " $CXX $CXXFLAGS " in
8151     *" -library=stlport4 "*)
8152       solaris_use_stlport4=yes
8153       ;;
8154     esac
8155
8156     # Adding this requires a known-good setup of shared libraries for
8157     # Sun compiler versions before 5.6, else PIC objects from an old
8158     # archive will be linked into the output, leading to subtle bugs.
8159     if test "$solaris_use_stlport4" != yes; then
8160       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8161     fi
8162     ;;
8163   esac
8164   ;;
8165 esac
8166 ])
8167
8168 case " $_LT_TAGVAR(postdeps, $1) " in
8169 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8170 esac
8171  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8172 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8173  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8174 fi
8175 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8176     [The directories searched by this compiler when creating a shared library])
8177 _LT_TAGDECL([], [predep_objects], [1],
8178     [Dependencies to place before and after the objects being linked to
8179     create a shared library])
8180 _LT_TAGDECL([], [postdep_objects], [1])
8181 _LT_TAGDECL([], [predeps], [1])
8182 _LT_TAGDECL([], [postdeps], [1])
8183 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8184     [The library search path used internally by the compiler when linking
8185     a shared library])
8186 ])# _LT_SYS_HIDDEN_LIBDEPS
8187
8188
8189 # _LT_LANG_F77_CONFIG([TAG])
8190 # --------------------------
8191 # Ensure that the configuration variables for a Fortran 77 compiler are
8192 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8193 # to write the compiler configuration to `libtool'.
8194 m4_defun([_LT_LANG_F77_CONFIG],
8195 [AC_LANG_PUSH(Fortran 77)
8196 if test -z "$F77" || test "X$F77" = "Xno"; then
8197   _lt_disable_F77=yes
8198 fi
8199
8200 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8201 _LT_TAGVAR(allow_undefined_flag, $1)=
8202 _LT_TAGVAR(always_export_symbols, $1)=no
8203 _LT_TAGVAR(archive_expsym_cmds, $1)=
8204 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8205 _LT_TAGVAR(hardcode_direct, $1)=no
8206 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8207 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8208 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8209 _LT_TAGVAR(hardcode_minus_L, $1)=no
8210 _LT_TAGVAR(hardcode_automatic, $1)=no
8211 _LT_TAGVAR(inherit_rpath, $1)=no
8212 _LT_TAGVAR(module_cmds, $1)=
8213 _LT_TAGVAR(module_expsym_cmds, $1)=
8214 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8215 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8216 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8217 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8218 _LT_TAGVAR(no_undefined_flag, $1)=
8219 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8220 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8221
8222 # Source file extension for f77 test sources.
8223 ac_ext=f
8224
8225 # Object file extension for compiled f77 test sources.
8226 objext=o
8227 _LT_TAGVAR(objext, $1)=$objext
8228
8229 # No sense in running all these tests if we already determined that
8230 # the F77 compiler isn't working.  Some variables (like enable_shared)
8231 # are currently assumed to apply to all compilers on this platform,
8232 # and will be corrupted by setting them based on a non-working compiler.
8233 if test "$_lt_disable_F77" != yes; then
8234   # Code to be used in simple compile tests
8235   lt_simple_compile_test_code="\
8236       subroutine t
8237       return
8238       end
8239 "
8240
8241   # Code to be used in simple link tests
8242   lt_simple_link_test_code="\
8243       program t
8244       end
8245 "
8246
8247   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8248   _LT_TAG_COMPILER
8249
8250   # save warnings/boilerplate of simple test code
8251   _LT_COMPILER_BOILERPLATE
8252   _LT_LINKER_BOILERPLATE
8253
8254   # Allow CC to be a program name with arguments.
8255   lt_save_CC="$CC"
8256   lt_save_GCC=$GCC
8257   lt_save_CFLAGS=$CFLAGS
8258   CC=${F77-"f77"}
8259   CFLAGS=$FFLAGS
8260   compiler=$CC
8261   _LT_TAGVAR(compiler, $1)=$CC
8262   _LT_CC_BASENAME([$compiler])
8263   GCC=$G77
8264   if test -n "$compiler"; then
8265     AC_MSG_CHECKING([if libtool supports shared libraries])
8266     AC_MSG_RESULT([$can_build_shared])
8267
8268     AC_MSG_CHECKING([whether to build shared libraries])
8269     test "$can_build_shared" = "no" && enable_shared=no
8270
8271     # On AIX, shared libraries and static libraries use the same namespace, and
8272     # are all built from PIC.
8273     case $host_os in
8274       aix3*)
8275         test "$enable_shared" = yes && enable_static=no
8276         if test -n "$RANLIB"; then
8277           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8278           postinstall_cmds='$RANLIB $lib'
8279         fi
8280         ;;
8281       aix[[4-9]]*)
8282         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8283           test "$enable_shared" = yes && enable_static=no
8284         fi
8285         ;;
8286     esac
8287     AC_MSG_RESULT([$enable_shared])
8288
8289     AC_MSG_CHECKING([whether to build static libraries])
8290     # Make sure either enable_shared or enable_static is yes.
8291     test "$enable_shared" = yes || enable_static=yes
8292     AC_MSG_RESULT([$enable_static])
8293
8294     _LT_TAGVAR(GCC, $1)="$G77"
8295     _LT_TAGVAR(LD, $1)="$LD"
8296
8297     ## CAVEAT EMPTOR:
8298     ## There is no encapsulation within the following macros, do not change
8299     ## the running order or otherwise move them around unless you know exactly
8300     ## what you are doing...
8301     _LT_COMPILER_PIC($1)
8302     _LT_COMPILER_C_O($1)
8303     _LT_COMPILER_FILE_LOCKS($1)
8304     _LT_LINKER_SHLIBS($1)
8305     _LT_SYS_DYNAMIC_LINKER($1)
8306     _LT_LINKER_HARDCODE_LIBPATH($1)
8307
8308     _LT_CONFIG($1)
8309   fi # test -n "$compiler"
8310
8311   GCC=$lt_save_GCC
8312   CC="$lt_save_CC"
8313   CFLAGS="$lt_save_CFLAGS"
8314 fi # test "$_lt_disable_F77" != yes
8315
8316 AC_LANG_POP
8317 ])# _LT_LANG_F77_CONFIG
8318
8319
8320 # _LT_LANG_FC_CONFIG([TAG])
8321 # -------------------------
8322 # Ensure that the configuration variables for a Fortran compiler are
8323 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8324 # to write the compiler configuration to `libtool'.
8325 m4_defun([_LT_LANG_FC_CONFIG],
8326 [AC_LANG_PUSH(Fortran)
8327
8328 if test -z "$FC" || test "X$FC" = "Xno"; then
8329   _lt_disable_FC=yes
8330 fi
8331
8332 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8333 _LT_TAGVAR(allow_undefined_flag, $1)=
8334 _LT_TAGVAR(always_export_symbols, $1)=no
8335 _LT_TAGVAR(archive_expsym_cmds, $1)=
8336 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8337 _LT_TAGVAR(hardcode_direct, $1)=no
8338 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8339 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8340 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8341 _LT_TAGVAR(hardcode_minus_L, $1)=no
8342 _LT_TAGVAR(hardcode_automatic, $1)=no
8343 _LT_TAGVAR(inherit_rpath, $1)=no
8344 _LT_TAGVAR(module_cmds, $1)=
8345 _LT_TAGVAR(module_expsym_cmds, $1)=
8346 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8347 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8348 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8349 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8350 _LT_TAGVAR(no_undefined_flag, $1)=
8351 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8352 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8353
8354 # Source file extension for fc test sources.
8355 ac_ext=${ac_fc_srcext-f}
8356
8357 # Object file extension for compiled fc test sources.
8358 objext=o
8359 _LT_TAGVAR(objext, $1)=$objext
8360
8361 # No sense in running all these tests if we already determined that
8362 # the FC compiler isn't working.  Some variables (like enable_shared)
8363 # are currently assumed to apply to all compilers on this platform,
8364 # and will be corrupted by setting them based on a non-working compiler.
8365 if test "$_lt_disable_FC" != yes; then
8366   # Code to be used in simple compile tests
8367   lt_simple_compile_test_code="\
8368       subroutine t
8369       return
8370       end
8371 "
8372
8373   # Code to be used in simple link tests
8374   lt_simple_link_test_code="\
8375       program t
8376       end
8377 "
8378
8379   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8380   _LT_TAG_COMPILER
8381
8382   # save warnings/boilerplate of simple test code
8383   _LT_COMPILER_BOILERPLATE
8384   _LT_LINKER_BOILERPLATE
8385
8386   # Allow CC to be a program name with arguments.
8387   lt_save_CC="$CC"
8388   lt_save_GCC=$GCC
8389   lt_save_CFLAGS=$CFLAGS
8390   CC=${FC-"f95"}
8391   CFLAGS=$FCFLAGS
8392   compiler=$CC
8393   GCC=$ac_cv_fc_compiler_gnu
8394
8395   _LT_TAGVAR(compiler, $1)=$CC
8396   _LT_CC_BASENAME([$compiler])
8397
8398   if test -n "$compiler"; then
8399     AC_MSG_CHECKING([if libtool supports shared libraries])
8400     AC_MSG_RESULT([$can_build_shared])
8401
8402     AC_MSG_CHECKING([whether to build shared libraries])
8403     test "$can_build_shared" = "no" && enable_shared=no
8404
8405     # On AIX, shared libraries and static libraries use the same namespace, and
8406     # are all built from PIC.
8407     case $host_os in
8408       aix3*)
8409         test "$enable_shared" = yes && enable_static=no
8410         if test -n "$RANLIB"; then
8411           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8412           postinstall_cmds='$RANLIB $lib'
8413         fi
8414         ;;
8415       aix[[4-9]]*)
8416         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8417           test "$enable_shared" = yes && enable_static=no
8418         fi
8419         ;;
8420     esac
8421     AC_MSG_RESULT([$enable_shared])
8422
8423     AC_MSG_CHECKING([whether to build static libraries])
8424     # Make sure either enable_shared or enable_static is yes.
8425     test "$enable_shared" = yes || enable_static=yes
8426     AC_MSG_RESULT([$enable_static])
8427
8428     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8429     _LT_TAGVAR(LD, $1)="$LD"
8430
8431     ## CAVEAT EMPTOR:
8432     ## There is no encapsulation within the following macros, do not change
8433     ## the running order or otherwise move them around unless you know exactly
8434     ## what you are doing...
8435     _LT_SYS_HIDDEN_LIBDEPS($1)
8436     _LT_COMPILER_PIC($1)
8437     _LT_COMPILER_C_O($1)
8438     _LT_COMPILER_FILE_LOCKS($1)
8439     _LT_LINKER_SHLIBS($1)
8440     _LT_SYS_DYNAMIC_LINKER($1)
8441     _LT_LINKER_HARDCODE_LIBPATH($1)
8442
8443     _LT_CONFIG($1)
8444   fi # test -n "$compiler"
8445
8446   GCC=$lt_save_GCC
8447   CC=$lt_save_CC
8448   CFLAGS=$lt_save_CFLAGS
8449 fi # test "$_lt_disable_FC" != yes
8450
8451 AC_LANG_POP
8452 ])# _LT_LANG_FC_CONFIG
8453
8454
8455 # _LT_LANG_GCJ_CONFIG([TAG])
8456 # --------------------------
8457 # Ensure that the configuration variables for the GNU Java Compiler compiler
8458 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8459 # to write the compiler configuration to `libtool'.
8460 m4_defun([_LT_LANG_GCJ_CONFIG],
8461 [AC_REQUIRE([LT_PROG_GCJ])dnl
8462 AC_LANG_SAVE
8463
8464 # Source file extension for Java test sources.
8465 ac_ext=java
8466
8467 # Object file extension for compiled Java test sources.
8468 objext=o
8469 _LT_TAGVAR(objext, $1)=$objext
8470
8471 # Code to be used in simple compile tests
8472 lt_simple_compile_test_code="class foo {}"
8473
8474 # Code to be used in simple link tests
8475 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8476
8477 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8478 _LT_TAG_COMPILER
8479
8480 # save warnings/boilerplate of simple test code
8481 _LT_COMPILER_BOILERPLATE
8482 _LT_LINKER_BOILERPLATE
8483
8484 # Allow CC to be a program name with arguments.
8485 lt_save_CC=$CC
8486 lt_save_CFLAGS=$CFLAGS
8487 lt_save_GCC=$GCC
8488 GCC=yes
8489 CC=${GCJ-"gcj"}
8490 CFLAGS=$GCJFLAGS
8491 compiler=$CC
8492 _LT_TAGVAR(compiler, $1)=$CC
8493 _LT_TAGVAR(LD, $1)="$LD"
8494 _LT_CC_BASENAME([$compiler])
8495
8496 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8497 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8498
8499 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8500 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8501 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8502
8503 if test -n "$compiler"; then
8504   _LT_COMPILER_NO_RTTI($1)
8505   _LT_COMPILER_PIC($1)
8506   _LT_COMPILER_C_O($1)
8507   _LT_COMPILER_FILE_LOCKS($1)
8508   _LT_LINKER_SHLIBS($1)
8509   _LT_LINKER_HARDCODE_LIBPATH($1)
8510
8511   _LT_CONFIG($1)
8512 fi
8513
8514 AC_LANG_RESTORE
8515
8516 GCC=$lt_save_GCC
8517 CC=$lt_save_CC
8518 CFLAGS=$lt_save_CFLAGS
8519 ])# _LT_LANG_GCJ_CONFIG
8520
8521
8522 # _LT_LANG_GO_CONFIG([TAG])
8523 # --------------------------
8524 # Ensure that the configuration variables for the GNU Go compiler
8525 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8526 # to write the compiler configuration to `libtool'.
8527 m4_defun([_LT_LANG_GO_CONFIG],
8528 [AC_REQUIRE([LT_PROG_GO])dnl
8529 AC_LANG_SAVE
8530
8531 # Source file extension for Go test sources.
8532 ac_ext=go
8533
8534 # Object file extension for compiled Go test sources.
8535 objext=o
8536 _LT_TAGVAR(objext, $1)=$objext
8537
8538 # Code to be used in simple compile tests
8539 lt_simple_compile_test_code="package main; func main() { }"
8540
8541 # Code to be used in simple link tests
8542 lt_simple_link_test_code='package main; func main() { }'
8543
8544 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8545 _LT_TAG_COMPILER
8546
8547 # save warnings/boilerplate of simple test code
8548 _LT_COMPILER_BOILERPLATE
8549 _LT_LINKER_BOILERPLATE
8550
8551 # Allow CC to be a program name with arguments.
8552 lt_save_CC=$CC
8553 lt_save_CFLAGS=$CFLAGS
8554 lt_save_GCC=$GCC
8555 GCC=yes
8556 CC=${GOC-"gccgo"}
8557 CFLAGS=$GOFLAGS
8558 compiler=$CC
8559 _LT_TAGVAR(compiler, $1)=$CC
8560 _LT_TAGVAR(LD, $1)="$LD"
8561 _LT_CC_BASENAME([$compiler])
8562
8563 # Go did not exist at the time GCC didn't implicitly link libc in.
8564 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8565
8566 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8567 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8568 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8569
8570 if test -n "$compiler"; then
8571   _LT_COMPILER_NO_RTTI($1)
8572   _LT_COMPILER_PIC($1)
8573   _LT_COMPILER_C_O($1)
8574   _LT_COMPILER_FILE_LOCKS($1)
8575   _LT_LINKER_SHLIBS($1)
8576   _LT_LINKER_HARDCODE_LIBPATH($1)
8577
8578   _LT_CONFIG($1)
8579 fi
8580
8581 AC_LANG_RESTORE
8582
8583 GCC=$lt_save_GCC
8584 CC=$lt_save_CC
8585 CFLAGS=$lt_save_CFLAGS
8586 ])# _LT_LANG_GO_CONFIG
8587
8588
8589 # _LT_LANG_RC_CONFIG([TAG])
8590 # -------------------------
8591 # Ensure that the configuration variables for the Windows resource compiler
8592 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8593 # to write the compiler configuration to `libtool'.
8594 m4_defun([_LT_LANG_RC_CONFIG],
8595 [AC_REQUIRE([LT_PROG_RC])dnl
8596 AC_LANG_SAVE
8597
8598 # Source file extension for RC test sources.
8599 ac_ext=rc
8600
8601 # Object file extension for compiled RC test sources.
8602 objext=o
8603 _LT_TAGVAR(objext, $1)=$objext
8604
8605 # Code to be used in simple compile tests
8606 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8607
8608 # Code to be used in simple link tests
8609 lt_simple_link_test_code="$lt_simple_compile_test_code"
8610
8611 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8612 _LT_TAG_COMPILER
8613
8614 # save warnings/boilerplate of simple test code
8615 _LT_COMPILER_BOILERPLATE
8616 _LT_LINKER_BOILERPLATE
8617
8618 # Allow CC to be a program name with arguments.
8619 lt_save_CC="$CC"
8620 lt_save_CFLAGS=$CFLAGS
8621 lt_save_GCC=$GCC
8622 GCC=
8623 CC=${RC-"windres"}
8624 CFLAGS=
8625 compiler=$CC
8626 _LT_TAGVAR(compiler, $1)=$CC
8627 _LT_CC_BASENAME([$compiler])
8628 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8629
8630 if test -n "$compiler"; then
8631   :
8632   _LT_CONFIG($1)
8633 fi
8634
8635 GCC=$lt_save_GCC
8636 AC_LANG_RESTORE
8637 CC=$lt_save_CC
8638 CFLAGS=$lt_save_CFLAGS
8639 ])# _LT_LANG_RC_CONFIG
8640
8641
8642 # LT_PROG_GCJ
8643 # -----------
8644 AC_DEFUN([LT_PROG_GCJ],
8645 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8646   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8647     [AC_CHECK_TOOL(GCJ, gcj,)
8648       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8649       AC_SUBST(GCJFLAGS)])])[]dnl
8650 ])
8651
8652 # Old name:
8653 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8654 dnl aclocal-1.4 backwards compatibility:
8655 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8656
8657
8658 # LT_PROG_GO
8659 # ----------
8660 AC_DEFUN([LT_PROG_GO],
8661 [AC_CHECK_TOOL(GOC, gccgo,)
8662 ])
8663
8664
8665 # LT_PROG_RC
8666 # ----------
8667 AC_DEFUN([LT_PROG_RC],
8668 [AC_CHECK_TOOL(RC, windres,)
8669 ])
8670
8671 # Old name:
8672 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8673 dnl aclocal-1.4 backwards compatibility:
8674 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8675
8676
8677 # _LT_DECL_EGREP
8678 # --------------
8679 # If we don't have a new enough Autoconf to choose the best grep
8680 # available, choose the one first in the user's PATH.
8681 m4_defun([_LT_DECL_EGREP],
8682 [AC_REQUIRE([AC_PROG_EGREP])dnl
8683 AC_REQUIRE([AC_PROG_FGREP])dnl
8684 test -z "$GREP" && GREP=grep
8685 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8686 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8687 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8688 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8689 AC_SUBST([GREP])
8690 ])
8691
8692
8693 # _LT_DECL_OBJDUMP
8694 # --------------
8695 # If we don't have a new enough Autoconf to choose the best objdump
8696 # available, choose the one first in the user's PATH.
8697 m4_defun([_LT_DECL_OBJDUMP],
8698 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8699 test -z "$OBJDUMP" && OBJDUMP=objdump
8700 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8701 AC_SUBST([OBJDUMP])
8702 ])
8703
8704 # _LT_DECL_DLLTOOL
8705 # ----------------
8706 # Ensure DLLTOOL variable is set.
8707 m4_defun([_LT_DECL_DLLTOOL],
8708 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8709 test -z "$DLLTOOL" && DLLTOOL=dlltool
8710 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8711 AC_SUBST([DLLTOOL])
8712 ])
8713
8714 # _LT_DECL_SED
8715 # ------------
8716 # Check for a fully-functional sed program, that truncates
8717 # as few characters as possible.  Prefer GNU sed if found.
8718 m4_defun([_LT_DECL_SED],
8719 [AC_PROG_SED
8720 test -z "$SED" && SED=sed
8721 Xsed="$SED -e 1s/^X//"
8722 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8723 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8724     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8725 ])# _LT_DECL_SED
8726
8727 m4_ifndef([AC_PROG_SED], [
8728 # NOTE: This macro has been submitted for inclusion into   #
8729 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8730 #  a released version of Autoconf we should remove this    #
8731 #  macro and use it instead.                               #
8732
8733 m4_defun([AC_PROG_SED],
8734 [AC_MSG_CHECKING([for a sed that does not truncate output])
8735 AC_CACHE_VAL(lt_cv_path_SED,
8736 [# Loop through the user's path and test for sed and gsed.
8737 # Then use that list of sed's as ones to test for truncation.
8738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8739 for as_dir in $PATH
8740 do
8741   IFS=$as_save_IFS
8742   test -z "$as_dir" && as_dir=.
8743   for lt_ac_prog in sed gsed; do
8744     for ac_exec_ext in '' $ac_executable_extensions; do
8745       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8746         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8747       fi
8748     done
8749   done
8750 done
8751 IFS=$as_save_IFS
8752 lt_ac_max=0
8753 lt_ac_count=0
8754 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8755 # along with /bin/sed that truncates output.
8756 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8757   test ! -f $lt_ac_sed && continue
8758   cat /dev/null > conftest.in
8759   lt_ac_count=0
8760   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8761   # Check for GNU sed and select it if it is found.
8762   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8763     lt_cv_path_SED=$lt_ac_sed
8764     break
8765   fi
8766   while true; do
8767     cat conftest.in conftest.in >conftest.tmp
8768     mv conftest.tmp conftest.in
8769     cp conftest.in conftest.nl
8770     echo >>conftest.nl
8771     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8772     cmp -s conftest.out conftest.nl || break
8773     # 10000 chars as input seems more than enough
8774     test $lt_ac_count -gt 10 && break
8775     lt_ac_count=`expr $lt_ac_count + 1`
8776     if test $lt_ac_count -gt $lt_ac_max; then
8777       lt_ac_max=$lt_ac_count
8778       lt_cv_path_SED=$lt_ac_sed
8779     fi
8780   done
8781 done
8782 ])
8783 SED=$lt_cv_path_SED
8784 AC_SUBST([SED])
8785 AC_MSG_RESULT([$SED])
8786 ])#AC_PROG_SED
8787 ])#m4_ifndef
8788
8789 # Old name:
8790 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8791 dnl aclocal-1.4 backwards compatibility:
8792 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8793
8794
8795 # _LT_CHECK_SHELL_FEATURES
8796 # ------------------------
8797 # Find out whether the shell is Bourne or XSI compatible,
8798 # or has some other useful features.
8799 m4_defun([_LT_CHECK_SHELL_FEATURES],
8800 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8801 # Try some XSI features
8802 xsi_shell=no
8803 ( _lt_dummy="a/b/c"
8804   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8805       = c,a/b,b/c, \
8806     && eval 'test $(( 1 + 1 )) -eq 2 \
8807     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8808   && xsi_shell=yes
8809 AC_MSG_RESULT([$xsi_shell])
8810 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8811
8812 AC_MSG_CHECKING([whether the shell understands "+="])
8813 lt_shell_append=no
8814 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8815     >/dev/null 2>&1 \
8816   && lt_shell_append=yes
8817 AC_MSG_RESULT([$lt_shell_append])
8818 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8819
8820 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8821   lt_unset=unset
8822 else
8823   lt_unset=false
8824 fi
8825 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8826
8827 # test EBCDIC or ASCII
8828 case `echo X|tr X '\101'` in
8829  A) # ASCII based system
8830     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8831   lt_SP2NL='tr \040 \012'
8832   lt_NL2SP='tr \015\012 \040\040'
8833   ;;
8834  *) # EBCDIC based system
8835   lt_SP2NL='tr \100 \n'
8836   lt_NL2SP='tr \r\n \100\100'
8837   ;;
8838 esac
8839 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8840 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8841 ])# _LT_CHECK_SHELL_FEATURES
8842
8843
8844 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8845 # ------------------------------------------------------
8846 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8847 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8848 m4_defun([_LT_PROG_FUNCTION_REPLACE],
8849 [dnl {
8850 sed -e '/^$1 ()$/,/^} # $1 /c\
8851 $1 ()\
8852 {\
8853 m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
8854 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8855   && mv -f "$cfgfile.tmp" "$cfgfile" \
8856     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8857 test 0 -eq $? || _lt_function_replace_fail=:
8858 ])
8859
8860
8861 # _LT_PROG_REPLACE_SHELLFNS
8862 # -------------------------
8863 # Replace existing portable implementations of several shell functions with
8864 # equivalent extended shell implementations where those features are available..
8865 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8866 [if test x"$xsi_shell" = xyes; then
8867   _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8868     case ${1} in
8869       */*) func_dirname_result="${1%/*}${2}" ;;
8870       *  ) func_dirname_result="${3}" ;;
8871     esac])
8872
8873   _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8874     func_basename_result="${1##*/}"])
8875
8876   _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8877     case ${1} in
8878       */*) func_dirname_result="${1%/*}${2}" ;;
8879       *  ) func_dirname_result="${3}" ;;
8880     esac
8881     func_basename_result="${1##*/}"])
8882
8883   _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8884     # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8885     # positional parameters, so assign one to ordinary parameter first.
8886     func_stripname_result=${3}
8887     func_stripname_result=${func_stripname_result#"${1}"}
8888     func_stripname_result=${func_stripname_result%"${2}"}])
8889
8890   _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8891     func_split_long_opt_name=${1%%=*}
8892     func_split_long_opt_arg=${1#*=}])
8893
8894   _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8895     func_split_short_opt_arg=${1#??}
8896     func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8897
8898   _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8899     case ${1} in
8900       *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8901       *)    func_lo2o_result=${1} ;;
8902     esac])
8903
8904   _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
8905
8906   _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
8907
8908   _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
8909 fi
8910
8911 if test x"$lt_shell_append" = xyes; then
8912   _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
8913
8914   _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8915     func_quote_for_eval "${2}"
8916 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8917     eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8918
8919   # Save a `func_append' function call where possible by direct use of '+='
8920   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8921     && mv -f "$cfgfile.tmp" "$cfgfile" \
8922       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8923   test 0 -eq $? || _lt_function_replace_fail=:
8924 else
8925   # Save a `func_append' function call even when '+=' is not available
8926   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8927     && mv -f "$cfgfile.tmp" "$cfgfile" \
8928       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8929   test 0 -eq $? || _lt_function_replace_fail=:
8930 fi
8931
8932 if test x"$_lt_function_replace_fail" = x":"; then
8933   AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8934 fi
8935 ])
8936
8937 # _LT_PATH_CONVERSION_FUNCTIONS
8938 # -----------------------------
8939 # Determine which file name conversion functions should be used by
8940 # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8941 # for certain cross-compile configurations and native mingw.
8942 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8943 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8944 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8945 AC_MSG_CHECKING([how to convert $build file names to $host format])
8946 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8947 [case $host in
8948   *-*-mingw* )
8949     case $build in
8950       *-*-mingw* ) # actually msys
8951         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8952         ;;
8953       *-*-cygwin* )
8954         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8955         ;;
8956       * ) # otherwise, assume *nix
8957         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8958         ;;
8959     esac
8960     ;;
8961   *-*-cygwin* )
8962     case $build in
8963       *-*-mingw* ) # actually msys
8964         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8965         ;;
8966       *-*-cygwin* )
8967         lt_cv_to_host_file_cmd=func_convert_file_noop
8968         ;;
8969       * ) # otherwise, assume *nix
8970         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8971         ;;
8972     esac
8973     ;;
8974   * ) # unhandled hosts (and "normal" native builds)
8975     lt_cv_to_host_file_cmd=func_convert_file_noop
8976     ;;
8977 esac
8978 ])
8979 to_host_file_cmd=$lt_cv_to_host_file_cmd
8980 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8981 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8982          [0], [convert $build file names to $host format])dnl
8983
8984 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8985 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8986 [#assume ordinary cross tools, or native build.
8987 lt_cv_to_tool_file_cmd=func_convert_file_noop
8988 case $host in
8989   *-*-mingw* )
8990     case $build in
8991       *-*-mingw* ) # actually msys
8992         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8993         ;;
8994     esac
8995     ;;
8996 esac
8997 ])
8998 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8999 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9000 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9001          [0], [convert $build files to toolchain format])dnl
9002 ])# _LT_PATH_CONVERSION_FUNCTIONS
9003
9004 # Helper functions for option handling.                    -*- Autoconf -*-
9005 #
9006 #   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9007 #   Inc.
9008 #   Written by Gary V. Vaughan, 2004
9009 #
9010 # This file is free software; the Free Software Foundation gives
9011 # unlimited permission to copy and/or distribute it, with or without
9012 # modifications, as long as this notice is preserved.
9013
9014 # serial 7 ltoptions.m4
9015
9016 # This is to help aclocal find these macros, as it can't see m4_define.
9017 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9018
9019
9020 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9021 # ------------------------------------------
9022 m4_define([_LT_MANGLE_OPTION],
9023 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9024
9025
9026 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9027 # ---------------------------------------
9028 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9029 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9030 # saved as a flag.
9031 m4_define([_LT_SET_OPTION],
9032 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9033 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9034         _LT_MANGLE_DEFUN([$1], [$2]),
9035     [m4_warning([Unknown $1 option `$2'])])[]dnl
9036 ])
9037
9038
9039 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9040 # ------------------------------------------------------------
9041 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9042 m4_define([_LT_IF_OPTION],
9043 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9044
9045
9046 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9047 # -------------------------------------------------------
9048 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9049 # are set.
9050 m4_define([_LT_UNLESS_OPTIONS],
9051 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9052             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9053                       [m4_define([$0_found])])])[]dnl
9054 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9055 ])[]dnl
9056 ])
9057
9058
9059 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9060 # ----------------------------------------
9061 # OPTION-LIST is a space-separated list of Libtool options associated
9062 # with MACRO-NAME.  If any OPTION has a matching handler declared with
9063 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9064 # the unknown option and exit.
9065 m4_defun([_LT_SET_OPTIONS],
9066 [# Set options
9067 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9068     [_LT_SET_OPTION([$1], _LT_Option)])
9069
9070 m4_if([$1],[LT_INIT],[
9071   dnl
9072   dnl Simply set some default values (i.e off) if boolean options were not
9073   dnl specified:
9074   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9075   ])
9076   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9077   ])
9078   dnl
9079   dnl If no reference was made to various pairs of opposing options, then
9080   dnl we run the default mode handler for the pair.  For example, if neither
9081   dnl `shared' nor `disable-shared' was passed, we enable building of shared
9082   dnl archives by default:
9083   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9084   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9085   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9086   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9087                    [_LT_ENABLE_FAST_INSTALL])
9088   ])
9089 ])# _LT_SET_OPTIONS
9090
9091
9092
9093 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9094 # -----------------------------------------
9095 m4_define([_LT_MANGLE_DEFUN],
9096 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9097
9098
9099 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9100 # -----------------------------------------------
9101 m4_define([LT_OPTION_DEFINE],
9102 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9103 ])# LT_OPTION_DEFINE
9104
9105
9106 # dlopen
9107 # ------
9108 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9109 ])
9110
9111 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9112 [_LT_SET_OPTION([LT_INIT], [dlopen])
9113 AC_DIAGNOSE([obsolete],
9114 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9115 put the `dlopen' option into LT_INIT's first parameter.])
9116 ])
9117
9118 dnl aclocal-1.4 backwards compatibility:
9119 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9120
9121
9122 # win32-dll
9123 # ---------
9124 # Declare package support for building win32 dll's.
9125 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9126 [enable_win32_dll=yes
9127
9128 case $host in
9129 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9130   AC_CHECK_TOOL(AS, as, false)
9131   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9132   AC_CHECK_TOOL(OBJDUMP, objdump, false)
9133   ;;
9134 esac
9135
9136 test -z "$AS" && AS=as
9137 _LT_DECL([], [AS],      [1], [Assembler program])dnl
9138
9139 test -z "$DLLTOOL" && DLLTOOL=dlltool
9140 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9141
9142 test -z "$OBJDUMP" && OBJDUMP=objdump
9143 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9144 ])# win32-dll
9145
9146 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9147 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9148 _LT_SET_OPTION([LT_INIT], [win32-dll])
9149 AC_DIAGNOSE([obsolete],
9150 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9151 put the `win32-dll' option into LT_INIT's first parameter.])
9152 ])
9153
9154 dnl aclocal-1.4 backwards compatibility:
9155 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9156
9157
9158 # _LT_ENABLE_SHARED([DEFAULT])
9159 # ----------------------------
9160 # implement the --enable-shared flag, and supports the `shared' and
9161 # `disable-shared' LT_INIT options.
9162 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9163 m4_define([_LT_ENABLE_SHARED],
9164 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9165 AC_ARG_ENABLE([shared],
9166     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9167         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9168     [p=${PACKAGE-default}
9169     case $enableval in
9170     yes) enable_shared=yes ;;
9171     no) enable_shared=no ;;
9172     *)
9173       enable_shared=no
9174       # Look at the argument we got.  We use all the common list separators.
9175       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9176       for pkg in $enableval; do
9177         IFS="$lt_save_ifs"
9178         if test "X$pkg" = "X$p"; then
9179           enable_shared=yes
9180         fi
9181       done
9182       IFS="$lt_save_ifs"
9183       ;;
9184     esac],
9185     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9186
9187     _LT_DECL([build_libtool_libs], [enable_shared], [0],
9188         [Whether or not to build shared libraries])
9189 ])# _LT_ENABLE_SHARED
9190
9191 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9192 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9193
9194 # Old names:
9195 AC_DEFUN([AC_ENABLE_SHARED],
9196 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9197 ])
9198
9199 AC_DEFUN([AC_DISABLE_SHARED],
9200 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9201 ])
9202
9203 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9204 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9205
9206 dnl aclocal-1.4 backwards compatibility:
9207 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9208 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9209
9210
9211
9212 # _LT_ENABLE_STATIC([DEFAULT])
9213 # ----------------------------
9214 # implement the --enable-static flag, and support the `static' and
9215 # `disable-static' LT_INIT options.
9216 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9217 m4_define([_LT_ENABLE_STATIC],
9218 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9219 AC_ARG_ENABLE([static],
9220     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9221         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9222     [p=${PACKAGE-default}
9223     case $enableval in
9224     yes) enable_static=yes ;;
9225     no) enable_static=no ;;
9226     *)
9227      enable_static=no
9228       # Look at the argument we got.  We use all the common list separators.
9229       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9230       for pkg in $enableval; do
9231         IFS="$lt_save_ifs"
9232         if test "X$pkg" = "X$p"; then
9233           enable_static=yes
9234         fi
9235       done
9236       IFS="$lt_save_ifs"
9237       ;;
9238     esac],
9239     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9240
9241     _LT_DECL([build_old_libs], [enable_static], [0],
9242         [Whether or not to build static libraries])
9243 ])# _LT_ENABLE_STATIC
9244
9245 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9246 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9247
9248 # Old names:
9249 AC_DEFUN([AC_ENABLE_STATIC],
9250 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9251 ])
9252
9253 AC_DEFUN([AC_DISABLE_STATIC],
9254 [_LT_SET_OPTION([LT_INIT], [disable-static])
9255 ])
9256
9257 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9258 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9259
9260 dnl aclocal-1.4 backwards compatibility:
9261 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9262 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9263
9264
9265
9266 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9267 # ----------------------------------
9268 # implement the --enable-fast-install flag, and support the `fast-install'
9269 # and `disable-fast-install' LT_INIT options.
9270 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9271 m4_define([_LT_ENABLE_FAST_INSTALL],
9272 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9273 AC_ARG_ENABLE([fast-install],
9274     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9275     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9276     [p=${PACKAGE-default}
9277     case $enableval in
9278     yes) enable_fast_install=yes ;;
9279     no) enable_fast_install=no ;;
9280     *)
9281       enable_fast_install=no
9282       # Look at the argument we got.  We use all the common list separators.
9283       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9284       for pkg in $enableval; do
9285         IFS="$lt_save_ifs"
9286         if test "X$pkg" = "X$p"; then
9287           enable_fast_install=yes
9288         fi
9289       done
9290       IFS="$lt_save_ifs"
9291       ;;
9292     esac],
9293     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9294
9295 _LT_DECL([fast_install], [enable_fast_install], [0],
9296          [Whether or not to optimize for fast installation])dnl
9297 ])# _LT_ENABLE_FAST_INSTALL
9298
9299 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9300 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9301
9302 # Old names:
9303 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9304 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9305 AC_DIAGNOSE([obsolete],
9306 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9307 the `fast-install' option into LT_INIT's first parameter.])
9308 ])
9309
9310 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9311 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9312 AC_DIAGNOSE([obsolete],
9313 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9314 the `disable-fast-install' option into LT_INIT's first parameter.])
9315 ])
9316
9317 dnl aclocal-1.4 backwards compatibility:
9318 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9319 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9320
9321
9322 # _LT_WITH_PIC([MODE])
9323 # --------------------
9324 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9325 # LT_INIT options.
9326 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9327 m4_define([_LT_WITH_PIC],
9328 [AC_ARG_WITH([pic],
9329     [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9330         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9331     [lt_p=${PACKAGE-default}
9332     case $withval in
9333     yes|no) pic_mode=$withval ;;
9334     *)
9335       pic_mode=default
9336       # Look at the argument we got.  We use all the common list separators.
9337       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9338       for lt_pkg in $withval; do
9339         IFS="$lt_save_ifs"
9340         if test "X$lt_pkg" = "X$lt_p"; then
9341           pic_mode=yes
9342         fi
9343       done
9344       IFS="$lt_save_ifs"
9345       ;;
9346     esac],
9347     [pic_mode=default])
9348
9349 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9350
9351 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9352 ])# _LT_WITH_PIC
9353
9354 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9355 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9356
9357 # Old name:
9358 AU_DEFUN([AC_LIBTOOL_PICMODE],
9359 [_LT_SET_OPTION([LT_INIT], [pic-only])
9360 AC_DIAGNOSE([obsolete],
9361 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9362 put the `pic-only' option into LT_INIT's first parameter.])
9363 ])
9364
9365 dnl aclocal-1.4 backwards compatibility:
9366 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9367
9368
9369 m4_define([_LTDL_MODE], [])
9370 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9371                  [m4_define([_LTDL_MODE], [nonrecursive])])
9372 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9373                  [m4_define([_LTDL_MODE], [recursive])])
9374 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9375                  [m4_define([_LTDL_MODE], [subproject])])
9376
9377 m4_define([_LTDL_TYPE], [])
9378 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9379                  [m4_define([_LTDL_TYPE], [installable])])
9380 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9381                  [m4_define([_LTDL_TYPE], [convenience])])
9382
9383 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9384 #
9385 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9386 # Written by Gary V. Vaughan, 2004
9387 #
9388 # This file is free software; the Free Software Foundation gives
9389 # unlimited permission to copy and/or distribute it, with or without
9390 # modifications, as long as this notice is preserved.
9391
9392 # serial 6 ltsugar.m4
9393
9394 # This is to help aclocal find these macros, as it can't see m4_define.
9395 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9396
9397
9398 # lt_join(SEP, ARG1, [ARG2...])
9399 # -----------------------------
9400 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9401 # associated separator.
9402 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9403 # versions in m4sugar had bugs.
9404 m4_define([lt_join],
9405 [m4_if([$#], [1], [],
9406        [$#], [2], [[$2]],
9407        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9408 m4_define([_lt_join],
9409 [m4_if([$#$2], [2], [],
9410        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9411
9412
9413 # lt_car(LIST)
9414 # lt_cdr(LIST)
9415 # ------------
9416 # Manipulate m4 lists.
9417 # These macros are necessary as long as will still need to support
9418 # Autoconf-2.59 which quotes differently.
9419 m4_define([lt_car], [[$1]])
9420 m4_define([lt_cdr],
9421 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9422        [$#], 1, [],
9423        [m4_dquote(m4_shift($@))])])
9424 m4_define([lt_unquote], $1)
9425
9426
9427 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9428 # ------------------------------------------
9429 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9430 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9431 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9432 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9433 # than defined and empty).
9434 #
9435 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9436 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9437 m4_define([lt_append],
9438 [m4_define([$1],
9439            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9440
9441
9442
9443 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9444 # ----------------------------------------------------------
9445 # Produce a SEP delimited list of all paired combinations of elements of
9446 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9447 # has the form PREFIXmINFIXSUFFIXn.
9448 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9449 m4_define([lt_combine],
9450 [m4_if(m4_eval([$# > 3]), [1],
9451        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9452 [[m4_foreach([_Lt_prefix], [$2],
9453              [m4_foreach([_Lt_suffix],
9454                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9455         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9456
9457
9458 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9459 # -----------------------------------------------------------------------
9460 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9461 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9462 m4_define([lt_if_append_uniq],
9463 [m4_ifdef([$1],
9464           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9465                  [lt_append([$1], [$2], [$3])$4],
9466                  [$5])],
9467           [lt_append([$1], [$2], [$3])$4])])
9468
9469
9470 # lt_dict_add(DICT, KEY, VALUE)
9471 # -----------------------------
9472 m4_define([lt_dict_add],
9473 [m4_define([$1($2)], [$3])])
9474
9475
9476 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9477 # --------------------------------------------
9478 m4_define([lt_dict_add_subkey],
9479 [m4_define([$1($2:$3)], [$4])])
9480
9481
9482 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9483 # ----------------------------------
9484 m4_define([lt_dict_fetch],
9485 [m4_ifval([$3],
9486         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9487     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9488
9489
9490 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9491 # -----------------------------------------------------------------
9492 m4_define([lt_if_dict_fetch],
9493 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9494         [$5],
9495     [$6])])
9496
9497
9498 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9499 # --------------------------------------------------------------
9500 m4_define([lt_dict_filter],
9501 [m4_if([$5], [], [],
9502   [lt_join(m4_quote(m4_default([$4], [[, ]])),
9503            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9504                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9505 ])
9506
9507 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
9508 #
9509 #   Copyright (C) 2004 Free Software Foundation, Inc.
9510 #   Written by Scott James Remnant, 2004
9511 #
9512 # This file is free software; the Free Software Foundation gives
9513 # unlimited permission to copy and/or distribute it, with or without
9514 # modifications, as long as this notice is preserved.
9515
9516 # @configure_input@
9517
9518 # serial 3337 ltversion.m4
9519 # This file is part of GNU Libtool
9520
9521 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9522 m4_define([LT_PACKAGE_REVISION], [1.3337])
9523
9524 AC_DEFUN([LTVERSION_VERSION],
9525 [macro_version='2.4.2'
9526 macro_revision='1.3337'
9527 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9528 _LT_DECL(, macro_revision, 0)
9529 ])
9530
9531 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9532 #
9533 #   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9534 #   Written by Scott James Remnant, 2004.
9535 #
9536 # This file is free software; the Free Software Foundation gives
9537 # unlimited permission to copy and/or distribute it, with or without
9538 # modifications, as long as this notice is preserved.
9539
9540 # serial 5 lt~obsolete.m4
9541
9542 # These exist entirely to fool aclocal when bootstrapping libtool.
9543 #
9544 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9545 # which have later been changed to m4_define as they aren't part of the
9546 # exported API, or moved to Autoconf or Automake where they belong.
9547 #
9548 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9549 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9550 # using a macro with the same name in our local m4/libtool.m4 it'll
9551 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9552 # and doesn't know about Autoconf macros at all.)
9553 #
9554 # So we provide this file, which has a silly filename so it's always
9555 # included after everything else.  This provides aclocal with the
9556 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9557 # because those macros already exist, or will be overwritten later.
9558 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9559 #
9560 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9561 # Yes, that means every name once taken will need to remain here until
9562 # we give up compatibility with versions before 1.7, at which point
9563 # we need to keep only those names which we still refer to.
9564
9565 # This is to help aclocal find these macros, as it can't see m4_define.
9566 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9567
9568 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9569 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
9570 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9571 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
9572 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9573 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
9574 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
9575 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9576 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
9577 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9578 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
9579 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9580 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9581 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9582 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9583 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9584 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
9585 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9586 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9587 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
9588 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
9589 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9590 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9591 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9592 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9593 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9594 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9595 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9596 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
9597 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
9598 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
9599 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9600 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9601 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
9602 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
9603 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9604 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9605 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
9606 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9607 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
9608 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
9609 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
9610 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9611 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9612 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9613 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9614 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9615 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9616 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9617 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9618 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9619 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9620 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9621 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9622 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9623 m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9624 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9625 m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9626 m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
9627 m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
9628 m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
9629
9630 # nls.m4 serial 5 (gettext-0.18)
9631 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation,
9632 dnl Inc.
9633 dnl This file is free software; the Free Software Foundation
9634 dnl gives unlimited permission to copy and/or distribute it,
9635 dnl with or without modifications, as long as this notice is preserved.
9636 dnl
9637 dnl This file can can be used in projects which are not available under
9638 dnl the GNU General Public License or the GNU Library General Public
9639 dnl License but which still want to provide support for the GNU gettext
9640 dnl functionality.
9641 dnl Please note that the actual code of the GNU gettext library is covered
9642 dnl by the GNU Library General Public License, and the rest of the GNU
9643 dnl gettext package package is covered by the GNU General Public License.
9644 dnl They are *not* in the public domain.
9645
9646 dnl Authors:
9647 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9648 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9649
9650 AC_PREREQ([2.50])
9651
9652 AC_DEFUN([AM_NLS],
9653 [
9654   AC_MSG_CHECKING([whether NLS is requested])
9655   dnl Default is enabled NLS
9656   AC_ARG_ENABLE([nls],
9657     [  --disable-nls           do not use Native Language Support],
9658     USE_NLS=$enableval, USE_NLS=yes)
9659   AC_MSG_RESULT([$USE_NLS])
9660   AC_SUBST([USE_NLS])
9661 ])
9662
9663 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9664 # serial 1 (pkg-config-0.24)
9665
9666 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
9667 #
9668 # This program is free software; you can redistribute it and/or modify
9669 # it under the terms of the GNU General Public License as published by
9670 # the Free Software Foundation; either version 2 of the License, or
9671 # (at your option) any later version.
9672 #
9673 # This program is distributed in the hope that it will be useful, but
9674 # WITHOUT ANY WARRANTY; without even the implied warranty of
9675 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9676 # General Public License for more details.
9677 #
9678 # You should have received a copy of the GNU General Public License
9679 # along with this program; if not, write to the Free Software
9680 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9681 #
9682 # As a special exception to the GNU General Public License, if you
9683 # distribute this file as part of a program that contains a
9684 # configuration script generated by Autoconf, you may include it under
9685 # the same distribution terms that you use for the rest of that program.
9686
9687 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9688 # ----------------------------------
9689 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9690 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9691 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9692 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9693 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9694 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9695 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9696
9697 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9698         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9699 fi
9700 if test -n "$PKG_CONFIG"; then
9701         _pkg_min_version=m4_default([$1], [0.9.0])
9702         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9703         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9704                 AC_MSG_RESULT([yes])
9705         else
9706                 AC_MSG_RESULT([no])
9707                 PKG_CONFIG=""
9708         fi
9709 fi[]dnl
9710 ])# PKG_PROG_PKG_CONFIG
9711
9712 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9713 #
9714 # Check to see whether a particular set of modules exists.  Similar
9715 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9716 #
9717 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9718 # only at the first occurence in configure.ac, so if the first place
9719 # it's called might be skipped (such as if it is within an "if", you
9720 # have to call PKG_CHECK_EXISTS manually
9721 # --------------------------------------------------------------
9722 AC_DEFUN([PKG_CHECK_EXISTS],
9723 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9724 if test -n "$PKG_CONFIG" && \
9725     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9726   m4_default([$2], [:])
9727 m4_ifvaln([$3], [else
9728   $3])dnl
9729 fi])
9730
9731 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9732 # ---------------------------------------------
9733 m4_define([_PKG_CONFIG],
9734 [if test -n "$$1"; then
9735     pkg_cv_[]$1="$$1"
9736  elif test -n "$PKG_CONFIG"; then
9737     PKG_CHECK_EXISTS([$3],
9738                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9739                       test "x$?" != "x0" && pkg_failed=yes ],
9740                      [pkg_failed=yes])
9741  else
9742     pkg_failed=untried
9743 fi[]dnl
9744 ])# _PKG_CONFIG
9745
9746 # _PKG_SHORT_ERRORS_SUPPORTED
9747 # -----------------------------
9748 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9749 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9750 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9751         _pkg_short_errors_supported=yes
9752 else
9753         _pkg_short_errors_supported=no
9754 fi[]dnl
9755 ])# _PKG_SHORT_ERRORS_SUPPORTED
9756
9757
9758 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9759 # [ACTION-IF-NOT-FOUND])
9760 #
9761 #
9762 # Note that if there is a possibility the first call to
9763 # PKG_CHECK_MODULES might not happen, you should be sure to include an
9764 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9765 #
9766 #
9767 # --------------------------------------------------------------
9768 AC_DEFUN([PKG_CHECK_MODULES],
9769 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9770 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9771 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9772
9773 pkg_failed=no
9774 AC_MSG_CHECKING([for $1])
9775
9776 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9777 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
9778
9779 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9780 and $1[]_LIBS to avoid the need to call pkg-config.
9781 See the pkg-config man page for more details.])
9782
9783 if test $pkg_failed = yes; then
9784         AC_MSG_RESULT([no])
9785         _PKG_SHORT_ERRORS_SUPPORTED
9786         if test $_pkg_short_errors_supported = yes; then
9787                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9788         else 
9789                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9790         fi
9791         # Put the nasty error message in config.log where it belongs
9792         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9793
9794         m4_default([$4], [AC_MSG_ERROR(
9795 [Package requirements ($2) were not met:
9796
9797 $$1_PKG_ERRORS
9798
9799 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9800 installed software in a non-standard prefix.
9801
9802 _PKG_TEXT])[]dnl
9803         ])
9804 elif test $pkg_failed = untried; then
9805         AC_MSG_RESULT([no])
9806         m4_default([$4], [AC_MSG_FAILURE(
9807 [The pkg-config script could not be found or is too old.  Make sure it
9808 is in your PATH or set the PKG_CONFIG environment variable to the full
9809 path to pkg-config.
9810
9811 _PKG_TEXT
9812
9813 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
9814         ])
9815 else
9816         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9817         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9818         AC_MSG_RESULT([yes])
9819         $3
9820 fi[]dnl
9821 ])# PKG_CHECK_MODULES
9822
9823 AC_DEFUN([YELP_HELP_INIT],
9824 [
9825 AC_REQUIRE([AC_PROG_LN_S])
9826 m4_pattern_allow([AM_V_at])
9827 m4_pattern_allow([AM_V_GEN])
9828 m4_pattern_allow([AM_DEFAULT_VERBOSITY])
9829 AC_ARG_WITH([help-dir],
9830             AC_HELP_STRING([--with-help-dir=DIR],
9831                            [path where help files are installed]),,
9832             [with_help_dir='${datadir}/help'])
9833 HELP_DIR="$with_help_dir"
9834 AC_SUBST(HELP_DIR)
9835
9836 AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
9837 AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
9838 if test x"$ITSTOOL" = x; then
9839   AC_MSG_ERROR([itstool not found])
9840 fi
9841
9842 AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
9843 AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
9844 if test x"$XMLLINT" = x; then
9845   AC_MSG_ERROR([xmllint not found])
9846 fi
9847
9848 YELP_HELP_RULES='
9849 HELP_ID ?=
9850 HELP_POT ?=
9851 HELP_FILES ?=
9852 HELP_EXTRA ?=
9853 HELP_MEDIA ?=
9854 HELP_LINGUAS ?=
9855
9856 _HELP_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),$(filter $(LINGUAS),$(HELP_LINGUAS)),$(HELP_LINGUAS))
9857 _HELP_POTFILE = $(if $(HELP_POT),$(HELP_POT),$(if $(HELP_ID),$(HELP_ID).pot))
9858 _HELP_POFILES = $(if $(HELP_ID),$(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).po))
9859 _HELP_MOFILES = $(patsubst %.po,%.mo,$(_HELP_POFILES))
9860 _HELP_C_FILES = $(foreach f,$(HELP_FILES),C/$(f))
9861 _HELP_C_EXTRA = $(foreach f,$(HELP_EXTRA),C/$(f))
9862 _HELP_C_MEDIA = $(foreach f,$(HELP_MEDIA),C/$(f))
9863 _HELP_LC_FILES = $(foreach lc,$(_HELP_LINGUAS),$(foreach f,$(HELP_FILES),$(lc)/$(f)))
9864 _HELP_LC_STAMPS = $(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).stamp)
9865
9866 _HELP_DEFAULT_V = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
9867 _HELP_V = $(if $(V),$(V),$(_HELP_DEFAULT_V))
9868 _HELP_LC_VERBOSE = $(_HELP_LC_VERBOSE_$(_HELP_V))
9869 _HELP_LC_VERBOSE_ = $(_HELP_LC_VERBOSE_$(_HELP_DEFAULT_V))
9870 _HELP_LC_VERBOSE_0 = @echo "  GEN    "$(dir [$]@);
9871
9872 all: $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_LC_FILES) $(_HELP_POFILES)
9873
9874 .PHONY: pot
9875 pot: $(_HELP_POTFILE)
9876 $(_HELP_POTFILE): $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
9877         $(AM_V_GEN)if test -d "C"; then d=; else d="$(srcdir)/"; fi; \
9878         $(ITSTOOL) -o "[$]@" $(foreach f,$(_HELP_C_FILES),"$${d}$(f)")
9879
9880 .PHONY: repo
9881 repo: $(_HELP_POTFILE)
9882         $(AM_V_at)for po in $(_HELP_POFILES); do \
9883           if test "x[$](_HELP_V)" = "x0"; then echo "  GEN    $${po}"; fi; \
9884           msgmerge -q -o "$${po}" "$${po}" "$(_HELP_POTFILE)"; \
9885         done
9886
9887 $(_HELP_POFILES):
9888         $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
9889         $(AM_V_at)if test ! -f "[$]@" -a -f "$(srcdir)/[$]@"; then cp "$(srcdir)/[$]@" "[$]@"; fi
9890         $(AM_V_GEN)if ! test -f "[$]@"; then \
9891           (cd "$(dir [$]@)" && \
9892             $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
9893             mv "$(notdir [$]@).tmp" "$(notdir [$]@)"); \
9894         else \
9895           (cd "$(dir [$]@)" && \
9896             $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
9897             msgmerge -o "$(notdir [$]@)" "$(notdir [$]@)" "$(notdir [$]@).tmp" && \
9898             rm "$(notdir [$]@).tmp"); \
9899         fi
9900
9901 $(_HELP_MOFILES): %.mo: %.po
9902         $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
9903         $(AM_V_GEN)msgfmt -o "[$]@" "$<"
9904
9905 $(_HELP_LC_FILES): $(_HELP_LINGUAS)
9906 $(_HELP_LINGUAS): $(_HELP_LC_STAMPS)
9907 $(_HELP_LC_STAMPS): %.stamp: %.mo
9908 $(_HELP_LC_STAMPS): $(_HELP_C_FILES) $(_HELP_C_EXTRA)
9909         $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
9910         $(_HELP_LC_VERBOSE)if test -d "C"; then d="../"; else d="$(abs_srcdir)/"; fi; \
9911         mo="$(dir [$]@)$(patsubst %/$(notdir [$]@),%,[$]@).mo"; \
9912         if test -f "$${mo}"; then mo="../$${mo}"; else mo="$(abs_srcdir)/$${mo}"; fi; \
9913         (cd "$(dir [$]@)" && $(ITSTOOL) -m "$${mo}" $(foreach f,$(_HELP_C_FILES),$${d}/$(f))) && \
9914         touch "[$]@"
9915
9916 .PHONY: clean-help
9917 mostlyclean-am: $(if $(HELP_ID),clean-help)
9918 clean-help:
9919         rm -f $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_MOFILES)
9920
9921 EXTRA_DIST ?=
9922 EXTRA_DIST += $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
9923 EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).stamp)
9924 EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).po)
9925 EXTRA_DIST += $(foreach f,$(HELP_MEDIA),$(foreach lc,$(HELP_LINGUAS),$(wildcard $(lc)/$(f))))
9926
9927 distdir: distdir-help-files
9928 distdir-help-files:
9929         @for lc in C $(HELP_LINGUAS); do \
9930           $(MKDIR_P) "$(distdir)/$$lc"; \
9931           for file in $(HELP_FILES); do \
9932             if test -f "$$lc/$$file"; then d=./; else d=$(srcdir)/; fi; \
9933             cp -p "$$d$$lc/$$file" "$(distdir)/$$lc/" || exit 1; \
9934           done; \
9935         done; \
9936
9937 .PHONY: check-help
9938 check: check-help
9939 check-help:
9940         for lc in C $(_HELP_LINGUAS); do \
9941           if test -d "$$lc"; \
9942             then d=; \
9943             xmlpath="$$lc"; \
9944           else \
9945             d="$(srcdir)/"; \
9946             xmlpath="$$lc:$(srcdir)/$$lc"; \
9947           fi; \
9948           for page in $(HELP_FILES); do \
9949             echo "$(XMLLINT) --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
9950             $(XMLLINT) --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
9951           done; \
9952         done
9953
9954
9955 .PHONY: install-help
9956 install-data-am: $(if $(HELP_ID),install-help)
9957 install-help:
9958         @for lc in C $(_HELP_LINGUAS); do \
9959           $(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)" || exit 1; \
9960         done
9961         @for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
9962           if test -f "$$lc/$$f"; then d=; else d="$(srcdir)/"; fi; \
9963           helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
9964           if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
9965           echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir`basename $$f`"; \
9966           $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir`basename $$f`" || exit 1; \
9967         done; done
9968         @for f in $(_HELP_C_EXTRA); do \
9969           lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
9970           if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
9971           helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
9972           if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
9973           echo "$(INSTALL_DATA) $$d$$f $$helpdir`basename $$f`"; \
9974           $(INSTALL_DATA) "$$d$$f" "$$helpdir`basename $$f`" || exit 1; \
9975         done
9976         @for f in $(HELP_MEDIA); do \
9977           for lc in C $(_HELP_LINGUAS); do \
9978             if test -f "$$lc$$f"; then d=; else d="$(srcdir)/"; fi; \
9979             helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
9980             mdir=`dirname "$$f"`; \
9981             if test "x$mdir" = "x."; then mdir=""; fi; \
9982             if ! test -d "$$helpdir$$mdir"; then $(mkinstalldirs) "$$helpdir$$mdir"; fi; \
9983             if test -f "$$d$$lc/$$f"; then \
9984               echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir$$f"; \
9985               $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir$$f" || exit 1; \
9986             elif test "x$$lc" != "xC"; then \
9987               echo "$(LN_S) -f $(HELP_DIR)/C/$(HELP_ID)/$$f $$helpdir$$f"; \
9988               $(LN_S) -f "$(HELP_DIR)/C/$(HELP_ID)/$$f" "$$helpdir$$f" || exit 1; \
9989             fi; \
9990           done; \
9991         done
9992
9993 .PHONY: uninstall-help
9994 uninstall-am: $(if $(HELP_ID),uninstall-help)
9995 uninstall-help:
9996         for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
9997           helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
9998           echo "rm -f $$helpdir`basename $$f`"; \
9999           rm -f "$$helpdir`basename $$f`"; \
10000         done; done
10001         @for f in $(_HELP_C_EXTRA); do \
10002           lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
10003           helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
10004           echo "rm -f $$helpdir`basename $$f`"; \
10005           rm -f "$$helpdir`basename $$f`"; \
10006         done
10007         @for f in $(HELP_MEDIA); do \
10008           for lc in C $(_HELP_LINGUAS); do \
10009             helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
10010             echo "rm -f $$helpdir$$f"; \
10011             rm -f "$$helpdir$$f"; \
10012           done; \
10013         done;
10014 '
10015 AC_SUBST([YELP_HELP_RULES])
10016 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([YELP_HELP_RULES])])
10017 ])
10018
10019 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
10020 #
10021 # This file is free software; the Free Software Foundation
10022 # gives unlimited permission to copy and/or distribute it,
10023 # with or without modifications, as long as this notice is preserved.
10024
10025 # AM_AUTOMAKE_VERSION(VERSION)
10026 # ----------------------------
10027 # Automake X.Y traces this macro to ensure aclocal.m4 has been
10028 # generated from the m4 files accompanying Automake X.Y.
10029 # (This private macro should not be called outside this file.)
10030 AC_DEFUN([AM_AUTOMAKE_VERSION],
10031 [am__api_version='1.14'
10032 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
10033 dnl require some minimum version.  Point them to the right macro.
10034 m4_if([$1], [1.14.1], [],
10035       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
10036 ])
10037
10038 # _AM_AUTOCONF_VERSION(VERSION)
10039 # -----------------------------
10040 # aclocal traces this macro to find the Autoconf version.
10041 # This is a private macro too.  Using m4_define simplifies
10042 # the logic in aclocal, which can simply ignore this definition.
10043 m4_define([_AM_AUTOCONF_VERSION], [])
10044
10045 # AM_SET_CURRENT_AUTOMAKE_VERSION
10046 # -------------------------------
10047 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
10048 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
10049 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
10050 [AM_AUTOMAKE_VERSION([1.14.1])dnl
10051 m4_ifndef([AC_AUTOCONF_VERSION],
10052   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
10053 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
10054
10055 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
10056
10057 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10058 #
10059 # This file is free software; the Free Software Foundation
10060 # gives unlimited permission to copy and/or distribute it,
10061 # with or without modifications, as long as this notice is preserved.
10062
10063 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
10064 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
10065 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
10066 #
10067 # Of course, Automake must honor this variable whenever it calls a
10068 # tool from the auxiliary directory.  The problem is that $srcdir (and
10069 # therefore $ac_aux_dir as well) can be either absolute or relative,
10070 # depending on how configure is run.  This is pretty annoying, since
10071 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
10072 # source directory, any form will work fine, but in subdirectories a
10073 # relative path needs to be adjusted first.
10074 #
10075 # $ac_aux_dir/missing
10076 #    fails when called from a subdirectory if $ac_aux_dir is relative
10077 # $top_srcdir/$ac_aux_dir/missing
10078 #    fails if $ac_aux_dir is absolute,
10079 #    fails when called from a subdirectory in a VPATH build with
10080 #          a relative $ac_aux_dir
10081 #
10082 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
10083 # are both prefixed by $srcdir.  In an in-source build this is usually
10084 # harmless because $srcdir is '.', but things will broke when you
10085 # start a VPATH build or use an absolute $srcdir.
10086 #
10087 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
10088 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
10089 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
10090 # and then we would define $MISSING as
10091 #   MISSING="\${SHELL} $am_aux_dir/missing"
10092 # This will work as long as MISSING is not called from configure, because
10093 # unfortunately $(top_srcdir) has no meaning in configure.
10094 # However there are other variables, like CC, which are often used in
10095 # configure, and could therefore not use this "fixed" $ac_aux_dir.
10096 #
10097 # Another solution, used here, is to always expand $ac_aux_dir to an
10098 # absolute PATH.  The drawback is that using absolute paths prevent a
10099 # configured tree to be moved without reconfiguration.
10100
10101 AC_DEFUN([AM_AUX_DIR_EXPAND],
10102 [dnl Rely on autoconf to set up CDPATH properly.
10103 AC_PREREQ([2.50])dnl
10104 # expand $ac_aux_dir to an absolute path
10105 am_aux_dir=`cd $ac_aux_dir && pwd`
10106 ])
10107
10108 # AM_CONDITIONAL                                            -*- Autoconf -*-
10109
10110 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
10111 #
10112 # This file is free software; the Free Software Foundation
10113 # gives unlimited permission to copy and/or distribute it,
10114 # with or without modifications, as long as this notice is preserved.
10115
10116 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
10117 # -------------------------------------
10118 # Define a conditional.
10119 AC_DEFUN([AM_CONDITIONAL],
10120 [AC_PREREQ([2.52])dnl
10121  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
10122        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
10123 AC_SUBST([$1_TRUE])dnl
10124 AC_SUBST([$1_FALSE])dnl
10125 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
10126 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
10127 m4_define([_AM_COND_VALUE_$1], [$2])dnl
10128 if $2; then
10129   $1_TRUE=
10130   $1_FALSE='#'
10131 else
10132   $1_TRUE='#'
10133   $1_FALSE=
10134 fi
10135 AC_CONFIG_COMMANDS_PRE(
10136 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
10137   AC_MSG_ERROR([[conditional "$1" was never defined.
10138 Usually this means the macro was only invoked conditionally.]])
10139 fi])])
10140
10141 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
10142 #
10143 # This file is free software; the Free Software Foundation
10144 # gives unlimited permission to copy and/or distribute it,
10145 # with or without modifications, as long as this notice is preserved.
10146
10147
10148 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
10149 # written in clear, in which case automake, when reading aclocal.m4,
10150 # will think it sees a *use*, and therefore will trigger all it's
10151 # C support machinery.  Also note that it means that autoscan, seeing
10152 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10153
10154
10155 # _AM_DEPENDENCIES(NAME)
10156 # ----------------------
10157 # See how the compiler implements dependency checking.
10158 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
10159 # We try a few techniques and use that to set a single cache variable.
10160 #
10161 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
10162 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
10163 # dependency, and given that the user is not expected to run this macro,
10164 # just rely on AC_PROG_CC.
10165 AC_DEFUN([_AM_DEPENDENCIES],
10166 [AC_REQUIRE([AM_SET_DEPDIR])dnl
10167 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
10168 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
10169 AC_REQUIRE([AM_DEP_TRACK])dnl
10170
10171 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
10172       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
10173       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
10174       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
10175       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
10176       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
10177                     [depcc="$$1"   am_compiler_list=])
10178
10179 AC_CACHE_CHECK([dependency style of $depcc],
10180                [am_cv_$1_dependencies_compiler_type],
10181 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10182   # We make a subdir and do the tests there.  Otherwise we can end up
10183   # making bogus files that we don't know about and never remove.  For
10184   # instance it was reported that on HP-UX the gcc test will end up
10185   # making a dummy file named 'D' -- because '-MD' means "put the output
10186   # in D".
10187   rm -rf conftest.dir
10188   mkdir conftest.dir
10189   # Copy depcomp to subdir because otherwise we won't find it if we're
10190   # using a relative directory.
10191   cp "$am_depcomp" conftest.dir
10192   cd conftest.dir
10193   # We will build objects and dependencies in a subdirectory because
10194   # it helps to detect inapplicable dependency modes.  For instance
10195   # both Tru64's cc and ICC support -MD to output dependencies as a
10196   # side effect of compilation, but ICC will put the dependencies in
10197   # the current directory while Tru64 will put them in the object
10198   # directory.
10199   mkdir sub
10200
10201   am_cv_$1_dependencies_compiler_type=none
10202   if test "$am_compiler_list" = ""; then
10203      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
10204   fi
10205   am__universal=false
10206   m4_case([$1], [CC],
10207     [case " $depcc " in #(
10208      *\ -arch\ *\ -arch\ *) am__universal=true ;;
10209      esac],
10210     [CXX],
10211     [case " $depcc " in #(
10212      *\ -arch\ *\ -arch\ *) am__universal=true ;;
10213      esac])
10214
10215   for depmode in $am_compiler_list; do
10216     # Setup a source with many dependencies, because some compilers
10217     # like to wrap large dependency lists on column 80 (with \), and
10218     # we should not choose a depcomp mode which is confused by this.
10219     #
10220     # We need to recreate these files for each test, as the compiler may
10221     # overwrite some of them when testing with obscure command lines.
10222     # This happens at least with the AIX C compiler.
10223     : > sub/conftest.c
10224     for i in 1 2 3 4 5 6; do
10225       echo '#include "conftst'$i'.h"' >> sub/conftest.c
10226       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
10227       # Solaris 10 /bin/sh.
10228       echo '/* dummy */' > sub/conftst$i.h
10229     done
10230     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10231
10232     # We check with '-c' and '-o' for the sake of the "dashmstdout"
10233     # mode.  It turns out that the SunPro C++ compiler does not properly
10234     # handle '-M -o', and we need to detect this.  Also, some Intel
10235     # versions had trouble with output in subdirs.
10236     am__obj=sub/conftest.${OBJEXT-o}
10237     am__minus_obj="-o $am__obj"
10238     case $depmode in
10239     gcc)
10240       # This depmode causes a compiler race in universal mode.
10241       test "$am__universal" = false || continue
10242       ;;
10243     nosideeffect)
10244       # After this tag, mechanisms are not by side-effect, so they'll
10245       # only be used when explicitly requested.
10246       if test "x$enable_dependency_tracking" = xyes; then
10247         continue
10248       else
10249         break
10250       fi
10251       ;;
10252     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
10253       # This compiler won't grok '-c -o', but also, the minuso test has
10254       # not run yet.  These depmodes are late enough in the game, and
10255       # so weak that their functioning should not be impacted.
10256       am__obj=conftest.${OBJEXT-o}
10257       am__minus_obj=
10258       ;;
10259     none) break ;;
10260     esac
10261     if depmode=$depmode \
10262        source=sub/conftest.c object=$am__obj \
10263        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
10264        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
10265          >/dev/null 2>conftest.err &&
10266        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
10267        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
10268        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
10269        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10270       # icc doesn't choke on unknown options, it will just issue warnings
10271       # or remarks (even with -Werror).  So we grep stderr for any message
10272       # that says an option was ignored or not supported.
10273       # When given -MP, icc 7.0 and 7.1 complain thusly:
10274       #   icc: Command line warning: ignoring option '-M'; no argument required
10275       # The diagnosis changed in icc 8.0:
10276       #   icc: Command line remark: option '-MP' not supported
10277       if (grep 'ignoring option' conftest.err ||
10278           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10279         am_cv_$1_dependencies_compiler_type=$depmode
10280         break
10281       fi
10282     fi
10283   done
10284
10285   cd ..
10286   rm -rf conftest.dir
10287 else
10288   am_cv_$1_dependencies_compiler_type=none
10289 fi
10290 ])
10291 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10292 AM_CONDITIONAL([am__fastdep$1], [
10293   test "x$enable_dependency_tracking" != xno \
10294   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
10295 ])
10296
10297
10298 # AM_SET_DEPDIR
10299 # -------------
10300 # Choose a directory name for dependency files.
10301 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
10302 AC_DEFUN([AM_SET_DEPDIR],
10303 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10304 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
10305 ])
10306
10307
10308 # AM_DEP_TRACK
10309 # ------------
10310 AC_DEFUN([AM_DEP_TRACK],
10311 [AC_ARG_ENABLE([dependency-tracking], [dnl
10312 AS_HELP_STRING(
10313   [--enable-dependency-tracking],
10314   [do not reject slow dependency extractors])
10315 AS_HELP_STRING(
10316   [--disable-dependency-tracking],
10317   [speeds up one-time build])])
10318 if test "x$enable_dependency_tracking" != xno; then
10319   am_depcomp="$ac_aux_dir/depcomp"
10320   AMDEPBACKSLASH='\'
10321   am__nodep='_no'
10322 fi
10323 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
10324 AC_SUBST([AMDEPBACKSLASH])dnl
10325 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
10326 AC_SUBST([am__nodep])dnl
10327 _AM_SUBST_NOTMAKE([am__nodep])dnl
10328 ])
10329
10330 # Generate code to set up dependency tracking.              -*- Autoconf -*-
10331
10332 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
10333 #
10334 # This file is free software; the Free Software Foundation
10335 # gives unlimited permission to copy and/or distribute it,
10336 # with or without modifications, as long as this notice is preserved.
10337
10338
10339 # _AM_OUTPUT_DEPENDENCY_COMMANDS
10340 # ------------------------------
10341 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
10342 [{
10343   # Older Autoconf quotes --file arguments for eval, but not when files
10344   # are listed without --file.  Let's play safe and only enable the eval
10345   # if we detect the quoting.
10346   case $CONFIG_FILES in
10347   *\'*) eval set x "$CONFIG_FILES" ;;
10348   *)   set x $CONFIG_FILES ;;
10349   esac
10350   shift
10351   for mf
10352   do
10353     # Strip MF so we end up with the name of the file.
10354     mf=`echo "$mf" | sed -e 's/:.*$//'`
10355     # Check whether this is an Automake generated Makefile or not.
10356     # We used to match only the files named 'Makefile.in', but
10357     # some people rename them; so instead we look at the file content.
10358     # Grep'ing the first line is not enough: some people post-process
10359     # each Makefile.in and add a new line on top of each file to say so.
10360     # Grep'ing the whole file is not good either: AIX grep has a line
10361     # limit of 2048, but all sed's we know have understand at least 4000.
10362     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
10363       dirpart=`AS_DIRNAME("$mf")`
10364     else
10365       continue
10366     fi
10367     # Extract the definition of DEPDIR, am__include, and am__quote
10368     # from the Makefile without running 'make'.
10369     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
10370     test -z "$DEPDIR" && continue
10371     am__include=`sed -n 's/^am__include = //p' < "$mf"`
10372     test -z "$am__include" && continue
10373     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
10374     # Find all dependency output files, they are included files with
10375     # $(DEPDIR) in their names.  We invoke sed twice because it is the
10376     # simplest approach to changing $(DEPDIR) to its actual value in the
10377     # expansion.
10378     for file in `sed -n "
10379       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
10380          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
10381       # Make sure the directory exists.
10382       test -f "$dirpart/$file" && continue
10383       fdir=`AS_DIRNAME(["$file"])`
10384       AS_MKDIR_P([$dirpart/$fdir])
10385       # echo "creating $dirpart/$file"
10386       echo '# dummy' > "$dirpart/$file"
10387     done
10388   done
10389 }
10390 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10391
10392
10393 # AM_OUTPUT_DEPENDENCY_COMMANDS
10394 # -----------------------------
10395 # This macro should only be invoked once -- use via AC_REQUIRE.
10396 #
10397 # This code is only required when automatic dependency tracking
10398 # is enabled.  FIXME.  This creates each '.P' file that we will
10399 # need in order to bootstrap the dependency handling code.
10400 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10401 [AC_CONFIG_COMMANDS([depfiles],
10402      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10403      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10404 ])
10405
10406 # Do all the work for Automake.                             -*- Autoconf -*-
10407
10408 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
10409 #
10410 # This file is free software; the Free Software Foundation
10411 # gives unlimited permission to copy and/or distribute it,
10412 # with or without modifications, as long as this notice is preserved.
10413
10414 # This macro actually does too much.  Some checks are only needed if
10415 # your package does certain things.  But this isn't really a big deal.
10416
10417 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
10418 m4_define([AC_PROG_CC],
10419 m4_defn([AC_PROG_CC])
10420 [_AM_PROG_CC_C_O
10421 ])
10422
10423 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10424 # AM_INIT_AUTOMAKE([OPTIONS])
10425 # -----------------------------------------------
10426 # The call with PACKAGE and VERSION arguments is the old style
10427 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
10428 # and VERSION should now be passed to AC_INIT and removed from
10429 # the call to AM_INIT_AUTOMAKE.
10430 # We support both call styles for the transition.  After
10431 # the next Automake release, Autoconf can make the AC_INIT
10432 # arguments mandatory, and then we can depend on a new Autoconf
10433 # release and drop the old call support.
10434 AC_DEFUN([AM_INIT_AUTOMAKE],
10435 [AC_PREREQ([2.65])dnl
10436 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
10437 dnl the ones we care about.
10438 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10439 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10440 AC_REQUIRE([AC_PROG_INSTALL])dnl
10441 if test "`cd $srcdir && pwd`" != "`pwd`"; then
10442   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10443   # is not polluted with repeated "-I."
10444   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10445   # test to see if srcdir already configured
10446   if test -f $srcdir/config.status; then
10447     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10448   fi
10449 fi
10450
10451 # test whether we have cygpath
10452 if test -z "$CYGPATH_W"; then
10453   if (cygpath --version) >/dev/null 2>/dev/null; then
10454     CYGPATH_W='cygpath -w'
10455   else
10456     CYGPATH_W=echo
10457   fi
10458 fi
10459 AC_SUBST([CYGPATH_W])
10460
10461 # Define the identity of the package.
10462 dnl Distinguish between old-style and new-style calls.
10463 m4_ifval([$2],
10464 [AC_DIAGNOSE([obsolete],
10465              [$0: two- and three-arguments forms are deprecated.])
10466 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10467  AC_SUBST([PACKAGE], [$1])dnl
10468  AC_SUBST([VERSION], [$2])],
10469 [_AM_SET_OPTIONS([$1])dnl
10470 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10471 m4_if(
10472   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
10473   [ok:ok],,
10474   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10475  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10476  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10477
10478 _AM_IF_OPTION([no-define],,
10479 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
10480  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
10481
10482 # Some tools Automake needs.
10483 AC_REQUIRE([AM_SANITY_CHECK])dnl
10484 AC_REQUIRE([AC_ARG_PROGRAM])dnl
10485 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
10486 AM_MISSING_PROG([AUTOCONF], [autoconf])
10487 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
10488 AM_MISSING_PROG([AUTOHEADER], [autoheader])
10489 AM_MISSING_PROG([MAKEINFO], [makeinfo])
10490 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10491 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
10492 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10493 # For better backward compatibility.  To be removed once Automake 1.9.x
10494 # dies out for good.  For more background, see:
10495 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
10496 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
10497 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
10498 # We need awk for the "check" target.  The system "awk" is bad on
10499 # some platforms.
10500 AC_REQUIRE([AC_PROG_AWK])dnl
10501 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10502 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10503 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
10504               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10505                              [_AM_PROG_TAR([v7])])])
10506 _AM_IF_OPTION([no-dependencies],,
10507 [AC_PROVIDE_IFELSE([AC_PROG_CC],
10508                   [_AM_DEPENDENCIES([CC])],
10509                   [m4_define([AC_PROG_CC],
10510                              m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
10511 AC_PROVIDE_IFELSE([AC_PROG_CXX],
10512                   [_AM_DEPENDENCIES([CXX])],
10513                   [m4_define([AC_PROG_CXX],
10514                              m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
10515 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
10516                   [_AM_DEPENDENCIES([OBJC])],
10517                   [m4_define([AC_PROG_OBJC],
10518                              m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
10519 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
10520                   [_AM_DEPENDENCIES([OBJCXX])],
10521                   [m4_define([AC_PROG_OBJCXX],
10522                              m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
10523 ])
10524 AC_REQUIRE([AM_SILENT_RULES])dnl
10525 dnl The testsuite driver may need to know about EXEEXT, so add the
10526 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
10527 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
10528 AC_CONFIG_COMMANDS_PRE(dnl
10529 [m4_provide_if([_AM_COMPILER_EXEEXT],
10530   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
10531
10532 # POSIX will say in a future version that running "rm -f" with no argument
10533 # is OK; and we want to be able to make that assumption in our Makefile
10534 # recipes.  So use an aggressive probe to check that the usage we want is
10535 # actually supported "in the wild" to an acceptable degree.
10536 # See automake bug#10828.
10537 # To make any issue more visible, cause the running configure to be aborted
10538 # by default if the 'rm' program in use doesn't match our expectations; the
10539 # user can still override this though.
10540 if rm -f && rm -fr && rm -rf; then : OK; else
10541   cat >&2 <<'END'
10542 Oops!
10543
10544 Your 'rm' program seems unable to run without file operands specified
10545 on the command line, even when the '-f' option is present.  This is contrary
10546 to the behaviour of most rm programs out there, and not conforming with
10547 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
10548
10549 Please tell bug-automake@gnu.org about your system, including the value
10550 of your $PATH and any error possibly output before this message.  This
10551 can help us improve future automake versions.
10552
10553 END
10554   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
10555     echo 'Configuration will proceed anyway, since you have set the' >&2
10556     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
10557     echo >&2
10558   else
10559     cat >&2 <<'END'
10560 Aborting the configuration process, to ensure you take notice of the issue.
10561
10562 You can download and install GNU coreutils to get an 'rm' implementation
10563 that behaves properly: <http://www.gnu.org/software/coreutils/>.
10564
10565 If you want to complete the configuration process using your problematic
10566 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
10567 to "yes", and re-run configure.
10568
10569 END
10570     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
10571   fi
10572 fi])
10573
10574 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
10575 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10576 dnl mangled by Autoconf and run in a shell conditional statement.
10577 m4_define([_AC_COMPILER_EXEEXT],
10578 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10579
10580 # When config.status generates a header, we must update the stamp-h file.
10581 # This file resides in the same directory as the config header
10582 # that is generated.  The stamp files are numbered to have different names.
10583
10584 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10585 # loop where config.status creates the headers, so we can generate
10586 # our stamp files there.
10587 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10588 [# Compute $1's index in $config_headers.
10589 _am_arg=$1
10590 _am_stamp_count=1
10591 for _am_header in $config_headers :; do
10592   case $_am_header in
10593     $_am_arg | $_am_arg:* )
10594       break ;;
10595     * )
10596       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10597   esac
10598 done
10599 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10600
10601 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10602 #
10603 # This file is free software; the Free Software Foundation
10604 # gives unlimited permission to copy and/or distribute it,
10605 # with or without modifications, as long as this notice is preserved.
10606
10607 # AM_PROG_INSTALL_SH
10608 # ------------------
10609 # Define $install_sh.
10610 AC_DEFUN([AM_PROG_INSTALL_SH],
10611 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10612 if test x"${install_sh}" != xset; then
10613   case $am_aux_dir in
10614   *\ * | *\     *)
10615     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10616   *)
10617     install_sh="\${SHELL} $am_aux_dir/install-sh"
10618   esac
10619 fi
10620 AC_SUBST([install_sh])])
10621
10622 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
10623 #
10624 # This file is free software; the Free Software Foundation
10625 # gives unlimited permission to copy and/or distribute it,
10626 # with or without modifications, as long as this notice is preserved.
10627
10628 # Check whether the underlying file-system supports filenames
10629 # with a leading dot.  For instance MS-DOS doesn't.
10630 AC_DEFUN([AM_SET_LEADING_DOT],
10631 [rm -rf .tst 2>/dev/null
10632 mkdir .tst 2>/dev/null
10633 if test -d .tst; then
10634   am__leading_dot=.
10635 else
10636   am__leading_dot=_
10637 fi
10638 rmdir .tst 2>/dev/null
10639 AC_SUBST([am__leading_dot])])
10640
10641 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
10642 # From Jim Meyering
10643
10644 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
10645 #
10646 # This file is free software; the Free Software Foundation
10647 # gives unlimited permission to copy and/or distribute it,
10648 # with or without modifications, as long as this notice is preserved.
10649
10650 # AM_MAINTAINER_MODE([DEFAULT-MODE])
10651 # ----------------------------------
10652 # Control maintainer-specific portions of Makefiles.
10653 # Default is to disable them, unless 'enable' is passed literally.
10654 # For symmetry, 'disable' may be passed as well.  Anyway, the user
10655 # can override the default with the --enable/--disable switch.
10656 AC_DEFUN([AM_MAINTAINER_MODE],
10657 [m4_case(m4_default([$1], [disable]),
10658        [enable], [m4_define([am_maintainer_other], [disable])],
10659        [disable], [m4_define([am_maintainer_other], [enable])],
10660        [m4_define([am_maintainer_other], [enable])
10661         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
10662 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
10663   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
10664   AC_ARG_ENABLE([maintainer-mode],
10665     [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
10666       am_maintainer_other[ make rules and dependencies not useful
10667       (and sometimes confusing) to the casual installer])],
10668     [USE_MAINTAINER_MODE=$enableval],
10669     [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
10670   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
10671   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
10672   MAINT=$MAINTAINER_MODE_TRUE
10673   AC_SUBST([MAINT])dnl
10674 ]
10675 )
10676
10677 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
10678
10679 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10680 #
10681 # This file is free software; the Free Software Foundation
10682 # gives unlimited permission to copy and/or distribute it,
10683 # with or without modifications, as long as this notice is preserved.
10684
10685 # AM_MAKE_INCLUDE()
10686 # -----------------
10687 # Check to see how make treats includes.
10688 AC_DEFUN([AM_MAKE_INCLUDE],
10689 [am_make=${MAKE-make}
10690 cat > confinc << 'END'
10691 am__doit:
10692         @echo this is the am__doit target
10693 .PHONY: am__doit
10694 END
10695 # If we don't find an include directive, just comment out the code.
10696 AC_MSG_CHECKING([for style of include used by $am_make])
10697 am__include="#"
10698 am__quote=
10699 _am_result=none
10700 # First try GNU make style include.
10701 echo "include confinc" > confmf
10702 # Ignore all kinds of additional output from 'make'.
10703 case `$am_make -s -f confmf 2> /dev/null` in #(
10704 *the\ am__doit\ target*)
10705   am__include=include
10706   am__quote=
10707   _am_result=GNU
10708   ;;
10709 esac
10710 # Now try BSD make style include.
10711 if test "$am__include" = "#"; then
10712    echo '.include "confinc"' > confmf
10713    case `$am_make -s -f confmf 2> /dev/null` in #(
10714    *the\ am__doit\ target*)
10715      am__include=.include
10716      am__quote="\""
10717      _am_result=BSD
10718      ;;
10719    esac
10720 fi
10721 AC_SUBST([am__include])
10722 AC_SUBST([am__quote])
10723 AC_MSG_RESULT([$_am_result])
10724 rm -f confinc confmf
10725 ])
10726
10727 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10728
10729 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
10730 #
10731 # This file is free software; the Free Software Foundation
10732 # gives unlimited permission to copy and/or distribute it,
10733 # with or without modifications, as long as this notice is preserved.
10734
10735 # AM_MISSING_PROG(NAME, PROGRAM)
10736 # ------------------------------
10737 AC_DEFUN([AM_MISSING_PROG],
10738 [AC_REQUIRE([AM_MISSING_HAS_RUN])
10739 $1=${$1-"${am_missing_run}$2"}
10740 AC_SUBST($1)])
10741
10742 # AM_MISSING_HAS_RUN
10743 # ------------------
10744 # Define MISSING if not defined so far and test if it is modern enough.
10745 # If it is, set am_missing_run to use it, otherwise, to nothing.
10746 AC_DEFUN([AM_MISSING_HAS_RUN],
10747 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10748 AC_REQUIRE_AUX_FILE([missing])dnl
10749 if test x"${MISSING+set}" != xset; then
10750   case $am_aux_dir in
10751   *\ * | *\     *)
10752     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10753   *)
10754     MISSING="\${SHELL} $am_aux_dir/missing" ;;
10755   esac
10756 fi
10757 # Use eval to expand $SHELL
10758 if eval "$MISSING --is-lightweight"; then
10759   am_missing_run="$MISSING "
10760 else
10761   am_missing_run=
10762   AC_MSG_WARN(['missing' script is too old or missing])
10763 fi
10764 ])
10765
10766 # Helper functions for option handling.                     -*- Autoconf -*-
10767
10768 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10769 #
10770 # This file is free software; the Free Software Foundation
10771 # gives unlimited permission to copy and/or distribute it,
10772 # with or without modifications, as long as this notice is preserved.
10773
10774 # _AM_MANGLE_OPTION(NAME)
10775 # -----------------------
10776 AC_DEFUN([_AM_MANGLE_OPTION],
10777 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10778
10779 # _AM_SET_OPTION(NAME)
10780 # --------------------
10781 # Set option NAME.  Presently that only means defining a flag for this option.
10782 AC_DEFUN([_AM_SET_OPTION],
10783 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
10784
10785 # _AM_SET_OPTIONS(OPTIONS)
10786 # ------------------------
10787 # OPTIONS is a space-separated list of Automake options.
10788 AC_DEFUN([_AM_SET_OPTIONS],
10789 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10790
10791 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10792 # -------------------------------------------
10793 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10794 AC_DEFUN([_AM_IF_OPTION],
10795 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10796
10797 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
10798 #
10799 # This file is free software; the Free Software Foundation
10800 # gives unlimited permission to copy and/or distribute it,
10801 # with or without modifications, as long as this notice is preserved.
10802
10803 # _AM_PROG_CC_C_O
10804 # ---------------
10805 # Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
10806 # to automatically call this.
10807 AC_DEFUN([_AM_PROG_CC_C_O],
10808 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10809 AC_REQUIRE_AUX_FILE([compile])dnl
10810 AC_LANG_PUSH([C])dnl
10811 AC_CACHE_CHECK(
10812   [whether $CC understands -c and -o together],
10813   [am_cv_prog_cc_c_o],
10814   [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
10815   # Make sure it works both with $CC and with simple cc.
10816   # Following AC_PROG_CC_C_O, we do the test twice because some
10817   # compilers refuse to overwrite an existing .o file with -o,
10818   # though they will create one.
10819   am_cv_prog_cc_c_o=yes
10820   for am_i in 1 2; do
10821     if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
10822          && test -f conftest2.$ac_objext; then
10823       : OK
10824     else
10825       am_cv_prog_cc_c_o=no
10826       break
10827     fi
10828   done
10829   rm -f core conftest*
10830   unset am_i])
10831 if test "$am_cv_prog_cc_c_o" != yes; then
10832    # Losing compiler, so override with the script.
10833    # FIXME: It is wrong to rewrite CC.
10834    # But if we don't then we get into trouble of one sort or another.
10835    # A longer-term fix would be to have automake use am__CC in this case,
10836    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
10837    CC="$am_aux_dir/compile $CC"
10838 fi
10839 AC_LANG_POP([C])])
10840
10841 # For backward compatibility.
10842 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
10843
10844 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10845 #
10846 # This file is free software; the Free Software Foundation
10847 # gives unlimited permission to copy and/or distribute it,
10848 # with or without modifications, as long as this notice is preserved.
10849
10850 # AM_RUN_LOG(COMMAND)
10851 # -------------------
10852 # Run COMMAND, save the exit status in ac_status, and log it.
10853 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
10854 AC_DEFUN([AM_RUN_LOG],
10855 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
10856    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
10857    ac_status=$?
10858    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
10859    (exit $ac_status); }])
10860
10861 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
10862
10863 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
10864 #
10865 # This file is free software; the Free Software Foundation
10866 # gives unlimited permission to copy and/or distribute it,
10867 # with or without modifications, as long as this notice is preserved.
10868
10869 # AM_SANITY_CHECK
10870 # ---------------
10871 AC_DEFUN([AM_SANITY_CHECK],
10872 [AC_MSG_CHECKING([whether build environment is sane])
10873 # Reject unsafe characters in $srcdir or the absolute working directory
10874 # name.  Accept space and tab only in the latter.
10875 am_lf='
10876 '
10877 case `pwd` in
10878   *[[\\\"\#\$\&\'\`$am_lf]]*)
10879     AC_MSG_ERROR([unsafe absolute working directory name]);;
10880 esac
10881 case $srcdir in
10882   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
10883     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
10884 esac
10885
10886 # Do 'set' in a subshell so we don't clobber the current shell's
10887 # arguments.  Must try -L first in case configure is actually a
10888 # symlink; some systems play weird games with the mod time of symlinks
10889 # (eg FreeBSD returns the mod time of the symlink's containing
10890 # directory).
10891 if (
10892    am_has_slept=no
10893    for am_try in 1 2; do
10894      echo "timestamp, slept: $am_has_slept" > conftest.file
10895      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10896      if test "$[*]" = "X"; then
10897         # -L didn't work.
10898         set X `ls -t "$srcdir/configure" conftest.file`
10899      fi
10900      if test "$[*]" != "X $srcdir/configure conftest.file" \
10901         && test "$[*]" != "X conftest.file $srcdir/configure"; then
10902
10903         # If neither matched, then we have a broken ls.  This can happen
10904         # if, for instance, CONFIG_SHELL is bash and it inherits a
10905         # broken ls alias from the environment.  This has actually
10906         # happened.  Such a system could not be considered "sane".
10907         AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10908   alias in your environment])
10909      fi
10910      if test "$[2]" = conftest.file || test $am_try -eq 2; then
10911        break
10912      fi
10913      # Just in case.
10914      sleep 1
10915      am_has_slept=yes
10916    done
10917    test "$[2]" = conftest.file
10918    )
10919 then
10920    # Ok.
10921    :
10922 else
10923    AC_MSG_ERROR([newly created file is older than distributed files!
10924 Check your system clock])
10925 fi
10926 AC_MSG_RESULT([yes])
10927 # If we didn't sleep, we still need to ensure time stamps of config.status and
10928 # generated files are strictly newer.
10929 am_sleep_pid=
10930 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
10931   ( sleep 1 ) &
10932   am_sleep_pid=$!
10933 fi
10934 AC_CONFIG_COMMANDS_PRE(
10935   [AC_MSG_CHECKING([that generated files are newer than configure])
10936    if test -n "$am_sleep_pid"; then
10937      # Hide warnings about reused PIDs.
10938      wait $am_sleep_pid 2>/dev/null
10939    fi
10940    AC_MSG_RESULT([done])])
10941 rm -f conftest.file
10942 ])
10943
10944 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
10945 #
10946 # This file is free software; the Free Software Foundation
10947 # gives unlimited permission to copy and/or distribute it,
10948 # with or without modifications, as long as this notice is preserved.
10949
10950 # AM_SILENT_RULES([DEFAULT])
10951 # --------------------------
10952 # Enable less verbose build rules; with the default set to DEFAULT
10953 # ("yes" being less verbose, "no" or empty being verbose).
10954 AC_DEFUN([AM_SILENT_RULES],
10955 [AC_ARG_ENABLE([silent-rules], [dnl
10956 AS_HELP_STRING(
10957   [--enable-silent-rules],
10958   [less verbose build output (undo: "make V=1")])
10959 AS_HELP_STRING(
10960   [--disable-silent-rules],
10961   [verbose build output (undo: "make V=0")])dnl
10962 ])
10963 case $enable_silent_rules in @%:@ (((
10964   yes) AM_DEFAULT_VERBOSITY=0;;
10965    no) AM_DEFAULT_VERBOSITY=1;;
10966     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
10967 esac
10968 dnl
10969 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
10970 dnl do not support nested variable expansions.
10971 dnl See automake bug#9928 and bug#10237.
10972 am_make=${MAKE-make}
10973 AC_CACHE_CHECK([whether $am_make supports nested variables],
10974    [am_cv_make_support_nested_variables],
10975    [if AS_ECHO([['TRUE=$(BAR$(V))
10976 BAR0=false
10977 BAR1=true
10978 V=1
10979 am__doit:
10980         @$(TRUE)
10981 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
10982   am_cv_make_support_nested_variables=yes
10983 else
10984   am_cv_make_support_nested_variables=no
10985 fi])
10986 if test $am_cv_make_support_nested_variables = yes; then
10987   dnl Using '$V' instead of '$(V)' breaks IRIX make.
10988   AM_V='$(V)'
10989   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
10990 else
10991   AM_V=$AM_DEFAULT_VERBOSITY
10992   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
10993 fi
10994 AC_SUBST([AM_V])dnl
10995 AM_SUBST_NOTMAKE([AM_V])dnl
10996 AC_SUBST([AM_DEFAULT_V])dnl
10997 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
10998 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10999 AM_BACKSLASH='\'
11000 AC_SUBST([AM_BACKSLASH])dnl
11001 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
11002 ])
11003
11004 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
11005 #
11006 # This file is free software; the Free Software Foundation
11007 # gives unlimited permission to copy and/or distribute it,
11008 # with or without modifications, as long as this notice is preserved.
11009
11010 # AM_PROG_INSTALL_STRIP
11011 # ---------------------
11012 # One issue with vendor 'install' (even GNU) is that you can't
11013 # specify the program used to strip binaries.  This is especially
11014 # annoying in cross-compiling environments, where the build's strip
11015 # is unlikely to handle the host's binaries.
11016 # Fortunately install-sh will honor a STRIPPROG variable, so we
11017 # always use install-sh in "make install-strip", and initialize
11018 # STRIPPROG with the value of the STRIP variable (set by the user).
11019 AC_DEFUN([AM_PROG_INSTALL_STRIP],
11020 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
11021 # Installed binaries are usually stripped using 'strip' when the user
11022 # run "make install-strip".  However 'strip' might not be the right
11023 # tool to use in cross-compilation environments, therefore Automake
11024 # will honor the 'STRIP' environment variable to overrule this program.
11025 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
11026 if test "$cross_compiling" != no; then
11027   AC_CHECK_TOOL([STRIP], [strip], :)
11028 fi
11029 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
11030 AC_SUBST([INSTALL_STRIP_PROGRAM])])
11031
11032 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
11033 #
11034 # This file is free software; the Free Software Foundation
11035 # gives unlimited permission to copy and/or distribute it,
11036 # with or without modifications, as long as this notice is preserved.
11037
11038 # _AM_SUBST_NOTMAKE(VARIABLE)
11039 # ---------------------------
11040 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
11041 # This macro is traced by Automake.
11042 AC_DEFUN([_AM_SUBST_NOTMAKE])
11043
11044 # AM_SUBST_NOTMAKE(VARIABLE)
11045 # --------------------------
11046 # Public sister of _AM_SUBST_NOTMAKE.
11047 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
11048
11049 # Check how to create a tarball.                            -*- Autoconf -*-
11050
11051 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
11052 #
11053 # This file is free software; the Free Software Foundation
11054 # gives unlimited permission to copy and/or distribute it,
11055 # with or without modifications, as long as this notice is preserved.
11056
11057 # _AM_PROG_TAR(FORMAT)
11058 # --------------------
11059 # Check how to create a tarball in format FORMAT.
11060 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
11061 #
11062 # Substitute a variable $(am__tar) that is a command
11063 # writing to stdout a FORMAT-tarball containing the directory
11064 # $tardir.
11065 #     tardir=directory && $(am__tar) > result.tar
11066 #
11067 # Substitute a variable $(am__untar) that extract such
11068 # a tarball read from stdin.
11069 #     $(am__untar) < result.tar
11070 #
11071 AC_DEFUN([_AM_PROG_TAR],
11072 [# Always define AMTAR for backward compatibility.  Yes, it's still used
11073 # in the wild :-(  We should find a proper way to deprecate it ...
11074 AC_SUBST([AMTAR], ['$${TAR-tar}'])
11075
11076 # We'll loop over all known methods to create a tar archive until one works.
11077 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
11078
11079 m4_if([$1], [v7],
11080   [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
11081
11082   [m4_case([$1],
11083     [ustar],
11084      [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
11085       # There is notably a 21 bits limit for the UID and the GID.  In fact,
11086       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
11087       # and bug#13588).
11088       am_max_uid=2097151 # 2^21 - 1
11089       am_max_gid=$am_max_uid
11090       # The $UID and $GID variables are not portable, so we need to resort
11091       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
11092       # below are definitely unexpected, so allow the users to see them
11093       # (that is, avoid stderr redirection).
11094       am_uid=`id -u || echo unknown`
11095       am_gid=`id -g || echo unknown`
11096       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
11097       if test $am_uid -le $am_max_uid; then
11098          AC_MSG_RESULT([yes])
11099       else
11100          AC_MSG_RESULT([no])
11101          _am_tools=none
11102       fi
11103       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
11104       if test $am_gid -le $am_max_gid; then
11105          AC_MSG_RESULT([yes])
11106       else
11107         AC_MSG_RESULT([no])
11108         _am_tools=none
11109       fi],
11110
11111   [pax],
11112     [],
11113
11114   [m4_fatal([Unknown tar format])])
11115
11116   AC_MSG_CHECKING([how to create a $1 tar archive])
11117
11118   # Go ahead even if we have the value already cached.  We do so because we
11119   # need to set the values for the 'am__tar' and 'am__untar' variables.
11120   _am_tools=${am_cv_prog_tar_$1-$_am_tools}
11121
11122   for _am_tool in $_am_tools; do
11123     case $_am_tool in
11124     gnutar)
11125       for _am_tar in tar gnutar gtar; do
11126         AM_RUN_LOG([$_am_tar --version]) && break
11127       done
11128       am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
11129       am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
11130       am__untar="$_am_tar -xf -"
11131       ;;
11132     plaintar)
11133       # Must skip GNU tar: if it does not support --format= it doesn't create
11134       # ustar tarball either.
11135       (tar --version) >/dev/null 2>&1 && continue
11136       am__tar='tar chf - "$$tardir"'
11137       am__tar_='tar chf - "$tardir"'
11138       am__untar='tar xf -'
11139       ;;
11140     pax)
11141       am__tar='pax -L -x $1 -w "$$tardir"'
11142       am__tar_='pax -L -x $1 -w "$tardir"'
11143       am__untar='pax -r'
11144       ;;
11145     cpio)
11146       am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11147       am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11148       am__untar='cpio -i -H $1 -d'
11149       ;;
11150     none)
11151       am__tar=false
11152       am__tar_=false
11153       am__untar=false
11154       ;;
11155     esac
11156
11157     # If the value was cached, stop now.  We just wanted to have am__tar
11158     # and am__untar set.
11159     test -n "${am_cv_prog_tar_$1}" && break
11160
11161     # tar/untar a dummy directory, and stop if the command works.
11162     rm -rf conftest.dir
11163     mkdir conftest.dir
11164     echo GrepMe > conftest.dir/file
11165     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
11166     rm -rf conftest.dir
11167     if test -s conftest.tar; then
11168       AM_RUN_LOG([$am__untar <conftest.tar])
11169       AM_RUN_LOG([cat conftest.dir/file])
11170       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
11171     fi
11172   done
11173   rm -rf conftest.dir
11174
11175   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11176   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
11177
11178 AC_SUBST([am__tar])
11179 AC_SUBST([am__untar])
11180 ]) # _AM_PROG_TAR
11181