]> git.sur5r.net Git - glabels/blob - aclocal.m4
Upload to unstable
[glabels] / aclocal.m4
1 # generated automatically by aclocal 1.11.3 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
5 # Inc.
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
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.68],,
18 [m4_warning([this file was generated for autoconf 2.68.
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    AC_REQUIRE([AC_HEADER_STDC])dnl
341    
342    GLIB_LC_MESSAGES
343    GLIB_WITH_NLS
344
345    if test "$gt_cv_have_gettext" = "yes"; then
346      if test "x$ALL_LINGUAS" = "x"; then
347        LINGUAS=
348      else
349        AC_MSG_CHECKING(for catalogs to be installed)
350        NEW_LINGUAS=
351        for presentlang in $ALL_LINGUAS; do
352          useit=no
353          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
354            desiredlanguages="$LINGUAS"
355          else
356            desiredlanguages="$ALL_LINGUAS"
357          fi
358          for desiredlang in $desiredlanguages; do
359            # Use the presentlang catalog if desiredlang is
360            #   a. equal to presentlang, or
361            #   b. a variant of presentlang (because in this case,
362            #      presentlang can be used as a fallback for messages
363            #      which are not translated in the desiredlang catalog).
364            case "$desiredlang" in
365              "$presentlang"*) useit=yes;;
366            esac
367          done
368          if test $useit = yes; then
369            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
370          fi
371        done
372        LINGUAS=$NEW_LINGUAS
373        AC_MSG_RESULT($LINGUAS)
374      fi
375
376      dnl Construct list of names of catalog files to be constructed.
377      if test -n "$LINGUAS"; then
378        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
379      fi
380    fi
381
382    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
383    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
384    dnl Try to locate is.
385    MKINSTALLDIRS=
386    if test -n "$ac_aux_dir"; then
387      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
388    fi
389    if test -z "$MKINSTALLDIRS"; then
390      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
391    fi
392    AC_SUBST(MKINSTALLDIRS)
393
394    dnl Generate list of files to be processed by xgettext which will
395    dnl be included in po/Makefile.
396    test -d po || mkdir po
397    if test "x$srcdir" != "x."; then
398      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
399        posrcprefix="$srcdir/"
400      else
401        posrcprefix="../$srcdir/"
402      fi
403    else
404      posrcprefix="../"
405    fi
406    rm -f po/POTFILES
407    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
408         < $srcdir/po/POTFILES.in > po/POTFILES
409   ])
410
411 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
412 # -------------------------------
413 # Define VARIABLE to the location where catalog files will
414 # be installed by po/Makefile.
415 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
416 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
417 glib_save_prefix="$prefix"
418 glib_save_exec_prefix="$exec_prefix"
419 glib_save_datarootdir="$datarootdir"
420 test "x$prefix" = xNONE && prefix=$ac_default_prefix
421 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
422 datarootdir=`eval echo "${datarootdir}"`
423 if test "x$CATOBJEXT" = "x.mo" ; then
424   localedir=`eval echo "${libdir}/locale"`
425 else
426   localedir=`eval echo "${datadir}/locale"`
427 fi
428 prefix="$glib_save_prefix"
429 exec_prefix="$glib_save_exec_prefix"
430 datarootdir="$glib_save_datarootdir"
431 AC_DEFINE_UNQUOTED($1, "$localedir",
432   [Define the location where the catalogs will be installed])
433 ])
434
435 dnl
436 dnl Now the definitions that aclocal will find
437 dnl
438 ifdef(glib_configure_ac,[],[
439 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
440 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
441 ])dnl
442
443 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
444
445 # Create a temporary file with TEST-FILE as its contents and pass the
446 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
447 # 0 and perform ACTION-IF-FAIL for any other exit status.
448 AC_DEFUN([GLIB_RUN_PROG],
449 [cat >conftest.foo <<_ACEOF
450 $2
451 _ACEOF
452 if AC_RUN_LOG([$1 conftest.foo]); then
453   m4_ifval([$3], [$3], [:])
454 m4_ifvaln([$4], [else $4])dnl
455 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
456 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
457 fi])
458
459
460 dnl GNOME_COMPILE_WARNINGS
461 dnl Turn on many useful compiler warnings
462 dnl For now, only works on GCC
463 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
464     dnl ******************************
465     dnl More compiler warnings
466     dnl ******************************
467
468     AC_ARG_ENABLE(compile-warnings, 
469                   AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
470                                  [Turn on compiler warnings]),,
471                   [enable_compile_warnings="m4_default([$1],[yes])"])
472
473     warnCFLAGS=
474     if test "x$GCC" != xyes; then
475         enable_compile_warnings=no
476     fi
477
478     warning_flags=
479     realsave_CFLAGS="$CFLAGS"
480
481     case "$enable_compile_warnings" in
482     no)
483         warning_flags=
484         ;;
485     minimum)
486         warning_flags="-Wall"
487         ;;
488     yes)
489         warning_flags="-Wall -Wmissing-prototypes"
490         ;;
491     maximum|error)
492         warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
493         CFLAGS="$warning_flags $CFLAGS"
494         for option in -Wno-sign-compare; do
495                 SAVE_CFLAGS="$CFLAGS"
496                 CFLAGS="$CFLAGS $option"
497                 AC_MSG_CHECKING([whether gcc understands $option])
498                 AC_TRY_COMPILE([], [],
499                         has_option=yes,
500                         has_option=no,)
501                 CFLAGS="$SAVE_CFLAGS"
502                 AC_MSG_RESULT($has_option)
503                 if test $has_option = yes; then
504                   warning_flags="$warning_flags $option"
505                 fi
506                 unset has_option
507                 unset SAVE_CFLAGS
508         done
509         unset option
510         if test "$enable_compile_warnings" = "error" ; then
511             warning_flags="$warning_flags -Werror"
512         fi
513         ;;
514     *)
515         AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
516         ;;
517     esac
518     CFLAGS="$realsave_CFLAGS"
519     AC_MSG_CHECKING(what warning flags to pass to the C compiler)
520     AC_MSG_RESULT($warning_flags)
521
522     AC_ARG_ENABLE(iso-c,
523                   AC_HELP_STRING([--enable-iso-c],
524                                  [Try to warn if code is not ISO C ]),,
525                   [enable_iso_c=no])
526
527     AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
528     complCFLAGS=
529     if test "x$enable_iso_c" != "xno"; then
530         if test "x$GCC" = "xyes"; then
531         case " $CFLAGS " in
532             *[\ \       ]-ansi[\ \      ]*) ;;
533             *) complCFLAGS="$complCFLAGS -ansi" ;;
534         esac
535         case " $CFLAGS " in
536             *[\ \       ]-pedantic[\ \  ]*) ;;
537             *) complCFLAGS="$complCFLAGS -pedantic" ;;
538         esac
539         fi
540     fi
541     AC_MSG_RESULT($complCFLAGS)
542
543     WARN_CFLAGS="$warning_flags $complCFLAGS"
544     AC_SUBST(WARN_CFLAGS)
545 ])
546
547 dnl For C++, do basically the same thing.
548
549 AC_DEFUN([GNOME_CXX_WARNINGS],[
550   AC_ARG_ENABLE(cxx-warnings,
551                 AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
552                                [Turn on compiler warnings.]),,
553                 [enable_cxx_warnings="m4_default([$1],[minimum])"])
554
555   AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
556   warnCXXFLAGS=
557   if test "x$GXX" != xyes; then
558     enable_cxx_warnings=no
559   fi
560   if test "x$enable_cxx_warnings" != "xno"; then
561     if test "x$GXX" = "xyes"; then
562       case " $CXXFLAGS " in
563       *[\ \     ]-Wall[\ \      ]*) ;;
564       *) warnCXXFLAGS="-Wall -Wno-unused" ;;
565       esac
566
567       ## -W is not all that useful.  And it cannot be controlled
568       ## with individual -Wno-xxx flags, unlike -Wall
569       if test "x$enable_cxx_warnings" = "xyes"; then
570         warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
571       fi
572     fi
573   fi
574   AC_MSG_RESULT($warnCXXFLAGS)
575
576    AC_ARG_ENABLE(iso-cxx,
577                  AC_HELP_STRING([--enable-iso-cxx],
578                                 [Try to warn if code is not ISO C++ ]),,
579                  [enable_iso_cxx=no])
580
581    AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
582    complCXXFLAGS=
583    if test "x$enable_iso_cxx" != "xno"; then
584      if test "x$GXX" = "xyes"; then
585       case " $CXXFLAGS " in
586       *[\ \     ]-ansi[\ \      ]*) ;;
587       *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
588       esac
589
590       case " $CXXFLAGS " in
591       *[\ \     ]-pedantic[\ \  ]*) ;;
592       *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
593       esac
594      fi
595    fi
596   AC_MSG_RESULT($complCXXFLAGS)
597
598   WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
599   AC_SUBST(WARN_CXXFLAGS)
600 ])
601
602 dnl Do not call GNOME_DOC_DEFINES directly.  It is split out from
603 dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself.
604 AC_DEFUN([GNOME_DOC_DEFINES],
605 [
606 AC_ARG_WITH([help-dir],
607   AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
608   [with_help_dir='${datadir}/gnome/help'])
609 HELP_DIR="$with_help_dir"
610 AC_SUBST(HELP_DIR)
611
612 AC_ARG_WITH([omf-dir],
613   AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
614   [with_omf_dir='${datadir}/omf'])
615 OMF_DIR="$with_omf_dir"
616 AC_SUBST(OMF_DIR)
617
618 AC_ARG_WITH([help-formats],
619   AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
620   [with_help_formats=''])
621 DOC_USER_FORMATS="$with_help_formats"
622 AC_SUBST(DOC_USER_FORMATS)
623
624 AC_ARG_ENABLE([scrollkeeper],
625         [AC_HELP_STRING([--disable-scrollkeeper],
626                         [do not make updates to the scrollkeeper database])],,
627         enable_scrollkeeper=yes)
628 AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
629
630 dnl disable scrollkeeper automatically for distcheck
631 DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS"
632 AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
633
634 AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
635 ])
636
637 # GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
638 #
639 AC_DEFUN([GNOME_DOC_INIT],
640 [AC_REQUIRE([AC_PROG_LN_S])dnl
641
642 if test -z "$AM_DEFAULT_VERBOSITY"; then
643   AM_DEFAULT_VERBOSITY=1
644 fi
645 AC_SUBST([AM_DEFAULT_VERBOSITY])
646
647 ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
648
649 AC_MSG_CHECKING([gnome-doc-utils >= $gdu_cv_version_required])
650 PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
651         [gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no])
652
653 if test "$gdu_cv_have_gdu" = "yes"; then
654         AC_MSG_RESULT([yes])
655         ifelse([$2],,[:],[$2])
656 else
657         AC_MSG_RESULT([no])
658         ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3])
659 fi
660
661 GNOME_DOC_DEFINES
662 ])
663
664 dnl GLIB_GSETTINGS
665 dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
666 dnl the schema should be compiled
667 dnl
668
669 AC_DEFUN([GLIB_GSETTINGS],
670 [
671   m4_pattern_allow([AM_V_GEN])
672   AC_ARG_ENABLE(schemas-compile,
673                 AS_HELP_STRING([--disable-schemas-compile],
674                                [Disable regeneration of gschemas.compiled on install]),
675                 [case ${enableval} in
676                   yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
677                   no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
678                   *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
679                  esac])
680   AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
681   PKG_PROG_PKG_CONFIG([0.16])
682   AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
683   if test x$cross_compiling != xyes; then
684     GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
685   else
686     AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
687   fi
688   AC_SUBST(GLIB_COMPILE_SCHEMAS)
689   if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
690     ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
691   else
692     ifelse([$1],,[:],[$1])
693   fi
694
695   GSETTINGS_RULES='
696 .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
697
698 mostlyclean-am: clean-gsettings-schemas
699
700 gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
701
702 %.gschema.valid: %.gschema.xml $(gsettings__enum_file)
703         $(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
704
705 all-am: $(gsettings_SCHEMAS:.xml=.valid)
706 uninstall-am: uninstall-gsettings-schemas
707 install-data-am: install-gsettings-schemas
708
709 .SECONDARY: $(gsettings_SCHEMAS)
710
711 install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
712         @$(NORMAL_INSTALL)
713         if test -n "$^"; then \
714                 test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
715                 $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
716                 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
717         fi
718
719 uninstall-gsettings-schemas:
720         @$(NORMAL_UNINSTALL)
721         @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
722         files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
723         test -n "$$files" || exit 0; \
724         echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
725         cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
726         test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
727
728 clean-gsettings-schemas:
729         rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
730
731 ifdef gsettings_ENUM_NAMESPACE
732 $(gsettings__enum_file): $(gsettings_ENUM_FILES)
733         $(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 [$]@
734 endif
735 '
736   _GSETTINGS_SUBST(GSETTINGS_RULES)
737 ])
738
739 dnl _GSETTINGS_SUBST(VARIABLE)
740 dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
741 AC_DEFUN([_GSETTINGS_SUBST],
742 [
743 AC_SUBST([$1])
744 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
745 ]
746 )
747
748 dnl -*- mode: autoconf -*-
749
750 # serial 1
751
752 dnl Usage:
753 dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
754 AC_DEFUN([GTK_DOC_CHECK],
755 [
756   AC_REQUIRE([PKG_PROG_PKG_CONFIG])
757   AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
758   AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
759
760   dnl check for tools we added during development
761   AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
762   AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
763   AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
764
765   dnl for overriding the documentation installation directory
766   AC_ARG_WITH([html-dir],
767     AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
768     [with_html_dir='${datadir}/gtk-doc/html'])
769   HTML_DIR="$with_html_dir"
770   AC_SUBST([HTML_DIR])
771
772   dnl enable/disable documentation building
773   AC_ARG_ENABLE([gtk-doc],
774     AS_HELP_STRING([--enable-gtk-doc],
775                    [use gtk-doc to build documentation [[default=no]]]),,
776     [enable_gtk_doc=no])
777
778   if test x$enable_gtk_doc = xyes; then
779     ifelse([$1],[],
780       [PKG_CHECK_EXISTS([gtk-doc],,
781                         AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
782       [PKG_CHECK_EXISTS([gtk-doc >= $1],,
783                         AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
784     dnl don't check for glib if we build glib
785     if test "x$PACKAGE_NAME" != "xglib"; then
786       dnl don't fail if someone does not have glib
787       PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,)
788     fi
789   fi
790
791   AC_MSG_CHECKING([whether to build gtk-doc documentation])
792   AC_MSG_RESULT($enable_gtk_doc)
793
794   dnl enable/disable output formats
795   AC_ARG_ENABLE([gtk-doc-html],
796     AS_HELP_STRING([--enable-gtk-doc-html],
797                    [build documentation in html format [[default=yes]]]),,
798     [enable_gtk_doc_html=yes])
799     AC_ARG_ENABLE([gtk-doc-pdf],
800       AS_HELP_STRING([--enable-gtk-doc-pdf],
801                      [build documentation in pdf format [[default=no]]]),,
802       [enable_gtk_doc_pdf=no])
803
804   if test -z "$GTKDOC_MKPDF"; then
805     enable_gtk_doc_pdf=no
806   fi
807
808
809   AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
810   AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
811   AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
812   AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
813   AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
814 ])
815
816
817 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
818 # serial 42 IT_PROG_INTLTOOL
819 AC_DEFUN([IT_PROG_INTLTOOL], [
820 AC_PREREQ([2.50])dnl
821 AC_REQUIRE([AM_NLS])dnl
822
823 case "$am__api_version" in
824     1.[01234])
825         AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
826     ;;
827     *)
828     ;;
829 esac
830
831 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
832 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
833 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
834 if test -n "$1"; then
835     AC_MSG_CHECKING([for intltool >= $1])
836     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
837     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
838         AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
839 fi
840
841 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
842 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
843 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
844 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
845     AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
846 fi
847
848 if test -z "$AM_DEFAULT_VERBOSITY"; then
849   AM_DEFAULT_VERBOSITY=1
850 fi
851 AC_SUBST([AM_DEFAULT_VERBOSITY])
852
853 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
854 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
855 INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
856 AC_SUBST(INTLTOOL_V_MERGE)
857 AC_SUBST(INTLTOOL__v_MERGE_)
858 AC_SUBST(INTLTOOL__v_MERGE_0)
859
860 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
861 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
862 intltool__v_merge_options_0='-q'
863 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
864 AC_SUBST(intltool__v_merge_options_)
865 AC_SUBST(intltool__v_merge_options_0)
866
867   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 $< [$]@' 
868 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 $< [$]@' 
869      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 $< [$]@' 
870      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 $< [$]@' 
871       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 $< [$]@'
872      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 $< [$]@' 
873    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 $< [$]@' 
874     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 $< [$]@' 
875 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 $< [$]@' 
876        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 $< [$]@' 
877       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 $< [$]@' 
878 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
879       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 $< [$]@'
880 else
881       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'
882 fi
883       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 $< [$]@' 
884       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 $< [$]@' 
885     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 $< [$]@' 
886   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 $< [$]@' 
887     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 $< [$]@' 
888     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 $< [$]@'
889    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 $< [$]@'
890
891 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
892 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
893 _IT_SUBST(INTLTOOL_KEYS_RULE)
894 _IT_SUBST(INTLTOOL_PROP_RULE)
895 _IT_SUBST(INTLTOOL_OAF_RULE)
896 _IT_SUBST(INTLTOOL_PONG_RULE)
897 _IT_SUBST(INTLTOOL_SERVER_RULE)
898 _IT_SUBST(INTLTOOL_SHEET_RULE)
899 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
900 _IT_SUBST(INTLTOOL_UI_RULE)
901 _IT_SUBST(INTLTOOL_XAM_RULE)
902 _IT_SUBST(INTLTOOL_KBD_RULE)
903 _IT_SUBST(INTLTOOL_XML_RULE)
904 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
905 _IT_SUBST(INTLTOOL_CAVES_RULE)
906 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
907 _IT_SUBST(INTLTOOL_THEME_RULE)
908 _IT_SUBST(INTLTOOL_SERVICE_RULE)
909 _IT_SUBST(INTLTOOL_POLICY_RULE)
910
911 # Check the gettext tools to make sure they are GNU
912 AC_PATH_PROG(XGETTEXT, xgettext)
913 AC_PATH_PROG(MSGMERGE, msgmerge)
914 AC_PATH_PROG(MSGFMT, msgfmt)
915 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
916 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
917     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
918 fi
919 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
920 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
921 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
922 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
923     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
924 fi
925
926 AC_PATH_PROG(INTLTOOL_PERL, perl)
927 if test -z "$INTLTOOL_PERL"; then
928    AC_MSG_ERROR([perl not found])
929 fi
930 AC_MSG_CHECKING([for perl >= 5.8.1])
931 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
932 if test $? -ne 0; then
933    AC_MSG_ERROR([perl 5.8.1 is required for intltool])
934 else
935    IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
936    AC_MSG_RESULT([$IT_PERL_VERSION])
937 fi
938 if test "x$2" != "xno-xml"; then
939    AC_MSG_CHECKING([for XML::Parser])
940    if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
941        AC_MSG_RESULT([ok])
942    else
943        AC_MSG_ERROR([XML::Parser perl module is required for intltool])
944    fi
945 fi
946
947 # Substitute ALL_LINGUAS so we can use it in po/Makefile
948 AC_SUBST(ALL_LINGUAS)
949
950 # Set DATADIRNAME correctly if it is not set yet
951 # (copied from glib-gettext.m4)
952 if test -z "$DATADIRNAME"; then
953   AC_LINK_IFELSE(
954     [AC_LANG_PROGRAM([[]],
955                      [[extern int _nl_msg_cat_cntr;
956                        return _nl_msg_cat_cntr]])],
957     [DATADIRNAME=share],
958     [case $host in
959     *-*-solaris*)
960     dnl On Solaris, if bind_textdomain_codeset is in libc,
961     dnl GNU format message catalog is always supported,
962     dnl since both are added to the libc all together.
963     dnl Hence, we'd like to go with DATADIRNAME=share
964     dnl in this case.
965     AC_CHECK_FUNC(bind_textdomain_codeset,
966       [DATADIRNAME=share], [DATADIRNAME=lib])
967     ;;
968     *)
969     [DATADIRNAME=lib]
970     ;;
971     esac])
972 fi
973 AC_SUBST(DATADIRNAME)
974
975 IT_PO_SUBDIR([po])
976
977 ])
978
979
980 # IT_PO_SUBDIR(DIRNAME)
981 # ---------------------
982 # All po subdirs have to be declared with this macro; the subdir "po" is
983 # declared by IT_PROG_INTLTOOL.
984 #
985 AC_DEFUN([IT_PO_SUBDIR],
986 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
987 dnl
988 dnl The following CONFIG_COMMANDS should be executed at the very end
989 dnl of config.status.
990 AC_CONFIG_COMMANDS_PRE([
991   AC_CONFIG_COMMANDS([$1/stamp-it], [
992     if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
993        AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
994     fi
995     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
996     >"$1/stamp-it.tmp"
997     [sed '/^#/d
998          s/^[[].*] *//
999          /^[    ]*$/d
1000         '"s|^|  $ac_top_srcdir/|" \
1001       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1002     ]
1003     [sed '/^POTFILES =/,/[^\\]$/ {
1004                 /^POTFILES =/!d
1005                 r $1/POTFILES
1006           }
1007          ' "$1/Makefile.in" >"$1/Makefile"]
1008     rm -f "$1/Makefile.tmp"
1009     mv "$1/stamp-it.tmp" "$1/stamp-it"
1010   ])
1011 ])dnl
1012 ])
1013
1014 # _IT_SUBST(VARIABLE)
1015 # -------------------
1016 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1017 #
1018 AC_DEFUN([_IT_SUBST],
1019 [
1020 AC_SUBST([$1])
1021 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1022 ]
1023 )
1024
1025 # deprecated macros
1026 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1027 # A hint is needed for aclocal from Automake <= 1.9.4:
1028 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
1029
1030
1031 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1032 #
1033 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1034 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1035 #                 Foundation, Inc.
1036 #   Written by Gordon Matzigkeit, 1996
1037 #
1038 # This file is free software; the Free Software Foundation gives
1039 # unlimited permission to copy and/or distribute it, with or without
1040 # modifications, as long as this notice is preserved.
1041
1042 m4_define([_LT_COPYING], [dnl
1043 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1044 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1045 #                 Foundation, Inc.
1046 #   Written by Gordon Matzigkeit, 1996
1047 #
1048 #   This file is part of GNU Libtool.
1049 #
1050 # GNU Libtool is free software; you can redistribute it and/or
1051 # modify it under the terms of the GNU General Public License as
1052 # published by the Free Software Foundation; either version 2 of
1053 # the License, or (at your option) any later version.
1054 #
1055 # As a special exception to the GNU General Public License,
1056 # if you distribute this file as part of a program or library that
1057 # is built using GNU Libtool, you may include this file under the
1058 # same distribution terms that you use for the rest of that program.
1059 #
1060 # GNU Libtool is distributed in the hope that it will be useful,
1061 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1062 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1063 # GNU General Public License for more details.
1064 #
1065 # You should have received a copy of the GNU General Public License
1066 # along with GNU Libtool; see the file COPYING.  If not, a copy
1067 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1068 # obtained by writing to the Free Software Foundation, Inc.,
1069 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1070 ])
1071
1072 # serial 57 LT_INIT
1073
1074
1075 # LT_PREREQ(VERSION)
1076 # ------------------
1077 # Complain and exit if this libtool version is less that VERSION.
1078 m4_defun([LT_PREREQ],
1079 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1080        [m4_default([$3],
1081                    [m4_fatal([Libtool version $1 or higher is required],
1082                              63)])],
1083        [$2])])
1084
1085
1086 # _LT_CHECK_BUILDDIR
1087 # ------------------
1088 # Complain if the absolute build directory name contains unusual characters
1089 m4_defun([_LT_CHECK_BUILDDIR],
1090 [case `pwd` in
1091   *\ * | *\     *)
1092     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1093 esac
1094 ])
1095
1096
1097 # LT_INIT([OPTIONS])
1098 # ------------------
1099 AC_DEFUN([LT_INIT],
1100 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1101 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1102 AC_BEFORE([$0], [LT_LANG])dnl
1103 AC_BEFORE([$0], [LT_OUTPUT])dnl
1104 AC_BEFORE([$0], [LTDL_INIT])dnl
1105 m4_require([_LT_CHECK_BUILDDIR])dnl
1106
1107 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1108 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1109 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1110 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1111 dnl unless we require an AC_DEFUNed macro:
1112 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1113 AC_REQUIRE([LTSUGAR_VERSION])dnl
1114 AC_REQUIRE([LTVERSION_VERSION])dnl
1115 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1116 m4_require([_LT_PROG_LTMAIN])dnl
1117
1118 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1119
1120 dnl Parse OPTIONS
1121 _LT_SET_OPTIONS([$0], [$1])
1122
1123 # This can be used to rebuild libtool when needed
1124 LIBTOOL_DEPS="$ltmain"
1125
1126 # Always use our own libtool.
1127 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1128 AC_SUBST(LIBTOOL)dnl
1129
1130 _LT_SETUP
1131
1132 # Only expand once:
1133 m4_define([LT_INIT])
1134 ])# LT_INIT
1135
1136 # Old names:
1137 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1138 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1139 dnl aclocal-1.4 backwards compatibility:
1140 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1141 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1142
1143
1144 # _LT_CC_BASENAME(CC)
1145 # -------------------
1146 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1147 m4_defun([_LT_CC_BASENAME],
1148 [for cc_temp in $1""; do
1149   case $cc_temp in
1150     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1151     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1152     \-*) ;;
1153     *) break;;
1154   esac
1155 done
1156 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1157 ])
1158
1159
1160 # _LT_FILEUTILS_DEFAULTS
1161 # ----------------------
1162 # It is okay to use these file commands and assume they have been set
1163 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1164 m4_defun([_LT_FILEUTILS_DEFAULTS],
1165 [: ${CP="cp -f"}
1166 : ${MV="mv -f"}
1167 : ${RM="rm -f"}
1168 ])# _LT_FILEUTILS_DEFAULTS
1169
1170
1171 # _LT_SETUP
1172 # ---------
1173 m4_defun([_LT_SETUP],
1174 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1175 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1176 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1177 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1178
1179 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1180 dnl
1181 _LT_DECL([], [host_alias], [0], [The host system])dnl
1182 _LT_DECL([], [host], [0])dnl
1183 _LT_DECL([], [host_os], [0])dnl
1184 dnl
1185 _LT_DECL([], [build_alias], [0], [The build system])dnl
1186 _LT_DECL([], [build], [0])dnl
1187 _LT_DECL([], [build_os], [0])dnl
1188 dnl
1189 AC_REQUIRE([AC_PROG_CC])dnl
1190 AC_REQUIRE([LT_PATH_LD])dnl
1191 AC_REQUIRE([LT_PATH_NM])dnl
1192 dnl
1193 AC_REQUIRE([AC_PROG_LN_S])dnl
1194 test -z "$LN_S" && LN_S="ln -s"
1195 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1196 dnl
1197 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1198 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1199 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1200 dnl
1201 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1202 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1203 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1204 m4_require([_LT_CMD_RELOAD])dnl
1205 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1206 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1207 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1208 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1209 m4_require([_LT_WITH_SYSROOT])dnl
1210
1211 _LT_CONFIG_LIBTOOL_INIT([
1212 # See if we are running on zsh, and set the options which allow our
1213 # commands through without removal of \ escapes INIT.
1214 if test -n "\${ZSH_VERSION+set}" ; then
1215    setopt NO_GLOB_SUBST
1216 fi
1217 ])
1218 if test -n "${ZSH_VERSION+set}" ; then
1219    setopt NO_GLOB_SUBST
1220 fi
1221
1222 _LT_CHECK_OBJDIR
1223
1224 m4_require([_LT_TAG_COMPILER])dnl
1225
1226 case $host_os in
1227 aix3*)
1228   # AIX sometimes has problems with the GCC collect2 program.  For some
1229   # reason, if we set the COLLECT_NAMES environment variable, the problems
1230   # vanish in a puff of smoke.
1231   if test "X${COLLECT_NAMES+set}" != Xset; then
1232     COLLECT_NAMES=
1233     export COLLECT_NAMES
1234   fi
1235   ;;
1236 esac
1237
1238 # Global variables:
1239 ofile=libtool
1240 can_build_shared=yes
1241
1242 # All known linkers require a `.a' archive for static linking (except MSVC,
1243 # which needs '.lib').
1244 libext=a
1245
1246 with_gnu_ld="$lt_cv_prog_gnu_ld"
1247
1248 old_CC="$CC"
1249 old_CFLAGS="$CFLAGS"
1250
1251 # Set sane defaults for various variables
1252 test -z "$CC" && CC=cc
1253 test -z "$LTCC" && LTCC=$CC
1254 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1255 test -z "$LD" && LD=ld
1256 test -z "$ac_objext" && ac_objext=o
1257
1258 _LT_CC_BASENAME([$compiler])
1259
1260 # Only perform the check for file, if the check method requires it
1261 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1262 case $deplibs_check_method in
1263 file_magic*)
1264   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1265     _LT_PATH_MAGIC
1266   fi
1267   ;;
1268 esac
1269
1270 # Use C for the default configuration in the libtool script
1271 LT_SUPPORTED_TAG([CC])
1272 _LT_LANG_C_CONFIG
1273 _LT_LANG_DEFAULT_CONFIG
1274 _LT_CONFIG_COMMANDS
1275 ])# _LT_SETUP
1276
1277
1278 # _LT_PREPARE_SED_QUOTE_VARS
1279 # --------------------------
1280 # Define a few sed substitution that help us do robust quoting.
1281 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1282 [# Backslashify metacharacters that are still active within
1283 # double-quoted strings.
1284 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1285
1286 # Same as above, but do not quote variable references.
1287 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1288
1289 # Sed substitution to delay expansion of an escaped shell variable in a
1290 # double_quote_subst'ed string.
1291 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1292
1293 # Sed substitution to delay expansion of an escaped single quote.
1294 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1295
1296 # Sed substitution to avoid accidental globbing in evaled expressions
1297 no_glob_subst='s/\*/\\\*/g'
1298 ])
1299
1300 # _LT_PROG_LTMAIN
1301 # ---------------
1302 # Note that this code is called both from `configure', and `config.status'
1303 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1304 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1305 # so we pass a copy along to make sure it has a sensible value anyway.
1306 m4_defun([_LT_PROG_LTMAIN],
1307 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1308 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1309 ltmain="$ac_aux_dir/ltmain.sh"
1310 ])# _LT_PROG_LTMAIN
1311
1312
1313
1314 # So that we can recreate a full libtool script including additional
1315 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1316 # in macros and then make a single call at the end using the `libtool'
1317 # label.
1318
1319
1320 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1321 # ----------------------------------------
1322 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1323 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1324 [m4_ifval([$1],
1325           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1326                      [$1
1327 ])])])
1328
1329 # Initialize.
1330 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1331
1332
1333 # _LT_CONFIG_LIBTOOL([COMMANDS])
1334 # ------------------------------
1335 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1336 m4_define([_LT_CONFIG_LIBTOOL],
1337 [m4_ifval([$1],
1338           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1339                      [$1
1340 ])])])
1341
1342 # Initialize.
1343 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1344
1345
1346 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1347 # -----------------------------------------------------
1348 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1349 [_LT_CONFIG_LIBTOOL([$1])
1350 _LT_CONFIG_LIBTOOL_INIT([$2])
1351 ])
1352
1353
1354 # _LT_FORMAT_COMMENT([COMMENT])
1355 # -----------------------------
1356 # Add leading comment marks to the start of each line, and a trailing
1357 # full-stop to the whole comment if one is not present already.
1358 m4_define([_LT_FORMAT_COMMENT],
1359 [m4_ifval([$1], [
1360 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1361               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1362 )])
1363
1364
1365
1366
1367
1368 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1369 # -------------------------------------------------------------------
1370 # CONFIGNAME is the name given to the value in the libtool script.
1371 # VARNAME is the (base) name used in the configure script.
1372 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1373 # VARNAME.  Any other value will be used directly.
1374 m4_define([_LT_DECL],
1375 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1376     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1377         [m4_ifval([$1], [$1], [$2])])
1378     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1379     m4_ifval([$4],
1380         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1381     lt_dict_add_subkey([lt_decl_dict], [$2],
1382         [tagged?], [m4_ifval([$5], [yes], [no])])])
1383 ])
1384
1385
1386 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1387 # --------------------------------------------------------
1388 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1389
1390
1391 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1392 # ------------------------------------------------
1393 m4_define([lt_decl_tag_varnames],
1394 [_lt_decl_filter([tagged?], [yes], $@)])
1395
1396
1397 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1398 # ---------------------------------------------------------
1399 m4_define([_lt_decl_filter],
1400 [m4_case([$#],
1401   [0], [m4_fatal([$0: too few arguments: $#])],
1402   [1], [m4_fatal([$0: too few arguments: $#: $1])],
1403   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1404   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1405   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1406 ])
1407
1408
1409 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1410 # --------------------------------------------------
1411 m4_define([lt_decl_quote_varnames],
1412 [_lt_decl_filter([value], [1], $@)])
1413
1414
1415 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1416 # ---------------------------------------------------
1417 m4_define([lt_decl_dquote_varnames],
1418 [_lt_decl_filter([value], [2], $@)])
1419
1420
1421 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1422 # ---------------------------------------------------
1423 m4_define([lt_decl_varnames_tagged],
1424 [m4_assert([$# <= 2])dnl
1425 _$0(m4_quote(m4_default([$1], [[, ]])),
1426     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1427     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1428 m4_define([_lt_decl_varnames_tagged],
1429 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1430
1431
1432 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1433 # ------------------------------------------------
1434 m4_define([lt_decl_all_varnames],
1435 [_$0(m4_quote(m4_default([$1], [[, ]])),
1436      m4_if([$2], [],
1437            m4_quote(lt_decl_varnames),
1438         m4_quote(m4_shift($@))))[]dnl
1439 ])
1440 m4_define([_lt_decl_all_varnames],
1441 [lt_join($@, lt_decl_varnames_tagged([$1],
1442                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1443 ])
1444
1445
1446 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1447 # ------------------------------------
1448 # Quote a variable value, and forward it to `config.status' so that its
1449 # declaration there will have the same value as in `configure'.  VARNAME
1450 # must have a single quote delimited value for this to work.
1451 m4_define([_LT_CONFIG_STATUS_DECLARE],
1452 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1453
1454
1455 # _LT_CONFIG_STATUS_DECLARATIONS
1456 # ------------------------------
1457 # We delimit libtool config variables with single quotes, so when
1458 # we write them to config.status, we have to be sure to quote all
1459 # embedded single quotes properly.  In configure, this macro expands
1460 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1461 #
1462 #    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1463 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1464 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1465     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1466
1467
1468 # _LT_LIBTOOL_TAGS
1469 # ----------------
1470 # Output comment and list of tags supported by the script
1471 m4_defun([_LT_LIBTOOL_TAGS],
1472 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1473 available_tags="_LT_TAGS"dnl
1474 ])
1475
1476
1477 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1478 # -----------------------------------
1479 # Extract the dictionary values for VARNAME (optionally with TAG) and
1480 # expand to a commented shell variable setting:
1481 #
1482 #    # Some comment about what VAR is for.
1483 #    visible_name=$lt_internal_name
1484 m4_define([_LT_LIBTOOL_DECLARE],
1485 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1486                                            [description])))[]dnl
1487 m4_pushdef([_libtool_name],
1488     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1489 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1490     [0], [_libtool_name=[$]$1],
1491     [1], [_libtool_name=$lt_[]$1],
1492     [2], [_libtool_name=$lt_[]$1],
1493     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1494 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1495 ])
1496
1497
1498 # _LT_LIBTOOL_CONFIG_VARS
1499 # -----------------------
1500 # Produce commented declarations of non-tagged libtool config variables
1501 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1502 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1503 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1504 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1505 [m4_foreach([_lt_var],
1506     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1507     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1508
1509
1510 # _LT_LIBTOOL_TAG_VARS(TAG)
1511 # -------------------------
1512 m4_define([_LT_LIBTOOL_TAG_VARS],
1513 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1514     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1515
1516
1517 # _LT_TAGVAR(VARNAME, [TAGNAME])
1518 # ------------------------------
1519 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1520
1521
1522 # _LT_CONFIG_COMMANDS
1523 # -------------------
1524 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1525 # variables for single and double quote escaping we saved from calls
1526 # to _LT_DECL, we can put quote escaped variables declarations
1527 # into `config.status', and then the shell code to quote escape them in
1528 # for loops in `config.status'.  Finally, any additional code accumulated
1529 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1530 m4_defun([_LT_CONFIG_COMMANDS],
1531 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1532         dnl If the libtool generation code has been placed in $CONFIG_LT,
1533         dnl instead of duplicating it all over again into config.status,
1534         dnl then we will have config.status run $CONFIG_LT later, so it
1535         dnl needs to know what name is stored there:
1536         [AC_CONFIG_COMMANDS([libtool],
1537             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1538     dnl If the libtool generation code is destined for config.status,
1539     dnl expand the accumulated commands and init code now:
1540     [AC_CONFIG_COMMANDS([libtool],
1541         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1542 ])#_LT_CONFIG_COMMANDS
1543
1544
1545 # Initialize.
1546 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1547 [
1548
1549 # The HP-UX ksh and POSIX shell print the target directory to stdout
1550 # if CDPATH is set.
1551 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1552
1553 sed_quote_subst='$sed_quote_subst'
1554 double_quote_subst='$double_quote_subst'
1555 delay_variable_subst='$delay_variable_subst'
1556 _LT_CONFIG_STATUS_DECLARATIONS
1557 LTCC='$LTCC'
1558 LTCFLAGS='$LTCFLAGS'
1559 compiler='$compiler_DEFAULT'
1560
1561 # A function that is used when there is no print builtin or printf.
1562 func_fallback_echo ()
1563 {
1564   eval 'cat <<_LTECHO_EOF
1565 \$[]1
1566 _LTECHO_EOF'
1567 }
1568
1569 # Quote evaled strings.
1570 for var in lt_decl_all_varnames([[ \
1571 ]], lt_decl_quote_varnames); do
1572     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1573     *[[\\\\\\\`\\"\\\$]]*)
1574       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1575       ;;
1576     *)
1577       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1578       ;;
1579     esac
1580 done
1581
1582 # Double-quote double-evaled strings.
1583 for var in lt_decl_all_varnames([[ \
1584 ]], lt_decl_dquote_varnames); do
1585     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1586     *[[\\\\\\\`\\"\\\$]]*)
1587       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1588       ;;
1589     *)
1590       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1591       ;;
1592     esac
1593 done
1594
1595 _LT_OUTPUT_LIBTOOL_INIT
1596 ])
1597
1598 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1599 # ------------------------------------
1600 # Generate a child script FILE with all initialization necessary to
1601 # reuse the environment learned by the parent script, and make the
1602 # file executable.  If COMMENT is supplied, it is inserted after the
1603 # `#!' sequence but before initialization text begins.  After this
1604 # macro, additional text can be appended to FILE to form the body of
1605 # the child script.  The macro ends with non-zero status if the
1606 # file could not be fully written (such as if the disk is full).
1607 m4_ifdef([AS_INIT_GENERATED],
1608 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1609 [m4_defun([_LT_GENERATED_FILE_INIT],
1610 [m4_require([AS_PREPARE])]dnl
1611 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1612 [lt_write_fail=0
1613 cat >$1 <<_ASEOF || lt_write_fail=1
1614 #! $SHELL
1615 # Generated by $as_me.
1616 $2
1617 SHELL=\${CONFIG_SHELL-$SHELL}
1618 export SHELL
1619 _ASEOF
1620 cat >>$1 <<\_ASEOF || lt_write_fail=1
1621 AS_SHELL_SANITIZE
1622 _AS_PREPARE
1623 exec AS_MESSAGE_FD>&1
1624 _ASEOF
1625 test $lt_write_fail = 0 && chmod +x $1[]dnl
1626 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1627
1628 # LT_OUTPUT
1629 # ---------
1630 # This macro allows early generation of the libtool script (before
1631 # AC_OUTPUT is called), incase it is used in configure for compilation
1632 # tests.
1633 AC_DEFUN([LT_OUTPUT],
1634 [: ${CONFIG_LT=./config.lt}
1635 AC_MSG_NOTICE([creating $CONFIG_LT])
1636 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1637 [# Run this file to recreate a libtool stub with the current configuration.])
1638
1639 cat >>"$CONFIG_LT" <<\_LTEOF
1640 lt_cl_silent=false
1641 exec AS_MESSAGE_LOG_FD>>config.log
1642 {
1643   echo
1644   AS_BOX([Running $as_me.])
1645 } >&AS_MESSAGE_LOG_FD
1646
1647 lt_cl_help="\
1648 \`$as_me' creates a local libtool stub from the current configuration,
1649 for use in further configure time tests before the real libtool is
1650 generated.
1651
1652 Usage: $[0] [[OPTIONS]]
1653
1654   -h, --help      print this help, then exit
1655   -V, --version   print version number, then exit
1656   -q, --quiet     do not print progress messages
1657   -d, --debug     don't remove temporary files
1658
1659 Report bugs to <bug-libtool@gnu.org>."
1660
1661 lt_cl_version="\
1662 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1663 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1664 configured by $[0], generated by m4_PACKAGE_STRING.
1665
1666 Copyright (C) 2011 Free Software Foundation, Inc.
1667 This config.lt script is free software; the Free Software Foundation
1668 gives unlimited permision to copy, distribute and modify it."
1669
1670 while test $[#] != 0
1671 do
1672   case $[1] in
1673     --version | --v* | -V )
1674       echo "$lt_cl_version"; exit 0 ;;
1675     --help | --h* | -h )
1676       echo "$lt_cl_help"; exit 0 ;;
1677     --debug | --d* | -d )
1678       debug=: ;;
1679     --quiet | --q* | --silent | --s* | -q )
1680       lt_cl_silent=: ;;
1681
1682     -*) AC_MSG_ERROR([unrecognized option: $[1]
1683 Try \`$[0] --help' for more information.]) ;;
1684
1685     *) AC_MSG_ERROR([unrecognized argument: $[1]
1686 Try \`$[0] --help' for more information.]) ;;
1687   esac
1688   shift
1689 done
1690
1691 if $lt_cl_silent; then
1692   exec AS_MESSAGE_FD>/dev/null
1693 fi
1694 _LTEOF
1695
1696 cat >>"$CONFIG_LT" <<_LTEOF
1697 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1698 _LTEOF
1699
1700 cat >>"$CONFIG_LT" <<\_LTEOF
1701 AC_MSG_NOTICE([creating $ofile])
1702 _LT_OUTPUT_LIBTOOL_COMMANDS
1703 AS_EXIT(0)
1704 _LTEOF
1705 chmod +x "$CONFIG_LT"
1706
1707 # configure is writing to config.log, but config.lt does its own redirection,
1708 # appending to config.log, which fails on DOS, as config.log is still kept
1709 # open by configure.  Here we exec the FD to /dev/null, effectively closing
1710 # config.log, so it can be properly (re)opened and appended to by config.lt.
1711 lt_cl_success=:
1712 test "$silent" = yes &&
1713   lt_config_lt_args="$lt_config_lt_args --quiet"
1714 exec AS_MESSAGE_LOG_FD>/dev/null
1715 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1716 exec AS_MESSAGE_LOG_FD>>config.log
1717 $lt_cl_success || AS_EXIT(1)
1718 ])# LT_OUTPUT
1719
1720
1721 # _LT_CONFIG(TAG)
1722 # ---------------
1723 # If TAG is the built-in tag, create an initial libtool script with a
1724 # default configuration from the untagged config vars.  Otherwise add code
1725 # to config.status for appending the configuration named by TAG from the
1726 # matching tagged config vars.
1727 m4_defun([_LT_CONFIG],
1728 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1729 _LT_CONFIG_SAVE_COMMANDS([
1730   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1731   m4_if(_LT_TAG, [C], [
1732     # See if we are running on zsh, and set the options which allow our
1733     # commands through without removal of \ escapes.
1734     if test -n "${ZSH_VERSION+set}" ; then
1735       setopt NO_GLOB_SUBST
1736     fi
1737
1738     cfgfile="${ofile}T"
1739     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1740     $RM "$cfgfile"
1741
1742     cat <<_LT_EOF >> "$cfgfile"
1743 #! $SHELL
1744
1745 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1746 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1747 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1748 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1749 #
1750 _LT_COPYING
1751 _LT_LIBTOOL_TAGS
1752
1753 # ### BEGIN LIBTOOL CONFIG
1754 _LT_LIBTOOL_CONFIG_VARS
1755 _LT_LIBTOOL_TAG_VARS
1756 # ### END LIBTOOL CONFIG
1757
1758 _LT_EOF
1759
1760   case $host_os in
1761   aix3*)
1762     cat <<\_LT_EOF >> "$cfgfile"
1763 # AIX sometimes has problems with the GCC collect2 program.  For some
1764 # reason, if we set the COLLECT_NAMES environment variable, the problems
1765 # vanish in a puff of smoke.
1766 if test "X${COLLECT_NAMES+set}" != Xset; then
1767   COLLECT_NAMES=
1768   export COLLECT_NAMES
1769 fi
1770 _LT_EOF
1771     ;;
1772   esac
1773
1774   _LT_PROG_LTMAIN
1775
1776   # We use sed instead of cat because bash on DJGPP gets confused if
1777   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1778   # text mode, it properly converts lines to CR/LF.  This bash problem
1779   # is reportedly fixed, but why not run on old versions too?
1780   sed '$q' "$ltmain" >> "$cfgfile" \
1781      || (rm -f "$cfgfile"; exit 1)
1782
1783   _LT_PROG_REPLACE_SHELLFNS
1784
1785    mv -f "$cfgfile" "$ofile" ||
1786     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1787   chmod +x "$ofile"
1788 ],
1789 [cat <<_LT_EOF >> "$ofile"
1790
1791 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1792 dnl in a comment (ie after a #).
1793 # ### BEGIN LIBTOOL TAG CONFIG: $1
1794 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
1795 # ### END LIBTOOL TAG CONFIG: $1
1796 _LT_EOF
1797 ])dnl /m4_if
1798 ],
1799 [m4_if([$1], [], [
1800     PACKAGE='$PACKAGE'
1801     VERSION='$VERSION'
1802     TIMESTAMP='$TIMESTAMP'
1803     RM='$RM'
1804     ofile='$ofile'], [])
1805 ])dnl /_LT_CONFIG_SAVE_COMMANDS
1806 ])# _LT_CONFIG
1807
1808
1809 # LT_SUPPORTED_TAG(TAG)
1810 # ---------------------
1811 # Trace this macro to discover what tags are supported by the libtool
1812 # --tag option, using:
1813 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1814 AC_DEFUN([LT_SUPPORTED_TAG], [])
1815
1816
1817 # C support is built-in for now
1818 m4_define([_LT_LANG_C_enabled], [])
1819 m4_define([_LT_TAGS], [])
1820
1821
1822 # LT_LANG(LANG)
1823 # -------------
1824 # Enable libtool support for the given language if not already enabled.
1825 AC_DEFUN([LT_LANG],
1826 [AC_BEFORE([$0], [LT_OUTPUT])dnl
1827 m4_case([$1],
1828   [C],                  [_LT_LANG(C)],
1829   [C++],                [_LT_LANG(CXX)],
1830   [Go],                 [_LT_LANG(GO)],
1831   [Java],               [_LT_LANG(GCJ)],
1832   [Fortran 77],         [_LT_LANG(F77)],
1833   [Fortran],            [_LT_LANG(FC)],
1834   [Windows Resource],   [_LT_LANG(RC)],
1835   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1836     [_LT_LANG($1)],
1837     [m4_fatal([$0: unsupported language: "$1"])])])dnl
1838 ])# LT_LANG
1839
1840
1841 # _LT_LANG(LANGNAME)
1842 # ------------------
1843 m4_defun([_LT_LANG],
1844 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
1845   [LT_SUPPORTED_TAG([$1])dnl
1846   m4_append([_LT_TAGS], [$1 ])dnl
1847   m4_define([_LT_LANG_]$1[_enabled], [])dnl
1848   _LT_LANG_$1_CONFIG($1)])dnl
1849 ])# _LT_LANG
1850
1851
1852 m4_ifndef([AC_PROG_GO], [
1853 # NOTE: This macro has been submitted for inclusion into   #
1854 #  GNU Autoconf as AC_PROG_GO.  When it is available in    #
1855 #  a released version of Autoconf we should remove this    #
1856 #  macro and use it instead.                               #
1857 m4_defun([AC_PROG_GO],
1858 [AC_LANG_PUSH(Go)dnl
1859 AC_ARG_VAR([GOC],     [Go compiler command])dnl
1860 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1861 _AC_ARG_VAR_LDFLAGS()dnl
1862 AC_CHECK_TOOL(GOC, gccgo)
1863 if test -z "$GOC"; then
1864   if test -n "$ac_tool_prefix"; then
1865     AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1866   fi
1867 fi
1868 if test -z "$GOC"; then
1869   AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1870 fi
1871 ])#m4_defun
1872 ])#m4_ifndef
1873
1874
1875 # _LT_LANG_DEFAULT_CONFIG
1876 # -----------------------
1877 m4_defun([_LT_LANG_DEFAULT_CONFIG],
1878 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
1879   [LT_LANG(CXX)],
1880   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1881
1882 AC_PROVIDE_IFELSE([AC_PROG_F77],
1883   [LT_LANG(F77)],
1884   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1885
1886 AC_PROVIDE_IFELSE([AC_PROG_FC],
1887   [LT_LANG(FC)],
1888   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1889
1890 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1891 dnl pulling things in needlessly.
1892 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1893   [LT_LANG(GCJ)],
1894   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1895     [LT_LANG(GCJ)],
1896     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1897       [LT_LANG(GCJ)],
1898       [m4_ifdef([AC_PROG_GCJ],
1899         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1900        m4_ifdef([A][M_PROG_GCJ],
1901         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1902        m4_ifdef([LT_PROG_GCJ],
1903         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1904
1905 AC_PROVIDE_IFELSE([AC_PROG_GO],
1906   [LT_LANG(GO)],
1907   [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
1908
1909 AC_PROVIDE_IFELSE([LT_PROG_RC],
1910   [LT_LANG(RC)],
1911   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1912 ])# _LT_LANG_DEFAULT_CONFIG
1913
1914 # Obsolete macros:
1915 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1916 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1917 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1918 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1919 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1920 dnl aclocal-1.4 backwards compatibility:
1921 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1922 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1923 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1924 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1925 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1926
1927
1928 # _LT_TAG_COMPILER
1929 # ----------------
1930 m4_defun([_LT_TAG_COMPILER],
1931 [AC_REQUIRE([AC_PROG_CC])dnl
1932
1933 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1934 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1935 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1936 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1937
1938 # If no C compiler was specified, use CC.
1939 LTCC=${LTCC-"$CC"}
1940
1941 # If no C compiler flags were specified, use CFLAGS.
1942 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1943
1944 # Allow CC to be a program name with arguments.
1945 compiler=$CC
1946 ])# _LT_TAG_COMPILER
1947
1948
1949 # _LT_COMPILER_BOILERPLATE
1950 # ------------------------
1951 # Check for compiler boilerplate output or warnings with
1952 # the simple compiler test code.
1953 m4_defun([_LT_COMPILER_BOILERPLATE],
1954 [m4_require([_LT_DECL_SED])dnl
1955 ac_outfile=conftest.$ac_objext
1956 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1957 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1958 _lt_compiler_boilerplate=`cat conftest.err`
1959 $RM conftest*
1960 ])# _LT_COMPILER_BOILERPLATE
1961
1962
1963 # _LT_LINKER_BOILERPLATE
1964 # ----------------------
1965 # Check for linker boilerplate output or warnings with
1966 # the simple link test code.
1967 m4_defun([_LT_LINKER_BOILERPLATE],
1968 [m4_require([_LT_DECL_SED])dnl
1969 ac_outfile=conftest.$ac_objext
1970 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1971 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1972 _lt_linker_boilerplate=`cat conftest.err`
1973 $RM -r conftest*
1974 ])# _LT_LINKER_BOILERPLATE
1975
1976 # _LT_REQUIRED_DARWIN_CHECKS
1977 # -------------------------
1978 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1979   case $host_os in
1980     rhapsody* | darwin*)
1981     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1982     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1983     AC_CHECK_TOOL([LIPO], [lipo], [:])
1984     AC_CHECK_TOOL([OTOOL], [otool], [:])
1985     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1986     _LT_DECL([], [DSYMUTIL], [1],
1987       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1988     _LT_DECL([], [NMEDIT], [1],
1989       [Tool to change global to local symbols on Mac OS X])
1990     _LT_DECL([], [LIPO], [1],
1991       [Tool to manipulate fat objects and archives on Mac OS X])
1992     _LT_DECL([], [OTOOL], [1],
1993       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1994     _LT_DECL([], [OTOOL64], [1],
1995       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1996
1997     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1998       [lt_cv_apple_cc_single_mod=no
1999       if test -z "${LT_MULTI_MODULE}"; then
2000         # By default we will add the -single_module flag. You can override
2001         # by either setting the environment variable LT_MULTI_MODULE
2002         # non-empty at configure time, or by adding -multi_module to the
2003         # link flags.
2004         rm -rf libconftest.dylib*
2005         echo "int foo(void){return 1;}" > conftest.c
2006         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2007 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2008         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2009           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2010         _lt_result=$?
2011         # If there is a non-empty error log, and "single_module"
2012         # appears in it, assume the flag caused a linker warning
2013         if test -s conftest.err && $GREP single_module conftest.err; then
2014           cat conftest.err >&AS_MESSAGE_LOG_FD
2015         # Otherwise, if the output was created with a 0 exit code from
2016         # the compiler, it worked.
2017         elif test -f libconftest.dylib && test $_lt_result -eq 0; then
2018           lt_cv_apple_cc_single_mod=yes
2019         else
2020           cat conftest.err >&AS_MESSAGE_LOG_FD
2021         fi
2022         rm -rf libconftest.dylib*
2023         rm -f conftest.*
2024       fi])
2025
2026     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2027       [lt_cv_ld_exported_symbols_list],
2028       [lt_cv_ld_exported_symbols_list=no
2029       save_LDFLAGS=$LDFLAGS
2030       echo "_main" > conftest.sym
2031       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2032       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2033         [lt_cv_ld_exported_symbols_list=yes],
2034         [lt_cv_ld_exported_symbols_list=no])
2035         LDFLAGS="$save_LDFLAGS"
2036     ])
2037
2038     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2039       [lt_cv_ld_force_load=no
2040       cat > conftest.c << _LT_EOF
2041 int forced_loaded() { return 2;}
2042 _LT_EOF
2043       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2044       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2045       echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2046       $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2047       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2048       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2049       cat > conftest.c << _LT_EOF
2050 int main() { return 0;}
2051 _LT_EOF
2052       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2053       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2054       _lt_result=$?
2055       if test -s conftest.err && $GREP force_load conftest.err; then
2056         cat conftest.err >&AS_MESSAGE_LOG_FD
2057       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
2058         lt_cv_ld_force_load=yes
2059       else
2060         cat conftest.err >&AS_MESSAGE_LOG_FD
2061       fi
2062         rm -f conftest.err libconftest.a conftest conftest.c
2063         rm -rf conftest.dSYM
2064     ])
2065     case $host_os in
2066     rhapsody* | darwin1.[[012]])
2067       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2068     darwin1.*)
2069       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2070     darwin*) # darwin 5.x on
2071       # if running on 10.5 or later, the deployment target defaults
2072       # to the OS version, if on x86, and 10.4, the deployment
2073       # target defaults to 10.4. Don't you love it?
2074       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2075         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2076           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2077         10.[[012]]*)
2078           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2079         10.*)
2080           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2081       esac
2082     ;;
2083   esac
2084     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2085       _lt_dar_single_mod='$single_module'
2086     fi
2087     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2088       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2089     else
2090       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2091     fi
2092     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2093       _lt_dsymutil='~$DSYMUTIL $lib || :'
2094     else
2095       _lt_dsymutil=
2096     fi
2097     ;;
2098   esac
2099 ])
2100
2101
2102 # _LT_DARWIN_LINKER_FEATURES([TAG])
2103 # ---------------------------------
2104 # Checks for linker and compiler features on darwin
2105 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2106 [
2107   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2108   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2109   _LT_TAGVAR(hardcode_direct, $1)=no
2110   _LT_TAGVAR(hardcode_automatic, $1)=yes
2111   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2112   if test "$lt_cv_ld_force_load" = "yes"; then
2113     _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\"`'
2114     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2115                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2116   else
2117     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2118   fi
2119   _LT_TAGVAR(link_all_deplibs, $1)=yes
2120   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2121   case $cc_basename in
2122      ifort*) _lt_dar_can_shared=yes ;;
2123      *) _lt_dar_can_shared=$GCC ;;
2124   esac
2125   if test "$_lt_dar_can_shared" = "yes"; then
2126     output_verbose_link_cmd=func_echo_all
2127     _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}"
2128     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2129     _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}"
2130     _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}"
2131     m4_if([$1], [CXX],
2132 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2133       _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}"
2134       _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}"
2135     fi
2136 ],[])
2137   else
2138   _LT_TAGVAR(ld_shlibs, $1)=no
2139   fi
2140 ])
2141
2142 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2143 # ----------------------------------
2144 # Links a minimal program and checks the executable
2145 # for the system default hardcoded library path. In most cases,
2146 # this is /usr/lib:/lib, but when the MPI compilers are used
2147 # the location of the communication and MPI libs are included too.
2148 # If we don't find anything, use the default library path according
2149 # to the aix ld manual.
2150 # Store the results from the different compilers for each TAGNAME.
2151 # Allow to override them for all tags through lt_cv_aix_libpath.
2152 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2153 [m4_require([_LT_DECL_SED])dnl
2154 if test "${lt_cv_aix_libpath+set}" = set; then
2155   aix_libpath=$lt_cv_aix_libpath
2156 else
2157   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2158   [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2159   lt_aix_libpath_sed='[
2160       /Import File Strings/,/^$/ {
2161           /^0/ {
2162               s/^0  *\([^ ]*\) *$/\1/
2163               p
2164           }
2165       }]'
2166   _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2167   # Check for a 64-bit object if we didn't find anything.
2168   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2169     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2170   fi],[])
2171   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2172     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2173   fi
2174   ])
2175   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2176 fi
2177 ])# _LT_SYS_MODULE_PATH_AIX
2178
2179
2180 # _LT_SHELL_INIT(ARG)
2181 # -------------------
2182 m4_define([_LT_SHELL_INIT],
2183 [m4_divert_text([M4SH-INIT], [$1
2184 ])])# _LT_SHELL_INIT
2185
2186
2187
2188 # _LT_PROG_ECHO_BACKSLASH
2189 # -----------------------
2190 # Find how we can fake an echo command that does not interpret backslash.
2191 # In particular, with Autoconf 2.60 or later we add some code to the start
2192 # of the generated configure script which will find a shell with a builtin
2193 # printf (which we can use as an echo command).
2194 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2195 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2196 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2197 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2198
2199 AC_MSG_CHECKING([how to print strings])
2200 # Test print first, because it will be a builtin if present.
2201 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2202    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2203   ECHO='print -r --'
2204 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2205   ECHO='printf %s\n'
2206 else
2207   # Use this function as a fallback that always works.
2208   func_fallback_echo ()
2209   {
2210     eval 'cat <<_LTECHO_EOF
2211 $[]1
2212 _LTECHO_EOF'
2213   }
2214   ECHO='func_fallback_echo'
2215 fi
2216
2217 # func_echo_all arg...
2218 # Invoke $ECHO with all args, space-separated.
2219 func_echo_all ()
2220 {
2221     $ECHO "$*" 
2222 }
2223
2224 case "$ECHO" in
2225   printf*) AC_MSG_RESULT([printf]) ;;
2226   print*) AC_MSG_RESULT([print -r]) ;;
2227   *) AC_MSG_RESULT([cat]) ;;
2228 esac
2229
2230 m4_ifdef([_AS_DETECT_SUGGESTED],
2231 [_AS_DETECT_SUGGESTED([
2232   test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2233     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2234     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2235     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2236     PATH=/empty FPATH=/empty; export PATH FPATH
2237     test "X`printf %s $ECHO`" = "X$ECHO" \
2238       || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2239
2240 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2241 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2242 ])# _LT_PROG_ECHO_BACKSLASH
2243
2244
2245 # _LT_WITH_SYSROOT
2246 # ----------------
2247 AC_DEFUN([_LT_WITH_SYSROOT],
2248 [AC_MSG_CHECKING([for sysroot])
2249 AC_ARG_WITH([sysroot],
2250 [  --with-sysroot[=DIR] Search for dependent libraries within DIR
2251                         (or the compiler's sysroot if not specified).],
2252 [], [with_sysroot=no])
2253
2254 dnl lt_sysroot will always be passed unquoted.  We quote it here
2255 dnl in case the user passed a directory name.
2256 lt_sysroot=
2257 case ${with_sysroot} in #(
2258  yes)
2259    if test "$GCC" = yes; then
2260      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2261    fi
2262    ;; #(
2263  /*)
2264    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2265    ;; #(
2266  no|'')
2267    ;; #(
2268  *)
2269    AC_MSG_RESULT([${with_sysroot}])
2270    AC_MSG_ERROR([The sysroot must be an absolute path.])
2271    ;;
2272 esac
2273
2274  AC_MSG_RESULT([${lt_sysroot:-no}])
2275 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2276 [dependent libraries, and in which our libraries should be installed.])])
2277
2278 # _LT_ENABLE_LOCK
2279 # ---------------
2280 m4_defun([_LT_ENABLE_LOCK],
2281 [AC_ARG_ENABLE([libtool-lock],
2282   [AS_HELP_STRING([--disable-libtool-lock],
2283     [avoid locking (might break parallel builds)])])
2284 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2285
2286 # Some flags need to be propagated to the compiler or linker for good
2287 # libtool support.
2288 case $host in
2289 ia64-*-hpux*)
2290   # Find out which ABI we are using.
2291   echo 'int i;' > conftest.$ac_ext
2292   if AC_TRY_EVAL(ac_compile); then
2293     case `/usr/bin/file conftest.$ac_objext` in
2294       *ELF-32*)
2295         HPUX_IA64_MODE="32"
2296         ;;
2297       *ELF-64*)
2298         HPUX_IA64_MODE="64"
2299         ;;
2300     esac
2301   fi
2302   rm -rf conftest*
2303   ;;
2304 *-*-irix6*)
2305   # Find out which ABI we are using.
2306   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2307   if AC_TRY_EVAL(ac_compile); then
2308     if test "$lt_cv_prog_gnu_ld" = yes; then
2309       case `/usr/bin/file conftest.$ac_objext` in
2310         *32-bit*)
2311           LD="${LD-ld} -melf32bsmip"
2312           ;;
2313         *N32*)
2314           LD="${LD-ld} -melf32bmipn32"
2315           ;;
2316         *64-bit*)
2317           LD="${LD-ld} -melf64bmip"
2318         ;;
2319       esac
2320     else
2321       case `/usr/bin/file conftest.$ac_objext` in
2322         *32-bit*)
2323           LD="${LD-ld} -32"
2324           ;;
2325         *N32*)
2326           LD="${LD-ld} -n32"
2327           ;;
2328         *64-bit*)
2329           LD="${LD-ld} -64"
2330           ;;
2331       esac
2332     fi
2333   fi
2334   rm -rf conftest*
2335   ;;
2336
2337 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2338 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2339   # Find out which ABI we are using.
2340   echo 'int i;' > conftest.$ac_ext
2341   if AC_TRY_EVAL(ac_compile); then
2342     case `/usr/bin/file conftest.o` in
2343       *32-bit*)
2344         case $host in
2345           x86_64-*kfreebsd*-gnu)
2346             LD="${LD-ld} -m elf_i386_fbsd"
2347             ;;
2348           x86_64-*linux*)
2349             LD="${LD-ld} -m elf_i386"
2350             ;;
2351           ppc64-*linux*|powerpc64-*linux*)
2352             LD="${LD-ld} -m elf32ppclinux"
2353             ;;
2354           s390x-*linux*)
2355             LD="${LD-ld} -m elf_s390"
2356             ;;
2357           sparc64-*linux*)
2358             LD="${LD-ld} -m elf32_sparc"
2359             ;;
2360         esac
2361         ;;
2362       *64-bit*)
2363         case $host in
2364           x86_64-*kfreebsd*-gnu)
2365             LD="${LD-ld} -m elf_x86_64_fbsd"
2366             ;;
2367           x86_64-*linux*)
2368             LD="${LD-ld} -m elf_x86_64"
2369             ;;
2370           ppc*-*linux*|powerpc*-*linux*)
2371             LD="${LD-ld} -m elf64ppc"
2372             ;;
2373           s390*-*linux*|s390*-*tpf*)
2374             LD="${LD-ld} -m elf64_s390"
2375             ;;
2376           sparc*-*linux*)
2377             LD="${LD-ld} -m elf64_sparc"
2378             ;;
2379         esac
2380         ;;
2381     esac
2382   fi
2383   rm -rf conftest*
2384   ;;
2385
2386 *-*-sco3.2v5*)
2387   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2388   SAVE_CFLAGS="$CFLAGS"
2389   CFLAGS="$CFLAGS -belf"
2390   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2391     [AC_LANG_PUSH(C)
2392      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2393      AC_LANG_POP])
2394   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2395     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2396     CFLAGS="$SAVE_CFLAGS"
2397   fi
2398   ;;
2399 *-*solaris*)
2400   # Find out which ABI we are using.
2401   echo 'int i;' > conftest.$ac_ext
2402   if AC_TRY_EVAL(ac_compile); then
2403     case `/usr/bin/file conftest.o` in
2404     *64-bit*)
2405       case $lt_cv_prog_gnu_ld in
2406       yes*)
2407         case $host in
2408         i?86-*-solaris*)
2409           LD="${LD-ld} -m elf_x86_64"
2410           ;;
2411         sparc*-*-solaris*)
2412           LD="${LD-ld} -m elf64_sparc"
2413           ;;
2414         esac
2415         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
2416         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2417           LD="${LD-ld}_sol2"
2418         fi
2419         ;;
2420       *)
2421         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2422           LD="${LD-ld} -64"
2423         fi
2424         ;;
2425       esac
2426       ;;
2427     esac
2428   fi
2429   rm -rf conftest*
2430   ;;
2431 esac
2432
2433 need_locks="$enable_libtool_lock"
2434 ])# _LT_ENABLE_LOCK
2435
2436
2437 # _LT_PROG_AR
2438 # -----------
2439 m4_defun([_LT_PROG_AR],
2440 [AC_CHECK_TOOLS(AR, [ar], false)
2441 : ${AR=ar}
2442 : ${AR_FLAGS=cru}
2443 _LT_DECL([], [AR], [1], [The archiver])
2444 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2445
2446 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2447   [lt_cv_ar_at_file=no
2448    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2449      [echo conftest.$ac_objext > conftest.lst
2450       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2451       AC_TRY_EVAL([lt_ar_try])
2452       if test "$ac_status" -eq 0; then
2453         # Ensure the archiver fails upon bogus file names.
2454         rm -f conftest.$ac_objext libconftest.a
2455         AC_TRY_EVAL([lt_ar_try])
2456         if test "$ac_status" -ne 0; then
2457           lt_cv_ar_at_file=@
2458         fi
2459       fi
2460       rm -f conftest.* libconftest.a
2461      ])
2462   ])
2463
2464 if test "x$lt_cv_ar_at_file" = xno; then
2465   archiver_list_spec=
2466 else
2467   archiver_list_spec=$lt_cv_ar_at_file
2468 fi
2469 _LT_DECL([], [archiver_list_spec], [1],
2470   [How to feed a file listing to the archiver])
2471 ])# _LT_PROG_AR
2472
2473
2474 # _LT_CMD_OLD_ARCHIVE
2475 # -------------------
2476 m4_defun([_LT_CMD_OLD_ARCHIVE],
2477 [_LT_PROG_AR
2478
2479 AC_CHECK_TOOL(STRIP, strip, :)
2480 test -z "$STRIP" && STRIP=:
2481 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2482
2483 AC_CHECK_TOOL(RANLIB, ranlib, :)
2484 test -z "$RANLIB" && RANLIB=:
2485 _LT_DECL([], [RANLIB], [1],
2486     [Commands used to install an old-style archive])
2487
2488 # Determine commands to create old-style static archives.
2489 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2490 old_postinstall_cmds='chmod 644 $oldlib'
2491 old_postuninstall_cmds=
2492
2493 if test -n "$RANLIB"; then
2494   case $host_os in
2495   openbsd*)
2496     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2497     ;;
2498   *)
2499     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2500     ;;
2501   esac
2502   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2503 fi
2504
2505 case $host_os in
2506   darwin*)
2507     lock_old_archive_extraction=yes ;;
2508   *)
2509     lock_old_archive_extraction=no ;;
2510 esac
2511 _LT_DECL([], [old_postinstall_cmds], [2])
2512 _LT_DECL([], [old_postuninstall_cmds], [2])
2513 _LT_TAGDECL([], [old_archive_cmds], [2],
2514     [Commands used to build an old-style archive])
2515 _LT_DECL([], [lock_old_archive_extraction], [0],
2516     [Whether to use a lock for old archive extraction])
2517 ])# _LT_CMD_OLD_ARCHIVE
2518
2519
2520 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2521 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2522 # ----------------------------------------------------------------
2523 # Check whether the given compiler option works
2524 AC_DEFUN([_LT_COMPILER_OPTION],
2525 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2526 m4_require([_LT_DECL_SED])dnl
2527 AC_CACHE_CHECK([$1], [$2],
2528   [$2=no
2529    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2530    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2531    lt_compiler_flag="$3"
2532    # Insert the option either (1) after the last *FLAGS variable, or
2533    # (2) before a word containing "conftest.", or (3) at the end.
2534    # Note that $ac_compile itself does not contain backslashes and begins
2535    # with a dollar sign (not a hyphen), so the echo should work correctly.
2536    # The option is referenced via a variable to avoid confusing sed.
2537    lt_compile=`echo "$ac_compile" | $SED \
2538    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2539    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2540    -e 's:$: $lt_compiler_flag:'`
2541    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2542    (eval "$lt_compile" 2>conftest.err)
2543    ac_status=$?
2544    cat conftest.err >&AS_MESSAGE_LOG_FD
2545    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2546    if (exit $ac_status) && test -s "$ac_outfile"; then
2547      # The compiler can only warn and ignore the option if not recognized
2548      # So say no if there are warnings other than the usual output.
2549      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2550      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2551      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2552        $2=yes
2553      fi
2554    fi
2555    $RM conftest*
2556 ])
2557
2558 if test x"[$]$2" = xyes; then
2559     m4_if([$5], , :, [$5])
2560 else
2561     m4_if([$6], , :, [$6])
2562 fi
2563 ])# _LT_COMPILER_OPTION
2564
2565 # Old name:
2566 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2567 dnl aclocal-1.4 backwards compatibility:
2568 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2569
2570
2571 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2572 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
2573 # ----------------------------------------------------
2574 # Check whether the given linker option works
2575 AC_DEFUN([_LT_LINKER_OPTION],
2576 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2577 m4_require([_LT_DECL_SED])dnl
2578 AC_CACHE_CHECK([$1], [$2],
2579   [$2=no
2580    save_LDFLAGS="$LDFLAGS"
2581    LDFLAGS="$LDFLAGS $3"
2582    echo "$lt_simple_link_test_code" > conftest.$ac_ext
2583    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2584      # The linker can only warn and ignore the option if not recognized
2585      # So say no if there are warnings
2586      if test -s conftest.err; then
2587        # Append any errors to the config.log.
2588        cat conftest.err 1>&AS_MESSAGE_LOG_FD
2589        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2590        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2591        if diff conftest.exp conftest.er2 >/dev/null; then
2592          $2=yes
2593        fi
2594      else
2595        $2=yes
2596      fi
2597    fi
2598    $RM -r conftest*
2599    LDFLAGS="$save_LDFLAGS"
2600 ])
2601
2602 if test x"[$]$2" = xyes; then
2603     m4_if([$4], , :, [$4])
2604 else
2605     m4_if([$5], , :, [$5])
2606 fi
2607 ])# _LT_LINKER_OPTION
2608
2609 # Old name:
2610 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2611 dnl aclocal-1.4 backwards compatibility:
2612 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2613
2614
2615 # LT_CMD_MAX_LEN
2616 #---------------
2617 AC_DEFUN([LT_CMD_MAX_LEN],
2618 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2619 # find the maximum length of command line arguments
2620 AC_MSG_CHECKING([the maximum length of command line arguments])
2621 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2622   i=0
2623   teststring="ABCD"
2624
2625   case $build_os in
2626   msdosdjgpp*)
2627     # On DJGPP, this test can blow up pretty badly due to problems in libc
2628     # (any single argument exceeding 2000 bytes causes a buffer overrun
2629     # during glob expansion).  Even if it were fixed, the result of this
2630     # check would be larger than it should be.
2631     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2632     ;;
2633
2634   gnu*)
2635     # Under GNU Hurd, this test is not required because there is
2636     # no limit to the length of command line arguments.
2637     # Libtool will interpret -1 as no limit whatsoever
2638     lt_cv_sys_max_cmd_len=-1;
2639     ;;
2640
2641   cygwin* | mingw* | cegcc*)
2642     # On Win9x/ME, this test blows up -- it succeeds, but takes
2643     # about 5 minutes as the teststring grows exponentially.
2644     # Worse, since 9x/ME are not pre-emptively multitasking,
2645     # you end up with a "frozen" computer, even though with patience
2646     # the test eventually succeeds (with a max line length of 256k).
2647     # Instead, let's just punt: use the minimum linelength reported by
2648     # all of the supported platforms: 8192 (on NT/2K/XP).
2649     lt_cv_sys_max_cmd_len=8192;
2650     ;;
2651
2652   mint*)
2653     # On MiNT this can take a long time and run out of memory.
2654     lt_cv_sys_max_cmd_len=8192;
2655     ;;
2656
2657   amigaos*)
2658     # On AmigaOS with pdksh, this test takes hours, literally.
2659     # So we just punt and use a minimum line length of 8192.
2660     lt_cv_sys_max_cmd_len=8192;
2661     ;;
2662
2663   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2664     # This has been around since 386BSD, at least.  Likely further.
2665     if test -x /sbin/sysctl; then
2666       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2667     elif test -x /usr/sbin/sysctl; then
2668       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2669     else
2670       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
2671     fi
2672     # And add a safety zone
2673     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2674     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2675     ;;
2676
2677   interix*)
2678     # We know the value 262144 and hardcode it with a safety zone (like BSD)
2679     lt_cv_sys_max_cmd_len=196608
2680     ;;
2681
2682   os2*)
2683     # The test takes a long time on OS/2.
2684     lt_cv_sys_max_cmd_len=8192
2685     ;;
2686
2687   osf*)
2688     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2689     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2690     # nice to cause kernel panics so lets avoid the loop below.
2691     # First set a reasonable default.
2692     lt_cv_sys_max_cmd_len=16384
2693     #
2694     if test -x /sbin/sysconfig; then
2695       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2696         *1*) lt_cv_sys_max_cmd_len=-1 ;;
2697       esac
2698     fi
2699     ;;
2700   sco3.2v5*)
2701     lt_cv_sys_max_cmd_len=102400
2702     ;;
2703   sysv5* | sco5v6* | sysv4.2uw2*)
2704     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2705     if test -n "$kargmax"; then
2706       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
2707     else
2708       lt_cv_sys_max_cmd_len=32768
2709     fi
2710     ;;
2711   *)
2712     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2713     if test -n "$lt_cv_sys_max_cmd_len"; then
2714       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2715       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2716     else
2717       # Make teststring a little bigger before we do anything with it.
2718       # a 1K string should be a reasonable start.
2719       for i in 1 2 3 4 5 6 7 8 ; do
2720         teststring=$teststring$teststring
2721       done
2722       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2723       # If test is not a shell built-in, we'll probably end up computing a
2724       # maximum length that is only half of the actual maximum length, but
2725       # we can't tell.
2726       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
2727                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2728               test $i != 17 # 1/2 MB should be enough
2729       do
2730         i=`expr $i + 1`
2731         teststring=$teststring$teststring
2732       done
2733       # Only check the string length outside the loop.
2734       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2735       teststring=
2736       # Add a significant safety factor because C++ compilers can tack on
2737       # massive amounts of additional arguments before passing them to the
2738       # linker.  It appears as though 1/2 is a usable value.
2739       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2740     fi
2741     ;;
2742   esac
2743 ])
2744 if test -n $lt_cv_sys_max_cmd_len ; then
2745   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2746 else
2747   AC_MSG_RESULT(none)
2748 fi
2749 max_cmd_len=$lt_cv_sys_max_cmd_len
2750 _LT_DECL([], [max_cmd_len], [0],
2751     [What is the maximum length of a command?])
2752 ])# LT_CMD_MAX_LEN
2753
2754 # Old name:
2755 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2756 dnl aclocal-1.4 backwards compatibility:
2757 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2758
2759
2760 # _LT_HEADER_DLFCN
2761 # ----------------
2762 m4_defun([_LT_HEADER_DLFCN],
2763 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2764 ])# _LT_HEADER_DLFCN
2765
2766
2767 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2768 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2769 # ----------------------------------------------------------------
2770 m4_defun([_LT_TRY_DLOPEN_SELF],
2771 [m4_require([_LT_HEADER_DLFCN])dnl
2772 if test "$cross_compiling" = yes; then :
2773   [$4]
2774 else
2775   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2776   lt_status=$lt_dlunknown
2777   cat > conftest.$ac_ext <<_LT_EOF
2778 [#line $LINENO "configure"
2779 #include "confdefs.h"
2780
2781 #if HAVE_DLFCN_H
2782 #include <dlfcn.h>
2783 #endif
2784
2785 #include <stdio.h>
2786
2787 #ifdef RTLD_GLOBAL
2788 #  define LT_DLGLOBAL           RTLD_GLOBAL
2789 #else
2790 #  ifdef DL_GLOBAL
2791 #    define LT_DLGLOBAL         DL_GLOBAL
2792 #  else
2793 #    define LT_DLGLOBAL         0
2794 #  endif
2795 #endif
2796
2797 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2798    find out it does not work in some platform. */
2799 #ifndef LT_DLLAZY_OR_NOW
2800 #  ifdef RTLD_LAZY
2801 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
2802 #  else
2803 #    ifdef DL_LAZY
2804 #      define LT_DLLAZY_OR_NOW          DL_LAZY
2805 #    else
2806 #      ifdef RTLD_NOW
2807 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
2808 #      else
2809 #        ifdef DL_NOW
2810 #          define LT_DLLAZY_OR_NOW      DL_NOW
2811 #        else
2812 #          define LT_DLLAZY_OR_NOW      0
2813 #        endif
2814 #      endif
2815 #    endif
2816 #  endif
2817 #endif
2818
2819 /* When -fvisbility=hidden is used, assume the code has been annotated
2820    correspondingly for the symbols needed.  */
2821 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2822 int fnord () __attribute__((visibility("default")));
2823 #endif
2824
2825 int fnord () { return 42; }
2826 int main ()
2827 {
2828   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2829   int status = $lt_dlunknown;
2830
2831   if (self)
2832     {
2833       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2834       else
2835         {
2836           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2837           else puts (dlerror ());
2838         }
2839       /* dlclose (self); */
2840     }
2841   else
2842     puts (dlerror ());
2843
2844   return status;
2845 }]
2846 _LT_EOF
2847   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2848     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2849     lt_status=$?
2850     case x$lt_status in
2851       x$lt_dlno_uscore) $1 ;;
2852       x$lt_dlneed_uscore) $2 ;;
2853       x$lt_dlunknown|x*) $3 ;;
2854     esac
2855   else :
2856     # compilation failed
2857     $3
2858   fi
2859 fi
2860 rm -fr conftest*
2861 ])# _LT_TRY_DLOPEN_SELF
2862
2863
2864 # LT_SYS_DLOPEN_SELF
2865 # ------------------
2866 AC_DEFUN([LT_SYS_DLOPEN_SELF],
2867 [m4_require([_LT_HEADER_DLFCN])dnl
2868 if test "x$enable_dlopen" != xyes; then
2869   enable_dlopen=unknown
2870   enable_dlopen_self=unknown
2871   enable_dlopen_self_static=unknown
2872 else
2873   lt_cv_dlopen=no
2874   lt_cv_dlopen_libs=
2875
2876   case $host_os in
2877   beos*)
2878     lt_cv_dlopen="load_add_on"
2879     lt_cv_dlopen_libs=
2880     lt_cv_dlopen_self=yes
2881     ;;
2882
2883   mingw* | pw32* | cegcc*)
2884     lt_cv_dlopen="LoadLibrary"
2885     lt_cv_dlopen_libs=
2886     ;;
2887
2888   cygwin*)
2889     lt_cv_dlopen="dlopen"
2890     lt_cv_dlopen_libs=
2891     ;;
2892
2893   darwin*)
2894   # if libdl is installed we need to link against it
2895     AC_CHECK_LIB([dl], [dlopen],
2896                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2897     lt_cv_dlopen="dyld"
2898     lt_cv_dlopen_libs=
2899     lt_cv_dlopen_self=yes
2900     ])
2901     ;;
2902
2903   *)
2904     AC_CHECK_FUNC([shl_load],
2905           [lt_cv_dlopen="shl_load"],
2906       [AC_CHECK_LIB([dld], [shl_load],
2907             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2908         [AC_CHECK_FUNC([dlopen],
2909               [lt_cv_dlopen="dlopen"],
2910           [AC_CHECK_LIB([dl], [dlopen],
2911                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2912             [AC_CHECK_LIB([svld], [dlopen],
2913                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2914               [AC_CHECK_LIB([dld], [dld_link],
2915                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2916               ])
2917             ])
2918           ])
2919         ])
2920       ])
2921     ;;
2922   esac
2923
2924   if test "x$lt_cv_dlopen" != xno; then
2925     enable_dlopen=yes
2926   else
2927     enable_dlopen=no
2928   fi
2929
2930   case $lt_cv_dlopen in
2931   dlopen)
2932     save_CPPFLAGS="$CPPFLAGS"
2933     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2934
2935     save_LDFLAGS="$LDFLAGS"
2936     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2937
2938     save_LIBS="$LIBS"
2939     LIBS="$lt_cv_dlopen_libs $LIBS"
2940
2941     AC_CACHE_CHECK([whether a program can dlopen itself],
2942           lt_cv_dlopen_self, [dnl
2943           _LT_TRY_DLOPEN_SELF(
2944             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2945             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2946     ])
2947
2948     if test "x$lt_cv_dlopen_self" = xyes; then
2949       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2950       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2951           lt_cv_dlopen_self_static, [dnl
2952           _LT_TRY_DLOPEN_SELF(
2953             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2954             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2955       ])
2956     fi
2957
2958     CPPFLAGS="$save_CPPFLAGS"
2959     LDFLAGS="$save_LDFLAGS"
2960     LIBS="$save_LIBS"
2961     ;;
2962   esac
2963
2964   case $lt_cv_dlopen_self in
2965   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2966   *) enable_dlopen_self=unknown ;;
2967   esac
2968
2969   case $lt_cv_dlopen_self_static in
2970   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2971   *) enable_dlopen_self_static=unknown ;;
2972   esac
2973 fi
2974 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2975          [Whether dlopen is supported])
2976 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2977          [Whether dlopen of programs is supported])
2978 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2979          [Whether dlopen of statically linked programs is supported])
2980 ])# LT_SYS_DLOPEN_SELF
2981
2982 # Old name:
2983 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2984 dnl aclocal-1.4 backwards compatibility:
2985 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2986
2987
2988 # _LT_COMPILER_C_O([TAGNAME])
2989 # ---------------------------
2990 # Check to see if options -c and -o are simultaneously supported by compiler.
2991 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2992 m4_defun([_LT_COMPILER_C_O],
2993 [m4_require([_LT_DECL_SED])dnl
2994 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2995 m4_require([_LT_TAG_COMPILER])dnl
2996 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2997   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2998   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2999    $RM -r conftest 2>/dev/null
3000    mkdir conftest
3001    cd conftest
3002    mkdir out
3003    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3004
3005    lt_compiler_flag="-o out/conftest2.$ac_objext"
3006    # Insert the option either (1) after the last *FLAGS variable, or
3007    # (2) before a word containing "conftest.", or (3) at the end.
3008    # Note that $ac_compile itself does not contain backslashes and begins
3009    # with a dollar sign (not a hyphen), so the echo should work correctly.
3010    lt_compile=`echo "$ac_compile" | $SED \
3011    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3012    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3013    -e 's:$: $lt_compiler_flag:'`
3014    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3015    (eval "$lt_compile" 2>out/conftest.err)
3016    ac_status=$?
3017    cat out/conftest.err >&AS_MESSAGE_LOG_FD
3018    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3019    if (exit $ac_status) && test -s out/conftest2.$ac_objext
3020    then
3021      # The compiler can only warn and ignore the option if not recognized
3022      # So say no if there are warnings
3023      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3024      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3025      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3026        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3027      fi
3028    fi
3029    chmod u+w . 2>&AS_MESSAGE_LOG_FD
3030    $RM conftest*
3031    # SGI C++ compiler will create directory out/ii_files/ for
3032    # template instantiation
3033    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3034    $RM out/* && rmdir out
3035    cd ..
3036    $RM -r conftest
3037    $RM conftest*
3038 ])
3039 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3040         [Does compiler simultaneously support -c and -o options?])
3041 ])# _LT_COMPILER_C_O
3042
3043
3044 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3045 # ----------------------------------
3046 # Check to see if we can do hard links to lock some files if needed
3047 m4_defun([_LT_COMPILER_FILE_LOCKS],
3048 [m4_require([_LT_ENABLE_LOCK])dnl
3049 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3050 _LT_COMPILER_C_O([$1])
3051
3052 hard_links="nottested"
3053 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3054   # do not overwrite the value of need_locks provided by the user
3055   AC_MSG_CHECKING([if we can lock with hard links])
3056   hard_links=yes
3057   $RM conftest*
3058   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3059   touch conftest.a
3060   ln conftest.a conftest.b 2>&5 || hard_links=no
3061   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3062   AC_MSG_RESULT([$hard_links])
3063   if test "$hard_links" = no; then
3064     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3065     need_locks=warn
3066   fi
3067 else
3068   need_locks=no
3069 fi
3070 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3071 ])# _LT_COMPILER_FILE_LOCKS
3072
3073
3074 # _LT_CHECK_OBJDIR
3075 # ----------------
3076 m4_defun([_LT_CHECK_OBJDIR],
3077 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3078 [rm -f .libs 2>/dev/null
3079 mkdir .libs 2>/dev/null
3080 if test -d .libs; then
3081   lt_cv_objdir=.libs
3082 else
3083   # MS-DOS does not allow filenames that begin with a dot.
3084   lt_cv_objdir=_libs
3085 fi
3086 rmdir .libs 2>/dev/null])
3087 objdir=$lt_cv_objdir
3088 _LT_DECL([], [objdir], [0],
3089          [The name of the directory that contains temporary libtool files])dnl
3090 m4_pattern_allow([LT_OBJDIR])dnl
3091 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3092   [Define to the sub-directory in which libtool stores uninstalled libraries.])
3093 ])# _LT_CHECK_OBJDIR
3094
3095
3096 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3097 # --------------------------------------
3098 # Check hardcoding attributes.
3099 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3100 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3101 _LT_TAGVAR(hardcode_action, $1)=
3102 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3103    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3104    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3105
3106   # We can hardcode non-existent directories.
3107   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3108      # If the only mechanism to avoid hardcoding is shlibpath_var, we
3109      # have to relink, otherwise we might link with an installed library
3110      # when we should be linking with a yet-to-be-installed one
3111      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3112      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3113     # Linking always hardcodes the temporary library directory.
3114     _LT_TAGVAR(hardcode_action, $1)=relink
3115   else
3116     # We can link without hardcoding, and we can hardcode nonexisting dirs.
3117     _LT_TAGVAR(hardcode_action, $1)=immediate
3118   fi
3119 else
3120   # We cannot hardcode anything, or else we can only hardcode existing
3121   # directories.
3122   _LT_TAGVAR(hardcode_action, $1)=unsupported
3123 fi
3124 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3125
3126 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3127    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3128   # Fast installation is not supported
3129   enable_fast_install=no
3130 elif test "$shlibpath_overrides_runpath" = yes ||
3131      test "$enable_shared" = no; then
3132   # Fast installation is not necessary
3133   enable_fast_install=needless
3134 fi
3135 _LT_TAGDECL([], [hardcode_action], [0],
3136     [How to hardcode a shared library path into an executable])
3137 ])# _LT_LINKER_HARDCODE_LIBPATH
3138
3139
3140 # _LT_CMD_STRIPLIB
3141 # ----------------
3142 m4_defun([_LT_CMD_STRIPLIB],
3143 [m4_require([_LT_DECL_EGREP])
3144 striplib=
3145 old_striplib=
3146 AC_MSG_CHECKING([whether stripping libraries is possible])
3147 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3148   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3149   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3150   AC_MSG_RESULT([yes])
3151 else
3152 # FIXME - insert some real tests, host_os isn't really good enough
3153   case $host_os in
3154   darwin*)
3155     if test -n "$STRIP" ; then
3156       striplib="$STRIP -x"
3157       old_striplib="$STRIP -S"
3158       AC_MSG_RESULT([yes])
3159     else
3160       AC_MSG_RESULT([no])
3161     fi
3162     ;;
3163   *)
3164     AC_MSG_RESULT([no])
3165     ;;
3166   esac
3167 fi
3168 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3169 _LT_DECL([], [striplib], [1])
3170 ])# _LT_CMD_STRIPLIB
3171
3172
3173 # _LT_SYS_DYNAMIC_LINKER([TAG])
3174 # -----------------------------
3175 # PORTME Fill in your ld.so characteristics
3176 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3177 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3178 m4_require([_LT_DECL_EGREP])dnl
3179 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3180 m4_require([_LT_DECL_OBJDUMP])dnl
3181 m4_require([_LT_DECL_SED])dnl
3182 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3183 AC_MSG_CHECKING([dynamic linker characteristics])
3184 m4_if([$1],
3185         [], [
3186 if test "$GCC" = yes; then
3187   case $host_os in
3188     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3189     *) lt_awk_arg="/^libraries:/" ;;
3190   esac
3191   case $host_os in
3192     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3193     *) lt_sed_strip_eq="s,=/,/,g" ;;
3194   esac
3195   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3196   case $lt_search_path_spec in
3197   *\;*)
3198     # if the path contains ";" then we assume it to be the separator
3199     # otherwise default to the standard path separator (i.e. ":") - it is
3200     # assumed that no part of a normal pathname contains ";" but that should
3201     # okay in the real world where ";" in dirpaths is itself problematic.
3202     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3203     ;;
3204   *)
3205     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3206     ;;
3207   esac
3208   # Ok, now we have the path, separated by spaces, we can step through it
3209   # and add multilib dir if necessary.
3210   lt_tmp_lt_search_path_spec=
3211   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3212   for lt_sys_path in $lt_search_path_spec; do
3213     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3214       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3215     else
3216       test -d "$lt_sys_path" && \
3217         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3218     fi
3219   done
3220   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3221 BEGIN {RS=" "; FS="/|\n";} {
3222   lt_foo="";
3223   lt_count=0;
3224   for (lt_i = NF; lt_i > 0; lt_i--) {
3225     if ($lt_i != "" && $lt_i != ".") {
3226       if ($lt_i == "..") {
3227         lt_count++;
3228       } else {
3229         if (lt_count == 0) {
3230           lt_foo="/" $lt_i lt_foo;
3231         } else {
3232           lt_count--;
3233         }
3234       }
3235     }
3236   }
3237   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3238   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3239 }'`
3240   # AWK program above erroneously prepends '/' to C:/dos/paths
3241   # for these hosts.
3242   case $host_os in
3243     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3244       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3245   esac
3246   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3247 else
3248   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3249 fi])
3250 library_names_spec=
3251 libname_spec='lib$name'
3252 soname_spec=
3253 shrext_cmds=".so"
3254 postinstall_cmds=
3255 postuninstall_cmds=
3256 finish_cmds=
3257 finish_eval=
3258 shlibpath_var=
3259 shlibpath_overrides_runpath=unknown
3260 version_type=none
3261 dynamic_linker="$host_os ld.so"
3262 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3263 need_lib_prefix=unknown
3264 hardcode_into_libs=no
3265
3266 # when you set need_version to no, make sure it does not cause -set_version
3267 # flags to be left without arguments
3268 need_version=unknown
3269
3270 case $host_os in
3271 aix3*)
3272   version_type=linux # correct to gnu/linux during the next big refactor
3273   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3274   shlibpath_var=LIBPATH
3275
3276   # AIX 3 has no versioning support, so we append a major version to the name.
3277   soname_spec='${libname}${release}${shared_ext}$major'
3278   ;;
3279
3280 aix[[4-9]]*)
3281   version_type=linux # correct to gnu/linux during the next big refactor
3282   need_lib_prefix=no
3283   need_version=no
3284   hardcode_into_libs=yes
3285   if test "$host_cpu" = ia64; then
3286     # AIX 5 supports IA64
3287     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3288     shlibpath_var=LD_LIBRARY_PATH
3289   else
3290     # With GCC up to 2.95.x, collect2 would create an import file
3291     # for dependence libraries.  The import file would start with
3292     # the line `#! .'.  This would cause the generated library to
3293     # depend on `.', always an invalid library.  This was fixed in
3294     # development snapshots of GCC prior to 3.0.
3295     case $host_os in
3296       aix4 | aix4.[[01]] | aix4.[[01]].*)
3297       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3298            echo ' yes '
3299            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3300         :
3301       else
3302         can_build_shared=no
3303       fi
3304       ;;
3305     esac
3306     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3307     # soname into executable. Probably we can add versioning support to
3308     # collect2, so additional links can be useful in future.
3309     if test "$aix_use_runtimelinking" = yes; then
3310       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3311       # instead of lib<name>.a to let people know that these are not
3312       # typical AIX shared libraries.
3313       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3314     else
3315       # We preserve .a as extension for shared libraries through AIX4.2
3316       # and later when we are not doing run time linking.
3317       library_names_spec='${libname}${release}.a $libname.a'
3318       soname_spec='${libname}${release}${shared_ext}$major'
3319     fi
3320     shlibpath_var=LIBPATH
3321   fi
3322   ;;
3323
3324 amigaos*)
3325   case $host_cpu in
3326   powerpc)
3327     # Since July 2007 AmigaOS4 officially supports .so libraries.
3328     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3329     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3330     ;;
3331   m68k)
3332     library_names_spec='$libname.ixlibrary $libname.a'
3333     # Create ${libname}_ixlibrary.a entries in /sys/libs.
3334     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'
3335     ;;
3336   esac
3337   ;;
3338
3339 beos*)
3340   library_names_spec='${libname}${shared_ext}'
3341   dynamic_linker="$host_os ld.so"
3342   shlibpath_var=LIBRARY_PATH
3343   ;;
3344
3345 bsdi[[45]]*)
3346   version_type=linux # correct to gnu/linux during the next big refactor
3347   need_version=no
3348   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3349   soname_spec='${libname}${release}${shared_ext}$major'
3350   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3351   shlibpath_var=LD_LIBRARY_PATH
3352   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3353   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3354   # the default ld.so.conf also contains /usr/contrib/lib and
3355   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3356   # libtool to hard-code these into programs
3357   ;;
3358
3359 cygwin* | mingw* | pw32* | cegcc*)
3360   version_type=windows
3361   shrext_cmds=".dll"
3362   need_version=no
3363   need_lib_prefix=no
3364
3365   case $GCC,$cc_basename in
3366   yes,*)
3367     # gcc
3368     library_names_spec='$libname.dll.a'
3369     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3370     postinstall_cmds='base_file=`basename \${file}`~
3371       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3372       dldir=$destdir/`dirname \$dlpath`~
3373       test -d \$dldir || mkdir -p \$dldir~
3374       $install_prog $dir/$dlname \$dldir/$dlname~
3375       chmod a+x \$dldir/$dlname~
3376       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3377         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3378       fi'
3379     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3380       dlpath=$dir/\$dldll~
3381        $RM \$dlpath'
3382     shlibpath_overrides_runpath=yes
3383
3384     case $host_os in
3385     cygwin*)
3386       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3387       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3388 m4_if([$1], [],[
3389       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3390       ;;
3391     mingw* | cegcc*)
3392       # MinGW DLLs use traditional 'lib' prefix
3393       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3394       ;;
3395     pw32*)
3396       # pw32 DLLs use 'pw' prefix rather than 'lib'
3397       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3398       ;;
3399     esac
3400     dynamic_linker='Win32 ld.exe'
3401     ;;
3402
3403   *,cl*)
3404     # Native MSVC
3405     libname_spec='$name'
3406     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3407     library_names_spec='${libname}.dll.lib'
3408
3409     case $build_os in
3410     mingw*)
3411       sys_lib_search_path_spec=
3412       lt_save_ifs=$IFS
3413       IFS=';'
3414       for lt_path in $LIB
3415       do
3416         IFS=$lt_save_ifs
3417         # Let DOS variable expansion print the short 8.3 style file name.
3418         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3419         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3420       done
3421       IFS=$lt_save_ifs
3422       # Convert to MSYS style.
3423       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3424       ;;
3425     cygwin*)
3426       # Convert to unix form, then to dos form, then back to unix form
3427       # but this time dos style (no spaces!) so that the unix form looks
3428       # like /cygdrive/c/PROGRA~1:/cygdr...
3429       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3430       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3431       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3432       ;;
3433     *)
3434       sys_lib_search_path_spec="$LIB"
3435       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3436         # It is most probably a Windows format PATH.
3437         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3438       else
3439         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3440       fi
3441       # FIXME: find the short name or the path components, as spaces are
3442       # common. (e.g. "Program Files" -> "PROGRA~1")
3443       ;;
3444     esac
3445
3446     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3447     postinstall_cmds='base_file=`basename \${file}`~
3448       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3449       dldir=$destdir/`dirname \$dlpath`~
3450       test -d \$dldir || mkdir -p \$dldir~
3451       $install_prog $dir/$dlname \$dldir/$dlname'
3452     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3453       dlpath=$dir/\$dldll~
3454        $RM \$dlpath'
3455     shlibpath_overrides_runpath=yes
3456     dynamic_linker='Win32 link.exe'
3457     ;;
3458
3459   *)
3460     # Assume MSVC wrapper
3461     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3462     dynamic_linker='Win32 ld.exe'
3463     ;;
3464   esac
3465   # FIXME: first we should search . and the directory the executable is in
3466   shlibpath_var=PATH
3467   ;;
3468
3469 darwin* | rhapsody*)
3470   dynamic_linker="$host_os dyld"
3471   version_type=darwin
3472   need_lib_prefix=no
3473   need_version=no
3474   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3475   soname_spec='${libname}${release}${major}$shared_ext'
3476   shlibpath_overrides_runpath=yes
3477   shlibpath_var=DYLD_LIBRARY_PATH
3478   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3479 m4_if([$1], [],[
3480   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3481   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3482   ;;
3483
3484 dgux*)
3485   version_type=linux # correct to gnu/linux during the next big refactor
3486   need_lib_prefix=no
3487   need_version=no
3488   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3489   soname_spec='${libname}${release}${shared_ext}$major'
3490   shlibpath_var=LD_LIBRARY_PATH
3491   ;;
3492
3493 freebsd* | dragonfly*)
3494   # DragonFly does not have aout.  When/if they implement a new
3495   # versioning mechanism, adjust this.
3496   if test -x /usr/bin/objformat; then
3497     objformat=`/usr/bin/objformat`
3498   else
3499     case $host_os in
3500     freebsd[[23]].*) objformat=aout ;;
3501     *) objformat=elf ;;
3502     esac
3503   fi
3504   version_type=freebsd-$objformat
3505   case $version_type in
3506     freebsd-elf*)
3507       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3508       need_version=no
3509       need_lib_prefix=no
3510       ;;
3511     freebsd-*)
3512       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3513       need_version=yes
3514       ;;
3515   esac
3516   shlibpath_var=LD_LIBRARY_PATH
3517   case $host_os in
3518   freebsd2.*)
3519     shlibpath_overrides_runpath=yes
3520     ;;
3521   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3522     shlibpath_overrides_runpath=yes
3523     hardcode_into_libs=yes
3524     ;;
3525   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3526   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3527     shlibpath_overrides_runpath=no
3528     hardcode_into_libs=yes
3529     ;;
3530   *) # from 4.6 on, and DragonFly
3531     shlibpath_overrides_runpath=yes
3532     hardcode_into_libs=yes
3533     ;;
3534   esac
3535   ;;
3536
3537 gnu*)
3538   version_type=linux # correct to gnu/linux during the next big refactor
3539   need_lib_prefix=no
3540   need_version=no
3541   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3542   soname_spec='${libname}${release}${shared_ext}$major'
3543   shlibpath_var=LD_LIBRARY_PATH
3544   shlibpath_overrides_runpath=no
3545   hardcode_into_libs=yes
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)
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 gnu*)
4281   lt_cv_deplibs_check_method=pass_all
4282   ;;
4283
4284 haiku*)
4285   lt_cv_deplibs_check_method=pass_all
4286   ;;
4287
4288 hpux10.20* | hpux11*)
4289   lt_cv_file_magic_cmd=/usr/bin/file
4290   case $host_cpu in
4291   ia64*)
4292     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4293     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4294     ;;
4295   hppa*64*)
4296     [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]']
4297     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4298     ;;
4299   *)
4300     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4301     lt_cv_file_magic_test_file=/usr/lib/libc.sl
4302     ;;
4303   esac
4304   ;;
4305
4306 interix[[3-9]]*)
4307   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4308   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4309   ;;
4310
4311 irix5* | irix6* | nonstopux*)
4312   case $LD in
4313   *-32|*"-32 ") libmagic=32-bit;;
4314   *-n32|*"-n32 ") libmagic=N32;;
4315   *-64|*"-64 ") libmagic=64-bit;;
4316   *) libmagic=never-match;;
4317   esac
4318   lt_cv_deplibs_check_method=pass_all
4319   ;;
4320
4321 # This must be glibc/ELF.
4322 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4323   lt_cv_deplibs_check_method=pass_all
4324   ;;
4325
4326 netbsd* | netbsdelf*-gnu)
4327   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4328     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4329   else
4330     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4331   fi
4332   ;;
4333
4334 newos6*)
4335   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4336   lt_cv_file_magic_cmd=/usr/bin/file
4337   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4338   ;;
4339
4340 *nto* | *qnx*)
4341   lt_cv_deplibs_check_method=pass_all
4342   ;;
4343
4344 openbsd*)
4345   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4346     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4347   else
4348     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4349   fi
4350   ;;
4351
4352 osf3* | osf4* | osf5*)
4353   lt_cv_deplibs_check_method=pass_all
4354   ;;
4355
4356 rdos*)
4357   lt_cv_deplibs_check_method=pass_all
4358   ;;
4359
4360 solaris*)
4361   lt_cv_deplibs_check_method=pass_all
4362   ;;
4363
4364 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4365   lt_cv_deplibs_check_method=pass_all
4366   ;;
4367
4368 sysv4 | sysv4.3*)
4369   case $host_vendor in
4370   motorola)
4371     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]]'
4372     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4373     ;;
4374   ncr)
4375     lt_cv_deplibs_check_method=pass_all
4376     ;;
4377   sequent)
4378     lt_cv_file_magic_cmd='/bin/file'
4379     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4380     ;;
4381   sni)
4382     lt_cv_file_magic_cmd='/bin/file'
4383     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4384     lt_cv_file_magic_test_file=/lib/libc.so
4385     ;;
4386   siemens)
4387     lt_cv_deplibs_check_method=pass_all
4388     ;;
4389   pc)
4390     lt_cv_deplibs_check_method=pass_all
4391     ;;
4392   esac
4393   ;;
4394
4395 tpf*)
4396   lt_cv_deplibs_check_method=pass_all
4397   ;;
4398 esac
4399 ])
4400
4401 file_magic_glob=
4402 want_nocaseglob=no
4403 if test "$build" = "$host"; then
4404   case $host_os in
4405   mingw* | pw32*)
4406     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4407       want_nocaseglob=yes
4408     else
4409       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4410     fi
4411     ;;
4412   esac
4413 fi
4414
4415 file_magic_cmd=$lt_cv_file_magic_cmd
4416 deplibs_check_method=$lt_cv_deplibs_check_method
4417 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4418
4419 _LT_DECL([], [deplibs_check_method], [1],
4420     [Method to check whether dependent libraries are shared objects])
4421 _LT_DECL([], [file_magic_cmd], [1],
4422     [Command to use when deplibs_check_method = "file_magic"])
4423 _LT_DECL([], [file_magic_glob], [1],
4424     [How to find potential files when deplibs_check_method = "file_magic"])
4425 _LT_DECL([], [want_nocaseglob], [1],
4426     [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4427 ])# _LT_CHECK_MAGIC_METHOD
4428
4429
4430 # LT_PATH_NM
4431 # ----------
4432 # find the pathname to a BSD- or MS-compatible name lister
4433 AC_DEFUN([LT_PATH_NM],
4434 [AC_REQUIRE([AC_PROG_CC])dnl
4435 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4436 [if test -n "$NM"; then
4437   # Let the user override the test.
4438   lt_cv_path_NM="$NM"
4439 else
4440   lt_nm_to_check="${ac_tool_prefix}nm"
4441   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4442     lt_nm_to_check="$lt_nm_to_check nm"
4443   fi
4444   for lt_tmp_nm in $lt_nm_to_check; do
4445     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4446     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4447       IFS="$lt_save_ifs"
4448       test -z "$ac_dir" && ac_dir=.
4449       tmp_nm="$ac_dir/$lt_tmp_nm"
4450       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4451         # Check to see if the nm accepts a BSD-compat flag.
4452         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4453         #   nm: unknown option "B" ignored
4454         # Tru64's nm complains that /dev/null is an invalid object file
4455         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4456         */dev/null* | *'Invalid file or object type'*)
4457           lt_cv_path_NM="$tmp_nm -B"
4458           break
4459           ;;
4460         *)
4461           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4462           */dev/null*)
4463             lt_cv_path_NM="$tmp_nm -p"
4464             break
4465             ;;
4466           *)
4467             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4468             continue # so that we can try to find one that supports BSD flags
4469             ;;
4470           esac
4471           ;;
4472         esac
4473       fi
4474     done
4475     IFS="$lt_save_ifs"
4476   done
4477   : ${lt_cv_path_NM=no}
4478 fi])
4479 if test "$lt_cv_path_NM" != "no"; then
4480   NM="$lt_cv_path_NM"
4481 else
4482   # Didn't find any BSD compatible name lister, look for dumpbin.
4483   if test -n "$DUMPBIN"; then :
4484     # Let the user override the test.
4485   else
4486     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4487     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4488     *COFF*)
4489       DUMPBIN="$DUMPBIN -symbols"
4490       ;;
4491     *)
4492       DUMPBIN=:
4493       ;;
4494     esac
4495   fi
4496   AC_SUBST([DUMPBIN])
4497   if test "$DUMPBIN" != ":"; then
4498     NM="$DUMPBIN"
4499   fi
4500 fi
4501 test -z "$NM" && NM=nm
4502 AC_SUBST([NM])
4503 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4504
4505 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4506   [lt_cv_nm_interface="BSD nm"
4507   echo "int some_variable = 0;" > conftest.$ac_ext
4508   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4509   (eval "$ac_compile" 2>conftest.err)
4510   cat conftest.err >&AS_MESSAGE_LOG_FD
4511   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4512   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4513   cat conftest.err >&AS_MESSAGE_LOG_FD
4514   (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4515   cat conftest.out >&AS_MESSAGE_LOG_FD
4516   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4517     lt_cv_nm_interface="MS dumpbin"
4518   fi
4519   rm -f conftest*])
4520 ])# LT_PATH_NM
4521
4522 # Old names:
4523 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4524 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4525 dnl aclocal-1.4 backwards compatibility:
4526 dnl AC_DEFUN([AM_PROG_NM], [])
4527 dnl AC_DEFUN([AC_PROG_NM], [])
4528
4529 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4530 # --------------------------------
4531 # how to determine the name of the shared library
4532 # associated with a specific link library.
4533 #  -- PORTME fill in with the dynamic library characteristics
4534 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4535 [m4_require([_LT_DECL_EGREP])
4536 m4_require([_LT_DECL_OBJDUMP])
4537 m4_require([_LT_DECL_DLLTOOL])
4538 AC_CACHE_CHECK([how to associate runtime and link libraries],
4539 lt_cv_sharedlib_from_linklib_cmd,
4540 [lt_cv_sharedlib_from_linklib_cmd='unknown'
4541
4542 case $host_os in
4543 cygwin* | mingw* | pw32* | cegcc*)
4544   # two different shell functions defined in ltmain.sh
4545   # decide which to use based on capabilities of $DLLTOOL
4546   case `$DLLTOOL --help 2>&1` in
4547   *--identify-strict*)
4548     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4549     ;;
4550   *)
4551     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4552     ;;
4553   esac
4554   ;;
4555 *)
4556   # fallback: assume linklib IS sharedlib
4557   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4558   ;;
4559 esac
4560 ])
4561 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4562 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4563
4564 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4565     [Command to associate shared and link libraries])
4566 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4567
4568
4569 # _LT_PATH_MANIFEST_TOOL
4570 # ----------------------
4571 # locate the manifest tool
4572 m4_defun([_LT_PATH_MANIFEST_TOOL],
4573 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4574 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4575 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4576   [lt_cv_path_mainfest_tool=no
4577   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4578   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4579   cat conftest.err >&AS_MESSAGE_LOG_FD
4580   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4581     lt_cv_path_mainfest_tool=yes
4582   fi
4583   rm -f conftest*])
4584 if test "x$lt_cv_path_mainfest_tool" != xyes; then
4585   MANIFEST_TOOL=:
4586 fi
4587 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4588 ])# _LT_PATH_MANIFEST_TOOL
4589
4590
4591 # LT_LIB_M
4592 # --------
4593 # check for math library
4594 AC_DEFUN([LT_LIB_M],
4595 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4596 LIBM=
4597 case $host in
4598 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4599   # These system don't have libm, or don't need it
4600   ;;
4601 *-ncr-sysv4.3*)
4602   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4603   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4604   ;;
4605 *)
4606   AC_CHECK_LIB(m, cos, LIBM="-lm")
4607   ;;
4608 esac
4609 AC_SUBST([LIBM])
4610 ])# LT_LIB_M
4611
4612 # Old name:
4613 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4614 dnl aclocal-1.4 backwards compatibility:
4615 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4616
4617
4618 # _LT_COMPILER_NO_RTTI([TAGNAME])
4619 # -------------------------------
4620 m4_defun([_LT_COMPILER_NO_RTTI],
4621 [m4_require([_LT_TAG_COMPILER])dnl
4622
4623 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4624
4625 if test "$GCC" = yes; then
4626   case $cc_basename in
4627   nvcc*)
4628     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4629   *)
4630     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4631   esac
4632
4633   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4634     lt_cv_prog_compiler_rtti_exceptions,
4635     [-fno-rtti -fno-exceptions], [],
4636     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4637 fi
4638 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4639         [Compiler flag to turn off builtin functions])
4640 ])# _LT_COMPILER_NO_RTTI
4641
4642
4643 # _LT_CMD_GLOBAL_SYMBOLS
4644 # ----------------------
4645 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4646 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4647 AC_REQUIRE([AC_PROG_CC])dnl
4648 AC_REQUIRE([AC_PROG_AWK])dnl
4649 AC_REQUIRE([LT_PATH_NM])dnl
4650 AC_REQUIRE([LT_PATH_LD])dnl
4651 m4_require([_LT_DECL_SED])dnl
4652 m4_require([_LT_DECL_EGREP])dnl
4653 m4_require([_LT_TAG_COMPILER])dnl
4654
4655 # Check for command to grab the raw symbol name followed by C symbol from nm.
4656 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4657 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4658 [
4659 # These are sane defaults that work on at least a few old systems.
4660 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4661
4662 # Character class describing NM global symbol codes.
4663 symcode='[[BCDEGRST]]'
4664
4665 # Regexp to match symbols that can be accessed directly from C.
4666 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4667
4668 # Define system-specific variables.
4669 case $host_os in
4670 aix*)
4671   symcode='[[BCDT]]'
4672   ;;
4673 cygwin* | mingw* | pw32* | cegcc*)
4674   symcode='[[ABCDGISTW]]'
4675   ;;
4676 hpux*)
4677   if test "$host_cpu" = ia64; then
4678     symcode='[[ABCDEGRST]]'
4679   fi
4680   ;;
4681 irix* | nonstopux*)
4682   symcode='[[BCDEGRST]]'
4683   ;;
4684 osf*)
4685   symcode='[[BCDEGQRST]]'
4686   ;;
4687 solaris*)
4688   symcode='[[BDRT]]'
4689   ;;
4690 sco3.2v5*)
4691   symcode='[[DT]]'
4692   ;;
4693 sysv4.2uw2*)
4694   symcode='[[DT]]'
4695   ;;
4696 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4697   symcode='[[ABDT]]'
4698   ;;
4699 sysv4)
4700   symcode='[[DFNSTU]]'
4701   ;;
4702 esac
4703
4704 # If we're using GNU nm, then use its standard symbol codes.
4705 case `$NM -V 2>&1` in
4706 *GNU* | *'with BFD'*)
4707   symcode='[[ABCDGIRSTW]]' ;;
4708 esac
4709
4710 # Transform an extracted symbol line into a proper C declaration.
4711 # Some systems (esp. on ia64) link data and code symbols differently,
4712 # so use this general approach.
4713 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4714
4715 # Transform an extracted symbol line into symbol name and symbol address
4716 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4717 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'"
4718
4719 # Handle CRLF in mingw tool chain
4720 opt_cr=
4721 case $build_os in
4722 mingw*)
4723   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4724   ;;
4725 esac
4726
4727 # Try without a prefix underscore, then with it.
4728 for ac_symprfx in "" "_"; do
4729
4730   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4731   symxfrm="\\1 $ac_symprfx\\2 \\2"
4732
4733   # Write the raw and C identifiers.
4734   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4735     # Fake it for dumpbin and say T for any non-static function
4736     # and D for any global variable.
4737     # Also find C++ and __fastcall symbols from MSVC++,
4738     # which start with @ or ?.
4739     lt_cv_sys_global_symbol_pipe="$AWK ['"\
4740 "     {last_section=section; section=\$ 3};"\
4741 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4742 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4743 "     \$ 0!~/External *\|/{next};"\
4744 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4745 "     {if(hide[section]) next};"\
4746 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4747 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4748 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4749 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4750 "     ' prfx=^$ac_symprfx]"
4751   else
4752     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4753   fi
4754   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4755
4756   # Check to see that the pipe works correctly.
4757   pipe_works=no
4758
4759   rm -f conftest*
4760   cat > conftest.$ac_ext <<_LT_EOF
4761 #ifdef __cplusplus
4762 extern "C" {
4763 #endif
4764 char nm_test_var;
4765 void nm_test_func(void);
4766 void nm_test_func(void){}
4767 #ifdef __cplusplus
4768 }
4769 #endif
4770 int main(){nm_test_var='a';nm_test_func();return(0);}
4771 _LT_EOF
4772
4773   if AC_TRY_EVAL(ac_compile); then
4774     # Now try to grab the symbols.
4775     nlist=conftest.nm
4776     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4777       # Try sorting and uniquifying the output.
4778       if sort "$nlist" | uniq > "$nlist"T; then
4779         mv -f "$nlist"T "$nlist"
4780       else
4781         rm -f "$nlist"T
4782       fi
4783
4784       # Make sure that we snagged all the symbols we need.
4785       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4786         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4787           cat <<_LT_EOF > conftest.$ac_ext
4788 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4789 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4790 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4791    relocations are performed -- see ld's documentation on pseudo-relocs.  */
4792 # define LT@&t@_DLSYM_CONST
4793 #elif defined(__osf__)
4794 /* This system does not cope well with relocations in const data.  */
4795 # define LT@&t@_DLSYM_CONST
4796 #else
4797 # define LT@&t@_DLSYM_CONST const
4798 #endif
4799
4800 #ifdef __cplusplus
4801 extern "C" {
4802 #endif
4803
4804 _LT_EOF
4805           # Now generate the symbol file.
4806           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4807
4808           cat <<_LT_EOF >> conftest.$ac_ext
4809
4810 /* The mapping between symbol names and symbols.  */
4811 LT@&t@_DLSYM_CONST struct {
4812   const char *name;
4813   void       *address;
4814 }
4815 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4816 {
4817   { "@PROGRAM@", (void *) 0 },
4818 _LT_EOF
4819           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4820           cat <<\_LT_EOF >> conftest.$ac_ext
4821   {0, (void *) 0}
4822 };
4823
4824 /* This works around a problem in FreeBSD linker */
4825 #ifdef FREEBSD_WORKAROUND
4826 static const void *lt_preloaded_setup() {
4827   return lt__PROGRAM__LTX_preloaded_symbols;
4828 }
4829 #endif
4830
4831 #ifdef __cplusplus
4832 }
4833 #endif
4834 _LT_EOF
4835           # Now try linking the two files.
4836           mv conftest.$ac_objext conftstm.$ac_objext
4837           lt_globsym_save_LIBS=$LIBS
4838           lt_globsym_save_CFLAGS=$CFLAGS
4839           LIBS="conftstm.$ac_objext"
4840           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4841           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4842             pipe_works=yes
4843           fi
4844           LIBS=$lt_globsym_save_LIBS
4845           CFLAGS=$lt_globsym_save_CFLAGS
4846         else
4847           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4848         fi
4849       else
4850         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4851       fi
4852     else
4853       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4854     fi
4855   else
4856     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4857     cat conftest.$ac_ext >&5
4858   fi
4859   rm -rf conftest* conftst*
4860
4861   # Do not use the global_symbol_pipe unless it works.
4862   if test "$pipe_works" = yes; then
4863     break
4864   else
4865     lt_cv_sys_global_symbol_pipe=
4866   fi
4867 done
4868 ])
4869 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4870   lt_cv_sys_global_symbol_to_cdecl=
4871 fi
4872 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4873   AC_MSG_RESULT(failed)
4874 else
4875   AC_MSG_RESULT(ok)
4876 fi
4877
4878 # Response file support.
4879 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4880   nm_file_list_spec='@'
4881 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4882   nm_file_list_spec='@'
4883 fi
4884
4885 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4886     [Take the output of nm and produce a listing of raw symbols and C names])
4887 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4888     [Transform the output of nm in a proper C declaration])
4889 _LT_DECL([global_symbol_to_c_name_address],
4890     [lt_cv_sys_global_symbol_to_c_name_address], [1],
4891     [Transform the output of nm in a C name address pair])
4892 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4893     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4894     [Transform the output of nm in a C name address pair when lib prefix is needed])
4895 _LT_DECL([], [nm_file_list_spec], [1],
4896     [Specify filename containing input files for $NM])
4897 ]) # _LT_CMD_GLOBAL_SYMBOLS
4898
4899
4900 # _LT_COMPILER_PIC([TAGNAME])
4901 # ---------------------------
4902 m4_defun([_LT_COMPILER_PIC],
4903 [m4_require([_LT_TAG_COMPILER])dnl
4904 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4905 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4906 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4907
4908 m4_if([$1], [CXX], [
4909   # C++ specific cases for pic, static, wl, etc.
4910   if test "$GXX" = yes; then
4911     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4912     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4913
4914     case $host_os in
4915     aix*)
4916       # All AIX code is PIC.
4917       if test "$host_cpu" = ia64; then
4918         # AIX 5 now supports IA64 processor
4919         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4920       fi
4921       ;;
4922
4923     amigaos*)
4924       case $host_cpu in
4925       powerpc)
4926             # see comment about AmigaOS4 .so support
4927             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4928         ;;
4929       m68k)
4930             # FIXME: we need at least 68020 code to build shared libraries, but
4931             # adding the `-m68020' flag to GCC prevents building anything better,
4932             # like `-m68040'.
4933             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4934         ;;
4935       esac
4936       ;;
4937
4938     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4939       # PIC is the default for these OSes.
4940       ;;
4941     mingw* | cygwin* | os2* | pw32* | cegcc*)
4942       # This hack is so that the source file can tell whether it is being
4943       # built for inclusion in a dll (and should export symbols for example).
4944       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4945       # (--disable-auto-import) libraries
4946       m4_if([$1], [GCJ], [],
4947         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4948       ;;
4949     darwin* | rhapsody*)
4950       # PIC is the default on this platform
4951       # Common symbols not allowed in MH_DYLIB files
4952       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4953       ;;
4954     *djgpp*)
4955       # DJGPP does not support shared libraries at all
4956       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4957       ;;
4958     haiku*)
4959       # PIC is the default for Haiku.
4960       # The "-static" flag exists, but is broken.
4961       _LT_TAGVAR(lt_prog_compiler_static, $1)=
4962       ;;
4963     interix[[3-9]]*)
4964       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4965       # Instead, we relocate shared libraries at runtime.
4966       ;;
4967     sysv4*MP*)
4968       if test -d /usr/nec; then
4969         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4970       fi
4971       ;;
4972     hpux*)
4973       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4974       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4975       # sets the default TLS model and affects inlining.
4976       case $host_cpu in
4977       hppa*64*)
4978         ;;
4979       *)
4980         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4981         ;;
4982       esac
4983       ;;
4984     *qnx* | *nto*)
4985       # QNX uses GNU C++, but need to define -shared option too, otherwise
4986       # it will coredump.
4987       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4988       ;;
4989     *)
4990       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4991       ;;
4992     esac
4993   else
4994     case $host_os in
4995       aix[[4-9]]*)
4996         # All AIX code is PIC.
4997         if test "$host_cpu" = ia64; then
4998           # AIX 5 now supports IA64 processor
4999           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5000         else
5001           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5002         fi
5003         ;;
5004       chorus*)
5005         case $cc_basename in
5006         cxch68*)
5007           # Green Hills C++ Compiler
5008           # _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"
5009           ;;
5010         esac
5011         ;;
5012       mingw* | cygwin* | os2* | pw32* | cegcc*)
5013         # This hack is so that the source file can tell whether it is being
5014         # built for inclusion in a dll (and should export symbols for example).
5015         m4_if([$1], [GCJ], [],
5016           [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5017         ;;
5018       dgux*)
5019         case $cc_basename in
5020           ec++*)
5021             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5022             ;;
5023           ghcx*)
5024             # Green Hills C++ Compiler
5025             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5026             ;;
5027           *)
5028             ;;
5029         esac
5030         ;;
5031       freebsd* | dragonfly*)
5032         # FreeBSD uses GNU C++
5033         ;;
5034       hpux9* | hpux10* | hpux11*)
5035         case $cc_basename in
5036           CC*)
5037             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5038             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5039             if test "$host_cpu" != ia64; then
5040               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5041             fi
5042             ;;
5043           aCC*)
5044             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5045             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5046             case $host_cpu in
5047             hppa*64*|ia64*)
5048               # +Z the default
5049               ;;
5050             *)
5051               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5052               ;;
5053             esac
5054             ;;
5055           *)
5056             ;;
5057         esac
5058         ;;
5059       interix*)
5060         # This is c89, which is MS Visual C++ (no shared libs)
5061         # Anyone wants to do a port?
5062         ;;
5063       irix5* | irix6* | nonstopux*)
5064         case $cc_basename in
5065           CC*)
5066             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5067             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5068             # CC pic flag -KPIC is the default.
5069             ;;
5070           *)
5071             ;;
5072         esac
5073         ;;
5074       linux* | k*bsd*-gnu | kopensolaris*-gnu)
5075         case $cc_basename in
5076           KCC*)
5077             # KAI C++ Compiler
5078             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5079             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5080             ;;
5081           ecpc* )
5082             # old Intel C++ for x86_64 which still supported -KPIC.
5083             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5084             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5085             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5086             ;;
5087           icpc* )
5088             # Intel C++, used to be incompatible with GCC.
5089             # ICC 10 doesn't accept -KPIC any more.
5090             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5091             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5092             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5093             ;;
5094           pgCC* | pgcpp*)
5095             # Portland Group C++ compiler
5096             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5097             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5098             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5099             ;;
5100           cxx*)
5101             # Compaq C++
5102             # Make sure the PIC flag is empty.  It appears that all Alpha
5103             # Linux and Compaq Tru64 Unix objects are PIC.
5104             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5105             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5106             ;;
5107           xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5108             # IBM XL 8.0, 9.0 on PPC and BlueGene
5109             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5110             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5111             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5112             ;;
5113           *)
5114             case `$CC -V 2>&1 | sed 5q` in
5115             *Sun\ C*)
5116               # Sun C++ 5.9
5117               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5118               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5119               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5120               ;;
5121             esac
5122             ;;
5123         esac
5124         ;;
5125       lynxos*)
5126         ;;
5127       m88k*)
5128         ;;
5129       mvs*)
5130         case $cc_basename in
5131           cxx*)
5132             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5133             ;;
5134           *)
5135             ;;
5136         esac
5137         ;;
5138       netbsd* | netbsdelf*-gnu)
5139         ;;
5140       *qnx* | *nto*)
5141         # QNX uses GNU C++, but need to define -shared option too, otherwise
5142         # it will coredump.
5143         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5144         ;;
5145       osf3* | osf4* | osf5*)
5146         case $cc_basename in
5147           KCC*)
5148             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5149             ;;
5150           RCC*)
5151             # Rational C++ 2.4.1
5152             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5153             ;;
5154           cxx*)
5155             # Digital/Compaq C++
5156             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5157             # Make sure the PIC flag is empty.  It appears that all Alpha
5158             # Linux and Compaq Tru64 Unix objects are PIC.
5159             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5160             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5161             ;;
5162           *)
5163             ;;
5164         esac
5165         ;;
5166       psos*)
5167         ;;
5168       solaris*)
5169         case $cc_basename in
5170           CC* | sunCC*)
5171             # Sun C++ 4.2, 5.x and Centerline C++
5172             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5173             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5174             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5175             ;;
5176           gcx*)
5177             # Green Hills C++ Compiler
5178             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5179             ;;
5180           *)
5181             ;;
5182         esac
5183         ;;
5184       sunos4*)
5185         case $cc_basename in
5186           CC*)
5187             # Sun C++ 4.x
5188             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5189             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5190             ;;
5191           lcc*)
5192             # Lucid
5193             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5194             ;;
5195           *)
5196             ;;
5197         esac
5198         ;;
5199       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5200         case $cc_basename in
5201           CC*)
5202             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5203             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5204             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5205             ;;
5206         esac
5207         ;;
5208       tandem*)
5209         case $cc_basename in
5210           NCC*)
5211             # NonStop-UX NCC 3.20
5212             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5213             ;;
5214           *)
5215             ;;
5216         esac
5217         ;;
5218       vxworks*)
5219         ;;
5220       *)
5221         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5222         ;;
5223     esac
5224   fi
5225 ],
5226 [
5227   if test "$GCC" = yes; then
5228     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5229     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5230
5231     case $host_os in
5232       aix*)
5233       # All AIX code is PIC.
5234       if test "$host_cpu" = ia64; then
5235         # AIX 5 now supports IA64 processor
5236         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5237       fi
5238       ;;
5239
5240     amigaos*)
5241       case $host_cpu in
5242       powerpc)
5243             # see comment about AmigaOS4 .so support
5244             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5245         ;;
5246       m68k)
5247             # FIXME: we need at least 68020 code to build shared libraries, but
5248             # adding the `-m68020' flag to GCC prevents building anything better,
5249             # like `-m68040'.
5250             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5251         ;;
5252       esac
5253       ;;
5254
5255     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5256       # PIC is the default for these OSes.
5257       ;;
5258
5259     mingw* | cygwin* | pw32* | os2* | cegcc*)
5260       # This hack is so that the source file can tell whether it is being
5261       # built for inclusion in a dll (and should export symbols for example).
5262       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5263       # (--disable-auto-import) libraries
5264       m4_if([$1], [GCJ], [],
5265         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5266       ;;
5267
5268     darwin* | rhapsody*)
5269       # PIC is the default on this platform
5270       # Common symbols not allowed in MH_DYLIB files
5271       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5272       ;;
5273
5274     haiku*)
5275       # PIC is the default for Haiku.
5276       # The "-static" flag exists, but is broken.
5277       _LT_TAGVAR(lt_prog_compiler_static, $1)=
5278       ;;
5279
5280     hpux*)
5281       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5282       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5283       # sets the default TLS model and affects inlining.
5284       case $host_cpu in
5285       hppa*64*)
5286         # +Z the default
5287         ;;
5288       *)
5289         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5290         ;;
5291       esac
5292       ;;
5293
5294     interix[[3-9]]*)
5295       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5296       # Instead, we relocate shared libraries at runtime.
5297       ;;
5298
5299     msdosdjgpp*)
5300       # Just because we use GCC doesn't mean we suddenly get shared libraries
5301       # on systems that don't support them.
5302       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5303       enable_shared=no
5304       ;;
5305
5306     *nto* | *qnx*)
5307       # QNX uses GNU C++, but need to define -shared option too, otherwise
5308       # it will coredump.
5309       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5310       ;;
5311
5312     sysv4*MP*)
5313       if test -d /usr/nec; then
5314         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5315       fi
5316       ;;
5317
5318     *)
5319       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5320       ;;
5321     esac
5322
5323     case $cc_basename in
5324     nvcc*) # Cuda Compiler Driver 2.2
5325       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5326       if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5327         _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5328       fi
5329       ;;
5330     esac
5331   else
5332     # PORTME Check for flag to pass linker flags through the system compiler.
5333     case $host_os in
5334     aix*)
5335       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5336       if test "$host_cpu" = ia64; then
5337         # AIX 5 now supports IA64 processor
5338         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5339       else
5340         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5341       fi
5342       ;;
5343
5344     mingw* | cygwin* | pw32* | os2* | cegcc*)
5345       # This hack is so that the source file can tell whether it is being
5346       # built for inclusion in a dll (and should export symbols for example).
5347       m4_if([$1], [GCJ], [],
5348         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5349       ;;
5350
5351     hpux9* | hpux10* | hpux11*)
5352       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5353       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5354       # not for PA HP-UX.
5355       case $host_cpu in
5356       hppa*64*|ia64*)
5357         # +Z the default
5358         ;;
5359       *)
5360         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5361         ;;
5362       esac
5363       # Is there a better lt_prog_compiler_static that works with the bundled CC?
5364       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5365       ;;
5366
5367     irix5* | irix6* | nonstopux*)
5368       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5369       # PIC (with -KPIC) is the default.
5370       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5371       ;;
5372
5373     linux* | k*bsd*-gnu | kopensolaris*-gnu)
5374       case $cc_basename in
5375       # old Intel for x86_64 which still supported -KPIC.
5376       ecc*)
5377         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5378         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5379         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5380         ;;
5381       # icc used to be incompatible with GCC.
5382       # ICC 10 doesn't accept -KPIC any more.
5383       icc* | ifort*)
5384         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5385         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5386         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5387         ;;
5388       # Lahey Fortran 8.1.
5389       lf95*)
5390         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5391         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5392         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5393         ;;
5394       nagfor*)
5395         # NAG Fortran compiler
5396         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5397         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5398         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5399         ;;
5400       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5401         # Portland Group compilers (*not* the Pentium gcc compiler,
5402         # which looks to be a dead project)
5403         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5404         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5405         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5406         ;;
5407       ccc*)
5408         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5409         # All Alpha code is PIC.
5410         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5411         ;;
5412       xl* | bgxl* | bgf* | mpixl*)
5413         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5414         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5415         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5416         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5417         ;;
5418       *)
5419         case `$CC -V 2>&1 | sed 5q` in
5420         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5421           # Sun Fortran 8.3 passes all unrecognized flags to the linker
5422           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5423           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5424           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5425           ;;
5426         *Sun\ F* | *Sun*Fortran*)
5427           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5428           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5429           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5430           ;;
5431         *Sun\ C*)
5432           # Sun C 5.9
5433           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5434           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5435           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5436           ;;
5437         *Intel*\ [[CF]]*Compiler*)
5438           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5439           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5440           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5441           ;;
5442         *Portland\ Group*)
5443           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5444           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5445           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5446           ;;
5447         esac
5448         ;;
5449       esac
5450       ;;
5451
5452     newsos6)
5453       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5454       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5455       ;;
5456
5457     *nto* | *qnx*)
5458       # QNX uses GNU C++, but need to define -shared option too, otherwise
5459       # it will coredump.
5460       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5461       ;;
5462
5463     osf3* | osf4* | osf5*)
5464       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5465       # All OSF/1 code is PIC.
5466       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5467       ;;
5468
5469     rdos*)
5470       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5471       ;;
5472
5473     solaris*)
5474       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5475       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5476       case $cc_basename in
5477       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5478         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5479       *)
5480         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5481       esac
5482       ;;
5483
5484     sunos4*)
5485       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5486       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5487       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5488       ;;
5489
5490     sysv4 | sysv4.2uw2* | sysv4.3*)
5491       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5492       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5493       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5494       ;;
5495
5496     sysv4*MP*)
5497       if test -d /usr/nec ;then
5498         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5499         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5500       fi
5501       ;;
5502
5503     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5504       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5505       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5506       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5507       ;;
5508
5509     unicos*)
5510       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5511       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5512       ;;
5513
5514     uts4*)
5515       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5516       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5517       ;;
5518
5519     *)
5520       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5521       ;;
5522     esac
5523   fi
5524 ])
5525 case $host_os in
5526   # For platforms which do not support PIC, -DPIC is meaningless:
5527   *djgpp*)
5528     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5529     ;;
5530   *)
5531     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5532     ;;
5533 esac
5534
5535 AC_CACHE_CHECK([for $compiler option to produce PIC],
5536   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5537   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5538 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5539
5540 #
5541 # Check to make sure the PIC flag actually works.
5542 #
5543 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5544   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5545     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5546     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5547     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5548      "" | " "*) ;;
5549      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5550      esac],
5551     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5552      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5553 fi
5554 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5555         [Additional compiler flags for building library objects])
5556
5557 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5558         [How to pass a linker flag through the compiler])
5559 #
5560 # Check to make sure the static flag actually works.
5561 #
5562 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5563 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5564   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5565   $lt_tmp_static_flag,
5566   [],
5567   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5568 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5569         [Compiler flag to prevent dynamic linking])
5570 ])# _LT_COMPILER_PIC
5571
5572
5573 # _LT_LINKER_SHLIBS([TAGNAME])
5574 # ----------------------------
5575 # See if the linker supports building shared libraries.
5576 m4_defun([_LT_LINKER_SHLIBS],
5577 [AC_REQUIRE([LT_PATH_LD])dnl
5578 AC_REQUIRE([LT_PATH_NM])dnl
5579 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5580 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5581 m4_require([_LT_DECL_EGREP])dnl
5582 m4_require([_LT_DECL_SED])dnl
5583 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5584 m4_require([_LT_TAG_COMPILER])dnl
5585 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5586 m4_if([$1], [CXX], [
5587   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5588   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5589   case $host_os in
5590   aix[[4-9]]*)
5591     # If we're using GNU nm, then we don't want the "-C" option.
5592     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5593     # Also, AIX nm treats weak defined symbols like other global defined
5594     # symbols, whereas GNU nm marks them as "W".
5595     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5596       _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'
5597     else
5598       _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'
5599     fi
5600     ;;
5601   pw32*)
5602     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5603     ;;
5604   cygwin* | mingw* | cegcc*)
5605     case $cc_basename in
5606     cl*)
5607       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5608       ;;
5609     *)
5610       _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'
5611       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5612       ;;
5613     esac
5614     ;;
5615   linux* | k*bsd*-gnu | gnu*)
5616     _LT_TAGVAR(link_all_deplibs, $1)=no
5617     ;;
5618   *)
5619     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5620     ;;
5621   esac
5622 ], [
5623   runpath_var=
5624   _LT_TAGVAR(allow_undefined_flag, $1)=
5625   _LT_TAGVAR(always_export_symbols, $1)=no
5626   _LT_TAGVAR(archive_cmds, $1)=
5627   _LT_TAGVAR(archive_expsym_cmds, $1)=
5628   _LT_TAGVAR(compiler_needs_object, $1)=no
5629   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5630   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5631   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5632   _LT_TAGVAR(hardcode_automatic, $1)=no
5633   _LT_TAGVAR(hardcode_direct, $1)=no
5634   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5635   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5636   _LT_TAGVAR(hardcode_libdir_separator, $1)=
5637   _LT_TAGVAR(hardcode_minus_L, $1)=no
5638   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5639   _LT_TAGVAR(inherit_rpath, $1)=no
5640   _LT_TAGVAR(link_all_deplibs, $1)=unknown
5641   _LT_TAGVAR(module_cmds, $1)=
5642   _LT_TAGVAR(module_expsym_cmds, $1)=
5643   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5644   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5645   _LT_TAGVAR(thread_safe_flag_spec, $1)=
5646   _LT_TAGVAR(whole_archive_flag_spec, $1)=
5647   # include_expsyms should be a list of space-separated symbols to be *always*
5648   # included in the symbol list
5649   _LT_TAGVAR(include_expsyms, $1)=
5650   # exclude_expsyms can be an extended regexp of symbols to exclude
5651   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5652   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5653   # as well as any symbol that contains `d'.
5654   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5655   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5656   # platforms (ab)use it in PIC code, but their linkers get confused if
5657   # the symbol is explicitly referenced.  Since portable code cannot
5658   # rely on this symbol name, it's probably fine to never include it in
5659   # preloaded symbol tables.
5660   # Exclude shared library initialization/finalization symbols.
5661 dnl Note also adjust exclude_expsyms for C++ above.
5662   extract_expsyms_cmds=
5663
5664   case $host_os in
5665   cygwin* | mingw* | pw32* | cegcc*)
5666     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5667     # When not using gcc, we currently assume that we are using
5668     # Microsoft Visual C++.
5669     if test "$GCC" != yes; then
5670       with_gnu_ld=no
5671     fi
5672     ;;
5673   interix*)
5674     # we just hope/assume this is gcc and not c89 (= MSVC++)
5675     with_gnu_ld=yes
5676     ;;
5677   openbsd*)
5678     with_gnu_ld=no
5679     ;;
5680   linux* | k*bsd*-gnu | gnu*)
5681     _LT_TAGVAR(link_all_deplibs, $1)=no
5682     ;;
5683   esac
5684
5685   _LT_TAGVAR(ld_shlibs, $1)=yes
5686
5687   # On some targets, GNU ld is compatible enough with the native linker
5688   # that we're better off using the native interface for both.
5689   lt_use_gnu_ld_interface=no
5690   if test "$with_gnu_ld" = yes; then
5691     case $host_os in
5692       aix*)
5693         # The AIX port of GNU ld has always aspired to compatibility
5694         # with the native linker.  However, as the warning in the GNU ld
5695         # block says, versions before 2.19.5* couldn't really create working
5696         # shared libraries, regardless of the interface used.
5697         case `$LD -v 2>&1` in
5698           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5699           *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5700           *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5701           *)
5702             lt_use_gnu_ld_interface=yes
5703             ;;
5704         esac
5705         ;;
5706       *)
5707         lt_use_gnu_ld_interface=yes
5708         ;;
5709     esac
5710   fi
5711
5712   if test "$lt_use_gnu_ld_interface" = yes; then
5713     # If archive_cmds runs LD, not CC, wlarc should be empty
5714     wlarc='${wl}'
5715
5716     # Set some defaults for GNU ld with shared library support. These
5717     # are reset later if shared libraries are not supported. Putting them
5718     # here allows them to be overridden if necessary.
5719     runpath_var=LD_RUN_PATH
5720     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5721     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5722     # ancient GNU ld didn't support --whole-archive et. al.
5723     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5724       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5725     else
5726       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5727     fi
5728     supports_anon_versioning=no
5729     case `$LD -v 2>&1` in
5730       *GNU\ gold*) supports_anon_versioning=yes ;;
5731       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5732       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5733       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5734       *\ 2.11.*) ;; # other 2.11 versions
5735       *) supports_anon_versioning=yes ;;
5736     esac
5737
5738     # See if GNU ld supports shared libraries.
5739     case $host_os in
5740     aix[[3-9]]*)
5741       # On AIX/PPC, the GNU linker is very broken
5742       if test "$host_cpu" != ia64; then
5743         _LT_TAGVAR(ld_shlibs, $1)=no
5744         cat <<_LT_EOF 1>&2
5745
5746 *** Warning: the GNU linker, at least up to release 2.19, is reported
5747 *** to be unable to reliably create shared libraries on AIX.
5748 *** Therefore, libtool is disabling shared libraries support.  If you
5749 *** really care for shared libraries, you may want to install binutils
5750 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5751 *** You will then need to restart the configuration process.
5752
5753 _LT_EOF
5754       fi
5755       ;;
5756
5757     amigaos*)
5758       case $host_cpu in
5759       powerpc)
5760             # see comment about AmigaOS4 .so support
5761             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5762             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5763         ;;
5764       m68k)
5765             _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)'
5766             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5767             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5768         ;;
5769       esac
5770       ;;
5771
5772     beos*)
5773       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5774         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5775         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5776         # support --undefined.  This deserves some investigation.  FIXME
5777         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5778       else
5779         _LT_TAGVAR(ld_shlibs, $1)=no
5780       fi
5781       ;;
5782
5783     cygwin* | mingw* | pw32* | cegcc*)
5784       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5785       # as there is no search path for DLLs.
5786       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5787       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5788       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5789       _LT_TAGVAR(always_export_symbols, $1)=no
5790       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5791       _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'
5792       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5793
5794       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5795         _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'
5796         # If the export-symbols file already is a .def file (1st line
5797         # is EXPORTS), use it as is; otherwise, prepend...
5798         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5799           cp $export_symbols $output_objdir/$soname.def;
5800         else
5801           echo EXPORTS > $output_objdir/$soname.def;
5802           cat $export_symbols >> $output_objdir/$soname.def;
5803         fi~
5804         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5805       else
5806         _LT_TAGVAR(ld_shlibs, $1)=no
5807       fi
5808       ;;
5809
5810     haiku*)
5811       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5812       _LT_TAGVAR(link_all_deplibs, $1)=yes
5813       ;;
5814
5815     interix[[3-9]]*)
5816       _LT_TAGVAR(hardcode_direct, $1)=no
5817       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5818       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5819       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5820       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5821       # Instead, shared libraries are loaded at an image base (0x10000000 by
5822       # default) and relocated if they conflict, which is a slow very memory
5823       # consuming and fragmenting process.  To avoid this, we pick a random,
5824       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5825       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5826       _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'
5827       _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'
5828       ;;
5829
5830     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5831       tmp_diet=no
5832       if test "$host_os" = linux-dietlibc; then
5833         case $cc_basename in
5834           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
5835         esac
5836       fi
5837       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5838          && test "$tmp_diet" = no
5839       then
5840         tmp_addflag=' $pic_flag'
5841         tmp_sharedflag='-shared'
5842         case $cc_basename,$host_cpu in
5843         pgcc*)                          # Portland Group C compiler
5844           _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'
5845           tmp_addflag=' $pic_flag'
5846           ;;
5847         pgf77* | pgf90* | pgf95* | pgfortran*)
5848                                         # Portland Group f77 and f90 compilers
5849           _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'
5850           tmp_addflag=' $pic_flag -Mnomain' ;;
5851         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
5852           tmp_addflag=' -i_dynamic' ;;
5853         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
5854           tmp_addflag=' -i_dynamic -nofor_main' ;;
5855         ifc* | ifort*)                  # Intel Fortran compiler
5856           tmp_addflag=' -nofor_main' ;;
5857         lf95*)                          # Lahey Fortran 8.1
5858           _LT_TAGVAR(whole_archive_flag_spec, $1)=
5859           tmp_sharedflag='--shared' ;;
5860         xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5861           tmp_sharedflag='-qmkshrobj'
5862           tmp_addflag= ;;
5863         nvcc*)  # Cuda Compiler Driver 2.2
5864           _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'
5865           _LT_TAGVAR(compiler_needs_object, $1)=yes
5866           ;;
5867         esac
5868         case `$CC -V 2>&1 | sed 5q` in
5869         *Sun\ C*)                       # Sun C 5.9
5870           _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'
5871           _LT_TAGVAR(compiler_needs_object, $1)=yes
5872           tmp_sharedflag='-G' ;;
5873         *Sun\ F*)                       # Sun Fortran 8.3
5874           tmp_sharedflag='-G' ;;
5875         esac
5876         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5877
5878         if test "x$supports_anon_versioning" = xyes; then
5879           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5880             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5881             echo "local: *; };" >> $output_objdir/$libname.ver~
5882             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5883         fi
5884
5885         case $cc_basename in
5886         xlf* | bgf* | bgxlf* | mpixlf*)
5887           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5888           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5889           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5890           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5891           if test "x$supports_anon_versioning" = xyes; then
5892             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5893               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5894               echo "local: *; };" >> $output_objdir/$libname.ver~
5895               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5896           fi
5897           ;;
5898         esac
5899       else
5900         _LT_TAGVAR(ld_shlibs, $1)=no
5901       fi
5902       ;;
5903
5904     netbsd* | netbsdelf*-gnu)
5905       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5906         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5907         wlarc=
5908       else
5909         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5910         _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'
5911       fi
5912       ;;
5913
5914     solaris*)
5915       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5916         _LT_TAGVAR(ld_shlibs, $1)=no
5917         cat <<_LT_EOF 1>&2
5918
5919 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5920 *** create shared libraries on Solaris systems.  Therefore, libtool
5921 *** is disabling shared libraries support.  We urge you to upgrade GNU
5922 *** binutils to release 2.9.1 or newer.  Another option is to modify
5923 *** your PATH or compiler configuration so that the native linker is
5924 *** used, and then restart.
5925
5926 _LT_EOF
5927       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5928         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5929         _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'
5930       else
5931         _LT_TAGVAR(ld_shlibs, $1)=no
5932       fi
5933       ;;
5934
5935     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5936       case `$LD -v 2>&1` in
5937         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5938         _LT_TAGVAR(ld_shlibs, $1)=no
5939         cat <<_LT_EOF 1>&2
5940
5941 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5942 *** reliably create shared libraries on SCO systems.  Therefore, libtool
5943 *** is disabling shared libraries support.  We urge you to upgrade GNU
5944 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5945 *** your PATH or compiler configuration so that the native linker is
5946 *** used, and then restart.
5947
5948 _LT_EOF
5949         ;;
5950         *)
5951           # For security reasons, it is highly recommended that you always
5952           # use absolute paths for naming shared libraries, and exclude the
5953           # DT_RUNPATH tag from executables and libraries.  But doing so
5954           # requires that you compile everything twice, which is a pain.
5955           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5956             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5957             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5958             _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'
5959           else
5960             _LT_TAGVAR(ld_shlibs, $1)=no
5961           fi
5962         ;;
5963       esac
5964       ;;
5965
5966     sunos4*)
5967       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5968       wlarc=
5969       _LT_TAGVAR(hardcode_direct, $1)=yes
5970       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5971       ;;
5972
5973     *)
5974       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5975         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5976         _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'
5977       else
5978         _LT_TAGVAR(ld_shlibs, $1)=no
5979       fi
5980       ;;
5981     esac
5982
5983     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5984       runpath_var=
5985       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5986       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5987       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5988     fi
5989   else
5990     # PORTME fill in a description of your system's linker (not GNU ld)
5991     case $host_os in
5992     aix3*)
5993       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5994       _LT_TAGVAR(always_export_symbols, $1)=yes
5995       _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'
5996       # Note: this linker hardcodes the directories in LIBPATH if there
5997       # are no directories specified by -L.
5998       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5999       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6000         # Neither direct hardcoding nor static linking is supported with a
6001         # broken collect2.
6002         _LT_TAGVAR(hardcode_direct, $1)=unsupported
6003       fi
6004       ;;
6005
6006     aix[[4-9]]*)
6007       if test "$host_cpu" = ia64; then
6008         # On IA64, the linker does run time linking by default, so we don't
6009         # have to do anything special.
6010         aix_use_runtimelinking=no
6011         exp_sym_flag='-Bexport'
6012         no_entry_flag=""
6013       else
6014         # If we're using GNU nm, then we don't want the "-C" option.
6015         # -C means demangle to AIX nm, but means don't demangle with GNU nm
6016         # Also, AIX nm treats weak defined symbols like other global
6017         # defined symbols, whereas GNU nm marks them as "W".
6018         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6019           _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'
6020         else
6021           _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'
6022         fi
6023         aix_use_runtimelinking=no
6024
6025         # Test if we are trying to use run time linking or normal
6026         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6027         # need to do runtime linking.
6028         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6029           for ld_flag in $LDFLAGS; do
6030           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6031             aix_use_runtimelinking=yes
6032             break
6033           fi
6034           done
6035           ;;
6036         esac
6037
6038         exp_sym_flag='-bexport'
6039         no_entry_flag='-bnoentry'
6040       fi
6041
6042       # When large executables or shared objects are built, AIX ld can
6043       # have problems creating the table of contents.  If linking a library
6044       # or program results in "error TOC overflow" add -mminimal-toc to
6045       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6046       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6047
6048       _LT_TAGVAR(archive_cmds, $1)=''
6049       _LT_TAGVAR(hardcode_direct, $1)=yes
6050       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6051       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6052       _LT_TAGVAR(link_all_deplibs, $1)=yes
6053       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6054
6055       if test "$GCC" = yes; then
6056         case $host_os in aix4.[[012]]|aix4.[[012]].*)
6057         # We only want to do this on AIX 4.2 and lower, the check
6058         # below for broken collect2 doesn't work under 4.3+
6059           collect2name=`${CC} -print-prog-name=collect2`
6060           if test -f "$collect2name" &&
6061            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6062           then
6063           # We have reworked collect2
6064           :
6065           else
6066           # We have old collect2
6067           _LT_TAGVAR(hardcode_direct, $1)=unsupported
6068           # It fails to find uninstalled libraries when the uninstalled
6069           # path is not listed in the libpath.  Setting hardcode_minus_L
6070           # to unsupported forces relinking
6071           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6072           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6073           _LT_TAGVAR(hardcode_libdir_separator, $1)=
6074           fi
6075           ;;
6076         esac
6077         shared_flag='-shared'
6078         if test "$aix_use_runtimelinking" = yes; then
6079           shared_flag="$shared_flag "'${wl}-G'
6080         fi
6081         _LT_TAGVAR(link_all_deplibs, $1)=no
6082       else
6083         # not using gcc
6084         if test "$host_cpu" = ia64; then
6085         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6086         # chokes on -Wl,-G. The following line is correct:
6087           shared_flag='-G'
6088         else
6089           if test "$aix_use_runtimelinking" = yes; then
6090             shared_flag='${wl}-G'
6091           else
6092             shared_flag='${wl}-bM:SRE'
6093           fi
6094         fi
6095       fi
6096
6097       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6098       # It seems that -bexpall does not export symbols beginning with
6099       # underscore (_), so it is better to generate a list of symbols to export.
6100       _LT_TAGVAR(always_export_symbols, $1)=yes
6101       if test "$aix_use_runtimelinking" = yes; then
6102         # Warning - without using the other runtime loading flags (-brtl),
6103         # -berok will link without error, but may produce a broken library.
6104         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6105         # Determine the default libpath from the value encoded in an
6106         # empty executable.
6107         _LT_SYS_MODULE_PATH_AIX([$1])
6108         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6109         _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"
6110       else
6111         if test "$host_cpu" = ia64; then
6112           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6113           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6114           _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"
6115         else
6116          # Determine the default libpath from the value encoded in an
6117          # empty executable.
6118          _LT_SYS_MODULE_PATH_AIX([$1])
6119          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6120           # Warning - without using the other run time loading flags,
6121           # -berok will link without error, but may produce a broken library.
6122           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6123           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6124           if test "$with_gnu_ld" = yes; then
6125             # We only use this code for GNU lds that support --whole-archive.
6126             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6127           else
6128             # Exported symbols can be pulled into shared objects from archives
6129             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6130           fi
6131           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6132           # This is similar to how AIX traditionally builds its shared libraries.
6133           _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'
6134         fi
6135       fi
6136       ;;
6137
6138     amigaos*)
6139       case $host_cpu in
6140       powerpc)
6141             # see comment about AmigaOS4 .so support
6142             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6143             _LT_TAGVAR(archive_expsym_cmds, $1)=''
6144         ;;
6145       m68k)
6146             _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)'
6147             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6148             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6149         ;;
6150       esac
6151       ;;
6152
6153     bsdi[[45]]*)
6154       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6155       ;;
6156
6157     cygwin* | mingw* | pw32* | cegcc*)
6158       # When not using gcc, we currently assume that we are using
6159       # Microsoft Visual C++.
6160       # hardcode_libdir_flag_spec is actually meaningless, as there is
6161       # no search path for DLLs.
6162       case $cc_basename in
6163       cl*)
6164         # Native MSVC
6165         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6166         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6167         _LT_TAGVAR(always_export_symbols, $1)=yes
6168         _LT_TAGVAR(file_list_spec, $1)='@'
6169         # Tell ltmain to make .lib files, not .a files.
6170         libext=lib
6171         # Tell ltmain to make .dll files, not .so files.
6172         shrext_cmds=".dll"
6173         # FIXME: Setting linknames here is a bad hack.
6174         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6175         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6176             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6177           else
6178             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6179           fi~
6180           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6181           linknames='
6182         # The linker will not automatically build a static lib if we build a DLL.
6183         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6184         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6185         _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6186         _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'
6187         # Don't use ranlib
6188         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6189         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6190           lt_tool_outputfile="@TOOL_OUTPUT@"~
6191           case $lt_outputfile in
6192             *.exe|*.EXE) ;;
6193             *)
6194               lt_outputfile="$lt_outputfile.exe"
6195               lt_tool_outputfile="$lt_tool_outputfile.exe"
6196               ;;
6197           esac~
6198           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6199             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6200             $RM "$lt_outputfile.manifest";
6201           fi'
6202         ;;
6203       *)
6204         # Assume MSVC wrapper
6205         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6206         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6207         # Tell ltmain to make .lib files, not .a files.
6208         libext=lib
6209         # Tell ltmain to make .dll files, not .so files.
6210         shrext_cmds=".dll"
6211         # FIXME: Setting linknames here is a bad hack.
6212         _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6213         # The linker will automatically build a .lib file if we build a DLL.
6214         _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6215         # FIXME: Should let the user specify the lib program.
6216         _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6217         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6218         ;;
6219       esac
6220       ;;
6221
6222     darwin* | rhapsody*)
6223       _LT_DARWIN_LINKER_FEATURES($1)
6224       ;;
6225
6226     dgux*)
6227       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6228       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6229       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6230       ;;
6231
6232     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6233     # support.  Future versions do this automatically, but an explicit c++rt0.o
6234     # does not break anything, and helps significantly (at the cost of a little
6235     # extra space).
6236     freebsd2.2*)
6237       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6238       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6239       _LT_TAGVAR(hardcode_direct, $1)=yes
6240       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6241       ;;
6242
6243     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6244     freebsd2.*)
6245       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6246       _LT_TAGVAR(hardcode_direct, $1)=yes
6247       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6248       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6249       ;;
6250
6251     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6252     freebsd* | dragonfly*)
6253       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6254       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6255       _LT_TAGVAR(hardcode_direct, $1)=yes
6256       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6257       ;;
6258
6259     hpux9*)
6260       if test "$GCC" = yes; then
6261         _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'
6262       else
6263         _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'
6264       fi
6265       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6266       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6267       _LT_TAGVAR(hardcode_direct, $1)=yes
6268
6269       # hardcode_minus_L: Not really in the search PATH,
6270       # but as the default location of the library.
6271       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6272       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6273       ;;
6274
6275     hpux10*)
6276       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6277         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6278       else
6279         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6280       fi
6281       if test "$with_gnu_ld" = no; then
6282         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6283         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6284         _LT_TAGVAR(hardcode_direct, $1)=yes
6285         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6286         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6287         # hardcode_minus_L: Not really in the search PATH,
6288         # but as the default location of the library.
6289         _LT_TAGVAR(hardcode_minus_L, $1)=yes
6290       fi
6291       ;;
6292
6293     hpux11*)
6294       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6295         case $host_cpu in
6296         hppa*64*)
6297           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6298           ;;
6299         ia64*)
6300           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6301           ;;
6302         *)
6303           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6304           ;;
6305         esac
6306       else
6307         case $host_cpu in
6308         hppa*64*)
6309           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6310           ;;
6311         ia64*)
6312           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6313           ;;
6314         *)
6315         m4_if($1, [], [
6316           # Older versions of the 11.00 compiler do not understand -b yet
6317           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6318           _LT_LINKER_OPTION([if $CC understands -b],
6319             _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6320             [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6321             [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6322           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6323           ;;
6324         esac
6325       fi
6326       if test "$with_gnu_ld" = no; then
6327         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6328         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6329
6330         case $host_cpu in
6331         hppa*64*|ia64*)
6332           _LT_TAGVAR(hardcode_direct, $1)=no
6333           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6334           ;;
6335         *)
6336           _LT_TAGVAR(hardcode_direct, $1)=yes
6337           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6338           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6339
6340           # hardcode_minus_L: Not really in the search PATH,
6341           # but as the default location of the library.
6342           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6343           ;;
6344         esac
6345       fi
6346       ;;
6347
6348     irix5* | irix6* | nonstopux*)
6349       if test "$GCC" = yes; then
6350         _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'
6351         # Try to use the -exported_symbol ld option, if it does not
6352         # work, assume that -exports_file does not work either and
6353         # implicitly export all symbols.
6354         # This should be the same for all languages, so no per-tag cache variable.
6355         AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6356           [lt_cv_irix_exported_symbol],
6357           [save_LDFLAGS="$LDFLAGS"
6358            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6359            AC_LINK_IFELSE(
6360              [AC_LANG_SOURCE(
6361                 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6362                               [C++], [[int foo (void) { return 0; }]],
6363                               [Fortran 77], [[
6364       subroutine foo
6365       end]],
6366                               [Fortran], [[
6367       subroutine foo
6368       end]])])],
6369               [lt_cv_irix_exported_symbol=yes],
6370               [lt_cv_irix_exported_symbol=no])
6371            LDFLAGS="$save_LDFLAGS"])
6372         if test "$lt_cv_irix_exported_symbol" = yes; then
6373           _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'
6374         fi
6375       else
6376         _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'
6377         _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'
6378       fi
6379       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6380       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6381       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6382       _LT_TAGVAR(inherit_rpath, $1)=yes
6383       _LT_TAGVAR(link_all_deplibs, $1)=yes
6384       ;;
6385
6386     netbsd* | netbsdelf*-gnu)
6387       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6388         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6389       else
6390         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6391       fi
6392       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6393       _LT_TAGVAR(hardcode_direct, $1)=yes
6394       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6395       ;;
6396
6397     newsos6)
6398       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6399       _LT_TAGVAR(hardcode_direct, $1)=yes
6400       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6401       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6402       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6403       ;;
6404
6405     *nto* | *qnx*)
6406       ;;
6407
6408     openbsd*)
6409       if test -f /usr/libexec/ld.so; then
6410         _LT_TAGVAR(hardcode_direct, $1)=yes
6411         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6412         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6413         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6414           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6415           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6416           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6417           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6418         else
6419           case $host_os in
6420            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6421              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6422              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6423              ;;
6424            *)
6425              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6426              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6427              ;;
6428           esac
6429         fi
6430       else
6431         _LT_TAGVAR(ld_shlibs, $1)=no
6432       fi
6433       ;;
6434
6435     os2*)
6436       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6437       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6438       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6439       _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'
6440       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6441       ;;
6442
6443     osf3*)
6444       if test "$GCC" = yes; then
6445         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6446         _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'
6447       else
6448         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6449         _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'
6450       fi
6451       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6452       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6453       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6454       ;;
6455
6456     osf4* | osf5*)      # as osf3* with the addition of -msym flag
6457       if test "$GCC" = yes; then
6458         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6459         _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'
6460         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6461       else
6462         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6463         _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'
6464         _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~
6465         $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'
6466
6467         # Both c and cxx compiler support -rpath directly
6468         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6469       fi
6470       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6471       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6472       ;;
6473
6474     solaris*)
6475       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6476       if test "$GCC" = yes; then
6477         wlarc='${wl}'
6478         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6479         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6480           $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'
6481       else
6482         case `$CC -V 2>&1` in
6483         *"Compilers 5.0"*)
6484           wlarc=''
6485           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6486           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6487           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6488           ;;
6489         *)
6490           wlarc='${wl}'
6491           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6492           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6493           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6494           ;;
6495         esac
6496       fi
6497       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6498       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6499       case $host_os in
6500       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6501       *)
6502         # The compiler driver will combine and reorder linker options,
6503         # but understands `-z linker_flag'.  GCC discards it without `$wl',
6504         # but is careful enough not to reorder.
6505         # Supported since Solaris 2.6 (maybe 2.5.1?)
6506         if test "$GCC" = yes; then
6507           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6508         else
6509           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6510         fi
6511         ;;
6512       esac
6513       _LT_TAGVAR(link_all_deplibs, $1)=yes
6514       ;;
6515
6516     sunos4*)
6517       if test "x$host_vendor" = xsequent; then
6518         # Use $CC to link under sequent, because it throws in some extra .o
6519         # files that make .init and .fini sections work.
6520         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6521       else
6522         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6523       fi
6524       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6525       _LT_TAGVAR(hardcode_direct, $1)=yes
6526       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6527       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6528       ;;
6529
6530     sysv4)
6531       case $host_vendor in
6532         sni)
6533           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6534           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6535         ;;
6536         siemens)
6537           ## LD is ld it makes a PLAMLIB
6538           ## CC just makes a GrossModule.
6539           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6540           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6541           _LT_TAGVAR(hardcode_direct, $1)=no
6542         ;;
6543         motorola)
6544           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6545           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6546         ;;
6547       esac
6548       runpath_var='LD_RUN_PATH'
6549       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6550       ;;
6551
6552     sysv4.3*)
6553       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6554       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6555       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6556       ;;
6557
6558     sysv4*MP*)
6559       if test -d /usr/nec; then
6560         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6561         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6562         runpath_var=LD_RUN_PATH
6563         hardcode_runpath_var=yes
6564         _LT_TAGVAR(ld_shlibs, $1)=yes
6565       fi
6566       ;;
6567
6568     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6569       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6570       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6571       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6572       runpath_var='LD_RUN_PATH'
6573
6574       if test "$GCC" = yes; then
6575         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6576         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6577       else
6578         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6579         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6580       fi
6581       ;;
6582
6583     sysv5* | sco3.2v5* | sco5v6*)
6584       # Note: We can NOT use -z defs as we might desire, because we do not
6585       # link with -lc, and that would cause any symbols used from libc to
6586       # always be unresolved, which means just about no library would
6587       # ever link correctly.  If we're not using GNU ld we use -z text
6588       # though, which does catch some bad symbols but isn't as heavy-handed
6589       # as -z defs.
6590       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6591       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6592       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6593       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6594       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6595       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6596       _LT_TAGVAR(link_all_deplibs, $1)=yes
6597       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6598       runpath_var='LD_RUN_PATH'
6599
6600       if test "$GCC" = yes; then
6601         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6602         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6603       else
6604         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6605         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6606       fi
6607       ;;
6608
6609     uts4*)
6610       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6611       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6612       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6613       ;;
6614
6615     *)
6616       _LT_TAGVAR(ld_shlibs, $1)=no
6617       ;;
6618     esac
6619
6620     if test x$host_vendor = xsni; then
6621       case $host in
6622       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6623         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6624         ;;
6625       esac
6626     fi
6627   fi
6628 ])
6629 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6630 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6631
6632 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6633
6634 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6635 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6636 _LT_DECL([], [extract_expsyms_cmds], [2],
6637     [The commands to extract the exported symbol list from a shared archive])
6638
6639 #
6640 # Do we need to explicitly link libc?
6641 #
6642 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6643 x|xyes)
6644   # Assume -lc should be added
6645   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6646
6647   if test "$enable_shared" = yes && test "$GCC" = yes; then
6648     case $_LT_TAGVAR(archive_cmds, $1) in
6649     *'~'*)
6650       # FIXME: we may have to deal with multi-command sequences.
6651       ;;
6652     '$CC '*)
6653       # Test whether the compiler implicitly links with -lc since on some
6654       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6655       # to ld, don't add -lc before -lgcc.
6656       AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6657         [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6658         [$RM conftest*
6659         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6660
6661         if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6662           soname=conftest
6663           lib=conftest
6664           libobjs=conftest.$ac_objext
6665           deplibs=
6666           wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6667           pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6668           compiler_flags=-v
6669           linker_flags=-v
6670           verstring=
6671           output_objdir=.
6672           libname=conftest
6673           lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6674           _LT_TAGVAR(allow_undefined_flag, $1)=
6675           if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6676           then
6677             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6678           else
6679             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6680           fi
6681           _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6682         else
6683           cat conftest.err 1>&5
6684         fi
6685         $RM conftest*
6686         ])
6687       _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6688       ;;
6689     esac
6690   fi
6691   ;;
6692 esac
6693
6694 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6695     [Whether or not to add -lc for building shared libraries])
6696 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6697     [enable_shared_with_static_runtimes], [0],
6698     [Whether or not to disallow shared libs when runtime libs are static])
6699 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6700     [Compiler flag to allow reflexive dlopens])
6701 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6702     [Compiler flag to generate shared objects directly from archives])
6703 _LT_TAGDECL([], [compiler_needs_object], [1],
6704     [Whether the compiler copes with passing no objects directly])
6705 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6706     [Create an old-style archive from a shared archive])
6707 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6708     [Create a temporary old-style archive to link instead of a shared archive])
6709 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6710 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6711 _LT_TAGDECL([], [module_cmds], [2],
6712     [Commands used to build a loadable module if different from building
6713     a shared archive.])
6714 _LT_TAGDECL([], [module_expsym_cmds], [2])
6715 _LT_TAGDECL([], [with_gnu_ld], [1],
6716     [Whether we are building with GNU ld or not])
6717 _LT_TAGDECL([], [allow_undefined_flag], [1],
6718     [Flag that allows shared libraries with undefined symbols to be built])
6719 _LT_TAGDECL([], [no_undefined_flag], [1],
6720     [Flag that enforces no undefined symbols])
6721 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6722     [Flag to hardcode $libdir into a binary during linking.
6723     This must work even if $libdir does not exist])
6724 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6725     [Whether we need a single "-rpath" flag with a separated argument])
6726 _LT_TAGDECL([], [hardcode_direct], [0],
6727     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6728     DIR into the resulting binary])
6729 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6730     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6731     DIR into the resulting binary and the resulting library dependency is
6732     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6733     library is relocated])
6734 _LT_TAGDECL([], [hardcode_minus_L], [0],
6735     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6736     into the resulting binary])
6737 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6738     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6739     into the resulting binary])
6740 _LT_TAGDECL([], [hardcode_automatic], [0],
6741     [Set to "yes" if building a shared library automatically hardcodes DIR
6742     into the library and all subsequent libraries and executables linked
6743     against it])
6744 _LT_TAGDECL([], [inherit_rpath], [0],
6745     [Set to yes if linker adds runtime paths of dependent libraries
6746     to runtime path list])
6747 _LT_TAGDECL([], [link_all_deplibs], [0],
6748     [Whether libtool must link a program against all its dependency libraries])
6749 _LT_TAGDECL([], [always_export_symbols], [0],
6750     [Set to "yes" if exported symbols are required])
6751 _LT_TAGDECL([], [export_symbols_cmds], [2],
6752     [The commands to list exported symbols])
6753 _LT_TAGDECL([], [exclude_expsyms], [1],
6754     [Symbols that should not be listed in the preloaded symbols])
6755 _LT_TAGDECL([], [include_expsyms], [1],
6756     [Symbols that must always be exported])
6757 _LT_TAGDECL([], [prelink_cmds], [2],
6758     [Commands necessary for linking programs (against libraries) with templates])
6759 _LT_TAGDECL([], [postlink_cmds], [2],
6760     [Commands necessary for finishing linking programs])
6761 _LT_TAGDECL([], [file_list_spec], [1],
6762     [Specify filename containing input files])
6763 dnl FIXME: Not yet implemented
6764 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6765 dnl    [Compiler flag to generate thread safe objects])
6766 ])# _LT_LINKER_SHLIBS
6767
6768
6769 # _LT_LANG_C_CONFIG([TAG])
6770 # ------------------------
6771 # Ensure that the configuration variables for a C compiler are suitably
6772 # defined.  These variables are subsequently used by _LT_CONFIG to write
6773 # the compiler configuration to `libtool'.
6774 m4_defun([_LT_LANG_C_CONFIG],
6775 [m4_require([_LT_DECL_EGREP])dnl
6776 lt_save_CC="$CC"
6777 AC_LANG_PUSH(C)
6778
6779 # Source file extension for C test sources.
6780 ac_ext=c
6781
6782 # Object file extension for compiled C test sources.
6783 objext=o
6784 _LT_TAGVAR(objext, $1)=$objext
6785
6786 # Code to be used in simple compile tests
6787 lt_simple_compile_test_code="int some_variable = 0;"
6788
6789 # Code to be used in simple link tests
6790 lt_simple_link_test_code='int main(){return(0);}'
6791
6792 _LT_TAG_COMPILER
6793 # Save the default compiler, since it gets overwritten when the other
6794 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6795 compiler_DEFAULT=$CC
6796
6797 # save warnings/boilerplate of simple test code
6798 _LT_COMPILER_BOILERPLATE
6799 _LT_LINKER_BOILERPLATE
6800
6801 if test -n "$compiler"; then
6802   _LT_COMPILER_NO_RTTI($1)
6803   _LT_COMPILER_PIC($1)
6804   _LT_COMPILER_C_O($1)
6805   _LT_COMPILER_FILE_LOCKS($1)
6806   _LT_LINKER_SHLIBS($1)
6807   _LT_SYS_DYNAMIC_LINKER($1)
6808   _LT_LINKER_HARDCODE_LIBPATH($1)
6809   LT_SYS_DLOPEN_SELF
6810   _LT_CMD_STRIPLIB
6811
6812   # Report which library types will actually be built
6813   AC_MSG_CHECKING([if libtool supports shared libraries])
6814   AC_MSG_RESULT([$can_build_shared])
6815
6816   AC_MSG_CHECKING([whether to build shared libraries])
6817   test "$can_build_shared" = "no" && enable_shared=no
6818
6819   # On AIX, shared libraries and static libraries use the same namespace, and
6820   # are all built from PIC.
6821   case $host_os in
6822   aix3*)
6823     test "$enable_shared" = yes && enable_static=no
6824     if test -n "$RANLIB"; then
6825       archive_cmds="$archive_cmds~\$RANLIB \$lib"
6826       postinstall_cmds='$RANLIB $lib'
6827     fi
6828     ;;
6829
6830   aix[[4-9]]*)
6831     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6832       test "$enable_shared" = yes && enable_static=no
6833     fi
6834     ;;
6835   esac
6836   AC_MSG_RESULT([$enable_shared])
6837
6838   AC_MSG_CHECKING([whether to build static libraries])
6839   # Make sure either enable_shared or enable_static is yes.
6840   test "$enable_shared" = yes || enable_static=yes
6841   AC_MSG_RESULT([$enable_static])
6842
6843   _LT_CONFIG($1)
6844 fi
6845 AC_LANG_POP
6846 CC="$lt_save_CC"
6847 ])# _LT_LANG_C_CONFIG
6848
6849
6850 # _LT_LANG_CXX_CONFIG([TAG])
6851 # --------------------------
6852 # Ensure that the configuration variables for a C++ compiler are suitably
6853 # defined.  These variables are subsequently used by _LT_CONFIG to write
6854 # the compiler configuration to `libtool'.
6855 m4_defun([_LT_LANG_CXX_CONFIG],
6856 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6857 m4_require([_LT_DECL_EGREP])dnl
6858 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6859 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6860     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6861     (test "X$CXX" != "Xg++"))) ; then
6862   AC_PROG_CXXCPP
6863 else
6864   _lt_caught_CXX_error=yes
6865 fi
6866
6867 AC_LANG_PUSH(C++)
6868 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6869 _LT_TAGVAR(allow_undefined_flag, $1)=
6870 _LT_TAGVAR(always_export_symbols, $1)=no
6871 _LT_TAGVAR(archive_expsym_cmds, $1)=
6872 _LT_TAGVAR(compiler_needs_object, $1)=no
6873 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6874 _LT_TAGVAR(hardcode_direct, $1)=no
6875 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6876 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6877 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6878 _LT_TAGVAR(hardcode_minus_L, $1)=no
6879 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6880 _LT_TAGVAR(hardcode_automatic, $1)=no
6881 _LT_TAGVAR(inherit_rpath, $1)=no
6882 _LT_TAGVAR(module_cmds, $1)=
6883 _LT_TAGVAR(module_expsym_cmds, $1)=
6884 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6885 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6886 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6887 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6888 _LT_TAGVAR(no_undefined_flag, $1)=
6889 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6890 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6891
6892 # Source file extension for C++ test sources.
6893 ac_ext=cpp
6894
6895 # Object file extension for compiled C++ test sources.
6896 objext=o
6897 _LT_TAGVAR(objext, $1)=$objext
6898
6899 # No sense in running all these tests if we already determined that
6900 # the CXX compiler isn't working.  Some variables (like enable_shared)
6901 # are currently assumed to apply to all compilers on this platform,
6902 # and will be corrupted by setting them based on a non-working compiler.
6903 if test "$_lt_caught_CXX_error" != yes; then
6904   # Code to be used in simple compile tests
6905   lt_simple_compile_test_code="int some_variable = 0;"
6906
6907   # Code to be used in simple link tests
6908   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6909
6910   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6911   _LT_TAG_COMPILER
6912
6913   # save warnings/boilerplate of simple test code
6914   _LT_COMPILER_BOILERPLATE
6915   _LT_LINKER_BOILERPLATE
6916
6917   # Allow CC to be a program name with arguments.
6918   lt_save_CC=$CC
6919   lt_save_CFLAGS=$CFLAGS
6920   lt_save_LD=$LD
6921   lt_save_GCC=$GCC
6922   GCC=$GXX
6923   lt_save_with_gnu_ld=$with_gnu_ld
6924   lt_save_path_LD=$lt_cv_path_LD
6925   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6926     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6927   else
6928     $as_unset lt_cv_prog_gnu_ld
6929   fi
6930   if test -n "${lt_cv_path_LDCXX+set}"; then
6931     lt_cv_path_LD=$lt_cv_path_LDCXX
6932   else
6933     $as_unset lt_cv_path_LD
6934   fi
6935   test -z "${LDCXX+set}" || LD=$LDCXX
6936   CC=${CXX-"c++"}
6937   CFLAGS=$CXXFLAGS
6938   compiler=$CC
6939   _LT_TAGVAR(compiler, $1)=$CC
6940   _LT_CC_BASENAME([$compiler])
6941
6942   if test -n "$compiler"; then
6943     # We don't want -fno-exception when compiling C++ code, so set the
6944     # no_builtin_flag separately
6945     if test "$GXX" = yes; then
6946       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6947     else
6948       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6949     fi
6950
6951     if test "$GXX" = yes; then
6952       # Set up default GNU C++ configuration
6953
6954       LT_PATH_LD
6955
6956       # Check if GNU C++ uses GNU ld as the underlying linker, since the
6957       # archiving commands below assume that GNU ld is being used.
6958       if test "$with_gnu_ld" = yes; then
6959         _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6960         _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'
6961
6962         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6963         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6964
6965         # If archive_cmds runs LD, not CC, wlarc should be empty
6966         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6967         #     investigate it a little bit more. (MM)
6968         wlarc='${wl}'
6969
6970         # ancient GNU ld didn't support --whole-archive et. al.
6971         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6972           $GREP 'no-whole-archive' > /dev/null; then
6973           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6974         else
6975           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6976         fi
6977       else
6978         with_gnu_ld=no
6979         wlarc=
6980
6981         # A generic and very simple default shared library creation
6982         # command for GNU C++ for the case where it uses the native
6983         # linker, instead of GNU ld.  If possible, this setting should
6984         # overridden to take advantage of the native linker features on
6985         # the platform it is being used on.
6986         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6987       fi
6988
6989       # Commands to make compiler produce verbose output that lists
6990       # what "hidden" libraries, object files and flags are used when
6991       # linking a shared library.
6992       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6993
6994     else
6995       GXX=no
6996       with_gnu_ld=no
6997       wlarc=
6998     fi
6999
7000     # PORTME: fill in a description of your system's C++ link characteristics
7001     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7002     _LT_TAGVAR(ld_shlibs, $1)=yes
7003     case $host_os in
7004       aix3*)
7005         # FIXME: insert proper C++ library support
7006         _LT_TAGVAR(ld_shlibs, $1)=no
7007         ;;
7008       aix[[4-9]]*)
7009         if test "$host_cpu" = ia64; then
7010           # On IA64, the linker does run time linking by default, so we don't
7011           # have to do anything special.
7012           aix_use_runtimelinking=no
7013           exp_sym_flag='-Bexport'
7014           no_entry_flag=""
7015         else
7016           aix_use_runtimelinking=no
7017
7018           # Test if we are trying to use run time linking or normal
7019           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7020           # need to do runtime linking.
7021           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7022             for ld_flag in $LDFLAGS; do
7023               case $ld_flag in
7024               *-brtl*)
7025                 aix_use_runtimelinking=yes
7026                 break
7027                 ;;
7028               esac
7029             done
7030             ;;
7031           esac
7032
7033           exp_sym_flag='-bexport'
7034           no_entry_flag='-bnoentry'
7035         fi
7036
7037         # When large executables or shared objects are built, AIX ld can
7038         # have problems creating the table of contents.  If linking a library
7039         # or program results in "error TOC overflow" add -mminimal-toc to
7040         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7041         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7042
7043         _LT_TAGVAR(archive_cmds, $1)=''
7044         _LT_TAGVAR(hardcode_direct, $1)=yes
7045         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7046         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7047         _LT_TAGVAR(link_all_deplibs, $1)=yes
7048         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7049
7050         if test "$GXX" = yes; then
7051           case $host_os in aix4.[[012]]|aix4.[[012]].*)
7052           # We only want to do this on AIX 4.2 and lower, the check
7053           # below for broken collect2 doesn't work under 4.3+
7054           collect2name=`${CC} -print-prog-name=collect2`
7055           if test -f "$collect2name" &&
7056              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7057           then
7058             # We have reworked collect2
7059             :
7060           else
7061             # We have old collect2
7062             _LT_TAGVAR(hardcode_direct, $1)=unsupported
7063             # It fails to find uninstalled libraries when the uninstalled
7064             # path is not listed in the libpath.  Setting hardcode_minus_L
7065             # to unsupported forces relinking
7066             _LT_TAGVAR(hardcode_minus_L, $1)=yes
7067             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7068             _LT_TAGVAR(hardcode_libdir_separator, $1)=
7069           fi
7070           esac
7071           shared_flag='-shared'
7072           if test "$aix_use_runtimelinking" = yes; then
7073             shared_flag="$shared_flag "'${wl}-G'
7074           fi
7075         else
7076           # not using gcc
7077           if test "$host_cpu" = ia64; then
7078           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7079           # chokes on -Wl,-G. The following line is correct:
7080           shared_flag='-G'
7081           else
7082             if test "$aix_use_runtimelinking" = yes; then
7083               shared_flag='${wl}-G'
7084             else
7085               shared_flag='${wl}-bM:SRE'
7086             fi
7087           fi
7088         fi
7089
7090         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7091         # It seems that -bexpall does not export symbols beginning with
7092         # underscore (_), so it is better to generate a list of symbols to
7093         # export.
7094         _LT_TAGVAR(always_export_symbols, $1)=yes
7095         if test "$aix_use_runtimelinking" = yes; then
7096           # Warning - without using the other runtime loading flags (-brtl),
7097           # -berok will link without error, but may produce a broken library.
7098           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7099           # Determine the default libpath from the value encoded in an empty
7100           # executable.
7101           _LT_SYS_MODULE_PATH_AIX([$1])
7102           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7103
7104           _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"
7105         else
7106           if test "$host_cpu" = ia64; then
7107             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7108             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7109             _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"
7110           else
7111             # Determine the default libpath from the value encoded in an
7112             # empty executable.
7113             _LT_SYS_MODULE_PATH_AIX([$1])
7114             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7115             # Warning - without using the other run time loading flags,
7116             # -berok will link without error, but may produce a broken library.
7117             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7118             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7119             if test "$with_gnu_ld" = yes; then
7120               # We only use this code for GNU lds that support --whole-archive.
7121               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7122             else
7123               # Exported symbols can be pulled into shared objects from archives
7124               _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7125             fi
7126             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7127             # This is similar to how AIX traditionally builds its shared
7128             # libraries.
7129             _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'
7130           fi
7131         fi
7132         ;;
7133
7134       beos*)
7135         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7136           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7137           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7138           # support --undefined.  This deserves some investigation.  FIXME
7139           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7140         else
7141           _LT_TAGVAR(ld_shlibs, $1)=no
7142         fi
7143         ;;
7144
7145       chorus*)
7146         case $cc_basename in
7147           *)
7148           # FIXME: insert proper C++ library support
7149           _LT_TAGVAR(ld_shlibs, $1)=no
7150           ;;
7151         esac
7152         ;;
7153
7154       cygwin* | mingw* | pw32* | cegcc*)
7155         case $GXX,$cc_basename in
7156         ,cl* | no,cl*)
7157           # Native MSVC
7158           # hardcode_libdir_flag_spec is actually meaningless, as there is
7159           # no search path for DLLs.
7160           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7161           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7162           _LT_TAGVAR(always_export_symbols, $1)=yes
7163           _LT_TAGVAR(file_list_spec, $1)='@'
7164           # Tell ltmain to make .lib files, not .a files.
7165           libext=lib
7166           # Tell ltmain to make .dll files, not .so files.
7167           shrext_cmds=".dll"
7168           # FIXME: Setting linknames here is a bad hack.
7169           _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7170           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7171               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7172             else
7173               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7174             fi~
7175             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7176             linknames='
7177           # The linker will not automatically build a static lib if we build a DLL.
7178           # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7179           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7180           # Don't use ranlib
7181           _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7182           _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7183             lt_tool_outputfile="@TOOL_OUTPUT@"~
7184             case $lt_outputfile in
7185               *.exe|*.EXE) ;;
7186               *)
7187                 lt_outputfile="$lt_outputfile.exe"
7188                 lt_tool_outputfile="$lt_tool_outputfile.exe"
7189                 ;;
7190             esac~
7191             func_to_tool_file "$lt_outputfile"~
7192             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7193               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7194               $RM "$lt_outputfile.manifest";
7195             fi'
7196           ;;
7197         *)
7198           # g++
7199           # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7200           # as there is no search path for DLLs.
7201           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7202           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7203           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7204           _LT_TAGVAR(always_export_symbols, $1)=no
7205           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7206
7207           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7208             _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'
7209             # If the export-symbols file already is a .def file (1st line
7210             # is EXPORTS), use it as is; otherwise, prepend...
7211             _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7212               cp $export_symbols $output_objdir/$soname.def;
7213             else
7214               echo EXPORTS > $output_objdir/$soname.def;
7215               cat $export_symbols >> $output_objdir/$soname.def;
7216             fi~
7217             $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'
7218           else
7219             _LT_TAGVAR(ld_shlibs, $1)=no
7220           fi
7221           ;;
7222         esac
7223         ;;
7224       darwin* | rhapsody*)
7225         _LT_DARWIN_LINKER_FEATURES($1)
7226         ;;
7227
7228       dgux*)
7229         case $cc_basename in
7230           ec++*)
7231             # FIXME: insert proper C++ library support
7232             _LT_TAGVAR(ld_shlibs, $1)=no
7233             ;;
7234           ghcx*)
7235             # Green Hills C++ Compiler
7236             # FIXME: insert proper C++ library support
7237             _LT_TAGVAR(ld_shlibs, $1)=no
7238             ;;
7239           *)
7240             # FIXME: insert proper C++ library support
7241             _LT_TAGVAR(ld_shlibs, $1)=no
7242             ;;
7243         esac
7244         ;;
7245
7246       freebsd2.*)
7247         # C++ shared libraries reported to be fairly broken before
7248         # switch to ELF
7249         _LT_TAGVAR(ld_shlibs, $1)=no
7250         ;;
7251
7252       freebsd-elf*)
7253         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7254         ;;
7255
7256       freebsd* | dragonfly*)
7257         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7258         # conventions
7259         _LT_TAGVAR(ld_shlibs, $1)=yes
7260         ;;
7261
7262       gnu*)
7263         ;;
7264
7265       haiku*)
7266         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7267         _LT_TAGVAR(link_all_deplibs, $1)=yes
7268         ;;
7269
7270       hpux9*)
7271         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7272         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7273         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7274         _LT_TAGVAR(hardcode_direct, $1)=yes
7275         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7276                                              # but as the default
7277                                              # location of the library.
7278
7279         case $cc_basename in
7280           CC*)
7281             # FIXME: insert proper C++ library support
7282             _LT_TAGVAR(ld_shlibs, $1)=no
7283             ;;
7284           aCC*)
7285             _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'
7286             # Commands to make compiler produce verbose output that lists
7287             # what "hidden" libraries, object files and flags are used when
7288             # linking a shared library.
7289             #
7290             # There doesn't appear to be a way to prevent this compiler from
7291             # explicitly linking system object files so we need to strip them
7292             # from the output so that they don't get included in the library
7293             # dependencies.
7294             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"'
7295             ;;
7296           *)
7297             if test "$GXX" = yes; then
7298               _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'
7299             else
7300               # FIXME: insert proper C++ library support
7301               _LT_TAGVAR(ld_shlibs, $1)=no
7302             fi
7303             ;;
7304         esac
7305         ;;
7306
7307       hpux10*|hpux11*)
7308         if test $with_gnu_ld = no; then
7309           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7310           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7311
7312           case $host_cpu in
7313             hppa*64*|ia64*)
7314               ;;
7315             *)
7316               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7317               ;;
7318           esac
7319         fi
7320         case $host_cpu in
7321           hppa*64*|ia64*)
7322             _LT_TAGVAR(hardcode_direct, $1)=no
7323             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7324             ;;
7325           *)
7326             _LT_TAGVAR(hardcode_direct, $1)=yes
7327             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7328             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7329                                                  # but as the default
7330                                                  # location of the library.
7331             ;;
7332         esac
7333
7334         case $cc_basename in
7335           CC*)
7336             # FIXME: insert proper C++ library support
7337             _LT_TAGVAR(ld_shlibs, $1)=no
7338             ;;
7339           aCC*)
7340             case $host_cpu in
7341               hppa*64*)
7342                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7343                 ;;
7344               ia64*)
7345                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7346                 ;;
7347               *)
7348                 _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'
7349                 ;;
7350             esac
7351             # Commands to make compiler produce verbose output that lists
7352             # what "hidden" libraries, object files and flags are used when
7353             # linking a shared library.
7354             #
7355             # There doesn't appear to be a way to prevent this compiler from
7356             # explicitly linking system object files so we need to strip them
7357             # from the output so that they don't get included in the library
7358             # dependencies.
7359             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"'
7360             ;;
7361           *)
7362             if test "$GXX" = yes; then
7363               if test $with_gnu_ld = no; then
7364                 case $host_cpu in
7365                   hppa*64*)
7366                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7367                     ;;
7368                   ia64*)
7369                     _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'
7370                     ;;
7371                   *)
7372                     _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'
7373                     ;;
7374                 esac
7375               fi
7376             else
7377               # FIXME: insert proper C++ library support
7378               _LT_TAGVAR(ld_shlibs, $1)=no
7379             fi
7380             ;;
7381         esac
7382         ;;
7383
7384       interix[[3-9]]*)
7385         _LT_TAGVAR(hardcode_direct, $1)=no
7386         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7387         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7388         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7389         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7390         # Instead, shared libraries are loaded at an image base (0x10000000 by
7391         # default) and relocated if they conflict, which is a slow very memory
7392         # consuming and fragmenting process.  To avoid this, we pick a random,
7393         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7394         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7395         _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'
7396         _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'
7397         ;;
7398       irix5* | irix6*)
7399         case $cc_basename in
7400           CC*)
7401             # SGI C++
7402             _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'
7403
7404             # Archives containing C++ object files must be created using
7405             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7406             # necessary to make sure instantiated templates are included
7407             # in the archive.
7408             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7409             ;;
7410           *)
7411             if test "$GXX" = yes; then
7412               if test "$with_gnu_ld" = no; then
7413                 _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'
7414               else
7415                 _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'
7416               fi
7417             fi
7418             _LT_TAGVAR(link_all_deplibs, $1)=yes
7419             ;;
7420         esac
7421         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7422         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7423         _LT_TAGVAR(inherit_rpath, $1)=yes
7424         ;;
7425
7426       linux* | k*bsd*-gnu | kopensolaris*-gnu)
7427         case $cc_basename in
7428           KCC*)
7429             # Kuck and Associates, Inc. (KAI) C++ Compiler
7430
7431             # KCC will only create a shared library if the output file
7432             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7433             # to its proper name (with version) after linking.
7434             _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'
7435             _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'
7436             # Commands to make compiler produce verbose output that lists
7437             # what "hidden" libraries, object files and flags are used when
7438             # linking a shared library.
7439             #
7440             # There doesn't appear to be a way to prevent this compiler from
7441             # explicitly linking system object files so we need to strip them
7442             # from the output so that they don't get included in the library
7443             # dependencies.
7444             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"'
7445
7446             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7447             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7448
7449             # Archives containing C++ object files must be created using
7450             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7451             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7452             ;;
7453           icpc* | ecpc* )
7454             # Intel C++
7455             with_gnu_ld=yes
7456             # version 8.0 and above of icpc choke on multiply defined symbols
7457             # if we add $predep_objects and $postdep_objects, however 7.1 and
7458             # earlier do not add the objects themselves.
7459             case `$CC -V 2>&1` in
7460               *"Version 7."*)
7461                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7462                 _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'
7463                 ;;
7464               *)  # Version 8.0 or newer
7465                 tmp_idyn=
7466                 case $host_cpu in
7467                   ia64*) tmp_idyn=' -i_dynamic';;
7468                 esac
7469                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7470                 _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'
7471                 ;;
7472             esac
7473             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7474             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7475             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7476             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7477             ;;
7478           pgCC* | pgcpp*)
7479             # Portland Group C++ compiler
7480             case `$CC -V` in
7481             *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7482               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7483                 rm -rf $tpldir~
7484                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7485                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7486               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7487                 rm -rf $tpldir~
7488                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7489                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7490                 $RANLIB $oldlib'
7491               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7492                 rm -rf $tpldir~
7493                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7494                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7495               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7496                 rm -rf $tpldir~
7497                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7498                 $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'
7499               ;;
7500             *) # Version 6 and above use weak symbols
7501               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7502               _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'
7503               ;;
7504             esac
7505
7506             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7507             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7508             _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'
7509             ;;
7510           cxx*)
7511             # Compaq C++
7512             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7513             _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'
7514
7515             runpath_var=LD_RUN_PATH
7516             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7517             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7518
7519             # Commands to make compiler produce verbose output that lists
7520             # what "hidden" libraries, object files and flags are used when
7521             # linking a shared library.
7522             #
7523             # There doesn't appear to be a way to prevent this compiler from
7524             # explicitly linking system object files so we need to strip them
7525             # from the output so that they don't get included in the library
7526             # dependencies.
7527             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'
7528             ;;
7529           xl* | mpixl* | bgxl*)
7530             # IBM XL 8.0 on PPC, with GNU ld
7531             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7532             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7533             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7534             if test "x$supports_anon_versioning" = xyes; then
7535               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7536                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7537                 echo "local: *; };" >> $output_objdir/$libname.ver~
7538                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7539             fi
7540             ;;
7541           *)
7542             case `$CC -V 2>&1 | sed 5q` in
7543             *Sun\ C*)
7544               # Sun C++ 5.9
7545               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7546               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7547               _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'
7548               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7549               _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'
7550               _LT_TAGVAR(compiler_needs_object, $1)=yes
7551
7552               # Not sure whether something based on
7553               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7554               # would be better.
7555               output_verbose_link_cmd='func_echo_all'
7556
7557               # Archives containing C++ object files must be created using
7558               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7559               # necessary to make sure instantiated templates are included
7560               # in the archive.
7561               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7562               ;;
7563             esac
7564             ;;
7565         esac
7566         ;;
7567
7568       lynxos*)
7569         # FIXME: insert proper C++ library support
7570         _LT_TAGVAR(ld_shlibs, $1)=no
7571         ;;
7572
7573       m88k*)
7574         # FIXME: insert proper C++ library support
7575         _LT_TAGVAR(ld_shlibs, $1)=no
7576         ;;
7577
7578       mvs*)
7579         case $cc_basename in
7580           cxx*)
7581             # FIXME: insert proper C++ library support
7582             _LT_TAGVAR(ld_shlibs, $1)=no
7583             ;;
7584           *)
7585             # FIXME: insert proper C++ library support
7586             _LT_TAGVAR(ld_shlibs, $1)=no
7587             ;;
7588         esac
7589         ;;
7590
7591       netbsd*)
7592         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7593           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7594           wlarc=
7595           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7596           _LT_TAGVAR(hardcode_direct, $1)=yes
7597           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7598         fi
7599         # Workaround some broken pre-1.5 toolchains
7600         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7601         ;;
7602
7603       *nto* | *qnx*)
7604         _LT_TAGVAR(ld_shlibs, $1)=yes
7605         ;;
7606
7607       openbsd2*)
7608         # C++ shared libraries are fairly broken
7609         _LT_TAGVAR(ld_shlibs, $1)=no
7610         ;;
7611
7612       openbsd*)
7613         if test -f /usr/libexec/ld.so; then
7614           _LT_TAGVAR(hardcode_direct, $1)=yes
7615           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7616           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7617           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7618           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7619           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7620             _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'
7621             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7622             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7623           fi
7624           output_verbose_link_cmd=func_echo_all
7625         else
7626           _LT_TAGVAR(ld_shlibs, $1)=no
7627         fi
7628         ;;
7629
7630       osf3* | osf4* | osf5*)
7631         case $cc_basename in
7632           KCC*)
7633             # Kuck and Associates, Inc. (KAI) C++ Compiler
7634
7635             # KCC will only create a shared library if the output file
7636             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7637             # to its proper name (with version) after linking.
7638             _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'
7639
7640             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7641             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7642
7643             # Archives containing C++ object files must be created using
7644             # the KAI C++ compiler.
7645             case $host in
7646               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7647               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7648             esac
7649             ;;
7650           RCC*)
7651             # Rational C++ 2.4.1
7652             # FIXME: insert proper C++ library support
7653             _LT_TAGVAR(ld_shlibs, $1)=no
7654             ;;
7655           cxx*)
7656             case $host in
7657               osf3*)
7658                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7659                 _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'
7660                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7661                 ;;
7662               *)
7663                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7664                 _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'
7665                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7666                   echo "-hidden">> $lib.exp~
7667                   $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~
7668                   $RM $lib.exp'
7669                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7670                 ;;
7671             esac
7672
7673             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7674
7675             # Commands to make compiler produce verbose output that lists
7676             # what "hidden" libraries, object files and flags are used when
7677             # linking a shared library.
7678             #
7679             # There doesn't appear to be a way to prevent this compiler from
7680             # explicitly linking system object files so we need to strip them
7681             # from the output so that they don't get included in the library
7682             # dependencies.
7683             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"'
7684             ;;
7685           *)
7686             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7687               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7688               case $host in
7689                 osf3*)
7690                   _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'
7691                   ;;
7692                 *)
7693                   _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'
7694                   ;;
7695               esac
7696
7697               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7698               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7699
7700               # Commands to make compiler produce verbose output that lists
7701               # what "hidden" libraries, object files and flags are used when
7702               # linking a shared library.
7703               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7704
7705             else
7706               # FIXME: insert proper C++ library support
7707               _LT_TAGVAR(ld_shlibs, $1)=no
7708             fi
7709             ;;
7710         esac
7711         ;;
7712
7713       psos*)
7714         # FIXME: insert proper C++ library support
7715         _LT_TAGVAR(ld_shlibs, $1)=no
7716         ;;
7717
7718       sunos4*)
7719         case $cc_basename in
7720           CC*)
7721             # Sun C++ 4.x
7722             # FIXME: insert proper C++ library support
7723             _LT_TAGVAR(ld_shlibs, $1)=no
7724             ;;
7725           lcc*)
7726             # Lucid
7727             # FIXME: insert proper C++ library support
7728             _LT_TAGVAR(ld_shlibs, $1)=no
7729             ;;
7730           *)
7731             # FIXME: insert proper C++ library support
7732             _LT_TAGVAR(ld_shlibs, $1)=no
7733             ;;
7734         esac
7735         ;;
7736
7737       solaris*)
7738         case $cc_basename in
7739           CC* | sunCC*)
7740             # Sun C++ 4.2, 5.x and Centerline C++
7741             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7742             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7743             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7744             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7745               $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'
7746
7747             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7748             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7749             case $host_os in
7750               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7751               *)
7752                 # The compiler driver will combine and reorder linker options,
7753                 # but understands `-z linker_flag'.
7754                 # Supported since Solaris 2.6 (maybe 2.5.1?)
7755                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7756                 ;;
7757             esac
7758             _LT_TAGVAR(link_all_deplibs, $1)=yes
7759
7760             output_verbose_link_cmd='func_echo_all'
7761
7762             # Archives containing C++ object files must be created using
7763             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7764             # necessary to make sure instantiated templates are included
7765             # in the archive.
7766             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7767             ;;
7768           gcx*)
7769             # Green Hills C++ Compiler
7770             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7771
7772             # The C++ compiler must be used to create the archive.
7773             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7774             ;;
7775           *)
7776             # GNU C++ compiler with Solaris linker
7777             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7778               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7779               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7780                 _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'
7781                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7782                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7783
7784                 # Commands to make compiler produce verbose output that lists
7785                 # what "hidden" libraries, object files and flags are used when
7786                 # linking a shared library.
7787                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7788               else
7789                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7790                 # platform.
7791                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7792                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7793                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7794
7795                 # Commands to make compiler produce verbose output that lists
7796                 # what "hidden" libraries, object files and flags are used when
7797                 # linking a shared library.
7798                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7799               fi
7800
7801               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7802               case $host_os in
7803                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7804                 *)
7805                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7806                   ;;
7807               esac
7808             fi
7809             ;;
7810         esac
7811         ;;
7812
7813     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7814       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7815       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7816       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7817       runpath_var='LD_RUN_PATH'
7818
7819       case $cc_basename in
7820         CC*)
7821           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7822           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7823           ;;
7824         *)
7825           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7826           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7827           ;;
7828       esac
7829       ;;
7830
7831       sysv5* | sco3.2v5* | sco5v6*)
7832         # Note: We can NOT use -z defs as we might desire, because we do not
7833         # link with -lc, and that would cause any symbols used from libc to
7834         # always be unresolved, which means just about no library would
7835         # ever link correctly.  If we're not using GNU ld we use -z text
7836         # though, which does catch some bad symbols but isn't as heavy-handed
7837         # as -z defs.
7838         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7839         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7840         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7841         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7842         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7843         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7844         _LT_TAGVAR(link_all_deplibs, $1)=yes
7845         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7846         runpath_var='LD_RUN_PATH'
7847
7848         case $cc_basename in
7849           CC*)
7850             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7851             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7852             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7853               '"$_LT_TAGVAR(old_archive_cmds, $1)"
7854             _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7855               '"$_LT_TAGVAR(reload_cmds, $1)"
7856             ;;
7857           *)
7858             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7859             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7860             ;;
7861         esac
7862       ;;
7863
7864       tandem*)
7865         case $cc_basename in
7866           NCC*)
7867             # NonStop-UX NCC 3.20
7868             # FIXME: insert proper C++ library support
7869             _LT_TAGVAR(ld_shlibs, $1)=no
7870             ;;
7871           *)
7872             # FIXME: insert proper C++ library support
7873             _LT_TAGVAR(ld_shlibs, $1)=no
7874             ;;
7875         esac
7876         ;;
7877
7878       vxworks*)
7879         # FIXME: insert proper C++ library support
7880         _LT_TAGVAR(ld_shlibs, $1)=no
7881         ;;
7882
7883       *)
7884         # FIXME: insert proper C++ library support
7885         _LT_TAGVAR(ld_shlibs, $1)=no
7886         ;;
7887     esac
7888
7889     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7890     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7891
7892     _LT_TAGVAR(GCC, $1)="$GXX"
7893     _LT_TAGVAR(LD, $1)="$LD"
7894
7895     ## CAVEAT EMPTOR:
7896     ## There is no encapsulation within the following macros, do not change
7897     ## the running order or otherwise move them around unless you know exactly
7898     ## what you are doing...
7899     _LT_SYS_HIDDEN_LIBDEPS($1)
7900     _LT_COMPILER_PIC($1)
7901     _LT_COMPILER_C_O($1)
7902     _LT_COMPILER_FILE_LOCKS($1)
7903     _LT_LINKER_SHLIBS($1)
7904     _LT_SYS_DYNAMIC_LINKER($1)
7905     _LT_LINKER_HARDCODE_LIBPATH($1)
7906
7907     _LT_CONFIG($1)
7908   fi # test -n "$compiler"
7909
7910   CC=$lt_save_CC
7911   CFLAGS=$lt_save_CFLAGS
7912   LDCXX=$LD
7913   LD=$lt_save_LD
7914   GCC=$lt_save_GCC
7915   with_gnu_ld=$lt_save_with_gnu_ld
7916   lt_cv_path_LDCXX=$lt_cv_path_LD
7917   lt_cv_path_LD=$lt_save_path_LD
7918   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7919   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7920 fi # test "$_lt_caught_CXX_error" != yes
7921
7922 AC_LANG_POP
7923 ])# _LT_LANG_CXX_CONFIG
7924
7925
7926 # _LT_FUNC_STRIPNAME_CNF
7927 # ----------------------
7928 # func_stripname_cnf prefix suffix name
7929 # strip PREFIX and SUFFIX off of NAME.
7930 # PREFIX and SUFFIX must not contain globbing or regex special
7931 # characters, hashes, percent signs, but SUFFIX may contain a leading
7932 # dot (in which case that matches only a dot).
7933 #
7934 # This function is identical to the (non-XSI) version of func_stripname,
7935 # except this one can be used by m4 code that may be executed by configure,
7936 # rather than the libtool script.
7937 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7938 AC_REQUIRE([_LT_DECL_SED])
7939 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7940 func_stripname_cnf ()
7941 {
7942   case ${2} in
7943   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7944   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7945   esac
7946 } # func_stripname_cnf
7947 ])# _LT_FUNC_STRIPNAME_CNF
7948
7949 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7950 # ---------------------------------
7951 # Figure out "hidden" library dependencies from verbose
7952 # compiler output when linking a shared library.
7953 # Parse the compiler output and extract the necessary
7954 # objects, libraries and library flags.
7955 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7956 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7957 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7958 # Dependencies to place before and after the object being linked:
7959 _LT_TAGVAR(predep_objects, $1)=
7960 _LT_TAGVAR(postdep_objects, $1)=
7961 _LT_TAGVAR(predeps, $1)=
7962 _LT_TAGVAR(postdeps, $1)=
7963 _LT_TAGVAR(compiler_lib_search_path, $1)=
7964
7965 dnl we can't use the lt_simple_compile_test_code here,
7966 dnl because it contains code intended for an executable,
7967 dnl not a library.  It's possible we should let each
7968 dnl tag define a new lt_????_link_test_code variable,
7969 dnl but it's only used here...
7970 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7971 int a;
7972 void foo (void) { a = 0; }
7973 _LT_EOF
7974 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7975 class Foo
7976 {
7977 public:
7978   Foo (void) { a = 0; }
7979 private:
7980   int a;
7981 };
7982 _LT_EOF
7983 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7984       subroutine foo
7985       implicit none
7986       integer*4 a
7987       a=0
7988       return
7989       end
7990 _LT_EOF
7991 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7992       subroutine foo
7993       implicit none
7994       integer a
7995       a=0
7996       return
7997       end
7998 _LT_EOF
7999 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8000 public class foo {
8001   private int a;
8002   public void bar (void) {
8003     a = 0;
8004   }
8005 };
8006 _LT_EOF
8007 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
8008 package foo
8009 func foo() {
8010 }
8011 _LT_EOF
8012 ])
8013
8014 _lt_libdeps_save_CFLAGS=$CFLAGS
8015 case "$CC $CFLAGS " in #(
8016 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8017 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8018 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
8019 esac
8020
8021 dnl Parse the compiler output and extract the necessary
8022 dnl objects, libraries and library flags.
8023 if AC_TRY_EVAL(ac_compile); then
8024   # Parse the compiler output and extract the necessary
8025   # objects, libraries and library flags.
8026
8027   # Sentinel used to keep track of whether or not we are before
8028   # the conftest object file.
8029   pre_test_object_deps_done=no
8030
8031   for p in `eval "$output_verbose_link_cmd"`; do
8032     case ${prev}${p} in
8033
8034     -L* | -R* | -l*)
8035        # Some compilers place space between "-{L,R}" and the path.
8036        # Remove the space.
8037        if test $p = "-L" ||
8038           test $p = "-R"; then
8039          prev=$p
8040          continue
8041        fi
8042
8043        # Expand the sysroot to ease extracting the directories later.
8044        if test -z "$prev"; then
8045          case $p in
8046          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8047          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8048          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8049          esac
8050        fi
8051        case $p in
8052        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8053        esac
8054        if test "$pre_test_object_deps_done" = no; then
8055          case ${prev} in
8056          -L | -R)
8057            # Internal compiler library paths should come after those
8058            # provided the user.  The postdeps already come after the
8059            # user supplied libs so there is no need to process them.
8060            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8061              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8062            else
8063              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8064            fi
8065            ;;
8066          # The "-l" case would never come before the object being
8067          # linked, so don't bother handling this case.
8068          esac
8069        else
8070          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8071            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8072          else
8073            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8074          fi
8075        fi
8076        prev=
8077        ;;
8078
8079     *.lto.$objext) ;; # Ignore GCC LTO objects
8080     *.$objext)
8081        # This assumes that the test object file only shows up
8082        # once in the compiler output.
8083        if test "$p" = "conftest.$objext"; then
8084          pre_test_object_deps_done=yes
8085          continue
8086        fi
8087
8088        if test "$pre_test_object_deps_done" = no; then
8089          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8090            _LT_TAGVAR(predep_objects, $1)="$p"
8091          else
8092            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8093          fi
8094        else
8095          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8096            _LT_TAGVAR(postdep_objects, $1)="$p"
8097          else
8098            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8099          fi
8100        fi
8101        ;;
8102
8103     *) ;; # Ignore the rest.
8104
8105     esac
8106   done
8107
8108   # Clean up.
8109   rm -f a.out a.exe
8110 else
8111   echo "libtool.m4: error: problem compiling $1 test program"
8112 fi
8113
8114 $RM -f confest.$objext
8115 CFLAGS=$_lt_libdeps_save_CFLAGS
8116
8117 # PORTME: override above test on systems where it is broken
8118 m4_if([$1], [CXX],
8119 [case $host_os in
8120 interix[[3-9]]*)
8121   # Interix 3.5 installs completely hosed .la files for C++, so rather than
8122   # hack all around it, let's just trust "g++" to DTRT.
8123   _LT_TAGVAR(predep_objects,$1)=
8124   _LT_TAGVAR(postdep_objects,$1)=
8125   _LT_TAGVAR(postdeps,$1)=
8126   ;;
8127
8128 linux*)
8129   case `$CC -V 2>&1 | sed 5q` in
8130   *Sun\ C*)
8131     # Sun C++ 5.9
8132
8133     # The more standards-conforming stlport4 library is
8134     # incompatible with the Cstd library. Avoid specifying
8135     # it if it's in CXXFLAGS. Ignore libCrun as
8136     # -library=stlport4 depends on it.
8137     case " $CXX $CXXFLAGS " in
8138     *" -library=stlport4 "*)
8139       solaris_use_stlport4=yes
8140       ;;
8141     esac
8142
8143     if test "$solaris_use_stlport4" != yes; then
8144       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8145     fi
8146     ;;
8147   esac
8148   ;;
8149
8150 solaris*)
8151   case $cc_basename in
8152   CC* | sunCC*)
8153     # The more standards-conforming stlport4 library is
8154     # incompatible with the Cstd library. Avoid specifying
8155     # it if it's in CXXFLAGS. Ignore libCrun as
8156     # -library=stlport4 depends on it.
8157     case " $CXX $CXXFLAGS " in
8158     *" -library=stlport4 "*)
8159       solaris_use_stlport4=yes
8160       ;;
8161     esac
8162
8163     # Adding this requires a known-good setup of shared libraries for
8164     # Sun compiler versions before 5.6, else PIC objects from an old
8165     # archive will be linked into the output, leading to subtle bugs.
8166     if test "$solaris_use_stlport4" != yes; then
8167       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8168     fi
8169     ;;
8170   esac
8171   ;;
8172 esac
8173 ])
8174
8175 case " $_LT_TAGVAR(postdeps, $1) " in
8176 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8177 esac
8178  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8179 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8180  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8181 fi
8182 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8183     [The directories searched by this compiler when creating a shared library])
8184 _LT_TAGDECL([], [predep_objects], [1],
8185     [Dependencies to place before and after the objects being linked to
8186     create a shared library])
8187 _LT_TAGDECL([], [postdep_objects], [1])
8188 _LT_TAGDECL([], [predeps], [1])
8189 _LT_TAGDECL([], [postdeps], [1])
8190 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8191     [The library search path used internally by the compiler when linking
8192     a shared library])
8193 ])# _LT_SYS_HIDDEN_LIBDEPS
8194
8195
8196 # _LT_LANG_F77_CONFIG([TAG])
8197 # --------------------------
8198 # Ensure that the configuration variables for a Fortran 77 compiler are
8199 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8200 # to write the compiler configuration to `libtool'.
8201 m4_defun([_LT_LANG_F77_CONFIG],
8202 [AC_LANG_PUSH(Fortran 77)
8203 if test -z "$F77" || test "X$F77" = "Xno"; then
8204   _lt_disable_F77=yes
8205 fi
8206
8207 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8208 _LT_TAGVAR(allow_undefined_flag, $1)=
8209 _LT_TAGVAR(always_export_symbols, $1)=no
8210 _LT_TAGVAR(archive_expsym_cmds, $1)=
8211 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8212 _LT_TAGVAR(hardcode_direct, $1)=no
8213 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8214 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8215 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8216 _LT_TAGVAR(hardcode_minus_L, $1)=no
8217 _LT_TAGVAR(hardcode_automatic, $1)=no
8218 _LT_TAGVAR(inherit_rpath, $1)=no
8219 _LT_TAGVAR(module_cmds, $1)=
8220 _LT_TAGVAR(module_expsym_cmds, $1)=
8221 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8222 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8223 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8224 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8225 _LT_TAGVAR(no_undefined_flag, $1)=
8226 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8227 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8228
8229 # Source file extension for f77 test sources.
8230 ac_ext=f
8231
8232 # Object file extension for compiled f77 test sources.
8233 objext=o
8234 _LT_TAGVAR(objext, $1)=$objext
8235
8236 # No sense in running all these tests if we already determined that
8237 # the F77 compiler isn't working.  Some variables (like enable_shared)
8238 # are currently assumed to apply to all compilers on this platform,
8239 # and will be corrupted by setting them based on a non-working compiler.
8240 if test "$_lt_disable_F77" != yes; then
8241   # Code to be used in simple compile tests
8242   lt_simple_compile_test_code="\
8243       subroutine t
8244       return
8245       end
8246 "
8247
8248   # Code to be used in simple link tests
8249   lt_simple_link_test_code="\
8250       program t
8251       end
8252 "
8253
8254   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8255   _LT_TAG_COMPILER
8256
8257   # save warnings/boilerplate of simple test code
8258   _LT_COMPILER_BOILERPLATE
8259   _LT_LINKER_BOILERPLATE
8260
8261   # Allow CC to be a program name with arguments.
8262   lt_save_CC="$CC"
8263   lt_save_GCC=$GCC
8264   lt_save_CFLAGS=$CFLAGS
8265   CC=${F77-"f77"}
8266   CFLAGS=$FFLAGS
8267   compiler=$CC
8268   _LT_TAGVAR(compiler, $1)=$CC
8269   _LT_CC_BASENAME([$compiler])
8270   GCC=$G77
8271   if test -n "$compiler"; then
8272     AC_MSG_CHECKING([if libtool supports shared libraries])
8273     AC_MSG_RESULT([$can_build_shared])
8274
8275     AC_MSG_CHECKING([whether to build shared libraries])
8276     test "$can_build_shared" = "no" && enable_shared=no
8277
8278     # On AIX, shared libraries and static libraries use the same namespace, and
8279     # are all built from PIC.
8280     case $host_os in
8281       aix3*)
8282         test "$enable_shared" = yes && enable_static=no
8283         if test -n "$RANLIB"; then
8284           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8285           postinstall_cmds='$RANLIB $lib'
8286         fi
8287         ;;
8288       aix[[4-9]]*)
8289         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8290           test "$enable_shared" = yes && enable_static=no
8291         fi
8292         ;;
8293     esac
8294     AC_MSG_RESULT([$enable_shared])
8295
8296     AC_MSG_CHECKING([whether to build static libraries])
8297     # Make sure either enable_shared or enable_static is yes.
8298     test "$enable_shared" = yes || enable_static=yes
8299     AC_MSG_RESULT([$enable_static])
8300
8301     _LT_TAGVAR(GCC, $1)="$G77"
8302     _LT_TAGVAR(LD, $1)="$LD"
8303
8304     ## CAVEAT EMPTOR:
8305     ## There is no encapsulation within the following macros, do not change
8306     ## the running order or otherwise move them around unless you know exactly
8307     ## what you are doing...
8308     _LT_COMPILER_PIC($1)
8309     _LT_COMPILER_C_O($1)
8310     _LT_COMPILER_FILE_LOCKS($1)
8311     _LT_LINKER_SHLIBS($1)
8312     _LT_SYS_DYNAMIC_LINKER($1)
8313     _LT_LINKER_HARDCODE_LIBPATH($1)
8314
8315     _LT_CONFIG($1)
8316   fi # test -n "$compiler"
8317
8318   GCC=$lt_save_GCC
8319   CC="$lt_save_CC"
8320   CFLAGS="$lt_save_CFLAGS"
8321 fi # test "$_lt_disable_F77" != yes
8322
8323 AC_LANG_POP
8324 ])# _LT_LANG_F77_CONFIG
8325
8326
8327 # _LT_LANG_FC_CONFIG([TAG])
8328 # -------------------------
8329 # Ensure that the configuration variables for a Fortran compiler are
8330 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8331 # to write the compiler configuration to `libtool'.
8332 m4_defun([_LT_LANG_FC_CONFIG],
8333 [AC_LANG_PUSH(Fortran)
8334
8335 if test -z "$FC" || test "X$FC" = "Xno"; then
8336   _lt_disable_FC=yes
8337 fi
8338
8339 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8340 _LT_TAGVAR(allow_undefined_flag, $1)=
8341 _LT_TAGVAR(always_export_symbols, $1)=no
8342 _LT_TAGVAR(archive_expsym_cmds, $1)=
8343 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8344 _LT_TAGVAR(hardcode_direct, $1)=no
8345 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8346 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8347 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8348 _LT_TAGVAR(hardcode_minus_L, $1)=no
8349 _LT_TAGVAR(hardcode_automatic, $1)=no
8350 _LT_TAGVAR(inherit_rpath, $1)=no
8351 _LT_TAGVAR(module_cmds, $1)=
8352 _LT_TAGVAR(module_expsym_cmds, $1)=
8353 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8354 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8355 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8356 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8357 _LT_TAGVAR(no_undefined_flag, $1)=
8358 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8359 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8360
8361 # Source file extension for fc test sources.
8362 ac_ext=${ac_fc_srcext-f}
8363
8364 # Object file extension for compiled fc test sources.
8365 objext=o
8366 _LT_TAGVAR(objext, $1)=$objext
8367
8368 # No sense in running all these tests if we already determined that
8369 # the FC compiler isn't working.  Some variables (like enable_shared)
8370 # are currently assumed to apply to all compilers on this platform,
8371 # and will be corrupted by setting them based on a non-working compiler.
8372 if test "$_lt_disable_FC" != yes; then
8373   # Code to be used in simple compile tests
8374   lt_simple_compile_test_code="\
8375       subroutine t
8376       return
8377       end
8378 "
8379
8380   # Code to be used in simple link tests
8381   lt_simple_link_test_code="\
8382       program t
8383       end
8384 "
8385
8386   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8387   _LT_TAG_COMPILER
8388
8389   # save warnings/boilerplate of simple test code
8390   _LT_COMPILER_BOILERPLATE
8391   _LT_LINKER_BOILERPLATE
8392
8393   # Allow CC to be a program name with arguments.
8394   lt_save_CC="$CC"
8395   lt_save_GCC=$GCC
8396   lt_save_CFLAGS=$CFLAGS
8397   CC=${FC-"f95"}
8398   CFLAGS=$FCFLAGS
8399   compiler=$CC
8400   GCC=$ac_cv_fc_compiler_gnu
8401
8402   _LT_TAGVAR(compiler, $1)=$CC
8403   _LT_CC_BASENAME([$compiler])
8404
8405   if test -n "$compiler"; then
8406     AC_MSG_CHECKING([if libtool supports shared libraries])
8407     AC_MSG_RESULT([$can_build_shared])
8408
8409     AC_MSG_CHECKING([whether to build shared libraries])
8410     test "$can_build_shared" = "no" && enable_shared=no
8411
8412     # On AIX, shared libraries and static libraries use the same namespace, and
8413     # are all built from PIC.
8414     case $host_os in
8415       aix3*)
8416         test "$enable_shared" = yes && enable_static=no
8417         if test -n "$RANLIB"; then
8418           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8419           postinstall_cmds='$RANLIB $lib'
8420         fi
8421         ;;
8422       aix[[4-9]]*)
8423         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8424           test "$enable_shared" = yes && enable_static=no
8425         fi
8426         ;;
8427     esac
8428     AC_MSG_RESULT([$enable_shared])
8429
8430     AC_MSG_CHECKING([whether to build static libraries])
8431     # Make sure either enable_shared or enable_static is yes.
8432     test "$enable_shared" = yes || enable_static=yes
8433     AC_MSG_RESULT([$enable_static])
8434
8435     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8436     _LT_TAGVAR(LD, $1)="$LD"
8437
8438     ## CAVEAT EMPTOR:
8439     ## There is no encapsulation within the following macros, do not change
8440     ## the running order or otherwise move them around unless you know exactly
8441     ## what you are doing...
8442     _LT_SYS_HIDDEN_LIBDEPS($1)
8443     _LT_COMPILER_PIC($1)
8444     _LT_COMPILER_C_O($1)
8445     _LT_COMPILER_FILE_LOCKS($1)
8446     _LT_LINKER_SHLIBS($1)
8447     _LT_SYS_DYNAMIC_LINKER($1)
8448     _LT_LINKER_HARDCODE_LIBPATH($1)
8449
8450     _LT_CONFIG($1)
8451   fi # test -n "$compiler"
8452
8453   GCC=$lt_save_GCC
8454   CC=$lt_save_CC
8455   CFLAGS=$lt_save_CFLAGS
8456 fi # test "$_lt_disable_FC" != yes
8457
8458 AC_LANG_POP
8459 ])# _LT_LANG_FC_CONFIG
8460
8461
8462 # _LT_LANG_GCJ_CONFIG([TAG])
8463 # --------------------------
8464 # Ensure that the configuration variables for the GNU Java Compiler compiler
8465 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8466 # to write the compiler configuration to `libtool'.
8467 m4_defun([_LT_LANG_GCJ_CONFIG],
8468 [AC_REQUIRE([LT_PROG_GCJ])dnl
8469 AC_LANG_SAVE
8470
8471 # Source file extension for Java test sources.
8472 ac_ext=java
8473
8474 # Object file extension for compiled Java test sources.
8475 objext=o
8476 _LT_TAGVAR(objext, $1)=$objext
8477
8478 # Code to be used in simple compile tests
8479 lt_simple_compile_test_code="class foo {}"
8480
8481 # Code to be used in simple link tests
8482 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8483
8484 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8485 _LT_TAG_COMPILER
8486
8487 # save warnings/boilerplate of simple test code
8488 _LT_COMPILER_BOILERPLATE
8489 _LT_LINKER_BOILERPLATE
8490
8491 # Allow CC to be a program name with arguments.
8492 lt_save_CC=$CC
8493 lt_save_CFLAGS=$CFLAGS
8494 lt_save_GCC=$GCC
8495 GCC=yes
8496 CC=${GCJ-"gcj"}
8497 CFLAGS=$GCJFLAGS
8498 compiler=$CC
8499 _LT_TAGVAR(compiler, $1)=$CC
8500 _LT_TAGVAR(LD, $1)="$LD"
8501 _LT_CC_BASENAME([$compiler])
8502
8503 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8504 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8505
8506 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8507 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8508 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8509
8510 if test -n "$compiler"; then
8511   _LT_COMPILER_NO_RTTI($1)
8512   _LT_COMPILER_PIC($1)
8513   _LT_COMPILER_C_O($1)
8514   _LT_COMPILER_FILE_LOCKS($1)
8515   _LT_LINKER_SHLIBS($1)
8516   _LT_LINKER_HARDCODE_LIBPATH($1)
8517
8518   _LT_CONFIG($1)
8519 fi
8520
8521 AC_LANG_RESTORE
8522
8523 GCC=$lt_save_GCC
8524 CC=$lt_save_CC
8525 CFLAGS=$lt_save_CFLAGS
8526 ])# _LT_LANG_GCJ_CONFIG
8527
8528
8529 # _LT_LANG_GO_CONFIG([TAG])
8530 # --------------------------
8531 # Ensure that the configuration variables for the GNU Go compiler
8532 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8533 # to write the compiler configuration to `libtool'.
8534 m4_defun([_LT_LANG_GO_CONFIG],
8535 [AC_REQUIRE([LT_PROG_GO])dnl
8536 AC_LANG_SAVE
8537
8538 # Source file extension for Go test sources.
8539 ac_ext=go
8540
8541 # Object file extension for compiled Go test sources.
8542 objext=o
8543 _LT_TAGVAR(objext, $1)=$objext
8544
8545 # Code to be used in simple compile tests
8546 lt_simple_compile_test_code="package main; func main() { }"
8547
8548 # Code to be used in simple link tests
8549 lt_simple_link_test_code='package main; func main() { }'
8550
8551 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8552 _LT_TAG_COMPILER
8553
8554 # save warnings/boilerplate of simple test code
8555 _LT_COMPILER_BOILERPLATE
8556 _LT_LINKER_BOILERPLATE
8557
8558 # Allow CC to be a program name with arguments.
8559 lt_save_CC=$CC
8560 lt_save_CFLAGS=$CFLAGS
8561 lt_save_GCC=$GCC
8562 GCC=yes
8563 CC=${GOC-"gccgo"}
8564 CFLAGS=$GOFLAGS
8565 compiler=$CC
8566 _LT_TAGVAR(compiler, $1)=$CC
8567 _LT_TAGVAR(LD, $1)="$LD"
8568 _LT_CC_BASENAME([$compiler])
8569
8570 # Go did not exist at the time GCC didn't implicitly link libc in.
8571 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8572
8573 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8574 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8575 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8576
8577 if test -n "$compiler"; then
8578   _LT_COMPILER_NO_RTTI($1)
8579   _LT_COMPILER_PIC($1)
8580   _LT_COMPILER_C_O($1)
8581   _LT_COMPILER_FILE_LOCKS($1)
8582   _LT_LINKER_SHLIBS($1)
8583   _LT_LINKER_HARDCODE_LIBPATH($1)
8584
8585   _LT_CONFIG($1)
8586 fi
8587
8588 AC_LANG_RESTORE
8589
8590 GCC=$lt_save_GCC
8591 CC=$lt_save_CC
8592 CFLAGS=$lt_save_CFLAGS
8593 ])# _LT_LANG_GO_CONFIG
8594
8595
8596 # _LT_LANG_RC_CONFIG([TAG])
8597 # -------------------------
8598 # Ensure that the configuration variables for the Windows resource compiler
8599 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8600 # to write the compiler configuration to `libtool'.
8601 m4_defun([_LT_LANG_RC_CONFIG],
8602 [AC_REQUIRE([LT_PROG_RC])dnl
8603 AC_LANG_SAVE
8604
8605 # Source file extension for RC test sources.
8606 ac_ext=rc
8607
8608 # Object file extension for compiled RC test sources.
8609 objext=o
8610 _LT_TAGVAR(objext, $1)=$objext
8611
8612 # Code to be used in simple compile tests
8613 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8614
8615 # Code to be used in simple link tests
8616 lt_simple_link_test_code="$lt_simple_compile_test_code"
8617
8618 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8619 _LT_TAG_COMPILER
8620
8621 # save warnings/boilerplate of simple test code
8622 _LT_COMPILER_BOILERPLATE
8623 _LT_LINKER_BOILERPLATE
8624
8625 # Allow CC to be a program name with arguments.
8626 lt_save_CC="$CC"
8627 lt_save_CFLAGS=$CFLAGS
8628 lt_save_GCC=$GCC
8629 GCC=
8630 CC=${RC-"windres"}
8631 CFLAGS=
8632 compiler=$CC
8633 _LT_TAGVAR(compiler, $1)=$CC
8634 _LT_CC_BASENAME([$compiler])
8635 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8636
8637 if test -n "$compiler"; then
8638   :
8639   _LT_CONFIG($1)
8640 fi
8641
8642 GCC=$lt_save_GCC
8643 AC_LANG_RESTORE
8644 CC=$lt_save_CC
8645 CFLAGS=$lt_save_CFLAGS
8646 ])# _LT_LANG_RC_CONFIG
8647
8648
8649 # LT_PROG_GCJ
8650 # -----------
8651 AC_DEFUN([LT_PROG_GCJ],
8652 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8653   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8654     [AC_CHECK_TOOL(GCJ, gcj,)
8655       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8656       AC_SUBST(GCJFLAGS)])])[]dnl
8657 ])
8658
8659 # Old name:
8660 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8661 dnl aclocal-1.4 backwards compatibility:
8662 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8663
8664
8665 # LT_PROG_GO
8666 # ----------
8667 AC_DEFUN([LT_PROG_GO],
8668 [AC_CHECK_TOOL(GOC, gccgo,)
8669 ])
8670
8671
8672 # LT_PROG_RC
8673 # ----------
8674 AC_DEFUN([LT_PROG_RC],
8675 [AC_CHECK_TOOL(RC, windres,)
8676 ])
8677
8678 # Old name:
8679 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8680 dnl aclocal-1.4 backwards compatibility:
8681 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8682
8683
8684 # _LT_DECL_EGREP
8685 # --------------
8686 # If we don't have a new enough Autoconf to choose the best grep
8687 # available, choose the one first in the user's PATH.
8688 m4_defun([_LT_DECL_EGREP],
8689 [AC_REQUIRE([AC_PROG_EGREP])dnl
8690 AC_REQUIRE([AC_PROG_FGREP])dnl
8691 test -z "$GREP" && GREP=grep
8692 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8693 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8694 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8695 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8696 AC_SUBST([GREP])
8697 ])
8698
8699
8700 # _LT_DECL_OBJDUMP
8701 # --------------
8702 # If we don't have a new enough Autoconf to choose the best objdump
8703 # available, choose the one first in the user's PATH.
8704 m4_defun([_LT_DECL_OBJDUMP],
8705 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8706 test -z "$OBJDUMP" && OBJDUMP=objdump
8707 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8708 AC_SUBST([OBJDUMP])
8709 ])
8710
8711 # _LT_DECL_DLLTOOL
8712 # ----------------
8713 # Ensure DLLTOOL variable is set.
8714 m4_defun([_LT_DECL_DLLTOOL],
8715 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8716 test -z "$DLLTOOL" && DLLTOOL=dlltool
8717 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8718 AC_SUBST([DLLTOOL])
8719 ])
8720
8721 # _LT_DECL_SED
8722 # ------------
8723 # Check for a fully-functional sed program, that truncates
8724 # as few characters as possible.  Prefer GNU sed if found.
8725 m4_defun([_LT_DECL_SED],
8726 [AC_PROG_SED
8727 test -z "$SED" && SED=sed
8728 Xsed="$SED -e 1s/^X//"
8729 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8730 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8731     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8732 ])# _LT_DECL_SED
8733
8734 m4_ifndef([AC_PROG_SED], [
8735 # NOTE: This macro has been submitted for inclusion into   #
8736 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8737 #  a released version of Autoconf we should remove this    #
8738 #  macro and use it instead.                               #
8739
8740 m4_defun([AC_PROG_SED],
8741 [AC_MSG_CHECKING([for a sed that does not truncate output])
8742 AC_CACHE_VAL(lt_cv_path_SED,
8743 [# Loop through the user's path and test for sed and gsed.
8744 # Then use that list of sed's as ones to test for truncation.
8745 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8746 for as_dir in $PATH
8747 do
8748   IFS=$as_save_IFS
8749   test -z "$as_dir" && as_dir=.
8750   for lt_ac_prog in sed gsed; do
8751     for ac_exec_ext in '' $ac_executable_extensions; do
8752       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8753         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8754       fi
8755     done
8756   done
8757 done
8758 IFS=$as_save_IFS
8759 lt_ac_max=0
8760 lt_ac_count=0
8761 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8762 # along with /bin/sed that truncates output.
8763 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8764   test ! -f $lt_ac_sed && continue
8765   cat /dev/null > conftest.in
8766   lt_ac_count=0
8767   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8768   # Check for GNU sed and select it if it is found.
8769   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8770     lt_cv_path_SED=$lt_ac_sed
8771     break
8772   fi
8773   while true; do
8774     cat conftest.in conftest.in >conftest.tmp
8775     mv conftest.tmp conftest.in
8776     cp conftest.in conftest.nl
8777     echo >>conftest.nl
8778     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8779     cmp -s conftest.out conftest.nl || break
8780     # 10000 chars as input seems more than enough
8781     test $lt_ac_count -gt 10 && break
8782     lt_ac_count=`expr $lt_ac_count + 1`
8783     if test $lt_ac_count -gt $lt_ac_max; then
8784       lt_ac_max=$lt_ac_count
8785       lt_cv_path_SED=$lt_ac_sed
8786     fi
8787   done
8788 done
8789 ])
8790 SED=$lt_cv_path_SED
8791 AC_SUBST([SED])
8792 AC_MSG_RESULT([$SED])
8793 ])#AC_PROG_SED
8794 ])#m4_ifndef
8795
8796 # Old name:
8797 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8798 dnl aclocal-1.4 backwards compatibility:
8799 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8800
8801
8802 # _LT_CHECK_SHELL_FEATURES
8803 # ------------------------
8804 # Find out whether the shell is Bourne or XSI compatible,
8805 # or has some other useful features.
8806 m4_defun([_LT_CHECK_SHELL_FEATURES],
8807 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8808 # Try some XSI features
8809 xsi_shell=no
8810 ( _lt_dummy="a/b/c"
8811   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8812       = c,a/b,b/c, \
8813     && eval 'test $(( 1 + 1 )) -eq 2 \
8814     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8815   && xsi_shell=yes
8816 AC_MSG_RESULT([$xsi_shell])
8817 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8818
8819 AC_MSG_CHECKING([whether the shell understands "+="])
8820 lt_shell_append=no
8821 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8822     >/dev/null 2>&1 \
8823   && lt_shell_append=yes
8824 AC_MSG_RESULT([$lt_shell_append])
8825 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8826
8827 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8828   lt_unset=unset
8829 else
8830   lt_unset=false
8831 fi
8832 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8833
8834 # test EBCDIC or ASCII
8835 case `echo X|tr X '\101'` in
8836  A) # ASCII based system
8837     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8838   lt_SP2NL='tr \040 \012'
8839   lt_NL2SP='tr \015\012 \040\040'
8840   ;;
8841  *) # EBCDIC based system
8842   lt_SP2NL='tr \100 \n'
8843   lt_NL2SP='tr \r\n \100\100'
8844   ;;
8845 esac
8846 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8847 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8848 ])# _LT_CHECK_SHELL_FEATURES
8849
8850
8851 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8852 # ------------------------------------------------------
8853 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8854 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8855 m4_defun([_LT_PROG_FUNCTION_REPLACE],
8856 [dnl {
8857 sed -e '/^$1 ()$/,/^} # $1 /c\
8858 $1 ()\
8859 {\
8860 m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
8861 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8862   && mv -f "$cfgfile.tmp" "$cfgfile" \
8863     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8864 test 0 -eq $? || _lt_function_replace_fail=:
8865 ])
8866
8867
8868 # _LT_PROG_REPLACE_SHELLFNS
8869 # -------------------------
8870 # Replace existing portable implementations of several shell functions with
8871 # equivalent extended shell implementations where those features are available..
8872 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8873 [if test x"$xsi_shell" = xyes; then
8874   _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8875     case ${1} in
8876       */*) func_dirname_result="${1%/*}${2}" ;;
8877       *  ) func_dirname_result="${3}" ;;
8878     esac])
8879
8880   _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8881     func_basename_result="${1##*/}"])
8882
8883   _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8884     case ${1} in
8885       */*) func_dirname_result="${1%/*}${2}" ;;
8886       *  ) func_dirname_result="${3}" ;;
8887     esac
8888     func_basename_result="${1##*/}"])
8889
8890   _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8891     # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8892     # positional parameters, so assign one to ordinary parameter first.
8893     func_stripname_result=${3}
8894     func_stripname_result=${func_stripname_result#"${1}"}
8895     func_stripname_result=${func_stripname_result%"${2}"}])
8896
8897   _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8898     func_split_long_opt_name=${1%%=*}
8899     func_split_long_opt_arg=${1#*=}])
8900
8901   _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8902     func_split_short_opt_arg=${1#??}
8903     func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8904
8905   _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8906     case ${1} in
8907       *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8908       *)    func_lo2o_result=${1} ;;
8909     esac])
8910
8911   _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
8912
8913   _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
8914
8915   _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
8916 fi
8917
8918 if test x"$lt_shell_append" = xyes; then
8919   _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
8920
8921   _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8922     func_quote_for_eval "${2}"
8923 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8924     eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8925
8926   # Save a `func_append' function call where possible by direct use of '+='
8927   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8928     && mv -f "$cfgfile.tmp" "$cfgfile" \
8929       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8930   test 0 -eq $? || _lt_function_replace_fail=:
8931 else
8932   # Save a `func_append' function call even when '+=' is not available
8933   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8934     && mv -f "$cfgfile.tmp" "$cfgfile" \
8935       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8936   test 0 -eq $? || _lt_function_replace_fail=:
8937 fi
8938
8939 if test x"$_lt_function_replace_fail" = x":"; then
8940   AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8941 fi
8942 ])
8943
8944 # _LT_PATH_CONVERSION_FUNCTIONS
8945 # -----------------------------
8946 # Determine which file name conversion functions should be used by
8947 # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8948 # for certain cross-compile configurations and native mingw.
8949 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8950 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8951 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8952 AC_MSG_CHECKING([how to convert $build file names to $host format])
8953 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8954 [case $host in
8955   *-*-mingw* )
8956     case $build in
8957       *-*-mingw* ) # actually msys
8958         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8959         ;;
8960       *-*-cygwin* )
8961         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8962         ;;
8963       * ) # otherwise, assume *nix
8964         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8965         ;;
8966     esac
8967     ;;
8968   *-*-cygwin* )
8969     case $build in
8970       *-*-mingw* ) # actually msys
8971         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8972         ;;
8973       *-*-cygwin* )
8974         lt_cv_to_host_file_cmd=func_convert_file_noop
8975         ;;
8976       * ) # otherwise, assume *nix
8977         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8978         ;;
8979     esac
8980     ;;
8981   * ) # unhandled hosts (and "normal" native builds)
8982     lt_cv_to_host_file_cmd=func_convert_file_noop
8983     ;;
8984 esac
8985 ])
8986 to_host_file_cmd=$lt_cv_to_host_file_cmd
8987 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8988 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8989          [0], [convert $build file names to $host format])dnl
8990
8991 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8992 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8993 [#assume ordinary cross tools, or native build.
8994 lt_cv_to_tool_file_cmd=func_convert_file_noop
8995 case $host in
8996   *-*-mingw* )
8997     case $build in
8998       *-*-mingw* ) # actually msys
8999         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9000         ;;
9001     esac
9002     ;;
9003 esac
9004 ])
9005 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9006 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9007 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9008          [0], [convert $build files to toolchain format])dnl
9009 ])# _LT_PATH_CONVERSION_FUNCTIONS
9010
9011 # Helper functions for option handling.                    -*- Autoconf -*-
9012 #
9013 #   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9014 #   Inc.
9015 #   Written by Gary V. Vaughan, 2004
9016 #
9017 # This file is free software; the Free Software Foundation gives
9018 # unlimited permission to copy and/or distribute it, with or without
9019 # modifications, as long as this notice is preserved.
9020
9021 # serial 7 ltoptions.m4
9022
9023 # This is to help aclocal find these macros, as it can't see m4_define.
9024 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9025
9026
9027 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9028 # ------------------------------------------
9029 m4_define([_LT_MANGLE_OPTION],
9030 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9031
9032
9033 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9034 # ---------------------------------------
9035 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9036 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9037 # saved as a flag.
9038 m4_define([_LT_SET_OPTION],
9039 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9040 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9041         _LT_MANGLE_DEFUN([$1], [$2]),
9042     [m4_warning([Unknown $1 option `$2'])])[]dnl
9043 ])
9044
9045
9046 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9047 # ------------------------------------------------------------
9048 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9049 m4_define([_LT_IF_OPTION],
9050 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9051
9052
9053 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9054 # -------------------------------------------------------
9055 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9056 # are set.
9057 m4_define([_LT_UNLESS_OPTIONS],
9058 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9059             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9060                       [m4_define([$0_found])])])[]dnl
9061 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9062 ])[]dnl
9063 ])
9064
9065
9066 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9067 # ----------------------------------------
9068 # OPTION-LIST is a space-separated list of Libtool options associated
9069 # with MACRO-NAME.  If any OPTION has a matching handler declared with
9070 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9071 # the unknown option and exit.
9072 m4_defun([_LT_SET_OPTIONS],
9073 [# Set options
9074 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9075     [_LT_SET_OPTION([$1], _LT_Option)])
9076
9077 m4_if([$1],[LT_INIT],[
9078   dnl
9079   dnl Simply set some default values (i.e off) if boolean options were not
9080   dnl specified:
9081   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9082   ])
9083   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9084   ])
9085   dnl
9086   dnl If no reference was made to various pairs of opposing options, then
9087   dnl we run the default mode handler for the pair.  For example, if neither
9088   dnl `shared' nor `disable-shared' was passed, we enable building of shared
9089   dnl archives by default:
9090   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9091   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9092   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9093   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9094                    [_LT_ENABLE_FAST_INSTALL])
9095   ])
9096 ])# _LT_SET_OPTIONS
9097
9098
9099
9100 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9101 # -----------------------------------------
9102 m4_define([_LT_MANGLE_DEFUN],
9103 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9104
9105
9106 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9107 # -----------------------------------------------
9108 m4_define([LT_OPTION_DEFINE],
9109 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9110 ])# LT_OPTION_DEFINE
9111
9112
9113 # dlopen
9114 # ------
9115 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9116 ])
9117
9118 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9119 [_LT_SET_OPTION([LT_INIT], [dlopen])
9120 AC_DIAGNOSE([obsolete],
9121 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9122 put the `dlopen' option into LT_INIT's first parameter.])
9123 ])
9124
9125 dnl aclocal-1.4 backwards compatibility:
9126 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9127
9128
9129 # win32-dll
9130 # ---------
9131 # Declare package support for building win32 dll's.
9132 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9133 [enable_win32_dll=yes
9134
9135 case $host in
9136 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9137   AC_CHECK_TOOL(AS, as, false)
9138   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9139   AC_CHECK_TOOL(OBJDUMP, objdump, false)
9140   ;;
9141 esac
9142
9143 test -z "$AS" && AS=as
9144 _LT_DECL([], [AS],      [1], [Assembler program])dnl
9145
9146 test -z "$DLLTOOL" && DLLTOOL=dlltool
9147 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9148
9149 test -z "$OBJDUMP" && OBJDUMP=objdump
9150 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9151 ])# win32-dll
9152
9153 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9154 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9155 _LT_SET_OPTION([LT_INIT], [win32-dll])
9156 AC_DIAGNOSE([obsolete],
9157 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9158 put the `win32-dll' option into LT_INIT's first parameter.])
9159 ])
9160
9161 dnl aclocal-1.4 backwards compatibility:
9162 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9163
9164
9165 # _LT_ENABLE_SHARED([DEFAULT])
9166 # ----------------------------
9167 # implement the --enable-shared flag, and supports the `shared' and
9168 # `disable-shared' LT_INIT options.
9169 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9170 m4_define([_LT_ENABLE_SHARED],
9171 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9172 AC_ARG_ENABLE([shared],
9173     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9174         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9175     [p=${PACKAGE-default}
9176     case $enableval in
9177     yes) enable_shared=yes ;;
9178     no) enable_shared=no ;;
9179     *)
9180       enable_shared=no
9181       # Look at the argument we got.  We use all the common list separators.
9182       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9183       for pkg in $enableval; do
9184         IFS="$lt_save_ifs"
9185         if test "X$pkg" = "X$p"; then
9186           enable_shared=yes
9187         fi
9188       done
9189       IFS="$lt_save_ifs"
9190       ;;
9191     esac],
9192     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9193
9194     _LT_DECL([build_libtool_libs], [enable_shared], [0],
9195         [Whether or not to build shared libraries])
9196 ])# _LT_ENABLE_SHARED
9197
9198 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9199 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9200
9201 # Old names:
9202 AC_DEFUN([AC_ENABLE_SHARED],
9203 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9204 ])
9205
9206 AC_DEFUN([AC_DISABLE_SHARED],
9207 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9208 ])
9209
9210 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9211 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9212
9213 dnl aclocal-1.4 backwards compatibility:
9214 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9215 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9216
9217
9218
9219 # _LT_ENABLE_STATIC([DEFAULT])
9220 # ----------------------------
9221 # implement the --enable-static flag, and support the `static' and
9222 # `disable-static' LT_INIT options.
9223 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9224 m4_define([_LT_ENABLE_STATIC],
9225 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9226 AC_ARG_ENABLE([static],
9227     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9228         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9229     [p=${PACKAGE-default}
9230     case $enableval in
9231     yes) enable_static=yes ;;
9232     no) enable_static=no ;;
9233     *)
9234      enable_static=no
9235       # Look at the argument we got.  We use all the common list separators.
9236       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9237       for pkg in $enableval; do
9238         IFS="$lt_save_ifs"
9239         if test "X$pkg" = "X$p"; then
9240           enable_static=yes
9241         fi
9242       done
9243       IFS="$lt_save_ifs"
9244       ;;
9245     esac],
9246     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9247
9248     _LT_DECL([build_old_libs], [enable_static], [0],
9249         [Whether or not to build static libraries])
9250 ])# _LT_ENABLE_STATIC
9251
9252 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9253 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9254
9255 # Old names:
9256 AC_DEFUN([AC_ENABLE_STATIC],
9257 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9258 ])
9259
9260 AC_DEFUN([AC_DISABLE_STATIC],
9261 [_LT_SET_OPTION([LT_INIT], [disable-static])
9262 ])
9263
9264 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9265 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9266
9267 dnl aclocal-1.4 backwards compatibility:
9268 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9269 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9270
9271
9272
9273 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9274 # ----------------------------------
9275 # implement the --enable-fast-install flag, and support the `fast-install'
9276 # and `disable-fast-install' LT_INIT options.
9277 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9278 m4_define([_LT_ENABLE_FAST_INSTALL],
9279 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9280 AC_ARG_ENABLE([fast-install],
9281     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9282     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9283     [p=${PACKAGE-default}
9284     case $enableval in
9285     yes) enable_fast_install=yes ;;
9286     no) enable_fast_install=no ;;
9287     *)
9288       enable_fast_install=no
9289       # Look at the argument we got.  We use all the common list separators.
9290       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9291       for pkg in $enableval; do
9292         IFS="$lt_save_ifs"
9293         if test "X$pkg" = "X$p"; then
9294           enable_fast_install=yes
9295         fi
9296       done
9297       IFS="$lt_save_ifs"
9298       ;;
9299     esac],
9300     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9301
9302 _LT_DECL([fast_install], [enable_fast_install], [0],
9303          [Whether or not to optimize for fast installation])dnl
9304 ])# _LT_ENABLE_FAST_INSTALL
9305
9306 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9307 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9308
9309 # Old names:
9310 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9311 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9312 AC_DIAGNOSE([obsolete],
9313 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9314 the `fast-install' option into LT_INIT's first parameter.])
9315 ])
9316
9317 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9318 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9319 AC_DIAGNOSE([obsolete],
9320 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9321 the `disable-fast-install' option into LT_INIT's first parameter.])
9322 ])
9323
9324 dnl aclocal-1.4 backwards compatibility:
9325 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9326 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9327
9328
9329 # _LT_WITH_PIC([MODE])
9330 # --------------------
9331 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9332 # LT_INIT options.
9333 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9334 m4_define([_LT_WITH_PIC],
9335 [AC_ARG_WITH([pic],
9336     [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9337         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9338     [lt_p=${PACKAGE-default}
9339     case $withval in
9340     yes|no) pic_mode=$withval ;;
9341     *)
9342       pic_mode=default
9343       # Look at the argument we got.  We use all the common list separators.
9344       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9345       for lt_pkg in $withval; do
9346         IFS="$lt_save_ifs"
9347         if test "X$lt_pkg" = "X$lt_p"; then
9348           pic_mode=yes
9349         fi
9350       done
9351       IFS="$lt_save_ifs"
9352       ;;
9353     esac],
9354     [pic_mode=default])
9355
9356 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9357
9358 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9359 ])# _LT_WITH_PIC
9360
9361 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9362 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9363
9364 # Old name:
9365 AU_DEFUN([AC_LIBTOOL_PICMODE],
9366 [_LT_SET_OPTION([LT_INIT], [pic-only])
9367 AC_DIAGNOSE([obsolete],
9368 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9369 put the `pic-only' option into LT_INIT's first parameter.])
9370 ])
9371
9372 dnl aclocal-1.4 backwards compatibility:
9373 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9374
9375
9376 m4_define([_LTDL_MODE], [])
9377 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9378                  [m4_define([_LTDL_MODE], [nonrecursive])])
9379 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9380                  [m4_define([_LTDL_MODE], [recursive])])
9381 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9382                  [m4_define([_LTDL_MODE], [subproject])])
9383
9384 m4_define([_LTDL_TYPE], [])
9385 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9386                  [m4_define([_LTDL_TYPE], [installable])])
9387 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9388                  [m4_define([_LTDL_TYPE], [convenience])])
9389
9390 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9391 #
9392 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9393 # Written by Gary V. Vaughan, 2004
9394 #
9395 # This file is free software; the Free Software Foundation gives
9396 # unlimited permission to copy and/or distribute it, with or without
9397 # modifications, as long as this notice is preserved.
9398
9399 # serial 6 ltsugar.m4
9400
9401 # This is to help aclocal find these macros, as it can't see m4_define.
9402 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9403
9404
9405 # lt_join(SEP, ARG1, [ARG2...])
9406 # -----------------------------
9407 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9408 # associated separator.
9409 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9410 # versions in m4sugar had bugs.
9411 m4_define([lt_join],
9412 [m4_if([$#], [1], [],
9413        [$#], [2], [[$2]],
9414        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9415 m4_define([_lt_join],
9416 [m4_if([$#$2], [2], [],
9417        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9418
9419
9420 # lt_car(LIST)
9421 # lt_cdr(LIST)
9422 # ------------
9423 # Manipulate m4 lists.
9424 # These macros are necessary as long as will still need to support
9425 # Autoconf-2.59 which quotes differently.
9426 m4_define([lt_car], [[$1]])
9427 m4_define([lt_cdr],
9428 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9429        [$#], 1, [],
9430        [m4_dquote(m4_shift($@))])])
9431 m4_define([lt_unquote], $1)
9432
9433
9434 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9435 # ------------------------------------------
9436 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9437 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9438 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9439 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9440 # than defined and empty).
9441 #
9442 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9443 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9444 m4_define([lt_append],
9445 [m4_define([$1],
9446            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9447
9448
9449
9450 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9451 # ----------------------------------------------------------
9452 # Produce a SEP delimited list of all paired combinations of elements of
9453 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9454 # has the form PREFIXmINFIXSUFFIXn.
9455 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9456 m4_define([lt_combine],
9457 [m4_if(m4_eval([$# > 3]), [1],
9458        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9459 [[m4_foreach([_Lt_prefix], [$2],
9460              [m4_foreach([_Lt_suffix],
9461                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9462         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9463
9464
9465 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9466 # -----------------------------------------------------------------------
9467 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9468 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9469 m4_define([lt_if_append_uniq],
9470 [m4_ifdef([$1],
9471           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9472                  [lt_append([$1], [$2], [$3])$4],
9473                  [$5])],
9474           [lt_append([$1], [$2], [$3])$4])])
9475
9476
9477 # lt_dict_add(DICT, KEY, VALUE)
9478 # -----------------------------
9479 m4_define([lt_dict_add],
9480 [m4_define([$1($2)], [$3])])
9481
9482
9483 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9484 # --------------------------------------------
9485 m4_define([lt_dict_add_subkey],
9486 [m4_define([$1($2:$3)], [$4])])
9487
9488
9489 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9490 # ----------------------------------
9491 m4_define([lt_dict_fetch],
9492 [m4_ifval([$3],
9493         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9494     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9495
9496
9497 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9498 # -----------------------------------------------------------------
9499 m4_define([lt_if_dict_fetch],
9500 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9501         [$5],
9502     [$6])])
9503
9504
9505 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9506 # --------------------------------------------------------------
9507 m4_define([lt_dict_filter],
9508 [m4_if([$5], [], [],
9509   [lt_join(m4_quote(m4_default([$4], [[, ]])),
9510            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9511                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9512 ])
9513
9514 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
9515 #
9516 #   Copyright (C) 2004 Free Software Foundation, Inc.
9517 #   Written by Scott James Remnant, 2004
9518 #
9519 # This file is free software; the Free Software Foundation gives
9520 # unlimited permission to copy and/or distribute it, with or without
9521 # modifications, as long as this notice is preserved.
9522
9523 # @configure_input@
9524
9525 # serial 3337 ltversion.m4
9526 # This file is part of GNU Libtool
9527
9528 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9529 m4_define([LT_PACKAGE_REVISION], [1.3337])
9530
9531 AC_DEFUN([LTVERSION_VERSION],
9532 [macro_version='2.4.2'
9533 macro_revision='1.3337'
9534 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9535 _LT_DECL(, macro_revision, 0)
9536 ])
9537
9538 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9539 #
9540 #   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9541 #   Written by Scott James Remnant, 2004.
9542 #
9543 # This file is free software; the Free Software Foundation gives
9544 # unlimited permission to copy and/or distribute it, with or without
9545 # modifications, as long as this notice is preserved.
9546
9547 # serial 5 lt~obsolete.m4
9548
9549 # These exist entirely to fool aclocal when bootstrapping libtool.
9550 #
9551 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9552 # which have later been changed to m4_define as they aren't part of the
9553 # exported API, or moved to Autoconf or Automake where they belong.
9554 #
9555 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9556 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9557 # using a macro with the same name in our local m4/libtool.m4 it'll
9558 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9559 # and doesn't know about Autoconf macros at all.)
9560 #
9561 # So we provide this file, which has a silly filename so it's always
9562 # included after everything else.  This provides aclocal with the
9563 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9564 # because those macros already exist, or will be overwritten later.
9565 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9566 #
9567 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9568 # Yes, that means every name once taken will need to remain here until
9569 # we give up compatibility with versions before 1.7, at which point
9570 # we need to keep only those names which we still refer to.
9571
9572 # This is to help aclocal find these macros, as it can't see m4_define.
9573 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9574
9575 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9576 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
9577 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9578 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
9579 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9580 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
9581 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
9582 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9583 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
9584 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9585 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
9586 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9587 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9588 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9589 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9590 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9591 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
9592 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9593 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9594 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
9595 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
9596 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9597 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9598 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9599 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9600 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9601 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9602 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9603 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
9604 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
9605 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
9606 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9607 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9608 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
9609 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
9610 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9611 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9612 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
9613 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9614 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
9615 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
9616 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
9617 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9618 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9619 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9620 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9621 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9622 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9623 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9624 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9625 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9626 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9627 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9628 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9629 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9630 m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9631 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9632 m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9633 m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
9634 m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
9635 m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
9636
9637 # nls.m4 serial 5 (gettext-0.18)
9638 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
9639 dnl Inc.
9640 dnl This file is free software; the Free Software Foundation
9641 dnl gives unlimited permission to copy and/or distribute it,
9642 dnl with or without modifications, as long as this notice is preserved.
9643 dnl
9644 dnl This file can can be used in projects which are not available under
9645 dnl the GNU General Public License or the GNU Library General Public
9646 dnl License but which still want to provide support for the GNU gettext
9647 dnl functionality.
9648 dnl Please note that the actual code of the GNU gettext library is covered
9649 dnl by the GNU Library General Public License, and the rest of the GNU
9650 dnl gettext package package is covered by the GNU General Public License.
9651 dnl They are *not* in the public domain.
9652
9653 dnl Authors:
9654 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9655 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9656
9657 AC_PREREQ([2.50])
9658
9659 AC_DEFUN([AM_NLS],
9660 [
9661   AC_MSG_CHECKING([whether NLS is requested])
9662   dnl Default is enabled NLS
9663   AC_ARG_ENABLE([nls],
9664     [  --disable-nls           do not use Native Language Support],
9665     USE_NLS=$enableval, USE_NLS=yes)
9666   AC_MSG_RESULT([$USE_NLS])
9667   AC_SUBST([USE_NLS])
9668 ])
9669
9670 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9671 # serial 1 (pkg-config-0.24)
9672
9673 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
9674 #
9675 # This program is free software; you can redistribute it and/or modify
9676 # it under the terms of the GNU General Public License as published by
9677 # the Free Software Foundation; either version 2 of the License, or
9678 # (at your option) any later version.
9679 #
9680 # This program is distributed in the hope that it will be useful, but
9681 # WITHOUT ANY WARRANTY; without even the implied warranty of
9682 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9683 # General Public License for more details.
9684 #
9685 # You should have received a copy of the GNU General Public License
9686 # along with this program; if not, write to the Free Software
9687 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9688 #
9689 # As a special exception to the GNU General Public License, if you
9690 # distribute this file as part of a program that contains a
9691 # configuration script generated by Autoconf, you may include it under
9692 # the same distribution terms that you use for the rest of that program.
9693
9694 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9695 # ----------------------------------
9696 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9697 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9698 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9699 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9700 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9701 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9702 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9703
9704 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9705         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9706 fi
9707 if test -n "$PKG_CONFIG"; then
9708         _pkg_min_version=m4_default([$1], [0.9.0])
9709         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9710         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9711                 AC_MSG_RESULT([yes])
9712         else
9713                 AC_MSG_RESULT([no])
9714                 PKG_CONFIG=""
9715         fi
9716 fi[]dnl
9717 ])# PKG_PROG_PKG_CONFIG
9718
9719 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9720 #
9721 # Check to see whether a particular set of modules exists.  Similar
9722 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9723 #
9724 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9725 # only at the first occurence in configure.ac, so if the first place
9726 # it's called might be skipped (such as if it is within an "if", you
9727 # have to call PKG_CHECK_EXISTS manually
9728 # --------------------------------------------------------------
9729 AC_DEFUN([PKG_CHECK_EXISTS],
9730 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9731 if test -n "$PKG_CONFIG" && \
9732     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9733   m4_default([$2], [:])
9734 m4_ifvaln([$3], [else
9735   $3])dnl
9736 fi])
9737
9738 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9739 # ---------------------------------------------
9740 m4_define([_PKG_CONFIG],
9741 [if test -n "$$1"; then
9742     pkg_cv_[]$1="$$1"
9743  elif test -n "$PKG_CONFIG"; then
9744     PKG_CHECK_EXISTS([$3],
9745                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9746                       test "x$?" != "x0" && pkg_failed=yes ],
9747                      [pkg_failed=yes])
9748  else
9749     pkg_failed=untried
9750 fi[]dnl
9751 ])# _PKG_CONFIG
9752
9753 # _PKG_SHORT_ERRORS_SUPPORTED
9754 # -----------------------------
9755 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9756 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9757 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9758         _pkg_short_errors_supported=yes
9759 else
9760         _pkg_short_errors_supported=no
9761 fi[]dnl
9762 ])# _PKG_SHORT_ERRORS_SUPPORTED
9763
9764
9765 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9766 # [ACTION-IF-NOT-FOUND])
9767 #
9768 #
9769 # Note that if there is a possibility the first call to
9770 # PKG_CHECK_MODULES might not happen, you should be sure to include an
9771 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9772 #
9773 #
9774 # --------------------------------------------------------------
9775 AC_DEFUN([PKG_CHECK_MODULES],
9776 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9777 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9778 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9779
9780 pkg_failed=no
9781 AC_MSG_CHECKING([for $1])
9782
9783 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9784 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
9785
9786 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9787 and $1[]_LIBS to avoid the need to call pkg-config.
9788 See the pkg-config man page for more details.])
9789
9790 if test $pkg_failed = yes; then
9791         AC_MSG_RESULT([no])
9792         _PKG_SHORT_ERRORS_SUPPORTED
9793         if test $_pkg_short_errors_supported = yes; then
9794                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9795         else 
9796                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9797         fi
9798         # Put the nasty error message in config.log where it belongs
9799         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9800
9801         m4_default([$4], [AC_MSG_ERROR(
9802 [Package requirements ($2) were not met:
9803
9804 $$1_PKG_ERRORS
9805
9806 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9807 installed software in a non-standard prefix.
9808
9809 _PKG_TEXT])[]dnl
9810         ])
9811 elif test $pkg_failed = untried; then
9812         AC_MSG_RESULT([no])
9813         m4_default([$4], [AC_MSG_FAILURE(
9814 [The pkg-config script could not be found or is too old.  Make sure it
9815 is in your PATH or set the PKG_CONFIG environment variable to the full
9816 path to pkg-config.
9817
9818 _PKG_TEXT
9819
9820 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
9821         ])
9822 else
9823         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9824         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9825         AC_MSG_RESULT([yes])
9826         $3
9827 fi[]dnl
9828 ])# PKG_CHECK_MODULES
9829
9830 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
9831 # Foundation, Inc.
9832 #
9833 # This file is free software; the Free Software Foundation
9834 # gives unlimited permission to copy and/or distribute it,
9835 # with or without modifications, as long as this notice is preserved.
9836
9837 # serial 1
9838
9839 # AM_AUTOMAKE_VERSION(VERSION)
9840 # ----------------------------
9841 # Automake X.Y traces this macro to ensure aclocal.m4 has been
9842 # generated from the m4 files accompanying Automake X.Y.
9843 # (This private macro should not be called outside this file.)
9844 AC_DEFUN([AM_AUTOMAKE_VERSION],
9845 [am__api_version='1.11'
9846 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9847 dnl require some minimum version.  Point them to the right macro.
9848 m4_if([$1], [1.11.3], [],
9849       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9850 ])
9851
9852 # _AM_AUTOCONF_VERSION(VERSION)
9853 # -----------------------------
9854 # aclocal traces this macro to find the Autoconf version.
9855 # This is a private macro too.  Using m4_define simplifies
9856 # the logic in aclocal, which can simply ignore this definition.
9857 m4_define([_AM_AUTOCONF_VERSION], [])
9858
9859 # AM_SET_CURRENT_AUTOMAKE_VERSION
9860 # -------------------------------
9861 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9862 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9863 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9864 [AM_AUTOMAKE_VERSION([1.11.3])dnl
9865 m4_ifndef([AC_AUTOCONF_VERSION],
9866   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9867 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9868
9869 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
9870
9871 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
9872 #
9873 # This file is free software; the Free Software Foundation
9874 # gives unlimited permission to copy and/or distribute it,
9875 # with or without modifications, as long as this notice is preserved.
9876
9877 # serial 1
9878
9879 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9880 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
9881 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9882 #
9883 # Of course, Automake must honor this variable whenever it calls a
9884 # tool from the auxiliary directory.  The problem is that $srcdir (and
9885 # therefore $ac_aux_dir as well) can be either absolute or relative,
9886 # depending on how configure is run.  This is pretty annoying, since
9887 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
9888 # source directory, any form will work fine, but in subdirectories a
9889 # relative path needs to be adjusted first.
9890 #
9891 # $ac_aux_dir/missing
9892 #    fails when called from a subdirectory if $ac_aux_dir is relative
9893 # $top_srcdir/$ac_aux_dir/missing
9894 #    fails if $ac_aux_dir is absolute,
9895 #    fails when called from a subdirectory in a VPATH build with
9896 #          a relative $ac_aux_dir
9897 #
9898 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9899 # are both prefixed by $srcdir.  In an in-source build this is usually
9900 # harmless because $srcdir is `.', but things will broke when you
9901 # start a VPATH build or use an absolute $srcdir.
9902 #
9903 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9904 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9905 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9906 # and then we would define $MISSING as
9907 #   MISSING="\${SHELL} $am_aux_dir/missing"
9908 # This will work as long as MISSING is not called from configure, because
9909 # unfortunately $(top_srcdir) has no meaning in configure.
9910 # However there are other variables, like CC, which are often used in
9911 # configure, and could therefore not use this "fixed" $ac_aux_dir.
9912 #
9913 # Another solution, used here, is to always expand $ac_aux_dir to an
9914 # absolute PATH.  The drawback is that using absolute paths prevent a
9915 # configured tree to be moved without reconfiguration.
9916
9917 AC_DEFUN([AM_AUX_DIR_EXPAND],
9918 [dnl Rely on autoconf to set up CDPATH properly.
9919 AC_PREREQ([2.50])dnl
9920 # expand $ac_aux_dir to an absolute path
9921 am_aux_dir=`cd $ac_aux_dir && pwd`
9922 ])
9923
9924 # AM_CONDITIONAL                                            -*- Autoconf -*-
9925
9926 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9927 # Free Software Foundation, Inc.
9928 #
9929 # This file is free software; the Free Software Foundation
9930 # gives unlimited permission to copy and/or distribute it,
9931 # with or without modifications, as long as this notice is preserved.
9932
9933 # serial 9
9934
9935 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
9936 # -------------------------------------
9937 # Define a conditional.
9938 AC_DEFUN([AM_CONDITIONAL],
9939 [AC_PREREQ(2.52)dnl
9940  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
9941         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9942 AC_SUBST([$1_TRUE])dnl
9943 AC_SUBST([$1_FALSE])dnl
9944 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
9945 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
9946 m4_define([_AM_COND_VALUE_$1], [$2])dnl
9947 if $2; then
9948   $1_TRUE=
9949   $1_FALSE='#'
9950 else
9951   $1_TRUE='#'
9952   $1_FALSE=
9953 fi
9954 AC_CONFIG_COMMANDS_PRE(
9955 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9956   AC_MSG_ERROR([[conditional "$1" was never defined.
9957 Usually this means the macro was only invoked conditionally.]])
9958 fi])])
9959
9960 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
9961 # 2010, 2011 Free Software Foundation, Inc.
9962 #
9963 # This file is free software; the Free Software Foundation
9964 # gives unlimited permission to copy and/or distribute it,
9965 # with or without modifications, as long as this notice is preserved.
9966
9967 # serial 12
9968
9969 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9970 # written in clear, in which case automake, when reading aclocal.m4,
9971 # will think it sees a *use*, and therefore will trigger all it's
9972 # C support machinery.  Also note that it means that autoscan, seeing
9973 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9974
9975
9976 # _AM_DEPENDENCIES(NAME)
9977 # ----------------------
9978 # See how the compiler implements dependency checking.
9979 # NAME is "CC", "CXX", "GCJ", or "OBJC".
9980 # We try a few techniques and use that to set a single cache variable.
9981 #
9982 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9983 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9984 # dependency, and given that the user is not expected to run this macro,
9985 # just rely on AC_PROG_CC.
9986 AC_DEFUN([_AM_DEPENDENCIES],
9987 [AC_REQUIRE([AM_SET_DEPDIR])dnl
9988 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9989 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9990 AC_REQUIRE([AM_DEP_TRACK])dnl
9991
9992 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
9993        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
9994        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9995        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
9996        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9997                    [depcc="$$1"   am_compiler_list=])
9998
9999 AC_CACHE_CHECK([dependency style of $depcc],
10000                [am_cv_$1_dependencies_compiler_type],
10001 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10002   # We make a subdir and do the tests there.  Otherwise we can end up
10003   # making bogus files that we don't know about and never remove.  For
10004   # instance it was reported that on HP-UX the gcc test will end up
10005   # making a dummy file named `D' -- because `-MD' means `put the output
10006   # in D'.
10007   rm -rf conftest.dir
10008   mkdir conftest.dir
10009   # Copy depcomp to subdir because otherwise we won't find it if we're
10010   # using a relative directory.
10011   cp "$am_depcomp" conftest.dir
10012   cd conftest.dir
10013   # We will build objects and dependencies in a subdirectory because
10014   # it helps to detect inapplicable dependency modes.  For instance
10015   # both Tru64's cc and ICC support -MD to output dependencies as a
10016   # side effect of compilation, but ICC will put the dependencies in
10017   # the current directory while Tru64 will put them in the object
10018   # directory.
10019   mkdir sub
10020
10021   am_cv_$1_dependencies_compiler_type=none
10022   if test "$am_compiler_list" = ""; then
10023      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
10024   fi
10025   am__universal=false
10026   m4_case([$1], [CC],
10027     [case " $depcc " in #(
10028      *\ -arch\ *\ -arch\ *) am__universal=true ;;
10029      esac],
10030     [CXX],
10031     [case " $depcc " in #(
10032      *\ -arch\ *\ -arch\ *) am__universal=true ;;
10033      esac])
10034
10035   for depmode in $am_compiler_list; do
10036     # Setup a source with many dependencies, because some compilers
10037     # like to wrap large dependency lists on column 80 (with \), and
10038     # we should not choose a depcomp mode which is confused by this.
10039     #
10040     # We need to recreate these files for each test, as the compiler may
10041     # overwrite some of them when testing with obscure command lines.
10042     # This happens at least with the AIX C compiler.
10043     : > sub/conftest.c
10044     for i in 1 2 3 4 5 6; do
10045       echo '#include "conftst'$i'.h"' >> sub/conftest.c
10046       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
10047       # Solaris 8's {/usr,}/bin/sh.
10048       touch sub/conftst$i.h
10049     done
10050     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10051
10052     # We check with `-c' and `-o' for the sake of the "dashmstdout"
10053     # mode.  It turns out that the SunPro C++ compiler does not properly
10054     # handle `-M -o', and we need to detect this.  Also, some Intel
10055     # versions had trouble with output in subdirs
10056     am__obj=sub/conftest.${OBJEXT-o}
10057     am__minus_obj="-o $am__obj"
10058     case $depmode in
10059     gcc)
10060       # This depmode causes a compiler race in universal mode.
10061       test "$am__universal" = false || continue
10062       ;;
10063     nosideeffect)
10064       # after this tag, mechanisms are not by side-effect, so they'll
10065       # only be used when explicitly requested
10066       if test "x$enable_dependency_tracking" = xyes; then
10067         continue
10068       else
10069         break
10070       fi
10071       ;;
10072     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
10073       # This compiler won't grok `-c -o', but also, the minuso test has
10074       # not run yet.  These depmodes are late enough in the game, and
10075       # so weak that their functioning should not be impacted.
10076       am__obj=conftest.${OBJEXT-o}
10077       am__minus_obj=
10078       ;;
10079     none) break ;;
10080     esac
10081     if depmode=$depmode \
10082        source=sub/conftest.c object=$am__obj \
10083        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
10084        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
10085          >/dev/null 2>conftest.err &&
10086        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
10087        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
10088        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
10089        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10090       # icc doesn't choke on unknown options, it will just issue warnings
10091       # or remarks (even with -Werror).  So we grep stderr for any message
10092       # that says an option was ignored or not supported.
10093       # When given -MP, icc 7.0 and 7.1 complain thusly:
10094       #   icc: Command line warning: ignoring option '-M'; no argument required
10095       # The diagnosis changed in icc 8.0:
10096       #   icc: Command line remark: option '-MP' not supported
10097       if (grep 'ignoring option' conftest.err ||
10098           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10099         am_cv_$1_dependencies_compiler_type=$depmode
10100         break
10101       fi
10102     fi
10103   done
10104
10105   cd ..
10106   rm -rf conftest.dir
10107 else
10108   am_cv_$1_dependencies_compiler_type=none
10109 fi
10110 ])
10111 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10112 AM_CONDITIONAL([am__fastdep$1], [
10113   test "x$enable_dependency_tracking" != xno \
10114   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
10115 ])
10116
10117
10118 # AM_SET_DEPDIR
10119 # -------------
10120 # Choose a directory name for dependency files.
10121 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
10122 AC_DEFUN([AM_SET_DEPDIR],
10123 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10124 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
10125 ])
10126
10127
10128 # AM_DEP_TRACK
10129 # ------------
10130 AC_DEFUN([AM_DEP_TRACK],
10131 [AC_ARG_ENABLE(dependency-tracking,
10132 [  --disable-dependency-tracking  speeds up one-time build
10133   --enable-dependency-tracking   do not reject slow dependency extractors])
10134 if test "x$enable_dependency_tracking" != xno; then
10135   am_depcomp="$ac_aux_dir/depcomp"
10136   AMDEPBACKSLASH='\'
10137   am__nodep='_no'
10138 fi
10139 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
10140 AC_SUBST([AMDEPBACKSLASH])dnl
10141 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
10142 AC_SUBST([am__nodep])dnl
10143 _AM_SUBST_NOTMAKE([am__nodep])dnl
10144 ])
10145
10146 # Generate code to set up dependency tracking.              -*- Autoconf -*-
10147
10148 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
10149 # Free Software Foundation, Inc.
10150 #
10151 # This file is free software; the Free Software Foundation
10152 # gives unlimited permission to copy and/or distribute it,
10153 # with or without modifications, as long as this notice is preserved.
10154
10155 #serial 5
10156
10157 # _AM_OUTPUT_DEPENDENCY_COMMANDS
10158 # ------------------------------
10159 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
10160 [{
10161   # Autoconf 2.62 quotes --file arguments for eval, but not when files
10162   # are listed without --file.  Let's play safe and only enable the eval
10163   # if we detect the quoting.
10164   case $CONFIG_FILES in
10165   *\'*) eval set x "$CONFIG_FILES" ;;
10166   *)   set x $CONFIG_FILES ;;
10167   esac
10168   shift
10169   for mf
10170   do
10171     # Strip MF so we end up with the name of the file.
10172     mf=`echo "$mf" | sed -e 's/:.*$//'`
10173     # Check whether this is an Automake generated Makefile or not.
10174     # We used to match only the files named `Makefile.in', but
10175     # some people rename them; so instead we look at the file content.
10176     # Grep'ing the first line is not enough: some people post-process
10177     # each Makefile.in and add a new line on top of each file to say so.
10178     # Grep'ing the whole file is not good either: AIX grep has a line
10179     # limit of 2048, but all sed's we know have understand at least 4000.
10180     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
10181       dirpart=`AS_DIRNAME("$mf")`
10182     else
10183       continue
10184     fi
10185     # Extract the definition of DEPDIR, am__include, and am__quote
10186     # from the Makefile without running `make'.
10187     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
10188     test -z "$DEPDIR" && continue
10189     am__include=`sed -n 's/^am__include = //p' < "$mf"`
10190     test -z "am__include" && continue
10191     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
10192     # When using ansi2knr, U may be empty or an underscore; expand it
10193     U=`sed -n 's/^U = //p' < "$mf"`
10194     # Find all dependency output files, they are included files with
10195     # $(DEPDIR) in their names.  We invoke sed twice because it is the
10196     # simplest approach to changing $(DEPDIR) to its actual value in the
10197     # expansion.
10198     for file in `sed -n "
10199       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
10200          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
10201       # Make sure the directory exists.
10202       test -f "$dirpart/$file" && continue
10203       fdir=`AS_DIRNAME(["$file"])`
10204       AS_MKDIR_P([$dirpart/$fdir])
10205       # echo "creating $dirpart/$file"
10206       echo '# dummy' > "$dirpart/$file"
10207     done
10208   done
10209 }
10210 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10211
10212
10213 # AM_OUTPUT_DEPENDENCY_COMMANDS
10214 # -----------------------------
10215 # This macro should only be invoked once -- use via AC_REQUIRE.
10216 #
10217 # This code is only required when automatic dependency tracking
10218 # is enabled.  FIXME.  This creates each `.P' file that we will
10219 # need in order to bootstrap the dependency handling code.
10220 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10221 [AC_CONFIG_COMMANDS([depfiles],
10222      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10223      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10224 ])
10225
10226 # Do all the work for Automake.                             -*- Autoconf -*-
10227
10228 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
10229 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
10230 #
10231 # This file is free software; the Free Software Foundation
10232 # gives unlimited permission to copy and/or distribute it,
10233 # with or without modifications, as long as this notice is preserved.
10234
10235 # serial 16
10236
10237 # This macro actually does too much.  Some checks are only needed if
10238 # your package does certain things.  But this isn't really a big deal.
10239
10240 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10241 # AM_INIT_AUTOMAKE([OPTIONS])
10242 # -----------------------------------------------
10243 # The call with PACKAGE and VERSION arguments is the old style
10244 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
10245 # and VERSION should now be passed to AC_INIT and removed from
10246 # the call to AM_INIT_AUTOMAKE.
10247 # We support both call styles for the transition.  After
10248 # the next Automake release, Autoconf can make the AC_INIT
10249 # arguments mandatory, and then we can depend on a new Autoconf
10250 # release and drop the old call support.
10251 AC_DEFUN([AM_INIT_AUTOMAKE],
10252 [AC_PREREQ([2.62])dnl
10253 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
10254 dnl the ones we care about.
10255 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10256 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10257 AC_REQUIRE([AC_PROG_INSTALL])dnl
10258 if test "`cd $srcdir && pwd`" != "`pwd`"; then
10259   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10260   # is not polluted with repeated "-I."
10261   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10262   # test to see if srcdir already configured
10263   if test -f $srcdir/config.status; then
10264     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10265   fi
10266 fi
10267
10268 # test whether we have cygpath
10269 if test -z "$CYGPATH_W"; then
10270   if (cygpath --version) >/dev/null 2>/dev/null; then
10271     CYGPATH_W='cygpath -w'
10272   else
10273     CYGPATH_W=echo
10274   fi
10275 fi
10276 AC_SUBST([CYGPATH_W])
10277
10278 # Define the identity of the package.
10279 dnl Distinguish between old-style and new-style calls.
10280 m4_ifval([$2],
10281 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10282  AC_SUBST([PACKAGE], [$1])dnl
10283  AC_SUBST([VERSION], [$2])],
10284 [_AM_SET_OPTIONS([$1])dnl
10285 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10286 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
10287   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10288  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10289  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10290
10291 _AM_IF_OPTION([no-define],,
10292 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
10293  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
10294
10295 # Some tools Automake needs.
10296 AC_REQUIRE([AM_SANITY_CHECK])dnl
10297 AC_REQUIRE([AC_ARG_PROGRAM])dnl
10298 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
10299 AM_MISSING_PROG(AUTOCONF, autoconf)
10300 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
10301 AM_MISSING_PROG(AUTOHEADER, autoheader)
10302 AM_MISSING_PROG(MAKEINFO, makeinfo)
10303 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10304 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
10305 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
10306 # We need awk for the "check" target.  The system "awk" is bad on
10307 # some platforms.
10308 AC_REQUIRE([AC_PROG_AWK])dnl
10309 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10310 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10311 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
10312               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10313                              [_AM_PROG_TAR([v7])])])
10314 _AM_IF_OPTION([no-dependencies],,
10315 [AC_PROVIDE_IFELSE([AC_PROG_CC],
10316                   [_AM_DEPENDENCIES(CC)],
10317                   [define([AC_PROG_CC],
10318                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
10319 AC_PROVIDE_IFELSE([AC_PROG_CXX],
10320                   [_AM_DEPENDENCIES(CXX)],
10321                   [define([AC_PROG_CXX],
10322                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
10323 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
10324                   [_AM_DEPENDENCIES(OBJC)],
10325                   [define([AC_PROG_OBJC],
10326                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
10327 ])
10328 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
10329 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
10330 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
10331 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
10332 AC_CONFIG_COMMANDS_PRE(dnl
10333 [m4_provide_if([_AM_COMPILER_EXEEXT],
10334   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
10335 ])
10336
10337 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
10338 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10339 dnl mangled by Autoconf and run in a shell conditional statement.
10340 m4_define([_AC_COMPILER_EXEEXT],
10341 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10342
10343
10344 # When config.status generates a header, we must update the stamp-h file.
10345 # This file resides in the same directory as the config header
10346 # that is generated.  The stamp files are numbered to have different names.
10347
10348 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10349 # loop where config.status creates the headers, so we can generate
10350 # our stamp files there.
10351 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10352 [# Compute $1's index in $config_headers.
10353 _am_arg=$1
10354 _am_stamp_count=1
10355 for _am_header in $config_headers :; do
10356   case $_am_header in
10357     $_am_arg | $_am_arg:* )
10358       break ;;
10359     * )
10360       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10361   esac
10362 done
10363 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10364
10365 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
10366 # Inc.
10367 #
10368 # This file is free software; the Free Software Foundation
10369 # gives unlimited permission to copy and/or distribute it,
10370 # with or without modifications, as long as this notice is preserved.
10371
10372 # serial 1
10373
10374 # AM_PROG_INSTALL_SH
10375 # ------------------
10376 # Define $install_sh.
10377 AC_DEFUN([AM_PROG_INSTALL_SH],
10378 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10379 if test x"${install_sh}" != xset; then
10380   case $am_aux_dir in
10381   *\ * | *\     *)
10382     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10383   *)
10384     install_sh="\${SHELL} $am_aux_dir/install-sh"
10385   esac
10386 fi
10387 AC_SUBST(install_sh)])
10388
10389 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
10390 #
10391 # This file is free software; the Free Software Foundation
10392 # gives unlimited permission to copy and/or distribute it,
10393 # with or without modifications, as long as this notice is preserved.
10394
10395 # serial 2
10396
10397 # Check whether the underlying file-system supports filenames
10398 # with a leading dot.  For instance MS-DOS doesn't.
10399 AC_DEFUN([AM_SET_LEADING_DOT],
10400 [rm -rf .tst 2>/dev/null
10401 mkdir .tst 2>/dev/null
10402 if test -d .tst; then
10403   am__leading_dot=.
10404 else
10405   am__leading_dot=_
10406 fi
10407 rmdir .tst 2>/dev/null
10408 AC_SUBST([am__leading_dot])])
10409
10410 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
10411 # From Jim Meyering
10412
10413 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
10414 # 2011 Free Software Foundation, Inc.
10415 #
10416 # This file is free software; the Free Software Foundation
10417 # gives unlimited permission to copy and/or distribute it,
10418 # with or without modifications, as long as this notice is preserved.
10419
10420 # serial 5
10421
10422 # AM_MAINTAINER_MODE([DEFAULT-MODE])
10423 # ----------------------------------
10424 # Control maintainer-specific portions of Makefiles.
10425 # Default is to disable them, unless `enable' is passed literally.
10426 # For symmetry, `disable' may be passed as well.  Anyway, the user
10427 # can override the default with the --enable/--disable switch.
10428 AC_DEFUN([AM_MAINTAINER_MODE],
10429 [m4_case(m4_default([$1], [disable]),
10430        [enable], [m4_define([am_maintainer_other], [disable])],
10431        [disable], [m4_define([am_maintainer_other], [enable])],
10432        [m4_define([am_maintainer_other], [enable])
10433         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
10434 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
10435   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
10436   AC_ARG_ENABLE([maintainer-mode],
10437 [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
10438                           (and sometimes confusing) to the casual installer],
10439       [USE_MAINTAINER_MODE=$enableval],
10440       [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
10441   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
10442   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
10443   MAINT=$MAINTAINER_MODE_TRUE
10444   AC_SUBST([MAINT])dnl
10445 ]
10446 )
10447
10448 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
10449
10450 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
10451
10452 # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
10453 #
10454 # This file is free software; the Free Software Foundation
10455 # gives unlimited permission to copy and/or distribute it,
10456 # with or without modifications, as long as this notice is preserved.
10457
10458 # serial 4
10459
10460 # AM_MAKE_INCLUDE()
10461 # -----------------
10462 # Check to see how make treats includes.
10463 AC_DEFUN([AM_MAKE_INCLUDE],
10464 [am_make=${MAKE-make}
10465 cat > confinc << 'END'
10466 am__doit:
10467         @echo this is the am__doit target
10468 .PHONY: am__doit
10469 END
10470 # If we don't find an include directive, just comment out the code.
10471 AC_MSG_CHECKING([for style of include used by $am_make])
10472 am__include="#"
10473 am__quote=
10474 _am_result=none
10475 # First try GNU make style include.
10476 echo "include confinc" > confmf
10477 # Ignore all kinds of additional output from `make'.
10478 case `$am_make -s -f confmf 2> /dev/null` in #(
10479 *the\ am__doit\ target*)
10480   am__include=include
10481   am__quote=
10482   _am_result=GNU
10483   ;;
10484 esac
10485 # Now try BSD make style include.
10486 if test "$am__include" = "#"; then
10487    echo '.include "confinc"' > confmf
10488    case `$am_make -s -f confmf 2> /dev/null` in #(
10489    *the\ am__doit\ target*)
10490      am__include=.include
10491      am__quote="\""
10492      _am_result=BSD
10493      ;;
10494    esac
10495 fi
10496 AC_SUBST([am__include])
10497 AC_SUBST([am__quote])
10498 AC_MSG_RESULT([$_am_result])
10499 rm -f confinc confmf
10500 ])
10501
10502 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10503
10504 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
10505 # Free Software Foundation, Inc.
10506 #
10507 # This file is free software; the Free Software Foundation
10508 # gives unlimited permission to copy and/or distribute it,
10509 # with or without modifications, as long as this notice is preserved.
10510
10511 # serial 6
10512
10513 # AM_MISSING_PROG(NAME, PROGRAM)
10514 # ------------------------------
10515 AC_DEFUN([AM_MISSING_PROG],
10516 [AC_REQUIRE([AM_MISSING_HAS_RUN])
10517 $1=${$1-"${am_missing_run}$2"}
10518 AC_SUBST($1)])
10519
10520
10521 # AM_MISSING_HAS_RUN
10522 # ------------------
10523 # Define MISSING if not defined so far and test if it supports --run.
10524 # If it does, set am_missing_run to use it, otherwise, to nothing.
10525 AC_DEFUN([AM_MISSING_HAS_RUN],
10526 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10527 AC_REQUIRE_AUX_FILE([missing])dnl
10528 if test x"${MISSING+set}" != xset; then
10529   case $am_aux_dir in
10530   *\ * | *\     *)
10531     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10532   *)
10533     MISSING="\${SHELL} $am_aux_dir/missing" ;;
10534   esac
10535 fi
10536 # Use eval to expand $SHELL
10537 if eval "$MISSING --run true"; then
10538   am_missing_run="$MISSING --run "
10539 else
10540   am_missing_run=
10541   AC_MSG_WARN([`missing' script is too old or missing])
10542 fi
10543 ])
10544
10545 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
10546 # Inc.
10547 #
10548 # This file is free software; the Free Software Foundation
10549 # gives unlimited permission to copy and/or distribute it,
10550 # with or without modifications, as long as this notice is preserved.
10551
10552 # serial 1
10553
10554 # AM_PROG_MKDIR_P
10555 # ---------------
10556 # Check for `mkdir -p'.
10557 AC_DEFUN([AM_PROG_MKDIR_P],
10558 [AC_PREREQ([2.60])dnl
10559 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10560 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
10561 dnl while keeping a definition of mkdir_p for backward compatibility.
10562 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
10563 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
10564 dnl Makefile.ins that do not define MKDIR_P, so we do our own
10565 dnl adjustment using top_builddir (which is defined more often than
10566 dnl MKDIR_P).
10567 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
10568 case $mkdir_p in
10569   [[\\/$]]* | ?:[[\\/]]*) ;;
10570   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
10571 esac
10572 ])
10573
10574 # Helper functions for option handling.                     -*- Autoconf -*-
10575
10576 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
10577 # Foundation, Inc.
10578 #
10579 # This file is free software; the Free Software Foundation
10580 # gives unlimited permission to copy and/or distribute it,
10581 # with or without modifications, as long as this notice is preserved.
10582
10583 # serial 5
10584
10585 # _AM_MANGLE_OPTION(NAME)
10586 # -----------------------
10587 AC_DEFUN([_AM_MANGLE_OPTION],
10588 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10589
10590 # _AM_SET_OPTION(NAME)
10591 # --------------------
10592 # Set option NAME.  Presently that only means defining a flag for this option.
10593 AC_DEFUN([_AM_SET_OPTION],
10594 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10595
10596 # _AM_SET_OPTIONS(OPTIONS)
10597 # ------------------------
10598 # OPTIONS is a space-separated list of Automake options.
10599 AC_DEFUN([_AM_SET_OPTIONS],
10600 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10601
10602 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10603 # -------------------------------------------
10604 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10605 AC_DEFUN([_AM_IF_OPTION],
10606 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10607
10608 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
10609
10610 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
10611 # Free Software Foundation, Inc.
10612 #
10613 # This file is free software; the Free Software Foundation
10614 # gives unlimited permission to copy and/or distribute it,
10615 # with or without modifications, as long as this notice is preserved.
10616
10617 # serial 5
10618
10619 # AM_SANITY_CHECK
10620 # ---------------
10621 AC_DEFUN([AM_SANITY_CHECK],
10622 [AC_MSG_CHECKING([whether build environment is sane])
10623 # Just in case
10624 sleep 1
10625 echo timestamp > conftest.file
10626 # Reject unsafe characters in $srcdir or the absolute working directory
10627 # name.  Accept space and tab only in the latter.
10628 am_lf='
10629 '
10630 case `pwd` in
10631   *[[\\\"\#\$\&\'\`$am_lf]]*)
10632     AC_MSG_ERROR([unsafe absolute working directory name]);;
10633 esac
10634 case $srcdir in
10635   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
10636     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
10637 esac
10638
10639 # Do `set' in a subshell so we don't clobber the current shell's
10640 # arguments.  Must try -L first in case configure is actually a
10641 # symlink; some systems play weird games with the mod time of symlinks
10642 # (eg FreeBSD returns the mod time of the symlink's containing
10643 # directory).
10644 if (
10645    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10646    if test "$[*]" = "X"; then
10647       # -L didn't work.
10648       set X `ls -t "$srcdir/configure" conftest.file`
10649    fi
10650    rm -f conftest.file
10651    if test "$[*]" != "X $srcdir/configure conftest.file" \
10652       && test "$[*]" != "X conftest.file $srcdir/configure"; then
10653
10654       # If neither matched, then we have a broken ls.  This can happen
10655       # if, for instance, CONFIG_SHELL is bash and it inherits a
10656       # broken ls alias from the environment.  This has actually
10657       # happened.  Such a system could not be considered "sane".
10658       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10659 alias in your environment])
10660    fi
10661
10662    test "$[2]" = conftest.file
10663    )
10664 then
10665    # Ok.
10666    :
10667 else
10668    AC_MSG_ERROR([newly created file is older than distributed files!
10669 Check your system clock])
10670 fi
10671 AC_MSG_RESULT(yes)])
10672
10673 # Copyright (C) 2009, 2011  Free Software Foundation, Inc.
10674 #
10675 # This file is free software; the Free Software Foundation
10676 # gives unlimited permission to copy and/or distribute it,
10677 # with or without modifications, as long as this notice is preserved.
10678
10679 # serial 2
10680
10681 # AM_SILENT_RULES([DEFAULT])
10682 # --------------------------
10683 # Enable less verbose build rules; with the default set to DEFAULT
10684 # (`yes' being less verbose, `no' or empty being verbose).
10685 AC_DEFUN([AM_SILENT_RULES],
10686 [AC_ARG_ENABLE([silent-rules],
10687 [  --enable-silent-rules          less verbose build output (undo: `make V=1')
10688   --disable-silent-rules         verbose build output (undo: `make V=0')])
10689 case $enable_silent_rules in
10690 yes) AM_DEFAULT_VERBOSITY=0;;
10691 no)  AM_DEFAULT_VERBOSITY=1;;
10692 *)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
10693 esac
10694 dnl
10695 dnl A few `make' implementations (e.g., NonStop OS and NextStep)
10696 dnl do not support nested variable expansions.
10697 dnl See automake bug#9928 and bug#10237.
10698 am_make=${MAKE-make}
10699 AC_CACHE_CHECK([whether $am_make supports nested variables],
10700    [am_cv_make_support_nested_variables],
10701    [if AS_ECHO([['TRUE=$(BAR$(V))
10702 BAR0=false
10703 BAR1=true
10704 V=1
10705 am__doit:
10706         @$(TRUE)
10707 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
10708   am_cv_make_support_nested_variables=yes
10709 else
10710   am_cv_make_support_nested_variables=no
10711 fi])
10712 if test $am_cv_make_support_nested_variables = yes; then
10713   dnl Using `$V' instead of `$(V)' breaks IRIX make.
10714   AM_V='$(V)'
10715   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
10716 else
10717   AM_V=$AM_DEFAULT_VERBOSITY
10718   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
10719 fi
10720 AC_SUBST([AM_V])dnl
10721 AM_SUBST_NOTMAKE([AM_V])dnl
10722 AC_SUBST([AM_DEFAULT_V])dnl
10723 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
10724 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10725 AM_BACKSLASH='\'
10726 AC_SUBST([AM_BACKSLASH])dnl
10727 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10728 ])
10729
10730 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
10731 #
10732 # This file is free software; the Free Software Foundation
10733 # gives unlimited permission to copy and/or distribute it,
10734 # with or without modifications, as long as this notice is preserved.
10735
10736 # serial 1
10737
10738 # AM_PROG_INSTALL_STRIP
10739 # ---------------------
10740 # One issue with vendor `install' (even GNU) is that you can't
10741 # specify the program used to strip binaries.  This is especially
10742 # annoying in cross-compiling environments, where the build's strip
10743 # is unlikely to handle the host's binaries.
10744 # Fortunately install-sh will honor a STRIPPROG variable, so we
10745 # always use install-sh in `make install-strip', and initialize
10746 # STRIPPROG with the value of the STRIP variable (set by the user).
10747 AC_DEFUN([AM_PROG_INSTALL_STRIP],
10748 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10749 # Installed binaries are usually stripped using `strip' when the user
10750 # run `make install-strip'.  However `strip' might not be the right
10751 # tool to use in cross-compilation environments, therefore Automake
10752 # will honor the `STRIP' environment variable to overrule this program.
10753 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10754 if test "$cross_compiling" != no; then
10755   AC_CHECK_TOOL([STRIP], [strip], :)
10756 fi
10757 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10758 AC_SUBST([INSTALL_STRIP_PROGRAM])])
10759
10760 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
10761 #
10762 # This file is free software; the Free Software Foundation
10763 # gives unlimited permission to copy and/or distribute it,
10764 # with or without modifications, as long as this notice is preserved.
10765
10766 # serial 3
10767
10768 # _AM_SUBST_NOTMAKE(VARIABLE)
10769 # ---------------------------
10770 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10771 # This macro is traced by Automake.
10772 AC_DEFUN([_AM_SUBST_NOTMAKE])
10773
10774 # AM_SUBST_NOTMAKE(VARIABLE)
10775 # --------------------------
10776 # Public sister of _AM_SUBST_NOTMAKE.
10777 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10778
10779 # Check how to create a tarball.                            -*- Autoconf -*-
10780
10781 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
10782 #
10783 # This file is free software; the Free Software Foundation
10784 # gives unlimited permission to copy and/or distribute it,
10785 # with or without modifications, as long as this notice is preserved.
10786
10787 # serial 2
10788
10789 # _AM_PROG_TAR(FORMAT)
10790 # --------------------
10791 # Check how to create a tarball in format FORMAT.
10792 # FORMAT should be one of `v7', `ustar', or `pax'.
10793 #
10794 # Substitute a variable $(am__tar) that is a command
10795 # writing to stdout a FORMAT-tarball containing the directory
10796 # $tardir.
10797 #     tardir=directory && $(am__tar) > result.tar
10798 #
10799 # Substitute a variable $(am__untar) that extract such
10800 # a tarball read from stdin.
10801 #     $(am__untar) < result.tar
10802 AC_DEFUN([_AM_PROG_TAR],
10803 [# Always define AMTAR for backward compatibility.  Yes, it's still used
10804 # in the wild :-(  We should find a proper way to deprecate it ...
10805 AC_SUBST([AMTAR], ['$${TAR-tar}'])
10806 m4_if([$1], [v7],
10807      [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
10808      [m4_case([$1], [ustar],, [pax],,
10809               [m4_fatal([Unknown tar format])])
10810 AC_MSG_CHECKING([how to create a $1 tar archive])
10811 # Loop over all known methods to create a tar archive until one works.
10812 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10813 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10814 # Do not fold the above two line into one, because Tru64 sh and
10815 # Solaris sh will not grok spaces in the rhs of `-'.
10816 for _am_tool in $_am_tools
10817 do
10818   case $_am_tool in
10819   gnutar)
10820     for _am_tar in tar gnutar gtar;
10821     do
10822       AM_RUN_LOG([$_am_tar --version]) && break
10823     done
10824     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10825     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10826     am__untar="$_am_tar -xf -"
10827     ;;
10828   plaintar)
10829     # Must skip GNU tar: if it does not support --format= it doesn't create
10830     # ustar tarball either.
10831     (tar --version) >/dev/null 2>&1 && continue
10832     am__tar='tar chf - "$$tardir"'
10833     am__tar_='tar chf - "$tardir"'
10834     am__untar='tar xf -'
10835     ;;
10836   pax)
10837     am__tar='pax -L -x $1 -w "$$tardir"'
10838     am__tar_='pax -L -x $1 -w "$tardir"'
10839     am__untar='pax -r'
10840     ;;
10841   cpio)
10842     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10843     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10844     am__untar='cpio -i -H $1 -d'
10845     ;;
10846   none)
10847     am__tar=false
10848     am__tar_=false
10849     am__untar=false
10850     ;;
10851   esac
10852
10853   # If the value was cached, stop now.  We just wanted to have am__tar
10854   # and am__untar set.
10855   test -n "${am_cv_prog_tar_$1}" && break
10856
10857   # tar/untar a dummy directory, and stop if the command works
10858   rm -rf conftest.dir
10859   mkdir conftest.dir
10860   echo GrepMe > conftest.dir/file
10861   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10862   rm -rf conftest.dir
10863   if test -s conftest.tar; then
10864     AM_RUN_LOG([$am__untar <conftest.tar])
10865     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10866   fi
10867 done
10868 rm -rf conftest.dir
10869
10870 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10871 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10872 AC_SUBST([am__tar])
10873 AC_SUBST([am__untar])
10874 ]) # _AM_PROG_TAR
10875