]> git.sur5r.net Git - glabels/blob - aclocal.m4
Imported Upstream version 3.2.0
[glabels] / aclocal.m4
1 # generated automatically by aclocal 1.11.6 -*- 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.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf.  It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
23 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
24 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
25 #
26 # This file is free software, distributed under the terms of the GNU
27 # General Public License.  As a special exception to the GNU General
28 # Public License, this file may be distributed as part of a program
29 # that contains a configuration script generated by Autoconf, under
30 # the same distribution terms as the rest of that program.
31 #
32 # This file can be copied and used freely without restrictions.  It can
33 # be used in projects which are not available under the GNU Public License
34 # but which still want to provide support for the GNU gettext functionality.
35 #
36 # Macro to add for using GNU gettext.
37 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
38 #
39 # Modified to never use included libintl. 
40 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
41 #
42 # Major rework to remove unused code
43 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
44 #
45 # Added better handling of ALL_LINGUAS from GNU gettext version 
46 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
47 #
48 # Modified to require ngettext
49 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
50 #
51 # We need this here as well, since someone might use autoconf-2.5x
52 # to configure GLib then an older version to configure a package
53 # using AM_GLIB_GNU_GETTEXT
54 AC_PREREQ(2.53)
55
56 dnl
57 dnl We go to great lengths to make sure that aclocal won't 
58 dnl try to pull in the installed version of these macros
59 dnl when running aclocal in the glib directory.
60 dnl
61 m4_copy([AC_DEFUN],[glib_DEFUN])
62 m4_copy([AC_REQUIRE],[glib_REQUIRE])
63 dnl
64 dnl At the end, if we're not within glib, we'll define the public
65 dnl definitions in terms of our private definitions.
66 dnl
67
68 # GLIB_LC_MESSAGES
69 #--------------------
70 glib_DEFUN([GLIB_LC_MESSAGES],
71   [AC_CHECK_HEADERS([locale.h])
72     if test $ac_cv_header_locale_h = yes; then
73     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
74       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
75        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
76     if test $am_cv_val_LC_MESSAGES = yes; then
77       AC_DEFINE(HAVE_LC_MESSAGES, 1,
78         [Define if your <locale.h> file defines LC_MESSAGES.])
79     fi
80   fi])
81
82 # GLIB_PATH_PROG_WITH_TEST
83 #----------------------------
84 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
85 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
86 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
87 [# Extract the first word of "$2", so it can be a program name with args.
88 set dummy $2; ac_word=[$]2
89 AC_MSG_CHECKING([for $ac_word])
90 AC_CACHE_VAL(ac_cv_path_$1,
91 [case "[$]$1" in
92   /*)
93   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
94   ;;
95   *)
96   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
97   for ac_dir in ifelse([$5], , $PATH, [$5]); do
98     test -z "$ac_dir" && ac_dir=.
99     if test -f $ac_dir/$ac_word; then
100       if [$3]; then
101         ac_cv_path_$1="$ac_dir/$ac_word"
102         break
103       fi
104     fi
105   done
106   IFS="$ac_save_ifs"
107 dnl If no 4th arg is given, leave the cache variable unset,
108 dnl so AC_PATH_PROGS will keep looking.
109 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
110 ])dnl
111   ;;
112 esac])dnl
113 $1="$ac_cv_path_$1"
114 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
115   AC_MSG_RESULT([$]$1)
116 else
117   AC_MSG_RESULT(no)
118 fi
119 AC_SUBST($1)dnl
120 ])
121
122 # GLIB_WITH_NLS
123 #-----------------
124 glib_DEFUN([GLIB_WITH_NLS],
125   dnl NLS is obligatory
126   [USE_NLS=yes
127     AC_SUBST(USE_NLS)
128
129     gt_cv_have_gettext=no
130
131     CATOBJEXT=NONE
132     XGETTEXT=:
133     INTLLIBS=
134
135     AC_CHECK_HEADER(libintl.h,
136      [gt_cv_func_dgettext_libintl="no"
137       libintl_extra_libs=""
138
139       #
140       # First check in libc
141       #
142       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
143         [AC_TRY_LINK([
144 #include <libintl.h>
145 ],
146          [return !ngettext ("","", 1)],
147           gt_cv_func_ngettext_libc=yes,
148           gt_cv_func_ngettext_libc=no)
149         ])
150   
151       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
152               AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
153                 [AC_TRY_LINK([
154 #include <libintl.h>
155 ],
156                   [return !dgettext ("","")],
157                   gt_cv_func_dgettext_libc=yes,
158                   gt_cv_func_dgettext_libc=no)
159                 ])
160       fi
161   
162       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
163         AC_CHECK_FUNCS(bind_textdomain_codeset)
164       fi
165
166       #
167       # If we don't have everything we want, check in libintl
168       #
169       if test "$gt_cv_func_dgettext_libc" != "yes" \
170          || test "$gt_cv_func_ngettext_libc" != "yes" \
171          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
172         
173         AC_CHECK_LIB(intl, bindtextdomain,
174             [AC_CHECK_LIB(intl, ngettext,
175                     [AC_CHECK_LIB(intl, dgettext,
176                                   gt_cv_func_dgettext_libintl=yes)])])
177
178         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
179           AC_MSG_CHECKING([if -liconv is needed to use gettext])
180           AC_MSG_RESULT([])
181           AC_CHECK_LIB(intl, ngettext,
182                 [AC_CHECK_LIB(intl, dcgettext,
183                        [gt_cv_func_dgettext_libintl=yes
184                         libintl_extra_libs=-liconv],
185                         :,-liconv)],
186                 :,-liconv)
187         fi
188
189         #
190         # If we found libintl, then check in it for bind_textdomain_codeset();
191         # we'll prefer libc if neither have bind_textdomain_codeset(),
192         # and both have dgettext and ngettext
193         #
194         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
195           glib_save_LIBS="$LIBS"
196           LIBS="$LIBS -lintl $libintl_extra_libs"
197           unset ac_cv_func_bind_textdomain_codeset
198           AC_CHECK_FUNCS(bind_textdomain_codeset)
199           LIBS="$glib_save_LIBS"
200
201           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
202             gt_cv_func_dgettext_libc=no
203           else
204             if test "$gt_cv_func_dgettext_libc" = "yes" \
205                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
206               gt_cv_func_dgettext_libintl=no
207             fi
208           fi
209         fi
210       fi
211
212       if test "$gt_cv_func_dgettext_libc" = "yes" \
213         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
214         gt_cv_have_gettext=yes
215       fi
216   
217       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
218         INTLLIBS="-lintl $libintl_extra_libs"
219       fi
220   
221       if test "$gt_cv_have_gettext" = "yes"; then
222         AC_DEFINE(HAVE_GETTEXT,1,
223           [Define if the GNU gettext() function is already present or preinstalled.])
224         GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
225           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
226         if test "$MSGFMT" != "no"; then
227           glib_save_LIBS="$LIBS"
228           LIBS="$LIBS $INTLLIBS"
229           AC_CHECK_FUNCS(dcgettext)
230           MSGFMT_OPTS=
231           AC_MSG_CHECKING([if msgfmt accepts -c])
232           GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
233 msgid ""
234 msgstr ""
235 "Content-Type: text/plain; charset=UTF-8\n"
236 "Project-Id-Version: test 1.0\n"
237 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
238 "Last-Translator: test <foo@bar.xx>\n"
239 "Language-Team: C <LL@li.org>\n"
240 "MIME-Version: 1.0\n"
241 "Content-Transfer-Encoding: 8bit\n"
242 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
243           AC_SUBST(MSGFMT_OPTS)
244           AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
245           GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
246             [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
247           AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
248                          return _nl_msg_cat_cntr],
249             [CATOBJEXT=.gmo 
250              DATADIRNAME=share],
251             [case $host in
252             *-*-solaris*)
253             dnl On Solaris, if bind_textdomain_codeset is in libc,
254             dnl GNU format message catalog is always supported,
255             dnl since both are added to the libc all together.
256             dnl Hence, we'd like to go with DATADIRNAME=share and
257             dnl and CATOBJEXT=.gmo in this case.
258             AC_CHECK_FUNC(bind_textdomain_codeset,
259               [CATOBJEXT=.gmo 
260                DATADIRNAME=share],
261               [CATOBJEXT=.mo
262                DATADIRNAME=lib])
263             ;;
264             *-*-openbsd*)
265             CATOBJEXT=.mo
266             DATADIRNAME=share
267             ;;
268             *)
269             CATOBJEXT=.mo
270             DATADIRNAME=lib
271             ;;
272             esac])
273           LIBS="$glib_save_LIBS"
274           INSTOBJEXT=.mo
275         else
276           gt_cv_have_gettext=no
277         fi
278       fi
279     ])
280
281     if test "$gt_cv_have_gettext" = "yes" ; then
282       AC_DEFINE(ENABLE_NLS, 1,
283         [always defined to indicate that i18n is enabled])
284     fi
285
286     dnl Test whether we really found GNU xgettext.
287     if test "$XGETTEXT" != ":"; then
288       dnl If it is not GNU xgettext we define it as : so that the
289       dnl Makefiles still can work.
290       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
291         : ;
292       else
293         AC_MSG_RESULT(
294           [found xgettext program is not GNU xgettext; ignore it])
295         XGETTEXT=":"
296       fi
297     fi
298
299     # We need to process the po/ directory.
300     POSUB=po
301
302     AC_OUTPUT_COMMANDS(
303       [case "$CONFIG_FILES" in *po/Makefile.in*)
304         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
305       esac])
306
307     dnl These rules are solely for the distribution goal.  While doing this
308     dnl we only have to keep exactly one list of the available catalogs
309     dnl in configure.ac.
310     for lang in $ALL_LINGUAS; do
311       GMOFILES="$GMOFILES $lang.gmo"
312       POFILES="$POFILES $lang.po"
313     done
314
315     dnl Make all variables we use known to autoconf.
316     AC_SUBST(CATALOGS)
317     AC_SUBST(CATOBJEXT)
318     AC_SUBST(DATADIRNAME)
319     AC_SUBST(GMOFILES)
320     AC_SUBST(INSTOBJEXT)
321     AC_SUBST(INTLLIBS)
322     AC_SUBST(PO_IN_DATADIR_TRUE)
323     AC_SUBST(PO_IN_DATADIR_FALSE)
324     AC_SUBST(POFILES)
325     AC_SUBST(POSUB)
326   ])
327
328 # AM_GLIB_GNU_GETTEXT
329 # -------------------
330 # Do checks necessary for use of gettext. If a suitable implementation 
331 # of gettext is found in either in libintl or in the C library,
332 # it will set INTLLIBS to the libraries needed for use of gettext
333 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
334 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
335 # on various variables needed by the Makefile.in.in installed by 
336 # glib-gettextize.
337 dnl
338 glib_DEFUN([GLIB_GNU_GETTEXT],
339   [AC_REQUIRE([AC_PROG_CC])dnl
340    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 GLIB_GSETTINGS
603 dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
604 dnl the schema should be compiled
605 dnl
606
607 AC_DEFUN([GLIB_GSETTINGS],
608 [
609   m4_pattern_allow([AM_V_GEN])
610   AC_ARG_ENABLE(schemas-compile,
611                 AS_HELP_STRING([--disable-schemas-compile],
612                                [Disable regeneration of gschemas.compiled on install]),
613                 [case ${enableval} in
614                   yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
615                   no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
616                   *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
617                  esac])
618   AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
619   PKG_PROG_PKG_CONFIG([0.16])
620   AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
621   if test x$cross_compiling != xyes; then
622     GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
623   else
624     AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
625   fi
626   AC_SUBST(GLIB_COMPILE_SCHEMAS)
627   if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
628     ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
629   else
630     ifelse([$1],,[:],[$1])
631   fi
632
633   GSETTINGS_RULES='
634 .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
635
636 mostlyclean-am: clean-gsettings-schemas
637
638 gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
639
640 %.gschema.valid: %.gschema.xml $(gsettings__enum_file)
641         $(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 [$]@
642
643 all-am: $(gsettings_SCHEMAS:.xml=.valid)
644 uninstall-am: uninstall-gsettings-schemas
645 install-data-am: install-gsettings-schemas
646
647 .SECONDARY: $(gsettings_SCHEMAS)
648
649 install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
650         @$(NORMAL_INSTALL)
651         if test -n "$^"; then \
652                 test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
653                 $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
654                 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
655         fi
656
657 uninstall-gsettings-schemas:
658         @$(NORMAL_UNINSTALL)
659         @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
660         files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
661         test -n "$$files" || exit 0; \
662         echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
663         cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
664         test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
665
666 clean-gsettings-schemas:
667         rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
668
669 ifdef gsettings_ENUM_NAMESPACE
670 $(gsettings__enum_file): $(gsettings_ENUM_FILES)
671         $(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 [$]@
672 endif
673 '
674   _GSETTINGS_SUBST(GSETTINGS_RULES)
675 ])
676
677 dnl _GSETTINGS_SUBST(VARIABLE)
678 dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
679 AC_DEFUN([_GSETTINGS_SUBST],
680 [
681 AC_SUBST([$1])
682 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
683 ]
684 )
685
686 dnl -*- mode: autoconf -*-
687
688 # serial 1
689
690 dnl Usage:
691 dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
692 AC_DEFUN([GTK_DOC_CHECK],
693 [
694   AC_REQUIRE([PKG_PROG_PKG_CONFIG])
695   AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
696   AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
697
698   dnl check for tools we added during development
699   AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
700   AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
701   AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
702
703   dnl for overriding the documentation installation directory
704   AC_ARG_WITH([html-dir],
705     AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
706     [with_html_dir='${datadir}/gtk-doc/html'])
707   HTML_DIR="$with_html_dir"
708   AC_SUBST([HTML_DIR])
709
710   dnl enable/disable documentation building
711   AC_ARG_ENABLE([gtk-doc],
712     AS_HELP_STRING([--enable-gtk-doc],
713                    [use gtk-doc to build documentation [[default=no]]]),,
714     [enable_gtk_doc=no])
715
716   if test x$enable_gtk_doc = xyes; then
717     ifelse([$1],[],
718       [PKG_CHECK_EXISTS([gtk-doc],,
719                         AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
720       [PKG_CHECK_EXISTS([gtk-doc >= $1],,
721                         AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
722     dnl don't check for glib if we build glib
723     if test "x$PACKAGE_NAME" != "xglib"; then
724       dnl don't fail if someone does not have glib
725       PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,)
726     fi
727   fi
728
729   AC_MSG_CHECKING([whether to build gtk-doc documentation])
730   AC_MSG_RESULT($enable_gtk_doc)
731
732   dnl enable/disable output formats
733   AC_ARG_ENABLE([gtk-doc-html],
734     AS_HELP_STRING([--enable-gtk-doc-html],
735                    [build documentation in html format [[default=yes]]]),,
736     [enable_gtk_doc_html=yes])
737     AC_ARG_ENABLE([gtk-doc-pdf],
738       AS_HELP_STRING([--enable-gtk-doc-pdf],
739                      [build documentation in pdf format [[default=no]]]),,
740       [enable_gtk_doc_pdf=no])
741
742   if test -z "$GTKDOC_MKPDF"; then
743     enable_gtk_doc_pdf=no
744   fi
745
746
747   AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
748   AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
749   AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
750   AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
751   AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
752 ])
753
754
755 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
756 # serial 42 IT_PROG_INTLTOOL
757 AC_DEFUN([IT_PROG_INTLTOOL], [
758 AC_PREREQ([2.50])dnl
759 AC_REQUIRE([AM_NLS])dnl
760
761 case "$am__api_version" in
762     1.[01234])
763         AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
764     ;;
765     *)
766     ;;
767 esac
768
769 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
770 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
771 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
772 if test -n "$1"; then
773     AC_MSG_CHECKING([for intltool >= $1])
774     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
775     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
776         AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
777 fi
778
779 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
780 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
781 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
782 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
783     AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
784 fi
785
786 if test -z "$AM_DEFAULT_VERBOSITY"; then
787   AM_DEFAULT_VERBOSITY=1
788 fi
789 AC_SUBST([AM_DEFAULT_VERBOSITY])
790
791 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
792 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
793 INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
794 AC_SUBST(INTLTOOL_V_MERGE)
795 AC_SUBST(INTLTOOL__v_MERGE_)
796 AC_SUBST(INTLTOOL__v_MERGE_0)
797
798 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
799 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
800 intltool__v_merge_options_0='-q'
801 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
802 AC_SUBST(intltool__v_merge_options_)
803 AC_SUBST(intltool__v_merge_options_0)
804
805   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 $< [$]@' 
806 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 $< [$]@' 
807      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 $< [$]@' 
808      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 $< [$]@' 
809       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 $< [$]@'
810      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 $< [$]@' 
811    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 $< [$]@' 
812     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 $< [$]@' 
813 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 $< [$]@' 
814        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 $< [$]@' 
815       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 $< [$]@' 
816 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
817       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 $< [$]@'
818 else
819       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'
820 fi
821       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 $< [$]@' 
822       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 $< [$]@' 
823     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 $< [$]@' 
824   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 $< [$]@' 
825     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 $< [$]@' 
826     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 $< [$]@'
827    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 $< [$]@'
828
829 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
830 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
831 _IT_SUBST(INTLTOOL_KEYS_RULE)
832 _IT_SUBST(INTLTOOL_PROP_RULE)
833 _IT_SUBST(INTLTOOL_OAF_RULE)
834 _IT_SUBST(INTLTOOL_PONG_RULE)
835 _IT_SUBST(INTLTOOL_SERVER_RULE)
836 _IT_SUBST(INTLTOOL_SHEET_RULE)
837 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
838 _IT_SUBST(INTLTOOL_UI_RULE)
839 _IT_SUBST(INTLTOOL_XAM_RULE)
840 _IT_SUBST(INTLTOOL_KBD_RULE)
841 _IT_SUBST(INTLTOOL_XML_RULE)
842 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
843 _IT_SUBST(INTLTOOL_CAVES_RULE)
844 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
845 _IT_SUBST(INTLTOOL_THEME_RULE)
846 _IT_SUBST(INTLTOOL_SERVICE_RULE)
847 _IT_SUBST(INTLTOOL_POLICY_RULE)
848
849 # Check the gettext tools to make sure they are GNU
850 AC_PATH_PROG(XGETTEXT, xgettext)
851 AC_PATH_PROG(MSGMERGE, msgmerge)
852 AC_PATH_PROG(MSGFMT, msgfmt)
853 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
854 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
855     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
856 fi
857 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
858 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
859 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
860 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
861     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
862 fi
863
864 AC_PATH_PROG(INTLTOOL_PERL, perl)
865 if test -z "$INTLTOOL_PERL"; then
866    AC_MSG_ERROR([perl not found])
867 fi
868 AC_MSG_CHECKING([for perl >= 5.8.1])
869 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
870 if test $? -ne 0; then
871    AC_MSG_ERROR([perl 5.8.1 is required for intltool])
872 else
873    IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
874    AC_MSG_RESULT([$IT_PERL_VERSION])
875 fi
876 if test "x$2" != "xno-xml"; then
877    AC_MSG_CHECKING([for XML::Parser])
878    if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
879        AC_MSG_RESULT([ok])
880    else
881        AC_MSG_ERROR([XML::Parser perl module is required for intltool])
882    fi
883 fi
884
885 # Substitute ALL_LINGUAS so we can use it in po/Makefile
886 AC_SUBST(ALL_LINGUAS)
887
888 # Set DATADIRNAME correctly if it is not set yet
889 # (copied from glib-gettext.m4)
890 if test -z "$DATADIRNAME"; then
891   AC_LINK_IFELSE(
892     [AC_LANG_PROGRAM([[]],
893                      [[extern int _nl_msg_cat_cntr;
894                        return _nl_msg_cat_cntr]])],
895     [DATADIRNAME=share],
896     [case $host in
897     *-*-solaris*)
898     dnl On Solaris, if bind_textdomain_codeset is in libc,
899     dnl GNU format message catalog is always supported,
900     dnl since both are added to the libc all together.
901     dnl Hence, we'd like to go with DATADIRNAME=share
902     dnl in this case.
903     AC_CHECK_FUNC(bind_textdomain_codeset,
904       [DATADIRNAME=share], [DATADIRNAME=lib])
905     ;;
906     *)
907     [DATADIRNAME=lib]
908     ;;
909     esac])
910 fi
911 AC_SUBST(DATADIRNAME)
912
913 IT_PO_SUBDIR([po])
914
915 ])
916
917
918 # IT_PO_SUBDIR(DIRNAME)
919 # ---------------------
920 # All po subdirs have to be declared with this macro; the subdir "po" is
921 # declared by IT_PROG_INTLTOOL.
922 #
923 AC_DEFUN([IT_PO_SUBDIR],
924 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
925 dnl
926 dnl The following CONFIG_COMMANDS should be executed at the very end
927 dnl of config.status.
928 AC_CONFIG_COMMANDS_PRE([
929   AC_CONFIG_COMMANDS([$1/stamp-it], [
930     if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
931        AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
932     fi
933     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
934     >"$1/stamp-it.tmp"
935     [sed '/^#/d
936          s/^[[].*] *//
937          /^[    ]*$/d
938         '"s|^|  $ac_top_srcdir/|" \
939       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
940     ]
941     [sed '/^POTFILES =/,/[^\\]$/ {
942                 /^POTFILES =/!d
943                 r $1/POTFILES
944           }
945          ' "$1/Makefile.in" >"$1/Makefile"]
946     rm -f "$1/Makefile.tmp"
947     mv "$1/stamp-it.tmp" "$1/stamp-it"
948   ])
949 ])dnl
950 ])
951
952 # _IT_SUBST(VARIABLE)
953 # -------------------
954 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
955 #
956 AC_DEFUN([_IT_SUBST],
957 [
958 AC_SUBST([$1])
959 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
960 ]
961 )
962
963 # deprecated macros
964 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
965 # A hint is needed for aclocal from Automake <= 1.9.4:
966 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
967
968
969 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
970 #
971 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
972 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
973 #                 Foundation, Inc.
974 #   Written by Gordon Matzigkeit, 1996
975 #
976 # This file is free software; the Free Software Foundation gives
977 # unlimited permission to copy and/or distribute it, with or without
978 # modifications, as long as this notice is preserved.
979
980 m4_define([_LT_COPYING], [dnl
981 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
982 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
983 #                 Foundation, Inc.
984 #   Written by Gordon Matzigkeit, 1996
985 #
986 #   This file is part of GNU Libtool.
987 #
988 # GNU Libtool is free software; you can redistribute it and/or
989 # modify it under the terms of the GNU General Public License as
990 # published by the Free Software Foundation; either version 2 of
991 # the License, or (at your option) any later version.
992 #
993 # As a special exception to the GNU General Public License,
994 # if you distribute this file as part of a program or library that
995 # is built using GNU Libtool, you may include this file under the
996 # same distribution terms that you use for the rest of that program.
997 #
998 # GNU Libtool is distributed in the hope that it will be useful,
999 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1000 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1001 # GNU General Public License for more details.
1002 #
1003 # You should have received a copy of the GNU General Public License
1004 # along with GNU Libtool; see the file COPYING.  If not, a copy
1005 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1006 # obtained by writing to the Free Software Foundation, Inc.,
1007 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1008 ])
1009
1010 # serial 57 LT_INIT
1011
1012
1013 # LT_PREREQ(VERSION)
1014 # ------------------
1015 # Complain and exit if this libtool version is less that VERSION.
1016 m4_defun([LT_PREREQ],
1017 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1018        [m4_default([$3],
1019                    [m4_fatal([Libtool version $1 or higher is required],
1020                              63)])],
1021        [$2])])
1022
1023
1024 # _LT_CHECK_BUILDDIR
1025 # ------------------
1026 # Complain if the absolute build directory name contains unusual characters
1027 m4_defun([_LT_CHECK_BUILDDIR],
1028 [case `pwd` in
1029   *\ * | *\     *)
1030     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1031 esac
1032 ])
1033
1034
1035 # LT_INIT([OPTIONS])
1036 # ------------------
1037 AC_DEFUN([LT_INIT],
1038 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1039 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1040 AC_BEFORE([$0], [LT_LANG])dnl
1041 AC_BEFORE([$0], [LT_OUTPUT])dnl
1042 AC_BEFORE([$0], [LTDL_INIT])dnl
1043 m4_require([_LT_CHECK_BUILDDIR])dnl
1044
1045 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1046 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1047 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1048 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1049 dnl unless we require an AC_DEFUNed macro:
1050 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1051 AC_REQUIRE([LTSUGAR_VERSION])dnl
1052 AC_REQUIRE([LTVERSION_VERSION])dnl
1053 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1054 m4_require([_LT_PROG_LTMAIN])dnl
1055
1056 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1057
1058 dnl Parse OPTIONS
1059 _LT_SET_OPTIONS([$0], [$1])
1060
1061 # This can be used to rebuild libtool when needed
1062 LIBTOOL_DEPS="$ltmain"
1063
1064 # Always use our own libtool.
1065 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1066 AC_SUBST(LIBTOOL)dnl
1067
1068 _LT_SETUP
1069
1070 # Only expand once:
1071 m4_define([LT_INIT])
1072 ])# LT_INIT
1073
1074 # Old names:
1075 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1076 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1077 dnl aclocal-1.4 backwards compatibility:
1078 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1079 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1080
1081
1082 # _LT_CC_BASENAME(CC)
1083 # -------------------
1084 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1085 m4_defun([_LT_CC_BASENAME],
1086 [for cc_temp in $1""; do
1087   case $cc_temp in
1088     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1089     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1090     \-*) ;;
1091     *) break;;
1092   esac
1093 done
1094 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1095 ])
1096
1097
1098 # _LT_FILEUTILS_DEFAULTS
1099 # ----------------------
1100 # It is okay to use these file commands and assume they have been set
1101 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1102 m4_defun([_LT_FILEUTILS_DEFAULTS],
1103 [: ${CP="cp -f"}
1104 : ${MV="mv -f"}
1105 : ${RM="rm -f"}
1106 ])# _LT_FILEUTILS_DEFAULTS
1107
1108
1109 # _LT_SETUP
1110 # ---------
1111 m4_defun([_LT_SETUP],
1112 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1113 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1114 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1115 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1116
1117 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1118 dnl
1119 _LT_DECL([], [host_alias], [0], [The host system])dnl
1120 _LT_DECL([], [host], [0])dnl
1121 _LT_DECL([], [host_os], [0])dnl
1122 dnl
1123 _LT_DECL([], [build_alias], [0], [The build system])dnl
1124 _LT_DECL([], [build], [0])dnl
1125 _LT_DECL([], [build_os], [0])dnl
1126 dnl
1127 AC_REQUIRE([AC_PROG_CC])dnl
1128 AC_REQUIRE([LT_PATH_LD])dnl
1129 AC_REQUIRE([LT_PATH_NM])dnl
1130 dnl
1131 AC_REQUIRE([AC_PROG_LN_S])dnl
1132 test -z "$LN_S" && LN_S="ln -s"
1133 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1134 dnl
1135 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1136 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1137 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1138 dnl
1139 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1140 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1141 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1142 m4_require([_LT_CMD_RELOAD])dnl
1143 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1144 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1145 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1146 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1147 m4_require([_LT_WITH_SYSROOT])dnl
1148
1149 _LT_CONFIG_LIBTOOL_INIT([
1150 # See if we are running on zsh, and set the options which allow our
1151 # commands through without removal of \ escapes INIT.
1152 if test -n "\${ZSH_VERSION+set}" ; then
1153    setopt NO_GLOB_SUBST
1154 fi
1155 ])
1156 if test -n "${ZSH_VERSION+set}" ; then
1157    setopt NO_GLOB_SUBST
1158 fi
1159
1160 _LT_CHECK_OBJDIR
1161
1162 m4_require([_LT_TAG_COMPILER])dnl
1163
1164 case $host_os in
1165 aix3*)
1166   # AIX sometimes has problems with the GCC collect2 program.  For some
1167   # reason, if we set the COLLECT_NAMES environment variable, the problems
1168   # vanish in a puff of smoke.
1169   if test "X${COLLECT_NAMES+set}" != Xset; then
1170     COLLECT_NAMES=
1171     export COLLECT_NAMES
1172   fi
1173   ;;
1174 esac
1175
1176 # Global variables:
1177 ofile=libtool
1178 can_build_shared=yes
1179
1180 # All known linkers require a `.a' archive for static linking (except MSVC,
1181 # which needs '.lib').
1182 libext=a
1183
1184 with_gnu_ld="$lt_cv_prog_gnu_ld"
1185
1186 old_CC="$CC"
1187 old_CFLAGS="$CFLAGS"
1188
1189 # Set sane defaults for various variables
1190 test -z "$CC" && CC=cc
1191 test -z "$LTCC" && LTCC=$CC
1192 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1193 test -z "$LD" && LD=ld
1194 test -z "$ac_objext" && ac_objext=o
1195
1196 _LT_CC_BASENAME([$compiler])
1197
1198 # Only perform the check for file, if the check method requires it
1199 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1200 case $deplibs_check_method in
1201 file_magic*)
1202   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1203     _LT_PATH_MAGIC
1204   fi
1205   ;;
1206 esac
1207
1208 # Use C for the default configuration in the libtool script
1209 LT_SUPPORTED_TAG([CC])
1210 _LT_LANG_C_CONFIG
1211 _LT_LANG_DEFAULT_CONFIG
1212 _LT_CONFIG_COMMANDS
1213 ])# _LT_SETUP
1214
1215
1216 # _LT_PREPARE_SED_QUOTE_VARS
1217 # --------------------------
1218 # Define a few sed substitution that help us do robust quoting.
1219 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1220 [# Backslashify metacharacters that are still active within
1221 # double-quoted strings.
1222 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1223
1224 # Same as above, but do not quote variable references.
1225 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1226
1227 # Sed substitution to delay expansion of an escaped shell variable in a
1228 # double_quote_subst'ed string.
1229 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1230
1231 # Sed substitution to delay expansion of an escaped single quote.
1232 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1233
1234 # Sed substitution to avoid accidental globbing in evaled expressions
1235 no_glob_subst='s/\*/\\\*/g'
1236 ])
1237
1238 # _LT_PROG_LTMAIN
1239 # ---------------
1240 # Note that this code is called both from `configure', and `config.status'
1241 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1242 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1243 # so we pass a copy along to make sure it has a sensible value anyway.
1244 m4_defun([_LT_PROG_LTMAIN],
1245 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1246 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1247 ltmain="$ac_aux_dir/ltmain.sh"
1248 ])# _LT_PROG_LTMAIN
1249
1250
1251
1252 # So that we can recreate a full libtool script including additional
1253 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1254 # in macros and then make a single call at the end using the `libtool'
1255 # label.
1256
1257
1258 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1259 # ----------------------------------------
1260 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1261 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1262 [m4_ifval([$1],
1263           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1264                      [$1
1265 ])])])
1266
1267 # Initialize.
1268 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1269
1270
1271 # _LT_CONFIG_LIBTOOL([COMMANDS])
1272 # ------------------------------
1273 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1274 m4_define([_LT_CONFIG_LIBTOOL],
1275 [m4_ifval([$1],
1276           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1277                      [$1
1278 ])])])
1279
1280 # Initialize.
1281 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1282
1283
1284 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1285 # -----------------------------------------------------
1286 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1287 [_LT_CONFIG_LIBTOOL([$1])
1288 _LT_CONFIG_LIBTOOL_INIT([$2])
1289 ])
1290
1291
1292 # _LT_FORMAT_COMMENT([COMMENT])
1293 # -----------------------------
1294 # Add leading comment marks to the start of each line, and a trailing
1295 # full-stop to the whole comment if one is not present already.
1296 m4_define([_LT_FORMAT_COMMENT],
1297 [m4_ifval([$1], [
1298 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1299               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1300 )])
1301
1302
1303
1304
1305
1306 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1307 # -------------------------------------------------------------------
1308 # CONFIGNAME is the name given to the value in the libtool script.
1309 # VARNAME is the (base) name used in the configure script.
1310 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1311 # VARNAME.  Any other value will be used directly.
1312 m4_define([_LT_DECL],
1313 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1314     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1315         [m4_ifval([$1], [$1], [$2])])
1316     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1317     m4_ifval([$4],
1318         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1319     lt_dict_add_subkey([lt_decl_dict], [$2],
1320         [tagged?], [m4_ifval([$5], [yes], [no])])])
1321 ])
1322
1323
1324 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1325 # --------------------------------------------------------
1326 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1327
1328
1329 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1330 # ------------------------------------------------
1331 m4_define([lt_decl_tag_varnames],
1332 [_lt_decl_filter([tagged?], [yes], $@)])
1333
1334
1335 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1336 # ---------------------------------------------------------
1337 m4_define([_lt_decl_filter],
1338 [m4_case([$#],
1339   [0], [m4_fatal([$0: too few arguments: $#])],
1340   [1], [m4_fatal([$0: too few arguments: $#: $1])],
1341   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1342   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1343   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1344 ])
1345
1346
1347 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1348 # --------------------------------------------------
1349 m4_define([lt_decl_quote_varnames],
1350 [_lt_decl_filter([value], [1], $@)])
1351
1352
1353 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1354 # ---------------------------------------------------
1355 m4_define([lt_decl_dquote_varnames],
1356 [_lt_decl_filter([value], [2], $@)])
1357
1358
1359 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1360 # ---------------------------------------------------
1361 m4_define([lt_decl_varnames_tagged],
1362 [m4_assert([$# <= 2])dnl
1363 _$0(m4_quote(m4_default([$1], [[, ]])),
1364     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1365     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1366 m4_define([_lt_decl_varnames_tagged],
1367 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1368
1369
1370 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1371 # ------------------------------------------------
1372 m4_define([lt_decl_all_varnames],
1373 [_$0(m4_quote(m4_default([$1], [[, ]])),
1374      m4_if([$2], [],
1375            m4_quote(lt_decl_varnames),
1376         m4_quote(m4_shift($@))))[]dnl
1377 ])
1378 m4_define([_lt_decl_all_varnames],
1379 [lt_join($@, lt_decl_varnames_tagged([$1],
1380                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1381 ])
1382
1383
1384 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1385 # ------------------------------------
1386 # Quote a variable value, and forward it to `config.status' so that its
1387 # declaration there will have the same value as in `configure'.  VARNAME
1388 # must have a single quote delimited value for this to work.
1389 m4_define([_LT_CONFIG_STATUS_DECLARE],
1390 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1391
1392
1393 # _LT_CONFIG_STATUS_DECLARATIONS
1394 # ------------------------------
1395 # We delimit libtool config variables with single quotes, so when
1396 # we write them to config.status, we have to be sure to quote all
1397 # embedded single quotes properly.  In configure, this macro expands
1398 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1399 #
1400 #    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1401 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1402 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1403     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1404
1405
1406 # _LT_LIBTOOL_TAGS
1407 # ----------------
1408 # Output comment and list of tags supported by the script
1409 m4_defun([_LT_LIBTOOL_TAGS],
1410 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1411 available_tags="_LT_TAGS"dnl
1412 ])
1413
1414
1415 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1416 # -----------------------------------
1417 # Extract the dictionary values for VARNAME (optionally with TAG) and
1418 # expand to a commented shell variable setting:
1419 #
1420 #    # Some comment about what VAR is for.
1421 #    visible_name=$lt_internal_name
1422 m4_define([_LT_LIBTOOL_DECLARE],
1423 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1424                                            [description])))[]dnl
1425 m4_pushdef([_libtool_name],
1426     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1427 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1428     [0], [_libtool_name=[$]$1],
1429     [1], [_libtool_name=$lt_[]$1],
1430     [2], [_libtool_name=$lt_[]$1],
1431     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1432 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1433 ])
1434
1435
1436 # _LT_LIBTOOL_CONFIG_VARS
1437 # -----------------------
1438 # Produce commented declarations of non-tagged libtool config variables
1439 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1440 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1441 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1442 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1443 [m4_foreach([_lt_var],
1444     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1445     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1446
1447
1448 # _LT_LIBTOOL_TAG_VARS(TAG)
1449 # -------------------------
1450 m4_define([_LT_LIBTOOL_TAG_VARS],
1451 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1452     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1453
1454
1455 # _LT_TAGVAR(VARNAME, [TAGNAME])
1456 # ------------------------------
1457 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1458
1459
1460 # _LT_CONFIG_COMMANDS
1461 # -------------------
1462 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1463 # variables for single and double quote escaping we saved from calls
1464 # to _LT_DECL, we can put quote escaped variables declarations
1465 # into `config.status', and then the shell code to quote escape them in
1466 # for loops in `config.status'.  Finally, any additional code accumulated
1467 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1468 m4_defun([_LT_CONFIG_COMMANDS],
1469 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1470         dnl If the libtool generation code has been placed in $CONFIG_LT,
1471         dnl instead of duplicating it all over again into config.status,
1472         dnl then we will have config.status run $CONFIG_LT later, so it
1473         dnl needs to know what name is stored there:
1474         [AC_CONFIG_COMMANDS([libtool],
1475             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1476     dnl If the libtool generation code is destined for config.status,
1477     dnl expand the accumulated commands and init code now:
1478     [AC_CONFIG_COMMANDS([libtool],
1479         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1480 ])#_LT_CONFIG_COMMANDS
1481
1482
1483 # Initialize.
1484 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1485 [
1486
1487 # The HP-UX ksh and POSIX shell print the target directory to stdout
1488 # if CDPATH is set.
1489 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1490
1491 sed_quote_subst='$sed_quote_subst'
1492 double_quote_subst='$double_quote_subst'
1493 delay_variable_subst='$delay_variable_subst'
1494 _LT_CONFIG_STATUS_DECLARATIONS
1495 LTCC='$LTCC'
1496 LTCFLAGS='$LTCFLAGS'
1497 compiler='$compiler_DEFAULT'
1498
1499 # A function that is used when there is no print builtin or printf.
1500 func_fallback_echo ()
1501 {
1502   eval 'cat <<_LTECHO_EOF
1503 \$[]1
1504 _LTECHO_EOF'
1505 }
1506
1507 # Quote evaled strings.
1508 for var in lt_decl_all_varnames([[ \
1509 ]], lt_decl_quote_varnames); do
1510     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1511     *[[\\\\\\\`\\"\\\$]]*)
1512       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1513       ;;
1514     *)
1515       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1516       ;;
1517     esac
1518 done
1519
1520 # Double-quote double-evaled strings.
1521 for var in lt_decl_all_varnames([[ \
1522 ]], lt_decl_dquote_varnames); do
1523     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1524     *[[\\\\\\\`\\"\\\$]]*)
1525       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1526       ;;
1527     *)
1528       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1529       ;;
1530     esac
1531 done
1532
1533 _LT_OUTPUT_LIBTOOL_INIT
1534 ])
1535
1536 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1537 # ------------------------------------
1538 # Generate a child script FILE with all initialization necessary to
1539 # reuse the environment learned by the parent script, and make the
1540 # file executable.  If COMMENT is supplied, it is inserted after the
1541 # `#!' sequence but before initialization text begins.  After this
1542 # macro, additional text can be appended to FILE to form the body of
1543 # the child script.  The macro ends with non-zero status if the
1544 # file could not be fully written (such as if the disk is full).
1545 m4_ifdef([AS_INIT_GENERATED],
1546 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1547 [m4_defun([_LT_GENERATED_FILE_INIT],
1548 [m4_require([AS_PREPARE])]dnl
1549 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1550 [lt_write_fail=0
1551 cat >$1 <<_ASEOF || lt_write_fail=1
1552 #! $SHELL
1553 # Generated by $as_me.
1554 $2
1555 SHELL=\${CONFIG_SHELL-$SHELL}
1556 export SHELL
1557 _ASEOF
1558 cat >>$1 <<\_ASEOF || lt_write_fail=1
1559 AS_SHELL_SANITIZE
1560 _AS_PREPARE
1561 exec AS_MESSAGE_FD>&1
1562 _ASEOF
1563 test $lt_write_fail = 0 && chmod +x $1[]dnl
1564 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1565
1566 # LT_OUTPUT
1567 # ---------
1568 # This macro allows early generation of the libtool script (before
1569 # AC_OUTPUT is called), incase it is used in configure for compilation
1570 # tests.
1571 AC_DEFUN([LT_OUTPUT],
1572 [: ${CONFIG_LT=./config.lt}
1573 AC_MSG_NOTICE([creating $CONFIG_LT])
1574 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1575 [# Run this file to recreate a libtool stub with the current configuration.])
1576
1577 cat >>"$CONFIG_LT" <<\_LTEOF
1578 lt_cl_silent=false
1579 exec AS_MESSAGE_LOG_FD>>config.log
1580 {
1581   echo
1582   AS_BOX([Running $as_me.])
1583 } >&AS_MESSAGE_LOG_FD
1584
1585 lt_cl_help="\
1586 \`$as_me' creates a local libtool stub from the current configuration,
1587 for use in further configure time tests before the real libtool is
1588 generated.
1589
1590 Usage: $[0] [[OPTIONS]]
1591
1592   -h, --help      print this help, then exit
1593   -V, --version   print version number, then exit
1594   -q, --quiet     do not print progress messages
1595   -d, --debug     don't remove temporary files
1596
1597 Report bugs to <bug-libtool@gnu.org>."
1598
1599 lt_cl_version="\
1600 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1601 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1602 configured by $[0], generated by m4_PACKAGE_STRING.
1603
1604 Copyright (C) 2011 Free Software Foundation, Inc.
1605 This config.lt script is free software; the Free Software Foundation
1606 gives unlimited permision to copy, distribute and modify it."
1607
1608 while test $[#] != 0
1609 do
1610   case $[1] in
1611     --version | --v* | -V )
1612       echo "$lt_cl_version"; exit 0 ;;
1613     --help | --h* | -h )
1614       echo "$lt_cl_help"; exit 0 ;;
1615     --debug | --d* | -d )
1616       debug=: ;;
1617     --quiet | --q* | --silent | --s* | -q )
1618       lt_cl_silent=: ;;
1619
1620     -*) AC_MSG_ERROR([unrecognized option: $[1]
1621 Try \`$[0] --help' for more information.]) ;;
1622
1623     *) AC_MSG_ERROR([unrecognized argument: $[1]
1624 Try \`$[0] --help' for more information.]) ;;
1625   esac
1626   shift
1627 done
1628
1629 if $lt_cl_silent; then
1630   exec AS_MESSAGE_FD>/dev/null
1631 fi
1632 _LTEOF
1633
1634 cat >>"$CONFIG_LT" <<_LTEOF
1635 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1636 _LTEOF
1637
1638 cat >>"$CONFIG_LT" <<\_LTEOF
1639 AC_MSG_NOTICE([creating $ofile])
1640 _LT_OUTPUT_LIBTOOL_COMMANDS
1641 AS_EXIT(0)
1642 _LTEOF
1643 chmod +x "$CONFIG_LT"
1644
1645 # configure is writing to config.log, but config.lt does its own redirection,
1646 # appending to config.log, which fails on DOS, as config.log is still kept
1647 # open by configure.  Here we exec the FD to /dev/null, effectively closing
1648 # config.log, so it can be properly (re)opened and appended to by config.lt.
1649 lt_cl_success=:
1650 test "$silent" = yes &&
1651   lt_config_lt_args="$lt_config_lt_args --quiet"
1652 exec AS_MESSAGE_LOG_FD>/dev/null
1653 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1654 exec AS_MESSAGE_LOG_FD>>config.log
1655 $lt_cl_success || AS_EXIT(1)
1656 ])# LT_OUTPUT
1657
1658
1659 # _LT_CONFIG(TAG)
1660 # ---------------
1661 # If TAG is the built-in tag, create an initial libtool script with a
1662 # default configuration from the untagged config vars.  Otherwise add code
1663 # to config.status for appending the configuration named by TAG from the
1664 # matching tagged config vars.
1665 m4_defun([_LT_CONFIG],
1666 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1667 _LT_CONFIG_SAVE_COMMANDS([
1668   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1669   m4_if(_LT_TAG, [C], [
1670     # See if we are running on zsh, and set the options which allow our
1671     # commands through without removal of \ escapes.
1672     if test -n "${ZSH_VERSION+set}" ; then
1673       setopt NO_GLOB_SUBST
1674     fi
1675
1676     cfgfile="${ofile}T"
1677     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1678     $RM "$cfgfile"
1679
1680     cat <<_LT_EOF >> "$cfgfile"
1681 #! $SHELL
1682
1683 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1684 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1685 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1686 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1687 #
1688 _LT_COPYING
1689 _LT_LIBTOOL_TAGS
1690
1691 # ### BEGIN LIBTOOL CONFIG
1692 _LT_LIBTOOL_CONFIG_VARS
1693 _LT_LIBTOOL_TAG_VARS
1694 # ### END LIBTOOL CONFIG
1695
1696 _LT_EOF
1697
1698   case $host_os in
1699   aix3*)
1700     cat <<\_LT_EOF >> "$cfgfile"
1701 # AIX sometimes has problems with the GCC collect2 program.  For some
1702 # reason, if we set the COLLECT_NAMES environment variable, the problems
1703 # vanish in a puff of smoke.
1704 if test "X${COLLECT_NAMES+set}" != Xset; then
1705   COLLECT_NAMES=
1706   export COLLECT_NAMES
1707 fi
1708 _LT_EOF
1709     ;;
1710   esac
1711
1712   _LT_PROG_LTMAIN
1713
1714   # We use sed instead of cat because bash on DJGPP gets confused if
1715   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1716   # text mode, it properly converts lines to CR/LF.  This bash problem
1717   # is reportedly fixed, but why not run on old versions too?
1718   sed '$q' "$ltmain" >> "$cfgfile" \
1719      || (rm -f "$cfgfile"; exit 1)
1720
1721   _LT_PROG_REPLACE_SHELLFNS
1722
1723    mv -f "$cfgfile" "$ofile" ||
1724     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1725   chmod +x "$ofile"
1726 ],
1727 [cat <<_LT_EOF >> "$ofile"
1728
1729 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1730 dnl in a comment (ie after a #).
1731 # ### BEGIN LIBTOOL TAG CONFIG: $1
1732 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
1733 # ### END LIBTOOL TAG CONFIG: $1
1734 _LT_EOF
1735 ])dnl /m4_if
1736 ],
1737 [m4_if([$1], [], [
1738     PACKAGE='$PACKAGE'
1739     VERSION='$VERSION'
1740     TIMESTAMP='$TIMESTAMP'
1741     RM='$RM'
1742     ofile='$ofile'], [])
1743 ])dnl /_LT_CONFIG_SAVE_COMMANDS
1744 ])# _LT_CONFIG
1745
1746
1747 # LT_SUPPORTED_TAG(TAG)
1748 # ---------------------
1749 # Trace this macro to discover what tags are supported by the libtool
1750 # --tag option, using:
1751 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1752 AC_DEFUN([LT_SUPPORTED_TAG], [])
1753
1754
1755 # C support is built-in for now
1756 m4_define([_LT_LANG_C_enabled], [])
1757 m4_define([_LT_TAGS], [])
1758
1759
1760 # LT_LANG(LANG)
1761 # -------------
1762 # Enable libtool support for the given language if not already enabled.
1763 AC_DEFUN([LT_LANG],
1764 [AC_BEFORE([$0], [LT_OUTPUT])dnl
1765 m4_case([$1],
1766   [C],                  [_LT_LANG(C)],
1767   [C++],                [_LT_LANG(CXX)],
1768   [Go],                 [_LT_LANG(GO)],
1769   [Java],               [_LT_LANG(GCJ)],
1770   [Fortran 77],         [_LT_LANG(F77)],
1771   [Fortran],            [_LT_LANG(FC)],
1772   [Windows Resource],   [_LT_LANG(RC)],
1773   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1774     [_LT_LANG($1)],
1775     [m4_fatal([$0: unsupported language: "$1"])])])dnl
1776 ])# LT_LANG
1777
1778
1779 # _LT_LANG(LANGNAME)
1780 # ------------------
1781 m4_defun([_LT_LANG],
1782 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
1783   [LT_SUPPORTED_TAG([$1])dnl
1784   m4_append([_LT_TAGS], [$1 ])dnl
1785   m4_define([_LT_LANG_]$1[_enabled], [])dnl
1786   _LT_LANG_$1_CONFIG($1)])dnl
1787 ])# _LT_LANG
1788
1789
1790 m4_ifndef([AC_PROG_GO], [
1791 # NOTE: This macro has been submitted for inclusion into   #
1792 #  GNU Autoconf as AC_PROG_GO.  When it is available in    #
1793 #  a released version of Autoconf we should remove this    #
1794 #  macro and use it instead.                               #
1795 m4_defun([AC_PROG_GO],
1796 [AC_LANG_PUSH(Go)dnl
1797 AC_ARG_VAR([GOC],     [Go compiler command])dnl
1798 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1799 _AC_ARG_VAR_LDFLAGS()dnl
1800 AC_CHECK_TOOL(GOC, gccgo)
1801 if test -z "$GOC"; then
1802   if test -n "$ac_tool_prefix"; then
1803     AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1804   fi
1805 fi
1806 if test -z "$GOC"; then
1807   AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1808 fi
1809 ])#m4_defun
1810 ])#m4_ifndef
1811
1812
1813 # _LT_LANG_DEFAULT_CONFIG
1814 # -----------------------
1815 m4_defun([_LT_LANG_DEFAULT_CONFIG],
1816 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
1817   [LT_LANG(CXX)],
1818   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1819
1820 AC_PROVIDE_IFELSE([AC_PROG_F77],
1821   [LT_LANG(F77)],
1822   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1823
1824 AC_PROVIDE_IFELSE([AC_PROG_FC],
1825   [LT_LANG(FC)],
1826   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1827
1828 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1829 dnl pulling things in needlessly.
1830 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1831   [LT_LANG(GCJ)],
1832   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1833     [LT_LANG(GCJ)],
1834     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1835       [LT_LANG(GCJ)],
1836       [m4_ifdef([AC_PROG_GCJ],
1837         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1838        m4_ifdef([A][M_PROG_GCJ],
1839         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1840        m4_ifdef([LT_PROG_GCJ],
1841         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1842
1843 AC_PROVIDE_IFELSE([AC_PROG_GO],
1844   [LT_LANG(GO)],
1845   [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
1846
1847 AC_PROVIDE_IFELSE([LT_PROG_RC],
1848   [LT_LANG(RC)],
1849   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1850 ])# _LT_LANG_DEFAULT_CONFIG
1851
1852 # Obsolete macros:
1853 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1854 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1855 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1856 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1857 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1858 dnl aclocal-1.4 backwards compatibility:
1859 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1860 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1861 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1862 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1863 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1864
1865
1866 # _LT_TAG_COMPILER
1867 # ----------------
1868 m4_defun([_LT_TAG_COMPILER],
1869 [AC_REQUIRE([AC_PROG_CC])dnl
1870
1871 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1872 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1873 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1874 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1875
1876 # If no C compiler was specified, use CC.
1877 LTCC=${LTCC-"$CC"}
1878
1879 # If no C compiler flags were specified, use CFLAGS.
1880 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1881
1882 # Allow CC to be a program name with arguments.
1883 compiler=$CC
1884 ])# _LT_TAG_COMPILER
1885
1886
1887 # _LT_COMPILER_BOILERPLATE
1888 # ------------------------
1889 # Check for compiler boilerplate output or warnings with
1890 # the simple compiler test code.
1891 m4_defun([_LT_COMPILER_BOILERPLATE],
1892 [m4_require([_LT_DECL_SED])dnl
1893 ac_outfile=conftest.$ac_objext
1894 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1895 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1896 _lt_compiler_boilerplate=`cat conftest.err`
1897 $RM conftest*
1898 ])# _LT_COMPILER_BOILERPLATE
1899
1900
1901 # _LT_LINKER_BOILERPLATE
1902 # ----------------------
1903 # Check for linker boilerplate output or warnings with
1904 # the simple link test code.
1905 m4_defun([_LT_LINKER_BOILERPLATE],
1906 [m4_require([_LT_DECL_SED])dnl
1907 ac_outfile=conftest.$ac_objext
1908 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1909 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1910 _lt_linker_boilerplate=`cat conftest.err`
1911 $RM -r conftest*
1912 ])# _LT_LINKER_BOILERPLATE
1913
1914 # _LT_REQUIRED_DARWIN_CHECKS
1915 # -------------------------
1916 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1917   case $host_os in
1918     rhapsody* | darwin*)
1919     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1920     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1921     AC_CHECK_TOOL([LIPO], [lipo], [:])
1922     AC_CHECK_TOOL([OTOOL], [otool], [:])
1923     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1924     _LT_DECL([], [DSYMUTIL], [1],
1925       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1926     _LT_DECL([], [NMEDIT], [1],
1927       [Tool to change global to local symbols on Mac OS X])
1928     _LT_DECL([], [LIPO], [1],
1929       [Tool to manipulate fat objects and archives on Mac OS X])
1930     _LT_DECL([], [OTOOL], [1],
1931       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1932     _LT_DECL([], [OTOOL64], [1],
1933       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1934
1935     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1936       [lt_cv_apple_cc_single_mod=no
1937       if test -z "${LT_MULTI_MODULE}"; then
1938         # By default we will add the -single_module flag. You can override
1939         # by either setting the environment variable LT_MULTI_MODULE
1940         # non-empty at configure time, or by adding -multi_module to the
1941         # link flags.
1942         rm -rf libconftest.dylib*
1943         echo "int foo(void){return 1;}" > conftest.c
1944         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1945 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1946         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1947           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1948         _lt_result=$?
1949         # If there is a non-empty error log, and "single_module"
1950         # appears in it, assume the flag caused a linker warning
1951         if test -s conftest.err && $GREP single_module conftest.err; then
1952           cat conftest.err >&AS_MESSAGE_LOG_FD
1953         # Otherwise, if the output was created with a 0 exit code from
1954         # the compiler, it worked.
1955         elif test -f libconftest.dylib && test $_lt_result -eq 0; then
1956           lt_cv_apple_cc_single_mod=yes
1957         else
1958           cat conftest.err >&AS_MESSAGE_LOG_FD
1959         fi
1960         rm -rf libconftest.dylib*
1961         rm -f conftest.*
1962       fi])
1963
1964     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1965       [lt_cv_ld_exported_symbols_list],
1966       [lt_cv_ld_exported_symbols_list=no
1967       save_LDFLAGS=$LDFLAGS
1968       echo "_main" > conftest.sym
1969       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1970       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1971         [lt_cv_ld_exported_symbols_list=yes],
1972         [lt_cv_ld_exported_symbols_list=no])
1973         LDFLAGS="$save_LDFLAGS"
1974     ])
1975
1976     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1977       [lt_cv_ld_force_load=no
1978       cat > conftest.c << _LT_EOF
1979 int forced_loaded() { return 2;}
1980 _LT_EOF
1981       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1982       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1983       echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1984       $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1985       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1986       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1987       cat > conftest.c << _LT_EOF
1988 int main() { return 0;}
1989 _LT_EOF
1990       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1991       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1992       _lt_result=$?
1993       if test -s conftest.err && $GREP force_load conftest.err; then
1994         cat conftest.err >&AS_MESSAGE_LOG_FD
1995       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1996         lt_cv_ld_force_load=yes
1997       else
1998         cat conftest.err >&AS_MESSAGE_LOG_FD
1999       fi
2000         rm -f conftest.err libconftest.a conftest conftest.c
2001         rm -rf conftest.dSYM
2002     ])
2003     case $host_os in
2004     rhapsody* | darwin1.[[012]])
2005       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2006     darwin1.*)
2007       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2008     darwin*) # darwin 5.x on
2009       # if running on 10.5 or later, the deployment target defaults
2010       # to the OS version, if on x86, and 10.4, the deployment
2011       # target defaults to 10.4. Don't you love it?
2012       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2013         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2014           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2015         10.[[012]]*)
2016           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2017         10.*)
2018           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2019       esac
2020     ;;
2021   esac
2022     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2023       _lt_dar_single_mod='$single_module'
2024     fi
2025     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2026       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2027     else
2028       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2029     fi
2030     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2031       _lt_dsymutil='~$DSYMUTIL $lib || :'
2032     else
2033       _lt_dsymutil=
2034     fi
2035     ;;
2036   esac
2037 ])
2038
2039
2040 # _LT_DARWIN_LINKER_FEATURES([TAG])
2041 # ---------------------------------
2042 # Checks for linker and compiler features on darwin
2043 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2044 [
2045   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2046   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2047   _LT_TAGVAR(hardcode_direct, $1)=no
2048   _LT_TAGVAR(hardcode_automatic, $1)=yes
2049   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2050   if test "$lt_cv_ld_force_load" = "yes"; then
2051     _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\"`'
2052     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2053                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2054   else
2055     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2056   fi
2057   _LT_TAGVAR(link_all_deplibs, $1)=yes
2058   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2059   case $cc_basename in
2060      ifort*) _lt_dar_can_shared=yes ;;
2061      *) _lt_dar_can_shared=$GCC ;;
2062   esac
2063   if test "$_lt_dar_can_shared" = "yes"; then
2064     output_verbose_link_cmd=func_echo_all
2065     _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}"
2066     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2067     _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}"
2068     _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}"
2069     m4_if([$1], [CXX],
2070 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2071       _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}"
2072       _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}"
2073     fi
2074 ],[])
2075   else
2076   _LT_TAGVAR(ld_shlibs, $1)=no
2077   fi
2078 ])
2079
2080 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2081 # ----------------------------------
2082 # Links a minimal program and checks the executable
2083 # for the system default hardcoded library path. In most cases,
2084 # this is /usr/lib:/lib, but when the MPI compilers are used
2085 # the location of the communication and MPI libs are included too.
2086 # If we don't find anything, use the default library path according
2087 # to the aix ld manual.
2088 # Store the results from the different compilers for each TAGNAME.
2089 # Allow to override them for all tags through lt_cv_aix_libpath.
2090 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2091 [m4_require([_LT_DECL_SED])dnl
2092 if test "${lt_cv_aix_libpath+set}" = set; then
2093   aix_libpath=$lt_cv_aix_libpath
2094 else
2095   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2096   [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2097   lt_aix_libpath_sed='[
2098       /Import File Strings/,/^$/ {
2099           /^0/ {
2100               s/^0  *\([^ ]*\) *$/\1/
2101               p
2102           }
2103       }]'
2104   _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2105   # Check for a 64-bit object if we didn't find anything.
2106   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2107     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2108   fi],[])
2109   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2110     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2111   fi
2112   ])
2113   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2114 fi
2115 ])# _LT_SYS_MODULE_PATH_AIX
2116
2117
2118 # _LT_SHELL_INIT(ARG)
2119 # -------------------
2120 m4_define([_LT_SHELL_INIT],
2121 [m4_divert_text([M4SH-INIT], [$1
2122 ])])# _LT_SHELL_INIT
2123
2124
2125
2126 # _LT_PROG_ECHO_BACKSLASH
2127 # -----------------------
2128 # Find how we can fake an echo command that does not interpret backslash.
2129 # In particular, with Autoconf 2.60 or later we add some code to the start
2130 # of the generated configure script which will find a shell with a builtin
2131 # printf (which we can use as an echo command).
2132 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2133 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2134 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2135 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2136
2137 AC_MSG_CHECKING([how to print strings])
2138 # Test print first, because it will be a builtin if present.
2139 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2140    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2141   ECHO='print -r --'
2142 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2143   ECHO='printf %s\n'
2144 else
2145   # Use this function as a fallback that always works.
2146   func_fallback_echo ()
2147   {
2148     eval 'cat <<_LTECHO_EOF
2149 $[]1
2150 _LTECHO_EOF'
2151   }
2152   ECHO='func_fallback_echo'
2153 fi
2154
2155 # func_echo_all arg...
2156 # Invoke $ECHO with all args, space-separated.
2157 func_echo_all ()
2158 {
2159     $ECHO "$*" 
2160 }
2161
2162 case "$ECHO" in
2163   printf*) AC_MSG_RESULT([printf]) ;;
2164   print*) AC_MSG_RESULT([print -r]) ;;
2165   *) AC_MSG_RESULT([cat]) ;;
2166 esac
2167
2168 m4_ifdef([_AS_DETECT_SUGGESTED],
2169 [_AS_DETECT_SUGGESTED([
2170   test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2171     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2172     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2173     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2174     PATH=/empty FPATH=/empty; export PATH FPATH
2175     test "X`printf %s $ECHO`" = "X$ECHO" \
2176       || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2177
2178 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2179 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2180 ])# _LT_PROG_ECHO_BACKSLASH
2181
2182
2183 # _LT_WITH_SYSROOT
2184 # ----------------
2185 AC_DEFUN([_LT_WITH_SYSROOT],
2186 [AC_MSG_CHECKING([for sysroot])
2187 AC_ARG_WITH([sysroot],
2188 [  --with-sysroot[=DIR] Search for dependent libraries within DIR
2189                         (or the compiler's sysroot if not specified).],
2190 [], [with_sysroot=no])
2191
2192 dnl lt_sysroot will always be passed unquoted.  We quote it here
2193 dnl in case the user passed a directory name.
2194 lt_sysroot=
2195 case ${with_sysroot} in #(
2196  yes)
2197    if test "$GCC" = yes; then
2198      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2199    fi
2200    ;; #(
2201  /*)
2202    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2203    ;; #(
2204  no|'')
2205    ;; #(
2206  *)
2207    AC_MSG_RESULT([${with_sysroot}])
2208    AC_MSG_ERROR([The sysroot must be an absolute path.])
2209    ;;
2210 esac
2211
2212  AC_MSG_RESULT([${lt_sysroot:-no}])
2213 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2214 [dependent libraries, and in which our libraries should be installed.])])
2215
2216 # _LT_ENABLE_LOCK
2217 # ---------------
2218 m4_defun([_LT_ENABLE_LOCK],
2219 [AC_ARG_ENABLE([libtool-lock],
2220   [AS_HELP_STRING([--disable-libtool-lock],
2221     [avoid locking (might break parallel builds)])])
2222 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2223
2224 # Some flags need to be propagated to the compiler or linker for good
2225 # libtool support.
2226 case $host in
2227 ia64-*-hpux*)
2228   # Find out which ABI we are using.
2229   echo 'int i;' > conftest.$ac_ext
2230   if AC_TRY_EVAL(ac_compile); then
2231     case `/usr/bin/file conftest.$ac_objext` in
2232       *ELF-32*)
2233         HPUX_IA64_MODE="32"
2234         ;;
2235       *ELF-64*)
2236         HPUX_IA64_MODE="64"
2237         ;;
2238     esac
2239   fi
2240   rm -rf conftest*
2241   ;;
2242 *-*-irix6*)
2243   # Find out which ABI we are using.
2244   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2245   if AC_TRY_EVAL(ac_compile); then
2246     if test "$lt_cv_prog_gnu_ld" = yes; then
2247       case `/usr/bin/file conftest.$ac_objext` in
2248         *32-bit*)
2249           LD="${LD-ld} -melf32bsmip"
2250           ;;
2251         *N32*)
2252           LD="${LD-ld} -melf32bmipn32"
2253           ;;
2254         *64-bit*)
2255           LD="${LD-ld} -melf64bmip"
2256         ;;
2257       esac
2258     else
2259       case `/usr/bin/file conftest.$ac_objext` in
2260         *32-bit*)
2261           LD="${LD-ld} -32"
2262           ;;
2263         *N32*)
2264           LD="${LD-ld} -n32"
2265           ;;
2266         *64-bit*)
2267           LD="${LD-ld} -64"
2268           ;;
2269       esac
2270     fi
2271   fi
2272   rm -rf conftest*
2273   ;;
2274
2275 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2276 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2277   # Find out which ABI we are using.
2278   echo 'int i;' > conftest.$ac_ext
2279   if AC_TRY_EVAL(ac_compile); then
2280     case `/usr/bin/file conftest.o` in
2281       *32-bit*)
2282         case $host in
2283           x86_64-*kfreebsd*-gnu)
2284             LD="${LD-ld} -m elf_i386_fbsd"
2285             ;;
2286           x86_64-*linux*)
2287             case `/usr/bin/file conftest.o` in
2288               *x86-64*)
2289                 LD="${LD-ld} -m elf32_x86_64"
2290                 ;;
2291               *)
2292                 LD="${LD-ld} -m elf_i386"
2293                 ;;
2294             esac
2295             ;;
2296           ppc64-*linux*|powerpc64-*linux*)
2297             LD="${LD-ld} -m elf32ppclinux"
2298             ;;
2299           s390x-*linux*)
2300             LD="${LD-ld} -m elf_s390"
2301             ;;
2302           sparc64-*linux*)
2303             LD="${LD-ld} -m elf32_sparc"
2304             ;;
2305         esac
2306         ;;
2307       *64-bit*)
2308         case $host in
2309           x86_64-*kfreebsd*-gnu)
2310             LD="${LD-ld} -m elf_x86_64_fbsd"
2311             ;;
2312           x86_64-*linux*)
2313             LD="${LD-ld} -m elf_x86_64"
2314             ;;
2315           ppc*-*linux*|powerpc*-*linux*)
2316             LD="${LD-ld} -m elf64ppc"
2317             ;;
2318           s390*-*linux*|s390*-*tpf*)
2319             LD="${LD-ld} -m elf64_s390"
2320             ;;
2321           sparc*-*linux*)
2322             LD="${LD-ld} -m elf64_sparc"
2323             ;;
2324         esac
2325         ;;
2326     esac
2327   fi
2328   rm -rf conftest*
2329   ;;
2330
2331 *-*-sco3.2v5*)
2332   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2333   SAVE_CFLAGS="$CFLAGS"
2334   CFLAGS="$CFLAGS -belf"
2335   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2336     [AC_LANG_PUSH(C)
2337      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2338      AC_LANG_POP])
2339   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2340     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2341     CFLAGS="$SAVE_CFLAGS"
2342   fi
2343   ;;
2344 *-*solaris*)
2345   # Find out which ABI we are using.
2346   echo 'int i;' > conftest.$ac_ext
2347   if AC_TRY_EVAL(ac_compile); then
2348     case `/usr/bin/file conftest.o` in
2349     *64-bit*)
2350       case $lt_cv_prog_gnu_ld in
2351       yes*)
2352         case $host in
2353         i?86-*-solaris*)
2354           LD="${LD-ld} -m elf_x86_64"
2355           ;;
2356         sparc*-*-solaris*)
2357           LD="${LD-ld} -m elf64_sparc"
2358           ;;
2359         esac
2360         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
2361         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2362           LD="${LD-ld}_sol2"
2363         fi
2364         ;;
2365       *)
2366         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2367           LD="${LD-ld} -64"
2368         fi
2369         ;;
2370       esac
2371       ;;
2372     esac
2373   fi
2374   rm -rf conftest*
2375   ;;
2376 esac
2377
2378 need_locks="$enable_libtool_lock"
2379 ])# _LT_ENABLE_LOCK
2380
2381
2382 # _LT_PROG_AR
2383 # -----------
2384 m4_defun([_LT_PROG_AR],
2385 [AC_CHECK_TOOLS(AR, [ar], false)
2386 : ${AR=ar}
2387 : ${AR_FLAGS=cru}
2388 _LT_DECL([], [AR], [1], [The archiver])
2389 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2390
2391 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2392   [lt_cv_ar_at_file=no
2393    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2394      [echo conftest.$ac_objext > conftest.lst
2395       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2396       AC_TRY_EVAL([lt_ar_try])
2397       if test "$ac_status" -eq 0; then
2398         # Ensure the archiver fails upon bogus file names.
2399         rm -f conftest.$ac_objext libconftest.a
2400         AC_TRY_EVAL([lt_ar_try])
2401         if test "$ac_status" -ne 0; then
2402           lt_cv_ar_at_file=@
2403         fi
2404       fi
2405       rm -f conftest.* libconftest.a
2406      ])
2407   ])
2408
2409 if test "x$lt_cv_ar_at_file" = xno; then
2410   archiver_list_spec=
2411 else
2412   archiver_list_spec=$lt_cv_ar_at_file
2413 fi
2414 _LT_DECL([], [archiver_list_spec], [1],
2415   [How to feed a file listing to the archiver])
2416 ])# _LT_PROG_AR
2417
2418
2419 # _LT_CMD_OLD_ARCHIVE
2420 # -------------------
2421 m4_defun([_LT_CMD_OLD_ARCHIVE],
2422 [_LT_PROG_AR
2423
2424 AC_CHECK_TOOL(STRIP, strip, :)
2425 test -z "$STRIP" && STRIP=:
2426 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2427
2428 AC_CHECK_TOOL(RANLIB, ranlib, :)
2429 test -z "$RANLIB" && RANLIB=:
2430 _LT_DECL([], [RANLIB], [1],
2431     [Commands used to install an old-style archive])
2432
2433 # Determine commands to create old-style static archives.
2434 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2435 old_postinstall_cmds='chmod 644 $oldlib'
2436 old_postuninstall_cmds=
2437
2438 if test -n "$RANLIB"; then
2439   case $host_os in
2440   openbsd*)
2441     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2442     ;;
2443   *)
2444     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2445     ;;
2446   esac
2447   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2448 fi
2449
2450 case $host_os in
2451   darwin*)
2452     lock_old_archive_extraction=yes ;;
2453   *)
2454     lock_old_archive_extraction=no ;;
2455 esac
2456 _LT_DECL([], [old_postinstall_cmds], [2])
2457 _LT_DECL([], [old_postuninstall_cmds], [2])
2458 _LT_TAGDECL([], [old_archive_cmds], [2],
2459     [Commands used to build an old-style archive])
2460 _LT_DECL([], [lock_old_archive_extraction], [0],
2461     [Whether to use a lock for old archive extraction])
2462 ])# _LT_CMD_OLD_ARCHIVE
2463
2464
2465 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2466 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2467 # ----------------------------------------------------------------
2468 # Check whether the given compiler option works
2469 AC_DEFUN([_LT_COMPILER_OPTION],
2470 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2471 m4_require([_LT_DECL_SED])dnl
2472 AC_CACHE_CHECK([$1], [$2],
2473   [$2=no
2474    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2475    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2476    lt_compiler_flag="$3"
2477    # Insert the option either (1) after the last *FLAGS variable, or
2478    # (2) before a word containing "conftest.", or (3) at the end.
2479    # Note that $ac_compile itself does not contain backslashes and begins
2480    # with a dollar sign (not a hyphen), so the echo should work correctly.
2481    # The option is referenced via a variable to avoid confusing sed.
2482    lt_compile=`echo "$ac_compile" | $SED \
2483    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2484    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2485    -e 's:$: $lt_compiler_flag:'`
2486    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2487    (eval "$lt_compile" 2>conftest.err)
2488    ac_status=$?
2489    cat conftest.err >&AS_MESSAGE_LOG_FD
2490    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2491    if (exit $ac_status) && test -s "$ac_outfile"; then
2492      # The compiler can only warn and ignore the option if not recognized
2493      # So say no if there are warnings other than the usual output.
2494      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2495      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2496      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2497        $2=yes
2498      fi
2499    fi
2500    $RM conftest*
2501 ])
2502
2503 if test x"[$]$2" = xyes; then
2504     m4_if([$5], , :, [$5])
2505 else
2506     m4_if([$6], , :, [$6])
2507 fi
2508 ])# _LT_COMPILER_OPTION
2509
2510 # Old name:
2511 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2512 dnl aclocal-1.4 backwards compatibility:
2513 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2514
2515
2516 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2517 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
2518 # ----------------------------------------------------
2519 # Check whether the given linker option works
2520 AC_DEFUN([_LT_LINKER_OPTION],
2521 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2522 m4_require([_LT_DECL_SED])dnl
2523 AC_CACHE_CHECK([$1], [$2],
2524   [$2=no
2525    save_LDFLAGS="$LDFLAGS"
2526    LDFLAGS="$LDFLAGS $3"
2527    echo "$lt_simple_link_test_code" > conftest.$ac_ext
2528    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2529      # The linker can only warn and ignore the option if not recognized
2530      # So say no if there are warnings
2531      if test -s conftest.err; then
2532        # Append any errors to the config.log.
2533        cat conftest.err 1>&AS_MESSAGE_LOG_FD
2534        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2535        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2536        if diff conftest.exp conftest.er2 >/dev/null; then
2537          $2=yes
2538        fi
2539      else
2540        $2=yes
2541      fi
2542    fi
2543    $RM -r conftest*
2544    LDFLAGS="$save_LDFLAGS"
2545 ])
2546
2547 if test x"[$]$2" = xyes; then
2548     m4_if([$4], , :, [$4])
2549 else
2550     m4_if([$5], , :, [$5])
2551 fi
2552 ])# _LT_LINKER_OPTION
2553
2554 # Old name:
2555 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2556 dnl aclocal-1.4 backwards compatibility:
2557 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2558
2559
2560 # LT_CMD_MAX_LEN
2561 #---------------
2562 AC_DEFUN([LT_CMD_MAX_LEN],
2563 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2564 # find the maximum length of command line arguments
2565 AC_MSG_CHECKING([the maximum length of command line arguments])
2566 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2567   i=0
2568   teststring="ABCD"
2569
2570   case $build_os in
2571   msdosdjgpp*)
2572     # On DJGPP, this test can blow up pretty badly due to problems in libc
2573     # (any single argument exceeding 2000 bytes causes a buffer overrun
2574     # during glob expansion).  Even if it were fixed, the result of this
2575     # check would be larger than it should be.
2576     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2577     ;;
2578
2579   gnu*)
2580     # Under GNU Hurd, this test is not required because there is
2581     # no limit to the length of command line arguments.
2582     # Libtool will interpret -1 as no limit whatsoever
2583     lt_cv_sys_max_cmd_len=-1;
2584     ;;
2585
2586   cygwin* | mingw* | cegcc*)
2587     # On Win9x/ME, this test blows up -- it succeeds, but takes
2588     # about 5 minutes as the teststring grows exponentially.
2589     # Worse, since 9x/ME are not pre-emptively multitasking,
2590     # you end up with a "frozen" computer, even though with patience
2591     # the test eventually succeeds (with a max line length of 256k).
2592     # Instead, let's just punt: use the minimum linelength reported by
2593     # all of the supported platforms: 8192 (on NT/2K/XP).
2594     lt_cv_sys_max_cmd_len=8192;
2595     ;;
2596
2597   mint*)
2598     # On MiNT this can take a long time and run out of memory.
2599     lt_cv_sys_max_cmd_len=8192;
2600     ;;
2601
2602   amigaos*)
2603     # On AmigaOS with pdksh, this test takes hours, literally.
2604     # So we just punt and use a minimum line length of 8192.
2605     lt_cv_sys_max_cmd_len=8192;
2606     ;;
2607
2608   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2609     # This has been around since 386BSD, at least.  Likely further.
2610     if test -x /sbin/sysctl; then
2611       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2612     elif test -x /usr/sbin/sysctl; then
2613       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2614     else
2615       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
2616     fi
2617     # And add a safety zone
2618     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2619     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2620     ;;
2621
2622   interix*)
2623     # We know the value 262144 and hardcode it with a safety zone (like BSD)
2624     lt_cv_sys_max_cmd_len=196608
2625     ;;
2626
2627   os2*)
2628     # The test takes a long time on OS/2.
2629     lt_cv_sys_max_cmd_len=8192
2630     ;;
2631
2632   osf*)
2633     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2634     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2635     # nice to cause kernel panics so lets avoid the loop below.
2636     # First set a reasonable default.
2637     lt_cv_sys_max_cmd_len=16384
2638     #
2639     if test -x /sbin/sysconfig; then
2640       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2641         *1*) lt_cv_sys_max_cmd_len=-1 ;;
2642       esac
2643     fi
2644     ;;
2645   sco3.2v5*)
2646     lt_cv_sys_max_cmd_len=102400
2647     ;;
2648   sysv5* | sco5v6* | sysv4.2uw2*)
2649     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2650     if test -n "$kargmax"; then
2651       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
2652     else
2653       lt_cv_sys_max_cmd_len=32768
2654     fi
2655     ;;
2656   *)
2657     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2658     if test -n "$lt_cv_sys_max_cmd_len" && \
2659         test undefined != "$lt_cv_sys_max_cmd_len"; then
2660       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2661       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2662     else
2663       # Make teststring a little bigger before we do anything with it.
2664       # a 1K string should be a reasonable start.
2665       for i in 1 2 3 4 5 6 7 8 ; do
2666         teststring=$teststring$teststring
2667       done
2668       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2669       # If test is not a shell built-in, we'll probably end up computing a
2670       # maximum length that is only half of the actual maximum length, but
2671       # we can't tell.
2672       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
2673                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2674               test $i != 17 # 1/2 MB should be enough
2675       do
2676         i=`expr $i + 1`
2677         teststring=$teststring$teststring
2678       done
2679       # Only check the string length outside the loop.
2680       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2681       teststring=
2682       # Add a significant safety factor because C++ compilers can tack on
2683       # massive amounts of additional arguments before passing them to the
2684       # linker.  It appears as though 1/2 is a usable value.
2685       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2686     fi
2687     ;;
2688   esac
2689 ])
2690 if test -n $lt_cv_sys_max_cmd_len ; then
2691   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2692 else
2693   AC_MSG_RESULT(none)
2694 fi
2695 max_cmd_len=$lt_cv_sys_max_cmd_len
2696 _LT_DECL([], [max_cmd_len], [0],
2697     [What is the maximum length of a command?])
2698 ])# LT_CMD_MAX_LEN
2699
2700 # Old name:
2701 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2702 dnl aclocal-1.4 backwards compatibility:
2703 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2704
2705
2706 # _LT_HEADER_DLFCN
2707 # ----------------
2708 m4_defun([_LT_HEADER_DLFCN],
2709 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2710 ])# _LT_HEADER_DLFCN
2711
2712
2713 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2714 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2715 # ----------------------------------------------------------------
2716 m4_defun([_LT_TRY_DLOPEN_SELF],
2717 [m4_require([_LT_HEADER_DLFCN])dnl
2718 if test "$cross_compiling" = yes; then :
2719   [$4]
2720 else
2721   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2722   lt_status=$lt_dlunknown
2723   cat > conftest.$ac_ext <<_LT_EOF
2724 [#line $LINENO "configure"
2725 #include "confdefs.h"
2726
2727 #if HAVE_DLFCN_H
2728 #include <dlfcn.h>
2729 #endif
2730
2731 #include <stdio.h>
2732
2733 #ifdef RTLD_GLOBAL
2734 #  define LT_DLGLOBAL           RTLD_GLOBAL
2735 #else
2736 #  ifdef DL_GLOBAL
2737 #    define LT_DLGLOBAL         DL_GLOBAL
2738 #  else
2739 #    define LT_DLGLOBAL         0
2740 #  endif
2741 #endif
2742
2743 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2744    find out it does not work in some platform. */
2745 #ifndef LT_DLLAZY_OR_NOW
2746 #  ifdef RTLD_LAZY
2747 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
2748 #  else
2749 #    ifdef DL_LAZY
2750 #      define LT_DLLAZY_OR_NOW          DL_LAZY
2751 #    else
2752 #      ifdef RTLD_NOW
2753 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
2754 #      else
2755 #        ifdef DL_NOW
2756 #          define LT_DLLAZY_OR_NOW      DL_NOW
2757 #        else
2758 #          define LT_DLLAZY_OR_NOW      0
2759 #        endif
2760 #      endif
2761 #    endif
2762 #  endif
2763 #endif
2764
2765 /* When -fvisbility=hidden is used, assume the code has been annotated
2766    correspondingly for the symbols needed.  */
2767 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2768 int fnord () __attribute__((visibility("default")));
2769 #endif
2770
2771 int fnord () { return 42; }
2772 int main ()
2773 {
2774   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2775   int status = $lt_dlunknown;
2776
2777   if (self)
2778     {
2779       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2780       else
2781         {
2782           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2783           else puts (dlerror ());
2784         }
2785       /* dlclose (self); */
2786     }
2787   else
2788     puts (dlerror ());
2789
2790   return status;
2791 }]
2792 _LT_EOF
2793   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2794     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2795     lt_status=$?
2796     case x$lt_status in
2797       x$lt_dlno_uscore) $1 ;;
2798       x$lt_dlneed_uscore) $2 ;;
2799       x$lt_dlunknown|x*) $3 ;;
2800     esac
2801   else :
2802     # compilation failed
2803     $3
2804   fi
2805 fi
2806 rm -fr conftest*
2807 ])# _LT_TRY_DLOPEN_SELF
2808
2809
2810 # LT_SYS_DLOPEN_SELF
2811 # ------------------
2812 AC_DEFUN([LT_SYS_DLOPEN_SELF],
2813 [m4_require([_LT_HEADER_DLFCN])dnl
2814 if test "x$enable_dlopen" != xyes; then
2815   enable_dlopen=unknown
2816   enable_dlopen_self=unknown
2817   enable_dlopen_self_static=unknown
2818 else
2819   lt_cv_dlopen=no
2820   lt_cv_dlopen_libs=
2821
2822   case $host_os in
2823   beos*)
2824     lt_cv_dlopen="load_add_on"
2825     lt_cv_dlopen_libs=
2826     lt_cv_dlopen_self=yes
2827     ;;
2828
2829   mingw* | pw32* | cegcc*)
2830     lt_cv_dlopen="LoadLibrary"
2831     lt_cv_dlopen_libs=
2832     ;;
2833
2834   cygwin*)
2835     lt_cv_dlopen="dlopen"
2836     lt_cv_dlopen_libs=
2837     ;;
2838
2839   darwin*)
2840   # if libdl is installed we need to link against it
2841     AC_CHECK_LIB([dl], [dlopen],
2842                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2843     lt_cv_dlopen="dyld"
2844     lt_cv_dlopen_libs=
2845     lt_cv_dlopen_self=yes
2846     ])
2847     ;;
2848
2849   *)
2850     AC_CHECK_FUNC([shl_load],
2851           [lt_cv_dlopen="shl_load"],
2852       [AC_CHECK_LIB([dld], [shl_load],
2853             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2854         [AC_CHECK_FUNC([dlopen],
2855               [lt_cv_dlopen="dlopen"],
2856           [AC_CHECK_LIB([dl], [dlopen],
2857                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2858             [AC_CHECK_LIB([svld], [dlopen],
2859                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2860               [AC_CHECK_LIB([dld], [dld_link],
2861                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2862               ])
2863             ])
2864           ])
2865         ])
2866       ])
2867     ;;
2868   esac
2869
2870   if test "x$lt_cv_dlopen" != xno; then
2871     enable_dlopen=yes
2872   else
2873     enable_dlopen=no
2874   fi
2875
2876   case $lt_cv_dlopen in
2877   dlopen)
2878     save_CPPFLAGS="$CPPFLAGS"
2879     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2880
2881     save_LDFLAGS="$LDFLAGS"
2882     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2883
2884     save_LIBS="$LIBS"
2885     LIBS="$lt_cv_dlopen_libs $LIBS"
2886
2887     AC_CACHE_CHECK([whether a program can dlopen itself],
2888           lt_cv_dlopen_self, [dnl
2889           _LT_TRY_DLOPEN_SELF(
2890             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2891             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2892     ])
2893
2894     if test "x$lt_cv_dlopen_self" = xyes; then
2895       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2896       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2897           lt_cv_dlopen_self_static, [dnl
2898           _LT_TRY_DLOPEN_SELF(
2899             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2900             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2901       ])
2902     fi
2903
2904     CPPFLAGS="$save_CPPFLAGS"
2905     LDFLAGS="$save_LDFLAGS"
2906     LIBS="$save_LIBS"
2907     ;;
2908   esac
2909
2910   case $lt_cv_dlopen_self in
2911   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2912   *) enable_dlopen_self=unknown ;;
2913   esac
2914
2915   case $lt_cv_dlopen_self_static in
2916   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2917   *) enable_dlopen_self_static=unknown ;;
2918   esac
2919 fi
2920 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2921          [Whether dlopen is supported])
2922 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2923          [Whether dlopen of programs is supported])
2924 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2925          [Whether dlopen of statically linked programs is supported])
2926 ])# LT_SYS_DLOPEN_SELF
2927
2928 # Old name:
2929 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2930 dnl aclocal-1.4 backwards compatibility:
2931 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2932
2933
2934 # _LT_COMPILER_C_O([TAGNAME])
2935 # ---------------------------
2936 # Check to see if options -c and -o are simultaneously supported by compiler.
2937 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2938 m4_defun([_LT_COMPILER_C_O],
2939 [m4_require([_LT_DECL_SED])dnl
2940 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2941 m4_require([_LT_TAG_COMPILER])dnl
2942 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2943   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2944   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2945    $RM -r conftest 2>/dev/null
2946    mkdir conftest
2947    cd conftest
2948    mkdir out
2949    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2950
2951    lt_compiler_flag="-o out/conftest2.$ac_objext"
2952    # Insert the option either (1) after the last *FLAGS variable, or
2953    # (2) before a word containing "conftest.", or (3) at the end.
2954    # Note that $ac_compile itself does not contain backslashes and begins
2955    # with a dollar sign (not a hyphen), so the echo should work correctly.
2956    lt_compile=`echo "$ac_compile" | $SED \
2957    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2958    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2959    -e 's:$: $lt_compiler_flag:'`
2960    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2961    (eval "$lt_compile" 2>out/conftest.err)
2962    ac_status=$?
2963    cat out/conftest.err >&AS_MESSAGE_LOG_FD
2964    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2965    if (exit $ac_status) && test -s out/conftest2.$ac_objext
2966    then
2967      # The compiler can only warn and ignore the option if not recognized
2968      # So say no if there are warnings
2969      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2970      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2971      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2972        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2973      fi
2974    fi
2975    chmod u+w . 2>&AS_MESSAGE_LOG_FD
2976    $RM conftest*
2977    # SGI C++ compiler will create directory out/ii_files/ for
2978    # template instantiation
2979    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2980    $RM out/* && rmdir out
2981    cd ..
2982    $RM -r conftest
2983    $RM conftest*
2984 ])
2985 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2986         [Does compiler simultaneously support -c and -o options?])
2987 ])# _LT_COMPILER_C_O
2988
2989
2990 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2991 # ----------------------------------
2992 # Check to see if we can do hard links to lock some files if needed
2993 m4_defun([_LT_COMPILER_FILE_LOCKS],
2994 [m4_require([_LT_ENABLE_LOCK])dnl
2995 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2996 _LT_COMPILER_C_O([$1])
2997
2998 hard_links="nottested"
2999 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3000   # do not overwrite the value of need_locks provided by the user
3001   AC_MSG_CHECKING([if we can lock with hard links])
3002   hard_links=yes
3003   $RM conftest*
3004   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3005   touch conftest.a
3006   ln conftest.a conftest.b 2>&5 || hard_links=no
3007   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3008   AC_MSG_RESULT([$hard_links])
3009   if test "$hard_links" = no; then
3010     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3011     need_locks=warn
3012   fi
3013 else
3014   need_locks=no
3015 fi
3016 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3017 ])# _LT_COMPILER_FILE_LOCKS
3018
3019
3020 # _LT_CHECK_OBJDIR
3021 # ----------------
3022 m4_defun([_LT_CHECK_OBJDIR],
3023 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3024 [rm -f .libs 2>/dev/null
3025 mkdir .libs 2>/dev/null
3026 if test -d .libs; then
3027   lt_cv_objdir=.libs
3028 else
3029   # MS-DOS does not allow filenames that begin with a dot.
3030   lt_cv_objdir=_libs
3031 fi
3032 rmdir .libs 2>/dev/null])
3033 objdir=$lt_cv_objdir
3034 _LT_DECL([], [objdir], [0],
3035          [The name of the directory that contains temporary libtool files])dnl
3036 m4_pattern_allow([LT_OBJDIR])dnl
3037 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3038   [Define to the sub-directory in which libtool stores uninstalled libraries.])
3039 ])# _LT_CHECK_OBJDIR
3040
3041
3042 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3043 # --------------------------------------
3044 # Check hardcoding attributes.
3045 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3046 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3047 _LT_TAGVAR(hardcode_action, $1)=
3048 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3049    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3050    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3051
3052   # We can hardcode non-existent directories.
3053   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3054      # If the only mechanism to avoid hardcoding is shlibpath_var, we
3055      # have to relink, otherwise we might link with an installed library
3056      # when we should be linking with a yet-to-be-installed one
3057      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3058      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3059     # Linking always hardcodes the temporary library directory.
3060     _LT_TAGVAR(hardcode_action, $1)=relink
3061   else
3062     # We can link without hardcoding, and we can hardcode nonexisting dirs.
3063     _LT_TAGVAR(hardcode_action, $1)=immediate
3064   fi
3065 else
3066   # We cannot hardcode anything, or else we can only hardcode existing
3067   # directories.
3068   _LT_TAGVAR(hardcode_action, $1)=unsupported
3069 fi
3070 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3071
3072 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3073    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3074   # Fast installation is not supported
3075   enable_fast_install=no
3076 elif test "$shlibpath_overrides_runpath" = yes ||
3077      test "$enable_shared" = no; then
3078   # Fast installation is not necessary
3079   enable_fast_install=needless
3080 fi
3081 _LT_TAGDECL([], [hardcode_action], [0],
3082     [How to hardcode a shared library path into an executable])
3083 ])# _LT_LINKER_HARDCODE_LIBPATH
3084
3085
3086 # _LT_CMD_STRIPLIB
3087 # ----------------
3088 m4_defun([_LT_CMD_STRIPLIB],
3089 [m4_require([_LT_DECL_EGREP])
3090 striplib=
3091 old_striplib=
3092 AC_MSG_CHECKING([whether stripping libraries is possible])
3093 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3094   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3095   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3096   AC_MSG_RESULT([yes])
3097 else
3098 # FIXME - insert some real tests, host_os isn't really good enough
3099   case $host_os in
3100   darwin*)
3101     if test -n "$STRIP" ; then
3102       striplib="$STRIP -x"
3103       old_striplib="$STRIP -S"
3104       AC_MSG_RESULT([yes])
3105     else
3106       AC_MSG_RESULT([no])
3107     fi
3108     ;;
3109   *)
3110     AC_MSG_RESULT([no])
3111     ;;
3112   esac
3113 fi
3114 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3115 _LT_DECL([], [striplib], [1])
3116 ])# _LT_CMD_STRIPLIB
3117
3118
3119 # _LT_SYS_DYNAMIC_LINKER([TAG])
3120 # -----------------------------
3121 # PORTME Fill in your ld.so characteristics
3122 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3123 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3124 m4_require([_LT_DECL_EGREP])dnl
3125 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3126 m4_require([_LT_DECL_OBJDUMP])dnl
3127 m4_require([_LT_DECL_SED])dnl
3128 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3129 AC_MSG_CHECKING([dynamic linker characteristics])
3130 m4_if([$1],
3131         [], [
3132 if test "$GCC" = yes; then
3133   case $host_os in
3134     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3135     *) lt_awk_arg="/^libraries:/" ;;
3136   esac
3137   case $host_os in
3138     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3139     *) lt_sed_strip_eq="s,=/,/,g" ;;
3140   esac
3141   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3142   case $lt_search_path_spec in
3143   *\;*)
3144     # if the path contains ";" then we assume it to be the separator
3145     # otherwise default to the standard path separator (i.e. ":") - it is
3146     # assumed that no part of a normal pathname contains ";" but that should
3147     # okay in the real world where ";" in dirpaths is itself problematic.
3148     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3149     ;;
3150   *)
3151     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3152     ;;
3153   esac
3154   # Ok, now we have the path, separated by spaces, we can step through it
3155   # and add multilib dir if necessary.
3156   lt_tmp_lt_search_path_spec=
3157   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3158   for lt_sys_path in $lt_search_path_spec; do
3159     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3160       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3161     else
3162       test -d "$lt_sys_path" && \
3163         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3164     fi
3165   done
3166   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3167 BEGIN {RS=" "; FS="/|\n";} {
3168   lt_foo="";
3169   lt_count=0;
3170   for (lt_i = NF; lt_i > 0; lt_i--) {
3171     if ($lt_i != "" && $lt_i != ".") {
3172       if ($lt_i == "..") {
3173         lt_count++;
3174       } else {
3175         if (lt_count == 0) {
3176           lt_foo="/" $lt_i lt_foo;
3177         } else {
3178           lt_count--;
3179         }
3180       }
3181     }
3182   }
3183   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3184   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3185 }'`
3186   # AWK program above erroneously prepends '/' to C:/dos/paths
3187   # for these hosts.
3188   case $host_os in
3189     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3190       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3191   esac
3192   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3193 else
3194   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3195 fi])
3196 library_names_spec=
3197 libname_spec='lib$name'
3198 soname_spec=
3199 shrext_cmds=".so"
3200 postinstall_cmds=
3201 postuninstall_cmds=
3202 finish_cmds=
3203 finish_eval=
3204 shlibpath_var=
3205 shlibpath_overrides_runpath=unknown
3206 version_type=none
3207 dynamic_linker="$host_os ld.so"
3208 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3209 need_lib_prefix=unknown
3210 hardcode_into_libs=no
3211
3212 # when you set need_version to no, make sure it does not cause -set_version
3213 # flags to be left without arguments
3214 need_version=unknown
3215
3216 case $host_os in
3217 aix3*)
3218   version_type=linux # correct to gnu/linux during the next big refactor
3219   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3220   shlibpath_var=LIBPATH
3221
3222   # AIX 3 has no versioning support, so we append a major version to the name.
3223   soname_spec='${libname}${release}${shared_ext}$major'
3224   ;;
3225
3226 aix[[4-9]]*)
3227   version_type=linux # correct to gnu/linux during the next big refactor
3228   need_lib_prefix=no
3229   need_version=no
3230   hardcode_into_libs=yes
3231   if test "$host_cpu" = ia64; then
3232     # AIX 5 supports IA64
3233     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3234     shlibpath_var=LD_LIBRARY_PATH
3235   else
3236     # With GCC up to 2.95.x, collect2 would create an import file
3237     # for dependence libraries.  The import file would start with
3238     # the line `#! .'.  This would cause the generated library to
3239     # depend on `.', always an invalid library.  This was fixed in
3240     # development snapshots of GCC prior to 3.0.
3241     case $host_os in
3242       aix4 | aix4.[[01]] | aix4.[[01]].*)
3243       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3244            echo ' yes '
3245            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3246         :
3247       else
3248         can_build_shared=no
3249       fi
3250       ;;
3251     esac
3252     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3253     # soname into executable. Probably we can add versioning support to
3254     # collect2, so additional links can be useful in future.
3255     if test "$aix_use_runtimelinking" = yes; then
3256       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3257       # instead of lib<name>.a to let people know that these are not
3258       # typical AIX shared libraries.
3259       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3260     else
3261       # We preserve .a as extension for shared libraries through AIX4.2
3262       # and later when we are not doing run time linking.
3263       library_names_spec='${libname}${release}.a $libname.a'
3264       soname_spec='${libname}${release}${shared_ext}$major'
3265     fi
3266     shlibpath_var=LIBPATH
3267   fi
3268   ;;
3269
3270 amigaos*)
3271   case $host_cpu in
3272   powerpc)
3273     # Since July 2007 AmigaOS4 officially supports .so libraries.
3274     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3275     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3276     ;;
3277   m68k)
3278     library_names_spec='$libname.ixlibrary $libname.a'
3279     # Create ${libname}_ixlibrary.a entries in /sys/libs.
3280     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'
3281     ;;
3282   esac
3283   ;;
3284
3285 beos*)
3286   library_names_spec='${libname}${shared_ext}'
3287   dynamic_linker="$host_os ld.so"
3288   shlibpath_var=LIBRARY_PATH
3289   ;;
3290
3291 bsdi[[45]]*)
3292   version_type=linux # correct to gnu/linux during the next big refactor
3293   need_version=no
3294   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3295   soname_spec='${libname}${release}${shared_ext}$major'
3296   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3297   shlibpath_var=LD_LIBRARY_PATH
3298   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3299   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3300   # the default ld.so.conf also contains /usr/contrib/lib and
3301   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3302   # libtool to hard-code these into programs
3303   ;;
3304
3305 cygwin* | mingw* | pw32* | cegcc*)
3306   version_type=windows
3307   shrext_cmds=".dll"
3308   need_version=no
3309   need_lib_prefix=no
3310
3311   case $GCC,$cc_basename in
3312   yes,*)
3313     # gcc
3314     library_names_spec='$libname.dll.a'
3315     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3316     postinstall_cmds='base_file=`basename \${file}`~
3317       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3318       dldir=$destdir/`dirname \$dlpath`~
3319       test -d \$dldir || mkdir -p \$dldir~
3320       $install_prog $dir/$dlname \$dldir/$dlname~
3321       chmod a+x \$dldir/$dlname~
3322       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3323         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3324       fi'
3325     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3326       dlpath=$dir/\$dldll~
3327        $RM \$dlpath'
3328     shlibpath_overrides_runpath=yes
3329
3330     case $host_os in
3331     cygwin*)
3332       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3333       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3334 m4_if([$1], [],[
3335       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3336       ;;
3337     mingw* | cegcc*)
3338       # MinGW DLLs use traditional 'lib' prefix
3339       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3340       ;;
3341     pw32*)
3342       # pw32 DLLs use 'pw' prefix rather than 'lib'
3343       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3344       ;;
3345     esac
3346     dynamic_linker='Win32 ld.exe'
3347     ;;
3348
3349   *,cl*)
3350     # Native MSVC
3351     libname_spec='$name'
3352     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3353     library_names_spec='${libname}.dll.lib'
3354
3355     case $build_os in
3356     mingw*)
3357       sys_lib_search_path_spec=
3358       lt_save_ifs=$IFS
3359       IFS=';'
3360       for lt_path in $LIB
3361       do
3362         IFS=$lt_save_ifs
3363         # Let DOS variable expansion print the short 8.3 style file name.
3364         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3365         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3366       done
3367       IFS=$lt_save_ifs
3368       # Convert to MSYS style.
3369       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3370       ;;
3371     cygwin*)
3372       # Convert to unix form, then to dos form, then back to unix form
3373       # but this time dos style (no spaces!) so that the unix form looks
3374       # like /cygdrive/c/PROGRA~1:/cygdr...
3375       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3376       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3377       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3378       ;;
3379     *)
3380       sys_lib_search_path_spec="$LIB"
3381       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3382         # It is most probably a Windows format PATH.
3383         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3384       else
3385         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3386       fi
3387       # FIXME: find the short name or the path components, as spaces are
3388       # common. (e.g. "Program Files" -> "PROGRA~1")
3389       ;;
3390     esac
3391
3392     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3393     postinstall_cmds='base_file=`basename \${file}`~
3394       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3395       dldir=$destdir/`dirname \$dlpath`~
3396       test -d \$dldir || mkdir -p \$dldir~
3397       $install_prog $dir/$dlname \$dldir/$dlname'
3398     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3399       dlpath=$dir/\$dldll~
3400        $RM \$dlpath'
3401     shlibpath_overrides_runpath=yes
3402     dynamic_linker='Win32 link.exe'
3403     ;;
3404
3405   *)
3406     # Assume MSVC wrapper
3407     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3408     dynamic_linker='Win32 ld.exe'
3409     ;;
3410   esac
3411   # FIXME: first we should search . and the directory the executable is in
3412   shlibpath_var=PATH
3413   ;;
3414
3415 darwin* | rhapsody*)
3416   dynamic_linker="$host_os dyld"
3417   version_type=darwin
3418   need_lib_prefix=no
3419   need_version=no
3420   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3421   soname_spec='${libname}${release}${major}$shared_ext'
3422   shlibpath_overrides_runpath=yes
3423   shlibpath_var=DYLD_LIBRARY_PATH
3424   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3425 m4_if([$1], [],[
3426   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3427   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3428   ;;
3429
3430 dgux*)
3431   version_type=linux # correct to gnu/linux during the next big refactor
3432   need_lib_prefix=no
3433   need_version=no
3434   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3435   soname_spec='${libname}${release}${shared_ext}$major'
3436   shlibpath_var=LD_LIBRARY_PATH
3437   ;;
3438
3439 freebsd* | dragonfly*)
3440   # DragonFly does not have aout.  When/if they implement a new
3441   # versioning mechanism, adjust this.
3442   if test -x /usr/bin/objformat; then
3443     objformat=`/usr/bin/objformat`
3444   else
3445     case $host_os in
3446     freebsd[[23]].*) objformat=aout ;;
3447     *) objformat=elf ;;
3448     esac
3449   fi
3450   version_type=freebsd-$objformat
3451   case $version_type in
3452     freebsd-elf*)
3453       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3454       need_version=no
3455       need_lib_prefix=no
3456       ;;
3457     freebsd-*)
3458       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3459       need_version=yes
3460       ;;
3461   esac
3462   shlibpath_var=LD_LIBRARY_PATH
3463   case $host_os in
3464   freebsd2.*)
3465     shlibpath_overrides_runpath=yes
3466     ;;
3467   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3468     shlibpath_overrides_runpath=yes
3469     hardcode_into_libs=yes
3470     ;;
3471   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3472   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3473     shlibpath_overrides_runpath=no
3474     hardcode_into_libs=yes
3475     ;;
3476   *) # from 4.6 on, and DragonFly
3477     shlibpath_overrides_runpath=yes
3478     hardcode_into_libs=yes
3479     ;;
3480   esac
3481   ;;
3482
3483 haiku*)
3484   version_type=linux # correct to gnu/linux during the next big refactor
3485   need_lib_prefix=no
3486   need_version=no
3487   dynamic_linker="$host_os runtime_loader"
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=LIBRARY_PATH
3491   shlibpath_overrides_runpath=yes
3492   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3493   hardcode_into_libs=yes
3494   ;;
3495
3496 hpux9* | hpux10* | hpux11*)
3497   # Give a soname corresponding to the major version so that dld.sl refuses to
3498   # link against other versions.
3499   version_type=sunos
3500   need_lib_prefix=no
3501   need_version=no
3502   case $host_cpu in
3503   ia64*)
3504     shrext_cmds='.so'
3505     hardcode_into_libs=yes
3506     dynamic_linker="$host_os dld.so"
3507     shlibpath_var=LD_LIBRARY_PATH
3508     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3509     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3510     soname_spec='${libname}${release}${shared_ext}$major'
3511     if test "X$HPUX_IA64_MODE" = X32; then
3512       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3513     else
3514       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3515     fi
3516     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3517     ;;
3518   hppa*64*)
3519     shrext_cmds='.sl'
3520     hardcode_into_libs=yes
3521     dynamic_linker="$host_os dld.sl"
3522     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3523     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3524     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3525     soname_spec='${libname}${release}${shared_ext}$major'
3526     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3527     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3528     ;;
3529   *)
3530     shrext_cmds='.sl'
3531     dynamic_linker="$host_os dld.sl"
3532     shlibpath_var=SHLIB_PATH
3533     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3534     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3535     soname_spec='${libname}${release}${shared_ext}$major'
3536     ;;
3537   esac
3538   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3539   postinstall_cmds='chmod 555 $lib'
3540   # or fails outright, so override atomically:
3541   install_override_mode=555
3542   ;;
3543
3544 interix[[3-9]]*)
3545   version_type=linux # correct to gnu/linux during the next big refactor
3546   need_lib_prefix=no
3547   need_version=no
3548   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3549   soname_spec='${libname}${release}${shared_ext}$major'
3550   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3551   shlibpath_var=LD_LIBRARY_PATH
3552   shlibpath_overrides_runpath=no
3553   hardcode_into_libs=yes
3554   ;;
3555
3556 irix5* | irix6* | nonstopux*)
3557   case $host_os in
3558     nonstopux*) version_type=nonstopux ;;
3559     *)
3560         if test "$lt_cv_prog_gnu_ld" = yes; then
3561                 version_type=linux # correct to gnu/linux during the next big refactor
3562         else
3563                 version_type=irix
3564         fi ;;
3565   esac
3566   need_lib_prefix=no
3567   need_version=no
3568   soname_spec='${libname}${release}${shared_ext}$major'
3569   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3570   case $host_os in
3571   irix5* | nonstopux*)
3572     libsuff= shlibsuff=
3573     ;;
3574   *)
3575     case $LD in # libtool.m4 will add one of these switches to LD
3576     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3577       libsuff= shlibsuff= libmagic=32-bit;;
3578     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3579       libsuff=32 shlibsuff=N32 libmagic=N32;;
3580     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3581       libsuff=64 shlibsuff=64 libmagic=64-bit;;
3582     *) libsuff= shlibsuff= libmagic=never-match;;
3583     esac
3584     ;;
3585   esac
3586   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3587   shlibpath_overrides_runpath=no
3588   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3589   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3590   hardcode_into_libs=yes
3591   ;;
3592
3593 # No shared lib support for Linux oldld, aout, or coff.
3594 linux*oldld* | linux*aout* | linux*coff*)
3595   dynamic_linker=no
3596   ;;
3597
3598 # This must be glibc/ELF.
3599 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3600   version_type=linux # correct to gnu/linux during the next big refactor
3601   need_lib_prefix=no
3602   need_version=no
3603   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3604   soname_spec='${libname}${release}${shared_ext}$major'
3605   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3606   shlibpath_var=LD_LIBRARY_PATH
3607   shlibpath_overrides_runpath=no
3608
3609   # Some binutils ld are patched to set DT_RUNPATH
3610   AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3611     [lt_cv_shlibpath_overrides_runpath=no
3612     save_LDFLAGS=$LDFLAGS
3613     save_libdir=$libdir
3614     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3615          LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3616     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3617       [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3618          [lt_cv_shlibpath_overrides_runpath=yes])])
3619     LDFLAGS=$save_LDFLAGS
3620     libdir=$save_libdir
3621     ])
3622   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3623
3624   # This implies no fast_install, which is unacceptable.
3625   # Some rework will be needed to allow for fast_install
3626   # before this can be enabled.
3627   hardcode_into_libs=yes
3628
3629   # Append ld.so.conf contents to the search path
3630   if test -f /etc/ld.so.conf; then
3631     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' ' '`
3632     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3633   fi
3634
3635   # We used to test for /lib/ld.so.1 and disable shared libraries on
3636   # powerpc, because MkLinux only supported shared libraries with the
3637   # GNU dynamic linker.  Since this was broken with cross compilers,
3638   # most powerpc-linux boxes support dynamic linking these days and
3639   # people can always --disable-shared, the test was removed, and we
3640   # assume the GNU/Linux dynamic linker is in use.
3641   dynamic_linker='GNU/Linux ld.so'
3642   ;;
3643
3644 netbsdelf*-gnu)
3645   version_type=linux
3646   need_lib_prefix=no
3647   need_version=no
3648   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3649   soname_spec='${libname}${release}${shared_ext}$major'
3650   shlibpath_var=LD_LIBRARY_PATH
3651   shlibpath_overrides_runpath=no
3652   hardcode_into_libs=yes
3653   dynamic_linker='NetBSD ld.elf_so'
3654   ;;
3655
3656 netbsd*)
3657   version_type=sunos
3658   need_lib_prefix=no
3659   need_version=no
3660   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3661     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3662     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3663     dynamic_linker='NetBSD (a.out) ld.so'
3664   else
3665     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3666     soname_spec='${libname}${release}${shared_ext}$major'
3667     dynamic_linker='NetBSD ld.elf_so'
3668   fi
3669   shlibpath_var=LD_LIBRARY_PATH
3670   shlibpath_overrides_runpath=yes
3671   hardcode_into_libs=yes
3672   ;;
3673
3674 newsos6)
3675   version_type=linux # correct to gnu/linux during the next big refactor
3676   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3677   shlibpath_var=LD_LIBRARY_PATH
3678   shlibpath_overrides_runpath=yes
3679   ;;
3680
3681 *nto* | *qnx*)
3682   version_type=qnx
3683   need_lib_prefix=no
3684   need_version=no
3685   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3686   soname_spec='${libname}${release}${shared_ext}$major'
3687   shlibpath_var=LD_LIBRARY_PATH
3688   shlibpath_overrides_runpath=no
3689   hardcode_into_libs=yes
3690   dynamic_linker='ldqnx.so'
3691   ;;
3692
3693 openbsd*)
3694   version_type=sunos
3695   sys_lib_dlsearch_path_spec="/usr/lib"
3696   need_lib_prefix=no
3697   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3698   case $host_os in
3699     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
3700     *)                          need_version=no  ;;
3701   esac
3702   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3703   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3704   shlibpath_var=LD_LIBRARY_PATH
3705   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3706     case $host_os in
3707       openbsd2.[[89]] | openbsd2.[[89]].*)
3708         shlibpath_overrides_runpath=no
3709         ;;
3710       *)
3711         shlibpath_overrides_runpath=yes
3712         ;;
3713       esac
3714   else
3715     shlibpath_overrides_runpath=yes
3716   fi
3717   ;;
3718
3719 os2*)
3720   libname_spec='$name'
3721   shrext_cmds=".dll"
3722   need_lib_prefix=no
3723   library_names_spec='$libname${shared_ext} $libname.a'
3724   dynamic_linker='OS/2 ld.exe'
3725   shlibpath_var=LIBPATH
3726   ;;
3727
3728 osf3* | osf4* | osf5*)
3729   version_type=osf
3730   need_lib_prefix=no
3731   need_version=no
3732   soname_spec='${libname}${release}${shared_ext}$major'
3733   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3734   shlibpath_var=LD_LIBRARY_PATH
3735   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3736   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3737   ;;
3738
3739 rdos*)
3740   dynamic_linker=no
3741   ;;
3742
3743 solaris*)
3744   version_type=linux # correct to gnu/linux during the next big refactor
3745   need_lib_prefix=no
3746   need_version=no
3747   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3748   soname_spec='${libname}${release}${shared_ext}$major'
3749   shlibpath_var=LD_LIBRARY_PATH
3750   shlibpath_overrides_runpath=yes
3751   hardcode_into_libs=yes
3752   # ldd complains unless libraries are executable
3753   postinstall_cmds='chmod +x $lib'
3754   ;;
3755
3756 sunos4*)
3757   version_type=sunos
3758   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3759   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3760   shlibpath_var=LD_LIBRARY_PATH
3761   shlibpath_overrides_runpath=yes
3762   if test "$with_gnu_ld" = yes; then
3763     need_lib_prefix=no
3764   fi
3765   need_version=yes
3766   ;;
3767
3768 sysv4 | sysv4.3*)
3769   version_type=linux # correct to gnu/linux during the next big refactor
3770   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3771   soname_spec='${libname}${release}${shared_ext}$major'
3772   shlibpath_var=LD_LIBRARY_PATH
3773   case $host_vendor in
3774     sni)
3775       shlibpath_overrides_runpath=no
3776       need_lib_prefix=no
3777       runpath_var=LD_RUN_PATH
3778       ;;
3779     siemens)
3780       need_lib_prefix=no
3781       ;;
3782     motorola)
3783       need_lib_prefix=no
3784       need_version=no
3785       shlibpath_overrides_runpath=no
3786       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3787       ;;
3788   esac
3789   ;;
3790
3791 sysv4*MP*)
3792   if test -d /usr/nec ;then
3793     version_type=linux # correct to gnu/linux during the next big refactor
3794     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3795     soname_spec='$libname${shared_ext}.$major'
3796     shlibpath_var=LD_LIBRARY_PATH
3797   fi
3798   ;;
3799
3800 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3801   version_type=freebsd-elf
3802   need_lib_prefix=no
3803   need_version=no
3804   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3805   soname_spec='${libname}${release}${shared_ext}$major'
3806   shlibpath_var=LD_LIBRARY_PATH
3807   shlibpath_overrides_runpath=yes
3808   hardcode_into_libs=yes
3809   if test "$with_gnu_ld" = yes; then
3810     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3811   else
3812     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3813     case $host_os in
3814       sco3.2v5*)
3815         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3816         ;;
3817     esac
3818   fi
3819   sys_lib_dlsearch_path_spec='/usr/lib'
3820   ;;
3821
3822 tpf*)
3823   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3824   version_type=linux # correct to gnu/linux during the next big refactor
3825   need_lib_prefix=no
3826   need_version=no
3827   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3828   shlibpath_var=LD_LIBRARY_PATH
3829   shlibpath_overrides_runpath=no
3830   hardcode_into_libs=yes
3831   ;;
3832
3833 uts4*)
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   ;;
3839
3840 *)
3841   dynamic_linker=no
3842   ;;
3843 esac
3844 AC_MSG_RESULT([$dynamic_linker])
3845 test "$dynamic_linker" = no && can_build_shared=no
3846
3847 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3848 if test "$GCC" = yes; then
3849   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3850 fi
3851
3852 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3853   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3854 fi
3855 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3856   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3857 fi
3858
3859 _LT_DECL([], [variables_saved_for_relink], [1],
3860     [Variables whose values should be saved in libtool wrapper scripts and
3861     restored at link time])
3862 _LT_DECL([], [need_lib_prefix], [0],
3863     [Do we need the "lib" prefix for modules?])
3864 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3865 _LT_DECL([], [version_type], [0], [Library versioning type])
3866 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3867 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3868 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3869     [Is shlibpath searched before the hard-coded library search path?])
3870 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3871 _LT_DECL([], [library_names_spec], [1],
3872     [[List of archive names.  First name is the real one, the rest are links.
3873     The last name is the one that the linker finds with -lNAME]])
3874 _LT_DECL([], [soname_spec], [1],
3875     [[The coded name of the library, if different from the real name]])
3876 _LT_DECL([], [install_override_mode], [1],
3877     [Permission mode override for installation of shared libraries])
3878 _LT_DECL([], [postinstall_cmds], [2],
3879     [Command to use after installation of a shared archive])
3880 _LT_DECL([], [postuninstall_cmds], [2],
3881     [Command to use after uninstallation of a shared archive])
3882 _LT_DECL([], [finish_cmds], [2],
3883     [Commands used to finish a libtool library installation in a directory])
3884 _LT_DECL([], [finish_eval], [1],
3885     [[As "finish_cmds", except a single script fragment to be evaled but
3886     not shown]])
3887 _LT_DECL([], [hardcode_into_libs], [0],
3888     [Whether we should hardcode library paths into libraries])
3889 _LT_DECL([], [sys_lib_search_path_spec], [2],
3890     [Compile-time system search path for libraries])
3891 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3892     [Run-time system search path for libraries])
3893 ])# _LT_SYS_DYNAMIC_LINKER
3894
3895
3896 # _LT_PATH_TOOL_PREFIX(TOOL)
3897 # --------------------------
3898 # find a file program which can recognize shared library
3899 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3900 [m4_require([_LT_DECL_EGREP])dnl
3901 AC_MSG_CHECKING([for $1])
3902 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3903 [case $MAGIC_CMD in
3904 [[\\/*] |  ?:[\\/]*])
3905   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3906   ;;
3907 *)
3908   lt_save_MAGIC_CMD="$MAGIC_CMD"
3909   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3910 dnl $ac_dummy forces splitting on constant user-supplied paths.
3911 dnl POSIX.2 word splitting is done only on the output of word expansions,
3912 dnl not every word.  This closes a longstanding sh security hole.
3913   ac_dummy="m4_if([$2], , $PATH, [$2])"
3914   for ac_dir in $ac_dummy; do
3915     IFS="$lt_save_ifs"
3916     test -z "$ac_dir" && ac_dir=.
3917     if test -f $ac_dir/$1; then
3918       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3919       if test -n "$file_magic_test_file"; then
3920         case $deplibs_check_method in
3921         "file_magic "*)
3922           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3923           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3924           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3925             $EGREP "$file_magic_regex" > /dev/null; then
3926             :
3927           else
3928             cat <<_LT_EOF 1>&2
3929
3930 *** Warning: the command libtool uses to detect shared libraries,
3931 *** $file_magic_cmd, produces output that libtool cannot recognize.
3932 *** The result is that libtool may fail to recognize shared libraries
3933 *** as such.  This will affect the creation of libtool libraries that
3934 *** depend on shared libraries, but programs linked with such libtool
3935 *** libraries will work regardless of this problem.  Nevertheless, you
3936 *** may want to report the problem to your system manager and/or to
3937 *** bug-libtool@gnu.org
3938
3939 _LT_EOF
3940           fi ;;
3941         esac
3942       fi
3943       break
3944     fi
3945   done
3946   IFS="$lt_save_ifs"
3947   MAGIC_CMD="$lt_save_MAGIC_CMD"
3948   ;;
3949 esac])
3950 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3951 if test -n "$MAGIC_CMD"; then
3952   AC_MSG_RESULT($MAGIC_CMD)
3953 else
3954   AC_MSG_RESULT(no)
3955 fi
3956 _LT_DECL([], [MAGIC_CMD], [0],
3957          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3958 ])# _LT_PATH_TOOL_PREFIX
3959
3960 # Old name:
3961 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3962 dnl aclocal-1.4 backwards compatibility:
3963 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3964
3965
3966 # _LT_PATH_MAGIC
3967 # --------------
3968 # find a file program which can recognize a shared library
3969 m4_defun([_LT_PATH_MAGIC],
3970 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3971 if test -z "$lt_cv_path_MAGIC_CMD"; then
3972   if test -n "$ac_tool_prefix"; then
3973     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3974   else
3975     MAGIC_CMD=:
3976   fi
3977 fi
3978 ])# _LT_PATH_MAGIC
3979
3980
3981 # LT_PATH_LD
3982 # ----------
3983 # find the pathname to the GNU or non-GNU linker
3984 AC_DEFUN([LT_PATH_LD],
3985 [AC_REQUIRE([AC_PROG_CC])dnl
3986 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3987 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3988 m4_require([_LT_DECL_SED])dnl
3989 m4_require([_LT_DECL_EGREP])dnl
3990 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3991
3992 AC_ARG_WITH([gnu-ld],
3993     [AS_HELP_STRING([--with-gnu-ld],
3994         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3995     [test "$withval" = no || with_gnu_ld=yes],
3996     [with_gnu_ld=no])dnl
3997
3998 ac_prog=ld
3999 if test "$GCC" = yes; then
4000   # Check if gcc -print-prog-name=ld gives a path.
4001   AC_MSG_CHECKING([for ld used by $CC])
4002   case $host in
4003   *-*-mingw*)
4004     # gcc leaves a trailing carriage return which upsets mingw
4005     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4006   *)
4007     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4008   esac
4009   case $ac_prog in
4010     # Accept absolute paths.
4011     [[\\/]]* | ?:[[\\/]]*)
4012       re_direlt='/[[^/]][[^/]]*/\.\./'
4013       # Canonicalize the pathname of ld
4014       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4015       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4016         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4017       done
4018       test -z "$LD" && LD="$ac_prog"
4019       ;;
4020   "")
4021     # If it fails, then pretend we aren't using GCC.
4022     ac_prog=ld
4023     ;;
4024   *)
4025     # If it is relative, then search for the first ld in PATH.
4026     with_gnu_ld=unknown
4027     ;;
4028   esac
4029 elif test "$with_gnu_ld" = yes; then
4030   AC_MSG_CHECKING([for GNU ld])
4031 else
4032   AC_MSG_CHECKING([for non-GNU ld])
4033 fi
4034 AC_CACHE_VAL(lt_cv_path_LD,
4035 [if test -z "$LD"; then
4036   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4037   for ac_dir in $PATH; do
4038     IFS="$lt_save_ifs"
4039     test -z "$ac_dir" && ac_dir=.
4040     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4041       lt_cv_path_LD="$ac_dir/$ac_prog"
4042       # Check to see if the program is GNU ld.  I'd rather use --version,
4043       # but apparently some variants of GNU ld only accept -v.
4044       # Break only if it was the GNU/non-GNU ld that we prefer.
4045       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4046       *GNU* | *'with BFD'*)
4047         test "$with_gnu_ld" != no && break
4048         ;;
4049       *)
4050         test "$with_gnu_ld" != yes && break
4051         ;;
4052       esac
4053     fi
4054   done
4055   IFS="$lt_save_ifs"
4056 else
4057   lt_cv_path_LD="$LD" # Let the user override the test with a path.
4058 fi])
4059 LD="$lt_cv_path_LD"
4060 if test -n "$LD"; then
4061   AC_MSG_RESULT($LD)
4062 else
4063   AC_MSG_RESULT(no)
4064 fi
4065 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4066 _LT_PATH_LD_GNU
4067 AC_SUBST([LD])
4068
4069 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4070 ])# LT_PATH_LD
4071
4072 # Old names:
4073 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4074 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4075 dnl aclocal-1.4 backwards compatibility:
4076 dnl AC_DEFUN([AM_PROG_LD], [])
4077 dnl AC_DEFUN([AC_PROG_LD], [])
4078
4079
4080 # _LT_PATH_LD_GNU
4081 #- --------------
4082 m4_defun([_LT_PATH_LD_GNU],
4083 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4084 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4085 case `$LD -v 2>&1 </dev/null` in
4086 *GNU* | *'with BFD'*)
4087   lt_cv_prog_gnu_ld=yes
4088   ;;
4089 *)
4090   lt_cv_prog_gnu_ld=no
4091   ;;
4092 esac])
4093 with_gnu_ld=$lt_cv_prog_gnu_ld
4094 ])# _LT_PATH_LD_GNU
4095
4096
4097 # _LT_CMD_RELOAD
4098 # --------------
4099 # find reload flag for linker
4100 #   -- PORTME Some linkers may need a different reload flag.
4101 m4_defun([_LT_CMD_RELOAD],
4102 [AC_CACHE_CHECK([for $LD option to reload object files],
4103   lt_cv_ld_reload_flag,
4104   [lt_cv_ld_reload_flag='-r'])
4105 reload_flag=$lt_cv_ld_reload_flag
4106 case $reload_flag in
4107 "" | " "*) ;;
4108 *) reload_flag=" $reload_flag" ;;
4109 esac
4110 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4111 case $host_os in
4112   cygwin* | mingw* | pw32* | cegcc*)
4113     if test "$GCC" != yes; then
4114       reload_cmds=false
4115     fi
4116     ;;
4117   darwin*)
4118     if test "$GCC" = yes; then
4119       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4120     else
4121       reload_cmds='$LD$reload_flag -o $output$reload_objs'
4122     fi
4123     ;;
4124 esac
4125 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4126 _LT_TAGDECL([], [reload_cmds], [2])dnl
4127 ])# _LT_CMD_RELOAD
4128
4129
4130 # _LT_CHECK_MAGIC_METHOD
4131 # ----------------------
4132 # how to check for library dependencies
4133 #  -- PORTME fill in with the dynamic library characteristics
4134 m4_defun([_LT_CHECK_MAGIC_METHOD],
4135 [m4_require([_LT_DECL_EGREP])
4136 m4_require([_LT_DECL_OBJDUMP])
4137 AC_CACHE_CHECK([how to recognize dependent libraries],
4138 lt_cv_deplibs_check_method,
4139 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4140 lt_cv_file_magic_test_file=
4141 lt_cv_deplibs_check_method='unknown'
4142 # Need to set the preceding variable on all platforms that support
4143 # interlibrary dependencies.
4144 # 'none' -- dependencies not supported.
4145 # `unknown' -- same as none, but documents that we really don't know.
4146 # 'pass_all' -- all dependencies passed with no checks.
4147 # 'test_compile' -- check by making test program.
4148 # 'file_magic [[regex]]' -- check by looking for files in library path
4149 # which responds to the $file_magic_cmd with a given extended regex.
4150 # If you have `file' or equivalent on your system and you're not sure
4151 # whether `pass_all' will *always* work, you probably want this one.
4152
4153 case $host_os in
4154 aix[[4-9]]*)
4155   lt_cv_deplibs_check_method=pass_all
4156   ;;
4157
4158 beos*)
4159   lt_cv_deplibs_check_method=pass_all
4160   ;;
4161
4162 bsdi[[45]]*)
4163   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4164   lt_cv_file_magic_cmd='/usr/bin/file -L'
4165   lt_cv_file_magic_test_file=/shlib/libc.so
4166   ;;
4167
4168 cygwin*)
4169   # func_win32_libid is a shell function defined in ltmain.sh
4170   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4171   lt_cv_file_magic_cmd='func_win32_libid'
4172   ;;
4173
4174 mingw* | pw32*)
4175   # Base MSYS/MinGW do not provide the 'file' command needed by
4176   # func_win32_libid shell function, so use a weaker test based on 'objdump',
4177   # unless we find 'file', for example because we are cross-compiling.
4178   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4179   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4180     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4181     lt_cv_file_magic_cmd='func_win32_libid'
4182   else
4183     # Keep this pattern in sync with the one in func_win32_libid.
4184     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4185     lt_cv_file_magic_cmd='$OBJDUMP -f'
4186   fi
4187   ;;
4188
4189 cegcc*)
4190   # use the weaker test based on 'objdump'. See mingw*.
4191   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4192   lt_cv_file_magic_cmd='$OBJDUMP -f'
4193   ;;
4194
4195 darwin* | rhapsody*)
4196   lt_cv_deplibs_check_method=pass_all
4197   ;;
4198
4199 freebsd* | dragonfly*)
4200   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4201     case $host_cpu in
4202     i*86 )
4203       # Not sure whether the presence of OpenBSD here was a mistake.
4204       # Let's accept both of them until this is cleared up.
4205       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4206       lt_cv_file_magic_cmd=/usr/bin/file
4207       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4208       ;;
4209     esac
4210   else
4211     lt_cv_deplibs_check_method=pass_all
4212   fi
4213   ;;
4214
4215 haiku*)
4216   lt_cv_deplibs_check_method=pass_all
4217   ;;
4218
4219 hpux10.20* | hpux11*)
4220   lt_cv_file_magic_cmd=/usr/bin/file
4221   case $host_cpu in
4222   ia64*)
4223     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4224     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4225     ;;
4226   hppa*64*)
4227     [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]']
4228     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4229     ;;
4230   *)
4231     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4232     lt_cv_file_magic_test_file=/usr/lib/libc.sl
4233     ;;
4234   esac
4235   ;;
4236
4237 interix[[3-9]]*)
4238   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4239   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4240   ;;
4241
4242 irix5* | irix6* | nonstopux*)
4243   case $LD in
4244   *-32|*"-32 ") libmagic=32-bit;;
4245   *-n32|*"-n32 ") libmagic=N32;;
4246   *-64|*"-64 ") libmagic=64-bit;;
4247   *) libmagic=never-match;;
4248   esac
4249   lt_cv_deplibs_check_method=pass_all
4250   ;;
4251
4252 # This must be glibc/ELF.
4253 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4254   lt_cv_deplibs_check_method=pass_all
4255   ;;
4256
4257 netbsd* | netbsdelf*-gnu)
4258   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4259     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4260   else
4261     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4262   fi
4263   ;;
4264
4265 newos6*)
4266   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4267   lt_cv_file_magic_cmd=/usr/bin/file
4268   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4269   ;;
4270
4271 *nto* | *qnx*)
4272   lt_cv_deplibs_check_method=pass_all
4273   ;;
4274
4275 openbsd*)
4276   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4277     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4278   else
4279     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4280   fi
4281   ;;
4282
4283 osf3* | osf4* | osf5*)
4284   lt_cv_deplibs_check_method=pass_all
4285   ;;
4286
4287 rdos*)
4288   lt_cv_deplibs_check_method=pass_all
4289   ;;
4290
4291 solaris*)
4292   lt_cv_deplibs_check_method=pass_all
4293   ;;
4294
4295 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4296   lt_cv_deplibs_check_method=pass_all
4297   ;;
4298
4299 sysv4 | sysv4.3*)
4300   case $host_vendor in
4301   motorola)
4302     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]]'
4303     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4304     ;;
4305   ncr)
4306     lt_cv_deplibs_check_method=pass_all
4307     ;;
4308   sequent)
4309     lt_cv_file_magic_cmd='/bin/file'
4310     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4311     ;;
4312   sni)
4313     lt_cv_file_magic_cmd='/bin/file'
4314     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4315     lt_cv_file_magic_test_file=/lib/libc.so
4316     ;;
4317   siemens)
4318     lt_cv_deplibs_check_method=pass_all
4319     ;;
4320   pc)
4321     lt_cv_deplibs_check_method=pass_all
4322     ;;
4323   esac
4324   ;;
4325
4326 tpf*)
4327   lt_cv_deplibs_check_method=pass_all
4328   ;;
4329 esac
4330 ])
4331
4332 file_magic_glob=
4333 want_nocaseglob=no
4334 if test "$build" = "$host"; then
4335   case $host_os in
4336   mingw* | pw32*)
4337     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4338       want_nocaseglob=yes
4339     else
4340       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4341     fi
4342     ;;
4343   esac
4344 fi
4345
4346 file_magic_cmd=$lt_cv_file_magic_cmd
4347 deplibs_check_method=$lt_cv_deplibs_check_method
4348 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4349
4350 _LT_DECL([], [deplibs_check_method], [1],
4351     [Method to check whether dependent libraries are shared objects])
4352 _LT_DECL([], [file_magic_cmd], [1],
4353     [Command to use when deplibs_check_method = "file_magic"])
4354 _LT_DECL([], [file_magic_glob], [1],
4355     [How to find potential files when deplibs_check_method = "file_magic"])
4356 _LT_DECL([], [want_nocaseglob], [1],
4357     [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4358 ])# _LT_CHECK_MAGIC_METHOD
4359
4360
4361 # LT_PATH_NM
4362 # ----------
4363 # find the pathname to a BSD- or MS-compatible name lister
4364 AC_DEFUN([LT_PATH_NM],
4365 [AC_REQUIRE([AC_PROG_CC])dnl
4366 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4367 [if test -n "$NM"; then
4368   # Let the user override the test.
4369   lt_cv_path_NM="$NM"
4370 else
4371   lt_nm_to_check="${ac_tool_prefix}nm"
4372   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4373     lt_nm_to_check="$lt_nm_to_check nm"
4374   fi
4375   for lt_tmp_nm in $lt_nm_to_check; do
4376     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4377     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4378       IFS="$lt_save_ifs"
4379       test -z "$ac_dir" && ac_dir=.
4380       tmp_nm="$ac_dir/$lt_tmp_nm"
4381       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4382         # Check to see if the nm accepts a BSD-compat flag.
4383         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4384         #   nm: unknown option "B" ignored
4385         # Tru64's nm complains that /dev/null is an invalid object file
4386         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4387         */dev/null* | *'Invalid file or object type'*)
4388           lt_cv_path_NM="$tmp_nm -B"
4389           break
4390           ;;
4391         *)
4392           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4393           */dev/null*)
4394             lt_cv_path_NM="$tmp_nm -p"
4395             break
4396             ;;
4397           *)
4398             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4399             continue # so that we can try to find one that supports BSD flags
4400             ;;
4401           esac
4402           ;;
4403         esac
4404       fi
4405     done
4406     IFS="$lt_save_ifs"
4407   done
4408   : ${lt_cv_path_NM=no}
4409 fi])
4410 if test "$lt_cv_path_NM" != "no"; then
4411   NM="$lt_cv_path_NM"
4412 else
4413   # Didn't find any BSD compatible name lister, look for dumpbin.
4414   if test -n "$DUMPBIN"; then :
4415     # Let the user override the test.
4416   else
4417     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4418     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4419     *COFF*)
4420       DUMPBIN="$DUMPBIN -symbols"
4421       ;;
4422     *)
4423       DUMPBIN=:
4424       ;;
4425     esac
4426   fi
4427   AC_SUBST([DUMPBIN])
4428   if test "$DUMPBIN" != ":"; then
4429     NM="$DUMPBIN"
4430   fi
4431 fi
4432 test -z "$NM" && NM=nm
4433 AC_SUBST([NM])
4434 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4435
4436 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4437   [lt_cv_nm_interface="BSD nm"
4438   echo "int some_variable = 0;" > conftest.$ac_ext
4439   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4440   (eval "$ac_compile" 2>conftest.err)
4441   cat conftest.err >&AS_MESSAGE_LOG_FD
4442   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4443   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4444   cat conftest.err >&AS_MESSAGE_LOG_FD
4445   (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4446   cat conftest.out >&AS_MESSAGE_LOG_FD
4447   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4448     lt_cv_nm_interface="MS dumpbin"
4449   fi
4450   rm -f conftest*])
4451 ])# LT_PATH_NM
4452
4453 # Old names:
4454 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4455 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4456 dnl aclocal-1.4 backwards compatibility:
4457 dnl AC_DEFUN([AM_PROG_NM], [])
4458 dnl AC_DEFUN([AC_PROG_NM], [])
4459
4460 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4461 # --------------------------------
4462 # how to determine the name of the shared library
4463 # associated with a specific link library.
4464 #  -- PORTME fill in with the dynamic library characteristics
4465 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4466 [m4_require([_LT_DECL_EGREP])
4467 m4_require([_LT_DECL_OBJDUMP])
4468 m4_require([_LT_DECL_DLLTOOL])
4469 AC_CACHE_CHECK([how to associate runtime and link libraries],
4470 lt_cv_sharedlib_from_linklib_cmd,
4471 [lt_cv_sharedlib_from_linklib_cmd='unknown'
4472
4473 case $host_os in
4474 cygwin* | mingw* | pw32* | cegcc*)
4475   # two different shell functions defined in ltmain.sh
4476   # decide which to use based on capabilities of $DLLTOOL
4477   case `$DLLTOOL --help 2>&1` in
4478   *--identify-strict*)
4479     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4480     ;;
4481   *)
4482     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4483     ;;
4484   esac
4485   ;;
4486 *)
4487   # fallback: assume linklib IS sharedlib
4488   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4489   ;;
4490 esac
4491 ])
4492 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4493 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4494
4495 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4496     [Command to associate shared and link libraries])
4497 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4498
4499
4500 # _LT_PATH_MANIFEST_TOOL
4501 # ----------------------
4502 # locate the manifest tool
4503 m4_defun([_LT_PATH_MANIFEST_TOOL],
4504 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4505 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4506 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4507   [lt_cv_path_mainfest_tool=no
4508   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4509   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4510   cat conftest.err >&AS_MESSAGE_LOG_FD
4511   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4512     lt_cv_path_mainfest_tool=yes
4513   fi
4514   rm -f conftest*])
4515 if test "x$lt_cv_path_mainfest_tool" != xyes; then
4516   MANIFEST_TOOL=:
4517 fi
4518 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4519 ])# _LT_PATH_MANIFEST_TOOL
4520
4521
4522 # LT_LIB_M
4523 # --------
4524 # check for math library
4525 AC_DEFUN([LT_LIB_M],
4526 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4527 LIBM=
4528 case $host in
4529 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4530   # These system don't have libm, or don't need it
4531   ;;
4532 *-ncr-sysv4.3*)
4533   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4534   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4535   ;;
4536 *)
4537   AC_CHECK_LIB(m, cos, LIBM="-lm")
4538   ;;
4539 esac
4540 AC_SUBST([LIBM])
4541 ])# LT_LIB_M
4542
4543 # Old name:
4544 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4545 dnl aclocal-1.4 backwards compatibility:
4546 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4547
4548
4549 # _LT_COMPILER_NO_RTTI([TAGNAME])
4550 # -------------------------------
4551 m4_defun([_LT_COMPILER_NO_RTTI],
4552 [m4_require([_LT_TAG_COMPILER])dnl
4553
4554 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4555
4556 if test "$GCC" = yes; then
4557   case $cc_basename in
4558   nvcc*)
4559     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4560   *)
4561     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4562   esac
4563
4564   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4565     lt_cv_prog_compiler_rtti_exceptions,
4566     [-fno-rtti -fno-exceptions], [],
4567     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4568 fi
4569 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4570         [Compiler flag to turn off builtin functions])
4571 ])# _LT_COMPILER_NO_RTTI
4572
4573
4574 # _LT_CMD_GLOBAL_SYMBOLS
4575 # ----------------------
4576 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4577 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4578 AC_REQUIRE([AC_PROG_CC])dnl
4579 AC_REQUIRE([AC_PROG_AWK])dnl
4580 AC_REQUIRE([LT_PATH_NM])dnl
4581 AC_REQUIRE([LT_PATH_LD])dnl
4582 m4_require([_LT_DECL_SED])dnl
4583 m4_require([_LT_DECL_EGREP])dnl
4584 m4_require([_LT_TAG_COMPILER])dnl
4585
4586 # Check for command to grab the raw symbol name followed by C symbol from nm.
4587 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4588 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4589 [
4590 # These are sane defaults that work on at least a few old systems.
4591 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4592
4593 # Character class describing NM global symbol codes.
4594 symcode='[[BCDEGRST]]'
4595
4596 # Regexp to match symbols that can be accessed directly from C.
4597 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4598
4599 # Define system-specific variables.
4600 case $host_os in
4601 aix*)
4602   symcode='[[BCDT]]'
4603   ;;
4604 cygwin* | mingw* | pw32* | cegcc*)
4605   symcode='[[ABCDGISTW]]'
4606   ;;
4607 hpux*)
4608   if test "$host_cpu" = ia64; then
4609     symcode='[[ABCDEGRST]]'
4610   fi
4611   ;;
4612 irix* | nonstopux*)
4613   symcode='[[BCDEGRST]]'
4614   ;;
4615 osf*)
4616   symcode='[[BCDEGQRST]]'
4617   ;;
4618 solaris*)
4619   symcode='[[BDRT]]'
4620   ;;
4621 sco3.2v5*)
4622   symcode='[[DT]]'
4623   ;;
4624 sysv4.2uw2*)
4625   symcode='[[DT]]'
4626   ;;
4627 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4628   symcode='[[ABDT]]'
4629   ;;
4630 sysv4)
4631   symcode='[[DFNSTU]]'
4632   ;;
4633 esac
4634
4635 # If we're using GNU nm, then use its standard symbol codes.
4636 case `$NM -V 2>&1` in
4637 *GNU* | *'with BFD'*)
4638   symcode='[[ABCDGIRSTW]]' ;;
4639 esac
4640
4641 # Transform an extracted symbol line into a proper C declaration.
4642 # Some systems (esp. on ia64) link data and code symbols differently,
4643 # so use this general approach.
4644 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4645
4646 # Transform an extracted symbol line into symbol name and symbol address
4647 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4648 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'"
4649
4650 # Handle CRLF in mingw tool chain
4651 opt_cr=
4652 case $build_os in
4653 mingw*)
4654   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4655   ;;
4656 esac
4657
4658 # Try without a prefix underscore, then with it.
4659 for ac_symprfx in "" "_"; do
4660
4661   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4662   symxfrm="\\1 $ac_symprfx\\2 \\2"
4663
4664   # Write the raw and C identifiers.
4665   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4666     # Fake it for dumpbin and say T for any non-static function
4667     # and D for any global variable.
4668     # Also find C++ and __fastcall symbols from MSVC++,
4669     # which start with @ or ?.
4670     lt_cv_sys_global_symbol_pipe="$AWK ['"\
4671 "     {last_section=section; section=\$ 3};"\
4672 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4673 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4674 "     \$ 0!~/External *\|/{next};"\
4675 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4676 "     {if(hide[section]) next};"\
4677 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4678 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4679 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4680 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4681 "     ' prfx=^$ac_symprfx]"
4682   else
4683     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4684   fi
4685   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4686
4687   # Check to see that the pipe works correctly.
4688   pipe_works=no
4689
4690   rm -f conftest*
4691   cat > conftest.$ac_ext <<_LT_EOF
4692 #ifdef __cplusplus
4693 extern "C" {
4694 #endif
4695 char nm_test_var;
4696 void nm_test_func(void);
4697 void nm_test_func(void){}
4698 #ifdef __cplusplus
4699 }
4700 #endif
4701 int main(){nm_test_var='a';nm_test_func();return(0);}
4702 _LT_EOF
4703
4704   if AC_TRY_EVAL(ac_compile); then
4705     # Now try to grab the symbols.
4706     nlist=conftest.nm
4707     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4708       # Try sorting and uniquifying the output.
4709       if sort "$nlist" | uniq > "$nlist"T; then
4710         mv -f "$nlist"T "$nlist"
4711       else
4712         rm -f "$nlist"T
4713       fi
4714
4715       # Make sure that we snagged all the symbols we need.
4716       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4717         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4718           cat <<_LT_EOF > conftest.$ac_ext
4719 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4720 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4721 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4722    relocations are performed -- see ld's documentation on pseudo-relocs.  */
4723 # define LT@&t@_DLSYM_CONST
4724 #elif defined(__osf__)
4725 /* This system does not cope well with relocations in const data.  */
4726 # define LT@&t@_DLSYM_CONST
4727 #else
4728 # define LT@&t@_DLSYM_CONST const
4729 #endif
4730
4731 #ifdef __cplusplus
4732 extern "C" {
4733 #endif
4734
4735 _LT_EOF
4736           # Now generate the symbol file.
4737           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4738
4739           cat <<_LT_EOF >> conftest.$ac_ext
4740
4741 /* The mapping between symbol names and symbols.  */
4742 LT@&t@_DLSYM_CONST struct {
4743   const char *name;
4744   void       *address;
4745 }
4746 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4747 {
4748   { "@PROGRAM@", (void *) 0 },
4749 _LT_EOF
4750           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4751           cat <<\_LT_EOF >> conftest.$ac_ext
4752   {0, (void *) 0}
4753 };
4754
4755 /* This works around a problem in FreeBSD linker */
4756 #ifdef FREEBSD_WORKAROUND
4757 static const void *lt_preloaded_setup() {
4758   return lt__PROGRAM__LTX_preloaded_symbols;
4759 }
4760 #endif
4761
4762 #ifdef __cplusplus
4763 }
4764 #endif
4765 _LT_EOF
4766           # Now try linking the two files.
4767           mv conftest.$ac_objext conftstm.$ac_objext
4768           lt_globsym_save_LIBS=$LIBS
4769           lt_globsym_save_CFLAGS=$CFLAGS
4770           LIBS="conftstm.$ac_objext"
4771           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4772           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4773             pipe_works=yes
4774           fi
4775           LIBS=$lt_globsym_save_LIBS
4776           CFLAGS=$lt_globsym_save_CFLAGS
4777         else
4778           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4779         fi
4780       else
4781         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4782       fi
4783     else
4784       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4785     fi
4786   else
4787     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4788     cat conftest.$ac_ext >&5
4789   fi
4790   rm -rf conftest* conftst*
4791
4792   # Do not use the global_symbol_pipe unless it works.
4793   if test "$pipe_works" = yes; then
4794     break
4795   else
4796     lt_cv_sys_global_symbol_pipe=
4797   fi
4798 done
4799 ])
4800 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4801   lt_cv_sys_global_symbol_to_cdecl=
4802 fi
4803 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4804   AC_MSG_RESULT(failed)
4805 else
4806   AC_MSG_RESULT(ok)
4807 fi
4808
4809 # Response file support.
4810 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4811   nm_file_list_spec='@'
4812 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4813   nm_file_list_spec='@'
4814 fi
4815
4816 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4817     [Take the output of nm and produce a listing of raw symbols and C names])
4818 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4819     [Transform the output of nm in a proper C declaration])
4820 _LT_DECL([global_symbol_to_c_name_address],
4821     [lt_cv_sys_global_symbol_to_c_name_address], [1],
4822     [Transform the output of nm in a C name address pair])
4823 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4824     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4825     [Transform the output of nm in a C name address pair when lib prefix is needed])
4826 _LT_DECL([], [nm_file_list_spec], [1],
4827     [Specify filename containing input files for $NM])
4828 ]) # _LT_CMD_GLOBAL_SYMBOLS
4829
4830
4831 # _LT_COMPILER_PIC([TAGNAME])
4832 # ---------------------------
4833 m4_defun([_LT_COMPILER_PIC],
4834 [m4_require([_LT_TAG_COMPILER])dnl
4835 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4836 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4837 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4838
4839 m4_if([$1], [CXX], [
4840   # C++ specific cases for pic, static, wl, etc.
4841   if test "$GXX" = yes; then
4842     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4843     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4844
4845     case $host_os in
4846     aix*)
4847       # All AIX code is PIC.
4848       if test "$host_cpu" = ia64; then
4849         # AIX 5 now supports IA64 processor
4850         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4851       fi
4852       ;;
4853
4854     amigaos*)
4855       case $host_cpu in
4856       powerpc)
4857             # see comment about AmigaOS4 .so support
4858             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4859         ;;
4860       m68k)
4861             # FIXME: we need at least 68020 code to build shared libraries, but
4862             # adding the `-m68020' flag to GCC prevents building anything better,
4863             # like `-m68040'.
4864             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4865         ;;
4866       esac
4867       ;;
4868
4869     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4870       # PIC is the default for these OSes.
4871       ;;
4872     mingw* | cygwin* | os2* | pw32* | cegcc*)
4873       # This hack is so that the source file can tell whether it is being
4874       # built for inclusion in a dll (and should export symbols for example).
4875       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4876       # (--disable-auto-import) libraries
4877       m4_if([$1], [GCJ], [],
4878         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4879       ;;
4880     darwin* | rhapsody*)
4881       # PIC is the default on this platform
4882       # Common symbols not allowed in MH_DYLIB files
4883       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4884       ;;
4885     *djgpp*)
4886       # DJGPP does not support shared libraries at all
4887       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4888       ;;
4889     haiku*)
4890       # PIC is the default for Haiku.
4891       # The "-static" flag exists, but is broken.
4892       _LT_TAGVAR(lt_prog_compiler_static, $1)=
4893       ;;
4894     interix[[3-9]]*)
4895       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4896       # Instead, we relocate shared libraries at runtime.
4897       ;;
4898     sysv4*MP*)
4899       if test -d /usr/nec; then
4900         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4901       fi
4902       ;;
4903     hpux*)
4904       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4905       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4906       # sets the default TLS model and affects inlining.
4907       case $host_cpu in
4908       hppa*64*)
4909         ;;
4910       *)
4911         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4912         ;;
4913       esac
4914       ;;
4915     *qnx* | *nto*)
4916       # QNX uses GNU C++, but need to define -shared option too, otherwise
4917       # it will coredump.
4918       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4919       ;;
4920     *)
4921       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4922       ;;
4923     esac
4924   else
4925     case $host_os in
4926       aix[[4-9]]*)
4927         # All AIX code is PIC.
4928         if test "$host_cpu" = ia64; then
4929           # AIX 5 now supports IA64 processor
4930           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4931         else
4932           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4933         fi
4934         ;;
4935       chorus*)
4936         case $cc_basename in
4937         cxch68*)
4938           # Green Hills C++ Compiler
4939           # _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"
4940           ;;
4941         esac
4942         ;;
4943       mingw* | cygwin* | os2* | pw32* | cegcc*)
4944         # This hack is so that the source file can tell whether it is being
4945         # built for inclusion in a dll (and should export symbols for example).
4946         m4_if([$1], [GCJ], [],
4947           [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4948         ;;
4949       dgux*)
4950         case $cc_basename in
4951           ec++*)
4952             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4953             ;;
4954           ghcx*)
4955             # Green Hills C++ Compiler
4956             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4957             ;;
4958           *)
4959             ;;
4960         esac
4961         ;;
4962       freebsd* | dragonfly*)
4963         # FreeBSD uses GNU C++
4964         ;;
4965       hpux9* | hpux10* | hpux11*)
4966         case $cc_basename in
4967           CC*)
4968             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4969             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4970             if test "$host_cpu" != ia64; then
4971               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4972             fi
4973             ;;
4974           aCC*)
4975             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4976             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4977             case $host_cpu in
4978             hppa*64*|ia64*)
4979               # +Z the default
4980               ;;
4981             *)
4982               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4983               ;;
4984             esac
4985             ;;
4986           *)
4987             ;;
4988         esac
4989         ;;
4990       interix*)
4991         # This is c89, which is MS Visual C++ (no shared libs)
4992         # Anyone wants to do a port?
4993         ;;
4994       irix5* | irix6* | nonstopux*)
4995         case $cc_basename in
4996           CC*)
4997             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4998             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4999             # CC pic flag -KPIC is the default.
5000             ;;
5001           *)
5002             ;;
5003         esac
5004         ;;
5005       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5006         case $cc_basename in
5007           KCC*)
5008             # KAI C++ Compiler
5009             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5010             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5011             ;;
5012           ecpc* )
5013             # old Intel C++ for x86_64 which still supported -KPIC.
5014             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5015             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5016             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5017             ;;
5018           icpc* )
5019             # Intel C++, used to be incompatible with GCC.
5020             # ICC 10 doesn't accept -KPIC any more.
5021             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5022             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5023             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5024             ;;
5025           pgCC* | pgcpp*)
5026             # Portland Group C++ compiler
5027             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5028             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5029             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5030             ;;
5031           cxx*)
5032             # Compaq C++
5033             # Make sure the PIC flag is empty.  It appears that all Alpha
5034             # Linux and Compaq Tru64 Unix objects are PIC.
5035             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5036             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5037             ;;
5038           xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5039             # IBM XL 8.0, 9.0 on PPC and BlueGene
5040             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5041             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5042             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5043             ;;
5044           *)
5045             case `$CC -V 2>&1 | sed 5q` in
5046             *Sun\ C*)
5047               # Sun C++ 5.9
5048               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5049               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5050               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5051               ;;
5052             esac
5053             ;;
5054         esac
5055         ;;
5056       lynxos*)
5057         ;;
5058       m88k*)
5059         ;;
5060       mvs*)
5061         case $cc_basename in
5062           cxx*)
5063             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5064             ;;
5065           *)
5066             ;;
5067         esac
5068         ;;
5069       netbsd* | netbsdelf*-gnu)
5070         ;;
5071       *qnx* | *nto*)
5072         # QNX uses GNU C++, but need to define -shared option too, otherwise
5073         # it will coredump.
5074         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5075         ;;
5076       osf3* | osf4* | osf5*)
5077         case $cc_basename in
5078           KCC*)
5079             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5080             ;;
5081           RCC*)
5082             # Rational C++ 2.4.1
5083             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5084             ;;
5085           cxx*)
5086             # Digital/Compaq C++
5087             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5088             # Make sure the PIC flag is empty.  It appears that all Alpha
5089             # Linux and Compaq Tru64 Unix objects are PIC.
5090             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5091             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5092             ;;
5093           *)
5094             ;;
5095         esac
5096         ;;
5097       psos*)
5098         ;;
5099       solaris*)
5100         case $cc_basename in
5101           CC* | sunCC*)
5102             # Sun C++ 4.2, 5.x and Centerline C++
5103             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5104             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5105             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5106             ;;
5107           gcx*)
5108             # Green Hills C++ Compiler
5109             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5110             ;;
5111           *)
5112             ;;
5113         esac
5114         ;;
5115       sunos4*)
5116         case $cc_basename in
5117           CC*)
5118             # Sun C++ 4.x
5119             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5120             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5121             ;;
5122           lcc*)
5123             # Lucid
5124             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5125             ;;
5126           *)
5127             ;;
5128         esac
5129         ;;
5130       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5131         case $cc_basename in
5132           CC*)
5133             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5134             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5135             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5136             ;;
5137         esac
5138         ;;
5139       tandem*)
5140         case $cc_basename in
5141           NCC*)
5142             # NonStop-UX NCC 3.20
5143             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5144             ;;
5145           *)
5146             ;;
5147         esac
5148         ;;
5149       vxworks*)
5150         ;;
5151       *)
5152         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5153         ;;
5154     esac
5155   fi
5156 ],
5157 [
5158   if test "$GCC" = yes; then
5159     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5160     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5161
5162     case $host_os in
5163       aix*)
5164       # All AIX code is PIC.
5165       if test "$host_cpu" = ia64; then
5166         # AIX 5 now supports IA64 processor
5167         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5168       fi
5169       ;;
5170
5171     amigaos*)
5172       case $host_cpu in
5173       powerpc)
5174             # see comment about AmigaOS4 .so support
5175             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5176         ;;
5177       m68k)
5178             # FIXME: we need at least 68020 code to build shared libraries, but
5179             # adding the `-m68020' flag to GCC prevents building anything better,
5180             # like `-m68040'.
5181             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5182         ;;
5183       esac
5184       ;;
5185
5186     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5187       # PIC is the default for these OSes.
5188       ;;
5189
5190     mingw* | cygwin* | pw32* | os2* | cegcc*)
5191       # This hack is so that the source file can tell whether it is being
5192       # built for inclusion in a dll (and should export symbols for example).
5193       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5194       # (--disable-auto-import) libraries
5195       m4_if([$1], [GCJ], [],
5196         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5197       ;;
5198
5199     darwin* | rhapsody*)
5200       # PIC is the default on this platform
5201       # Common symbols not allowed in MH_DYLIB files
5202       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5203       ;;
5204
5205     haiku*)
5206       # PIC is the default for Haiku.
5207       # The "-static" flag exists, but is broken.
5208       _LT_TAGVAR(lt_prog_compiler_static, $1)=
5209       ;;
5210
5211     hpux*)
5212       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5213       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5214       # sets the default TLS model and affects inlining.
5215       case $host_cpu in
5216       hppa*64*)
5217         # +Z the default
5218         ;;
5219       *)
5220         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5221         ;;
5222       esac
5223       ;;
5224
5225     interix[[3-9]]*)
5226       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5227       # Instead, we relocate shared libraries at runtime.
5228       ;;
5229
5230     msdosdjgpp*)
5231       # Just because we use GCC doesn't mean we suddenly get shared libraries
5232       # on systems that don't support them.
5233       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5234       enable_shared=no
5235       ;;
5236
5237     *nto* | *qnx*)
5238       # QNX uses GNU C++, but need to define -shared option too, otherwise
5239       # it will coredump.
5240       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5241       ;;
5242
5243     sysv4*MP*)
5244       if test -d /usr/nec; then
5245         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5246       fi
5247       ;;
5248
5249     *)
5250       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5251       ;;
5252     esac
5253
5254     case $cc_basename in
5255     nvcc*) # Cuda Compiler Driver 2.2
5256       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5257       if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5258         _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5259       fi
5260       ;;
5261     esac
5262   else
5263     # PORTME Check for flag to pass linker flags through the system compiler.
5264     case $host_os in
5265     aix*)
5266       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5267       if test "$host_cpu" = ia64; then
5268         # AIX 5 now supports IA64 processor
5269         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5270       else
5271         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5272       fi
5273       ;;
5274
5275     mingw* | cygwin* | pw32* | os2* | cegcc*)
5276       # This hack is so that the source file can tell whether it is being
5277       # built for inclusion in a dll (and should export symbols for example).
5278       m4_if([$1], [GCJ], [],
5279         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5280       ;;
5281
5282     hpux9* | hpux10* | hpux11*)
5283       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5284       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5285       # not for PA HP-UX.
5286       case $host_cpu in
5287       hppa*64*|ia64*)
5288         # +Z the default
5289         ;;
5290       *)
5291         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5292         ;;
5293       esac
5294       # Is there a better lt_prog_compiler_static that works with the bundled CC?
5295       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5296       ;;
5297
5298     irix5* | irix6* | nonstopux*)
5299       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5300       # PIC (with -KPIC) is the default.
5301       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5302       ;;
5303
5304     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5305       case $cc_basename in
5306       # old Intel for x86_64 which still supported -KPIC.
5307       ecc*)
5308         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5309         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5310         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5311         ;;
5312       # icc used to be incompatible with GCC.
5313       # ICC 10 doesn't accept -KPIC any more.
5314       icc* | ifort*)
5315         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5316         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5317         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5318         ;;
5319       # Lahey Fortran 8.1.
5320       lf95*)
5321         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5322         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5323         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5324         ;;
5325       nagfor*)
5326         # NAG Fortran compiler
5327         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5328         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5329         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5330         ;;
5331       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5332         # Portland Group compilers (*not* the Pentium gcc compiler,
5333         # which looks to be a dead project)
5334         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5335         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5336         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5337         ;;
5338       ccc*)
5339         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5340         # All Alpha code is PIC.
5341         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5342         ;;
5343       xl* | bgxl* | bgf* | mpixl*)
5344         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5345         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5346         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5347         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5348         ;;
5349       *)
5350         case `$CC -V 2>&1 | sed 5q` in
5351         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5352           # Sun Fortran 8.3 passes all unrecognized flags to the linker
5353           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5354           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5355           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5356           ;;
5357         *Sun\ F* | *Sun*Fortran*)
5358           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5359           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5360           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5361           ;;
5362         *Sun\ C*)
5363           # Sun C 5.9
5364           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5365           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5366           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5367           ;;
5368         *Intel*\ [[CF]]*Compiler*)
5369           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5370           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5371           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5372           ;;
5373         *Portland\ Group*)
5374           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5375           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5376           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5377           ;;
5378         esac
5379         ;;
5380       esac
5381       ;;
5382
5383     newsos6)
5384       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5385       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5386       ;;
5387
5388     *nto* | *qnx*)
5389       # QNX uses GNU C++, but need to define -shared option too, otherwise
5390       # it will coredump.
5391       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5392       ;;
5393
5394     osf3* | osf4* | osf5*)
5395       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5396       # All OSF/1 code is PIC.
5397       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5398       ;;
5399
5400     rdos*)
5401       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5402       ;;
5403
5404     solaris*)
5405       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5406       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5407       case $cc_basename in
5408       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5409         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5410       *)
5411         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5412       esac
5413       ;;
5414
5415     sunos4*)
5416       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5417       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5418       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5419       ;;
5420
5421     sysv4 | sysv4.2uw2* | sysv4.3*)
5422       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5423       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5424       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5425       ;;
5426
5427     sysv4*MP*)
5428       if test -d /usr/nec ;then
5429         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5430         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5431       fi
5432       ;;
5433
5434     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5435       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5436       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5437       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5438       ;;
5439
5440     unicos*)
5441       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5442       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5443       ;;
5444
5445     uts4*)
5446       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5447       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5448       ;;
5449
5450     *)
5451       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5452       ;;
5453     esac
5454   fi
5455 ])
5456 case $host_os in
5457   # For platforms which do not support PIC, -DPIC is meaningless:
5458   *djgpp*)
5459     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5460     ;;
5461   *)
5462     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5463     ;;
5464 esac
5465
5466 AC_CACHE_CHECK([for $compiler option to produce PIC],
5467   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5468   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5469 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5470
5471 #
5472 # Check to make sure the PIC flag actually works.
5473 #
5474 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5475   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5476     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5477     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5478     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5479      "" | " "*) ;;
5480      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5481      esac],
5482     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5483      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5484 fi
5485 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5486         [Additional compiler flags for building library objects])
5487
5488 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5489         [How to pass a linker flag through the compiler])
5490 #
5491 # Check to make sure the static flag actually works.
5492 #
5493 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5494 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5495   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5496   $lt_tmp_static_flag,
5497   [],
5498   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5499 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5500         [Compiler flag to prevent dynamic linking])
5501 ])# _LT_COMPILER_PIC
5502
5503
5504 # _LT_LINKER_SHLIBS([TAGNAME])
5505 # ----------------------------
5506 # See if the linker supports building shared libraries.
5507 m4_defun([_LT_LINKER_SHLIBS],
5508 [AC_REQUIRE([LT_PATH_LD])dnl
5509 AC_REQUIRE([LT_PATH_NM])dnl
5510 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5511 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5512 m4_require([_LT_DECL_EGREP])dnl
5513 m4_require([_LT_DECL_SED])dnl
5514 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5515 m4_require([_LT_TAG_COMPILER])dnl
5516 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5517 m4_if([$1], [CXX], [
5518   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5519   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5520   case $host_os in
5521   aix[[4-9]]*)
5522     # If we're using GNU nm, then we don't want the "-C" option.
5523     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5524     # Also, AIX nm treats weak defined symbols like other global defined
5525     # symbols, whereas GNU nm marks them as "W".
5526     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5527       _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'
5528     else
5529       _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'
5530     fi
5531     ;;
5532   pw32*)
5533     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5534     ;;
5535   cygwin* | mingw* | cegcc*)
5536     case $cc_basename in
5537     cl*)
5538       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5539       ;;
5540     *)
5541       _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'
5542       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5543       ;;
5544     esac
5545     ;;
5546   linux* | k*bsd*-gnu | gnu*)
5547     _LT_TAGVAR(link_all_deplibs, $1)=no
5548     ;;
5549   *)
5550     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5551     ;;
5552   esac
5553 ], [
5554   runpath_var=
5555   _LT_TAGVAR(allow_undefined_flag, $1)=
5556   _LT_TAGVAR(always_export_symbols, $1)=no
5557   _LT_TAGVAR(archive_cmds, $1)=
5558   _LT_TAGVAR(archive_expsym_cmds, $1)=
5559   _LT_TAGVAR(compiler_needs_object, $1)=no
5560   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5561   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5562   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5563   _LT_TAGVAR(hardcode_automatic, $1)=no
5564   _LT_TAGVAR(hardcode_direct, $1)=no
5565   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5566   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5567   _LT_TAGVAR(hardcode_libdir_separator, $1)=
5568   _LT_TAGVAR(hardcode_minus_L, $1)=no
5569   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5570   _LT_TAGVAR(inherit_rpath, $1)=no
5571   _LT_TAGVAR(link_all_deplibs, $1)=unknown
5572   _LT_TAGVAR(module_cmds, $1)=
5573   _LT_TAGVAR(module_expsym_cmds, $1)=
5574   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5575   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5576   _LT_TAGVAR(thread_safe_flag_spec, $1)=
5577   _LT_TAGVAR(whole_archive_flag_spec, $1)=
5578   # include_expsyms should be a list of space-separated symbols to be *always*
5579   # included in the symbol list
5580   _LT_TAGVAR(include_expsyms, $1)=
5581   # exclude_expsyms can be an extended regexp of symbols to exclude
5582   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5583   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5584   # as well as any symbol that contains `d'.
5585   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5586   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5587   # platforms (ab)use it in PIC code, but their linkers get confused if
5588   # the symbol is explicitly referenced.  Since portable code cannot
5589   # rely on this symbol name, it's probably fine to never include it in
5590   # preloaded symbol tables.
5591   # Exclude shared library initialization/finalization symbols.
5592 dnl Note also adjust exclude_expsyms for C++ above.
5593   extract_expsyms_cmds=
5594
5595   case $host_os in
5596   cygwin* | mingw* | pw32* | cegcc*)
5597     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5598     # When not using gcc, we currently assume that we are using
5599     # Microsoft Visual C++.
5600     if test "$GCC" != yes; then
5601       with_gnu_ld=no
5602     fi
5603     ;;
5604   interix*)
5605     # we just hope/assume this is gcc and not c89 (= MSVC++)
5606     with_gnu_ld=yes
5607     ;;
5608   openbsd*)
5609     with_gnu_ld=no
5610     ;;
5611   linux* | k*bsd*-gnu | gnu*)
5612     _LT_TAGVAR(link_all_deplibs, $1)=no
5613     ;;
5614   esac
5615
5616   _LT_TAGVAR(ld_shlibs, $1)=yes
5617
5618   # On some targets, GNU ld is compatible enough with the native linker
5619   # that we're better off using the native interface for both.
5620   lt_use_gnu_ld_interface=no
5621   if test "$with_gnu_ld" = yes; then
5622     case $host_os in
5623       aix*)
5624         # The AIX port of GNU ld has always aspired to compatibility
5625         # with the native linker.  However, as the warning in the GNU ld
5626         # block says, versions before 2.19.5* couldn't really create working
5627         # shared libraries, regardless of the interface used.
5628         case `$LD -v 2>&1` in
5629           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5630           *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5631           *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5632           *)
5633             lt_use_gnu_ld_interface=yes
5634             ;;
5635         esac
5636         ;;
5637       *)
5638         lt_use_gnu_ld_interface=yes
5639         ;;
5640     esac
5641   fi
5642
5643   if test "$lt_use_gnu_ld_interface" = yes; then
5644     # If archive_cmds runs LD, not CC, wlarc should be empty
5645     wlarc='${wl}'
5646
5647     # Set some defaults for GNU ld with shared library support. These
5648     # are reset later if shared libraries are not supported. Putting them
5649     # here allows them to be overridden if necessary.
5650     runpath_var=LD_RUN_PATH
5651     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5652     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5653     # ancient GNU ld didn't support --whole-archive et. al.
5654     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5655       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5656     else
5657       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5658     fi
5659     supports_anon_versioning=no
5660     case `$LD -v 2>&1` in
5661       *GNU\ gold*) supports_anon_versioning=yes ;;
5662       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5663       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5664       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5665       *\ 2.11.*) ;; # other 2.11 versions
5666       *) supports_anon_versioning=yes ;;
5667     esac
5668
5669     # See if GNU ld supports shared libraries.
5670     case $host_os in
5671     aix[[3-9]]*)
5672       # On AIX/PPC, the GNU linker is very broken
5673       if test "$host_cpu" != ia64; then
5674         _LT_TAGVAR(ld_shlibs, $1)=no
5675         cat <<_LT_EOF 1>&2
5676
5677 *** Warning: the GNU linker, at least up to release 2.19, is reported
5678 *** to be unable to reliably create shared libraries on AIX.
5679 *** Therefore, libtool is disabling shared libraries support.  If you
5680 *** really care for shared libraries, you may want to install binutils
5681 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5682 *** You will then need to restart the configuration process.
5683
5684 _LT_EOF
5685       fi
5686       ;;
5687
5688     amigaos*)
5689       case $host_cpu in
5690       powerpc)
5691             # see comment about AmigaOS4 .so support
5692             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5693             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5694         ;;
5695       m68k)
5696             _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)'
5697             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5698             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5699         ;;
5700       esac
5701       ;;
5702
5703     beos*)
5704       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5705         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5706         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5707         # support --undefined.  This deserves some investigation.  FIXME
5708         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5709       else
5710         _LT_TAGVAR(ld_shlibs, $1)=no
5711       fi
5712       ;;
5713
5714     cygwin* | mingw* | pw32* | cegcc*)
5715       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5716       # as there is no search path for DLLs.
5717       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5718       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5719       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5720       _LT_TAGVAR(always_export_symbols, $1)=no
5721       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5722       _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'
5723       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5724
5725       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5726         _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'
5727         # If the export-symbols file already is a .def file (1st line
5728         # is EXPORTS), use it as is; otherwise, prepend...
5729         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5730           cp $export_symbols $output_objdir/$soname.def;
5731         else
5732           echo EXPORTS > $output_objdir/$soname.def;
5733           cat $export_symbols >> $output_objdir/$soname.def;
5734         fi~
5735         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5736       else
5737         _LT_TAGVAR(ld_shlibs, $1)=no
5738       fi
5739       ;;
5740
5741     haiku*)
5742       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5743       _LT_TAGVAR(link_all_deplibs, $1)=yes
5744       ;;
5745
5746     interix[[3-9]]*)
5747       _LT_TAGVAR(hardcode_direct, $1)=no
5748       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5749       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5750       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5751       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5752       # Instead, shared libraries are loaded at an image base (0x10000000 by
5753       # default) and relocated if they conflict, which is a slow very memory
5754       # consuming and fragmenting process.  To avoid this, we pick a random,
5755       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5756       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5757       _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'
5758       _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'
5759       ;;
5760
5761     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5762       tmp_diet=no
5763       if test "$host_os" = linux-dietlibc; then
5764         case $cc_basename in
5765           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
5766         esac
5767       fi
5768       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5769          && test "$tmp_diet" = no
5770       then
5771         tmp_addflag=' $pic_flag'
5772         tmp_sharedflag='-shared'
5773         case $cc_basename,$host_cpu in
5774         pgcc*)                          # Portland Group C compiler
5775           _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'
5776           tmp_addflag=' $pic_flag'
5777           ;;
5778         pgf77* | pgf90* | pgf95* | pgfortran*)
5779                                         # Portland Group f77 and f90 compilers
5780           _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'
5781           tmp_addflag=' $pic_flag -Mnomain' ;;
5782         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
5783           tmp_addflag=' -i_dynamic' ;;
5784         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
5785           tmp_addflag=' -i_dynamic -nofor_main' ;;
5786         ifc* | ifort*)                  # Intel Fortran compiler
5787           tmp_addflag=' -nofor_main' ;;
5788         lf95*)                          # Lahey Fortran 8.1
5789           _LT_TAGVAR(whole_archive_flag_spec, $1)=
5790           tmp_sharedflag='--shared' ;;
5791         xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5792           tmp_sharedflag='-qmkshrobj'
5793           tmp_addflag= ;;
5794         nvcc*)  # Cuda Compiler Driver 2.2
5795           _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'
5796           _LT_TAGVAR(compiler_needs_object, $1)=yes
5797           ;;
5798         esac
5799         case `$CC -V 2>&1 | sed 5q` in
5800         *Sun\ C*)                       # Sun C 5.9
5801           _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'
5802           _LT_TAGVAR(compiler_needs_object, $1)=yes
5803           tmp_sharedflag='-G' ;;
5804         *Sun\ F*)                       # Sun Fortran 8.3
5805           tmp_sharedflag='-G' ;;
5806         esac
5807         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5808
5809         if test "x$supports_anon_versioning" = xyes; then
5810           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5811             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5812             echo "local: *; };" >> $output_objdir/$libname.ver~
5813             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5814         fi
5815
5816         case $cc_basename in
5817         xlf* | bgf* | bgxlf* | mpixlf*)
5818           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5819           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5820           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5821           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5822           if test "x$supports_anon_versioning" = xyes; then
5823             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5824               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5825               echo "local: *; };" >> $output_objdir/$libname.ver~
5826               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5827           fi
5828           ;;
5829         esac
5830       else
5831         _LT_TAGVAR(ld_shlibs, $1)=no
5832       fi
5833       ;;
5834
5835     netbsd* | netbsdelf*-gnu)
5836       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5837         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5838         wlarc=
5839       else
5840         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5841         _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'
5842       fi
5843       ;;
5844
5845     solaris*)
5846       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5847         _LT_TAGVAR(ld_shlibs, $1)=no
5848         cat <<_LT_EOF 1>&2
5849
5850 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5851 *** create shared libraries on Solaris systems.  Therefore, libtool
5852 *** is disabling shared libraries support.  We urge you to upgrade GNU
5853 *** binutils to release 2.9.1 or newer.  Another option is to modify
5854 *** your PATH or compiler configuration so that the native linker is
5855 *** used, and then restart.
5856
5857 _LT_EOF
5858       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5859         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5860         _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'
5861       else
5862         _LT_TAGVAR(ld_shlibs, $1)=no
5863       fi
5864       ;;
5865
5866     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5867       case `$LD -v 2>&1` in
5868         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5869         _LT_TAGVAR(ld_shlibs, $1)=no
5870         cat <<_LT_EOF 1>&2
5871
5872 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5873 *** reliably create shared libraries on SCO systems.  Therefore, libtool
5874 *** is disabling shared libraries support.  We urge you to upgrade GNU
5875 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5876 *** your PATH or compiler configuration so that the native linker is
5877 *** used, and then restart.
5878
5879 _LT_EOF
5880         ;;
5881         *)
5882           # For security reasons, it is highly recommended that you always
5883           # use absolute paths for naming shared libraries, and exclude the
5884           # DT_RUNPATH tag from executables and libraries.  But doing so
5885           # requires that you compile everything twice, which is a pain.
5886           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5887             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5888             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5889             _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'
5890           else
5891             _LT_TAGVAR(ld_shlibs, $1)=no
5892           fi
5893         ;;
5894       esac
5895       ;;
5896
5897     sunos4*)
5898       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5899       wlarc=
5900       _LT_TAGVAR(hardcode_direct, $1)=yes
5901       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5902       ;;
5903
5904     *)
5905       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5906         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5907         _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'
5908       else
5909         _LT_TAGVAR(ld_shlibs, $1)=no
5910       fi
5911       ;;
5912     esac
5913
5914     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5915       runpath_var=
5916       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5917       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5918       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5919     fi
5920   else
5921     # PORTME fill in a description of your system's linker (not GNU ld)
5922     case $host_os in
5923     aix3*)
5924       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5925       _LT_TAGVAR(always_export_symbols, $1)=yes
5926       _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'
5927       # Note: this linker hardcodes the directories in LIBPATH if there
5928       # are no directories specified by -L.
5929       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5930       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5931         # Neither direct hardcoding nor static linking is supported with a
5932         # broken collect2.
5933         _LT_TAGVAR(hardcode_direct, $1)=unsupported
5934       fi
5935       ;;
5936
5937     aix[[4-9]]*)
5938       if test "$host_cpu" = ia64; then
5939         # On IA64, the linker does run time linking by default, so we don't
5940         # have to do anything special.
5941         aix_use_runtimelinking=no
5942         exp_sym_flag='-Bexport'
5943         no_entry_flag=""
5944       else
5945         # If we're using GNU nm, then we don't want the "-C" option.
5946         # -C means demangle to AIX nm, but means don't demangle with GNU nm
5947         # Also, AIX nm treats weak defined symbols like other global
5948         # defined symbols, whereas GNU nm marks them as "W".
5949         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5950           _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'
5951         else
5952           _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'
5953         fi
5954         aix_use_runtimelinking=no
5955
5956         # Test if we are trying to use run time linking or normal
5957         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5958         # need to do runtime linking.
5959         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5960           for ld_flag in $LDFLAGS; do
5961           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5962             aix_use_runtimelinking=yes
5963             break
5964           fi
5965           done
5966           ;;
5967         esac
5968
5969         exp_sym_flag='-bexport'
5970         no_entry_flag='-bnoentry'
5971       fi
5972
5973       # When large executables or shared objects are built, AIX ld can
5974       # have problems creating the table of contents.  If linking a library
5975       # or program results in "error TOC overflow" add -mminimal-toc to
5976       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5977       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5978
5979       _LT_TAGVAR(archive_cmds, $1)=''
5980       _LT_TAGVAR(hardcode_direct, $1)=yes
5981       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5982       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5983       _LT_TAGVAR(link_all_deplibs, $1)=yes
5984       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5985
5986       if test "$GCC" = yes; then
5987         case $host_os in aix4.[[012]]|aix4.[[012]].*)
5988         # We only want to do this on AIX 4.2 and lower, the check
5989         # below for broken collect2 doesn't work under 4.3+
5990           collect2name=`${CC} -print-prog-name=collect2`
5991           if test -f "$collect2name" &&
5992            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5993           then
5994           # We have reworked collect2
5995           :
5996           else
5997           # We have old collect2
5998           _LT_TAGVAR(hardcode_direct, $1)=unsupported
5999           # It fails to find uninstalled libraries when the uninstalled
6000           # path is not listed in the libpath.  Setting hardcode_minus_L
6001           # to unsupported forces relinking
6002           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6003           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6004           _LT_TAGVAR(hardcode_libdir_separator, $1)=
6005           fi
6006           ;;
6007         esac
6008         shared_flag='-shared'
6009         if test "$aix_use_runtimelinking" = yes; then
6010           shared_flag="$shared_flag "'${wl}-G'
6011         fi
6012         _LT_TAGVAR(link_all_deplibs, $1)=no
6013       else
6014         # not using gcc
6015         if test "$host_cpu" = ia64; then
6016         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6017         # chokes on -Wl,-G. The following line is correct:
6018           shared_flag='-G'
6019         else
6020           if test "$aix_use_runtimelinking" = yes; then
6021             shared_flag='${wl}-G'
6022           else
6023             shared_flag='${wl}-bM:SRE'
6024           fi
6025         fi
6026       fi
6027
6028       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6029       # It seems that -bexpall does not export symbols beginning with
6030       # underscore (_), so it is better to generate a list of symbols to export.
6031       _LT_TAGVAR(always_export_symbols, $1)=yes
6032       if test "$aix_use_runtimelinking" = yes; then
6033         # Warning - without using the other runtime loading flags (-brtl),
6034         # -berok will link without error, but may produce a broken library.
6035         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6036         # Determine the default libpath from the value encoded in an
6037         # empty executable.
6038         _LT_SYS_MODULE_PATH_AIX([$1])
6039         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6040         _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"
6041       else
6042         if test "$host_cpu" = ia64; then
6043           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6044           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6045           _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"
6046         else
6047          # Determine the default libpath from the value encoded in an
6048          # empty executable.
6049          _LT_SYS_MODULE_PATH_AIX([$1])
6050          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6051           # Warning - without using the other run time loading flags,
6052           # -berok will link without error, but may produce a broken library.
6053           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6054           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6055           if test "$with_gnu_ld" = yes; then
6056             # We only use this code for GNU lds that support --whole-archive.
6057             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6058           else
6059             # Exported symbols can be pulled into shared objects from archives
6060             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6061           fi
6062           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6063           # This is similar to how AIX traditionally builds its shared libraries.
6064           _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'
6065         fi
6066       fi
6067       ;;
6068
6069     amigaos*)
6070       case $host_cpu in
6071       powerpc)
6072             # see comment about AmigaOS4 .so support
6073             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6074             _LT_TAGVAR(archive_expsym_cmds, $1)=''
6075         ;;
6076       m68k)
6077             _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)'
6078             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6079             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6080         ;;
6081       esac
6082       ;;
6083
6084     bsdi[[45]]*)
6085       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6086       ;;
6087
6088     cygwin* | mingw* | pw32* | cegcc*)
6089       # When not using gcc, we currently assume that we are using
6090       # Microsoft Visual C++.
6091       # hardcode_libdir_flag_spec is actually meaningless, as there is
6092       # no search path for DLLs.
6093       case $cc_basename in
6094       cl*)
6095         # Native MSVC
6096         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6097         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6098         _LT_TAGVAR(always_export_symbols, $1)=yes
6099         _LT_TAGVAR(file_list_spec, $1)='@'
6100         # Tell ltmain to make .lib files, not .a files.
6101         libext=lib
6102         # Tell ltmain to make .dll files, not .so files.
6103         shrext_cmds=".dll"
6104         # FIXME: Setting linknames here is a bad hack.
6105         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6106         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6107             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6108           else
6109             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6110           fi~
6111           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6112           linknames='
6113         # The linker will not automatically build a static lib if we build a DLL.
6114         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6115         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6116         _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6117         _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'
6118         # Don't use ranlib
6119         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6120         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6121           lt_tool_outputfile="@TOOL_OUTPUT@"~
6122           case $lt_outputfile in
6123             *.exe|*.EXE) ;;
6124             *)
6125               lt_outputfile="$lt_outputfile.exe"
6126               lt_tool_outputfile="$lt_tool_outputfile.exe"
6127               ;;
6128           esac~
6129           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6130             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6131             $RM "$lt_outputfile.manifest";
6132           fi'
6133         ;;
6134       *)
6135         # Assume MSVC wrapper
6136         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6137         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6138         # Tell ltmain to make .lib files, not .a files.
6139         libext=lib
6140         # Tell ltmain to make .dll files, not .so files.
6141         shrext_cmds=".dll"
6142         # FIXME: Setting linknames here is a bad hack.
6143         _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6144         # The linker will automatically build a .lib file if we build a DLL.
6145         _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6146         # FIXME: Should let the user specify the lib program.
6147         _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6148         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6149         ;;
6150       esac
6151       ;;
6152
6153     darwin* | rhapsody*)
6154       _LT_DARWIN_LINKER_FEATURES($1)
6155       ;;
6156
6157     dgux*)
6158       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6159       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6160       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6161       ;;
6162
6163     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6164     # support.  Future versions do this automatically, but an explicit c++rt0.o
6165     # does not break anything, and helps significantly (at the cost of a little
6166     # extra space).
6167     freebsd2.2*)
6168       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6169       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6170       _LT_TAGVAR(hardcode_direct, $1)=yes
6171       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6172       ;;
6173
6174     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6175     freebsd2.*)
6176       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6177       _LT_TAGVAR(hardcode_direct, $1)=yes
6178       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6179       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6180       ;;
6181
6182     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6183     freebsd* | dragonfly*)
6184       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6185       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6186       _LT_TAGVAR(hardcode_direct, $1)=yes
6187       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6188       ;;
6189
6190     hpux9*)
6191       if test "$GCC" = yes; then
6192         _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'
6193       else
6194         _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'
6195       fi
6196       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6197       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6198       _LT_TAGVAR(hardcode_direct, $1)=yes
6199
6200       # hardcode_minus_L: Not really in the search PATH,
6201       # but as the default location of the library.
6202       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6203       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6204       ;;
6205
6206     hpux10*)
6207       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6208         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6209       else
6210         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6211       fi
6212       if test "$with_gnu_ld" = no; then
6213         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6214         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6215         _LT_TAGVAR(hardcode_direct, $1)=yes
6216         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6217         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6218         # hardcode_minus_L: Not really in the search PATH,
6219         # but as the default location of the library.
6220         _LT_TAGVAR(hardcode_minus_L, $1)=yes
6221       fi
6222       ;;
6223
6224     hpux11*)
6225       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6226         case $host_cpu in
6227         hppa*64*)
6228           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6229           ;;
6230         ia64*)
6231           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6232           ;;
6233         *)
6234           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6235           ;;
6236         esac
6237       else
6238         case $host_cpu in
6239         hppa*64*)
6240           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6241           ;;
6242         ia64*)
6243           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6244           ;;
6245         *)
6246         m4_if($1, [], [
6247           # Older versions of the 11.00 compiler do not understand -b yet
6248           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6249           _LT_LINKER_OPTION([if $CC understands -b],
6250             _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6251             [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6252             [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6253           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6254           ;;
6255         esac
6256       fi
6257       if test "$with_gnu_ld" = no; then
6258         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6259         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6260
6261         case $host_cpu in
6262         hppa*64*|ia64*)
6263           _LT_TAGVAR(hardcode_direct, $1)=no
6264           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6265           ;;
6266         *)
6267           _LT_TAGVAR(hardcode_direct, $1)=yes
6268           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6269           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6270
6271           # hardcode_minus_L: Not really in the search PATH,
6272           # but as the default location of the library.
6273           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6274           ;;
6275         esac
6276       fi
6277       ;;
6278
6279     irix5* | irix6* | nonstopux*)
6280       if test "$GCC" = yes; then
6281         _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'
6282         # Try to use the -exported_symbol ld option, if it does not
6283         # work, assume that -exports_file does not work either and
6284         # implicitly export all symbols.
6285         # This should be the same for all languages, so no per-tag cache variable.
6286         AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6287           [lt_cv_irix_exported_symbol],
6288           [save_LDFLAGS="$LDFLAGS"
6289            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6290            AC_LINK_IFELSE(
6291              [AC_LANG_SOURCE(
6292                 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6293                               [C++], [[int foo (void) { return 0; }]],
6294                               [Fortran 77], [[
6295       subroutine foo
6296       end]],
6297                               [Fortran], [[
6298       subroutine foo
6299       end]])])],
6300               [lt_cv_irix_exported_symbol=yes],
6301               [lt_cv_irix_exported_symbol=no])
6302            LDFLAGS="$save_LDFLAGS"])
6303         if test "$lt_cv_irix_exported_symbol" = yes; then
6304           _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'
6305         fi
6306       else
6307         _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'
6308         _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'
6309       fi
6310       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6311       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6312       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6313       _LT_TAGVAR(inherit_rpath, $1)=yes
6314       _LT_TAGVAR(link_all_deplibs, $1)=yes
6315       ;;
6316
6317     netbsd* | netbsdelf*-gnu)
6318       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6319         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6320       else
6321         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6322       fi
6323       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6324       _LT_TAGVAR(hardcode_direct, $1)=yes
6325       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6326       ;;
6327
6328     newsos6)
6329       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6330       _LT_TAGVAR(hardcode_direct, $1)=yes
6331       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6332       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6333       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6334       ;;
6335
6336     *nto* | *qnx*)
6337       ;;
6338
6339     openbsd*)
6340       if test -f /usr/libexec/ld.so; then
6341         _LT_TAGVAR(hardcode_direct, $1)=yes
6342         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6343         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6344         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6345           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6346           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6347           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6348           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6349         else
6350           case $host_os in
6351            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6352              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6353              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6354              ;;
6355            *)
6356              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6357              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6358              ;;
6359           esac
6360         fi
6361       else
6362         _LT_TAGVAR(ld_shlibs, $1)=no
6363       fi
6364       ;;
6365
6366     os2*)
6367       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6368       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6369       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6370       _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'
6371       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6372       ;;
6373
6374     osf3*)
6375       if test "$GCC" = yes; then
6376         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6377         _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'
6378       else
6379         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6380         _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'
6381       fi
6382       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6383       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6384       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6385       ;;
6386
6387     osf4* | osf5*)      # as osf3* with the addition of -msym flag
6388       if test "$GCC" = yes; then
6389         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6390         _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'
6391         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6392       else
6393         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6394         _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'
6395         _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~
6396         $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'
6397
6398         # Both c and cxx compiler support -rpath directly
6399         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6400       fi
6401       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6402       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6403       ;;
6404
6405     solaris*)
6406       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6407       if test "$GCC" = yes; then
6408         wlarc='${wl}'
6409         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6410         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6411           $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'
6412       else
6413         case `$CC -V 2>&1` in
6414         *"Compilers 5.0"*)
6415           wlarc=''
6416           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6417           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6418           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6419           ;;
6420         *)
6421           wlarc='${wl}'
6422           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6423           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6424           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6425           ;;
6426         esac
6427       fi
6428       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6429       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6430       case $host_os in
6431       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6432       *)
6433         # The compiler driver will combine and reorder linker options,
6434         # but understands `-z linker_flag'.  GCC discards it without `$wl',
6435         # but is careful enough not to reorder.
6436         # Supported since Solaris 2.6 (maybe 2.5.1?)
6437         if test "$GCC" = yes; then
6438           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6439         else
6440           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6441         fi
6442         ;;
6443       esac
6444       _LT_TAGVAR(link_all_deplibs, $1)=yes
6445       ;;
6446
6447     sunos4*)
6448       if test "x$host_vendor" = xsequent; then
6449         # Use $CC to link under sequent, because it throws in some extra .o
6450         # files that make .init and .fini sections work.
6451         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6452       else
6453         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6454       fi
6455       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6456       _LT_TAGVAR(hardcode_direct, $1)=yes
6457       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6458       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6459       ;;
6460
6461     sysv4)
6462       case $host_vendor in
6463         sni)
6464           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6465           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6466         ;;
6467         siemens)
6468           ## LD is ld it makes a PLAMLIB
6469           ## CC just makes a GrossModule.
6470           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6471           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6472           _LT_TAGVAR(hardcode_direct, $1)=no
6473         ;;
6474         motorola)
6475           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6476           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6477         ;;
6478       esac
6479       runpath_var='LD_RUN_PATH'
6480       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6481       ;;
6482
6483     sysv4.3*)
6484       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6485       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6486       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6487       ;;
6488
6489     sysv4*MP*)
6490       if test -d /usr/nec; then
6491         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6492         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6493         runpath_var=LD_RUN_PATH
6494         hardcode_runpath_var=yes
6495         _LT_TAGVAR(ld_shlibs, $1)=yes
6496       fi
6497       ;;
6498
6499     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6500       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6501       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6502       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6503       runpath_var='LD_RUN_PATH'
6504
6505       if test "$GCC" = yes; then
6506         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6507         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6508       else
6509         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6510         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6511       fi
6512       ;;
6513
6514     sysv5* | sco3.2v5* | sco5v6*)
6515       # Note: We can NOT use -z defs as we might desire, because we do not
6516       # link with -lc, and that would cause any symbols used from libc to
6517       # always be unresolved, which means just about no library would
6518       # ever link correctly.  If we're not using GNU ld we use -z text
6519       # though, which does catch some bad symbols but isn't as heavy-handed
6520       # as -z defs.
6521       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6522       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6523       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6524       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6525       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6526       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6527       _LT_TAGVAR(link_all_deplibs, $1)=yes
6528       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6529       runpath_var='LD_RUN_PATH'
6530
6531       if test "$GCC" = yes; then
6532         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6533         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6534       else
6535         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6536         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6537       fi
6538       ;;
6539
6540     uts4*)
6541       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6542       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6543       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6544       ;;
6545
6546     *)
6547       _LT_TAGVAR(ld_shlibs, $1)=no
6548       ;;
6549     esac
6550
6551     if test x$host_vendor = xsni; then
6552       case $host in
6553       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6554         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6555         ;;
6556       esac
6557     fi
6558   fi
6559 ])
6560 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6561 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6562
6563 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6564
6565 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6566 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6567 _LT_DECL([], [extract_expsyms_cmds], [2],
6568     [The commands to extract the exported symbol list from a shared archive])
6569
6570 #
6571 # Do we need to explicitly link libc?
6572 #
6573 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6574 x|xyes)
6575   # Assume -lc should be added
6576   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6577
6578   if test "$enable_shared" = yes && test "$GCC" = yes; then
6579     case $_LT_TAGVAR(archive_cmds, $1) in
6580     *'~'*)
6581       # FIXME: we may have to deal with multi-command sequences.
6582       ;;
6583     '$CC '*)
6584       # Test whether the compiler implicitly links with -lc since on some
6585       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6586       # to ld, don't add -lc before -lgcc.
6587       AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6588         [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6589         [$RM conftest*
6590         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6591
6592         if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6593           soname=conftest
6594           lib=conftest
6595           libobjs=conftest.$ac_objext
6596           deplibs=
6597           wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6598           pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6599           compiler_flags=-v
6600           linker_flags=-v
6601           verstring=
6602           output_objdir=.
6603           libname=conftest
6604           lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6605           _LT_TAGVAR(allow_undefined_flag, $1)=
6606           if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6607           then
6608             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6609           else
6610             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6611           fi
6612           _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6613         else
6614           cat conftest.err 1>&5
6615         fi
6616         $RM conftest*
6617         ])
6618       _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6619       ;;
6620     esac
6621   fi
6622   ;;
6623 esac
6624
6625 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6626     [Whether or not to add -lc for building shared libraries])
6627 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6628     [enable_shared_with_static_runtimes], [0],
6629     [Whether or not to disallow shared libs when runtime libs are static])
6630 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6631     [Compiler flag to allow reflexive dlopens])
6632 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6633     [Compiler flag to generate shared objects directly from archives])
6634 _LT_TAGDECL([], [compiler_needs_object], [1],
6635     [Whether the compiler copes with passing no objects directly])
6636 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6637     [Create an old-style archive from a shared archive])
6638 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6639     [Create a temporary old-style archive to link instead of a shared archive])
6640 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6641 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6642 _LT_TAGDECL([], [module_cmds], [2],
6643     [Commands used to build a loadable module if different from building
6644     a shared archive.])
6645 _LT_TAGDECL([], [module_expsym_cmds], [2])
6646 _LT_TAGDECL([], [with_gnu_ld], [1],
6647     [Whether we are building with GNU ld or not])
6648 _LT_TAGDECL([], [allow_undefined_flag], [1],
6649     [Flag that allows shared libraries with undefined symbols to be built])
6650 _LT_TAGDECL([], [no_undefined_flag], [1],
6651     [Flag that enforces no undefined symbols])
6652 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6653     [Flag to hardcode $libdir into a binary during linking.
6654     This must work even if $libdir does not exist])
6655 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6656     [Whether we need a single "-rpath" flag with a separated argument])
6657 _LT_TAGDECL([], [hardcode_direct], [0],
6658     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6659     DIR into the resulting binary])
6660 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6661     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6662     DIR into the resulting binary and the resulting library dependency is
6663     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6664     library is relocated])
6665 _LT_TAGDECL([], [hardcode_minus_L], [0],
6666     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6667     into the resulting binary])
6668 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6669     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6670     into the resulting binary])
6671 _LT_TAGDECL([], [hardcode_automatic], [0],
6672     [Set to "yes" if building a shared library automatically hardcodes DIR
6673     into the library and all subsequent libraries and executables linked
6674     against it])
6675 _LT_TAGDECL([], [inherit_rpath], [0],
6676     [Set to yes if linker adds runtime paths of dependent libraries
6677     to runtime path list])
6678 _LT_TAGDECL([], [link_all_deplibs], [0],
6679     [Whether libtool must link a program against all its dependency libraries])
6680 _LT_TAGDECL([], [always_export_symbols], [0],
6681     [Set to "yes" if exported symbols are required])
6682 _LT_TAGDECL([], [export_symbols_cmds], [2],
6683     [The commands to list exported symbols])
6684 _LT_TAGDECL([], [exclude_expsyms], [1],
6685     [Symbols that should not be listed in the preloaded symbols])
6686 _LT_TAGDECL([], [include_expsyms], [1],
6687     [Symbols that must always be exported])
6688 _LT_TAGDECL([], [prelink_cmds], [2],
6689     [Commands necessary for linking programs (against libraries) with templates])
6690 _LT_TAGDECL([], [postlink_cmds], [2],
6691     [Commands necessary for finishing linking programs])
6692 _LT_TAGDECL([], [file_list_spec], [1],
6693     [Specify filename containing input files])
6694 dnl FIXME: Not yet implemented
6695 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6696 dnl    [Compiler flag to generate thread safe objects])
6697 ])# _LT_LINKER_SHLIBS
6698
6699
6700 # _LT_LANG_C_CONFIG([TAG])
6701 # ------------------------
6702 # Ensure that the configuration variables for a C compiler are suitably
6703 # defined.  These variables are subsequently used by _LT_CONFIG to write
6704 # the compiler configuration to `libtool'.
6705 m4_defun([_LT_LANG_C_CONFIG],
6706 [m4_require([_LT_DECL_EGREP])dnl
6707 lt_save_CC="$CC"
6708 AC_LANG_PUSH(C)
6709
6710 # Source file extension for C test sources.
6711 ac_ext=c
6712
6713 # Object file extension for compiled C test sources.
6714 objext=o
6715 _LT_TAGVAR(objext, $1)=$objext
6716
6717 # Code to be used in simple compile tests
6718 lt_simple_compile_test_code="int some_variable = 0;"
6719
6720 # Code to be used in simple link tests
6721 lt_simple_link_test_code='int main(){return(0);}'
6722
6723 _LT_TAG_COMPILER
6724 # Save the default compiler, since it gets overwritten when the other
6725 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6726 compiler_DEFAULT=$CC
6727
6728 # save warnings/boilerplate of simple test code
6729 _LT_COMPILER_BOILERPLATE
6730 _LT_LINKER_BOILERPLATE
6731
6732 if test -n "$compiler"; then
6733   _LT_COMPILER_NO_RTTI($1)
6734   _LT_COMPILER_PIC($1)
6735   _LT_COMPILER_C_O($1)
6736   _LT_COMPILER_FILE_LOCKS($1)
6737   _LT_LINKER_SHLIBS($1)
6738   _LT_SYS_DYNAMIC_LINKER($1)
6739   _LT_LINKER_HARDCODE_LIBPATH($1)
6740   LT_SYS_DLOPEN_SELF
6741   _LT_CMD_STRIPLIB
6742
6743   # Report which library types will actually be built
6744   AC_MSG_CHECKING([if libtool supports shared libraries])
6745   AC_MSG_RESULT([$can_build_shared])
6746
6747   AC_MSG_CHECKING([whether to build shared libraries])
6748   test "$can_build_shared" = "no" && enable_shared=no
6749
6750   # On AIX, shared libraries and static libraries use the same namespace, and
6751   # are all built from PIC.
6752   case $host_os in
6753   aix3*)
6754     test "$enable_shared" = yes && enable_static=no
6755     if test -n "$RANLIB"; then
6756       archive_cmds="$archive_cmds~\$RANLIB \$lib"
6757       postinstall_cmds='$RANLIB $lib'
6758     fi
6759     ;;
6760
6761   aix[[4-9]]*)
6762     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6763       test "$enable_shared" = yes && enable_static=no
6764     fi
6765     ;;
6766   esac
6767   AC_MSG_RESULT([$enable_shared])
6768
6769   AC_MSG_CHECKING([whether to build static libraries])
6770   # Make sure either enable_shared or enable_static is yes.
6771   test "$enable_shared" = yes || enable_static=yes
6772   AC_MSG_RESULT([$enable_static])
6773
6774   _LT_CONFIG($1)
6775 fi
6776 AC_LANG_POP
6777 CC="$lt_save_CC"
6778 ])# _LT_LANG_C_CONFIG
6779
6780
6781 # _LT_LANG_CXX_CONFIG([TAG])
6782 # --------------------------
6783 # Ensure that the configuration variables for a C++ compiler are suitably
6784 # defined.  These variables are subsequently used by _LT_CONFIG to write
6785 # the compiler configuration to `libtool'.
6786 m4_defun([_LT_LANG_CXX_CONFIG],
6787 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6788 m4_require([_LT_DECL_EGREP])dnl
6789 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6790 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6791     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6792     (test "X$CXX" != "Xg++"))) ; then
6793   AC_PROG_CXXCPP
6794 else
6795   _lt_caught_CXX_error=yes
6796 fi
6797
6798 AC_LANG_PUSH(C++)
6799 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6800 _LT_TAGVAR(allow_undefined_flag, $1)=
6801 _LT_TAGVAR(always_export_symbols, $1)=no
6802 _LT_TAGVAR(archive_expsym_cmds, $1)=
6803 _LT_TAGVAR(compiler_needs_object, $1)=no
6804 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6805 _LT_TAGVAR(hardcode_direct, $1)=no
6806 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6807 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6808 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6809 _LT_TAGVAR(hardcode_minus_L, $1)=no
6810 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6811 _LT_TAGVAR(hardcode_automatic, $1)=no
6812 _LT_TAGVAR(inherit_rpath, $1)=no
6813 _LT_TAGVAR(module_cmds, $1)=
6814 _LT_TAGVAR(module_expsym_cmds, $1)=
6815 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6816 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6817 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6818 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6819 _LT_TAGVAR(no_undefined_flag, $1)=
6820 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6821 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6822
6823 # Source file extension for C++ test sources.
6824 ac_ext=cpp
6825
6826 # Object file extension for compiled C++ test sources.
6827 objext=o
6828 _LT_TAGVAR(objext, $1)=$objext
6829
6830 # No sense in running all these tests if we already determined that
6831 # the CXX compiler isn't working.  Some variables (like enable_shared)
6832 # are currently assumed to apply to all compilers on this platform,
6833 # and will be corrupted by setting them based on a non-working compiler.
6834 if test "$_lt_caught_CXX_error" != yes; then
6835   # Code to be used in simple compile tests
6836   lt_simple_compile_test_code="int some_variable = 0;"
6837
6838   # Code to be used in simple link tests
6839   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6840
6841   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6842   _LT_TAG_COMPILER
6843
6844   # save warnings/boilerplate of simple test code
6845   _LT_COMPILER_BOILERPLATE
6846   _LT_LINKER_BOILERPLATE
6847
6848   # Allow CC to be a program name with arguments.
6849   lt_save_CC=$CC
6850   lt_save_CFLAGS=$CFLAGS
6851   lt_save_LD=$LD
6852   lt_save_GCC=$GCC
6853   GCC=$GXX
6854   lt_save_with_gnu_ld=$with_gnu_ld
6855   lt_save_path_LD=$lt_cv_path_LD
6856   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6857     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6858   else
6859     $as_unset lt_cv_prog_gnu_ld
6860   fi
6861   if test -n "${lt_cv_path_LDCXX+set}"; then
6862     lt_cv_path_LD=$lt_cv_path_LDCXX
6863   else
6864     $as_unset lt_cv_path_LD
6865   fi
6866   test -z "${LDCXX+set}" || LD=$LDCXX
6867   CC=${CXX-"c++"}
6868   CFLAGS=$CXXFLAGS
6869   compiler=$CC
6870   _LT_TAGVAR(compiler, $1)=$CC
6871   _LT_CC_BASENAME([$compiler])
6872
6873   if test -n "$compiler"; then
6874     # We don't want -fno-exception when compiling C++ code, so set the
6875     # no_builtin_flag separately
6876     if test "$GXX" = yes; then
6877       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6878     else
6879       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6880     fi
6881
6882     if test "$GXX" = yes; then
6883       # Set up default GNU C++ configuration
6884
6885       LT_PATH_LD
6886
6887       # Check if GNU C++ uses GNU ld as the underlying linker, since the
6888       # archiving commands below assume that GNU ld is being used.
6889       if test "$with_gnu_ld" = yes; then
6890         _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6891         _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'
6892
6893         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6894         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6895
6896         # If archive_cmds runs LD, not CC, wlarc should be empty
6897         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6898         #     investigate it a little bit more. (MM)
6899         wlarc='${wl}'
6900
6901         # ancient GNU ld didn't support --whole-archive et. al.
6902         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6903           $GREP 'no-whole-archive' > /dev/null; then
6904           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6905         else
6906           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6907         fi
6908       else
6909         with_gnu_ld=no
6910         wlarc=
6911
6912         # A generic and very simple default shared library creation
6913         # command for GNU C++ for the case where it uses the native
6914         # linker, instead of GNU ld.  If possible, this setting should
6915         # overridden to take advantage of the native linker features on
6916         # the platform it is being used on.
6917         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6918       fi
6919
6920       # Commands to make compiler produce verbose output that lists
6921       # what "hidden" libraries, object files and flags are used when
6922       # linking a shared library.
6923       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6924
6925     else
6926       GXX=no
6927       with_gnu_ld=no
6928       wlarc=
6929     fi
6930
6931     # PORTME: fill in a description of your system's C++ link characteristics
6932     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6933     _LT_TAGVAR(ld_shlibs, $1)=yes
6934     case $host_os in
6935       aix3*)
6936         # FIXME: insert proper C++ library support
6937         _LT_TAGVAR(ld_shlibs, $1)=no
6938         ;;
6939       aix[[4-9]]*)
6940         if test "$host_cpu" = ia64; then
6941           # On IA64, the linker does run time linking by default, so we don't
6942           # have to do anything special.
6943           aix_use_runtimelinking=no
6944           exp_sym_flag='-Bexport'
6945           no_entry_flag=""
6946         else
6947           aix_use_runtimelinking=no
6948
6949           # Test if we are trying to use run time linking or normal
6950           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6951           # need to do runtime linking.
6952           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6953             for ld_flag in $LDFLAGS; do
6954               case $ld_flag in
6955               *-brtl*)
6956                 aix_use_runtimelinking=yes
6957                 break
6958                 ;;
6959               esac
6960             done
6961             ;;
6962           esac
6963
6964           exp_sym_flag='-bexport'
6965           no_entry_flag='-bnoentry'
6966         fi
6967
6968         # When large executables or shared objects are built, AIX ld can
6969         # have problems creating the table of contents.  If linking a library
6970         # or program results in "error TOC overflow" add -mminimal-toc to
6971         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6972         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6973
6974         _LT_TAGVAR(archive_cmds, $1)=''
6975         _LT_TAGVAR(hardcode_direct, $1)=yes
6976         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6977         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6978         _LT_TAGVAR(link_all_deplibs, $1)=yes
6979         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6980
6981         if test "$GXX" = yes; then
6982           case $host_os in aix4.[[012]]|aix4.[[012]].*)
6983           # We only want to do this on AIX 4.2 and lower, the check
6984           # below for broken collect2 doesn't work under 4.3+
6985           collect2name=`${CC} -print-prog-name=collect2`
6986           if test -f "$collect2name" &&
6987              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6988           then
6989             # We have reworked collect2
6990             :
6991           else
6992             # We have old collect2
6993             _LT_TAGVAR(hardcode_direct, $1)=unsupported
6994             # It fails to find uninstalled libraries when the uninstalled
6995             # path is not listed in the libpath.  Setting hardcode_minus_L
6996             # to unsupported forces relinking
6997             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6998             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6999             _LT_TAGVAR(hardcode_libdir_separator, $1)=
7000           fi
7001           esac
7002           shared_flag='-shared'
7003           if test "$aix_use_runtimelinking" = yes; then
7004             shared_flag="$shared_flag "'${wl}-G'
7005           fi
7006         else
7007           # not using gcc
7008           if test "$host_cpu" = ia64; then
7009           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7010           # chokes on -Wl,-G. The following line is correct:
7011           shared_flag='-G'
7012           else
7013             if test "$aix_use_runtimelinking" = yes; then
7014               shared_flag='${wl}-G'
7015             else
7016               shared_flag='${wl}-bM:SRE'
7017             fi
7018           fi
7019         fi
7020
7021         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7022         # It seems that -bexpall does not export symbols beginning with
7023         # underscore (_), so it is better to generate a list of symbols to
7024         # export.
7025         _LT_TAGVAR(always_export_symbols, $1)=yes
7026         if test "$aix_use_runtimelinking" = yes; then
7027           # Warning - without using the other runtime loading flags (-brtl),
7028           # -berok will link without error, but may produce a broken library.
7029           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7030           # Determine the default libpath from the value encoded in an empty
7031           # executable.
7032           _LT_SYS_MODULE_PATH_AIX([$1])
7033           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7034
7035           _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"
7036         else
7037           if test "$host_cpu" = ia64; then
7038             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7039             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7040             _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"
7041           else
7042             # Determine the default libpath from the value encoded in an
7043             # empty executable.
7044             _LT_SYS_MODULE_PATH_AIX([$1])
7045             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7046             # Warning - without using the other run time loading flags,
7047             # -berok will link without error, but may produce a broken library.
7048             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7049             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7050             if test "$with_gnu_ld" = yes; then
7051               # We only use this code for GNU lds that support --whole-archive.
7052               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7053             else
7054               # Exported symbols can be pulled into shared objects from archives
7055               _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7056             fi
7057             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7058             # This is similar to how AIX traditionally builds its shared
7059             # libraries.
7060             _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'
7061           fi
7062         fi
7063         ;;
7064
7065       beos*)
7066         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7067           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7068           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7069           # support --undefined.  This deserves some investigation.  FIXME
7070           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7071         else
7072           _LT_TAGVAR(ld_shlibs, $1)=no
7073         fi
7074         ;;
7075
7076       chorus*)
7077         case $cc_basename in
7078           *)
7079           # FIXME: insert proper C++ library support
7080           _LT_TAGVAR(ld_shlibs, $1)=no
7081           ;;
7082         esac
7083         ;;
7084
7085       cygwin* | mingw* | pw32* | cegcc*)
7086         case $GXX,$cc_basename in
7087         ,cl* | no,cl*)
7088           # Native MSVC
7089           # hardcode_libdir_flag_spec is actually meaningless, as there is
7090           # no search path for DLLs.
7091           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7092           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7093           _LT_TAGVAR(always_export_symbols, $1)=yes
7094           _LT_TAGVAR(file_list_spec, $1)='@'
7095           # Tell ltmain to make .lib files, not .a files.
7096           libext=lib
7097           # Tell ltmain to make .dll files, not .so files.
7098           shrext_cmds=".dll"
7099           # FIXME: Setting linknames here is a bad hack.
7100           _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7101           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7102               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7103             else
7104               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7105             fi~
7106             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7107             linknames='
7108           # The linker will not automatically build a static lib if we build a DLL.
7109           # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7110           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7111           # Don't use ranlib
7112           _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7113           _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7114             lt_tool_outputfile="@TOOL_OUTPUT@"~
7115             case $lt_outputfile in
7116               *.exe|*.EXE) ;;
7117               *)
7118                 lt_outputfile="$lt_outputfile.exe"
7119                 lt_tool_outputfile="$lt_tool_outputfile.exe"
7120                 ;;
7121             esac~
7122             func_to_tool_file "$lt_outputfile"~
7123             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7124               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7125               $RM "$lt_outputfile.manifest";
7126             fi'
7127           ;;
7128         *)
7129           # g++
7130           # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7131           # as there is no search path for DLLs.
7132           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7133           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7134           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7135           _LT_TAGVAR(always_export_symbols, $1)=no
7136           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7137
7138           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7139             _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'
7140             # If the export-symbols file already is a .def file (1st line
7141             # is EXPORTS), use it as is; otherwise, prepend...
7142             _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7143               cp $export_symbols $output_objdir/$soname.def;
7144             else
7145               echo EXPORTS > $output_objdir/$soname.def;
7146               cat $export_symbols >> $output_objdir/$soname.def;
7147             fi~
7148             $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'
7149           else
7150             _LT_TAGVAR(ld_shlibs, $1)=no
7151           fi
7152           ;;
7153         esac
7154         ;;
7155       darwin* | rhapsody*)
7156         _LT_DARWIN_LINKER_FEATURES($1)
7157         ;;
7158
7159       dgux*)
7160         case $cc_basename in
7161           ec++*)
7162             # FIXME: insert proper C++ library support
7163             _LT_TAGVAR(ld_shlibs, $1)=no
7164             ;;
7165           ghcx*)
7166             # Green Hills C++ Compiler
7167             # FIXME: insert proper C++ library support
7168             _LT_TAGVAR(ld_shlibs, $1)=no
7169             ;;
7170           *)
7171             # FIXME: insert proper C++ library support
7172             _LT_TAGVAR(ld_shlibs, $1)=no
7173             ;;
7174         esac
7175         ;;
7176
7177       freebsd2.*)
7178         # C++ shared libraries reported to be fairly broken before
7179         # switch to ELF
7180         _LT_TAGVAR(ld_shlibs, $1)=no
7181         ;;
7182
7183       freebsd-elf*)
7184         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7185         ;;
7186
7187       freebsd* | dragonfly*)
7188         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7189         # conventions
7190         _LT_TAGVAR(ld_shlibs, $1)=yes
7191         ;;
7192
7193       haiku*)
7194         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7195         _LT_TAGVAR(link_all_deplibs, $1)=yes
7196         ;;
7197
7198       hpux9*)
7199         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7200         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7201         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7202         _LT_TAGVAR(hardcode_direct, $1)=yes
7203         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7204                                              # but as the default
7205                                              # location of the library.
7206
7207         case $cc_basename in
7208           CC*)
7209             # FIXME: insert proper C++ library support
7210             _LT_TAGVAR(ld_shlibs, $1)=no
7211             ;;
7212           aCC*)
7213             _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'
7214             # Commands to make compiler produce verbose output that lists
7215             # what "hidden" libraries, object files and flags are used when
7216             # linking a shared library.
7217             #
7218             # There doesn't appear to be a way to prevent this compiler from
7219             # explicitly linking system object files so we need to strip them
7220             # from the output so that they don't get included in the library
7221             # dependencies.
7222             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"'
7223             ;;
7224           *)
7225             if test "$GXX" = yes; then
7226               _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'
7227             else
7228               # FIXME: insert proper C++ library support
7229               _LT_TAGVAR(ld_shlibs, $1)=no
7230             fi
7231             ;;
7232         esac
7233         ;;
7234
7235       hpux10*|hpux11*)
7236         if test $with_gnu_ld = no; then
7237           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7238           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7239
7240           case $host_cpu in
7241             hppa*64*|ia64*)
7242               ;;
7243             *)
7244               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7245               ;;
7246           esac
7247         fi
7248         case $host_cpu in
7249           hppa*64*|ia64*)
7250             _LT_TAGVAR(hardcode_direct, $1)=no
7251             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7252             ;;
7253           *)
7254             _LT_TAGVAR(hardcode_direct, $1)=yes
7255             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7256             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7257                                                  # but as the default
7258                                                  # location of the library.
7259             ;;
7260         esac
7261
7262         case $cc_basename in
7263           CC*)
7264             # FIXME: insert proper C++ library support
7265             _LT_TAGVAR(ld_shlibs, $1)=no
7266             ;;
7267           aCC*)
7268             case $host_cpu in
7269               hppa*64*)
7270                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7271                 ;;
7272               ia64*)
7273                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7274                 ;;
7275               *)
7276                 _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'
7277                 ;;
7278             esac
7279             # Commands to make compiler produce verbose output that lists
7280             # what "hidden" libraries, object files and flags are used when
7281             # linking a shared library.
7282             #
7283             # There doesn't appear to be a way to prevent this compiler from
7284             # explicitly linking system object files so we need to strip them
7285             # from the output so that they don't get included in the library
7286             # dependencies.
7287             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $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"'
7288             ;;
7289           *)
7290             if test "$GXX" = yes; then
7291               if test $with_gnu_ld = no; then
7292                 case $host_cpu in
7293                   hppa*64*)
7294                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7295                     ;;
7296                   ia64*)
7297                     _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'
7298                     ;;
7299                   *)
7300                     _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'
7301                     ;;
7302                 esac
7303               fi
7304             else
7305               # FIXME: insert proper C++ library support
7306               _LT_TAGVAR(ld_shlibs, $1)=no
7307             fi
7308             ;;
7309         esac
7310         ;;
7311
7312       interix[[3-9]]*)
7313         _LT_TAGVAR(hardcode_direct, $1)=no
7314         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7315         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7316         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7317         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7318         # Instead, shared libraries are loaded at an image base (0x10000000 by
7319         # default) and relocated if they conflict, which is a slow very memory
7320         # consuming and fragmenting process.  To avoid this, we pick a random,
7321         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7322         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7323         _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'
7324         _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'
7325         ;;
7326       irix5* | irix6*)
7327         case $cc_basename in
7328           CC*)
7329             # SGI C++
7330             _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'
7331
7332             # Archives containing C++ object files must be created using
7333             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7334             # necessary to make sure instantiated templates are included
7335             # in the archive.
7336             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7337             ;;
7338           *)
7339             if test "$GXX" = yes; then
7340               if test "$with_gnu_ld" = no; then
7341                 _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'
7342               else
7343                 _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'
7344               fi
7345             fi
7346             _LT_TAGVAR(link_all_deplibs, $1)=yes
7347             ;;
7348         esac
7349         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7350         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7351         _LT_TAGVAR(inherit_rpath, $1)=yes
7352         ;;
7353
7354       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7355         case $cc_basename in
7356           KCC*)
7357             # Kuck and Associates, Inc. (KAI) C++ Compiler
7358
7359             # KCC will only create a shared library if the output file
7360             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7361             # to its proper name (with version) after linking.
7362             _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'
7363             _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'
7364             # Commands to make compiler produce verbose output that lists
7365             # what "hidden" libraries, object files and flags are used when
7366             # linking a shared library.
7367             #
7368             # There doesn't appear to be a way to prevent this compiler from
7369             # explicitly linking system object files so we need to strip them
7370             # from the output so that they don't get included in the library
7371             # dependencies.
7372             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"'
7373
7374             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7375             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7376
7377             # Archives containing C++ object files must be created using
7378             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7379             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7380             ;;
7381           icpc* | ecpc* )
7382             # Intel C++
7383             with_gnu_ld=yes
7384             # version 8.0 and above of icpc choke on multiply defined symbols
7385             # if we add $predep_objects and $postdep_objects, however 7.1 and
7386             # earlier do not add the objects themselves.
7387             case `$CC -V 2>&1` in
7388               *"Version 7."*)
7389                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7390                 _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'
7391                 ;;
7392               *)  # Version 8.0 or newer
7393                 tmp_idyn=
7394                 case $host_cpu in
7395                   ia64*) tmp_idyn=' -i_dynamic';;
7396                 esac
7397                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7398                 _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'
7399                 ;;
7400             esac
7401             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7402             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7403             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7404             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7405             ;;
7406           pgCC* | pgcpp*)
7407             # Portland Group C++ compiler
7408             case `$CC -V` in
7409             *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7410               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7411                 rm -rf $tpldir~
7412                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7413                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7414               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7415                 rm -rf $tpldir~
7416                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7417                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7418                 $RANLIB $oldlib'
7419               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7420                 rm -rf $tpldir~
7421                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7422                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7423               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7424                 rm -rf $tpldir~
7425                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7426                 $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'
7427               ;;
7428             *) # Version 6 and above use weak symbols
7429               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7430               _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'
7431               ;;
7432             esac
7433
7434             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7435             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7436             _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'
7437             ;;
7438           cxx*)
7439             # Compaq C++
7440             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7441             _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'
7442
7443             runpath_var=LD_RUN_PATH
7444             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7445             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7446
7447             # Commands to make compiler produce verbose output that lists
7448             # what "hidden" libraries, object files and flags are used when
7449             # linking a shared library.
7450             #
7451             # There doesn't appear to be a way to prevent this compiler from
7452             # explicitly linking system object files so we need to strip them
7453             # from the output so that they don't get included in the library
7454             # dependencies.
7455             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'
7456             ;;
7457           xl* | mpixl* | bgxl*)
7458             # IBM XL 8.0 on PPC, with GNU ld
7459             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7460             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7461             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7462             if test "x$supports_anon_versioning" = xyes; then
7463               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7464                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7465                 echo "local: *; };" >> $output_objdir/$libname.ver~
7466                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7467             fi
7468             ;;
7469           *)
7470             case `$CC -V 2>&1 | sed 5q` in
7471             *Sun\ C*)
7472               # Sun C++ 5.9
7473               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7474               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7475               _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'
7476               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7477               _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'
7478               _LT_TAGVAR(compiler_needs_object, $1)=yes
7479
7480               # Not sure whether something based on
7481               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7482               # would be better.
7483               output_verbose_link_cmd='func_echo_all'
7484
7485               # Archives containing C++ object files must be created using
7486               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7487               # necessary to make sure instantiated templates are included
7488               # in the archive.
7489               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7490               ;;
7491             esac
7492             ;;
7493         esac
7494         ;;
7495
7496       lynxos*)
7497         # FIXME: insert proper C++ library support
7498         _LT_TAGVAR(ld_shlibs, $1)=no
7499         ;;
7500
7501       m88k*)
7502         # FIXME: insert proper C++ library support
7503         _LT_TAGVAR(ld_shlibs, $1)=no
7504         ;;
7505
7506       mvs*)
7507         case $cc_basename in
7508           cxx*)
7509             # FIXME: insert proper C++ library support
7510             _LT_TAGVAR(ld_shlibs, $1)=no
7511             ;;
7512           *)
7513             # FIXME: insert proper C++ library support
7514             _LT_TAGVAR(ld_shlibs, $1)=no
7515             ;;
7516         esac
7517         ;;
7518
7519       netbsd*)
7520         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7521           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7522           wlarc=
7523           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7524           _LT_TAGVAR(hardcode_direct, $1)=yes
7525           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7526         fi
7527         # Workaround some broken pre-1.5 toolchains
7528         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7529         ;;
7530
7531       *nto* | *qnx*)
7532         _LT_TAGVAR(ld_shlibs, $1)=yes
7533         ;;
7534
7535       openbsd2*)
7536         # C++ shared libraries are fairly broken
7537         _LT_TAGVAR(ld_shlibs, $1)=no
7538         ;;
7539
7540       openbsd*)
7541         if test -f /usr/libexec/ld.so; then
7542           _LT_TAGVAR(hardcode_direct, $1)=yes
7543           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7544           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7545           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7546           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7547           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7548             _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'
7549             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7550             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7551           fi
7552           output_verbose_link_cmd=func_echo_all
7553         else
7554           _LT_TAGVAR(ld_shlibs, $1)=no
7555         fi
7556         ;;
7557
7558       osf3* | osf4* | osf5*)
7559         case $cc_basename in
7560           KCC*)
7561             # Kuck and Associates, Inc. (KAI) C++ Compiler
7562
7563             # KCC will only create a shared library if the output file
7564             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7565             # to its proper name (with version) after linking.
7566             _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'
7567
7568             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7569             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7570
7571             # Archives containing C++ object files must be created using
7572             # the KAI C++ compiler.
7573             case $host in
7574               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7575               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7576             esac
7577             ;;
7578           RCC*)
7579             # Rational C++ 2.4.1
7580             # FIXME: insert proper C++ library support
7581             _LT_TAGVAR(ld_shlibs, $1)=no
7582             ;;
7583           cxx*)
7584             case $host in
7585               osf3*)
7586                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7587                 _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'
7588                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7589                 ;;
7590               *)
7591                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7592                 _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'
7593                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7594                   echo "-hidden">> $lib.exp~
7595                   $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~
7596                   $RM $lib.exp'
7597                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7598                 ;;
7599             esac
7600
7601             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7602
7603             # Commands to make compiler produce verbose output that lists
7604             # what "hidden" libraries, object files and flags are used when
7605             # linking a shared library.
7606             #
7607             # There doesn't appear to be a way to prevent this compiler from
7608             # explicitly linking system object files so we need to strip them
7609             # from the output so that they don't get included in the library
7610             # dependencies.
7611             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"'
7612             ;;
7613           *)
7614             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7615               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7616               case $host in
7617                 osf3*)
7618                   _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'
7619                   ;;
7620                 *)
7621                   _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'
7622                   ;;
7623               esac
7624
7625               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7626               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7627
7628               # Commands to make compiler produce verbose output that lists
7629               # what "hidden" libraries, object files and flags are used when
7630               # linking a shared library.
7631               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7632
7633             else
7634               # FIXME: insert proper C++ library support
7635               _LT_TAGVAR(ld_shlibs, $1)=no
7636             fi
7637             ;;
7638         esac
7639         ;;
7640
7641       psos*)
7642         # FIXME: insert proper C++ library support
7643         _LT_TAGVAR(ld_shlibs, $1)=no
7644         ;;
7645
7646       sunos4*)
7647         case $cc_basename in
7648           CC*)
7649             # Sun C++ 4.x
7650             # FIXME: insert proper C++ library support
7651             _LT_TAGVAR(ld_shlibs, $1)=no
7652             ;;
7653           lcc*)
7654             # Lucid
7655             # FIXME: insert proper C++ library support
7656             _LT_TAGVAR(ld_shlibs, $1)=no
7657             ;;
7658           *)
7659             # FIXME: insert proper C++ library support
7660             _LT_TAGVAR(ld_shlibs, $1)=no
7661             ;;
7662         esac
7663         ;;
7664
7665       solaris*)
7666         case $cc_basename in
7667           CC* | sunCC*)
7668             # Sun C++ 4.2, 5.x and Centerline C++
7669             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7670             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7671             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7672             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7673               $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'
7674
7675             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7676             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7677             case $host_os in
7678               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7679               *)
7680                 # The compiler driver will combine and reorder linker options,
7681                 # but understands `-z linker_flag'.
7682                 # Supported since Solaris 2.6 (maybe 2.5.1?)
7683                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7684                 ;;
7685             esac
7686             _LT_TAGVAR(link_all_deplibs, $1)=yes
7687
7688             output_verbose_link_cmd='func_echo_all'
7689
7690             # Archives containing C++ object files must be created using
7691             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7692             # necessary to make sure instantiated templates are included
7693             # in the archive.
7694             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7695             ;;
7696           gcx*)
7697             # Green Hills C++ Compiler
7698             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7699
7700             # The C++ compiler must be used to create the archive.
7701             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7702             ;;
7703           *)
7704             # GNU C++ compiler with Solaris linker
7705             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7706               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7707               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7708                 _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'
7709                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7710                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7711
7712                 # Commands to make compiler produce verbose output that lists
7713                 # what "hidden" libraries, object files and flags are used when
7714                 # linking a shared library.
7715                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7716               else
7717                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7718                 # platform.
7719                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7720                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7721                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7722
7723                 # Commands to make compiler produce verbose output that lists
7724                 # what "hidden" libraries, object files and flags are used when
7725                 # linking a shared library.
7726                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7727               fi
7728
7729               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7730               case $host_os in
7731                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7732                 *)
7733                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7734                   ;;
7735               esac
7736             fi
7737             ;;
7738         esac
7739         ;;
7740
7741     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7742       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7743       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7744       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7745       runpath_var='LD_RUN_PATH'
7746
7747       case $cc_basename in
7748         CC*)
7749           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7750           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7751           ;;
7752         *)
7753           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7754           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7755           ;;
7756       esac
7757       ;;
7758
7759       sysv5* | sco3.2v5* | sco5v6*)
7760         # Note: We can NOT use -z defs as we might desire, because we do not
7761         # link with -lc, and that would cause any symbols used from libc to
7762         # always be unresolved, which means just about no library would
7763         # ever link correctly.  If we're not using GNU ld we use -z text
7764         # though, which does catch some bad symbols but isn't as heavy-handed
7765         # as -z defs.
7766         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7767         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7768         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7769         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7770         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7771         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7772         _LT_TAGVAR(link_all_deplibs, $1)=yes
7773         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7774         runpath_var='LD_RUN_PATH'
7775
7776         case $cc_basename in
7777           CC*)
7778             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7779             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7780             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7781               '"$_LT_TAGVAR(old_archive_cmds, $1)"
7782             _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7783               '"$_LT_TAGVAR(reload_cmds, $1)"
7784             ;;
7785           *)
7786             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7787             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7788             ;;
7789         esac
7790       ;;
7791
7792       tandem*)
7793         case $cc_basename in
7794           NCC*)
7795             # NonStop-UX NCC 3.20
7796             # FIXME: insert proper C++ library support
7797             _LT_TAGVAR(ld_shlibs, $1)=no
7798             ;;
7799           *)
7800             # FIXME: insert proper C++ library support
7801             _LT_TAGVAR(ld_shlibs, $1)=no
7802             ;;
7803         esac
7804         ;;
7805
7806       vxworks*)
7807         # FIXME: insert proper C++ library support
7808         _LT_TAGVAR(ld_shlibs, $1)=no
7809         ;;
7810
7811       *)
7812         # FIXME: insert proper C++ library support
7813         _LT_TAGVAR(ld_shlibs, $1)=no
7814         ;;
7815     esac
7816
7817     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7818     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7819
7820     _LT_TAGVAR(GCC, $1)="$GXX"
7821     _LT_TAGVAR(LD, $1)="$LD"
7822
7823     ## CAVEAT EMPTOR:
7824     ## There is no encapsulation within the following macros, do not change
7825     ## the running order or otherwise move them around unless you know exactly
7826     ## what you are doing...
7827     _LT_SYS_HIDDEN_LIBDEPS($1)
7828     _LT_COMPILER_PIC($1)
7829     _LT_COMPILER_C_O($1)
7830     _LT_COMPILER_FILE_LOCKS($1)
7831     _LT_LINKER_SHLIBS($1)
7832     _LT_SYS_DYNAMIC_LINKER($1)
7833     _LT_LINKER_HARDCODE_LIBPATH($1)
7834
7835     _LT_CONFIG($1)
7836   fi # test -n "$compiler"
7837
7838   CC=$lt_save_CC
7839   CFLAGS=$lt_save_CFLAGS
7840   LDCXX=$LD
7841   LD=$lt_save_LD
7842   GCC=$lt_save_GCC
7843   with_gnu_ld=$lt_save_with_gnu_ld
7844   lt_cv_path_LDCXX=$lt_cv_path_LD
7845   lt_cv_path_LD=$lt_save_path_LD
7846   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7847   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7848 fi # test "$_lt_caught_CXX_error" != yes
7849
7850 AC_LANG_POP
7851 ])# _LT_LANG_CXX_CONFIG
7852
7853
7854 # _LT_FUNC_STRIPNAME_CNF
7855 # ----------------------
7856 # func_stripname_cnf prefix suffix name
7857 # strip PREFIX and SUFFIX off of NAME.
7858 # PREFIX and SUFFIX must not contain globbing or regex special
7859 # characters, hashes, percent signs, but SUFFIX may contain a leading
7860 # dot (in which case that matches only a dot).
7861 #
7862 # This function is identical to the (non-XSI) version of func_stripname,
7863 # except this one can be used by m4 code that may be executed by configure,
7864 # rather than the libtool script.
7865 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7866 AC_REQUIRE([_LT_DECL_SED])
7867 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7868 func_stripname_cnf ()
7869 {
7870   case ${2} in
7871   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7872   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7873   esac
7874 } # func_stripname_cnf
7875 ])# _LT_FUNC_STRIPNAME_CNF
7876
7877 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7878 # ---------------------------------
7879 # Figure out "hidden" library dependencies from verbose
7880 # compiler output when linking a shared library.
7881 # Parse the compiler output and extract the necessary
7882 # objects, libraries and library flags.
7883 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7884 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7885 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7886 # Dependencies to place before and after the object being linked:
7887 _LT_TAGVAR(predep_objects, $1)=
7888 _LT_TAGVAR(postdep_objects, $1)=
7889 _LT_TAGVAR(predeps, $1)=
7890 _LT_TAGVAR(postdeps, $1)=
7891 _LT_TAGVAR(compiler_lib_search_path, $1)=
7892
7893 dnl we can't use the lt_simple_compile_test_code here,
7894 dnl because it contains code intended for an executable,
7895 dnl not a library.  It's possible we should let each
7896 dnl tag define a new lt_????_link_test_code variable,
7897 dnl but it's only used here...
7898 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7899 int a;
7900 void foo (void) { a = 0; }
7901 _LT_EOF
7902 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7903 class Foo
7904 {
7905 public:
7906   Foo (void) { a = 0; }
7907 private:
7908   int a;
7909 };
7910 _LT_EOF
7911 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7912       subroutine foo
7913       implicit none
7914       integer*4 a
7915       a=0
7916       return
7917       end
7918 _LT_EOF
7919 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7920       subroutine foo
7921       implicit none
7922       integer a
7923       a=0
7924       return
7925       end
7926 _LT_EOF
7927 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7928 public class foo {
7929   private int a;
7930   public void bar (void) {
7931     a = 0;
7932   }
7933 };
7934 _LT_EOF
7935 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7936 package foo
7937 func foo() {
7938 }
7939 _LT_EOF
7940 ])
7941
7942 _lt_libdeps_save_CFLAGS=$CFLAGS
7943 case "$CC $CFLAGS " in #(
7944 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7945 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7946 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7947 esac
7948
7949 dnl Parse the compiler output and extract the necessary
7950 dnl objects, libraries and library flags.
7951 if AC_TRY_EVAL(ac_compile); then
7952   # Parse the compiler output and extract the necessary
7953   # objects, libraries and library flags.
7954
7955   # Sentinel used to keep track of whether or not we are before
7956   # the conftest object file.
7957   pre_test_object_deps_done=no
7958
7959   for p in `eval "$output_verbose_link_cmd"`; do
7960     case ${prev}${p} in
7961
7962     -L* | -R* | -l*)
7963        # Some compilers place space between "-{L,R}" and the path.
7964        # Remove the space.
7965        if test $p = "-L" ||
7966           test $p = "-R"; then
7967          prev=$p
7968          continue
7969        fi
7970
7971        # Expand the sysroot to ease extracting the directories later.
7972        if test -z "$prev"; then
7973          case $p in
7974          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7975          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7976          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7977          esac
7978        fi
7979        case $p in
7980        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7981        esac
7982        if test "$pre_test_object_deps_done" = no; then
7983          case ${prev} in
7984          -L | -R)
7985            # Internal compiler library paths should come after those
7986            # provided the user.  The postdeps already come after the
7987            # user supplied libs so there is no need to process them.
7988            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7989              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7990            else
7991              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7992            fi
7993            ;;
7994          # The "-l" case would never come before the object being
7995          # linked, so don't bother handling this case.
7996          esac
7997        else
7998          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7999            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8000          else
8001            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8002          fi
8003        fi
8004        prev=
8005        ;;
8006
8007     *.lto.$objext) ;; # Ignore GCC LTO objects
8008     *.$objext)
8009        # This assumes that the test object file only shows up
8010        # once in the compiler output.
8011        if test "$p" = "conftest.$objext"; then
8012          pre_test_object_deps_done=yes
8013          continue
8014        fi
8015
8016        if test "$pre_test_object_deps_done" = no; then
8017          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8018            _LT_TAGVAR(predep_objects, $1)="$p"
8019          else
8020            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8021          fi
8022        else
8023          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8024            _LT_TAGVAR(postdep_objects, $1)="$p"
8025          else
8026            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8027          fi
8028        fi
8029        ;;
8030
8031     *) ;; # Ignore the rest.
8032
8033     esac
8034   done
8035
8036   # Clean up.
8037   rm -f a.out a.exe
8038 else
8039   echo "libtool.m4: error: problem compiling $1 test program"
8040 fi
8041
8042 $RM -f confest.$objext
8043 CFLAGS=$_lt_libdeps_save_CFLAGS
8044
8045 # PORTME: override above test on systems where it is broken
8046 m4_if([$1], [CXX],
8047 [case $host_os in
8048 interix[[3-9]]*)
8049   # Interix 3.5 installs completely hosed .la files for C++, so rather than
8050   # hack all around it, let's just trust "g++" to DTRT.
8051   _LT_TAGVAR(predep_objects,$1)=
8052   _LT_TAGVAR(postdep_objects,$1)=
8053   _LT_TAGVAR(postdeps,$1)=
8054   ;;
8055
8056 linux*)
8057   case `$CC -V 2>&1 | sed 5q` in
8058   *Sun\ C*)
8059     # Sun C++ 5.9
8060
8061     # The more standards-conforming stlport4 library is
8062     # incompatible with the Cstd library. Avoid specifying
8063     # it if it's in CXXFLAGS. Ignore libCrun as
8064     # -library=stlport4 depends on it.
8065     case " $CXX $CXXFLAGS " in
8066     *" -library=stlport4 "*)
8067       solaris_use_stlport4=yes
8068       ;;
8069     esac
8070
8071     if test "$solaris_use_stlport4" != yes; then
8072       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8073     fi
8074     ;;
8075   esac
8076   ;;
8077
8078 solaris*)
8079   case $cc_basename in
8080   CC* | sunCC*)
8081     # The more standards-conforming stlport4 library is
8082     # incompatible with the Cstd library. Avoid specifying
8083     # it if it's in CXXFLAGS. Ignore libCrun as
8084     # -library=stlport4 depends on it.
8085     case " $CXX $CXXFLAGS " in
8086     *" -library=stlport4 "*)
8087       solaris_use_stlport4=yes
8088       ;;
8089     esac
8090
8091     # Adding this requires a known-good setup of shared libraries for
8092     # Sun compiler versions before 5.6, else PIC objects from an old
8093     # archive will be linked into the output, leading to subtle bugs.
8094     if test "$solaris_use_stlport4" != yes; then
8095       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8096     fi
8097     ;;
8098   esac
8099   ;;
8100 esac
8101 ])
8102
8103 case " $_LT_TAGVAR(postdeps, $1) " in
8104 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8105 esac
8106  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8107 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8108  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8109 fi
8110 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8111     [The directories searched by this compiler when creating a shared library])
8112 _LT_TAGDECL([], [predep_objects], [1],
8113     [Dependencies to place before and after the objects being linked to
8114     create a shared library])
8115 _LT_TAGDECL([], [postdep_objects], [1])
8116 _LT_TAGDECL([], [predeps], [1])
8117 _LT_TAGDECL([], [postdeps], [1])
8118 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8119     [The library search path used internally by the compiler when linking
8120     a shared library])
8121 ])# _LT_SYS_HIDDEN_LIBDEPS
8122
8123
8124 # _LT_LANG_F77_CONFIG([TAG])
8125 # --------------------------
8126 # Ensure that the configuration variables for a Fortran 77 compiler are
8127 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8128 # to write the compiler configuration to `libtool'.
8129 m4_defun([_LT_LANG_F77_CONFIG],
8130 [AC_LANG_PUSH(Fortran 77)
8131 if test -z "$F77" || test "X$F77" = "Xno"; then
8132   _lt_disable_F77=yes
8133 fi
8134
8135 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8136 _LT_TAGVAR(allow_undefined_flag, $1)=
8137 _LT_TAGVAR(always_export_symbols, $1)=no
8138 _LT_TAGVAR(archive_expsym_cmds, $1)=
8139 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8140 _LT_TAGVAR(hardcode_direct, $1)=no
8141 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8142 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8143 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8144 _LT_TAGVAR(hardcode_minus_L, $1)=no
8145 _LT_TAGVAR(hardcode_automatic, $1)=no
8146 _LT_TAGVAR(inherit_rpath, $1)=no
8147 _LT_TAGVAR(module_cmds, $1)=
8148 _LT_TAGVAR(module_expsym_cmds, $1)=
8149 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8150 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8151 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8152 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8153 _LT_TAGVAR(no_undefined_flag, $1)=
8154 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8155 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8156
8157 # Source file extension for f77 test sources.
8158 ac_ext=f
8159
8160 # Object file extension for compiled f77 test sources.
8161 objext=o
8162 _LT_TAGVAR(objext, $1)=$objext
8163
8164 # No sense in running all these tests if we already determined that
8165 # the F77 compiler isn't working.  Some variables (like enable_shared)
8166 # are currently assumed to apply to all compilers on this platform,
8167 # and will be corrupted by setting them based on a non-working compiler.
8168 if test "$_lt_disable_F77" != yes; then
8169   # Code to be used in simple compile tests
8170   lt_simple_compile_test_code="\
8171       subroutine t
8172       return
8173       end
8174 "
8175
8176   # Code to be used in simple link tests
8177   lt_simple_link_test_code="\
8178       program t
8179       end
8180 "
8181
8182   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8183   _LT_TAG_COMPILER
8184
8185   # save warnings/boilerplate of simple test code
8186   _LT_COMPILER_BOILERPLATE
8187   _LT_LINKER_BOILERPLATE
8188
8189   # Allow CC to be a program name with arguments.
8190   lt_save_CC="$CC"
8191   lt_save_GCC=$GCC
8192   lt_save_CFLAGS=$CFLAGS
8193   CC=${F77-"f77"}
8194   CFLAGS=$FFLAGS
8195   compiler=$CC
8196   _LT_TAGVAR(compiler, $1)=$CC
8197   _LT_CC_BASENAME([$compiler])
8198   GCC=$G77
8199   if test -n "$compiler"; then
8200     AC_MSG_CHECKING([if libtool supports shared libraries])
8201     AC_MSG_RESULT([$can_build_shared])
8202
8203     AC_MSG_CHECKING([whether to build shared libraries])
8204     test "$can_build_shared" = "no" && enable_shared=no
8205
8206     # On AIX, shared libraries and static libraries use the same namespace, and
8207     # are all built from PIC.
8208     case $host_os in
8209       aix3*)
8210         test "$enable_shared" = yes && enable_static=no
8211         if test -n "$RANLIB"; then
8212           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8213           postinstall_cmds='$RANLIB $lib'
8214         fi
8215         ;;
8216       aix[[4-9]]*)
8217         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8218           test "$enable_shared" = yes && enable_static=no
8219         fi
8220         ;;
8221     esac
8222     AC_MSG_RESULT([$enable_shared])
8223
8224     AC_MSG_CHECKING([whether to build static libraries])
8225     # Make sure either enable_shared or enable_static is yes.
8226     test "$enable_shared" = yes || enable_static=yes
8227     AC_MSG_RESULT([$enable_static])
8228
8229     _LT_TAGVAR(GCC, $1)="$G77"
8230     _LT_TAGVAR(LD, $1)="$LD"
8231
8232     ## CAVEAT EMPTOR:
8233     ## There is no encapsulation within the following macros, do not change
8234     ## the running order or otherwise move them around unless you know exactly
8235     ## what you are doing...
8236     _LT_COMPILER_PIC($1)
8237     _LT_COMPILER_C_O($1)
8238     _LT_COMPILER_FILE_LOCKS($1)
8239     _LT_LINKER_SHLIBS($1)
8240     _LT_SYS_DYNAMIC_LINKER($1)
8241     _LT_LINKER_HARDCODE_LIBPATH($1)
8242
8243     _LT_CONFIG($1)
8244   fi # test -n "$compiler"
8245
8246   GCC=$lt_save_GCC
8247   CC="$lt_save_CC"
8248   CFLAGS="$lt_save_CFLAGS"
8249 fi # test "$_lt_disable_F77" != yes
8250
8251 AC_LANG_POP
8252 ])# _LT_LANG_F77_CONFIG
8253
8254
8255 # _LT_LANG_FC_CONFIG([TAG])
8256 # -------------------------
8257 # Ensure that the configuration variables for a Fortran compiler are
8258 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8259 # to write the compiler configuration to `libtool'.
8260 m4_defun([_LT_LANG_FC_CONFIG],
8261 [AC_LANG_PUSH(Fortran)
8262
8263 if test -z "$FC" || test "X$FC" = "Xno"; then
8264   _lt_disable_FC=yes
8265 fi
8266
8267 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8268 _LT_TAGVAR(allow_undefined_flag, $1)=
8269 _LT_TAGVAR(always_export_symbols, $1)=no
8270 _LT_TAGVAR(archive_expsym_cmds, $1)=
8271 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8272 _LT_TAGVAR(hardcode_direct, $1)=no
8273 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8274 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8275 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8276 _LT_TAGVAR(hardcode_minus_L, $1)=no
8277 _LT_TAGVAR(hardcode_automatic, $1)=no
8278 _LT_TAGVAR(inherit_rpath, $1)=no
8279 _LT_TAGVAR(module_cmds, $1)=
8280 _LT_TAGVAR(module_expsym_cmds, $1)=
8281 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8282 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8283 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8284 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8285 _LT_TAGVAR(no_undefined_flag, $1)=
8286 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8287 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8288
8289 # Source file extension for fc test sources.
8290 ac_ext=${ac_fc_srcext-f}
8291
8292 # Object file extension for compiled fc test sources.
8293 objext=o
8294 _LT_TAGVAR(objext, $1)=$objext
8295
8296 # No sense in running all these tests if we already determined that
8297 # the FC compiler isn't working.  Some variables (like enable_shared)
8298 # are currently assumed to apply to all compilers on this platform,
8299 # and will be corrupted by setting them based on a non-working compiler.
8300 if test "$_lt_disable_FC" != yes; then
8301   # Code to be used in simple compile tests
8302   lt_simple_compile_test_code="\
8303       subroutine t
8304       return
8305       end
8306 "
8307
8308   # Code to be used in simple link tests
8309   lt_simple_link_test_code="\
8310       program t
8311       end
8312 "
8313
8314   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8315   _LT_TAG_COMPILER
8316
8317   # save warnings/boilerplate of simple test code
8318   _LT_COMPILER_BOILERPLATE
8319   _LT_LINKER_BOILERPLATE
8320
8321   # Allow CC to be a program name with arguments.
8322   lt_save_CC="$CC"
8323   lt_save_GCC=$GCC
8324   lt_save_CFLAGS=$CFLAGS
8325   CC=${FC-"f95"}
8326   CFLAGS=$FCFLAGS
8327   compiler=$CC
8328   GCC=$ac_cv_fc_compiler_gnu
8329
8330   _LT_TAGVAR(compiler, $1)=$CC
8331   _LT_CC_BASENAME([$compiler])
8332
8333   if test -n "$compiler"; then
8334     AC_MSG_CHECKING([if libtool supports shared libraries])
8335     AC_MSG_RESULT([$can_build_shared])
8336
8337     AC_MSG_CHECKING([whether to build shared libraries])
8338     test "$can_build_shared" = "no" && enable_shared=no
8339
8340     # On AIX, shared libraries and static libraries use the same namespace, and
8341     # are all built from PIC.
8342     case $host_os in
8343       aix3*)
8344         test "$enable_shared" = yes && enable_static=no
8345         if test -n "$RANLIB"; then
8346           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8347           postinstall_cmds='$RANLIB $lib'
8348         fi
8349         ;;
8350       aix[[4-9]]*)
8351         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8352           test "$enable_shared" = yes && enable_static=no
8353         fi
8354         ;;
8355     esac
8356     AC_MSG_RESULT([$enable_shared])
8357
8358     AC_MSG_CHECKING([whether to build static libraries])
8359     # Make sure either enable_shared or enable_static is yes.
8360     test "$enable_shared" = yes || enable_static=yes
8361     AC_MSG_RESULT([$enable_static])
8362
8363     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8364     _LT_TAGVAR(LD, $1)="$LD"
8365
8366     ## CAVEAT EMPTOR:
8367     ## There is no encapsulation within the following macros, do not change
8368     ## the running order or otherwise move them around unless you know exactly
8369     ## what you are doing...
8370     _LT_SYS_HIDDEN_LIBDEPS($1)
8371     _LT_COMPILER_PIC($1)
8372     _LT_COMPILER_C_O($1)
8373     _LT_COMPILER_FILE_LOCKS($1)
8374     _LT_LINKER_SHLIBS($1)
8375     _LT_SYS_DYNAMIC_LINKER($1)
8376     _LT_LINKER_HARDCODE_LIBPATH($1)
8377
8378     _LT_CONFIG($1)
8379   fi # test -n "$compiler"
8380
8381   GCC=$lt_save_GCC
8382   CC=$lt_save_CC
8383   CFLAGS=$lt_save_CFLAGS
8384 fi # test "$_lt_disable_FC" != yes
8385
8386 AC_LANG_POP
8387 ])# _LT_LANG_FC_CONFIG
8388
8389
8390 # _LT_LANG_GCJ_CONFIG([TAG])
8391 # --------------------------
8392 # Ensure that the configuration variables for the GNU Java Compiler compiler
8393 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8394 # to write the compiler configuration to `libtool'.
8395 m4_defun([_LT_LANG_GCJ_CONFIG],
8396 [AC_REQUIRE([LT_PROG_GCJ])dnl
8397 AC_LANG_SAVE
8398
8399 # Source file extension for Java test sources.
8400 ac_ext=java
8401
8402 # Object file extension for compiled Java test sources.
8403 objext=o
8404 _LT_TAGVAR(objext, $1)=$objext
8405
8406 # Code to be used in simple compile tests
8407 lt_simple_compile_test_code="class foo {}"
8408
8409 # Code to be used in simple link tests
8410 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8411
8412 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8413 _LT_TAG_COMPILER
8414
8415 # save warnings/boilerplate of simple test code
8416 _LT_COMPILER_BOILERPLATE
8417 _LT_LINKER_BOILERPLATE
8418
8419 # Allow CC to be a program name with arguments.
8420 lt_save_CC=$CC
8421 lt_save_CFLAGS=$CFLAGS
8422 lt_save_GCC=$GCC
8423 GCC=yes
8424 CC=${GCJ-"gcj"}
8425 CFLAGS=$GCJFLAGS
8426 compiler=$CC
8427 _LT_TAGVAR(compiler, $1)=$CC
8428 _LT_TAGVAR(LD, $1)="$LD"
8429 _LT_CC_BASENAME([$compiler])
8430
8431 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8432 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8433
8434 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8435 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8436 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8437
8438 if test -n "$compiler"; then
8439   _LT_COMPILER_NO_RTTI($1)
8440   _LT_COMPILER_PIC($1)
8441   _LT_COMPILER_C_O($1)
8442   _LT_COMPILER_FILE_LOCKS($1)
8443   _LT_LINKER_SHLIBS($1)
8444   _LT_LINKER_HARDCODE_LIBPATH($1)
8445
8446   _LT_CONFIG($1)
8447 fi
8448
8449 AC_LANG_RESTORE
8450
8451 GCC=$lt_save_GCC
8452 CC=$lt_save_CC
8453 CFLAGS=$lt_save_CFLAGS
8454 ])# _LT_LANG_GCJ_CONFIG
8455
8456
8457 # _LT_LANG_GO_CONFIG([TAG])
8458 # --------------------------
8459 # Ensure that the configuration variables for the GNU Go compiler
8460 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8461 # to write the compiler configuration to `libtool'.
8462 m4_defun([_LT_LANG_GO_CONFIG],
8463 [AC_REQUIRE([LT_PROG_GO])dnl
8464 AC_LANG_SAVE
8465
8466 # Source file extension for Go test sources.
8467 ac_ext=go
8468
8469 # Object file extension for compiled Go test sources.
8470 objext=o
8471 _LT_TAGVAR(objext, $1)=$objext
8472
8473 # Code to be used in simple compile tests
8474 lt_simple_compile_test_code="package main; func main() { }"
8475
8476 # Code to be used in simple link tests
8477 lt_simple_link_test_code='package main; func main() { }'
8478
8479 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8480 _LT_TAG_COMPILER
8481
8482 # save warnings/boilerplate of simple test code
8483 _LT_COMPILER_BOILERPLATE
8484 _LT_LINKER_BOILERPLATE
8485
8486 # Allow CC to be a program name with arguments.
8487 lt_save_CC=$CC
8488 lt_save_CFLAGS=$CFLAGS
8489 lt_save_GCC=$GCC
8490 GCC=yes
8491 CC=${GOC-"gccgo"}
8492 CFLAGS=$GOFLAGS
8493 compiler=$CC
8494 _LT_TAGVAR(compiler, $1)=$CC
8495 _LT_TAGVAR(LD, $1)="$LD"
8496 _LT_CC_BASENAME([$compiler])
8497
8498 # Go did not exist at the time GCC didn't implicitly link libc in.
8499 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8500
8501 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8502 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8503 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8504
8505 if test -n "$compiler"; then
8506   _LT_COMPILER_NO_RTTI($1)
8507   _LT_COMPILER_PIC($1)
8508   _LT_COMPILER_C_O($1)
8509   _LT_COMPILER_FILE_LOCKS($1)
8510   _LT_LINKER_SHLIBS($1)
8511   _LT_LINKER_HARDCODE_LIBPATH($1)
8512
8513   _LT_CONFIG($1)
8514 fi
8515
8516 AC_LANG_RESTORE
8517
8518 GCC=$lt_save_GCC
8519 CC=$lt_save_CC
8520 CFLAGS=$lt_save_CFLAGS
8521 ])# _LT_LANG_GO_CONFIG
8522
8523
8524 # _LT_LANG_RC_CONFIG([TAG])
8525 # -------------------------
8526 # Ensure that the configuration variables for the Windows resource compiler
8527 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8528 # to write the compiler configuration to `libtool'.
8529 m4_defun([_LT_LANG_RC_CONFIG],
8530 [AC_REQUIRE([LT_PROG_RC])dnl
8531 AC_LANG_SAVE
8532
8533 # Source file extension for RC test sources.
8534 ac_ext=rc
8535
8536 # Object file extension for compiled RC test sources.
8537 objext=o
8538 _LT_TAGVAR(objext, $1)=$objext
8539
8540 # Code to be used in simple compile tests
8541 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8542
8543 # Code to be used in simple link tests
8544 lt_simple_link_test_code="$lt_simple_compile_test_code"
8545
8546 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8547 _LT_TAG_COMPILER
8548
8549 # save warnings/boilerplate of simple test code
8550 _LT_COMPILER_BOILERPLATE
8551 _LT_LINKER_BOILERPLATE
8552
8553 # Allow CC to be a program name with arguments.
8554 lt_save_CC="$CC"
8555 lt_save_CFLAGS=$CFLAGS
8556 lt_save_GCC=$GCC
8557 GCC=
8558 CC=${RC-"windres"}
8559 CFLAGS=
8560 compiler=$CC
8561 _LT_TAGVAR(compiler, $1)=$CC
8562 _LT_CC_BASENAME([$compiler])
8563 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8564
8565 if test -n "$compiler"; then
8566   :
8567   _LT_CONFIG($1)
8568 fi
8569
8570 GCC=$lt_save_GCC
8571 AC_LANG_RESTORE
8572 CC=$lt_save_CC
8573 CFLAGS=$lt_save_CFLAGS
8574 ])# _LT_LANG_RC_CONFIG
8575
8576
8577 # LT_PROG_GCJ
8578 # -----------
8579 AC_DEFUN([LT_PROG_GCJ],
8580 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8581   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8582     [AC_CHECK_TOOL(GCJ, gcj,)
8583       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8584       AC_SUBST(GCJFLAGS)])])[]dnl
8585 ])
8586
8587 # Old name:
8588 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8589 dnl aclocal-1.4 backwards compatibility:
8590 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8591
8592
8593 # LT_PROG_GO
8594 # ----------
8595 AC_DEFUN([LT_PROG_GO],
8596 [AC_CHECK_TOOL(GOC, gccgo,)
8597 ])
8598
8599
8600 # LT_PROG_RC
8601 # ----------
8602 AC_DEFUN([LT_PROG_RC],
8603 [AC_CHECK_TOOL(RC, windres,)
8604 ])
8605
8606 # Old name:
8607 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8608 dnl aclocal-1.4 backwards compatibility:
8609 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8610
8611
8612 # _LT_DECL_EGREP
8613 # --------------
8614 # If we don't have a new enough Autoconf to choose the best grep
8615 # available, choose the one first in the user's PATH.
8616 m4_defun([_LT_DECL_EGREP],
8617 [AC_REQUIRE([AC_PROG_EGREP])dnl
8618 AC_REQUIRE([AC_PROG_FGREP])dnl
8619 test -z "$GREP" && GREP=grep
8620 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8621 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8622 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8623 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8624 AC_SUBST([GREP])
8625 ])
8626
8627
8628 # _LT_DECL_OBJDUMP
8629 # --------------
8630 # If we don't have a new enough Autoconf to choose the best objdump
8631 # available, choose the one first in the user's PATH.
8632 m4_defun([_LT_DECL_OBJDUMP],
8633 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8634 test -z "$OBJDUMP" && OBJDUMP=objdump
8635 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8636 AC_SUBST([OBJDUMP])
8637 ])
8638
8639 # _LT_DECL_DLLTOOL
8640 # ----------------
8641 # Ensure DLLTOOL variable is set.
8642 m4_defun([_LT_DECL_DLLTOOL],
8643 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8644 test -z "$DLLTOOL" && DLLTOOL=dlltool
8645 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8646 AC_SUBST([DLLTOOL])
8647 ])
8648
8649 # _LT_DECL_SED
8650 # ------------
8651 # Check for a fully-functional sed program, that truncates
8652 # as few characters as possible.  Prefer GNU sed if found.
8653 m4_defun([_LT_DECL_SED],
8654 [AC_PROG_SED
8655 test -z "$SED" && SED=sed
8656 Xsed="$SED -e 1s/^X//"
8657 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8658 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8659     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8660 ])# _LT_DECL_SED
8661
8662 m4_ifndef([AC_PROG_SED], [
8663 # NOTE: This macro has been submitted for inclusion into   #
8664 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8665 #  a released version of Autoconf we should remove this    #
8666 #  macro and use it instead.                               #
8667
8668 m4_defun([AC_PROG_SED],
8669 [AC_MSG_CHECKING([for a sed that does not truncate output])
8670 AC_CACHE_VAL(lt_cv_path_SED,
8671 [# Loop through the user's path and test for sed and gsed.
8672 # Then use that list of sed's as ones to test for truncation.
8673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8674 for as_dir in $PATH
8675 do
8676   IFS=$as_save_IFS
8677   test -z "$as_dir" && as_dir=.
8678   for lt_ac_prog in sed gsed; do
8679     for ac_exec_ext in '' $ac_executable_extensions; do
8680       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8681         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8682       fi
8683     done
8684   done
8685 done
8686 IFS=$as_save_IFS
8687 lt_ac_max=0
8688 lt_ac_count=0
8689 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8690 # along with /bin/sed that truncates output.
8691 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8692   test ! -f $lt_ac_sed && continue
8693   cat /dev/null > conftest.in
8694   lt_ac_count=0
8695   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8696   # Check for GNU sed and select it if it is found.
8697   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8698     lt_cv_path_SED=$lt_ac_sed
8699     break
8700   fi
8701   while true; do
8702     cat conftest.in conftest.in >conftest.tmp
8703     mv conftest.tmp conftest.in
8704     cp conftest.in conftest.nl
8705     echo >>conftest.nl
8706     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8707     cmp -s conftest.out conftest.nl || break
8708     # 10000 chars as input seems more than enough
8709     test $lt_ac_count -gt 10 && break
8710     lt_ac_count=`expr $lt_ac_count + 1`
8711     if test $lt_ac_count -gt $lt_ac_max; then
8712       lt_ac_max=$lt_ac_count
8713       lt_cv_path_SED=$lt_ac_sed
8714     fi
8715   done
8716 done
8717 ])
8718 SED=$lt_cv_path_SED
8719 AC_SUBST([SED])
8720 AC_MSG_RESULT([$SED])
8721 ])#AC_PROG_SED
8722 ])#m4_ifndef
8723
8724 # Old name:
8725 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8726 dnl aclocal-1.4 backwards compatibility:
8727 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8728
8729
8730 # _LT_CHECK_SHELL_FEATURES
8731 # ------------------------
8732 # Find out whether the shell is Bourne or XSI compatible,
8733 # or has some other useful features.
8734 m4_defun([_LT_CHECK_SHELL_FEATURES],
8735 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8736 # Try some XSI features
8737 xsi_shell=no
8738 ( _lt_dummy="a/b/c"
8739   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8740       = c,a/b,b/c, \
8741     && eval 'test $(( 1 + 1 )) -eq 2 \
8742     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8743   && xsi_shell=yes
8744 AC_MSG_RESULT([$xsi_shell])
8745 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8746
8747 AC_MSG_CHECKING([whether the shell understands "+="])
8748 lt_shell_append=no
8749 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8750     >/dev/null 2>&1 \
8751   && lt_shell_append=yes
8752 AC_MSG_RESULT([$lt_shell_append])
8753 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8754
8755 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8756   lt_unset=unset
8757 else
8758   lt_unset=false
8759 fi
8760 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8761
8762 # test EBCDIC or ASCII
8763 case `echo X|tr X '\101'` in
8764  A) # ASCII based system
8765     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8766   lt_SP2NL='tr \040 \012'
8767   lt_NL2SP='tr \015\012 \040\040'
8768   ;;
8769  *) # EBCDIC based system
8770   lt_SP2NL='tr \100 \n'
8771   lt_NL2SP='tr \r\n \100\100'
8772   ;;
8773 esac
8774 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8775 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8776 ])# _LT_CHECK_SHELL_FEATURES
8777
8778
8779 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8780 # ------------------------------------------------------
8781 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8782 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8783 m4_defun([_LT_PROG_FUNCTION_REPLACE],
8784 [dnl {
8785 sed -e '/^$1 ()$/,/^} # $1 /c\
8786 $1 ()\
8787 {\
8788 m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
8789 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8790   && mv -f "$cfgfile.tmp" "$cfgfile" \
8791     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8792 test 0 -eq $? || _lt_function_replace_fail=:
8793 ])
8794
8795
8796 # _LT_PROG_REPLACE_SHELLFNS
8797 # -------------------------
8798 # Replace existing portable implementations of several shell functions with
8799 # equivalent extended shell implementations where those features are available..
8800 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8801 [if test x"$xsi_shell" = xyes; then
8802   _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8803     case ${1} in
8804       */*) func_dirname_result="${1%/*}${2}" ;;
8805       *  ) func_dirname_result="${3}" ;;
8806     esac])
8807
8808   _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8809     func_basename_result="${1##*/}"])
8810
8811   _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8812     case ${1} in
8813       */*) func_dirname_result="${1%/*}${2}" ;;
8814       *  ) func_dirname_result="${3}" ;;
8815     esac
8816     func_basename_result="${1##*/}"])
8817
8818   _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8819     # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8820     # positional parameters, so assign one to ordinary parameter first.
8821     func_stripname_result=${3}
8822     func_stripname_result=${func_stripname_result#"${1}"}
8823     func_stripname_result=${func_stripname_result%"${2}"}])
8824
8825   _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8826     func_split_long_opt_name=${1%%=*}
8827     func_split_long_opt_arg=${1#*=}])
8828
8829   _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8830     func_split_short_opt_arg=${1#??}
8831     func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8832
8833   _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8834     case ${1} in
8835       *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8836       *)    func_lo2o_result=${1} ;;
8837     esac])
8838
8839   _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
8840
8841   _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
8842
8843   _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
8844 fi
8845
8846 if test x"$lt_shell_append" = xyes; then
8847   _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
8848
8849   _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8850     func_quote_for_eval "${2}"
8851 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8852     eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8853
8854   # Save a `func_append' function call where possible by direct use of '+='
8855   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8856     && mv -f "$cfgfile.tmp" "$cfgfile" \
8857       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8858   test 0 -eq $? || _lt_function_replace_fail=:
8859 else
8860   # Save a `func_append' function call even when '+=' is not available
8861   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $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 fi
8866
8867 if test x"$_lt_function_replace_fail" = x":"; then
8868   AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8869 fi
8870 ])
8871
8872 # _LT_PATH_CONVERSION_FUNCTIONS
8873 # -----------------------------
8874 # Determine which file name conversion functions should be used by
8875 # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8876 # for certain cross-compile configurations and native mingw.
8877 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8878 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8879 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8880 AC_MSG_CHECKING([how to convert $build file names to $host format])
8881 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8882 [case $host in
8883   *-*-mingw* )
8884     case $build in
8885       *-*-mingw* ) # actually msys
8886         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8887         ;;
8888       *-*-cygwin* )
8889         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8890         ;;
8891       * ) # otherwise, assume *nix
8892         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8893         ;;
8894     esac
8895     ;;
8896   *-*-cygwin* )
8897     case $build in
8898       *-*-mingw* ) # actually msys
8899         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8900         ;;
8901       *-*-cygwin* )
8902         lt_cv_to_host_file_cmd=func_convert_file_noop
8903         ;;
8904       * ) # otherwise, assume *nix
8905         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8906         ;;
8907     esac
8908     ;;
8909   * ) # unhandled hosts (and "normal" native builds)
8910     lt_cv_to_host_file_cmd=func_convert_file_noop
8911     ;;
8912 esac
8913 ])
8914 to_host_file_cmd=$lt_cv_to_host_file_cmd
8915 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8916 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8917          [0], [convert $build file names to $host format])dnl
8918
8919 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8920 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8921 [#assume ordinary cross tools, or native build.
8922 lt_cv_to_tool_file_cmd=func_convert_file_noop
8923 case $host in
8924   *-*-mingw* )
8925     case $build in
8926       *-*-mingw* ) # actually msys
8927         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8928         ;;
8929     esac
8930     ;;
8931 esac
8932 ])
8933 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8934 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8935 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8936          [0], [convert $build files to toolchain format])dnl
8937 ])# _LT_PATH_CONVERSION_FUNCTIONS
8938
8939 # Helper functions for option handling.                    -*- Autoconf -*-
8940 #
8941 #   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8942 #   Inc.
8943 #   Written by Gary V. Vaughan, 2004
8944 #
8945 # This file is free software; the Free Software Foundation gives
8946 # unlimited permission to copy and/or distribute it, with or without
8947 # modifications, as long as this notice is preserved.
8948
8949 # serial 7 ltoptions.m4
8950
8951 # This is to help aclocal find these macros, as it can't see m4_define.
8952 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8953
8954
8955 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8956 # ------------------------------------------
8957 m4_define([_LT_MANGLE_OPTION],
8958 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8959
8960
8961 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8962 # ---------------------------------------
8963 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8964 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8965 # saved as a flag.
8966 m4_define([_LT_SET_OPTION],
8967 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8968 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8969         _LT_MANGLE_DEFUN([$1], [$2]),
8970     [m4_warning([Unknown $1 option `$2'])])[]dnl
8971 ])
8972
8973
8974 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8975 # ------------------------------------------------------------
8976 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8977 m4_define([_LT_IF_OPTION],
8978 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8979
8980
8981 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8982 # -------------------------------------------------------
8983 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8984 # are set.
8985 m4_define([_LT_UNLESS_OPTIONS],
8986 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8987             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8988                       [m4_define([$0_found])])])[]dnl
8989 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8990 ])[]dnl
8991 ])
8992
8993
8994 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8995 # ----------------------------------------
8996 # OPTION-LIST is a space-separated list of Libtool options associated
8997 # with MACRO-NAME.  If any OPTION has a matching handler declared with
8998 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8999 # the unknown option and exit.
9000 m4_defun([_LT_SET_OPTIONS],
9001 [# Set options
9002 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9003     [_LT_SET_OPTION([$1], _LT_Option)])
9004
9005 m4_if([$1],[LT_INIT],[
9006   dnl
9007   dnl Simply set some default values (i.e off) if boolean options were not
9008   dnl specified:
9009   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9010   ])
9011   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9012   ])
9013   dnl
9014   dnl If no reference was made to various pairs of opposing options, then
9015   dnl we run the default mode handler for the pair.  For example, if neither
9016   dnl `shared' nor `disable-shared' was passed, we enable building of shared
9017   dnl archives by default:
9018   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9019   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9020   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9021   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9022                    [_LT_ENABLE_FAST_INSTALL])
9023   ])
9024 ])# _LT_SET_OPTIONS
9025
9026
9027
9028 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9029 # -----------------------------------------
9030 m4_define([_LT_MANGLE_DEFUN],
9031 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9032
9033
9034 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9035 # -----------------------------------------------
9036 m4_define([LT_OPTION_DEFINE],
9037 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9038 ])# LT_OPTION_DEFINE
9039
9040
9041 # dlopen
9042 # ------
9043 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9044 ])
9045
9046 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9047 [_LT_SET_OPTION([LT_INIT], [dlopen])
9048 AC_DIAGNOSE([obsolete],
9049 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9050 put the `dlopen' option into LT_INIT's first parameter.])
9051 ])
9052
9053 dnl aclocal-1.4 backwards compatibility:
9054 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9055
9056
9057 # win32-dll
9058 # ---------
9059 # Declare package support for building win32 dll's.
9060 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9061 [enable_win32_dll=yes
9062
9063 case $host in
9064 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9065   AC_CHECK_TOOL(AS, as, false)
9066   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9067   AC_CHECK_TOOL(OBJDUMP, objdump, false)
9068   ;;
9069 esac
9070
9071 test -z "$AS" && AS=as
9072 _LT_DECL([], [AS],      [1], [Assembler program])dnl
9073
9074 test -z "$DLLTOOL" && DLLTOOL=dlltool
9075 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9076
9077 test -z "$OBJDUMP" && OBJDUMP=objdump
9078 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9079 ])# win32-dll
9080
9081 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9082 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9083 _LT_SET_OPTION([LT_INIT], [win32-dll])
9084 AC_DIAGNOSE([obsolete],
9085 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9086 put the `win32-dll' option into LT_INIT's first parameter.])
9087 ])
9088
9089 dnl aclocal-1.4 backwards compatibility:
9090 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9091
9092
9093 # _LT_ENABLE_SHARED([DEFAULT])
9094 # ----------------------------
9095 # implement the --enable-shared flag, and supports the `shared' and
9096 # `disable-shared' LT_INIT options.
9097 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9098 m4_define([_LT_ENABLE_SHARED],
9099 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9100 AC_ARG_ENABLE([shared],
9101     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9102         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9103     [p=${PACKAGE-default}
9104     case $enableval in
9105     yes) enable_shared=yes ;;
9106     no) enable_shared=no ;;
9107     *)
9108       enable_shared=no
9109       # Look at the argument we got.  We use all the common list separators.
9110       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9111       for pkg in $enableval; do
9112         IFS="$lt_save_ifs"
9113         if test "X$pkg" = "X$p"; then
9114           enable_shared=yes
9115         fi
9116       done
9117       IFS="$lt_save_ifs"
9118       ;;
9119     esac],
9120     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9121
9122     _LT_DECL([build_libtool_libs], [enable_shared], [0],
9123         [Whether or not to build shared libraries])
9124 ])# _LT_ENABLE_SHARED
9125
9126 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9127 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9128
9129 # Old names:
9130 AC_DEFUN([AC_ENABLE_SHARED],
9131 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9132 ])
9133
9134 AC_DEFUN([AC_DISABLE_SHARED],
9135 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9136 ])
9137
9138 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9139 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9140
9141 dnl aclocal-1.4 backwards compatibility:
9142 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9143 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9144
9145
9146
9147 # _LT_ENABLE_STATIC([DEFAULT])
9148 # ----------------------------
9149 # implement the --enable-static flag, and support the `static' and
9150 # `disable-static' LT_INIT options.
9151 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9152 m4_define([_LT_ENABLE_STATIC],
9153 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9154 AC_ARG_ENABLE([static],
9155     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9156         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9157     [p=${PACKAGE-default}
9158     case $enableval in
9159     yes) enable_static=yes ;;
9160     no) enable_static=no ;;
9161     *)
9162      enable_static=no
9163       # Look at the argument we got.  We use all the common list separators.
9164       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9165       for pkg in $enableval; do
9166         IFS="$lt_save_ifs"
9167         if test "X$pkg" = "X$p"; then
9168           enable_static=yes
9169         fi
9170       done
9171       IFS="$lt_save_ifs"
9172       ;;
9173     esac],
9174     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9175
9176     _LT_DECL([build_old_libs], [enable_static], [0],
9177         [Whether or not to build static libraries])
9178 ])# _LT_ENABLE_STATIC
9179
9180 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9181 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9182
9183 # Old names:
9184 AC_DEFUN([AC_ENABLE_STATIC],
9185 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9186 ])
9187
9188 AC_DEFUN([AC_DISABLE_STATIC],
9189 [_LT_SET_OPTION([LT_INIT], [disable-static])
9190 ])
9191
9192 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9193 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9194
9195 dnl aclocal-1.4 backwards compatibility:
9196 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9197 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9198
9199
9200
9201 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9202 # ----------------------------------
9203 # implement the --enable-fast-install flag, and support the `fast-install'
9204 # and `disable-fast-install' LT_INIT options.
9205 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9206 m4_define([_LT_ENABLE_FAST_INSTALL],
9207 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9208 AC_ARG_ENABLE([fast-install],
9209     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9210     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9211     [p=${PACKAGE-default}
9212     case $enableval in
9213     yes) enable_fast_install=yes ;;
9214     no) enable_fast_install=no ;;
9215     *)
9216       enable_fast_install=no
9217       # Look at the argument we got.  We use all the common list separators.
9218       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9219       for pkg in $enableval; do
9220         IFS="$lt_save_ifs"
9221         if test "X$pkg" = "X$p"; then
9222           enable_fast_install=yes
9223         fi
9224       done
9225       IFS="$lt_save_ifs"
9226       ;;
9227     esac],
9228     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9229
9230 _LT_DECL([fast_install], [enable_fast_install], [0],
9231          [Whether or not to optimize for fast installation])dnl
9232 ])# _LT_ENABLE_FAST_INSTALL
9233
9234 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9235 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9236
9237 # Old names:
9238 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9239 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9240 AC_DIAGNOSE([obsolete],
9241 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9242 the `fast-install' option into LT_INIT's first parameter.])
9243 ])
9244
9245 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9246 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9247 AC_DIAGNOSE([obsolete],
9248 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9249 the `disable-fast-install' option into LT_INIT's first parameter.])
9250 ])
9251
9252 dnl aclocal-1.4 backwards compatibility:
9253 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9254 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9255
9256
9257 # _LT_WITH_PIC([MODE])
9258 # --------------------
9259 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9260 # LT_INIT options.
9261 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9262 m4_define([_LT_WITH_PIC],
9263 [AC_ARG_WITH([pic],
9264     [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9265         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9266     [lt_p=${PACKAGE-default}
9267     case $withval in
9268     yes|no) pic_mode=$withval ;;
9269     *)
9270       pic_mode=default
9271       # Look at the argument we got.  We use all the common list separators.
9272       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9273       for lt_pkg in $withval; do
9274         IFS="$lt_save_ifs"
9275         if test "X$lt_pkg" = "X$lt_p"; then
9276           pic_mode=yes
9277         fi
9278       done
9279       IFS="$lt_save_ifs"
9280       ;;
9281     esac],
9282     [pic_mode=default])
9283
9284 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9285
9286 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9287 ])# _LT_WITH_PIC
9288
9289 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9290 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9291
9292 # Old name:
9293 AU_DEFUN([AC_LIBTOOL_PICMODE],
9294 [_LT_SET_OPTION([LT_INIT], [pic-only])
9295 AC_DIAGNOSE([obsolete],
9296 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9297 put the `pic-only' option into LT_INIT's first parameter.])
9298 ])
9299
9300 dnl aclocal-1.4 backwards compatibility:
9301 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9302
9303
9304 m4_define([_LTDL_MODE], [])
9305 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9306                  [m4_define([_LTDL_MODE], [nonrecursive])])
9307 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9308                  [m4_define([_LTDL_MODE], [recursive])])
9309 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9310                  [m4_define([_LTDL_MODE], [subproject])])
9311
9312 m4_define([_LTDL_TYPE], [])
9313 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9314                  [m4_define([_LTDL_TYPE], [installable])])
9315 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9316                  [m4_define([_LTDL_TYPE], [convenience])])
9317
9318 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9319 #
9320 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9321 # Written by Gary V. Vaughan, 2004
9322 #
9323 # This file is free software; the Free Software Foundation gives
9324 # unlimited permission to copy and/or distribute it, with or without
9325 # modifications, as long as this notice is preserved.
9326
9327 # serial 6 ltsugar.m4
9328
9329 # This is to help aclocal find these macros, as it can't see m4_define.
9330 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9331
9332
9333 # lt_join(SEP, ARG1, [ARG2...])
9334 # -----------------------------
9335 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9336 # associated separator.
9337 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9338 # versions in m4sugar had bugs.
9339 m4_define([lt_join],
9340 [m4_if([$#], [1], [],
9341        [$#], [2], [[$2]],
9342        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9343 m4_define([_lt_join],
9344 [m4_if([$#$2], [2], [],
9345        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9346
9347
9348 # lt_car(LIST)
9349 # lt_cdr(LIST)
9350 # ------------
9351 # Manipulate m4 lists.
9352 # These macros are necessary as long as will still need to support
9353 # Autoconf-2.59 which quotes differently.
9354 m4_define([lt_car], [[$1]])
9355 m4_define([lt_cdr],
9356 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9357        [$#], 1, [],
9358        [m4_dquote(m4_shift($@))])])
9359 m4_define([lt_unquote], $1)
9360
9361
9362 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9363 # ------------------------------------------
9364 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9365 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9366 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9367 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9368 # than defined and empty).
9369 #
9370 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9371 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9372 m4_define([lt_append],
9373 [m4_define([$1],
9374            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9375
9376
9377
9378 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9379 # ----------------------------------------------------------
9380 # Produce a SEP delimited list of all paired combinations of elements of
9381 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9382 # has the form PREFIXmINFIXSUFFIXn.
9383 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9384 m4_define([lt_combine],
9385 [m4_if(m4_eval([$# > 3]), [1],
9386        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9387 [[m4_foreach([_Lt_prefix], [$2],
9388              [m4_foreach([_Lt_suffix],
9389                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9390         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9391
9392
9393 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9394 # -----------------------------------------------------------------------
9395 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9396 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9397 m4_define([lt_if_append_uniq],
9398 [m4_ifdef([$1],
9399           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9400                  [lt_append([$1], [$2], [$3])$4],
9401                  [$5])],
9402           [lt_append([$1], [$2], [$3])$4])])
9403
9404
9405 # lt_dict_add(DICT, KEY, VALUE)
9406 # -----------------------------
9407 m4_define([lt_dict_add],
9408 [m4_define([$1($2)], [$3])])
9409
9410
9411 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9412 # --------------------------------------------
9413 m4_define([lt_dict_add_subkey],
9414 [m4_define([$1($2:$3)], [$4])])
9415
9416
9417 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9418 # ----------------------------------
9419 m4_define([lt_dict_fetch],
9420 [m4_ifval([$3],
9421         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9422     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9423
9424
9425 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9426 # -----------------------------------------------------------------
9427 m4_define([lt_if_dict_fetch],
9428 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9429         [$5],
9430     [$6])])
9431
9432
9433 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9434 # --------------------------------------------------------------
9435 m4_define([lt_dict_filter],
9436 [m4_if([$5], [], [],
9437   [lt_join(m4_quote(m4_default([$4], [[, ]])),
9438            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9439                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9440 ])
9441
9442 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
9443 #
9444 #   Copyright (C) 2004 Free Software Foundation, Inc.
9445 #   Written by Scott James Remnant, 2004
9446 #
9447 # This file is free software; the Free Software Foundation gives
9448 # unlimited permission to copy and/or distribute it, with or without
9449 # modifications, as long as this notice is preserved.
9450
9451 # @configure_input@
9452
9453 # serial 3337 ltversion.m4
9454 # This file is part of GNU Libtool
9455
9456 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9457 m4_define([LT_PACKAGE_REVISION], [1.3337])
9458
9459 AC_DEFUN([LTVERSION_VERSION],
9460 [macro_version='2.4.2'
9461 macro_revision='1.3337'
9462 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9463 _LT_DECL(, macro_revision, 0)
9464 ])
9465
9466 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9467 #
9468 #   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9469 #   Written by Scott James Remnant, 2004.
9470 #
9471 # This file is free software; the Free Software Foundation gives
9472 # unlimited permission to copy and/or distribute it, with or without
9473 # modifications, as long as this notice is preserved.
9474
9475 # serial 5 lt~obsolete.m4
9476
9477 # These exist entirely to fool aclocal when bootstrapping libtool.
9478 #
9479 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9480 # which have later been changed to m4_define as they aren't part of the
9481 # exported API, or moved to Autoconf or Automake where they belong.
9482 #
9483 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9484 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9485 # using a macro with the same name in our local m4/libtool.m4 it'll
9486 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9487 # and doesn't know about Autoconf macros at all.)
9488 #
9489 # So we provide this file, which has a silly filename so it's always
9490 # included after everything else.  This provides aclocal with the
9491 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9492 # because those macros already exist, or will be overwritten later.
9493 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9494 #
9495 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9496 # Yes, that means every name once taken will need to remain here until
9497 # we give up compatibility with versions before 1.7, at which point
9498 # we need to keep only those names which we still refer to.
9499
9500 # This is to help aclocal find these macros, as it can't see m4_define.
9501 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9502
9503 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9504 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
9505 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9506 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
9507 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9508 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
9509 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
9510 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9511 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
9512 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9513 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
9514 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9515 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9516 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9517 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9518 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9519 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
9520 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9521 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9522 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
9523 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
9524 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9525 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9526 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9527 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9528 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9529 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9530 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9531 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
9532 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
9533 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
9534 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9535 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9536 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
9537 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
9538 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9539 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9540 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
9541 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9542 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
9543 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
9544 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
9545 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9546 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9547 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9548 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9549 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9550 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9551 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9552 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9553 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9554 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9555 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9556 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9557 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9558 m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9559 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9560 m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9561 m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
9562 m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
9563 m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
9564
9565 # nls.m4 serial 5 (gettext-0.18)
9566 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
9567 dnl Inc.
9568 dnl This file is free software; the Free Software Foundation
9569 dnl gives unlimited permission to copy and/or distribute it,
9570 dnl with or without modifications, as long as this notice is preserved.
9571 dnl
9572 dnl This file can can be used in projects which are not available under
9573 dnl the GNU General Public License or the GNU Library General Public
9574 dnl License but which still want to provide support for the GNU gettext
9575 dnl functionality.
9576 dnl Please note that the actual code of the GNU gettext library is covered
9577 dnl by the GNU Library General Public License, and the rest of the GNU
9578 dnl gettext package package is covered by the GNU General Public License.
9579 dnl They are *not* in the public domain.
9580
9581 dnl Authors:
9582 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9583 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9584
9585 AC_PREREQ([2.50])
9586
9587 AC_DEFUN([AM_NLS],
9588 [
9589   AC_MSG_CHECKING([whether NLS is requested])
9590   dnl Default is enabled NLS
9591   AC_ARG_ENABLE([nls],
9592     [  --disable-nls           do not use Native Language Support],
9593     USE_NLS=$enableval, USE_NLS=yes)
9594   AC_MSG_RESULT([$USE_NLS])
9595   AC_SUBST([USE_NLS])
9596 ])
9597
9598 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9599 # serial 1 (pkg-config-0.24)
9600
9601 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
9602 #
9603 # This program is free software; you can redistribute it and/or modify
9604 # it under the terms of the GNU General Public License as published by
9605 # the Free Software Foundation; either version 2 of the License, or
9606 # (at your option) any later version.
9607 #
9608 # This program is distributed in the hope that it will be useful, but
9609 # WITHOUT ANY WARRANTY; without even the implied warranty of
9610 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9611 # General Public License for more details.
9612 #
9613 # You should have received a copy of the GNU General Public License
9614 # along with this program; if not, write to the Free Software
9615 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9616 #
9617 # As a special exception to the GNU General Public License, if you
9618 # distribute this file as part of a program that contains a
9619 # configuration script generated by Autoconf, you may include it under
9620 # the same distribution terms that you use for the rest of that program.
9621
9622 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9623 # ----------------------------------
9624 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9625 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9626 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9627 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9628 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9629 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9630 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9631
9632 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9633         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9634 fi
9635 if test -n "$PKG_CONFIG"; then
9636         _pkg_min_version=m4_default([$1], [0.9.0])
9637         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9638         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9639                 AC_MSG_RESULT([yes])
9640         else
9641                 AC_MSG_RESULT([no])
9642                 PKG_CONFIG=""
9643         fi
9644 fi[]dnl
9645 ])# PKG_PROG_PKG_CONFIG
9646
9647 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9648 #
9649 # Check to see whether a particular set of modules exists.  Similar
9650 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9651 #
9652 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9653 # only at the first occurence in configure.ac, so if the first place
9654 # it's called might be skipped (such as if it is within an "if", you
9655 # have to call PKG_CHECK_EXISTS manually
9656 # --------------------------------------------------------------
9657 AC_DEFUN([PKG_CHECK_EXISTS],
9658 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9659 if test -n "$PKG_CONFIG" && \
9660     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9661   m4_default([$2], [:])
9662 m4_ifvaln([$3], [else
9663   $3])dnl
9664 fi])
9665
9666 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9667 # ---------------------------------------------
9668 m4_define([_PKG_CONFIG],
9669 [if test -n "$$1"; then
9670     pkg_cv_[]$1="$$1"
9671  elif test -n "$PKG_CONFIG"; then
9672     PKG_CHECK_EXISTS([$3],
9673                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9674                       test "x$?" != "x0" && pkg_failed=yes ],
9675                      [pkg_failed=yes])
9676  else
9677     pkg_failed=untried
9678 fi[]dnl
9679 ])# _PKG_CONFIG
9680
9681 # _PKG_SHORT_ERRORS_SUPPORTED
9682 # -----------------------------
9683 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9684 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9685 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9686         _pkg_short_errors_supported=yes
9687 else
9688         _pkg_short_errors_supported=no
9689 fi[]dnl
9690 ])# _PKG_SHORT_ERRORS_SUPPORTED
9691
9692
9693 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9694 # [ACTION-IF-NOT-FOUND])
9695 #
9696 #
9697 # Note that if there is a possibility the first call to
9698 # PKG_CHECK_MODULES might not happen, you should be sure to include an
9699 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9700 #
9701 #
9702 # --------------------------------------------------------------
9703 AC_DEFUN([PKG_CHECK_MODULES],
9704 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9705 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9706 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9707
9708 pkg_failed=no
9709 AC_MSG_CHECKING([for $1])
9710
9711 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9712 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
9713
9714 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9715 and $1[]_LIBS to avoid the need to call pkg-config.
9716 See the pkg-config man page for more details.])
9717
9718 if test $pkg_failed = yes; then
9719         AC_MSG_RESULT([no])
9720         _PKG_SHORT_ERRORS_SUPPORTED
9721         if test $_pkg_short_errors_supported = yes; then
9722                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9723         else 
9724                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9725         fi
9726         # Put the nasty error message in config.log where it belongs
9727         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9728
9729         m4_default([$4], [AC_MSG_ERROR(
9730 [Package requirements ($2) were not met:
9731
9732 $$1_PKG_ERRORS
9733
9734 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9735 installed software in a non-standard prefix.
9736
9737 _PKG_TEXT])[]dnl
9738         ])
9739 elif test $pkg_failed = untried; then
9740         AC_MSG_RESULT([no])
9741         m4_default([$4], [AC_MSG_FAILURE(
9742 [The pkg-config script could not be found or is too old.  Make sure it
9743 is in your PATH or set the PKG_CONFIG environment variable to the full
9744 path to pkg-config.
9745
9746 _PKG_TEXT
9747
9748 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
9749         ])
9750 else
9751         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9752         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9753         AC_MSG_RESULT([yes])
9754         $3
9755 fi[]dnl
9756 ])# PKG_CHECK_MODULES
9757
9758 AC_DEFUN([YELP_HELP_INIT],
9759 [
9760 AC_REQUIRE([AC_PROG_LN_S])
9761 m4_pattern_allow([AM_V_at])
9762 m4_pattern_allow([AM_V_GEN])
9763 m4_pattern_allow([AM_DEFAULT_VERBOSITY])
9764 AC_ARG_WITH([help-dir],
9765             AC_HELP_STRING([--with-help-dir=DIR],
9766                            [path where help files are installed]),,
9767             [with_help_dir='${datadir}/help'])
9768 HELP_DIR="$with_help_dir"
9769 AC_SUBST(HELP_DIR)
9770
9771 AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
9772 AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
9773 if test x"$ITSTOOL" = x; then
9774   AC_MSG_ERROR([itstool not found])
9775 fi
9776
9777 AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
9778 AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
9779 if test x"$XMLLINT" = x; then
9780   AC_MSG_ERROR([xmllint not found])
9781 fi
9782
9783 YELP_HELP_RULES='
9784 HELP_ID ?=
9785 HELP_POT ?=
9786 HELP_FILES ?=
9787 HELP_EXTRA ?=
9788 HELP_MEDIA ?=
9789 HELP_LINGUAS ?=
9790
9791 _HELP_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),$(filter $(LINGUAS),$(HELP_LINGUAS)),$(HELP_LINGUAS))
9792 _HELP_POTFILE = $(if $(HELP_POT),$(HELP_POT),$(if $(HELP_ID),$(HELP_ID).pot))
9793 _HELP_POFILES = $(if $(HELP_ID),$(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).po))
9794 _HELP_MOFILES = $(patsubst %.po,%.mo,$(_HELP_POFILES))
9795 _HELP_C_FILES = $(foreach f,$(HELP_FILES),C/$(f))
9796 _HELP_C_EXTRA = $(foreach f,$(HELP_EXTRA),C/$(f))
9797 _HELP_C_MEDIA = $(foreach f,$(HELP_MEDIA),C/$(f))
9798 _HELP_LC_FILES = $(foreach lc,$(_HELP_LINGUAS),$(foreach f,$(HELP_FILES),$(lc)/$(f)))
9799 _HELP_LC_STAMPS = $(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).stamp)
9800
9801 _HELP_DEFAULT_V = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
9802 _HELP_V = $(if $(V),$(V),$(_HELP_DEFAULT_V))
9803 _HELP_LC_VERBOSE = $(_HELP_LC_VERBOSE_$(_HELP_V))
9804 _HELP_LC_VERBOSE_ = $(_HELP_LC_VERBOSE_$(_HELP_DEFAULT_V))
9805 _HELP_LC_VERBOSE_0 = @echo "  GEN    "$(dir [$]@);
9806
9807 all: $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_LC_FILES) $(_HELP_POFILES)
9808
9809 .PHONY: pot
9810 pot: $(_HELP_POTFILE)
9811 $(_HELP_POTFILE): $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
9812         $(AM_V_GEN)$(ITSTOOL) -o "[$]@" $(_HELP_C_FILES)
9813
9814 .PHONY: repo
9815 repo: $(_HELP_POTFILE)
9816         $(AM_V_at)for po in $(_HELP_POFILES); do \
9817           if test "x[$](_HELP_V)" = "x0"; then echo "  GEN    $${po}"; fi; \
9818           msgmerge -q -o "$${po}" "$${po}" "$(_HELP_POTFILE)"; \
9819         done
9820
9821 $(_HELP_POFILES):
9822         $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
9823         $(AM_V_at)if test ! -f "[$]@" -a -f "$(srcdir)/[$]@"; then cp "$(srcdir)/[$]@" "[$]@"; fi
9824         $(AM_V_GEN)if ! test -f "[$]@"; then \
9825           (cd "$(dir [$]@)" && \
9826             $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
9827             mv "$(notdir [$]@).tmp" "$(notdir [$]@)"); \
9828         else \
9829           (cd "$(dir [$]@)" && \
9830             $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
9831             msgmerge -o "$(notdir [$]@)" "$(notdir [$]@)" "$(notdir [$]@).tmp" && \
9832             rm "$(notdir [$]@).tmp"); \
9833         fi
9834
9835 $(_HELP_MOFILES): %.mo: %.po
9836         $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
9837         $(AM_V_GEN)msgfmt -o "[$]@" "$<"
9838
9839 $(_HELP_LC_FILES): $(_HELP_LINGUAS)
9840 $(_HELP_LINGUAS): $(_HELP_LC_STAMPS)
9841 $(_HELP_LC_STAMPS): %.stamp: %.mo
9842 $(_HELP_LC_STAMPS): $(_HELP_C_FILES) $(_HELP_C_EXTRA)
9843         $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
9844         $(_HELP_LC_VERBOSE)if test -d "C"; then d="../"; else d="$(abs_srcdir)/"; fi; \
9845         mo="$(dir [$]@)$(patsubst %/$(notdir [$]@),%,[$]@).mo"; \
9846         if test -f "$${mo}"; then mo="../$${mo}"; else mo="$(abs_srcdir)/$${mo}"; fi; \
9847         (cd "$(dir [$]@)" && $(ITSTOOL) -m "$${mo}" $(foreach f,$(_HELP_C_FILES),$${d}/$(f))) && \
9848         touch "[$]@"
9849
9850 .PHONY: clean-help
9851 mostlyclean-am: $(if $(HELP_ID),clean-help)
9852 clean-help:
9853         rm -f $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_MOFILES)
9854
9855 EXTRA_DIST ?=
9856 EXTRA_DIST += $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
9857 EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).stamp)
9858 EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).po)
9859 EXTRA_DIST += $(foreach f,$(HELP_MEDIA),$(foreach lc,$(HELP_LINGUAS),$(wildcard $(lc)/$(f))))
9860
9861 distdir: distdir-help-files
9862 distdir-help-files:
9863         @for lc in C $(HELP_LINGUAS); do \
9864           $(MKDIR_P) "$(distdir)/$$lc"; \
9865           for file in $(HELP_FILES); do \
9866             if test -f "$$lc/$$file"; then d=./; else d=$(srcdir)/; fi; \
9867             cp -p "$$d$$lc/$$file" "$(distdir)/$$lc/" || exit 1; \
9868           done; \
9869         done; \
9870
9871 .PHONY: check-help
9872 check: check-help
9873 check-help:
9874         for lc in C $(_HELP_LINGUAS); do \
9875           if test -d "$$lc"; \
9876             then d=; \
9877             xmlpath="$$lc"; \
9878           else \
9879             d="$(srcdir)/"; \
9880             xmlpath="$$lc:$(srcdir)/$$lc"; \
9881           fi; \
9882           for page in $(HELP_FILES); do \
9883             echo "$(XMLLINT) --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
9884             $(XMLLINT) --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
9885           done; \
9886         done
9887
9888
9889 .PHONY: install-help
9890 install-data-am: $(if $(HELP_ID),install-help)
9891 install-help:
9892         @for lc in C $(_HELP_LINGUAS); do \
9893           $(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)" || exit 1; \
9894         done
9895         @for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
9896           if test -f "$$lc/$$f"; then d=; else d="$(srcdir)/"; fi; \
9897           helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
9898           if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
9899           echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir`basename $$f`"; \
9900           $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir`basename $$f`" || exit 1; \
9901         done; done
9902         @for f in $(_HELP_C_EXTRA); do \
9903           lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
9904           if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
9905           helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
9906           if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
9907           echo "$(INSTALL_DATA) $$d$$f $$helpdir`basename $$f`"; \
9908           $(INSTALL_DATA) "$$d$$f" "$$helpdir`basename $$f`" || exit 1; \
9909         done
9910         @for f in $(HELP_MEDIA); do \
9911           for lc in C $(_HELP_LINGUAS); do \
9912             if test -f "$$lc$$f"; then d=; else d="$(srcdir)/"; fi; \
9913             helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
9914             mdir=`dirname "$$f"`; \
9915             if test "x$mdir" = "x."; then mdir=""; fi; \
9916             if ! test -d "$$helpdir$$mdir"; then $(mkinstalldirs) "$$helpdir$$mdir"; fi; \
9917             if test -f "$$d$$lc/$$f"; then \
9918               echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir$$f"; \
9919               $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir$$f" || exit 1; \
9920             elif test "x$$lc" != "xC"; then \
9921               echo "$(LN_S) -f $(HELP_DIR)/C/$(HELP_ID)/$$f $$helpdir$$f"; \
9922               $(LN_S) -f "$(HELP_DIR)/C/$(HELP_ID)/$$f" "$$helpdir$$f" || exit 1; \
9923             fi; \
9924           done; \
9925         done
9926
9927 .PHONY: uninstall-help
9928 uninstall-am: $(if $(HELP_ID),uninstall-help)
9929 uninstall-help:
9930         for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
9931           helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
9932           echo "rm -f $$helpdir`basename $$f`"; \
9933           rm -f "$$helpdir`basename $$f`"; \
9934         done; done
9935         @for f in $(_HELP_C_EXTRA); do \
9936           lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
9937           helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
9938           echo "rm -f $$helpdir`basename $$f`"; \
9939           rm -f "$$helpdir`basename $$f`"; \
9940         done
9941         @for f in $(HELP_MEDIA); do \
9942           for lc in C $(_HELP_LINGUAS); do \
9943             helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
9944             echo "rm -f $$helpdir$$f"; \
9945             rm -f "$$helpdir$$f"; \
9946           done; \
9947         done;
9948 '
9949 AC_SUBST([YELP_HELP_RULES])
9950 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([YELP_HELP_RULES])])
9951 ])
9952
9953 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
9954 # Foundation, Inc.
9955 #
9956 # This file is free software; the Free Software Foundation
9957 # gives unlimited permission to copy and/or distribute it,
9958 # with or without modifications, as long as this notice is preserved.
9959
9960 # serial 1
9961
9962 # AM_AUTOMAKE_VERSION(VERSION)
9963 # ----------------------------
9964 # Automake X.Y traces this macro to ensure aclocal.m4 has been
9965 # generated from the m4 files accompanying Automake X.Y.
9966 # (This private macro should not be called outside this file.)
9967 AC_DEFUN([AM_AUTOMAKE_VERSION],
9968 [am__api_version='1.11'
9969 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9970 dnl require some minimum version.  Point them to the right macro.
9971 m4_if([$1], [1.11.6], [],
9972       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9973 ])
9974
9975 # _AM_AUTOCONF_VERSION(VERSION)
9976 # -----------------------------
9977 # aclocal traces this macro to find the Autoconf version.
9978 # This is a private macro too.  Using m4_define simplifies
9979 # the logic in aclocal, which can simply ignore this definition.
9980 m4_define([_AM_AUTOCONF_VERSION], [])
9981
9982 # AM_SET_CURRENT_AUTOMAKE_VERSION
9983 # -------------------------------
9984 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9985 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9986 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9987 [AM_AUTOMAKE_VERSION([1.11.6])dnl
9988 m4_ifndef([AC_AUTOCONF_VERSION],
9989   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9990 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9991
9992 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
9993
9994 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
9995 #
9996 # This file is free software; the Free Software Foundation
9997 # gives unlimited permission to copy and/or distribute it,
9998 # with or without modifications, as long as this notice is preserved.
9999
10000 # serial 1
10001
10002 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
10003 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
10004 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
10005 #
10006 # Of course, Automake must honor this variable whenever it calls a
10007 # tool from the auxiliary directory.  The problem is that $srcdir (and
10008 # therefore $ac_aux_dir as well) can be either absolute or relative,
10009 # depending on how configure is run.  This is pretty annoying, since
10010 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
10011 # source directory, any form will work fine, but in subdirectories a
10012 # relative path needs to be adjusted first.
10013 #
10014 # $ac_aux_dir/missing
10015 #    fails when called from a subdirectory if $ac_aux_dir is relative
10016 # $top_srcdir/$ac_aux_dir/missing
10017 #    fails if $ac_aux_dir is absolute,
10018 #    fails when called from a subdirectory in a VPATH build with
10019 #          a relative $ac_aux_dir
10020 #
10021 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
10022 # are both prefixed by $srcdir.  In an in-source build this is usually
10023 # harmless because $srcdir is `.', but things will broke when you
10024 # start a VPATH build or use an absolute $srcdir.
10025 #
10026 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
10027 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
10028 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
10029 # and then we would define $MISSING as
10030 #   MISSING="\${SHELL} $am_aux_dir/missing"
10031 # This will work as long as MISSING is not called from configure, because
10032 # unfortunately $(top_srcdir) has no meaning in configure.
10033 # However there are other variables, like CC, which are often used in
10034 # configure, and could therefore not use this "fixed" $ac_aux_dir.
10035 #
10036 # Another solution, used here, is to always expand $ac_aux_dir to an
10037 # absolute PATH.  The drawback is that using absolute paths prevent a
10038 # configured tree to be moved without reconfiguration.
10039
10040 AC_DEFUN([AM_AUX_DIR_EXPAND],
10041 [dnl Rely on autoconf to set up CDPATH properly.
10042 AC_PREREQ([2.50])dnl
10043 # expand $ac_aux_dir to an absolute path
10044 am_aux_dir=`cd $ac_aux_dir && pwd`
10045 ])
10046
10047 # AM_CONDITIONAL                                            -*- Autoconf -*-
10048
10049 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
10050 # Free Software Foundation, Inc.
10051 #
10052 # This file is free software; the Free Software Foundation
10053 # gives unlimited permission to copy and/or distribute it,
10054 # with or without modifications, as long as this notice is preserved.
10055
10056 # serial 9
10057
10058 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
10059 # -------------------------------------
10060 # Define a conditional.
10061 AC_DEFUN([AM_CONDITIONAL],
10062 [AC_PREREQ(2.52)dnl
10063  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
10064         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
10065 AC_SUBST([$1_TRUE])dnl
10066 AC_SUBST([$1_FALSE])dnl
10067 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
10068 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
10069 m4_define([_AM_COND_VALUE_$1], [$2])dnl
10070 if $2; then
10071   $1_TRUE=
10072   $1_FALSE='#'
10073 else
10074   $1_TRUE='#'
10075   $1_FALSE=
10076 fi
10077 AC_CONFIG_COMMANDS_PRE(
10078 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
10079   AC_MSG_ERROR([[conditional "$1" was never defined.
10080 Usually this means the macro was only invoked conditionally.]])
10081 fi])])
10082
10083 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
10084 # 2010, 2011 Free Software Foundation, Inc.
10085 #
10086 # This file is free software; the Free Software Foundation
10087 # gives unlimited permission to copy and/or distribute it,
10088 # with or without modifications, as long as this notice is preserved.
10089
10090 # serial 12
10091
10092 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
10093 # written in clear, in which case automake, when reading aclocal.m4,
10094 # will think it sees a *use*, and therefore will trigger all it's
10095 # C support machinery.  Also note that it means that autoscan, seeing
10096 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10097
10098
10099 # _AM_DEPENDENCIES(NAME)
10100 # ----------------------
10101 # See how the compiler implements dependency checking.
10102 # NAME is "CC", "CXX", "GCJ", or "OBJC".
10103 # We try a few techniques and use that to set a single cache variable.
10104 #
10105 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
10106 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
10107 # dependency, and given that the user is not expected to run this macro,
10108 # just rely on AC_PROG_CC.
10109 AC_DEFUN([_AM_DEPENDENCIES],
10110 [AC_REQUIRE([AM_SET_DEPDIR])dnl
10111 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
10112 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
10113 AC_REQUIRE([AM_DEP_TRACK])dnl
10114
10115 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
10116        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
10117        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
10118        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
10119        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
10120                    [depcc="$$1"   am_compiler_list=])
10121
10122 AC_CACHE_CHECK([dependency style of $depcc],
10123                [am_cv_$1_dependencies_compiler_type],
10124 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10125   # We make a subdir and do the tests there.  Otherwise we can end up
10126   # making bogus files that we don't know about and never remove.  For
10127   # instance it was reported that on HP-UX the gcc test will end up
10128   # making a dummy file named `D' -- because `-MD' means `put the output
10129   # in D'.
10130   rm -rf conftest.dir
10131   mkdir conftest.dir
10132   # Copy depcomp to subdir because otherwise we won't find it if we're
10133   # using a relative directory.
10134   cp "$am_depcomp" conftest.dir
10135   cd conftest.dir
10136   # We will build objects and dependencies in a subdirectory because
10137   # it helps to detect inapplicable dependency modes.  For instance
10138   # both Tru64's cc and ICC support -MD to output dependencies as a
10139   # side effect of compilation, but ICC will put the dependencies in
10140   # the current directory while Tru64 will put them in the object
10141   # directory.
10142   mkdir sub
10143
10144   am_cv_$1_dependencies_compiler_type=none
10145   if test "$am_compiler_list" = ""; then
10146      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
10147   fi
10148   am__universal=false
10149   m4_case([$1], [CC],
10150     [case " $depcc " in #(
10151      *\ -arch\ *\ -arch\ *) am__universal=true ;;
10152      esac],
10153     [CXX],
10154     [case " $depcc " in #(
10155      *\ -arch\ *\ -arch\ *) am__universal=true ;;
10156      esac])
10157
10158   for depmode in $am_compiler_list; do
10159     # Setup a source with many dependencies, because some compilers
10160     # like to wrap large dependency lists on column 80 (with \), and
10161     # we should not choose a depcomp mode which is confused by this.
10162     #
10163     # We need to recreate these files for each test, as the compiler may
10164     # overwrite some of them when testing with obscure command lines.
10165     # This happens at least with the AIX C compiler.
10166     : > sub/conftest.c
10167     for i in 1 2 3 4 5 6; do
10168       echo '#include "conftst'$i'.h"' >> sub/conftest.c
10169       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
10170       # Solaris 8's {/usr,}/bin/sh.
10171       touch sub/conftst$i.h
10172     done
10173     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10174
10175     # We check with `-c' and `-o' for the sake of the "dashmstdout"
10176     # mode.  It turns out that the SunPro C++ compiler does not properly
10177     # handle `-M -o', and we need to detect this.  Also, some Intel
10178     # versions had trouble with output in subdirs
10179     am__obj=sub/conftest.${OBJEXT-o}
10180     am__minus_obj="-o $am__obj"
10181     case $depmode in
10182     gcc)
10183       # This depmode causes a compiler race in universal mode.
10184       test "$am__universal" = false || continue
10185       ;;
10186     nosideeffect)
10187       # after this tag, mechanisms are not by side-effect, so they'll
10188       # only be used when explicitly requested
10189       if test "x$enable_dependency_tracking" = xyes; then
10190         continue
10191       else
10192         break
10193       fi
10194       ;;
10195     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
10196       # This compiler won't grok `-c -o', but also, the minuso test has
10197       # not run yet.  These depmodes are late enough in the game, and
10198       # so weak that their functioning should not be impacted.
10199       am__obj=conftest.${OBJEXT-o}
10200       am__minus_obj=
10201       ;;
10202     none) break ;;
10203     esac
10204     if depmode=$depmode \
10205        source=sub/conftest.c object=$am__obj \
10206        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
10207        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
10208          >/dev/null 2>conftest.err &&
10209        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
10210        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
10211        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
10212        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10213       # icc doesn't choke on unknown options, it will just issue warnings
10214       # or remarks (even with -Werror).  So we grep stderr for any message
10215       # that says an option was ignored or not supported.
10216       # When given -MP, icc 7.0 and 7.1 complain thusly:
10217       #   icc: Command line warning: ignoring option '-M'; no argument required
10218       # The diagnosis changed in icc 8.0:
10219       #   icc: Command line remark: option '-MP' not supported
10220       if (grep 'ignoring option' conftest.err ||
10221           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10222         am_cv_$1_dependencies_compiler_type=$depmode
10223         break
10224       fi
10225     fi
10226   done
10227
10228   cd ..
10229   rm -rf conftest.dir
10230 else
10231   am_cv_$1_dependencies_compiler_type=none
10232 fi
10233 ])
10234 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10235 AM_CONDITIONAL([am__fastdep$1], [
10236   test "x$enable_dependency_tracking" != xno \
10237   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
10238 ])
10239
10240
10241 # AM_SET_DEPDIR
10242 # -------------
10243 # Choose a directory name for dependency files.
10244 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
10245 AC_DEFUN([AM_SET_DEPDIR],
10246 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10247 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
10248 ])
10249
10250
10251 # AM_DEP_TRACK
10252 # ------------
10253 AC_DEFUN([AM_DEP_TRACK],
10254 [AC_ARG_ENABLE(dependency-tracking,
10255 [  --disable-dependency-tracking  speeds up one-time build
10256   --enable-dependency-tracking   do not reject slow dependency extractors])
10257 if test "x$enable_dependency_tracking" != xno; then
10258   am_depcomp="$ac_aux_dir/depcomp"
10259   AMDEPBACKSLASH='\'
10260   am__nodep='_no'
10261 fi
10262 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
10263 AC_SUBST([AMDEPBACKSLASH])dnl
10264 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
10265 AC_SUBST([am__nodep])dnl
10266 _AM_SUBST_NOTMAKE([am__nodep])dnl
10267 ])
10268
10269 # Generate code to set up dependency tracking.              -*- Autoconf -*-
10270
10271 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
10272 # Free Software Foundation, Inc.
10273 #
10274 # This file is free software; the Free Software Foundation
10275 # gives unlimited permission to copy and/or distribute it,
10276 # with or without modifications, as long as this notice is preserved.
10277
10278 #serial 5
10279
10280 # _AM_OUTPUT_DEPENDENCY_COMMANDS
10281 # ------------------------------
10282 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
10283 [{
10284   # Autoconf 2.62 quotes --file arguments for eval, but not when files
10285   # are listed without --file.  Let's play safe and only enable the eval
10286   # if we detect the quoting.
10287   case $CONFIG_FILES in
10288   *\'*) eval set x "$CONFIG_FILES" ;;
10289   *)   set x $CONFIG_FILES ;;
10290   esac
10291   shift
10292   for mf
10293   do
10294     # Strip MF so we end up with the name of the file.
10295     mf=`echo "$mf" | sed -e 's/:.*$//'`
10296     # Check whether this is an Automake generated Makefile or not.
10297     # We used to match only the files named `Makefile.in', but
10298     # some people rename them; so instead we look at the file content.
10299     # Grep'ing the first line is not enough: some people post-process
10300     # each Makefile.in and add a new line on top of each file to say so.
10301     # Grep'ing the whole file is not good either: AIX grep has a line
10302     # limit of 2048, but all sed's we know have understand at least 4000.
10303     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
10304       dirpart=`AS_DIRNAME("$mf")`
10305     else
10306       continue
10307     fi
10308     # Extract the definition of DEPDIR, am__include, and am__quote
10309     # from the Makefile without running `make'.
10310     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
10311     test -z "$DEPDIR" && continue
10312     am__include=`sed -n 's/^am__include = //p' < "$mf"`
10313     test -z "am__include" && continue
10314     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
10315     # When using ansi2knr, U may be empty or an underscore; expand it
10316     U=`sed -n 's/^U = //p' < "$mf"`
10317     # Find all dependency output files, they are included files with
10318     # $(DEPDIR) in their names.  We invoke sed twice because it is the
10319     # simplest approach to changing $(DEPDIR) to its actual value in the
10320     # expansion.
10321     for file in `sed -n "
10322       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
10323          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
10324       # Make sure the directory exists.
10325       test -f "$dirpart/$file" && continue
10326       fdir=`AS_DIRNAME(["$file"])`
10327       AS_MKDIR_P([$dirpart/$fdir])
10328       # echo "creating $dirpart/$file"
10329       echo '# dummy' > "$dirpart/$file"
10330     done
10331   done
10332 }
10333 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10334
10335
10336 # AM_OUTPUT_DEPENDENCY_COMMANDS
10337 # -----------------------------
10338 # This macro should only be invoked once -- use via AC_REQUIRE.
10339 #
10340 # This code is only required when automatic dependency tracking
10341 # is enabled.  FIXME.  This creates each `.P' file that we will
10342 # need in order to bootstrap the dependency handling code.
10343 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10344 [AC_CONFIG_COMMANDS([depfiles],
10345      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10346      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10347 ])
10348
10349 # Do all the work for Automake.                             -*- Autoconf -*-
10350
10351 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
10352 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
10353 #
10354 # This file is free software; the Free Software Foundation
10355 # gives unlimited permission to copy and/or distribute it,
10356 # with or without modifications, as long as this notice is preserved.
10357
10358 # serial 16
10359
10360 # This macro actually does too much.  Some checks are only needed if
10361 # your package does certain things.  But this isn't really a big deal.
10362
10363 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10364 # AM_INIT_AUTOMAKE([OPTIONS])
10365 # -----------------------------------------------
10366 # The call with PACKAGE and VERSION arguments is the old style
10367 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
10368 # and VERSION should now be passed to AC_INIT and removed from
10369 # the call to AM_INIT_AUTOMAKE.
10370 # We support both call styles for the transition.  After
10371 # the next Automake release, Autoconf can make the AC_INIT
10372 # arguments mandatory, and then we can depend on a new Autoconf
10373 # release and drop the old call support.
10374 AC_DEFUN([AM_INIT_AUTOMAKE],
10375 [AC_PREREQ([2.62])dnl
10376 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
10377 dnl the ones we care about.
10378 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10379 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10380 AC_REQUIRE([AC_PROG_INSTALL])dnl
10381 if test "`cd $srcdir && pwd`" != "`pwd`"; then
10382   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10383   # is not polluted with repeated "-I."
10384   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10385   # test to see if srcdir already configured
10386   if test -f $srcdir/config.status; then
10387     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10388   fi
10389 fi
10390
10391 # test whether we have cygpath
10392 if test -z "$CYGPATH_W"; then
10393   if (cygpath --version) >/dev/null 2>/dev/null; then
10394     CYGPATH_W='cygpath -w'
10395   else
10396     CYGPATH_W=echo
10397   fi
10398 fi
10399 AC_SUBST([CYGPATH_W])
10400
10401 # Define the identity of the package.
10402 dnl Distinguish between old-style and new-style calls.
10403 m4_ifval([$2],
10404 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10405  AC_SUBST([PACKAGE], [$1])dnl
10406  AC_SUBST([VERSION], [$2])],
10407 [_AM_SET_OPTIONS([$1])dnl
10408 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10409 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
10410   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10411  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10412  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10413
10414 _AM_IF_OPTION([no-define],,
10415 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
10416  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
10417
10418 # Some tools Automake needs.
10419 AC_REQUIRE([AM_SANITY_CHECK])dnl
10420 AC_REQUIRE([AC_ARG_PROGRAM])dnl
10421 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
10422 AM_MISSING_PROG(AUTOCONF, autoconf)
10423 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
10424 AM_MISSING_PROG(AUTOHEADER, autoheader)
10425 AM_MISSING_PROG(MAKEINFO, makeinfo)
10426 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10427 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
10428 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
10429 # We need awk for the "check" target.  The system "awk" is bad on
10430 # some platforms.
10431 AC_REQUIRE([AC_PROG_AWK])dnl
10432 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10433 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10434 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
10435               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10436                              [_AM_PROG_TAR([v7])])])
10437 _AM_IF_OPTION([no-dependencies],,
10438 [AC_PROVIDE_IFELSE([AC_PROG_CC],
10439                   [_AM_DEPENDENCIES(CC)],
10440                   [define([AC_PROG_CC],
10441                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
10442 AC_PROVIDE_IFELSE([AC_PROG_CXX],
10443                   [_AM_DEPENDENCIES(CXX)],
10444                   [define([AC_PROG_CXX],
10445                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
10446 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
10447                   [_AM_DEPENDENCIES(OBJC)],
10448                   [define([AC_PROG_OBJC],
10449                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
10450 ])
10451 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
10452 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
10453 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
10454 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
10455 AC_CONFIG_COMMANDS_PRE(dnl
10456 [m4_provide_if([_AM_COMPILER_EXEEXT],
10457   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
10458 ])
10459
10460 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
10461 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10462 dnl mangled by Autoconf and run in a shell conditional statement.
10463 m4_define([_AC_COMPILER_EXEEXT],
10464 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10465
10466
10467 # When config.status generates a header, we must update the stamp-h file.
10468 # This file resides in the same directory as the config header
10469 # that is generated.  The stamp files are numbered to have different names.
10470
10471 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10472 # loop where config.status creates the headers, so we can generate
10473 # our stamp files there.
10474 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10475 [# Compute $1's index in $config_headers.
10476 _am_arg=$1
10477 _am_stamp_count=1
10478 for _am_header in $config_headers :; do
10479   case $_am_header in
10480     $_am_arg | $_am_arg:* )
10481       break ;;
10482     * )
10483       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10484   esac
10485 done
10486 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10487
10488 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
10489 # Inc.
10490 #
10491 # This file is free software; the Free Software Foundation
10492 # gives unlimited permission to copy and/or distribute it,
10493 # with or without modifications, as long as this notice is preserved.
10494
10495 # serial 1
10496
10497 # AM_PROG_INSTALL_SH
10498 # ------------------
10499 # Define $install_sh.
10500 AC_DEFUN([AM_PROG_INSTALL_SH],
10501 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10502 if test x"${install_sh}" != xset; then
10503   case $am_aux_dir in
10504   *\ * | *\     *)
10505     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10506   *)
10507     install_sh="\${SHELL} $am_aux_dir/install-sh"
10508   esac
10509 fi
10510 AC_SUBST(install_sh)])
10511
10512 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
10513 #
10514 # This file is free software; the Free Software Foundation
10515 # gives unlimited permission to copy and/or distribute it,
10516 # with or without modifications, as long as this notice is preserved.
10517
10518 # serial 2
10519
10520 # Check whether the underlying file-system supports filenames
10521 # with a leading dot.  For instance MS-DOS doesn't.
10522 AC_DEFUN([AM_SET_LEADING_DOT],
10523 [rm -rf .tst 2>/dev/null
10524 mkdir .tst 2>/dev/null
10525 if test -d .tst; then
10526   am__leading_dot=.
10527 else
10528   am__leading_dot=_
10529 fi
10530 rmdir .tst 2>/dev/null
10531 AC_SUBST([am__leading_dot])])
10532
10533 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
10534 # From Jim Meyering
10535
10536 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
10537 # 2011 Free Software Foundation, Inc.
10538 #
10539 # This file is free software; the Free Software Foundation
10540 # gives unlimited permission to copy and/or distribute it,
10541 # with or without modifications, as long as this notice is preserved.
10542
10543 # serial 5
10544
10545 # AM_MAINTAINER_MODE([DEFAULT-MODE])
10546 # ----------------------------------
10547 # Control maintainer-specific portions of Makefiles.
10548 # Default is to disable them, unless `enable' is passed literally.
10549 # For symmetry, `disable' may be passed as well.  Anyway, the user
10550 # can override the default with the --enable/--disable switch.
10551 AC_DEFUN([AM_MAINTAINER_MODE],
10552 [m4_case(m4_default([$1], [disable]),
10553        [enable], [m4_define([am_maintainer_other], [disable])],
10554        [disable], [m4_define([am_maintainer_other], [enable])],
10555        [m4_define([am_maintainer_other], [enable])
10556         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
10557 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
10558   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
10559   AC_ARG_ENABLE([maintainer-mode],
10560 [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
10561                           (and sometimes confusing) to the casual installer],
10562       [USE_MAINTAINER_MODE=$enableval],
10563       [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
10564   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
10565   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
10566   MAINT=$MAINTAINER_MODE_TRUE
10567   AC_SUBST([MAINT])dnl
10568 ]
10569 )
10570
10571 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
10572
10573 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
10574
10575 # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
10576 #
10577 # This file is free software; the Free Software Foundation
10578 # gives unlimited permission to copy and/or distribute it,
10579 # with or without modifications, as long as this notice is preserved.
10580
10581 # serial 4
10582
10583 # AM_MAKE_INCLUDE()
10584 # -----------------
10585 # Check to see how make treats includes.
10586 AC_DEFUN([AM_MAKE_INCLUDE],
10587 [am_make=${MAKE-make}
10588 cat > confinc << 'END'
10589 am__doit:
10590         @echo this is the am__doit target
10591 .PHONY: am__doit
10592 END
10593 # If we don't find an include directive, just comment out the code.
10594 AC_MSG_CHECKING([for style of include used by $am_make])
10595 am__include="#"
10596 am__quote=
10597 _am_result=none
10598 # First try GNU make style include.
10599 echo "include confinc" > confmf
10600 # Ignore all kinds of additional output from `make'.
10601 case `$am_make -s -f confmf 2> /dev/null` in #(
10602 *the\ am__doit\ target*)
10603   am__include=include
10604   am__quote=
10605   _am_result=GNU
10606   ;;
10607 esac
10608 # Now try BSD make style include.
10609 if test "$am__include" = "#"; then
10610    echo '.include "confinc"' > confmf
10611    case `$am_make -s -f confmf 2> /dev/null` in #(
10612    *the\ am__doit\ target*)
10613      am__include=.include
10614      am__quote="\""
10615      _am_result=BSD
10616      ;;
10617    esac
10618 fi
10619 AC_SUBST([am__include])
10620 AC_SUBST([am__quote])
10621 AC_MSG_RESULT([$_am_result])
10622 rm -f confinc confmf
10623 ])
10624
10625 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10626
10627 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
10628 # Free Software Foundation, Inc.
10629 #
10630 # This file is free software; the Free Software Foundation
10631 # gives unlimited permission to copy and/or distribute it,
10632 # with or without modifications, as long as this notice is preserved.
10633
10634 # serial 6
10635
10636 # AM_MISSING_PROG(NAME, PROGRAM)
10637 # ------------------------------
10638 AC_DEFUN([AM_MISSING_PROG],
10639 [AC_REQUIRE([AM_MISSING_HAS_RUN])
10640 $1=${$1-"${am_missing_run}$2"}
10641 AC_SUBST($1)])
10642
10643
10644 # AM_MISSING_HAS_RUN
10645 # ------------------
10646 # Define MISSING if not defined so far and test if it supports --run.
10647 # If it does, set am_missing_run to use it, otherwise, to nothing.
10648 AC_DEFUN([AM_MISSING_HAS_RUN],
10649 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10650 AC_REQUIRE_AUX_FILE([missing])dnl
10651 if test x"${MISSING+set}" != xset; then
10652   case $am_aux_dir in
10653   *\ * | *\     *)
10654     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10655   *)
10656     MISSING="\${SHELL} $am_aux_dir/missing" ;;
10657   esac
10658 fi
10659 # Use eval to expand $SHELL
10660 if eval "$MISSING --run true"; then
10661   am_missing_run="$MISSING --run "
10662 else
10663   am_missing_run=
10664   AC_MSG_WARN([`missing' script is too old or missing])
10665 fi
10666 ])
10667
10668 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
10669 # Inc.
10670 #
10671 # This file is free software; the Free Software Foundation
10672 # gives unlimited permission to copy and/or distribute it,
10673 # with or without modifications, as long as this notice is preserved.
10674
10675 # serial 1
10676
10677 # AM_PROG_MKDIR_P
10678 # ---------------
10679 # Check for `mkdir -p'.
10680 AC_DEFUN([AM_PROG_MKDIR_P],
10681 [AC_PREREQ([2.60])dnl
10682 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10683 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
10684 dnl while keeping a definition of mkdir_p for backward compatibility.
10685 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
10686 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
10687 dnl Makefile.ins that do not define MKDIR_P, so we do our own
10688 dnl adjustment using top_builddir (which is defined more often than
10689 dnl MKDIR_P).
10690 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
10691 case $mkdir_p in
10692   [[\\/$]]* | ?:[[\\/]]*) ;;
10693   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
10694 esac
10695 ])
10696
10697 # Helper functions for option handling.                     -*- Autoconf -*-
10698
10699 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
10700 # Foundation, Inc.
10701 #
10702 # This file is free software; the Free Software Foundation
10703 # gives unlimited permission to copy and/or distribute it,
10704 # with or without modifications, as long as this notice is preserved.
10705
10706 # serial 5
10707
10708 # _AM_MANGLE_OPTION(NAME)
10709 # -----------------------
10710 AC_DEFUN([_AM_MANGLE_OPTION],
10711 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10712
10713 # _AM_SET_OPTION(NAME)
10714 # --------------------
10715 # Set option NAME.  Presently that only means defining a flag for this option.
10716 AC_DEFUN([_AM_SET_OPTION],
10717 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10718
10719 # _AM_SET_OPTIONS(OPTIONS)
10720 # ------------------------
10721 # OPTIONS is a space-separated list of Automake options.
10722 AC_DEFUN([_AM_SET_OPTIONS],
10723 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10724
10725 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10726 # -------------------------------------------
10727 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10728 AC_DEFUN([_AM_IF_OPTION],
10729 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10730
10731 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
10732
10733 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
10734 # Free Software Foundation, Inc.
10735 #
10736 # This file is free software; the Free Software Foundation
10737 # gives unlimited permission to copy and/or distribute it,
10738 # with or without modifications, as long as this notice is preserved.
10739
10740 # serial 5
10741
10742 # AM_SANITY_CHECK
10743 # ---------------
10744 AC_DEFUN([AM_SANITY_CHECK],
10745 [AC_MSG_CHECKING([whether build environment is sane])
10746 # Just in case
10747 sleep 1
10748 echo timestamp > conftest.file
10749 # Reject unsafe characters in $srcdir or the absolute working directory
10750 # name.  Accept space and tab only in the latter.
10751 am_lf='
10752 '
10753 case `pwd` in
10754   *[[\\\"\#\$\&\'\`$am_lf]]*)
10755     AC_MSG_ERROR([unsafe absolute working directory name]);;
10756 esac
10757 case $srcdir in
10758   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
10759     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
10760 esac
10761
10762 # Do `set' in a subshell so we don't clobber the current shell's
10763 # arguments.  Must try -L first in case configure is actually a
10764 # symlink; some systems play weird games with the mod time of symlinks
10765 # (eg FreeBSD returns the mod time of the symlink's containing
10766 # directory).
10767 if (
10768    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10769    if test "$[*]" = "X"; then
10770       # -L didn't work.
10771       set X `ls -t "$srcdir/configure" conftest.file`
10772    fi
10773    rm -f conftest.file
10774    if test "$[*]" != "X $srcdir/configure conftest.file" \
10775       && test "$[*]" != "X conftest.file $srcdir/configure"; then
10776
10777       # If neither matched, then we have a broken ls.  This can happen
10778       # if, for instance, CONFIG_SHELL is bash and it inherits a
10779       # broken ls alias from the environment.  This has actually
10780       # happened.  Such a system could not be considered "sane".
10781       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10782 alias in your environment])
10783    fi
10784
10785    test "$[2]" = conftest.file
10786    )
10787 then
10788    # Ok.
10789    :
10790 else
10791    AC_MSG_ERROR([newly created file is older than distributed files!
10792 Check your system clock])
10793 fi
10794 AC_MSG_RESULT(yes)])
10795
10796 # Copyright (C) 2009, 2011  Free Software Foundation, Inc.
10797 #
10798 # This file is free software; the Free Software Foundation
10799 # gives unlimited permission to copy and/or distribute it,
10800 # with or without modifications, as long as this notice is preserved.
10801
10802 # serial 2
10803
10804 # AM_SILENT_RULES([DEFAULT])
10805 # --------------------------
10806 # Enable less verbose build rules; with the default set to DEFAULT
10807 # (`yes' being less verbose, `no' or empty being verbose).
10808 AC_DEFUN([AM_SILENT_RULES],
10809 [AC_ARG_ENABLE([silent-rules],
10810 [  --enable-silent-rules          less verbose build output (undo: `make V=1')
10811   --disable-silent-rules         verbose build output (undo: `make V=0')])
10812 case $enable_silent_rules in
10813 yes) AM_DEFAULT_VERBOSITY=0;;
10814 no)  AM_DEFAULT_VERBOSITY=1;;
10815 *)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
10816 esac
10817 dnl
10818 dnl A few `make' implementations (e.g., NonStop OS and NextStep)
10819 dnl do not support nested variable expansions.
10820 dnl See automake bug#9928 and bug#10237.
10821 am_make=${MAKE-make}
10822 AC_CACHE_CHECK([whether $am_make supports nested variables],
10823    [am_cv_make_support_nested_variables],
10824    [if AS_ECHO([['TRUE=$(BAR$(V))
10825 BAR0=false
10826 BAR1=true
10827 V=1
10828 am__doit:
10829         @$(TRUE)
10830 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
10831   am_cv_make_support_nested_variables=yes
10832 else
10833   am_cv_make_support_nested_variables=no
10834 fi])
10835 if test $am_cv_make_support_nested_variables = yes; then
10836   dnl Using `$V' instead of `$(V)' breaks IRIX make.
10837   AM_V='$(V)'
10838   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
10839 else
10840   AM_V=$AM_DEFAULT_VERBOSITY
10841   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
10842 fi
10843 AC_SUBST([AM_V])dnl
10844 AM_SUBST_NOTMAKE([AM_V])dnl
10845 AC_SUBST([AM_DEFAULT_V])dnl
10846 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
10847 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10848 AM_BACKSLASH='\'
10849 AC_SUBST([AM_BACKSLASH])dnl
10850 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10851 ])
10852
10853 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
10854 #
10855 # This file is free software; the Free Software Foundation
10856 # gives unlimited permission to copy and/or distribute it,
10857 # with or without modifications, as long as this notice is preserved.
10858
10859 # serial 1
10860
10861 # AM_PROG_INSTALL_STRIP
10862 # ---------------------
10863 # One issue with vendor `install' (even GNU) is that you can't
10864 # specify the program used to strip binaries.  This is especially
10865 # annoying in cross-compiling environments, where the build's strip
10866 # is unlikely to handle the host's binaries.
10867 # Fortunately install-sh will honor a STRIPPROG variable, so we
10868 # always use install-sh in `make install-strip', and initialize
10869 # STRIPPROG with the value of the STRIP variable (set by the user).
10870 AC_DEFUN([AM_PROG_INSTALL_STRIP],
10871 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10872 # Installed binaries are usually stripped using `strip' when the user
10873 # run `make install-strip'.  However `strip' might not be the right
10874 # tool to use in cross-compilation environments, therefore Automake
10875 # will honor the `STRIP' environment variable to overrule this program.
10876 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10877 if test "$cross_compiling" != no; then
10878   AC_CHECK_TOOL([STRIP], [strip], :)
10879 fi
10880 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10881 AC_SUBST([INSTALL_STRIP_PROGRAM])])
10882
10883 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
10884 #
10885 # This file is free software; the Free Software Foundation
10886 # gives unlimited permission to copy and/or distribute it,
10887 # with or without modifications, as long as this notice is preserved.
10888
10889 # serial 3
10890
10891 # _AM_SUBST_NOTMAKE(VARIABLE)
10892 # ---------------------------
10893 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10894 # This macro is traced by Automake.
10895 AC_DEFUN([_AM_SUBST_NOTMAKE])
10896
10897 # AM_SUBST_NOTMAKE(VARIABLE)
10898 # --------------------------
10899 # Public sister of _AM_SUBST_NOTMAKE.
10900 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10901
10902 # Check how to create a tarball.                            -*- Autoconf -*-
10903
10904 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
10905 #
10906 # This file is free software; the Free Software Foundation
10907 # gives unlimited permission to copy and/or distribute it,
10908 # with or without modifications, as long as this notice is preserved.
10909
10910 # serial 2
10911
10912 # _AM_PROG_TAR(FORMAT)
10913 # --------------------
10914 # Check how to create a tarball in format FORMAT.
10915 # FORMAT should be one of `v7', `ustar', or `pax'.
10916 #
10917 # Substitute a variable $(am__tar) that is a command
10918 # writing to stdout a FORMAT-tarball containing the directory
10919 # $tardir.
10920 #     tardir=directory && $(am__tar) > result.tar
10921 #
10922 # Substitute a variable $(am__untar) that extract such
10923 # a tarball read from stdin.
10924 #     $(am__untar) < result.tar
10925 AC_DEFUN([_AM_PROG_TAR],
10926 [# Always define AMTAR for backward compatibility.  Yes, it's still used
10927 # in the wild :-(  We should find a proper way to deprecate it ...
10928 AC_SUBST([AMTAR], ['$${TAR-tar}'])
10929 m4_if([$1], [v7],
10930      [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
10931      [m4_case([$1], [ustar],, [pax],,
10932               [m4_fatal([Unknown tar format])])
10933 AC_MSG_CHECKING([how to create a $1 tar archive])
10934 # Loop over all known methods to create a tar archive until one works.
10935 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10936 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10937 # Do not fold the above two line into one, because Tru64 sh and
10938 # Solaris sh will not grok spaces in the rhs of `-'.
10939 for _am_tool in $_am_tools
10940 do
10941   case $_am_tool in
10942   gnutar)
10943     for _am_tar in tar gnutar gtar;
10944     do
10945       AM_RUN_LOG([$_am_tar --version]) && break
10946     done
10947     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10948     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10949     am__untar="$_am_tar -xf -"
10950     ;;
10951   plaintar)
10952     # Must skip GNU tar: if it does not support --format= it doesn't create
10953     # ustar tarball either.
10954     (tar --version) >/dev/null 2>&1 && continue
10955     am__tar='tar chf - "$$tardir"'
10956     am__tar_='tar chf - "$tardir"'
10957     am__untar='tar xf -'
10958     ;;
10959   pax)
10960     am__tar='pax -L -x $1 -w "$$tardir"'
10961     am__tar_='pax -L -x $1 -w "$tardir"'
10962     am__untar='pax -r'
10963     ;;
10964   cpio)
10965     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10966     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10967     am__untar='cpio -i -H $1 -d'
10968     ;;
10969   none)
10970     am__tar=false
10971     am__tar_=false
10972     am__untar=false
10973     ;;
10974   esac
10975
10976   # If the value was cached, stop now.  We just wanted to have am__tar
10977   # and am__untar set.
10978   test -n "${am_cv_prog_tar_$1}" && break
10979
10980   # tar/untar a dummy directory, and stop if the command works
10981   rm -rf conftest.dir
10982   mkdir conftest.dir
10983   echo GrepMe > conftest.dir/file
10984   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10985   rm -rf conftest.dir
10986   if test -s conftest.tar; then
10987     AM_RUN_LOG([$am__untar <conftest.tar])
10988     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10989   fi
10990 done
10991 rm -rf conftest.dir
10992
10993 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10994 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10995 AC_SUBST([am__tar])
10996 AC_SUBST([am__untar])
10997 ]) # _AM_PROG_TAR
10998