]> git.sur5r.net Git - glabels/blob - aclocal.m4
New patch to get rid of unused screenshot
[glabels] / aclocal.m4
1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_AUTOCONF_VERSION],
15   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17 [m4_warning([this file was generated for autoconf 2.68.
18 You have another version of autoconf.  It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
23 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
24 #
25 # This file is free software, distributed under the terms of the GNU
26 # General Public License.  As a special exception to the GNU General
27 # Public License, this file may be distributed as part of a program
28 # that contains a configuration script generated by Autoconf, under
29 # the same distribution terms as the rest of that program.
30 #
31 # This file can be copied and used freely without restrictions.  It can
32 # be used in projects which are not available under the GNU Public License
33 # but which still want to provide support for the GNU gettext functionality.
34 #
35 # Macro to add for using GNU gettext.
36 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
37 #
38 # Modified to never use included libintl. 
39 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
40 #
41 # Major rework to remove unused code
42 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
43 #
44 # Added better handling of ALL_LINGUAS from GNU gettext version 
45 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
46 #
47 # Modified to require ngettext
48 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
49 #
50 # We need this here as well, since someone might use autoconf-2.5x
51 # to configure GLib then an older version to configure a package
52 # using AM_GLIB_GNU_GETTEXT
53 AC_PREREQ(2.53)
54
55 dnl
56 dnl We go to great lengths to make sure that aclocal won't 
57 dnl try to pull in the installed version of these macros
58 dnl when running aclocal in the glib directory.
59 dnl
60 m4_copy([AC_DEFUN],[glib_DEFUN])
61 m4_copy([AC_REQUIRE],[glib_REQUIRE])
62 dnl
63 dnl At the end, if we're not within glib, we'll define the public
64 dnl definitions in terms of our private definitions.
65 dnl
66
67 # GLIB_LC_MESSAGES
68 #--------------------
69 glib_DEFUN([GLIB_LC_MESSAGES],
70   [AC_CHECK_HEADERS([locale.h])
71     if test $ac_cv_header_locale_h = yes; then
72     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
73       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
74        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
75     if test $am_cv_val_LC_MESSAGES = yes; then
76       AC_DEFINE(HAVE_LC_MESSAGES, 1,
77         [Define if your <locale.h> file defines LC_MESSAGES.])
78     fi
79   fi])
80
81 # GLIB_PATH_PROG_WITH_TEST
82 #----------------------------
83 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
84 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
85 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
86 [# Extract the first word of "$2", so it can be a program name with args.
87 set dummy $2; ac_word=[$]2
88 AC_MSG_CHECKING([for $ac_word])
89 AC_CACHE_VAL(ac_cv_path_$1,
90 [case "[$]$1" in
91   /*)
92   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
93   ;;
94   *)
95   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
96   for ac_dir in ifelse([$5], , $PATH, [$5]); do
97     test -z "$ac_dir" && ac_dir=.
98     if test -f $ac_dir/$ac_word; then
99       if [$3]; then
100         ac_cv_path_$1="$ac_dir/$ac_word"
101         break
102       fi
103     fi
104   done
105   IFS="$ac_save_ifs"
106 dnl If no 4th arg is given, leave the cache variable unset,
107 dnl so AC_PATH_PROGS will keep looking.
108 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
109 ])dnl
110   ;;
111 esac])dnl
112 $1="$ac_cv_path_$1"
113 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
114   AC_MSG_RESULT([$]$1)
115 else
116   AC_MSG_RESULT(no)
117 fi
118 AC_SUBST($1)dnl
119 ])
120
121 # GLIB_WITH_NLS
122 #-----------------
123 glib_DEFUN([GLIB_WITH_NLS],
124   dnl NLS is obligatory
125   [USE_NLS=yes
126     AC_SUBST(USE_NLS)
127
128     gt_cv_have_gettext=no
129
130     CATOBJEXT=NONE
131     XGETTEXT=:
132     INTLLIBS=
133
134     AC_CHECK_HEADER(libintl.h,
135      [gt_cv_func_dgettext_libintl="no"
136       libintl_extra_libs=""
137
138       #
139       # First check in libc
140       #
141       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
142         [AC_TRY_LINK([
143 #include <libintl.h>
144 ],
145          [return !ngettext ("","", 1)],
146           gt_cv_func_ngettext_libc=yes,
147           gt_cv_func_ngettext_libc=no)
148         ])
149   
150       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
151               AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
152                 [AC_TRY_LINK([
153 #include <libintl.h>
154 ],
155                   [return !dgettext ("","")],
156                   gt_cv_func_dgettext_libc=yes,
157                   gt_cv_func_dgettext_libc=no)
158                 ])
159       fi
160   
161       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
162         AC_CHECK_FUNCS(bind_textdomain_codeset)
163       fi
164
165       #
166       # If we don't have everything we want, check in libintl
167       #
168       if test "$gt_cv_func_dgettext_libc" != "yes" \
169          || test "$gt_cv_func_ngettext_libc" != "yes" \
170          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
171         
172         AC_CHECK_LIB(intl, bindtextdomain,
173             [AC_CHECK_LIB(intl, ngettext,
174                     [AC_CHECK_LIB(intl, dgettext,
175                                   gt_cv_func_dgettext_libintl=yes)])])
176
177         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
178           AC_MSG_CHECKING([if -liconv is needed to use gettext])
179           AC_MSG_RESULT([])
180           AC_CHECK_LIB(intl, ngettext,
181                 [AC_CHECK_LIB(intl, dcgettext,
182                        [gt_cv_func_dgettext_libintl=yes
183                         libintl_extra_libs=-liconv],
184                         :,-liconv)],
185                 :,-liconv)
186         fi
187
188         #
189         # If we found libintl, then check in it for bind_textdomain_codeset();
190         # we'll prefer libc if neither have bind_textdomain_codeset(),
191         # and both have dgettext and ngettext
192         #
193         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
194           glib_save_LIBS="$LIBS"
195           LIBS="$LIBS -lintl $libintl_extra_libs"
196           unset ac_cv_func_bind_textdomain_codeset
197           AC_CHECK_FUNCS(bind_textdomain_codeset)
198           LIBS="$glib_save_LIBS"
199
200           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
201             gt_cv_func_dgettext_libc=no
202           else
203             if test "$gt_cv_func_dgettext_libc" = "yes" \
204                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
205               gt_cv_func_dgettext_libintl=no
206             fi
207           fi
208         fi
209       fi
210
211       if test "$gt_cv_func_dgettext_libc" = "yes" \
212         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
213         gt_cv_have_gettext=yes
214       fi
215   
216       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
217         INTLLIBS="-lintl $libintl_extra_libs"
218       fi
219   
220       if test "$gt_cv_have_gettext" = "yes"; then
221         AC_DEFINE(HAVE_GETTEXT,1,
222           [Define if the GNU gettext() function is already present or preinstalled.])
223         GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
224           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
225         if test "$MSGFMT" != "no"; then
226           glib_save_LIBS="$LIBS"
227           LIBS="$LIBS $INTLLIBS"
228           AC_CHECK_FUNCS(dcgettext)
229           MSGFMT_OPTS=
230           AC_MSG_CHECKING([if msgfmt accepts -c])
231           GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
232 msgid ""
233 msgstr ""
234 "Content-Type: text/plain; charset=UTF-8\n"
235 "Project-Id-Version: test 1.0\n"
236 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
237 "Last-Translator: test <foo@bar.xx>\n"
238 "Language-Team: C <LL@li.org>\n"
239 "MIME-Version: 1.0\n"
240 "Content-Transfer-Encoding: 8bit\n"
241 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
242           AC_SUBST(MSGFMT_OPTS)
243           AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
244           GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
245             [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
246           AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
247                          return _nl_msg_cat_cntr],
248             [CATOBJEXT=.gmo 
249              DATADIRNAME=share],
250             [case $host in
251             *-*-solaris*)
252             dnl On Solaris, if bind_textdomain_codeset is in libc,
253             dnl GNU format message catalog is always supported,
254             dnl since both are added to the libc all together.
255             dnl Hence, we'd like to go with DATADIRNAME=share and
256             dnl and CATOBJEXT=.gmo in this case.
257             AC_CHECK_FUNC(bind_textdomain_codeset,
258               [CATOBJEXT=.gmo 
259                DATADIRNAME=share],
260               [CATOBJEXT=.mo
261                DATADIRNAME=lib])
262             ;;
263             *)
264             CATOBJEXT=.mo
265             DATADIRNAME=lib
266             ;;
267             esac])
268           LIBS="$glib_save_LIBS"
269           INSTOBJEXT=.mo
270         else
271           gt_cv_have_gettext=no
272         fi
273       fi
274     ])
275
276     if test "$gt_cv_have_gettext" = "yes" ; then
277       AC_DEFINE(ENABLE_NLS, 1,
278         [always defined to indicate that i18n is enabled])
279     fi
280
281     dnl Test whether we really found GNU xgettext.
282     if test "$XGETTEXT" != ":"; then
283       dnl If it is not GNU xgettext we define it as : so that the
284       dnl Makefiles still can work.
285       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
286         : ;
287       else
288         AC_MSG_RESULT(
289           [found xgettext program is not GNU xgettext; ignore it])
290         XGETTEXT=":"
291       fi
292     fi
293
294     # We need to process the po/ directory.
295     POSUB=po
296
297     AC_OUTPUT_COMMANDS(
298       [case "$CONFIG_FILES" in *po/Makefile.in*)
299         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
300       esac])
301
302     dnl These rules are solely for the distribution goal.  While doing this
303     dnl we only have to keep exactly one list of the available catalogs
304     dnl in configure.ac.
305     for lang in $ALL_LINGUAS; do
306       GMOFILES="$GMOFILES $lang.gmo"
307       POFILES="$POFILES $lang.po"
308     done
309
310     dnl Make all variables we use known to autoconf.
311     AC_SUBST(CATALOGS)
312     AC_SUBST(CATOBJEXT)
313     AC_SUBST(DATADIRNAME)
314     AC_SUBST(GMOFILES)
315     AC_SUBST(INSTOBJEXT)
316     AC_SUBST(INTLLIBS)
317     AC_SUBST(PO_IN_DATADIR_TRUE)
318     AC_SUBST(PO_IN_DATADIR_FALSE)
319     AC_SUBST(POFILES)
320     AC_SUBST(POSUB)
321   ])
322
323 # AM_GLIB_GNU_GETTEXT
324 # -------------------
325 # Do checks necessary for use of gettext. If a suitable implementation 
326 # of gettext is found in either in libintl or in the C library,
327 # it will set INTLLIBS to the libraries needed for use of gettext
328 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
329 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
330 # on various variables needed by the Makefile.in.in installed by 
331 # glib-gettextize.
332 dnl
333 glib_DEFUN([GLIB_GNU_GETTEXT],
334   [AC_REQUIRE([AC_PROG_CC])dnl
335    AC_REQUIRE([AC_HEADER_STDC])dnl
336    
337    GLIB_LC_MESSAGES
338    GLIB_WITH_NLS
339
340    if test "$gt_cv_have_gettext" = "yes"; then
341      if test "x$ALL_LINGUAS" = "x"; then
342        LINGUAS=
343      else
344        AC_MSG_CHECKING(for catalogs to be installed)
345        NEW_LINGUAS=
346        for presentlang in $ALL_LINGUAS; do
347          useit=no
348          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
349            desiredlanguages="$LINGUAS"
350          else
351            desiredlanguages="$ALL_LINGUAS"
352          fi
353          for desiredlang in $desiredlanguages; do
354            # Use the presentlang catalog if desiredlang is
355            #   a. equal to presentlang, or
356            #   b. a variant of presentlang (because in this case,
357            #      presentlang can be used as a fallback for messages
358            #      which are not translated in the desiredlang catalog).
359            case "$desiredlang" in
360              "$presentlang"*) useit=yes;;
361            esac
362          done
363          if test $useit = yes; then
364            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
365          fi
366        done
367        LINGUAS=$NEW_LINGUAS
368        AC_MSG_RESULT($LINGUAS)
369      fi
370
371      dnl Construct list of names of catalog files to be constructed.
372      if test -n "$LINGUAS"; then
373        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
374      fi
375    fi
376
377    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
378    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
379    dnl Try to locate is.
380    MKINSTALLDIRS=
381    if test -n "$ac_aux_dir"; then
382      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
383    fi
384    if test -z "$MKINSTALLDIRS"; then
385      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
386    fi
387    AC_SUBST(MKINSTALLDIRS)
388
389    dnl Generate list of files to be processed by xgettext which will
390    dnl be included in po/Makefile.
391    test -d po || mkdir po
392    if test "x$srcdir" != "x."; then
393      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
394        posrcprefix="$srcdir/"
395      else
396        posrcprefix="../$srcdir/"
397      fi
398    else
399      posrcprefix="../"
400    fi
401    rm -f po/POTFILES
402    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
403         < $srcdir/po/POTFILES.in > po/POTFILES
404   ])
405
406 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
407 # -------------------------------
408 # Define VARIABLE to the location where catalog files will
409 # be installed by po/Makefile.
410 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
411 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
412 glib_save_prefix="$prefix"
413 glib_save_exec_prefix="$exec_prefix"
414 glib_save_datarootdir="$datarootdir"
415 test "x$prefix" = xNONE && prefix=$ac_default_prefix
416 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
417 datarootdir=`eval echo "${datarootdir}"`
418 if test "x$CATOBJEXT" = "x.mo" ; then
419   localedir=`eval echo "${libdir}/locale"`
420 else
421   localedir=`eval echo "${datadir}/locale"`
422 fi
423 prefix="$glib_save_prefix"
424 exec_prefix="$glib_save_exec_prefix"
425 datarootdir="$glib_save_datarootdir"
426 AC_DEFINE_UNQUOTED($1, "$localedir",
427   [Define the location where the catalogs will be installed])
428 ])
429
430 dnl
431 dnl Now the definitions that aclocal will find
432 dnl
433 ifdef(glib_configure_ac,[],[
434 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
435 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
436 ])dnl
437
438 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
439
440 # Create a temporary file with TEST-FILE as its contents and pass the
441 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
442 # 0 and perform ACTION-IF-FAIL for any other exit status.
443 AC_DEFUN([GLIB_RUN_PROG],
444 [cat >conftest.foo <<_ACEOF
445 $2
446 _ACEOF
447 if AC_RUN_LOG([$1 conftest.foo]); then
448   m4_ifval([$3], [$3], [:])
449 m4_ifvaln([$4], [else $4])dnl
450 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
451 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
452 fi])
453
454
455 dnl GNOME_COMPILE_WARNINGS
456 dnl Turn on many useful compiler warnings
457 dnl For now, only works on GCC
458 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
459     dnl ******************************
460     dnl More compiler warnings
461     dnl ******************************
462
463     AC_ARG_ENABLE(compile-warnings, 
464                   AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
465                                  [Turn on compiler warnings]),,
466                   [enable_compile_warnings="m4_default([$1],[yes])"])
467
468     warnCFLAGS=
469     if test "x$GCC" != xyes; then
470         enable_compile_warnings=no
471     fi
472
473     warning_flags=
474     realsave_CFLAGS="$CFLAGS"
475
476     case "$enable_compile_warnings" in
477     no)
478         warning_flags=
479         ;;
480     minimum)
481         warning_flags="-Wall"
482         ;;
483     yes)
484         warning_flags="-Wall -Wmissing-prototypes"
485         ;;
486     maximum|error)
487         warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
488         CFLAGS="$warning_flags $CFLAGS"
489         for option in -Wno-sign-compare; do
490                 SAVE_CFLAGS="$CFLAGS"
491                 CFLAGS="$CFLAGS $option"
492                 AC_MSG_CHECKING([whether gcc understands $option])
493                 AC_TRY_COMPILE([], [],
494                         has_option=yes,
495                         has_option=no,)
496                 CFLAGS="$SAVE_CFLAGS"
497                 AC_MSG_RESULT($has_option)
498                 if test $has_option = yes; then
499                   warning_flags="$warning_flags $option"
500                 fi
501                 unset has_option
502                 unset SAVE_CFLAGS
503         done
504         unset option
505         if test "$enable_compile_warnings" = "error" ; then
506             warning_flags="$warning_flags -Werror"
507         fi
508         ;;
509     *)
510         AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
511         ;;
512     esac
513     CFLAGS="$realsave_CFLAGS"
514     AC_MSG_CHECKING(what warning flags to pass to the C compiler)
515     AC_MSG_RESULT($warning_flags)
516
517     AC_ARG_ENABLE(iso-c,
518                   AC_HELP_STRING([--enable-iso-c],
519                                  [Try to warn if code is not ISO C ]),,
520                   [enable_iso_c=no])
521
522     AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
523     complCFLAGS=
524     if test "x$enable_iso_c" != "xno"; then
525         if test "x$GCC" = "xyes"; then
526         case " $CFLAGS " in
527             *[\ \       ]-ansi[\ \      ]*) ;;
528             *) complCFLAGS="$complCFLAGS -ansi" ;;
529         esac
530         case " $CFLAGS " in
531             *[\ \       ]-pedantic[\ \  ]*) ;;
532             *) complCFLAGS="$complCFLAGS -pedantic" ;;
533         esac
534         fi
535     fi
536     AC_MSG_RESULT($complCFLAGS)
537
538     WARN_CFLAGS="$warning_flags $complCFLAGS"
539     AC_SUBST(WARN_CFLAGS)
540 ])
541
542 dnl For C++, do basically the same thing.
543
544 AC_DEFUN([GNOME_CXX_WARNINGS],[
545   AC_ARG_ENABLE(cxx-warnings,
546                 AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
547                                [Turn on compiler warnings.]),,
548                 [enable_cxx_warnings="m4_default([$1],[minimum])"])
549
550   AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
551   warnCXXFLAGS=
552   if test "x$GXX" != xyes; then
553     enable_cxx_warnings=no
554   fi
555   if test "x$enable_cxx_warnings" != "xno"; then
556     if test "x$GXX" = "xyes"; then
557       case " $CXXFLAGS " in
558       *[\ \     ]-Wall[\ \      ]*) ;;
559       *) warnCXXFLAGS="-Wall -Wno-unused" ;;
560       esac
561
562       ## -W is not all that useful.  And it cannot be controlled
563       ## with individual -Wno-xxx flags, unlike -Wall
564       if test "x$enable_cxx_warnings" = "xyes"; then
565         warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
566       fi
567     fi
568   fi
569   AC_MSG_RESULT($warnCXXFLAGS)
570
571    AC_ARG_ENABLE(iso-cxx,
572                  AC_HELP_STRING([--enable-iso-cxx],
573                                 [Try to warn if code is not ISO C++ ]),,
574                  [enable_iso_cxx=no])
575
576    AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
577    complCXXFLAGS=
578    if test "x$enable_iso_cxx" != "xno"; then
579      if test "x$GXX" = "xyes"; then
580       case " $CXXFLAGS " in
581       *[\ \     ]-ansi[\ \      ]*) ;;
582       *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
583       esac
584
585       case " $CXXFLAGS " in
586       *[\ \     ]-pedantic[\ \  ]*) ;;
587       *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
588       esac
589      fi
590    fi
591   AC_MSG_RESULT($complCXXFLAGS)
592
593   WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
594   AC_SUBST(WARN_CXXFLAGS)
595 ])
596
597 dnl Do not call GNOME_DOC_DEFINES directly.  It is split out from
598 dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself.
599 AC_DEFUN([GNOME_DOC_DEFINES],
600 [
601 AC_ARG_WITH([help-dir],
602   AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
603   [with_help_dir='${datadir}/gnome/help'])
604 HELP_DIR="$with_help_dir"
605 AC_SUBST(HELP_DIR)
606
607 AC_ARG_WITH([omf-dir],
608   AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
609   [with_omf_dir='${datadir}/omf'])
610 OMF_DIR="$with_omf_dir"
611 AC_SUBST(OMF_DIR)
612
613 AC_ARG_WITH([help-formats],
614   AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
615   [with_help_formats=''])
616 DOC_USER_FORMATS="$with_help_formats"
617 AC_SUBST(DOC_USER_FORMATS)
618
619 AC_ARG_ENABLE([scrollkeeper],
620         [AC_HELP_STRING([--disable-scrollkeeper],
621                         [do not make updates to the scrollkeeper database])],,
622         enable_scrollkeeper=yes)
623 AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
624
625 dnl disable scrollkeeper automatically for distcheck
626 DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS"
627 AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
628
629 AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
630 ])
631
632 # GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
633 #
634 AC_DEFUN([GNOME_DOC_INIT],
635 [AC_REQUIRE([AC_PROG_LN_S])dnl
636
637 ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
638
639 AC_MSG_CHECKING([gnome-doc-utils >= $gdu_cv_version_required])
640 PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
641         [gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no])
642
643 if test "$gdu_cv_have_gdu" = "yes"; then
644         AC_MSG_RESULT([yes])
645         ifelse([$2],,[:],[$2])
646 else
647         AC_MSG_RESULT([no])
648         ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3])
649 fi
650
651 GNOME_DOC_DEFINES
652 ])
653
654 dnl GLIB_GSETTINGS
655 dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
656 dnl the schema should be compiled
657 dnl
658
659 AC_DEFUN([GLIB_GSETTINGS],
660 [
661   m4_pattern_allow([AM_V_GEN])
662   AC_ARG_ENABLE(schemas-compile,
663                 AC_HELP_STRING([--disable-schemas-compile],
664                                [Disable regeneration of gschemas.compiled on install]),
665                 [case ${enableval} in
666                   yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
667                   no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
668                   *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
669                  esac])
670   AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
671   PKG_PROG_PKG_CONFIG([0.16])
672   AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
673   if test x$cross_compiling != xyes; then
674     GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
675   else
676     AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
677   fi
678   AC_SUBST(GLIB_COMPILE_SCHEMAS)
679   if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
680     ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
681   else
682     ifelse([$1],,[:],[$1])
683   fi
684
685   GSETTINGS_RULES='
686 .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
687
688 mostlyclean-am: clean-gsettings-schemas
689
690 gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
691
692 %.gschema.valid: %.gschema.xml $(gsettings__enum_file)
693         $(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 [$]@
694
695 all-am: $(gsettings_SCHEMAS:.xml=.valid)
696 uninstall-am: uninstall-gsettings-schemas
697 install-data-am: install-gsettings-schemas
698
699 .SECONDARY: $(gsettings_SCHEMAS)
700
701 install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
702         @$(NORMAL_INSTALL)
703         if test -n "$^"; then \
704                 test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
705                 $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
706                 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
707         fi
708
709 uninstall-gsettings-schemas:
710         @$(NORMAL_UNINSTALL)
711         @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
712         files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
713         test -n "$$files" || exit 0; \
714         echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
715         cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
716         test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
717
718 clean-gsettings-schemas:
719         rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
720
721 ifdef gsettings_ENUM_NAMESPACE
722 $(gsettings__enum_file): $(gsettings_ENUM_FILES)
723         $(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 [$]@
724 endif
725 '
726   _GSETTINGS_SUBST(GSETTINGS_RULES)
727 ])
728
729 dnl _GSETTINGS_SUBST(VARIABLE)
730 dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
731 AC_DEFUN([_GSETTINGS_SUBST],
732 [
733 AC_SUBST([$1])
734 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
735 ]
736 )
737
738 dnl -*- mode: autoconf -*-
739
740 # serial 1
741
742 dnl Usage:
743 dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
744 AC_DEFUN([GTK_DOC_CHECK],
745 [
746   AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
747   AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
748
749   dnl check for tools we added during development
750   AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
751   AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
752   AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
753
754   dnl for overriding the documentation installation directory
755   AC_ARG_WITH([html-dir],
756     AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
757     [with_html_dir='${datadir}/gtk-doc/html'])
758   HTML_DIR="$with_html_dir"
759   AC_SUBST([HTML_DIR])
760
761   dnl enable/disable documentation building
762   AC_ARG_ENABLE([gtk-doc],
763     AS_HELP_STRING([--enable-gtk-doc],
764                    [use gtk-doc to build documentation [[default=no]]]),,
765     [enable_gtk_doc=no])
766
767   if test x$enable_gtk_doc = xyes; then
768     ifelse([$1],[],
769       [PKG_CHECK_EXISTS([gtk-doc],,
770                         AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
771       [PKG_CHECK_EXISTS([gtk-doc >= $1],,
772                         AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
773   fi
774
775   AC_MSG_CHECKING([whether to build gtk-doc documentation])
776   AC_MSG_RESULT($enable_gtk_doc)
777
778   dnl enable/disable output formats
779   AC_ARG_ENABLE([gtk-doc-html],
780     AS_HELP_STRING([--enable-gtk-doc-html],
781                    [build documentation in html format [[default=yes]]]),,
782     [enable_gtk_doc_html=yes])
783     AC_ARG_ENABLE([gtk-doc-pdf],
784       AS_HELP_STRING([--enable-gtk-doc-pdf],
785                      [build documentation in pdf format [[default=no]]]),,
786       [enable_gtk_doc_pdf=no])
787
788   if test -z "$GTKDOC_MKPDF"; then
789     enable_gtk_doc_pdf=no
790   fi
791
792
793   AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
794   AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
795   AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
796   AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
797   AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
798 ])
799
800
801 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
802 # serial 40 IT_PROG_INTLTOOL
803 AC_DEFUN([IT_PROG_INTLTOOL], [
804 AC_PREREQ([2.50])dnl
805 AC_REQUIRE([AM_NLS])dnl
806
807 case "$am__api_version" in
808     1.[01234])
809         AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
810     ;;
811     *)
812     ;;
813 esac
814
815 if test -n "$1"; then
816     AC_MSG_CHECKING([for intltool >= $1])
817
818     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
819     INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
820     [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
821     ]
822     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
823     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
824         AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
825 fi
826
827 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
828 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
829 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
830 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
831     AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
832 fi
833
834   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
835 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
836      INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
837      INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
838       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
839      INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
840    INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
841     INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
842 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
843        INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
844       INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
845       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
846       INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
847       INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
848     INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
849   INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
850     INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
851     INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
852    INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
853
854 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
855 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
856 _IT_SUBST(INTLTOOL_KEYS_RULE)
857 _IT_SUBST(INTLTOOL_PROP_RULE)
858 _IT_SUBST(INTLTOOL_OAF_RULE)
859 _IT_SUBST(INTLTOOL_PONG_RULE)
860 _IT_SUBST(INTLTOOL_SERVER_RULE)
861 _IT_SUBST(INTLTOOL_SHEET_RULE)
862 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
863 _IT_SUBST(INTLTOOL_UI_RULE)
864 _IT_SUBST(INTLTOOL_XAM_RULE)
865 _IT_SUBST(INTLTOOL_KBD_RULE)
866 _IT_SUBST(INTLTOOL_XML_RULE)
867 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
868 _IT_SUBST(INTLTOOL_CAVES_RULE)
869 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
870 _IT_SUBST(INTLTOOL_THEME_RULE)
871 _IT_SUBST(INTLTOOL_SERVICE_RULE)
872 _IT_SUBST(INTLTOOL_POLICY_RULE)
873
874 # Check the gettext tools to make sure they are GNU
875 AC_PATH_PROG(XGETTEXT, xgettext)
876 AC_PATH_PROG(MSGMERGE, msgmerge)
877 AC_PATH_PROG(MSGFMT, msgfmt)
878 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
879 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
880     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
881 fi
882 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
883 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
884 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
885 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
886     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
887 fi
888
889 AC_PATH_PROG(INTLTOOL_PERL, perl)
890 if test -z "$INTLTOOL_PERL"; then
891    AC_MSG_ERROR([perl not found])
892 fi
893 AC_MSG_CHECKING([for perl >= 5.8.1])
894 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
895 if test $? -ne 0; then
896    AC_MSG_ERROR([perl 5.8.1 is required for intltool])
897 else
898    IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
899    AC_MSG_RESULT([$IT_PERL_VERSION])
900 fi
901 if test "x$2" != "xno-xml"; then
902    AC_MSG_CHECKING([for XML::Parser])
903    if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
904        AC_MSG_RESULT([ok])
905    else
906        AC_MSG_ERROR([XML::Parser perl module is required for intltool])
907    fi
908 fi
909
910 # Substitute ALL_LINGUAS so we can use it in po/Makefile
911 AC_SUBST(ALL_LINGUAS)
912
913 # Set DATADIRNAME correctly if it is not set yet
914 # (copied from glib-gettext.m4)
915 if test -z "$DATADIRNAME"; then
916   AC_LINK_IFELSE(
917     [AC_LANG_PROGRAM([[]],
918                      [[extern int _nl_msg_cat_cntr;
919                        return _nl_msg_cat_cntr]])],
920     [DATADIRNAME=share],
921     [case $host in
922     *-*-solaris*)
923     dnl On Solaris, if bind_textdomain_codeset is in libc,
924     dnl GNU format message catalog is always supported,
925     dnl since both are added to the libc all together.
926     dnl Hence, we'd like to go with DATADIRNAME=share
927     dnl in this case.
928     AC_CHECK_FUNC(bind_textdomain_codeset,
929       [DATADIRNAME=share], [DATADIRNAME=lib])
930     ;;
931     *)
932     [DATADIRNAME=lib]
933     ;;
934     esac])
935 fi
936 AC_SUBST(DATADIRNAME)
937
938 IT_PO_SUBDIR([po])
939
940 ])
941
942
943 # IT_PO_SUBDIR(DIRNAME)
944 # ---------------------
945 # All po subdirs have to be declared with this macro; the subdir "po" is
946 # declared by IT_PROG_INTLTOOL.
947 #
948 AC_DEFUN([IT_PO_SUBDIR],
949 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
950 dnl
951 dnl The following CONFIG_COMMANDS should be executed at the very end
952 dnl of config.status.
953 AC_CONFIG_COMMANDS_PRE([
954   AC_CONFIG_COMMANDS([$1/stamp-it], [
955     if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
956        AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
957     fi
958     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
959     >"$1/stamp-it.tmp"
960     [sed '/^#/d
961          s/^[[].*] *//
962          /^[    ]*$/d
963         '"s|^|  $ac_top_srcdir/|" \
964       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
965     ]
966     [sed '/^POTFILES =/,/[^\\]$/ {
967                 /^POTFILES =/!d
968                 r $1/POTFILES
969           }
970          ' "$1/Makefile.in" >"$1/Makefile"]
971     rm -f "$1/Makefile.tmp"
972     mv "$1/stamp-it.tmp" "$1/stamp-it"
973   ])
974 ])dnl
975 ])
976
977 # _IT_SUBST(VARIABLE)
978 # -------------------
979 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
980 #
981 AC_DEFUN([_IT_SUBST],
982 [
983 AC_SUBST([$1])
984 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
985 ]
986 )
987
988 # deprecated macros
989 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
990 # A hint is needed for aclocal from Automake <= 1.9.4:
991 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
992
993
994 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
995 #
996 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
997 #                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
998 #                 Inc.
999 #   Written by Gordon Matzigkeit, 1996
1000 #
1001 # This file is free software; the Free Software Foundation gives
1002 # unlimited permission to copy and/or distribute it, with or without
1003 # modifications, as long as this notice is preserved.
1004
1005 m4_define([_LT_COPYING], [dnl
1006 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1007 #                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1008 #                 Inc.
1009 #   Written by Gordon Matzigkeit, 1996
1010 #
1011 #   This file is part of GNU Libtool.
1012 #
1013 # GNU Libtool is free software; you can redistribute it and/or
1014 # modify it under the terms of the GNU General Public License as
1015 # published by the Free Software Foundation; either version 2 of
1016 # the License, or (at your option) any later version.
1017 #
1018 # As a special exception to the GNU General Public License,
1019 # if you distribute this file as part of a program or library that
1020 # is built using GNU Libtool, you may include this file under the
1021 # same distribution terms that you use for the rest of that program.
1022 #
1023 # GNU Libtool is distributed in the hope that it will be useful,
1024 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1025 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1026 # GNU General Public License for more details.
1027 #
1028 # You should have received a copy of the GNU General Public License
1029 # along with GNU Libtool; see the file COPYING.  If not, a copy
1030 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1031 # obtained by writing to the Free Software Foundation, Inc.,
1032 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1033 ])
1034
1035 # serial 57 LT_INIT
1036
1037
1038 # LT_PREREQ(VERSION)
1039 # ------------------
1040 # Complain and exit if this libtool version is less that VERSION.
1041 m4_defun([LT_PREREQ],
1042 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1043        [m4_default([$3],
1044                    [m4_fatal([Libtool version $1 or higher is required],
1045                              63)])],
1046        [$2])])
1047
1048
1049 # _LT_CHECK_BUILDDIR
1050 # ------------------
1051 # Complain if the absolute build directory name contains unusual characters
1052 m4_defun([_LT_CHECK_BUILDDIR],
1053 [case `pwd` in
1054   *\ * | *\     *)
1055     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1056 esac
1057 ])
1058
1059
1060 # LT_INIT([OPTIONS])
1061 # ------------------
1062 AC_DEFUN([LT_INIT],
1063 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1064 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1065 AC_BEFORE([$0], [LT_LANG])dnl
1066 AC_BEFORE([$0], [LT_OUTPUT])dnl
1067 AC_BEFORE([$0], [LTDL_INIT])dnl
1068 m4_require([_LT_CHECK_BUILDDIR])dnl
1069
1070 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1071 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1072 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1073 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1074 dnl unless we require an AC_DEFUNed macro:
1075 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1076 AC_REQUIRE([LTSUGAR_VERSION])dnl
1077 AC_REQUIRE([LTVERSION_VERSION])dnl
1078 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1079 m4_require([_LT_PROG_LTMAIN])dnl
1080
1081 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1082
1083 dnl Parse OPTIONS
1084 _LT_SET_OPTIONS([$0], [$1])
1085
1086 # This can be used to rebuild libtool when needed
1087 LIBTOOL_DEPS="$ltmain"
1088
1089 # Always use our own libtool.
1090 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1091 AC_SUBST(LIBTOOL)dnl
1092
1093 _LT_SETUP
1094
1095 # Only expand once:
1096 m4_define([LT_INIT])
1097 ])# LT_INIT
1098
1099 # Old names:
1100 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1101 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1102 dnl aclocal-1.4 backwards compatibility:
1103 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1104 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1105
1106
1107 # _LT_CC_BASENAME(CC)
1108 # -------------------
1109 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1110 m4_defun([_LT_CC_BASENAME],
1111 [for cc_temp in $1""; do
1112   case $cc_temp in
1113     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1114     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1115     \-*) ;;
1116     *) break;;
1117   esac
1118 done
1119 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1120 ])
1121
1122
1123 # _LT_FILEUTILS_DEFAULTS
1124 # ----------------------
1125 # It is okay to use these file commands and assume they have been set
1126 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1127 m4_defun([_LT_FILEUTILS_DEFAULTS],
1128 [: ${CP="cp -f"}
1129 : ${MV="mv -f"}
1130 : ${RM="rm -f"}
1131 ])# _LT_FILEUTILS_DEFAULTS
1132
1133
1134 # _LT_SETUP
1135 # ---------
1136 m4_defun([_LT_SETUP],
1137 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1138 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1139 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1140 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1141
1142 _LT_DECL([], [host_alias], [0], [The host system])dnl
1143 _LT_DECL([], [host], [0])dnl
1144 _LT_DECL([], [host_os], [0])dnl
1145 dnl
1146 _LT_DECL([], [build_alias], [0], [The build system])dnl
1147 _LT_DECL([], [build], [0])dnl
1148 _LT_DECL([], [build_os], [0])dnl
1149 dnl
1150 AC_REQUIRE([AC_PROG_CC])dnl
1151 AC_REQUIRE([LT_PATH_LD])dnl
1152 AC_REQUIRE([LT_PATH_NM])dnl
1153 dnl
1154 AC_REQUIRE([AC_PROG_LN_S])dnl
1155 test -z "$LN_S" && LN_S="ln -s"
1156 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1157 dnl
1158 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1159 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1160 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1161 dnl
1162 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1163 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1164 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1165 m4_require([_LT_CMD_RELOAD])dnl
1166 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1167 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1168 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1169 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1170 m4_require([_LT_WITH_SYSROOT])dnl
1171
1172 _LT_CONFIG_LIBTOOL_INIT([
1173 # See if we are running on zsh, and set the options which allow our
1174 # commands through without removal of \ escapes INIT.
1175 if test -n "\${ZSH_VERSION+set}" ; then
1176    setopt NO_GLOB_SUBST
1177 fi
1178 ])
1179 if test -n "${ZSH_VERSION+set}" ; then
1180    setopt NO_GLOB_SUBST
1181 fi
1182
1183 _LT_CHECK_OBJDIR
1184
1185 m4_require([_LT_TAG_COMPILER])dnl
1186
1187 case $host_os in
1188 aix3*)
1189   # AIX sometimes has problems with the GCC collect2 program.  For some
1190   # reason, if we set the COLLECT_NAMES environment variable, the problems
1191   # vanish in a puff of smoke.
1192   if test "X${COLLECT_NAMES+set}" != Xset; then
1193     COLLECT_NAMES=
1194     export COLLECT_NAMES
1195   fi
1196   ;;
1197 esac
1198
1199 # Global variables:
1200 ofile=libtool
1201 can_build_shared=yes
1202
1203 # All known linkers require a `.a' archive for static linking (except MSVC,
1204 # which needs '.lib').
1205 libext=a
1206
1207 with_gnu_ld="$lt_cv_prog_gnu_ld"
1208
1209 old_CC="$CC"
1210 old_CFLAGS="$CFLAGS"
1211
1212 # Set sane defaults for various variables
1213 test -z "$CC" && CC=cc
1214 test -z "$LTCC" && LTCC=$CC
1215 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1216 test -z "$LD" && LD=ld
1217 test -z "$ac_objext" && ac_objext=o
1218
1219 _LT_CC_BASENAME([$compiler])
1220
1221 # Only perform the check for file, if the check method requires it
1222 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1223 case $deplibs_check_method in
1224 file_magic*)
1225   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1226     _LT_PATH_MAGIC
1227   fi
1228   ;;
1229 esac
1230
1231 # Use C for the default configuration in the libtool script
1232 LT_SUPPORTED_TAG([CC])
1233 _LT_LANG_C_CONFIG
1234 _LT_LANG_DEFAULT_CONFIG
1235 _LT_CONFIG_COMMANDS
1236 ])# _LT_SETUP
1237
1238
1239 # _LT_PREPARE_SED_QUOTE_VARS
1240 # --------------------------
1241 # Define a few sed substitution that help us do robust quoting.
1242 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1243 [# Backslashify metacharacters that are still active within
1244 # double-quoted strings.
1245 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1246
1247 # Same as above, but do not quote variable references.
1248 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1249
1250 # Sed substitution to delay expansion of an escaped shell variable in a
1251 # double_quote_subst'ed string.
1252 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1253
1254 # Sed substitution to delay expansion of an escaped single quote.
1255 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1256
1257 # Sed substitution to avoid accidental globbing in evaled expressions
1258 no_glob_subst='s/\*/\\\*/g'
1259 ])
1260
1261 # _LT_PROG_LTMAIN
1262 # ---------------
1263 # Note that this code is called both from `configure', and `config.status'
1264 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1265 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1266 # so we pass a copy along to make sure it has a sensible value anyway.
1267 m4_defun([_LT_PROG_LTMAIN],
1268 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1269 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1270 ltmain="$ac_aux_dir/ltmain.sh"
1271 ])# _LT_PROG_LTMAIN
1272
1273
1274
1275 # So that we can recreate a full libtool script including additional
1276 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1277 # in macros and then make a single call at the end using the `libtool'
1278 # label.
1279
1280
1281 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1282 # ----------------------------------------
1283 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1284 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1285 [m4_ifval([$1],
1286           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1287                      [$1
1288 ])])])
1289
1290 # Initialize.
1291 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1292
1293
1294 # _LT_CONFIG_LIBTOOL([COMMANDS])
1295 # ------------------------------
1296 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1297 m4_define([_LT_CONFIG_LIBTOOL],
1298 [m4_ifval([$1],
1299           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1300                      [$1
1301 ])])])
1302
1303 # Initialize.
1304 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1305
1306
1307 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1308 # -----------------------------------------------------
1309 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1310 [_LT_CONFIG_LIBTOOL([$1])
1311 _LT_CONFIG_LIBTOOL_INIT([$2])
1312 ])
1313
1314
1315 # _LT_FORMAT_COMMENT([COMMENT])
1316 # -----------------------------
1317 # Add leading comment marks to the start of each line, and a trailing
1318 # full-stop to the whole comment if one is not present already.
1319 m4_define([_LT_FORMAT_COMMENT],
1320 [m4_ifval([$1], [
1321 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1322               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1323 )])
1324
1325
1326
1327
1328
1329 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1330 # -------------------------------------------------------------------
1331 # CONFIGNAME is the name given to the value in the libtool script.
1332 # VARNAME is the (base) name used in the configure script.
1333 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1334 # VARNAME.  Any other value will be used directly.
1335 m4_define([_LT_DECL],
1336 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1337     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1338         [m4_ifval([$1], [$1], [$2])])
1339     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1340     m4_ifval([$4],
1341         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1342     lt_dict_add_subkey([lt_decl_dict], [$2],
1343         [tagged?], [m4_ifval([$5], [yes], [no])])])
1344 ])
1345
1346
1347 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1348 # --------------------------------------------------------
1349 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1350
1351
1352 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1353 # ------------------------------------------------
1354 m4_define([lt_decl_tag_varnames],
1355 [_lt_decl_filter([tagged?], [yes], $@)])
1356
1357
1358 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1359 # ---------------------------------------------------------
1360 m4_define([_lt_decl_filter],
1361 [m4_case([$#],
1362   [0], [m4_fatal([$0: too few arguments: $#])],
1363   [1], [m4_fatal([$0: too few arguments: $#: $1])],
1364   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1365   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1366   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1367 ])
1368
1369
1370 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1371 # --------------------------------------------------
1372 m4_define([lt_decl_quote_varnames],
1373 [_lt_decl_filter([value], [1], $@)])
1374
1375
1376 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1377 # ---------------------------------------------------
1378 m4_define([lt_decl_dquote_varnames],
1379 [_lt_decl_filter([value], [2], $@)])
1380
1381
1382 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1383 # ---------------------------------------------------
1384 m4_define([lt_decl_varnames_tagged],
1385 [m4_assert([$# <= 2])dnl
1386 _$0(m4_quote(m4_default([$1], [[, ]])),
1387     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1388     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1389 m4_define([_lt_decl_varnames_tagged],
1390 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1391
1392
1393 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1394 # ------------------------------------------------
1395 m4_define([lt_decl_all_varnames],
1396 [_$0(m4_quote(m4_default([$1], [[, ]])),
1397      m4_if([$2], [],
1398            m4_quote(lt_decl_varnames),
1399         m4_quote(m4_shift($@))))[]dnl
1400 ])
1401 m4_define([_lt_decl_all_varnames],
1402 [lt_join($@, lt_decl_varnames_tagged([$1],
1403                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1404 ])
1405
1406
1407 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1408 # ------------------------------------
1409 # Quote a variable value, and forward it to `config.status' so that its
1410 # declaration there will have the same value as in `configure'.  VARNAME
1411 # must have a single quote delimited value for this to work.
1412 m4_define([_LT_CONFIG_STATUS_DECLARE],
1413 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1414
1415
1416 # _LT_CONFIG_STATUS_DECLARATIONS
1417 # ------------------------------
1418 # We delimit libtool config variables with single quotes, so when
1419 # we write them to config.status, we have to be sure to quote all
1420 # embedded single quotes properly.  In configure, this macro expands
1421 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1422 #
1423 #    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1424 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1425 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1426     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1427
1428
1429 # _LT_LIBTOOL_TAGS
1430 # ----------------
1431 # Output comment and list of tags supported by the script
1432 m4_defun([_LT_LIBTOOL_TAGS],
1433 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1434 available_tags="_LT_TAGS"dnl
1435 ])
1436
1437
1438 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1439 # -----------------------------------
1440 # Extract the dictionary values for VARNAME (optionally with TAG) and
1441 # expand to a commented shell variable setting:
1442 #
1443 #    # Some comment about what VAR is for.
1444 #    visible_name=$lt_internal_name
1445 m4_define([_LT_LIBTOOL_DECLARE],
1446 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1447                                            [description])))[]dnl
1448 m4_pushdef([_libtool_name],
1449     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1450 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1451     [0], [_libtool_name=[$]$1],
1452     [1], [_libtool_name=$lt_[]$1],
1453     [2], [_libtool_name=$lt_[]$1],
1454     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1455 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1456 ])
1457
1458
1459 # _LT_LIBTOOL_CONFIG_VARS
1460 # -----------------------
1461 # Produce commented declarations of non-tagged libtool config variables
1462 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1463 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1464 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1465 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1466 [m4_foreach([_lt_var],
1467     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1468     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1469
1470
1471 # _LT_LIBTOOL_TAG_VARS(TAG)
1472 # -------------------------
1473 m4_define([_LT_LIBTOOL_TAG_VARS],
1474 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1475     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1476
1477
1478 # _LT_TAGVAR(VARNAME, [TAGNAME])
1479 # ------------------------------
1480 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1481
1482
1483 # _LT_CONFIG_COMMANDS
1484 # -------------------
1485 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1486 # variables for single and double quote escaping we saved from calls
1487 # to _LT_DECL, we can put quote escaped variables declarations
1488 # into `config.status', and then the shell code to quote escape them in
1489 # for loops in `config.status'.  Finally, any additional code accumulated
1490 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1491 m4_defun([_LT_CONFIG_COMMANDS],
1492 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1493         dnl If the libtool generation code has been placed in $CONFIG_LT,
1494         dnl instead of duplicating it all over again into config.status,
1495         dnl then we will have config.status run $CONFIG_LT later, so it
1496         dnl needs to know what name is stored there:
1497         [AC_CONFIG_COMMANDS([libtool],
1498             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1499     dnl If the libtool generation code is destined for config.status,
1500     dnl expand the accumulated commands and init code now:
1501     [AC_CONFIG_COMMANDS([libtool],
1502         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1503 ])#_LT_CONFIG_COMMANDS
1504
1505
1506 # Initialize.
1507 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1508 [
1509
1510 # The HP-UX ksh and POSIX shell print the target directory to stdout
1511 # if CDPATH is set.
1512 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1513
1514 sed_quote_subst='$sed_quote_subst'
1515 double_quote_subst='$double_quote_subst'
1516 delay_variable_subst='$delay_variable_subst'
1517 _LT_CONFIG_STATUS_DECLARATIONS
1518 LTCC='$LTCC'
1519 LTCFLAGS='$LTCFLAGS'
1520 compiler='$compiler_DEFAULT'
1521
1522 # A function that is used when there is no print builtin or printf.
1523 func_fallback_echo ()
1524 {
1525   eval 'cat <<_LTECHO_EOF
1526 \$[]1
1527 _LTECHO_EOF'
1528 }
1529
1530 # Quote evaled strings.
1531 for var in lt_decl_all_varnames([[ \
1532 ]], lt_decl_quote_varnames); do
1533     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1534     *[[\\\\\\\`\\"\\\$]]*)
1535       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1536       ;;
1537     *)
1538       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1539       ;;
1540     esac
1541 done
1542
1543 # Double-quote double-evaled strings.
1544 for var in lt_decl_all_varnames([[ \
1545 ]], lt_decl_dquote_varnames); do
1546     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1547     *[[\\\\\\\`\\"\\\$]]*)
1548       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1549       ;;
1550     *)
1551       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1552       ;;
1553     esac
1554 done
1555
1556 _LT_OUTPUT_LIBTOOL_INIT
1557 ])
1558
1559 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1560 # ------------------------------------
1561 # Generate a child script FILE with all initialization necessary to
1562 # reuse the environment learned by the parent script, and make the
1563 # file executable.  If COMMENT is supplied, it is inserted after the
1564 # `#!' sequence but before initialization text begins.  After this
1565 # macro, additional text can be appended to FILE to form the body of
1566 # the child script.  The macro ends with non-zero status if the
1567 # file could not be fully written (such as if the disk is full).
1568 m4_ifdef([AS_INIT_GENERATED],
1569 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1570 [m4_defun([_LT_GENERATED_FILE_INIT],
1571 [m4_require([AS_PREPARE])]dnl
1572 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1573 [lt_write_fail=0
1574 cat >$1 <<_ASEOF || lt_write_fail=1
1575 #! $SHELL
1576 # Generated by $as_me.
1577 $2
1578 SHELL=\${CONFIG_SHELL-$SHELL}
1579 export SHELL
1580 _ASEOF
1581 cat >>$1 <<\_ASEOF || lt_write_fail=1
1582 AS_SHELL_SANITIZE
1583 _AS_PREPARE
1584 exec AS_MESSAGE_FD>&1
1585 _ASEOF
1586 test $lt_write_fail = 0 && chmod +x $1[]dnl
1587 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1588
1589 # LT_OUTPUT
1590 # ---------
1591 # This macro allows early generation of the libtool script (before
1592 # AC_OUTPUT is called), incase it is used in configure for compilation
1593 # tests.
1594 AC_DEFUN([LT_OUTPUT],
1595 [: ${CONFIG_LT=./config.lt}
1596 AC_MSG_NOTICE([creating $CONFIG_LT])
1597 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1598 [# Run this file to recreate a libtool stub with the current configuration.])
1599
1600 cat >>"$CONFIG_LT" <<\_LTEOF
1601 lt_cl_silent=false
1602 exec AS_MESSAGE_LOG_FD>>config.log
1603 {
1604   echo
1605   AS_BOX([Running $as_me.])
1606 } >&AS_MESSAGE_LOG_FD
1607
1608 lt_cl_help="\
1609 \`$as_me' creates a local libtool stub from the current configuration,
1610 for use in further configure time tests before the real libtool is
1611 generated.
1612
1613 Usage: $[0] [[OPTIONS]]
1614
1615   -h, --help      print this help, then exit
1616   -V, --version   print version number, then exit
1617   -q, --quiet     do not print progress messages
1618   -d, --debug     don't remove temporary files
1619
1620 Report bugs to <bug-libtool@gnu.org>."
1621
1622 lt_cl_version="\
1623 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1624 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1625 configured by $[0], generated by m4_PACKAGE_STRING.
1626
1627 Copyright (C) 2010 Free Software Foundation, Inc.
1628 This config.lt script is free software; the Free Software Foundation
1629 gives unlimited permision to copy, distribute and modify it."
1630
1631 while test $[#] != 0
1632 do
1633   case $[1] in
1634     --version | --v* | -V )
1635       echo "$lt_cl_version"; exit 0 ;;
1636     --help | --h* | -h )
1637       echo "$lt_cl_help"; exit 0 ;;
1638     --debug | --d* | -d )
1639       debug=: ;;
1640     --quiet | --q* | --silent | --s* | -q )
1641       lt_cl_silent=: ;;
1642
1643     -*) AC_MSG_ERROR([unrecognized option: $[1]
1644 Try \`$[0] --help' for more information.]) ;;
1645
1646     *) AC_MSG_ERROR([unrecognized argument: $[1]
1647 Try \`$[0] --help' for more information.]) ;;
1648   esac
1649   shift
1650 done
1651
1652 if $lt_cl_silent; then
1653   exec AS_MESSAGE_FD>/dev/null
1654 fi
1655 _LTEOF
1656
1657 cat >>"$CONFIG_LT" <<_LTEOF
1658 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1659 _LTEOF
1660
1661 cat >>"$CONFIG_LT" <<\_LTEOF
1662 AC_MSG_NOTICE([creating $ofile])
1663 _LT_OUTPUT_LIBTOOL_COMMANDS
1664 AS_EXIT(0)
1665 _LTEOF
1666 chmod +x "$CONFIG_LT"
1667
1668 # configure is writing to config.log, but config.lt does its own redirection,
1669 # appending to config.log, which fails on DOS, as config.log is still kept
1670 # open by configure.  Here we exec the FD to /dev/null, effectively closing
1671 # config.log, so it can be properly (re)opened and appended to by config.lt.
1672 lt_cl_success=:
1673 test "$silent" = yes &&
1674   lt_config_lt_args="$lt_config_lt_args --quiet"
1675 exec AS_MESSAGE_LOG_FD>/dev/null
1676 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1677 exec AS_MESSAGE_LOG_FD>>config.log
1678 $lt_cl_success || AS_EXIT(1)
1679 ])# LT_OUTPUT
1680
1681
1682 # _LT_CONFIG(TAG)
1683 # ---------------
1684 # If TAG is the built-in tag, create an initial libtool script with a
1685 # default configuration from the untagged config vars.  Otherwise add code
1686 # to config.status for appending the configuration named by TAG from the
1687 # matching tagged config vars.
1688 m4_defun([_LT_CONFIG],
1689 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1690 _LT_CONFIG_SAVE_COMMANDS([
1691   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1692   m4_if(_LT_TAG, [C], [
1693     # See if we are running on zsh, and set the options which allow our
1694     # commands through without removal of \ escapes.
1695     if test -n "${ZSH_VERSION+set}" ; then
1696       setopt NO_GLOB_SUBST
1697     fi
1698
1699     cfgfile="${ofile}T"
1700     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1701     $RM "$cfgfile"
1702
1703     cat <<_LT_EOF >> "$cfgfile"
1704 #! $SHELL
1705
1706 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1707 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1708 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1709 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1710 #
1711 _LT_COPYING
1712 _LT_LIBTOOL_TAGS
1713
1714 # ### BEGIN LIBTOOL CONFIG
1715 _LT_LIBTOOL_CONFIG_VARS
1716 _LT_LIBTOOL_TAG_VARS
1717 # ### END LIBTOOL CONFIG
1718
1719 _LT_EOF
1720
1721   case $host_os in
1722   aix3*)
1723     cat <<\_LT_EOF >> "$cfgfile"
1724 # AIX sometimes has problems with the GCC collect2 program.  For some
1725 # reason, if we set the COLLECT_NAMES environment variable, the problems
1726 # vanish in a puff of smoke.
1727 if test "X${COLLECT_NAMES+set}" != Xset; then
1728   COLLECT_NAMES=
1729   export COLLECT_NAMES
1730 fi
1731 _LT_EOF
1732     ;;
1733   esac
1734
1735   _LT_PROG_LTMAIN
1736
1737   # We use sed instead of cat because bash on DJGPP gets confused if
1738   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1739   # text mode, it properly converts lines to CR/LF.  This bash problem
1740   # is reportedly fixed, but why not run on old versions too?
1741   sed '$q' "$ltmain" >> "$cfgfile" \
1742      || (rm -f "$cfgfile"; exit 1)
1743
1744   _LT_PROG_REPLACE_SHELLFNS
1745
1746    mv -f "$cfgfile" "$ofile" ||
1747     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1748   chmod +x "$ofile"
1749 ],
1750 [cat <<_LT_EOF >> "$ofile"
1751
1752 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1753 dnl in a comment (ie after a #).
1754 # ### BEGIN LIBTOOL TAG CONFIG: $1
1755 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
1756 # ### END LIBTOOL TAG CONFIG: $1
1757 _LT_EOF
1758 ])dnl /m4_if
1759 ],
1760 [m4_if([$1], [], [
1761     PACKAGE='$PACKAGE'
1762     VERSION='$VERSION'
1763     TIMESTAMP='$TIMESTAMP'
1764     RM='$RM'
1765     ofile='$ofile'], [])
1766 ])dnl /_LT_CONFIG_SAVE_COMMANDS
1767 ])# _LT_CONFIG
1768
1769
1770 # LT_SUPPORTED_TAG(TAG)
1771 # ---------------------
1772 # Trace this macro to discover what tags are supported by the libtool
1773 # --tag option, using:
1774 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1775 AC_DEFUN([LT_SUPPORTED_TAG], [])
1776
1777
1778 # C support is built-in for now
1779 m4_define([_LT_LANG_C_enabled], [])
1780 m4_define([_LT_TAGS], [])
1781
1782
1783 # LT_LANG(LANG)
1784 # -------------
1785 # Enable libtool support for the given language if not already enabled.
1786 AC_DEFUN([LT_LANG],
1787 [AC_BEFORE([$0], [LT_OUTPUT])dnl
1788 m4_case([$1],
1789   [C],                  [_LT_LANG(C)],
1790   [C++],                [_LT_LANG(CXX)],
1791   [Java],               [_LT_LANG(GCJ)],
1792   [Fortran 77],         [_LT_LANG(F77)],
1793   [Fortran],            [_LT_LANG(FC)],
1794   [Windows Resource],   [_LT_LANG(RC)],
1795   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1796     [_LT_LANG($1)],
1797     [m4_fatal([$0: unsupported language: "$1"])])])dnl
1798 ])# LT_LANG
1799
1800
1801 # _LT_LANG(LANGNAME)
1802 # ------------------
1803 m4_defun([_LT_LANG],
1804 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
1805   [LT_SUPPORTED_TAG([$1])dnl
1806   m4_append([_LT_TAGS], [$1 ])dnl
1807   m4_define([_LT_LANG_]$1[_enabled], [])dnl
1808   _LT_LANG_$1_CONFIG($1)])dnl
1809 ])# _LT_LANG
1810
1811
1812 # _LT_LANG_DEFAULT_CONFIG
1813 # -----------------------
1814 m4_defun([_LT_LANG_DEFAULT_CONFIG],
1815 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
1816   [LT_LANG(CXX)],
1817   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1818
1819 AC_PROVIDE_IFELSE([AC_PROG_F77],
1820   [LT_LANG(F77)],
1821   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1822
1823 AC_PROVIDE_IFELSE([AC_PROG_FC],
1824   [LT_LANG(FC)],
1825   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1826
1827 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1828 dnl pulling things in needlessly.
1829 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1830   [LT_LANG(GCJ)],
1831   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1832     [LT_LANG(GCJ)],
1833     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1834       [LT_LANG(GCJ)],
1835       [m4_ifdef([AC_PROG_GCJ],
1836         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1837        m4_ifdef([A][M_PROG_GCJ],
1838         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1839        m4_ifdef([LT_PROG_GCJ],
1840         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1841
1842 AC_PROVIDE_IFELSE([LT_PROG_RC],
1843   [LT_LANG(RC)],
1844   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1845 ])# _LT_LANG_DEFAULT_CONFIG
1846
1847 # Obsolete macros:
1848 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1849 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1850 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1851 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1852 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1853 dnl aclocal-1.4 backwards compatibility:
1854 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1855 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1856 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1857 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1858 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1859
1860
1861 # _LT_TAG_COMPILER
1862 # ----------------
1863 m4_defun([_LT_TAG_COMPILER],
1864 [AC_REQUIRE([AC_PROG_CC])dnl
1865
1866 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1867 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1868 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1869 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1870
1871 # If no C compiler was specified, use CC.
1872 LTCC=${LTCC-"$CC"}
1873
1874 # If no C compiler flags were specified, use CFLAGS.
1875 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1876
1877 # Allow CC to be a program name with arguments.
1878 compiler=$CC
1879 ])# _LT_TAG_COMPILER
1880
1881
1882 # _LT_COMPILER_BOILERPLATE
1883 # ------------------------
1884 # Check for compiler boilerplate output or warnings with
1885 # the simple compiler test code.
1886 m4_defun([_LT_COMPILER_BOILERPLATE],
1887 [m4_require([_LT_DECL_SED])dnl
1888 ac_outfile=conftest.$ac_objext
1889 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1890 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1891 _lt_compiler_boilerplate=`cat conftest.err`
1892 $RM conftest*
1893 ])# _LT_COMPILER_BOILERPLATE
1894
1895
1896 # _LT_LINKER_BOILERPLATE
1897 # ----------------------
1898 # Check for linker boilerplate output or warnings with
1899 # the simple link test code.
1900 m4_defun([_LT_LINKER_BOILERPLATE],
1901 [m4_require([_LT_DECL_SED])dnl
1902 ac_outfile=conftest.$ac_objext
1903 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1904 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1905 _lt_linker_boilerplate=`cat conftest.err`
1906 $RM -r conftest*
1907 ])# _LT_LINKER_BOILERPLATE
1908
1909 # _LT_REQUIRED_DARWIN_CHECKS
1910 # -------------------------
1911 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1912   case $host_os in
1913     rhapsody* | darwin*)
1914     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1915     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1916     AC_CHECK_TOOL([LIPO], [lipo], [:])
1917     AC_CHECK_TOOL([OTOOL], [otool], [:])
1918     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1919     _LT_DECL([], [DSYMUTIL], [1],
1920       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1921     _LT_DECL([], [NMEDIT], [1],
1922       [Tool to change global to local symbols on Mac OS X])
1923     _LT_DECL([], [LIPO], [1],
1924       [Tool to manipulate fat objects and archives on Mac OS X])
1925     _LT_DECL([], [OTOOL], [1],
1926       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1927     _LT_DECL([], [OTOOL64], [1],
1928       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1929
1930     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1931       [lt_cv_apple_cc_single_mod=no
1932       if test -z "${LT_MULTI_MODULE}"; then
1933         # By default we will add the -single_module flag. You can override
1934         # by either setting the environment variable LT_MULTI_MODULE
1935         # non-empty at configure time, or by adding -multi_module to the
1936         # link flags.
1937         rm -rf libconftest.dylib*
1938         echo "int foo(void){return 1;}" > conftest.c
1939         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1940 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1941         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1942           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1943         _lt_result=$?
1944         if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1945           lt_cv_apple_cc_single_mod=yes
1946         else
1947           cat conftest.err >&AS_MESSAGE_LOG_FD
1948         fi
1949         rm -rf libconftest.dylib*
1950         rm -f conftest.*
1951       fi])
1952     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1953       [lt_cv_ld_exported_symbols_list],
1954       [lt_cv_ld_exported_symbols_list=no
1955       save_LDFLAGS=$LDFLAGS
1956       echo "_main" > conftest.sym
1957       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1958       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1959         [lt_cv_ld_exported_symbols_list=yes],
1960         [lt_cv_ld_exported_symbols_list=no])
1961         LDFLAGS="$save_LDFLAGS"
1962     ])
1963     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1964       [lt_cv_ld_force_load=no
1965       cat > conftest.c << _LT_EOF
1966 int forced_loaded() { return 2;}
1967 _LT_EOF
1968       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1969       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1970       echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1971       $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1972       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1973       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1974       cat > conftest.c << _LT_EOF
1975 int main() { return 0;}
1976 _LT_EOF
1977       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1978       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1979       _lt_result=$?
1980       if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
1981         lt_cv_ld_force_load=yes
1982       else
1983         cat conftest.err >&AS_MESSAGE_LOG_FD
1984       fi
1985         rm -f conftest.err libconftest.a conftest conftest.c
1986         rm -rf conftest.dSYM
1987     ])
1988     case $host_os in
1989     rhapsody* | darwin1.[[012]])
1990       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1991     darwin1.*)
1992       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1993     darwin*) # darwin 5.x on
1994       # if running on 10.5 or later, the deployment target defaults
1995       # to the OS version, if on x86, and 10.4, the deployment
1996       # target defaults to 10.4. Don't you love it?
1997       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1998         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1999           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2000         10.[[012]]*)
2001           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2002         10.*)
2003           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2004       esac
2005     ;;
2006   esac
2007     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2008       _lt_dar_single_mod='$single_module'
2009     fi
2010     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2011       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2012     else
2013       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2014     fi
2015     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2016       _lt_dsymutil='~$DSYMUTIL $lib || :'
2017     else
2018       _lt_dsymutil=
2019     fi
2020     ;;
2021   esac
2022 ])
2023
2024
2025 # _LT_DARWIN_LINKER_FEATURES
2026 # --------------------------
2027 # Checks for linker and compiler features on darwin
2028 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2029 [
2030   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2031   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2032   _LT_TAGVAR(hardcode_direct, $1)=no
2033   _LT_TAGVAR(hardcode_automatic, $1)=yes
2034   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2035   if test "$lt_cv_ld_force_load" = "yes"; then
2036     _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\"`'
2037   else
2038     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2039   fi
2040   _LT_TAGVAR(link_all_deplibs, $1)=yes
2041   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2042   case $cc_basename in
2043      ifort*) _lt_dar_can_shared=yes ;;
2044      *) _lt_dar_can_shared=$GCC ;;
2045   esac
2046   if test "$_lt_dar_can_shared" = "yes"; then
2047     output_verbose_link_cmd=func_echo_all
2048     _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}"
2049     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2050     _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}"
2051     _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}"
2052     m4_if([$1], [CXX],
2053 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2054       _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}"
2055       _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}"
2056     fi
2057 ],[])
2058   else
2059   _LT_TAGVAR(ld_shlibs, $1)=no
2060   fi
2061 ])
2062
2063 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2064 # ----------------------------------
2065 # Links a minimal program and checks the executable
2066 # for the system default hardcoded library path. In most cases,
2067 # this is /usr/lib:/lib, but when the MPI compilers are used
2068 # the location of the communication and MPI libs are included too.
2069 # If we don't find anything, use the default library path according
2070 # to the aix ld manual.
2071 # Store the results from the different compilers for each TAGNAME.
2072 # Allow to override them for all tags through lt_cv_aix_libpath.
2073 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2074 [m4_require([_LT_DECL_SED])dnl
2075 if test "${lt_cv_aix_libpath+set}" = set; then
2076   aix_libpath=$lt_cv_aix_libpath
2077 else
2078   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2079   [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2080   lt_aix_libpath_sed='[
2081       /Import File Strings/,/^$/ {
2082           /^0/ {
2083               s/^0  *\([^ ]*\) *$/\1/
2084               p
2085           }
2086       }]'
2087   _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2088   # Check for a 64-bit object if we didn't find anything.
2089   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2090     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2091   fi],[])
2092   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2093     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2094   fi
2095   ])
2096   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2097 fi
2098 ])# _LT_SYS_MODULE_PATH_AIX
2099
2100
2101 # _LT_SHELL_INIT(ARG)
2102 # -------------------
2103 m4_define([_LT_SHELL_INIT],
2104 [m4_divert_text([M4SH-INIT], [$1
2105 ])])# _LT_SHELL_INIT
2106
2107
2108
2109 # _LT_PROG_ECHO_BACKSLASH
2110 # -----------------------
2111 # Find how we can fake an echo command that does not interpret backslash.
2112 # In particular, with Autoconf 2.60 or later we add some code to the start
2113 # of the generated configure script which will find a shell with a builtin
2114 # printf (which we can use as an echo command).
2115 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2116 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2117 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2118 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2119
2120 AC_MSG_CHECKING([how to print strings])
2121 # Test print first, because it will be a builtin if present.
2122 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2123    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2124   ECHO='print -r --'
2125 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2126   ECHO='printf %s\n'
2127 else
2128   # Use this function as a fallback that always works.
2129   func_fallback_echo ()
2130   {
2131     eval 'cat <<_LTECHO_EOF
2132 $[]1
2133 _LTECHO_EOF'
2134   }
2135   ECHO='func_fallback_echo'
2136 fi
2137
2138 # func_echo_all arg...
2139 # Invoke $ECHO with all args, space-separated.
2140 func_echo_all ()
2141 {
2142     $ECHO "$*" 
2143 }
2144
2145 case "$ECHO" in
2146   printf*) AC_MSG_RESULT([printf]) ;;
2147   print*) AC_MSG_RESULT([print -r]) ;;
2148   *) AC_MSG_RESULT([cat]) ;;
2149 esac
2150
2151 m4_ifdef([_AS_DETECT_SUGGESTED],
2152 [_AS_DETECT_SUGGESTED([
2153   test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2154     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2155     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2156     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2157     PATH=/empty FPATH=/empty; export PATH FPATH
2158     test "X`printf %s $ECHO`" = "X$ECHO" \
2159       || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2160
2161 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2162 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2163 ])# _LT_PROG_ECHO_BACKSLASH
2164
2165
2166 # _LT_WITH_SYSROOT
2167 # ----------------
2168 AC_DEFUN([_LT_WITH_SYSROOT],
2169 [AC_MSG_CHECKING([for sysroot])
2170 AC_ARG_WITH([sysroot],
2171 [  --with-sysroot[=DIR] Search for dependent libraries within DIR
2172                         (or the compiler's sysroot if not specified).],
2173 [], [with_sysroot=no])
2174
2175 dnl lt_sysroot will always be passed unquoted.  We quote it here
2176 dnl in case the user passed a directory name.
2177 lt_sysroot=
2178 case ${with_sysroot} in #(
2179  yes)
2180    if test "$GCC" = yes; then
2181      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2182    fi
2183    ;; #(
2184  /*)
2185    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2186    ;; #(
2187  no|'')
2188    ;; #(
2189  *)
2190    AC_MSG_RESULT([${with_sysroot}])
2191    AC_MSG_ERROR([The sysroot must be an absolute path.])
2192    ;;
2193 esac
2194
2195  AC_MSG_RESULT([${lt_sysroot:-no}])
2196 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2197 [dependent libraries, and in which our libraries should be installed.])])
2198
2199 # _LT_ENABLE_LOCK
2200 # ---------------
2201 m4_defun([_LT_ENABLE_LOCK],
2202 [AC_ARG_ENABLE([libtool-lock],
2203   [AS_HELP_STRING([--disable-libtool-lock],
2204     [avoid locking (might break parallel builds)])])
2205 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2206
2207 # Some flags need to be propagated to the compiler or linker for good
2208 # libtool support.
2209 case $host in
2210 ia64-*-hpux*)
2211   # Find out which ABI we are using.
2212   echo 'int i;' > conftest.$ac_ext
2213   if AC_TRY_EVAL(ac_compile); then
2214     case `/usr/bin/file conftest.$ac_objext` in
2215       *ELF-32*)
2216         HPUX_IA64_MODE="32"
2217         ;;
2218       *ELF-64*)
2219         HPUX_IA64_MODE="64"
2220         ;;
2221     esac
2222   fi
2223   rm -rf conftest*
2224   ;;
2225 *-*-irix6*)
2226   # Find out which ABI we are using.
2227   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2228   if AC_TRY_EVAL(ac_compile); then
2229     if test "$lt_cv_prog_gnu_ld" = yes; then
2230       case `/usr/bin/file conftest.$ac_objext` in
2231         *32-bit*)
2232           LD="${LD-ld} -melf32bsmip"
2233           ;;
2234         *N32*)
2235           LD="${LD-ld} -melf32bmipn32"
2236           ;;
2237         *64-bit*)
2238           LD="${LD-ld} -melf64bmip"
2239         ;;
2240       esac
2241     else
2242       case `/usr/bin/file conftest.$ac_objext` in
2243         *32-bit*)
2244           LD="${LD-ld} -32"
2245           ;;
2246         *N32*)
2247           LD="${LD-ld} -n32"
2248           ;;
2249         *64-bit*)
2250           LD="${LD-ld} -64"
2251           ;;
2252       esac
2253     fi
2254   fi
2255   rm -rf conftest*
2256   ;;
2257
2258 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2259 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2260   # Find out which ABI we are using.
2261   echo 'int i;' > conftest.$ac_ext
2262   if AC_TRY_EVAL(ac_compile); then
2263     case `/usr/bin/file conftest.o` in
2264       *32-bit*)
2265         case $host in
2266           x86_64-*kfreebsd*-gnu)
2267             LD="${LD-ld} -m elf_i386_fbsd"
2268             ;;
2269           x86_64-*linux*)
2270             LD="${LD-ld} -m elf_i386"
2271             ;;
2272           ppc64-*linux*|powerpc64-*linux*)
2273             LD="${LD-ld} -m elf32ppclinux"
2274             ;;
2275           s390x-*linux*)
2276             LD="${LD-ld} -m elf_s390"
2277             ;;
2278           sparc64-*linux*)
2279             LD="${LD-ld} -m elf32_sparc"
2280             ;;
2281         esac
2282         ;;
2283       *64-bit*)
2284         case $host in
2285           x86_64-*kfreebsd*-gnu)
2286             LD="${LD-ld} -m elf_x86_64_fbsd"
2287             ;;
2288           x86_64-*linux*)
2289             LD="${LD-ld} -m elf_x86_64"
2290             ;;
2291           ppc*-*linux*|powerpc*-*linux*)
2292             LD="${LD-ld} -m elf64ppc"
2293             ;;
2294           s390*-*linux*|s390*-*tpf*)
2295             LD="${LD-ld} -m elf64_s390"
2296             ;;
2297           sparc*-*linux*)
2298             LD="${LD-ld} -m elf64_sparc"
2299             ;;
2300         esac
2301         ;;
2302     esac
2303   fi
2304   rm -rf conftest*
2305   ;;
2306
2307 *-*-sco3.2v5*)
2308   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2309   SAVE_CFLAGS="$CFLAGS"
2310   CFLAGS="$CFLAGS -belf"
2311   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2312     [AC_LANG_PUSH(C)
2313      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2314      AC_LANG_POP])
2315   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2316     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2317     CFLAGS="$SAVE_CFLAGS"
2318   fi
2319   ;;
2320 sparc*-*solaris*)
2321   # Find out which ABI we are using.
2322   echo 'int i;' > conftest.$ac_ext
2323   if AC_TRY_EVAL(ac_compile); then
2324     case `/usr/bin/file conftest.o` in
2325     *64-bit*)
2326       case $lt_cv_prog_gnu_ld in
2327       yes*) LD="${LD-ld} -m elf64_sparc" ;;
2328       *)
2329         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2330           LD="${LD-ld} -64"
2331         fi
2332         ;;
2333       esac
2334       ;;
2335     esac
2336   fi
2337   rm -rf conftest*
2338   ;;
2339 esac
2340
2341 need_locks="$enable_libtool_lock"
2342 ])# _LT_ENABLE_LOCK
2343
2344
2345 # _LT_PROG_AR
2346 # -----------
2347 m4_defun([_LT_PROG_AR],
2348 [AC_CHECK_TOOLS(AR, [ar], false)
2349 : ${AR=ar}
2350 : ${AR_FLAGS=cru}
2351 _LT_DECL([], [AR], [1], [The archiver])
2352 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2353
2354 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2355   [lt_cv_ar_at_file=no
2356    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2357      [echo conftest.$ac_objext > conftest.lst
2358       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2359       AC_TRY_EVAL([lt_ar_try])
2360       if test "$ac_status" -eq 0; then
2361         # Ensure the archiver fails upon bogus file names.
2362         rm -f conftest.$ac_objext libconftest.a
2363         AC_TRY_EVAL([lt_ar_try])
2364         if test "$ac_status" -ne 0; then
2365           lt_cv_ar_at_file=@
2366         fi
2367       fi
2368       rm -f conftest.* libconftest.a
2369      ])
2370   ])
2371
2372 if test "x$lt_cv_ar_at_file" = xno; then
2373   archiver_list_spec=
2374 else
2375   archiver_list_spec=$lt_cv_ar_at_file
2376 fi
2377 _LT_DECL([], [archiver_list_spec], [1],
2378   [How to feed a file listing to the archiver])
2379 ])# _LT_PROG_AR
2380
2381
2382 # _LT_CMD_OLD_ARCHIVE
2383 # -------------------
2384 m4_defun([_LT_CMD_OLD_ARCHIVE],
2385 [_LT_PROG_AR
2386
2387 AC_CHECK_TOOL(STRIP, strip, :)
2388 test -z "$STRIP" && STRIP=:
2389 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2390
2391 AC_CHECK_TOOL(RANLIB, ranlib, :)
2392 test -z "$RANLIB" && RANLIB=:
2393 _LT_DECL([], [RANLIB], [1],
2394     [Commands used to install an old-style archive])
2395
2396 # Determine commands to create old-style static archives.
2397 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2398 old_postinstall_cmds='chmod 644 $oldlib'
2399 old_postuninstall_cmds=
2400
2401 if test -n "$RANLIB"; then
2402   case $host_os in
2403   openbsd*)
2404     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2405     ;;
2406   *)
2407     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2408     ;;
2409   esac
2410   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2411 fi
2412
2413 case $host_os in
2414   darwin*)
2415     lock_old_archive_extraction=yes ;;
2416   *)
2417     lock_old_archive_extraction=no ;;
2418 esac
2419 _LT_DECL([], [old_postinstall_cmds], [2])
2420 _LT_DECL([], [old_postuninstall_cmds], [2])
2421 _LT_TAGDECL([], [old_archive_cmds], [2],
2422     [Commands used to build an old-style archive])
2423 _LT_DECL([], [lock_old_archive_extraction], [0],
2424     [Whether to use a lock for old archive extraction])
2425 ])# _LT_CMD_OLD_ARCHIVE
2426
2427
2428 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2429 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2430 # ----------------------------------------------------------------
2431 # Check whether the given compiler option works
2432 AC_DEFUN([_LT_COMPILER_OPTION],
2433 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2434 m4_require([_LT_DECL_SED])dnl
2435 AC_CACHE_CHECK([$1], [$2],
2436   [$2=no
2437    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2438    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2439    lt_compiler_flag="$3"
2440    # Insert the option either (1) after the last *FLAGS variable, or
2441    # (2) before a word containing "conftest.", or (3) at the end.
2442    # Note that $ac_compile itself does not contain backslashes and begins
2443    # with a dollar sign (not a hyphen), so the echo should work correctly.
2444    # The option is referenced via a variable to avoid confusing sed.
2445    lt_compile=`echo "$ac_compile" | $SED \
2446    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2447    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2448    -e 's:$: $lt_compiler_flag:'`
2449    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2450    (eval "$lt_compile" 2>conftest.err)
2451    ac_status=$?
2452    cat conftest.err >&AS_MESSAGE_LOG_FD
2453    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2454    if (exit $ac_status) && test -s "$ac_outfile"; then
2455      # The compiler can only warn and ignore the option if not recognized
2456      # So say no if there are warnings other than the usual output.
2457      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2458      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2459      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2460        $2=yes
2461      fi
2462    fi
2463    $RM conftest*
2464 ])
2465
2466 if test x"[$]$2" = xyes; then
2467     m4_if([$5], , :, [$5])
2468 else
2469     m4_if([$6], , :, [$6])
2470 fi
2471 ])# _LT_COMPILER_OPTION
2472
2473 # Old name:
2474 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2475 dnl aclocal-1.4 backwards compatibility:
2476 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2477
2478
2479 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2480 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
2481 # ----------------------------------------------------
2482 # Check whether the given linker option works
2483 AC_DEFUN([_LT_LINKER_OPTION],
2484 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2485 m4_require([_LT_DECL_SED])dnl
2486 AC_CACHE_CHECK([$1], [$2],
2487   [$2=no
2488    save_LDFLAGS="$LDFLAGS"
2489    LDFLAGS="$LDFLAGS $3"
2490    echo "$lt_simple_link_test_code" > conftest.$ac_ext
2491    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2492      # The linker can only warn and ignore the option if not recognized
2493      # So say no if there are warnings
2494      if test -s conftest.err; then
2495        # Append any errors to the config.log.
2496        cat conftest.err 1>&AS_MESSAGE_LOG_FD
2497        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2498        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2499        if diff conftest.exp conftest.er2 >/dev/null; then
2500          $2=yes
2501        fi
2502      else
2503        $2=yes
2504      fi
2505    fi
2506    $RM -r conftest*
2507    LDFLAGS="$save_LDFLAGS"
2508 ])
2509
2510 if test x"[$]$2" = xyes; then
2511     m4_if([$4], , :, [$4])
2512 else
2513     m4_if([$5], , :, [$5])
2514 fi
2515 ])# _LT_LINKER_OPTION
2516
2517 # Old name:
2518 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2519 dnl aclocal-1.4 backwards compatibility:
2520 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2521
2522
2523 # LT_CMD_MAX_LEN
2524 #---------------
2525 AC_DEFUN([LT_CMD_MAX_LEN],
2526 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2527 # find the maximum length of command line arguments
2528 AC_MSG_CHECKING([the maximum length of command line arguments])
2529 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2530   i=0
2531   teststring="ABCD"
2532
2533   case $build_os in
2534   msdosdjgpp*)
2535     # On DJGPP, this test can blow up pretty badly due to problems in libc
2536     # (any single argument exceeding 2000 bytes causes a buffer overrun
2537     # during glob expansion).  Even if it were fixed, the result of this
2538     # check would be larger than it should be.
2539     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2540     ;;
2541
2542   gnu*)
2543     # Under GNU Hurd, this test is not required because there is
2544     # no limit to the length of command line arguments.
2545     # Libtool will interpret -1 as no limit whatsoever
2546     lt_cv_sys_max_cmd_len=-1;
2547     ;;
2548
2549   cygwin* | mingw* | cegcc*)
2550     # On Win9x/ME, this test blows up -- it succeeds, but takes
2551     # about 5 minutes as the teststring grows exponentially.
2552     # Worse, since 9x/ME are not pre-emptively multitasking,
2553     # you end up with a "frozen" computer, even though with patience
2554     # the test eventually succeeds (with a max line length of 256k).
2555     # Instead, let's just punt: use the minimum linelength reported by
2556     # all of the supported platforms: 8192 (on NT/2K/XP).
2557     lt_cv_sys_max_cmd_len=8192;
2558     ;;
2559
2560   mint*)
2561     # On MiNT this can take a long time and run out of memory.
2562     lt_cv_sys_max_cmd_len=8192;
2563     ;;
2564
2565   amigaos*)
2566     # On AmigaOS with pdksh, this test takes hours, literally.
2567     # So we just punt and use a minimum line length of 8192.
2568     lt_cv_sys_max_cmd_len=8192;
2569     ;;
2570
2571   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2572     # This has been around since 386BSD, at least.  Likely further.
2573     if test -x /sbin/sysctl; then
2574       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2575     elif test -x /usr/sbin/sysctl; then
2576       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2577     else
2578       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
2579     fi
2580     # And add a safety zone
2581     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2582     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2583     ;;
2584
2585   interix*)
2586     # We know the value 262144 and hardcode it with a safety zone (like BSD)
2587     lt_cv_sys_max_cmd_len=196608
2588     ;;
2589
2590   osf*)
2591     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2592     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2593     # nice to cause kernel panics so lets avoid the loop below.
2594     # First set a reasonable default.
2595     lt_cv_sys_max_cmd_len=16384
2596     #
2597     if test -x /sbin/sysconfig; then
2598       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2599         *1*) lt_cv_sys_max_cmd_len=-1 ;;
2600       esac
2601     fi
2602     ;;
2603   sco3.2v5*)
2604     lt_cv_sys_max_cmd_len=102400
2605     ;;
2606   sysv5* | sco5v6* | sysv4.2uw2*)
2607     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2608     if test -n "$kargmax"; then
2609       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
2610     else
2611       lt_cv_sys_max_cmd_len=32768
2612     fi
2613     ;;
2614   *)
2615     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2616     if test -n "$lt_cv_sys_max_cmd_len"; then
2617       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2618       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2619     else
2620       # Make teststring a little bigger before we do anything with it.
2621       # a 1K string should be a reasonable start.
2622       for i in 1 2 3 4 5 6 7 8 ; do
2623         teststring=$teststring$teststring
2624       done
2625       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2626       # If test is not a shell built-in, we'll probably end up computing a
2627       # maximum length that is only half of the actual maximum length, but
2628       # we can't tell.
2629       while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
2630                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2631               test $i != 17 # 1/2 MB should be enough
2632       do
2633         i=`expr $i + 1`
2634         teststring=$teststring$teststring
2635       done
2636       # Only check the string length outside the loop.
2637       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2638       teststring=
2639       # Add a significant safety factor because C++ compilers can tack on
2640       # massive amounts of additional arguments before passing them to the
2641       # linker.  It appears as though 1/2 is a usable value.
2642       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2643     fi
2644     ;;
2645   esac
2646 ])
2647 if test -n $lt_cv_sys_max_cmd_len ; then
2648   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2649 else
2650   AC_MSG_RESULT(none)
2651 fi
2652 max_cmd_len=$lt_cv_sys_max_cmd_len
2653 _LT_DECL([], [max_cmd_len], [0],
2654     [What is the maximum length of a command?])
2655 ])# LT_CMD_MAX_LEN
2656
2657 # Old name:
2658 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2659 dnl aclocal-1.4 backwards compatibility:
2660 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2661
2662
2663 # _LT_HEADER_DLFCN
2664 # ----------------
2665 m4_defun([_LT_HEADER_DLFCN],
2666 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2667 ])# _LT_HEADER_DLFCN
2668
2669
2670 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2671 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2672 # ----------------------------------------------------------------
2673 m4_defun([_LT_TRY_DLOPEN_SELF],
2674 [m4_require([_LT_HEADER_DLFCN])dnl
2675 if test "$cross_compiling" = yes; then :
2676   [$4]
2677 else
2678   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2679   lt_status=$lt_dlunknown
2680   cat > conftest.$ac_ext <<_LT_EOF
2681 [#line $LINENO "configure"
2682 #include "confdefs.h"
2683
2684 #if HAVE_DLFCN_H
2685 #include <dlfcn.h>
2686 #endif
2687
2688 #include <stdio.h>
2689
2690 #ifdef RTLD_GLOBAL
2691 #  define LT_DLGLOBAL           RTLD_GLOBAL
2692 #else
2693 #  ifdef DL_GLOBAL
2694 #    define LT_DLGLOBAL         DL_GLOBAL
2695 #  else
2696 #    define LT_DLGLOBAL         0
2697 #  endif
2698 #endif
2699
2700 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2701    find out it does not work in some platform. */
2702 #ifndef LT_DLLAZY_OR_NOW
2703 #  ifdef RTLD_LAZY
2704 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
2705 #  else
2706 #    ifdef DL_LAZY
2707 #      define LT_DLLAZY_OR_NOW          DL_LAZY
2708 #    else
2709 #      ifdef RTLD_NOW
2710 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
2711 #      else
2712 #        ifdef DL_NOW
2713 #          define LT_DLLAZY_OR_NOW      DL_NOW
2714 #        else
2715 #          define LT_DLLAZY_OR_NOW      0
2716 #        endif
2717 #      endif
2718 #    endif
2719 #  endif
2720 #endif
2721
2722 /* When -fvisbility=hidden is used, assume the code has been annotated
2723    correspondingly for the symbols needed.  */
2724 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2725 int fnord () __attribute__((visibility("default")));
2726 #endif
2727
2728 int fnord () { return 42; }
2729 int main ()
2730 {
2731   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2732   int status = $lt_dlunknown;
2733
2734   if (self)
2735     {
2736       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2737       else
2738         {
2739           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2740           else puts (dlerror ());
2741         }
2742       /* dlclose (self); */
2743     }
2744   else
2745     puts (dlerror ());
2746
2747   return status;
2748 }]
2749 _LT_EOF
2750   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2751     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2752     lt_status=$?
2753     case x$lt_status in
2754       x$lt_dlno_uscore) $1 ;;
2755       x$lt_dlneed_uscore) $2 ;;
2756       x$lt_dlunknown|x*) $3 ;;
2757     esac
2758   else :
2759     # compilation failed
2760     $3
2761   fi
2762 fi
2763 rm -fr conftest*
2764 ])# _LT_TRY_DLOPEN_SELF
2765
2766
2767 # LT_SYS_DLOPEN_SELF
2768 # ------------------
2769 AC_DEFUN([LT_SYS_DLOPEN_SELF],
2770 [m4_require([_LT_HEADER_DLFCN])dnl
2771 if test "x$enable_dlopen" != xyes; then
2772   enable_dlopen=unknown
2773   enable_dlopen_self=unknown
2774   enable_dlopen_self_static=unknown
2775 else
2776   lt_cv_dlopen=no
2777   lt_cv_dlopen_libs=
2778
2779   case $host_os in
2780   beos*)
2781     lt_cv_dlopen="load_add_on"
2782     lt_cv_dlopen_libs=
2783     lt_cv_dlopen_self=yes
2784     ;;
2785
2786   mingw* | pw32* | cegcc*)
2787     lt_cv_dlopen="LoadLibrary"
2788     lt_cv_dlopen_libs=
2789     ;;
2790
2791   cygwin*)
2792     lt_cv_dlopen="dlopen"
2793     lt_cv_dlopen_libs=
2794     ;;
2795
2796   darwin*)
2797   # if libdl is installed we need to link against it
2798     AC_CHECK_LIB([dl], [dlopen],
2799                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2800     lt_cv_dlopen="dyld"
2801     lt_cv_dlopen_libs=
2802     lt_cv_dlopen_self=yes
2803     ])
2804     ;;
2805
2806   *)
2807     AC_CHECK_FUNC([shl_load],
2808           [lt_cv_dlopen="shl_load"],
2809       [AC_CHECK_LIB([dld], [shl_load],
2810             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2811         [AC_CHECK_FUNC([dlopen],
2812               [lt_cv_dlopen="dlopen"],
2813           [AC_CHECK_LIB([dl], [dlopen],
2814                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2815             [AC_CHECK_LIB([svld], [dlopen],
2816                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2817               [AC_CHECK_LIB([dld], [dld_link],
2818                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2819               ])
2820             ])
2821           ])
2822         ])
2823       ])
2824     ;;
2825   esac
2826
2827   if test "x$lt_cv_dlopen" != xno; then
2828     enable_dlopen=yes
2829   else
2830     enable_dlopen=no
2831   fi
2832
2833   case $lt_cv_dlopen in
2834   dlopen)
2835     save_CPPFLAGS="$CPPFLAGS"
2836     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2837
2838     save_LDFLAGS="$LDFLAGS"
2839     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2840
2841     save_LIBS="$LIBS"
2842     LIBS="$lt_cv_dlopen_libs $LIBS"
2843
2844     AC_CACHE_CHECK([whether a program can dlopen itself],
2845           lt_cv_dlopen_self, [dnl
2846           _LT_TRY_DLOPEN_SELF(
2847             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2848             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2849     ])
2850
2851     if test "x$lt_cv_dlopen_self" = xyes; then
2852       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2853       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2854           lt_cv_dlopen_self_static, [dnl
2855           _LT_TRY_DLOPEN_SELF(
2856             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2857             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2858       ])
2859     fi
2860
2861     CPPFLAGS="$save_CPPFLAGS"
2862     LDFLAGS="$save_LDFLAGS"
2863     LIBS="$save_LIBS"
2864     ;;
2865   esac
2866
2867   case $lt_cv_dlopen_self in
2868   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2869   *) enable_dlopen_self=unknown ;;
2870   esac
2871
2872   case $lt_cv_dlopen_self_static in
2873   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2874   *) enable_dlopen_self_static=unknown ;;
2875   esac
2876 fi
2877 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2878          [Whether dlopen is supported])
2879 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2880          [Whether dlopen of programs is supported])
2881 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2882          [Whether dlopen of statically linked programs is supported])
2883 ])# LT_SYS_DLOPEN_SELF
2884
2885 # Old name:
2886 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2887 dnl aclocal-1.4 backwards compatibility:
2888 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2889
2890
2891 # _LT_COMPILER_C_O([TAGNAME])
2892 # ---------------------------
2893 # Check to see if options -c and -o are simultaneously supported by compiler.
2894 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2895 m4_defun([_LT_COMPILER_C_O],
2896 [m4_require([_LT_DECL_SED])dnl
2897 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2898 m4_require([_LT_TAG_COMPILER])dnl
2899 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2900   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2901   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2902    $RM -r conftest 2>/dev/null
2903    mkdir conftest
2904    cd conftest
2905    mkdir out
2906    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2907
2908    lt_compiler_flag="-o out/conftest2.$ac_objext"
2909    # Insert the option either (1) after the last *FLAGS variable, or
2910    # (2) before a word containing "conftest.", or (3) at the end.
2911    # Note that $ac_compile itself does not contain backslashes and begins
2912    # with a dollar sign (not a hyphen), so the echo should work correctly.
2913    lt_compile=`echo "$ac_compile" | $SED \
2914    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2915    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2916    -e 's:$: $lt_compiler_flag:'`
2917    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2918    (eval "$lt_compile" 2>out/conftest.err)
2919    ac_status=$?
2920    cat out/conftest.err >&AS_MESSAGE_LOG_FD
2921    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2922    if (exit $ac_status) && test -s out/conftest2.$ac_objext
2923    then
2924      # The compiler can only warn and ignore the option if not recognized
2925      # So say no if there are warnings
2926      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2927      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2928      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2929        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2930      fi
2931    fi
2932    chmod u+w . 2>&AS_MESSAGE_LOG_FD
2933    $RM conftest*
2934    # SGI C++ compiler will create directory out/ii_files/ for
2935    # template instantiation
2936    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2937    $RM out/* && rmdir out
2938    cd ..
2939    $RM -r conftest
2940    $RM conftest*
2941 ])
2942 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2943         [Does compiler simultaneously support -c and -o options?])
2944 ])# _LT_COMPILER_C_O
2945
2946
2947 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2948 # ----------------------------------
2949 # Check to see if we can do hard links to lock some files if needed
2950 m4_defun([_LT_COMPILER_FILE_LOCKS],
2951 [m4_require([_LT_ENABLE_LOCK])dnl
2952 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2953 _LT_COMPILER_C_O([$1])
2954
2955 hard_links="nottested"
2956 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2957   # do not overwrite the value of need_locks provided by the user
2958   AC_MSG_CHECKING([if we can lock with hard links])
2959   hard_links=yes
2960   $RM conftest*
2961   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2962   touch conftest.a
2963   ln conftest.a conftest.b 2>&5 || hard_links=no
2964   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2965   AC_MSG_RESULT([$hard_links])
2966   if test "$hard_links" = no; then
2967     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2968     need_locks=warn
2969   fi
2970 else
2971   need_locks=no
2972 fi
2973 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2974 ])# _LT_COMPILER_FILE_LOCKS
2975
2976
2977 # _LT_CHECK_OBJDIR
2978 # ----------------
2979 m4_defun([_LT_CHECK_OBJDIR],
2980 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2981 [rm -f .libs 2>/dev/null
2982 mkdir .libs 2>/dev/null
2983 if test -d .libs; then
2984   lt_cv_objdir=.libs
2985 else
2986   # MS-DOS does not allow filenames that begin with a dot.
2987   lt_cv_objdir=_libs
2988 fi
2989 rmdir .libs 2>/dev/null])
2990 objdir=$lt_cv_objdir
2991 _LT_DECL([], [objdir], [0],
2992          [The name of the directory that contains temporary libtool files])dnl
2993 m4_pattern_allow([LT_OBJDIR])dnl
2994 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2995   [Define to the sub-directory in which libtool stores uninstalled libraries.])
2996 ])# _LT_CHECK_OBJDIR
2997
2998
2999 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3000 # --------------------------------------
3001 # Check hardcoding attributes.
3002 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3003 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3004 _LT_TAGVAR(hardcode_action, $1)=
3005 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3006    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3007    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3008
3009   # We can hardcode non-existent directories.
3010   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3011      # If the only mechanism to avoid hardcoding is shlibpath_var, we
3012      # have to relink, otherwise we might link with an installed library
3013      # when we should be linking with a yet-to-be-installed one
3014      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3015      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3016     # Linking always hardcodes the temporary library directory.
3017     _LT_TAGVAR(hardcode_action, $1)=relink
3018   else
3019     # We can link without hardcoding, and we can hardcode nonexisting dirs.
3020     _LT_TAGVAR(hardcode_action, $1)=immediate
3021   fi
3022 else
3023   # We cannot hardcode anything, or else we can only hardcode existing
3024   # directories.
3025   _LT_TAGVAR(hardcode_action, $1)=unsupported
3026 fi
3027 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3028
3029 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3030    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3031   # Fast installation is not supported
3032   enable_fast_install=no
3033 elif test "$shlibpath_overrides_runpath" = yes ||
3034      test "$enable_shared" = no; then
3035   # Fast installation is not necessary
3036   enable_fast_install=needless
3037 fi
3038 _LT_TAGDECL([], [hardcode_action], [0],
3039     [How to hardcode a shared library path into an executable])
3040 ])# _LT_LINKER_HARDCODE_LIBPATH
3041
3042
3043 # _LT_CMD_STRIPLIB
3044 # ----------------
3045 m4_defun([_LT_CMD_STRIPLIB],
3046 [m4_require([_LT_DECL_EGREP])
3047 striplib=
3048 old_striplib=
3049 AC_MSG_CHECKING([whether stripping libraries is possible])
3050 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3051   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3052   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3053   AC_MSG_RESULT([yes])
3054 else
3055 # FIXME - insert some real tests, host_os isn't really good enough
3056   case $host_os in
3057   darwin*)
3058     if test -n "$STRIP" ; then
3059       striplib="$STRIP -x"
3060       old_striplib="$STRIP -S"
3061       AC_MSG_RESULT([yes])
3062     else
3063       AC_MSG_RESULT([no])
3064     fi
3065     ;;
3066   *)
3067     AC_MSG_RESULT([no])
3068     ;;
3069   esac
3070 fi
3071 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3072 _LT_DECL([], [striplib], [1])
3073 ])# _LT_CMD_STRIPLIB
3074
3075
3076 # _LT_SYS_DYNAMIC_LINKER([TAG])
3077 # -----------------------------
3078 # PORTME Fill in your ld.so characteristics
3079 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3080 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3081 m4_require([_LT_DECL_EGREP])dnl
3082 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3083 m4_require([_LT_DECL_OBJDUMP])dnl
3084 m4_require([_LT_DECL_SED])dnl
3085 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3086 AC_MSG_CHECKING([dynamic linker characteristics])
3087 m4_if([$1],
3088         [], [
3089 if test "$GCC" = yes; then
3090   case $host_os in
3091     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3092     *) lt_awk_arg="/^libraries:/" ;;
3093   esac
3094   case $host_os in
3095     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3096     *) lt_sed_strip_eq="s,=/,/,g" ;;
3097   esac
3098   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3099   case $lt_search_path_spec in
3100   *\;*)
3101     # if the path contains ";" then we assume it to be the separator
3102     # otherwise default to the standard path separator (i.e. ":") - it is
3103     # assumed that no part of a normal pathname contains ";" but that should
3104     # okay in the real world where ";" in dirpaths is itself problematic.
3105     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3106     ;;
3107   *)
3108     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3109     ;;
3110   esac
3111   # Ok, now we have the path, separated by spaces, we can step through it
3112   # and add multilib dir if necessary.
3113   lt_tmp_lt_search_path_spec=
3114   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3115   for lt_sys_path in $lt_search_path_spec; do
3116     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3117       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3118     else
3119       test -d "$lt_sys_path" && \
3120         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3121     fi
3122   done
3123   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3124 BEGIN {RS=" "; FS="/|\n";} {
3125   lt_foo="";
3126   lt_count=0;
3127   for (lt_i = NF; lt_i > 0; lt_i--) {
3128     if ($lt_i != "" && $lt_i != ".") {
3129       if ($lt_i == "..") {
3130         lt_count++;
3131       } else {
3132         if (lt_count == 0) {
3133           lt_foo="/" $lt_i lt_foo;
3134         } else {
3135           lt_count--;
3136         }
3137       }
3138     }
3139   }
3140   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3141   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3142 }'`
3143   # AWK program above erroneously prepends '/' to C:/dos/paths
3144   # for these hosts.
3145   case $host_os in
3146     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3147       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3148   esac
3149   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3150 else
3151   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3152 fi])
3153 library_names_spec=
3154 libname_spec='lib$name'
3155 soname_spec=
3156 shrext_cmds=".so"
3157 postinstall_cmds=
3158 postuninstall_cmds=
3159 finish_cmds=
3160 finish_eval=
3161 shlibpath_var=
3162 shlibpath_overrides_runpath=unknown
3163 version_type=none
3164 dynamic_linker="$host_os ld.so"
3165 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3166 need_lib_prefix=unknown
3167 hardcode_into_libs=no
3168
3169 # when you set need_version to no, make sure it does not cause -set_version
3170 # flags to be left without arguments
3171 need_version=unknown
3172
3173 case $host_os in
3174 aix3*)
3175   version_type=linux
3176   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3177   shlibpath_var=LIBPATH
3178
3179   # AIX 3 has no versioning support, so we append a major version to the name.
3180   soname_spec='${libname}${release}${shared_ext}$major'
3181   ;;
3182
3183 aix[[4-9]]*)
3184   version_type=linux
3185   need_lib_prefix=no
3186   need_version=no
3187   hardcode_into_libs=yes
3188   if test "$host_cpu" = ia64; then
3189     # AIX 5 supports IA64
3190     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3191     shlibpath_var=LD_LIBRARY_PATH
3192   else
3193     # With GCC up to 2.95.x, collect2 would create an import file
3194     # for dependence libraries.  The import file would start with
3195     # the line `#! .'.  This would cause the generated library to
3196     # depend on `.', always an invalid library.  This was fixed in
3197     # development snapshots of GCC prior to 3.0.
3198     case $host_os in
3199       aix4 | aix4.[[01]] | aix4.[[01]].*)
3200       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3201            echo ' yes '
3202            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3203         :
3204       else
3205         can_build_shared=no
3206       fi
3207       ;;
3208     esac
3209     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3210     # soname into executable. Probably we can add versioning support to
3211     # collect2, so additional links can be useful in future.
3212     if test "$aix_use_runtimelinking" = yes; then
3213       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3214       # instead of lib<name>.a to let people know that these are not
3215       # typical AIX shared libraries.
3216       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3217     else
3218       # We preserve .a as extension for shared libraries through AIX4.2
3219       # and later when we are not doing run time linking.
3220       library_names_spec='${libname}${release}.a $libname.a'
3221       soname_spec='${libname}${release}${shared_ext}$major'
3222     fi
3223     shlibpath_var=LIBPATH
3224   fi
3225   ;;
3226
3227 amigaos*)
3228   case $host_cpu in
3229   powerpc)
3230     # Since July 2007 AmigaOS4 officially supports .so libraries.
3231     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3232     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3233     ;;
3234   m68k)
3235     library_names_spec='$libname.ixlibrary $libname.a'
3236     # Create ${libname}_ixlibrary.a entries in /sys/libs.
3237     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'
3238     ;;
3239   esac
3240   ;;
3241
3242 beos*)
3243   library_names_spec='${libname}${shared_ext}'
3244   dynamic_linker="$host_os ld.so"
3245   shlibpath_var=LIBRARY_PATH
3246   ;;
3247
3248 bsdi[[45]]*)
3249   version_type=linux
3250   need_version=no
3251   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3252   soname_spec='${libname}${release}${shared_ext}$major'
3253   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3254   shlibpath_var=LD_LIBRARY_PATH
3255   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3256   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3257   # the default ld.so.conf also contains /usr/contrib/lib and
3258   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3259   # libtool to hard-code these into programs
3260   ;;
3261
3262 cygwin* | mingw* | pw32* | cegcc*)
3263   version_type=windows
3264   shrext_cmds=".dll"
3265   need_version=no
3266   need_lib_prefix=no
3267
3268   case $GCC,$cc_basename in
3269   yes,*)
3270     # gcc
3271     library_names_spec='$libname.dll.a'
3272     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3273     postinstall_cmds='base_file=`basename \${file}`~
3274       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3275       dldir=$destdir/`dirname \$dlpath`~
3276       test -d \$dldir || mkdir -p \$dldir~
3277       $install_prog $dir/$dlname \$dldir/$dlname~
3278       chmod a+x \$dldir/$dlname~
3279       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3280         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3281       fi'
3282     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3283       dlpath=$dir/\$dldll~
3284        $RM \$dlpath'
3285     shlibpath_overrides_runpath=yes
3286
3287     case $host_os in
3288     cygwin*)
3289       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3290       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3291 m4_if([$1], [],[
3292       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3293       ;;
3294     mingw* | cegcc*)
3295       # MinGW DLLs use traditional 'lib' prefix
3296       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3297       ;;
3298     pw32*)
3299       # pw32 DLLs use 'pw' prefix rather than 'lib'
3300       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3301       ;;
3302     esac
3303     dynamic_linker='Win32 ld.exe'
3304     ;;
3305
3306   *,cl*)
3307     # Native MSVC
3308     libname_spec='$name'
3309     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3310     library_names_spec='${libname}.dll.lib'
3311
3312     case $build_os in
3313     mingw*)
3314       sys_lib_search_path_spec=
3315       lt_save_ifs=$IFS
3316       IFS=';'
3317       for lt_path in $LIB
3318       do
3319         IFS=$lt_save_ifs
3320         # Let DOS variable expansion print the short 8.3 style file name.
3321         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3322         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3323       done
3324       IFS=$lt_save_ifs
3325       # Convert to MSYS style.
3326       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3327       ;;
3328     cygwin*)
3329       # Convert to unix form, then to dos form, then back to unix form
3330       # but this time dos style (no spaces!) so that the unix form looks
3331       # like /cygdrive/c/PROGRA~1:/cygdr...
3332       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3333       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3334       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3335       ;;
3336     *)
3337       sys_lib_search_path_spec="$LIB"
3338       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3339         # It is most probably a Windows format PATH.
3340         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3341       else
3342         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3343       fi
3344       # FIXME: find the short name or the path components, as spaces are
3345       # common. (e.g. "Program Files" -> "PROGRA~1")
3346       ;;
3347     esac
3348
3349     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3350     postinstall_cmds='base_file=`basename \${file}`~
3351       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3352       dldir=$destdir/`dirname \$dlpath`~
3353       test -d \$dldir || mkdir -p \$dldir~
3354       $install_prog $dir/$dlname \$dldir/$dlname'
3355     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3356       dlpath=$dir/\$dldll~
3357        $RM \$dlpath'
3358     shlibpath_overrides_runpath=yes
3359     dynamic_linker='Win32 link.exe'
3360     ;;
3361
3362   *)
3363     # Assume MSVC wrapper
3364     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3365     dynamic_linker='Win32 ld.exe'
3366     ;;
3367   esac
3368   # FIXME: first we should search . and the directory the executable is in
3369   shlibpath_var=PATH
3370   ;;
3371
3372 darwin* | rhapsody*)
3373   dynamic_linker="$host_os dyld"
3374   version_type=darwin
3375   need_lib_prefix=no
3376   need_version=no
3377   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3378   soname_spec='${libname}${release}${major}$shared_ext'
3379   shlibpath_overrides_runpath=yes
3380   shlibpath_var=DYLD_LIBRARY_PATH
3381   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3382 m4_if([$1], [],[
3383   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3384   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3385   ;;
3386
3387 dgux*)
3388   version_type=linux
3389   need_lib_prefix=no
3390   need_version=no
3391   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3392   soname_spec='${libname}${release}${shared_ext}$major'
3393   shlibpath_var=LD_LIBRARY_PATH
3394   ;;
3395
3396 freebsd1*)
3397   dynamic_linker=no
3398   ;;
3399
3400 freebsd* | dragonfly*)
3401   # DragonFly does not have aout.  When/if they implement a new
3402   # versioning mechanism, adjust this.
3403   if test -x /usr/bin/objformat; then
3404     objformat=`/usr/bin/objformat`
3405   else
3406     case $host_os in
3407     freebsd[[123]]*) objformat=aout ;;
3408     *) objformat=elf ;;
3409     esac
3410   fi
3411   version_type=freebsd-$objformat
3412   case $version_type in
3413     freebsd-elf*)
3414       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3415       need_version=no
3416       need_lib_prefix=no
3417       ;;
3418     freebsd-*)
3419       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3420       need_version=yes
3421       ;;
3422   esac
3423   shlibpath_var=LD_LIBRARY_PATH
3424   case $host_os in
3425   freebsd2*)
3426     shlibpath_overrides_runpath=yes
3427     ;;
3428   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3429     shlibpath_overrides_runpath=yes
3430     hardcode_into_libs=yes
3431     ;;
3432   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3433   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3434     shlibpath_overrides_runpath=no
3435     hardcode_into_libs=yes
3436     ;;
3437   *) # from 4.6 on, and DragonFly
3438     shlibpath_overrides_runpath=yes
3439     hardcode_into_libs=yes
3440     ;;
3441   esac
3442   ;;
3443
3444 gnu*)
3445   version_type=linux
3446   need_lib_prefix=no
3447   need_version=no
3448   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3449   soname_spec='${libname}${release}${shared_ext}$major'
3450   shlibpath_var=LD_LIBRARY_PATH
3451   hardcode_into_libs=yes
3452   ;;
3453
3454 haiku*)
3455   version_type=linux
3456   need_lib_prefix=no
3457   need_version=no
3458   dynamic_linker="$host_os runtime_loader"
3459   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3460   soname_spec='${libname}${release}${shared_ext}$major'
3461   shlibpath_var=LIBRARY_PATH
3462   shlibpath_overrides_runpath=yes
3463   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3464   hardcode_into_libs=yes
3465   ;;
3466
3467 hpux9* | hpux10* | hpux11*)
3468   # Give a soname corresponding to the major version so that dld.sl refuses to
3469   # link against other versions.
3470   version_type=sunos
3471   need_lib_prefix=no
3472   need_version=no
3473   case $host_cpu in
3474   ia64*)
3475     shrext_cmds='.so'
3476     hardcode_into_libs=yes
3477     dynamic_linker="$host_os dld.so"
3478     shlibpath_var=LD_LIBRARY_PATH
3479     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3480     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3481     soname_spec='${libname}${release}${shared_ext}$major'
3482     if test "X$HPUX_IA64_MODE" = X32; then
3483       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3484     else
3485       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3486     fi
3487     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3488     ;;
3489   hppa*64*)
3490     shrext_cmds='.sl'
3491     hardcode_into_libs=yes
3492     dynamic_linker="$host_os dld.sl"
3493     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3494     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3495     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3496     soname_spec='${libname}${release}${shared_ext}$major'
3497     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3498     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3499     ;;
3500   *)
3501     shrext_cmds='.sl'
3502     dynamic_linker="$host_os dld.sl"
3503     shlibpath_var=SHLIB_PATH
3504     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3505     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3506     soname_spec='${libname}${release}${shared_ext}$major'
3507     ;;
3508   esac
3509   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3510   postinstall_cmds='chmod 555 $lib'
3511   # or fails outright, so override atomically:
3512   install_override_mode=555
3513   ;;
3514
3515 interix[[3-9]]*)
3516   version_type=linux
3517   need_lib_prefix=no
3518   need_version=no
3519   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3520   soname_spec='${libname}${release}${shared_ext}$major'
3521   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3522   shlibpath_var=LD_LIBRARY_PATH
3523   shlibpath_overrides_runpath=no
3524   hardcode_into_libs=yes
3525   ;;
3526
3527 irix5* | irix6* | nonstopux*)
3528   case $host_os in
3529     nonstopux*) version_type=nonstopux ;;
3530     *)
3531         if test "$lt_cv_prog_gnu_ld" = yes; then
3532                 version_type=linux
3533         else
3534                 version_type=irix
3535         fi ;;
3536   esac
3537   need_lib_prefix=no
3538   need_version=no
3539   soname_spec='${libname}${release}${shared_ext}$major'
3540   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3541   case $host_os in
3542   irix5* | nonstopux*)
3543     libsuff= shlibsuff=
3544     ;;
3545   *)
3546     case $LD in # libtool.m4 will add one of these switches to LD
3547     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3548       libsuff= shlibsuff= libmagic=32-bit;;
3549     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3550       libsuff=32 shlibsuff=N32 libmagic=N32;;
3551     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3552       libsuff=64 shlibsuff=64 libmagic=64-bit;;
3553     *) libsuff= shlibsuff= libmagic=never-match;;
3554     esac
3555     ;;
3556   esac
3557   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3558   shlibpath_overrides_runpath=no
3559   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3560   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3561   hardcode_into_libs=yes
3562   ;;
3563
3564 # No shared lib support for Linux oldld, aout, or coff.
3565 linux*oldld* | linux*aout* | linux*coff*)
3566   dynamic_linker=no
3567   ;;
3568
3569 # This must be Linux ELF.
3570 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3571   version_type=linux
3572   need_lib_prefix=no
3573   need_version=no
3574   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3575   soname_spec='${libname}${release}${shared_ext}$major'
3576   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3577   shlibpath_var=LD_LIBRARY_PATH
3578   shlibpath_overrides_runpath=no
3579
3580   # Some binutils ld are patched to set DT_RUNPATH
3581   AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3582     [lt_cv_shlibpath_overrides_runpath=no
3583     save_LDFLAGS=$LDFLAGS
3584     save_libdir=$libdir
3585     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3586          LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3587     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3588       [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3589          [lt_cv_shlibpath_overrides_runpath=yes])])
3590     LDFLAGS=$save_LDFLAGS
3591     libdir=$save_libdir
3592     ])
3593   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3594
3595   # This implies no fast_install, which is unacceptable.
3596   # Some rework will be needed to allow for fast_install
3597   # before this can be enabled.
3598   hardcode_into_libs=yes
3599
3600   # Add ABI-specific directories to the system library path.
3601   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
3602
3603   # Append ld.so.conf contents to the search path
3604   if test -f /etc/ld.so.conf; then
3605     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' ' '`
3606     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
3607
3608   fi
3609
3610   # We used to test for /lib/ld.so.1 and disable shared libraries on
3611   # powerpc, because MkLinux only supported shared libraries with the
3612   # GNU dynamic linker.  Since this was broken with cross compilers,
3613   # most powerpc-linux boxes support dynamic linking these days and
3614   # people can always --disable-shared, the test was removed, and we
3615   # assume the GNU/Linux dynamic linker is in use.
3616   dynamic_linker='GNU/Linux ld.so'
3617   ;;
3618
3619 netbsd*)
3620   version_type=sunos
3621   need_lib_prefix=no
3622   need_version=no
3623   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3624     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3625     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3626     dynamic_linker='NetBSD (a.out) ld.so'
3627   else
3628     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3629     soname_spec='${libname}${release}${shared_ext}$major'
3630     dynamic_linker='NetBSD ld.elf_so'
3631   fi
3632   shlibpath_var=LD_LIBRARY_PATH
3633   shlibpath_overrides_runpath=yes
3634   hardcode_into_libs=yes
3635   ;;
3636
3637 newsos6)
3638   version_type=linux
3639   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3640   shlibpath_var=LD_LIBRARY_PATH
3641   shlibpath_overrides_runpath=yes
3642   ;;
3643
3644 *nto* | *qnx*)
3645   version_type=qnx
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='ldqnx.so'
3654   ;;
3655
3656 openbsd*)
3657   version_type=sunos
3658   sys_lib_dlsearch_path_spec="/usr/lib"
3659   need_lib_prefix=no
3660   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3661   case $host_os in
3662     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
3663     *)                          need_version=no  ;;
3664   esac
3665   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3666   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3667   shlibpath_var=LD_LIBRARY_PATH
3668   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3669     case $host_os in
3670       openbsd2.[[89]] | openbsd2.[[89]].*)
3671         shlibpath_overrides_runpath=no
3672         ;;
3673       *)
3674         shlibpath_overrides_runpath=yes
3675         ;;
3676       esac
3677   else
3678     shlibpath_overrides_runpath=yes
3679   fi
3680   ;;
3681
3682 os2*)
3683   libname_spec='$name'
3684   shrext_cmds=".dll"
3685   need_lib_prefix=no
3686   library_names_spec='$libname${shared_ext} $libname.a'
3687   dynamic_linker='OS/2 ld.exe'
3688   shlibpath_var=LIBPATH
3689   ;;
3690
3691 osf3* | osf4* | osf5*)
3692   version_type=osf
3693   need_lib_prefix=no
3694   need_version=no
3695   soname_spec='${libname}${release}${shared_ext}$major'
3696   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3697   shlibpath_var=LD_LIBRARY_PATH
3698   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3699   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3700   ;;
3701
3702 rdos*)
3703   dynamic_linker=no
3704   ;;
3705
3706 solaris*)
3707   version_type=linux
3708   need_lib_prefix=no
3709   need_version=no
3710   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3711   soname_spec='${libname}${release}${shared_ext}$major'
3712   shlibpath_var=LD_LIBRARY_PATH
3713   shlibpath_overrides_runpath=yes
3714   hardcode_into_libs=yes
3715   # ldd complains unless libraries are executable
3716   postinstall_cmds='chmod +x $lib'
3717   ;;
3718
3719 sunos4*)
3720   version_type=sunos
3721   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3722   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3723   shlibpath_var=LD_LIBRARY_PATH
3724   shlibpath_overrides_runpath=yes
3725   if test "$with_gnu_ld" = yes; then
3726     need_lib_prefix=no
3727   fi
3728   need_version=yes
3729   ;;
3730
3731 sysv4 | sysv4.3*)
3732   version_type=linux
3733   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3734   soname_spec='${libname}${release}${shared_ext}$major'
3735   shlibpath_var=LD_LIBRARY_PATH
3736   case $host_vendor in
3737     sni)
3738       shlibpath_overrides_runpath=no
3739       need_lib_prefix=no
3740       runpath_var=LD_RUN_PATH
3741       ;;
3742     siemens)
3743       need_lib_prefix=no
3744       ;;
3745     motorola)
3746       need_lib_prefix=no
3747       need_version=no
3748       shlibpath_overrides_runpath=no
3749       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3750       ;;
3751   esac
3752   ;;
3753
3754 sysv4*MP*)
3755   if test -d /usr/nec ;then
3756     version_type=linux
3757     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3758     soname_spec='$libname${shared_ext}.$major'
3759     shlibpath_var=LD_LIBRARY_PATH
3760   fi
3761   ;;
3762
3763 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3764   version_type=freebsd-elf
3765   need_lib_prefix=no
3766   need_version=no
3767   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3768   soname_spec='${libname}${release}${shared_ext}$major'
3769   shlibpath_var=LD_LIBRARY_PATH
3770   shlibpath_overrides_runpath=yes
3771   hardcode_into_libs=yes
3772   if test "$with_gnu_ld" = yes; then
3773     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3774   else
3775     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3776     case $host_os in
3777       sco3.2v5*)
3778         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3779         ;;
3780     esac
3781   fi
3782   sys_lib_dlsearch_path_spec='/usr/lib'
3783   ;;
3784
3785 tpf*)
3786   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3787   version_type=linux
3788   need_lib_prefix=no
3789   need_version=no
3790   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3791   shlibpath_var=LD_LIBRARY_PATH
3792   shlibpath_overrides_runpath=no
3793   hardcode_into_libs=yes
3794   ;;
3795
3796 uts4*)
3797   version_type=linux
3798   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3799   soname_spec='${libname}${release}${shared_ext}$major'
3800   shlibpath_var=LD_LIBRARY_PATH
3801   ;;
3802
3803 *)
3804   dynamic_linker=no
3805   ;;
3806 esac
3807 AC_MSG_RESULT([$dynamic_linker])
3808 test "$dynamic_linker" = no && can_build_shared=no
3809
3810 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3811 if test "$GCC" = yes; then
3812   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3813 fi
3814
3815 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3816   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3817 fi
3818 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3819   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3820 fi
3821
3822 _LT_DECL([], [variables_saved_for_relink], [1],
3823     [Variables whose values should be saved in libtool wrapper scripts and
3824     restored at link time])
3825 _LT_DECL([], [need_lib_prefix], [0],
3826     [Do we need the "lib" prefix for modules?])
3827 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3828 _LT_DECL([], [version_type], [0], [Library versioning type])
3829 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3830 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3831 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3832     [Is shlibpath searched before the hard-coded library search path?])
3833 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3834 _LT_DECL([], [library_names_spec], [1],
3835     [[List of archive names.  First name is the real one, the rest are links.
3836     The last name is the one that the linker finds with -lNAME]])
3837 _LT_DECL([], [soname_spec], [1],
3838     [[The coded name of the library, if different from the real name]])
3839 _LT_DECL([], [install_override_mode], [1],
3840     [Permission mode override for installation of shared libraries])
3841 _LT_DECL([], [postinstall_cmds], [2],
3842     [Command to use after installation of a shared archive])
3843 _LT_DECL([], [postuninstall_cmds], [2],
3844     [Command to use after uninstallation of a shared archive])
3845 _LT_DECL([], [finish_cmds], [2],
3846     [Commands used to finish a libtool library installation in a directory])
3847 _LT_DECL([], [finish_eval], [1],
3848     [[As "finish_cmds", except a single script fragment to be evaled but
3849     not shown]])
3850 _LT_DECL([], [hardcode_into_libs], [0],
3851     [Whether we should hardcode library paths into libraries])
3852 _LT_DECL([], [sys_lib_search_path_spec], [2],
3853     [Compile-time system search path for libraries])
3854 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3855     [Run-time system search path for libraries])
3856 ])# _LT_SYS_DYNAMIC_LINKER
3857
3858
3859 # _LT_PATH_TOOL_PREFIX(TOOL)
3860 # --------------------------
3861 # find a file program which can recognize shared library
3862 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3863 [m4_require([_LT_DECL_EGREP])dnl
3864 AC_MSG_CHECKING([for $1])
3865 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3866 [case $MAGIC_CMD in
3867 [[\\/*] |  ?:[\\/]*])
3868   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3869   ;;
3870 *)
3871   lt_save_MAGIC_CMD="$MAGIC_CMD"
3872   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3873 dnl $ac_dummy forces splitting on constant user-supplied paths.
3874 dnl POSIX.2 word splitting is done only on the output of word expansions,
3875 dnl not every word.  This closes a longstanding sh security hole.
3876   ac_dummy="m4_if([$2], , $PATH, [$2])"
3877   for ac_dir in $ac_dummy; do
3878     IFS="$lt_save_ifs"
3879     test -z "$ac_dir" && ac_dir=.
3880     if test -f $ac_dir/$1; then
3881       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3882       if test -n "$file_magic_test_file"; then
3883         case $deplibs_check_method in
3884         "file_magic "*)
3885           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3886           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3887           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3888             $EGREP "$file_magic_regex" > /dev/null; then
3889             :
3890           else
3891             cat <<_LT_EOF 1>&2
3892
3893 *** Warning: the command libtool uses to detect shared libraries,
3894 *** $file_magic_cmd, produces output that libtool cannot recognize.
3895 *** The result is that libtool may fail to recognize shared libraries
3896 *** as such.  This will affect the creation of libtool libraries that
3897 *** depend on shared libraries, but programs linked with such libtool
3898 *** libraries will work regardless of this problem.  Nevertheless, you
3899 *** may want to report the problem to your system manager and/or to
3900 *** bug-libtool@gnu.org
3901
3902 _LT_EOF
3903           fi ;;
3904         esac
3905       fi
3906       break
3907     fi
3908   done
3909   IFS="$lt_save_ifs"
3910   MAGIC_CMD="$lt_save_MAGIC_CMD"
3911   ;;
3912 esac])
3913 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3914 if test -n "$MAGIC_CMD"; then
3915   AC_MSG_RESULT($MAGIC_CMD)
3916 else
3917   AC_MSG_RESULT(no)
3918 fi
3919 _LT_DECL([], [MAGIC_CMD], [0],
3920          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3921 ])# _LT_PATH_TOOL_PREFIX
3922
3923 # Old name:
3924 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3925 dnl aclocal-1.4 backwards compatibility:
3926 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3927
3928
3929 # _LT_PATH_MAGIC
3930 # --------------
3931 # find a file program which can recognize a shared library
3932 m4_defun([_LT_PATH_MAGIC],
3933 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3934 if test -z "$lt_cv_path_MAGIC_CMD"; then
3935   if test -n "$ac_tool_prefix"; then
3936     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3937   else
3938     MAGIC_CMD=:
3939   fi
3940 fi
3941 ])# _LT_PATH_MAGIC
3942
3943
3944 # LT_PATH_LD
3945 # ----------
3946 # find the pathname to the GNU or non-GNU linker
3947 AC_DEFUN([LT_PATH_LD],
3948 [AC_REQUIRE([AC_PROG_CC])dnl
3949 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3950 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3951 m4_require([_LT_DECL_SED])dnl
3952 m4_require([_LT_DECL_EGREP])dnl
3953 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3954
3955 AC_ARG_WITH([gnu-ld],
3956     [AS_HELP_STRING([--with-gnu-ld],
3957         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3958     [test "$withval" = no || with_gnu_ld=yes],
3959     [with_gnu_ld=no])dnl
3960
3961 ac_prog=ld
3962 if test "$GCC" = yes; then
3963   # Check if gcc -print-prog-name=ld gives a path.
3964   AC_MSG_CHECKING([for ld used by $CC])
3965   case $host in
3966   *-*-mingw*)
3967     # gcc leaves a trailing carriage return which upsets mingw
3968     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3969   *)
3970     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3971   esac
3972   case $ac_prog in
3973     # Accept absolute paths.
3974     [[\\/]]* | ?:[[\\/]]*)
3975       re_direlt='/[[^/]][[^/]]*/\.\./'
3976       # Canonicalize the pathname of ld
3977       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3978       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3979         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3980       done
3981       test -z "$LD" && LD="$ac_prog"
3982       ;;
3983   "")
3984     # If it fails, then pretend we aren't using GCC.
3985     ac_prog=ld
3986     ;;
3987   *)
3988     # If it is relative, then search for the first ld in PATH.
3989     with_gnu_ld=unknown
3990     ;;
3991   esac
3992 elif test "$with_gnu_ld" = yes; then
3993   AC_MSG_CHECKING([for GNU ld])
3994 else
3995   AC_MSG_CHECKING([for non-GNU ld])
3996 fi
3997 AC_CACHE_VAL(lt_cv_path_LD,
3998 [if test -z "$LD"; then
3999   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4000   for ac_dir in $PATH; do
4001     IFS="$lt_save_ifs"
4002     test -z "$ac_dir" && ac_dir=.
4003     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4004       lt_cv_path_LD="$ac_dir/$ac_prog"
4005       # Check to see if the program is GNU ld.  I'd rather use --version,
4006       # but apparently some variants of GNU ld only accept -v.
4007       # Break only if it was the GNU/non-GNU ld that we prefer.
4008       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4009       *GNU* | *'with BFD'*)
4010         test "$with_gnu_ld" != no && break
4011         ;;
4012       *)
4013         test "$with_gnu_ld" != yes && break
4014         ;;
4015       esac
4016     fi
4017   done
4018   IFS="$lt_save_ifs"
4019 else
4020   lt_cv_path_LD="$LD" # Let the user override the test with a path.
4021 fi])
4022 LD="$lt_cv_path_LD"
4023 if test -n "$LD"; then
4024   AC_MSG_RESULT($LD)
4025 else
4026   AC_MSG_RESULT(no)
4027 fi
4028 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4029 _LT_PATH_LD_GNU
4030 AC_SUBST([LD])
4031
4032 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4033 ])# LT_PATH_LD
4034
4035 # Old names:
4036 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4037 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4038 dnl aclocal-1.4 backwards compatibility:
4039 dnl AC_DEFUN([AM_PROG_LD], [])
4040 dnl AC_DEFUN([AC_PROG_LD], [])
4041
4042
4043 # _LT_PATH_LD_GNU
4044 #- --------------
4045 m4_defun([_LT_PATH_LD_GNU],
4046 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4047 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4048 case `$LD -v 2>&1 </dev/null` in
4049 *GNU* | *'with BFD'*)
4050   lt_cv_prog_gnu_ld=yes
4051   ;;
4052 *)
4053   lt_cv_prog_gnu_ld=no
4054   ;;
4055 esac])
4056 with_gnu_ld=$lt_cv_prog_gnu_ld
4057 ])# _LT_PATH_LD_GNU
4058
4059
4060 # _LT_CMD_RELOAD
4061 # --------------
4062 # find reload flag for linker
4063 #   -- PORTME Some linkers may need a different reload flag.
4064 m4_defun([_LT_CMD_RELOAD],
4065 [AC_CACHE_CHECK([for $LD option to reload object files],
4066   lt_cv_ld_reload_flag,
4067   [lt_cv_ld_reload_flag='-r'])
4068 reload_flag=$lt_cv_ld_reload_flag
4069 case $reload_flag in
4070 "" | " "*) ;;
4071 *) reload_flag=" $reload_flag" ;;
4072 esac
4073 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4074 case $host_os in
4075   cygwin* | mingw* | pw32* | cegcc*)
4076     if test "$GCC" != yes; then
4077       reload_cmds=false
4078     fi
4079     ;;
4080   darwin*)
4081     if test "$GCC" = yes; then
4082       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4083     else
4084       reload_cmds='$LD$reload_flag -o $output$reload_objs'
4085     fi
4086     ;;
4087 esac
4088 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4089 _LT_TAGDECL([], [reload_cmds], [2])dnl
4090 ])# _LT_CMD_RELOAD
4091
4092
4093 # _LT_CHECK_MAGIC_METHOD
4094 # ----------------------
4095 # how to check for library dependencies
4096 #  -- PORTME fill in with the dynamic library characteristics
4097 m4_defun([_LT_CHECK_MAGIC_METHOD],
4098 [m4_require([_LT_DECL_EGREP])
4099 m4_require([_LT_DECL_OBJDUMP])
4100 AC_CACHE_CHECK([how to recognize dependent libraries],
4101 lt_cv_deplibs_check_method,
4102 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4103 lt_cv_file_magic_test_file=
4104 lt_cv_deplibs_check_method='unknown'
4105 # Need to set the preceding variable on all platforms that support
4106 # interlibrary dependencies.
4107 # 'none' -- dependencies not supported.
4108 # `unknown' -- same as none, but documents that we really don't know.
4109 # 'pass_all' -- all dependencies passed with no checks.
4110 # 'test_compile' -- check by making test program.
4111 # 'file_magic [[regex]]' -- check by looking for files in library path
4112 # which responds to the $file_magic_cmd with a given extended regex.
4113 # If you have `file' or equivalent on your system and you're not sure
4114 # whether `pass_all' will *always* work, you probably want this one.
4115
4116 case $host_os in
4117 aix[[4-9]]*)
4118   lt_cv_deplibs_check_method=pass_all
4119   ;;
4120
4121 beos*)
4122   lt_cv_deplibs_check_method=pass_all
4123   ;;
4124
4125 bsdi[[45]]*)
4126   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4127   lt_cv_file_magic_cmd='/usr/bin/file -L'
4128   lt_cv_file_magic_test_file=/shlib/libc.so
4129   ;;
4130
4131 cygwin*)
4132   # func_win32_libid is a shell function defined in ltmain.sh
4133   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4134   lt_cv_file_magic_cmd='func_win32_libid'
4135   ;;
4136
4137 mingw* | pw32*)
4138   # Base MSYS/MinGW do not provide the 'file' command needed by
4139   # func_win32_libid shell function, so use a weaker test based on 'objdump',
4140   # unless we find 'file', for example because we are cross-compiling.
4141   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4142   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4143     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4144     lt_cv_file_magic_cmd='func_win32_libid'
4145   else
4146     # Keep this pattern in sync with the one in func_win32_libid.
4147     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4148     lt_cv_file_magic_cmd='$OBJDUMP -f'
4149   fi
4150   ;;
4151
4152 cegcc*)
4153   # use the weaker test based on 'objdump'. See mingw*.
4154   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4155   lt_cv_file_magic_cmd='$OBJDUMP -f'
4156   ;;
4157
4158 darwin* | rhapsody*)
4159   lt_cv_deplibs_check_method=pass_all
4160   ;;
4161
4162 freebsd* | dragonfly*)
4163   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4164     case $host_cpu in
4165     i*86 )
4166       # Not sure whether the presence of OpenBSD here was a mistake.
4167       # Let's accept both of them until this is cleared up.
4168       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4169       lt_cv_file_magic_cmd=/usr/bin/file
4170       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4171       ;;
4172     esac
4173   else
4174     lt_cv_deplibs_check_method=pass_all
4175   fi
4176   ;;
4177
4178 gnu*)
4179   lt_cv_deplibs_check_method=pass_all
4180   ;;
4181
4182 haiku*)
4183   lt_cv_deplibs_check_method=pass_all
4184   ;;
4185
4186 hpux10.20* | hpux11*)
4187   lt_cv_file_magic_cmd=/usr/bin/file
4188   case $host_cpu in
4189   ia64*)
4190     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4191     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4192     ;;
4193   hppa*64*)
4194     [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]']
4195     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4196     ;;
4197   *)
4198     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4199     lt_cv_file_magic_test_file=/usr/lib/libc.sl
4200     ;;
4201   esac
4202   ;;
4203
4204 interix[[3-9]]*)
4205   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4206   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4207   ;;
4208
4209 irix5* | irix6* | nonstopux*)
4210   case $LD in
4211   *-32|*"-32 ") libmagic=32-bit;;
4212   *-n32|*"-n32 ") libmagic=N32;;
4213   *-64|*"-64 ") libmagic=64-bit;;
4214   *) libmagic=never-match;;
4215   esac
4216   lt_cv_deplibs_check_method=pass_all
4217   ;;
4218
4219 # This must be Linux ELF.
4220 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4221   lt_cv_deplibs_check_method=pass_all
4222   ;;
4223
4224 netbsd*)
4225   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4226     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4227   else
4228     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4229   fi
4230   ;;
4231
4232 newos6*)
4233   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4234   lt_cv_file_magic_cmd=/usr/bin/file
4235   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4236   ;;
4237
4238 *nto* | *qnx*)
4239   lt_cv_deplibs_check_method=pass_all
4240   ;;
4241
4242 openbsd*)
4243   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4244     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4245   else
4246     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4247   fi
4248   ;;
4249
4250 osf3* | osf4* | osf5*)
4251   lt_cv_deplibs_check_method=pass_all
4252   ;;
4253
4254 rdos*)
4255   lt_cv_deplibs_check_method=pass_all
4256   ;;
4257
4258 solaris*)
4259   lt_cv_deplibs_check_method=pass_all
4260   ;;
4261
4262 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4263   lt_cv_deplibs_check_method=pass_all
4264   ;;
4265
4266 sysv4 | sysv4.3*)
4267   case $host_vendor in
4268   motorola)
4269     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]]'
4270     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4271     ;;
4272   ncr)
4273     lt_cv_deplibs_check_method=pass_all
4274     ;;
4275   sequent)
4276     lt_cv_file_magic_cmd='/bin/file'
4277     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4278     ;;
4279   sni)
4280     lt_cv_file_magic_cmd='/bin/file'
4281     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4282     lt_cv_file_magic_test_file=/lib/libc.so
4283     ;;
4284   siemens)
4285     lt_cv_deplibs_check_method=pass_all
4286     ;;
4287   pc)
4288     lt_cv_deplibs_check_method=pass_all
4289     ;;
4290   esac
4291   ;;
4292
4293 tpf*)
4294   lt_cv_deplibs_check_method=pass_all
4295   ;;
4296 esac
4297 ])
4298
4299 file_magic_glob=
4300 want_nocaseglob=no
4301 if test "$build" = "$host"; then
4302   case $host_os in
4303   mingw* | pw32*)
4304     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4305       want_nocaseglob=yes
4306     else
4307       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4308     fi
4309     ;;
4310   esac
4311 fi
4312
4313 file_magic_cmd=$lt_cv_file_magic_cmd
4314 deplibs_check_method=$lt_cv_deplibs_check_method
4315 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4316
4317 _LT_DECL([], [deplibs_check_method], [1],
4318     [Method to check whether dependent libraries are shared objects])
4319 _LT_DECL([], [file_magic_cmd], [1],
4320     [Command to use when deplibs_check_method = "file_magic"])
4321 _LT_DECL([], [file_magic_glob], [1],
4322     [How to find potential files when deplibs_check_method = "file_magic"])
4323 _LT_DECL([], [want_nocaseglob], [1],
4324     [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4325 ])# _LT_CHECK_MAGIC_METHOD
4326
4327
4328 # LT_PATH_NM
4329 # ----------
4330 # find the pathname to a BSD- or MS-compatible name lister
4331 AC_DEFUN([LT_PATH_NM],
4332 [AC_REQUIRE([AC_PROG_CC])dnl
4333 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4334 [if test -n "$NM"; then
4335   # Let the user override the test.
4336   lt_cv_path_NM="$NM"
4337 else
4338   lt_nm_to_check="${ac_tool_prefix}nm"
4339   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4340     lt_nm_to_check="$lt_nm_to_check nm"
4341   fi
4342   for lt_tmp_nm in $lt_nm_to_check; do
4343     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4344     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4345       IFS="$lt_save_ifs"
4346       test -z "$ac_dir" && ac_dir=.
4347       tmp_nm="$ac_dir/$lt_tmp_nm"
4348       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4349         # Check to see if the nm accepts a BSD-compat flag.
4350         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4351         #   nm: unknown option "B" ignored
4352         # Tru64's nm complains that /dev/null is an invalid object file
4353         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4354         */dev/null* | *'Invalid file or object type'*)
4355           lt_cv_path_NM="$tmp_nm -B"
4356           break
4357           ;;
4358         *)
4359           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4360           */dev/null*)
4361             lt_cv_path_NM="$tmp_nm -p"
4362             break
4363             ;;
4364           *)
4365             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4366             continue # so that we can try to find one that supports BSD flags
4367             ;;
4368           esac
4369           ;;
4370         esac
4371       fi
4372     done
4373     IFS="$lt_save_ifs"
4374   done
4375   : ${lt_cv_path_NM=no}
4376 fi])
4377 if test "$lt_cv_path_NM" != "no"; then
4378   NM="$lt_cv_path_NM"
4379 else
4380   # Didn't find any BSD compatible name lister, look for dumpbin.
4381   if test -n "$DUMPBIN"; then :
4382     # Let the user override the test.
4383   else
4384     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4385     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4386     *COFF*)
4387       DUMPBIN="$DUMPBIN -symbols"
4388       ;;
4389     *)
4390       DUMPBIN=:
4391       ;;
4392     esac
4393   fi
4394   AC_SUBST([DUMPBIN])
4395   if test "$DUMPBIN" != ":"; then
4396     NM="$DUMPBIN"
4397   fi
4398 fi
4399 test -z "$NM" && NM=nm
4400 AC_SUBST([NM])
4401 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4402
4403 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4404   [lt_cv_nm_interface="BSD nm"
4405   echo "int some_variable = 0;" > conftest.$ac_ext
4406   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4407   (eval "$ac_compile" 2>conftest.err)
4408   cat conftest.err >&AS_MESSAGE_LOG_FD
4409   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4410   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4411   cat conftest.err >&AS_MESSAGE_LOG_FD
4412   (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4413   cat conftest.out >&AS_MESSAGE_LOG_FD
4414   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4415     lt_cv_nm_interface="MS dumpbin"
4416   fi
4417   rm -f conftest*])
4418 ])# LT_PATH_NM
4419
4420 # Old names:
4421 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4422 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4423 dnl aclocal-1.4 backwards compatibility:
4424 dnl AC_DEFUN([AM_PROG_NM], [])
4425 dnl AC_DEFUN([AC_PROG_NM], [])
4426
4427 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4428 # --------------------------------
4429 # how to determine the name of the shared library
4430 # associated with a specific link library.
4431 #  -- PORTME fill in with the dynamic library characteristics
4432 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4433 [m4_require([_LT_DECL_EGREP])
4434 m4_require([_LT_DECL_OBJDUMP])
4435 m4_require([_LT_DECL_DLLTOOL])
4436 AC_CACHE_CHECK([how to associate runtime and link libraries],
4437 lt_cv_sharedlib_from_linklib_cmd,
4438 [lt_cv_sharedlib_from_linklib_cmd='unknown'
4439
4440 case $host_os in
4441 cygwin* | mingw* | pw32* | cegcc*)
4442   # two different shell functions defined in ltmain.sh
4443   # decide which to use based on capabilities of $DLLTOOL
4444   case `$DLLTOOL --help 2>&1` in
4445   *--identify-strict*)
4446     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4447     ;;
4448   *)
4449     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4450     ;;
4451   esac
4452   ;;
4453 *)
4454   # fallback: assume linklib IS sharedlib
4455   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4456   ;;
4457 esac
4458 ])
4459 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4460 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4461
4462 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4463     [Command to associate shared and link libraries])
4464 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4465
4466
4467 # _LT_PATH_MANIFEST_TOOL
4468 # ----------------------
4469 # locate the manifest tool
4470 m4_defun([_LT_PATH_MANIFEST_TOOL],
4471 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4472 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4473 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4474   [lt_cv_path_mainfest_tool=no
4475   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4476   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4477   cat conftest.err >&AS_MESSAGE_LOG_FD
4478   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4479     lt_cv_path_mainfest_tool=yes
4480   fi
4481   rm -f conftest*])
4482 if test "x$lt_cv_path_mainfest_tool" != xyes; then
4483   MANIFEST_TOOL=:
4484 fi
4485 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4486 ])# _LT_PATH_MANIFEST_TOOL
4487
4488
4489 # LT_LIB_M
4490 # --------
4491 # check for math library
4492 AC_DEFUN([LT_LIB_M],
4493 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4494 LIBM=
4495 case $host in
4496 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4497   # These system don't have libm, or don't need it
4498   ;;
4499 *-ncr-sysv4.3*)
4500   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4501   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4502   ;;
4503 *)
4504   AC_CHECK_LIB(m, cos, LIBM="-lm")
4505   ;;
4506 esac
4507 AC_SUBST([LIBM])
4508 ])# LT_LIB_M
4509
4510 # Old name:
4511 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4512 dnl aclocal-1.4 backwards compatibility:
4513 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4514
4515
4516 # _LT_COMPILER_NO_RTTI([TAGNAME])
4517 # -------------------------------
4518 m4_defun([_LT_COMPILER_NO_RTTI],
4519 [m4_require([_LT_TAG_COMPILER])dnl
4520
4521 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4522
4523 if test "$GCC" = yes; then
4524   case $cc_basename in
4525   nvcc*)
4526     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4527   *)
4528     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4529   esac
4530
4531   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4532     lt_cv_prog_compiler_rtti_exceptions,
4533     [-fno-rtti -fno-exceptions], [],
4534     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4535 fi
4536 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4537         [Compiler flag to turn off builtin functions])
4538 ])# _LT_COMPILER_NO_RTTI
4539
4540
4541 # _LT_CMD_GLOBAL_SYMBOLS
4542 # ----------------------
4543 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4544 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4545 AC_REQUIRE([AC_PROG_CC])dnl
4546 AC_REQUIRE([AC_PROG_AWK])dnl
4547 AC_REQUIRE([LT_PATH_NM])dnl
4548 AC_REQUIRE([LT_PATH_LD])dnl
4549 m4_require([_LT_DECL_SED])dnl
4550 m4_require([_LT_DECL_EGREP])dnl
4551 m4_require([_LT_TAG_COMPILER])dnl
4552
4553 # Check for command to grab the raw symbol name followed by C symbol from nm.
4554 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4555 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4556 [
4557 # These are sane defaults that work on at least a few old systems.
4558 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4559
4560 # Character class describing NM global symbol codes.
4561 symcode='[[BCDEGRST]]'
4562
4563 # Regexp to match symbols that can be accessed directly from C.
4564 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4565
4566 # Define system-specific variables.
4567 case $host_os in
4568 aix*)
4569   symcode='[[BCDT]]'
4570   ;;
4571 cygwin* | mingw* | pw32* | cegcc*)
4572   symcode='[[ABCDGISTW]]'
4573   ;;
4574 hpux*)
4575   if test "$host_cpu" = ia64; then
4576     symcode='[[ABCDEGRST]]'
4577   fi
4578   ;;
4579 irix* | nonstopux*)
4580   symcode='[[BCDEGRST]]'
4581   ;;
4582 osf*)
4583   symcode='[[BCDEGQRST]]'
4584   ;;
4585 solaris*)
4586   symcode='[[BDRT]]'
4587   ;;
4588 sco3.2v5*)
4589   symcode='[[DT]]'
4590   ;;
4591 sysv4.2uw2*)
4592   symcode='[[DT]]'
4593   ;;
4594 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4595   symcode='[[ABDT]]'
4596   ;;
4597 sysv4)
4598   symcode='[[DFNSTU]]'
4599   ;;
4600 esac
4601
4602 # If we're using GNU nm, then use its standard symbol codes.
4603 case `$NM -V 2>&1` in
4604 *GNU* | *'with BFD'*)
4605   symcode='[[ABCDGIRSTW]]' ;;
4606 esac
4607
4608 # Transform an extracted symbol line into a proper C declaration.
4609 # Some systems (esp. on ia64) link data and code symbols differently,
4610 # so use this general approach.
4611 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4612
4613 # Transform an extracted symbol line into symbol name and symbol address
4614 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4615 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'"
4616
4617 # Handle CRLF in mingw tool chain
4618 opt_cr=
4619 case $build_os in
4620 mingw*)
4621   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4622   ;;
4623 esac
4624
4625 # Try without a prefix underscore, then with it.
4626 for ac_symprfx in "" "_"; do
4627
4628   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4629   symxfrm="\\1 $ac_symprfx\\2 \\2"
4630
4631   # Write the raw and C identifiers.
4632   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4633     # Fake it for dumpbin and say T for any non-static function
4634     # and D for any global variable.
4635     # Also find C++ and __fastcall symbols from MSVC++,
4636     # which start with @ or ?.
4637     lt_cv_sys_global_symbol_pipe="$AWK ['"\
4638 "     {last_section=section; section=\$ 3};"\
4639 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4640 "     \$ 0!~/External *\|/{next};"\
4641 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4642 "     {if(hide[section]) next};"\
4643 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4644 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4645 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4646 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4647 "     ' prfx=^$ac_symprfx]"
4648   else
4649     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4650   fi
4651   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4652
4653   # Check to see that the pipe works correctly.
4654   pipe_works=no
4655
4656   rm -f conftest*
4657   cat > conftest.$ac_ext <<_LT_EOF
4658 #ifdef __cplusplus
4659 extern "C" {
4660 #endif
4661 char nm_test_var;
4662 void nm_test_func(void);
4663 void nm_test_func(void){}
4664 #ifdef __cplusplus
4665 }
4666 #endif
4667 int main(){nm_test_var='a';nm_test_func();return(0);}
4668 _LT_EOF
4669
4670   if AC_TRY_EVAL(ac_compile); then
4671     # Now try to grab the symbols.
4672     nlist=conftest.nm
4673     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4674       # Try sorting and uniquifying the output.
4675       if sort "$nlist" | uniq > "$nlist"T; then
4676         mv -f "$nlist"T "$nlist"
4677       else
4678         rm -f "$nlist"T
4679       fi
4680
4681       # Make sure that we snagged all the symbols we need.
4682       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4683         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4684           cat <<_LT_EOF > conftest.$ac_ext
4685 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4686 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4687 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4688    relocations are performed -- see ld's documentation on pseudo-relocs.  */
4689 # define LT@&t@_DLSYM_CONST
4690 #elif defined(__osf__)
4691 /* This system does not cope well with relocations in const data.  */
4692 # define LT@&t@_DLSYM_CONST
4693 #else
4694 # define LT@&t@_DLSYM_CONST const
4695 #endif
4696
4697 #ifdef __cplusplus
4698 extern "C" {
4699 #endif
4700
4701 _LT_EOF
4702           # Now generate the symbol file.
4703           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4704
4705           cat <<_LT_EOF >> conftest.$ac_ext
4706
4707 /* The mapping between symbol names and symbols.  */
4708 LT@&t@_DLSYM_CONST struct {
4709   const char *name;
4710   void       *address;
4711 }
4712 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4713 {
4714   { "@PROGRAM@", (void *) 0 },
4715 _LT_EOF
4716           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4717           cat <<\_LT_EOF >> conftest.$ac_ext
4718   {0, (void *) 0}
4719 };
4720
4721 /* This works around a problem in FreeBSD linker */
4722 #ifdef FREEBSD_WORKAROUND
4723 static const void *lt_preloaded_setup() {
4724   return lt__PROGRAM__LTX_preloaded_symbols;
4725 }
4726 #endif
4727
4728 #ifdef __cplusplus
4729 }
4730 #endif
4731 _LT_EOF
4732           # Now try linking the two files.
4733           mv conftest.$ac_objext conftstm.$ac_objext
4734           lt_globsym_save_LIBS=$LIBS
4735           lt_globsym_save_CFLAGS=$CFLAGS
4736           LIBS="conftstm.$ac_objext"
4737           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4738           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4739             pipe_works=yes
4740           fi
4741           LIBS=$lt_globsym_save_LIBS
4742           CFLAGS=$lt_globsym_save_CFLAGS
4743         else
4744           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4745         fi
4746       else
4747         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4748       fi
4749     else
4750       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4751     fi
4752   else
4753     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4754     cat conftest.$ac_ext >&5
4755   fi
4756   rm -rf conftest* conftst*
4757
4758   # Do not use the global_symbol_pipe unless it works.
4759   if test "$pipe_works" = yes; then
4760     break
4761   else
4762     lt_cv_sys_global_symbol_pipe=
4763   fi
4764 done
4765 ])
4766 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4767   lt_cv_sys_global_symbol_to_cdecl=
4768 fi
4769 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4770   AC_MSG_RESULT(failed)
4771 else
4772   AC_MSG_RESULT(ok)
4773 fi
4774
4775 # Response file support.
4776 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4777   nm_file_list_spec='@'
4778 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4779   nm_file_list_spec='@'
4780 fi
4781
4782 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4783     [Take the output of nm and produce a listing of raw symbols and C names])
4784 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4785     [Transform the output of nm in a proper C declaration])
4786 _LT_DECL([global_symbol_to_c_name_address],
4787     [lt_cv_sys_global_symbol_to_c_name_address], [1],
4788     [Transform the output of nm in a C name address pair])
4789 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4790     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4791     [Transform the output of nm in a C name address pair when lib prefix is needed])
4792 _LT_DECL([], [nm_file_list_spec], [1],
4793     [Specify filename containing input files for $NM])
4794 ]) # _LT_CMD_GLOBAL_SYMBOLS
4795
4796
4797 # _LT_COMPILER_PIC([TAGNAME])
4798 # ---------------------------
4799 m4_defun([_LT_COMPILER_PIC],
4800 [m4_require([_LT_TAG_COMPILER])dnl
4801 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4802 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4803 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4804
4805 m4_if([$1], [CXX], [
4806   # C++ specific cases for pic, static, wl, etc.
4807   if test "$GXX" = yes; then
4808     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4809     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4810
4811     case $host_os in
4812     aix*)
4813       # All AIX code is PIC.
4814       if test "$host_cpu" = ia64; then
4815         # AIX 5 now supports IA64 processor
4816         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4817       fi
4818       ;;
4819
4820     amigaos*)
4821       case $host_cpu in
4822       powerpc)
4823             # see comment about AmigaOS4 .so support
4824             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4825         ;;
4826       m68k)
4827             # FIXME: we need at least 68020 code to build shared libraries, but
4828             # adding the `-m68020' flag to GCC prevents building anything better,
4829             # like `-m68040'.
4830             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4831         ;;
4832       esac
4833       ;;
4834
4835     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4836       # PIC is the default for these OSes.
4837       ;;
4838     mingw* | cygwin* | os2* | pw32* | cegcc*)
4839       # This hack is so that the source file can tell whether it is being
4840       # built for inclusion in a dll (and should export symbols for example).
4841       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4842       # (--disable-auto-import) libraries
4843       m4_if([$1], [GCJ], [],
4844         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4845       ;;
4846     darwin* | rhapsody*)
4847       # PIC is the default on this platform
4848       # Common symbols not allowed in MH_DYLIB files
4849       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4850       ;;
4851     *djgpp*)
4852       # DJGPP does not support shared libraries at all
4853       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4854       ;;
4855     haiku*)
4856       # PIC is the default for Haiku.
4857       # The "-static" flag exists, but is broken.
4858       _LT_TAGVAR(lt_prog_compiler_static, $1)=
4859       ;;
4860     interix[[3-9]]*)
4861       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4862       # Instead, we relocate shared libraries at runtime.
4863       ;;
4864     sysv4*MP*)
4865       if test -d /usr/nec; then
4866         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4867       fi
4868       ;;
4869     hpux*)
4870       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4871       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4872       # sets the default TLS model and affects inlining.
4873       case $host_cpu in
4874       hppa*64*)
4875         ;;
4876       *)
4877         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4878         ;;
4879       esac
4880       ;;
4881     *qnx* | *nto*)
4882       # QNX uses GNU C++, but need to define -shared option too, otherwise
4883       # it will coredump.
4884       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4885       ;;
4886     *)
4887       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4888       ;;
4889     esac
4890   else
4891     case $host_os in
4892       aix[[4-9]]*)
4893         # All AIX code is PIC.
4894         if test "$host_cpu" = ia64; then
4895           # AIX 5 now supports IA64 processor
4896           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4897         else
4898           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4899         fi
4900         ;;
4901       chorus*)
4902         case $cc_basename in
4903         cxch68*)
4904           # Green Hills C++ Compiler
4905           # _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"
4906           ;;
4907         esac
4908         ;;
4909       mingw* | cygwin* | os2* | pw32* | cegcc*)
4910         # This hack is so that the source file can tell whether it is being
4911         # built for inclusion in a dll (and should export symbols for example).
4912         m4_if([$1], [GCJ], [],
4913           [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4914         ;;
4915       dgux*)
4916         case $cc_basename in
4917           ec++*)
4918             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4919             ;;
4920           ghcx*)
4921             # Green Hills C++ Compiler
4922             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4923             ;;
4924           *)
4925             ;;
4926         esac
4927         ;;
4928       freebsd* | dragonfly*)
4929         # FreeBSD uses GNU C++
4930         ;;
4931       hpux9* | hpux10* | hpux11*)
4932         case $cc_basename in
4933           CC*)
4934             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4935             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4936             if test "$host_cpu" != ia64; then
4937               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4938             fi
4939             ;;
4940           aCC*)
4941             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4942             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4943             case $host_cpu in
4944             hppa*64*|ia64*)
4945               # +Z the default
4946               ;;
4947             *)
4948               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4949               ;;
4950             esac
4951             ;;
4952           *)
4953             ;;
4954         esac
4955         ;;
4956       interix*)
4957         # This is c89, which is MS Visual C++ (no shared libs)
4958         # Anyone wants to do a port?
4959         ;;
4960       irix5* | irix6* | nonstopux*)
4961         case $cc_basename in
4962           CC*)
4963             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4964             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4965             # CC pic flag -KPIC is the default.
4966             ;;
4967           *)
4968             ;;
4969         esac
4970         ;;
4971       linux* | k*bsd*-gnu | kopensolaris*-gnu)
4972         case $cc_basename in
4973           KCC*)
4974             # KAI C++ Compiler
4975             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4976             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4977             ;;
4978           ecpc* )
4979             # old Intel C++ for x86_64 which still supported -KPIC.
4980             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4981             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4982             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4983             ;;
4984           icpc* )
4985             # Intel C++, used to be incompatible with GCC.
4986             # ICC 10 doesn't accept -KPIC any more.
4987             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4988             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4989             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4990             ;;
4991           pgCC* | pgcpp*)
4992             # Portland Group C++ compiler
4993             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4994             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4995             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4996             ;;
4997           cxx*)
4998             # Compaq C++
4999             # Make sure the PIC flag is empty.  It appears that all Alpha
5000             # Linux and Compaq Tru64 Unix objects are PIC.
5001             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5002             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5003             ;;
5004           xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5005             # IBM XL 8.0, 9.0 on PPC and BlueGene
5006             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5007             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5008             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5009             ;;
5010           *)
5011             case `$CC -V 2>&1 | sed 5q` in
5012             *Sun\ C*)
5013               # Sun C++ 5.9
5014               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5015               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5016               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5017               ;;
5018             esac
5019             ;;
5020         esac
5021         ;;
5022       lynxos*)
5023         ;;
5024       m88k*)
5025         ;;
5026       mvs*)
5027         case $cc_basename in
5028           cxx*)
5029             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5030             ;;
5031           *)
5032             ;;
5033         esac
5034         ;;
5035       netbsd*)
5036         ;;
5037       *qnx* | *nto*)
5038         # QNX uses GNU C++, but need to define -shared option too, otherwise
5039         # it will coredump.
5040         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5041         ;;
5042       osf3* | osf4* | osf5*)
5043         case $cc_basename in
5044           KCC*)
5045             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5046             ;;
5047           RCC*)
5048             # Rational C++ 2.4.1
5049             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5050             ;;
5051           cxx*)
5052             # Digital/Compaq C++
5053             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5054             # Make sure the PIC flag is empty.  It appears that all Alpha
5055             # Linux and Compaq Tru64 Unix objects are PIC.
5056             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5057             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5058             ;;
5059           *)
5060             ;;
5061         esac
5062         ;;
5063       psos*)
5064         ;;
5065       solaris*)
5066         case $cc_basename in
5067           CC* | sunCC*)
5068             # Sun C++ 4.2, 5.x and Centerline C++
5069             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5070             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5071             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5072             ;;
5073           gcx*)
5074             # Green Hills C++ Compiler
5075             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5076             ;;
5077           *)
5078             ;;
5079         esac
5080         ;;
5081       sunos4*)
5082         case $cc_basename in
5083           CC*)
5084             # Sun C++ 4.x
5085             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5086             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5087             ;;
5088           lcc*)
5089             # Lucid
5090             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5091             ;;
5092           *)
5093             ;;
5094         esac
5095         ;;
5096       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5097         case $cc_basename in
5098           CC*)
5099             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5100             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5101             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5102             ;;
5103         esac
5104         ;;
5105       tandem*)
5106         case $cc_basename in
5107           NCC*)
5108             # NonStop-UX NCC 3.20
5109             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5110             ;;
5111           *)
5112             ;;
5113         esac
5114         ;;
5115       vxworks*)
5116         ;;
5117       *)
5118         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5119         ;;
5120     esac
5121   fi
5122 ],
5123 [
5124   if test "$GCC" = yes; then
5125     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5126     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5127
5128     case $host_os in
5129       aix*)
5130       # All AIX code is PIC.
5131       if test "$host_cpu" = ia64; then
5132         # AIX 5 now supports IA64 processor
5133         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5134       fi
5135       ;;
5136
5137     amigaos*)
5138       case $host_cpu in
5139       powerpc)
5140             # see comment about AmigaOS4 .so support
5141             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5142         ;;
5143       m68k)
5144             # FIXME: we need at least 68020 code to build shared libraries, but
5145             # adding the `-m68020' flag to GCC prevents building anything better,
5146             # like `-m68040'.
5147             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5148         ;;
5149       esac
5150       ;;
5151
5152     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5153       # PIC is the default for these OSes.
5154       ;;
5155
5156     mingw* | cygwin* | pw32* | os2* | cegcc*)
5157       # This hack is so that the source file can tell whether it is being
5158       # built for inclusion in a dll (and should export symbols for example).
5159       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5160       # (--disable-auto-import) libraries
5161       m4_if([$1], [GCJ], [],
5162         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5163       ;;
5164
5165     darwin* | rhapsody*)
5166       # PIC is the default on this platform
5167       # Common symbols not allowed in MH_DYLIB files
5168       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5169       ;;
5170
5171     haiku*)
5172       # PIC is the default for Haiku.
5173       # The "-static" flag exists, but is broken.
5174       _LT_TAGVAR(lt_prog_compiler_static, $1)=
5175       ;;
5176
5177     hpux*)
5178       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5179       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5180       # sets the default TLS model and affects inlining.
5181       case $host_cpu in
5182       hppa*64*)
5183         # +Z the default
5184         ;;
5185       *)
5186         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5187         ;;
5188       esac
5189       ;;
5190
5191     interix[[3-9]]*)
5192       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5193       # Instead, we relocate shared libraries at runtime.
5194       ;;
5195
5196     msdosdjgpp*)
5197       # Just because we use GCC doesn't mean we suddenly get shared libraries
5198       # on systems that don't support them.
5199       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5200       enable_shared=no
5201       ;;
5202
5203     *nto* | *qnx*)
5204       # QNX uses GNU C++, but need to define -shared option too, otherwise
5205       # it will coredump.
5206       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5207       ;;
5208
5209     sysv4*MP*)
5210       if test -d /usr/nec; then
5211         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5212       fi
5213       ;;
5214
5215     *)
5216       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5217       ;;
5218     esac
5219
5220     case $cc_basename in
5221     nvcc*) # Cuda Compiler Driver 2.2
5222       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5223       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
5224       ;;
5225     esac
5226   else
5227     # PORTME Check for flag to pass linker flags through the system compiler.
5228     case $host_os in
5229     aix*)
5230       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5231       if test "$host_cpu" = ia64; then
5232         # AIX 5 now supports IA64 processor
5233         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5234       else
5235         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5236       fi
5237       ;;
5238
5239     mingw* | cygwin* | pw32* | os2* | cegcc*)
5240       # This hack is so that the source file can tell whether it is being
5241       # built for inclusion in a dll (and should export symbols for example).
5242       m4_if([$1], [GCJ], [],
5243         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5244       ;;
5245
5246     hpux9* | hpux10* | hpux11*)
5247       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5248       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5249       # not for PA HP-UX.
5250       case $host_cpu in
5251       hppa*64*|ia64*)
5252         # +Z the default
5253         ;;
5254       *)
5255         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5256         ;;
5257       esac
5258       # Is there a better lt_prog_compiler_static that works with the bundled CC?
5259       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5260       ;;
5261
5262     irix5* | irix6* | nonstopux*)
5263       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5264       # PIC (with -KPIC) is the default.
5265       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5266       ;;
5267
5268     linux* | k*bsd*-gnu | kopensolaris*-gnu)
5269       case $cc_basename in
5270       # old Intel for x86_64 which still supported -KPIC.
5271       ecc*)
5272         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5273         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5274         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5275         ;;
5276       # icc used to be incompatible with GCC.
5277       # ICC 10 doesn't accept -KPIC any more.
5278       icc* | ifort*)
5279         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5280         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5281         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5282         ;;
5283       # Lahey Fortran 8.1.
5284       lf95*)
5285         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5286         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5287         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5288         ;;
5289       nagfor*)
5290         # NAG Fortran compiler
5291         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5292         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5293         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5294         ;;
5295       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5296         # Portland Group compilers (*not* the Pentium gcc compiler,
5297         # which looks to be a dead project)
5298         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5299         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5300         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5301         ;;
5302       ccc*)
5303         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5304         # All Alpha code is PIC.
5305         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5306         ;;
5307       xl* | bgxl* | bgf* | mpixl*)
5308         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5309         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5310         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5311         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5312         ;;
5313       *)
5314         case `$CC -V 2>&1 | sed 5q` in
5315         *Sun\ F* | *Sun*Fortran*)
5316           # Sun Fortran 8.3 passes all unrecognized flags to the linker
5317           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5318           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5319           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5320           ;;
5321         *Sun\ C*)
5322           # Sun C 5.9
5323           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5324           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5325           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5326           ;;
5327         esac
5328         ;;
5329       esac
5330       ;;
5331
5332     newsos6)
5333       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5334       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5335       ;;
5336
5337     *nto* | *qnx*)
5338       # QNX uses GNU C++, but need to define -shared option too, otherwise
5339       # it will coredump.
5340       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5341       ;;
5342
5343     osf3* | osf4* | osf5*)
5344       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5345       # All OSF/1 code is PIC.
5346       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5347       ;;
5348
5349     rdos*)
5350       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5351       ;;
5352
5353     solaris*)
5354       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5355       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5356       case $cc_basename in
5357       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5358         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5359       *)
5360         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5361       esac
5362       ;;
5363
5364     sunos4*)
5365       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5366       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5367       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5368       ;;
5369
5370     sysv4 | sysv4.2uw2* | sysv4.3*)
5371       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5372       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5373       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5374       ;;
5375
5376     sysv4*MP*)
5377       if test -d /usr/nec ;then
5378         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5379         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5380       fi
5381       ;;
5382
5383     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5384       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5385       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5386       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5387       ;;
5388
5389     unicos*)
5390       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5391       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5392       ;;
5393
5394     uts4*)
5395       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5396       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5397       ;;
5398
5399     *)
5400       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5401       ;;
5402     esac
5403   fi
5404 ])
5405 case $host_os in
5406   # For platforms which do not support PIC, -DPIC is meaningless:
5407   *djgpp*)
5408     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5409     ;;
5410   *)
5411     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5412     ;;
5413 esac
5414
5415 AC_CACHE_CHECK([for $compiler option to produce PIC],
5416   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5417   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5418 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5419
5420 #
5421 # Check to make sure the PIC flag actually works.
5422 #
5423 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5424   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5425     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5426     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5427     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5428      "" | " "*) ;;
5429      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5430      esac],
5431     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5432      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5433 fi
5434 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5435         [Additional compiler flags for building library objects])
5436
5437 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5438         [How to pass a linker flag through the compiler])
5439 #
5440 # Check to make sure the static flag actually works.
5441 #
5442 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5443 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5444   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5445   $lt_tmp_static_flag,
5446   [],
5447   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5448 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5449         [Compiler flag to prevent dynamic linking])
5450 ])# _LT_COMPILER_PIC
5451
5452
5453 # _LT_LINKER_SHLIBS([TAGNAME])
5454 # ----------------------------
5455 # See if the linker supports building shared libraries.
5456 m4_defun([_LT_LINKER_SHLIBS],
5457 [AC_REQUIRE([LT_PATH_LD])dnl
5458 AC_REQUIRE([LT_PATH_NM])dnl
5459 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5460 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5461 m4_require([_LT_DECL_EGREP])dnl
5462 m4_require([_LT_DECL_SED])dnl
5463 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5464 m4_require([_LT_TAG_COMPILER])dnl
5465 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5466 m4_if([$1], [CXX], [
5467   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5468   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5469   case $host_os in
5470   aix[[4-9]]*)
5471     # If we're using GNU nm, then we don't want the "-C" option.
5472     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5473     # Also, AIX nm treats weak defined symbols like other global defined
5474     # symbols, whereas GNU nm marks them as "W".
5475     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5476       _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'
5477     else
5478       _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'
5479     fi
5480     ;;
5481   pw32*)
5482     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5483     ;;
5484   cygwin* | mingw* | cegcc*)
5485     case $cc_basename in
5486     cl*) ;;
5487     *)
5488       _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'
5489       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5490       ;;
5491     esac
5492     ;;
5493   *)
5494     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5495     ;;
5496   esac
5497 ], [
5498   runpath_var=
5499   _LT_TAGVAR(allow_undefined_flag, $1)=
5500   _LT_TAGVAR(always_export_symbols, $1)=no
5501   _LT_TAGVAR(archive_cmds, $1)=
5502   _LT_TAGVAR(archive_expsym_cmds, $1)=
5503   _LT_TAGVAR(compiler_needs_object, $1)=no
5504   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5505   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5506   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5507   _LT_TAGVAR(hardcode_automatic, $1)=no
5508   _LT_TAGVAR(hardcode_direct, $1)=no
5509   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5510   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5511   _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5512   _LT_TAGVAR(hardcode_libdir_separator, $1)=
5513   _LT_TAGVAR(hardcode_minus_L, $1)=no
5514   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5515   _LT_TAGVAR(inherit_rpath, $1)=no
5516   _LT_TAGVAR(link_all_deplibs, $1)=unknown
5517   _LT_TAGVAR(module_cmds, $1)=
5518   _LT_TAGVAR(module_expsym_cmds, $1)=
5519   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5520   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5521   _LT_TAGVAR(thread_safe_flag_spec, $1)=
5522   _LT_TAGVAR(whole_archive_flag_spec, $1)=
5523   # include_expsyms should be a list of space-separated symbols to be *always*
5524   # included in the symbol list
5525   _LT_TAGVAR(include_expsyms, $1)=
5526   # exclude_expsyms can be an extended regexp of symbols to exclude
5527   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5528   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5529   # as well as any symbol that contains `d'.
5530   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5531   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5532   # platforms (ab)use it in PIC code, but their linkers get confused if
5533   # the symbol is explicitly referenced.  Since portable code cannot
5534   # rely on this symbol name, it's probably fine to never include it in
5535   # preloaded symbol tables.
5536   # Exclude shared library initialization/finalization symbols.
5537 dnl Note also adjust exclude_expsyms for C++ above.
5538   extract_expsyms_cmds=
5539
5540   case $host_os in
5541   cygwin* | mingw* | pw32* | cegcc*)
5542     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5543     # When not using gcc, we currently assume that we are using
5544     # Microsoft Visual C++.
5545     if test "$GCC" != yes; then
5546       with_gnu_ld=no
5547     fi
5548     ;;
5549   interix*)
5550     # we just hope/assume this is gcc and not c89 (= MSVC++)
5551     with_gnu_ld=yes
5552     ;;
5553   openbsd*)
5554     with_gnu_ld=no
5555     ;;
5556   esac
5557
5558   _LT_TAGVAR(ld_shlibs, $1)=yes
5559
5560   # On some targets, GNU ld is compatible enough with the native linker
5561   # that we're better off using the native interface for both.
5562   lt_use_gnu_ld_interface=no
5563   if test "$with_gnu_ld" = yes; then
5564     case $host_os in
5565       aix*)
5566         # The AIX port of GNU ld has always aspired to compatibility
5567         # with the native linker.  However, as the warning in the GNU ld
5568         # block says, versions before 2.19.5* couldn't really create working
5569         # shared libraries, regardless of the interface used.
5570         case `$LD -v 2>&1` in
5571           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5572           *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5573           *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5574           *)
5575             lt_use_gnu_ld_interface=yes
5576             ;;
5577         esac
5578         ;;
5579       *)
5580         lt_use_gnu_ld_interface=yes
5581         ;;
5582     esac
5583   fi
5584
5585   if test "$lt_use_gnu_ld_interface" = yes; then
5586     # If archive_cmds runs LD, not CC, wlarc should be empty
5587     wlarc='${wl}'
5588
5589     # Set some defaults for GNU ld with shared library support. These
5590     # are reset later if shared libraries are not supported. Putting them
5591     # here allows them to be overridden if necessary.
5592     runpath_var=LD_RUN_PATH
5593     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5594     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5595     # ancient GNU ld didn't support --whole-archive et. al.
5596     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5597       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5598     else
5599       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5600     fi
5601     supports_anon_versioning=no
5602     case `$LD -v 2>&1` in
5603       *GNU\ gold*) supports_anon_versioning=yes ;;
5604       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5605       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5606       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5607       *\ 2.11.*) ;; # other 2.11 versions
5608       *) supports_anon_versioning=yes ;;
5609     esac
5610
5611     # See if GNU ld supports shared libraries.
5612     case $host_os in
5613     aix[[3-9]]*)
5614       # On AIX/PPC, the GNU linker is very broken
5615       if test "$host_cpu" != ia64; then
5616         _LT_TAGVAR(ld_shlibs, $1)=no
5617         cat <<_LT_EOF 1>&2
5618
5619 *** Warning: the GNU linker, at least up to release 2.19, is reported
5620 *** to be unable to reliably create shared libraries on AIX.
5621 *** Therefore, libtool is disabling shared libraries support.  If you
5622 *** really care for shared libraries, you may want to install binutils
5623 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5624 *** You will then need to restart the configuration process.
5625
5626 _LT_EOF
5627       fi
5628       ;;
5629
5630     amigaos*)
5631       case $host_cpu in
5632       powerpc)
5633             # see comment about AmigaOS4 .so support
5634             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5635             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5636         ;;
5637       m68k)
5638             _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)'
5639             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5640             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5641         ;;
5642       esac
5643       ;;
5644
5645     beos*)
5646       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5647         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5648         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5649         # support --undefined.  This deserves some investigation.  FIXME
5650         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5651       else
5652         _LT_TAGVAR(ld_shlibs, $1)=no
5653       fi
5654       ;;
5655
5656     cygwin* | mingw* | pw32* | cegcc*)
5657       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5658       # as there is no search path for DLLs.
5659       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5660       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5661       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5662       _LT_TAGVAR(always_export_symbols, $1)=no
5663       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5664       _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'
5665       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5666
5667       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5668         _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'
5669         # If the export-symbols file already is a .def file (1st line
5670         # is EXPORTS), use it as is; otherwise, prepend...
5671         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5672           cp $export_symbols $output_objdir/$soname.def;
5673         else
5674           echo EXPORTS > $output_objdir/$soname.def;
5675           cat $export_symbols >> $output_objdir/$soname.def;
5676         fi~
5677         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5678       else
5679         _LT_TAGVAR(ld_shlibs, $1)=no
5680       fi
5681       ;;
5682
5683     haiku*)
5684       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5685       _LT_TAGVAR(link_all_deplibs, $1)=yes
5686       ;;
5687
5688     interix[[3-9]]*)
5689       _LT_TAGVAR(hardcode_direct, $1)=no
5690       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5691       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5692       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5693       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5694       # Instead, shared libraries are loaded at an image base (0x10000000 by
5695       # default) and relocated if they conflict, which is a slow very memory
5696       # consuming and fragmenting process.  To avoid this, we pick a random,
5697       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5698       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5699       _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'
5700       _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'
5701       ;;
5702
5703     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5704       tmp_diet=no
5705       if test "$host_os" = linux-dietlibc; then
5706         case $cc_basename in
5707           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
5708         esac
5709       fi
5710       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5711          && test "$tmp_diet" = no
5712       then
5713         tmp_addflag=' $pic_flag'
5714         tmp_sharedflag='-shared'
5715         case $cc_basename,$host_cpu in
5716         pgcc*)                          # Portland Group C compiler
5717           _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'
5718           tmp_addflag=' $pic_flag'
5719           ;;
5720         pgf77* | pgf90* | pgf95* | pgfortran*)
5721                                         # Portland Group f77 and f90 compilers
5722           _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'
5723           tmp_addflag=' $pic_flag -Mnomain' ;;
5724         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
5725           tmp_addflag=' -i_dynamic' ;;
5726         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
5727           tmp_addflag=' -i_dynamic -nofor_main' ;;
5728         ifc* | ifort*)                  # Intel Fortran compiler
5729           tmp_addflag=' -nofor_main' ;;
5730         lf95*)                          # Lahey Fortran 8.1
5731           _LT_TAGVAR(whole_archive_flag_spec, $1)=
5732           tmp_sharedflag='--shared' ;;
5733         xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5734           tmp_sharedflag='-qmkshrobj'
5735           tmp_addflag= ;;
5736         nvcc*)  # Cuda Compiler Driver 2.2
5737           _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'
5738           _LT_TAGVAR(compiler_needs_object, $1)=yes
5739           ;;
5740         esac
5741         case `$CC -V 2>&1 | sed 5q` in
5742         *Sun\ C*)                       # Sun C 5.9
5743           _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'
5744           _LT_TAGVAR(compiler_needs_object, $1)=yes
5745           tmp_sharedflag='-G' ;;
5746         *Sun\ F*)                       # Sun Fortran 8.3
5747           tmp_sharedflag='-G' ;;
5748         esac
5749         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5750
5751         if test "x$supports_anon_versioning" = xyes; then
5752           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5753             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5754             echo "local: *; };" >> $output_objdir/$libname.ver~
5755             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5756         fi
5757
5758         case $cc_basename in
5759         xlf* | bgf* | bgxlf* | mpixlf*)
5760           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5761           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5762           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5763           _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5764           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5765           if test "x$supports_anon_versioning" = xyes; then
5766             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5767               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5768               echo "local: *; };" >> $output_objdir/$libname.ver~
5769               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5770           fi
5771           ;;
5772         esac
5773       else
5774         _LT_TAGVAR(ld_shlibs, $1)=no
5775       fi
5776       ;;
5777
5778     netbsd*)
5779       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5780         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5781         wlarc=
5782       else
5783         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5784         _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'
5785       fi
5786       ;;
5787
5788     solaris*)
5789       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5790         _LT_TAGVAR(ld_shlibs, $1)=no
5791         cat <<_LT_EOF 1>&2
5792
5793 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5794 *** create shared libraries on Solaris systems.  Therefore, libtool
5795 *** is disabling shared libraries support.  We urge you to upgrade GNU
5796 *** binutils to release 2.9.1 or newer.  Another option is to modify
5797 *** your PATH or compiler configuration so that the native linker is
5798 *** used, and then restart.
5799
5800 _LT_EOF
5801       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5802         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5803         _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'
5804       else
5805         _LT_TAGVAR(ld_shlibs, $1)=no
5806       fi
5807       ;;
5808
5809     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5810       case `$LD -v 2>&1` in
5811         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5812         _LT_TAGVAR(ld_shlibs, $1)=no
5813         cat <<_LT_EOF 1>&2
5814
5815 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5816 *** reliably create shared libraries on SCO systems.  Therefore, libtool
5817 *** is disabling shared libraries support.  We urge you to upgrade GNU
5818 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5819 *** your PATH or compiler configuration so that the native linker is
5820 *** used, and then restart.
5821
5822 _LT_EOF
5823         ;;
5824         *)
5825           # For security reasons, it is highly recommended that you always
5826           # use absolute paths for naming shared libraries, and exclude the
5827           # DT_RUNPATH tag from executables and libraries.  But doing so
5828           # requires that you compile everything twice, which is a pain.
5829           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5830             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5831             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5832             _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'
5833           else
5834             _LT_TAGVAR(ld_shlibs, $1)=no
5835           fi
5836         ;;
5837       esac
5838       ;;
5839
5840     sunos4*)
5841       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5842       wlarc=
5843       _LT_TAGVAR(hardcode_direct, $1)=yes
5844       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5845       ;;
5846
5847     *)
5848       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5849         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5850         _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'
5851       else
5852         _LT_TAGVAR(ld_shlibs, $1)=no
5853       fi
5854       ;;
5855     esac
5856
5857     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5858       runpath_var=
5859       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5860       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5861       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5862     fi
5863   else
5864     # PORTME fill in a description of your system's linker (not GNU ld)
5865     case $host_os in
5866     aix3*)
5867       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5868       _LT_TAGVAR(always_export_symbols, $1)=yes
5869       _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'
5870       # Note: this linker hardcodes the directories in LIBPATH if there
5871       # are no directories specified by -L.
5872       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5873       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5874         # Neither direct hardcoding nor static linking is supported with a
5875         # broken collect2.
5876         _LT_TAGVAR(hardcode_direct, $1)=unsupported
5877       fi
5878       ;;
5879
5880     aix[[4-9]]*)
5881       if test "$host_cpu" = ia64; then
5882         # On IA64, the linker does run time linking by default, so we don't
5883         # have to do anything special.
5884         aix_use_runtimelinking=no
5885         exp_sym_flag='-Bexport'
5886         no_entry_flag=""
5887       else
5888         # If we're using GNU nm, then we don't want the "-C" option.
5889         # -C means demangle to AIX nm, but means don't demangle with GNU nm
5890         # Also, AIX nm treats weak defined symbols like other global
5891         # defined symbols, whereas GNU nm marks them as "W".
5892         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5893           _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'
5894         else
5895           _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'
5896         fi
5897         aix_use_runtimelinking=no
5898
5899         # Test if we are trying to use run time linking or normal
5900         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5901         # need to do runtime linking.
5902         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5903           for ld_flag in $LDFLAGS; do
5904           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5905             aix_use_runtimelinking=yes
5906             break
5907           fi
5908           done
5909           ;;
5910         esac
5911
5912         exp_sym_flag='-bexport'
5913         no_entry_flag='-bnoentry'
5914       fi
5915
5916       # When large executables or shared objects are built, AIX ld can
5917       # have problems creating the table of contents.  If linking a library
5918       # or program results in "error TOC overflow" add -mminimal-toc to
5919       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5920       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5921
5922       _LT_TAGVAR(archive_cmds, $1)=''
5923       _LT_TAGVAR(hardcode_direct, $1)=yes
5924       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5925       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5926       _LT_TAGVAR(link_all_deplibs, $1)=yes
5927       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5928
5929       if test "$GCC" = yes; then
5930         case $host_os in aix4.[[012]]|aix4.[[012]].*)
5931         # We only want to do this on AIX 4.2 and lower, the check
5932         # below for broken collect2 doesn't work under 4.3+
5933           collect2name=`${CC} -print-prog-name=collect2`
5934           if test -f "$collect2name" &&
5935            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5936           then
5937           # We have reworked collect2
5938           :
5939           else
5940           # We have old collect2
5941           _LT_TAGVAR(hardcode_direct, $1)=unsupported
5942           # It fails to find uninstalled libraries when the uninstalled
5943           # path is not listed in the libpath.  Setting hardcode_minus_L
5944           # to unsupported forces relinking
5945           _LT_TAGVAR(hardcode_minus_L, $1)=yes
5946           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5947           _LT_TAGVAR(hardcode_libdir_separator, $1)=
5948           fi
5949           ;;
5950         esac
5951         shared_flag='-shared'
5952         if test "$aix_use_runtimelinking" = yes; then
5953           shared_flag="$shared_flag "'${wl}-G'
5954         fi
5955       else
5956         # not using gcc
5957         if test "$host_cpu" = ia64; then
5958         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5959         # chokes on -Wl,-G. The following line is correct:
5960           shared_flag='-G'
5961         else
5962           if test "$aix_use_runtimelinking" = yes; then
5963             shared_flag='${wl}-G'
5964           else
5965             shared_flag='${wl}-bM:SRE'
5966           fi
5967         fi
5968       fi
5969
5970       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5971       # It seems that -bexpall does not export symbols beginning with
5972       # underscore (_), so it is better to generate a list of symbols to export.
5973       _LT_TAGVAR(always_export_symbols, $1)=yes
5974       if test "$aix_use_runtimelinking" = yes; then
5975         # Warning - without using the other runtime loading flags (-brtl),
5976         # -berok will link without error, but may produce a broken library.
5977         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5978         # Determine the default libpath from the value encoded in an
5979         # empty executable.
5980         _LT_SYS_MODULE_PATH_AIX([$1])
5981         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5982         _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"
5983       else
5984         if test "$host_cpu" = ia64; then
5985           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5986           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5987           _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"
5988         else
5989          # Determine the default libpath from the value encoded in an
5990          # empty executable.
5991          _LT_SYS_MODULE_PATH_AIX([$1])
5992          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5993           # Warning - without using the other run time loading flags,
5994           # -berok will link without error, but may produce a broken library.
5995           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5996           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5997           if test "$with_gnu_ld" = yes; then
5998             # We only use this code for GNU lds that support --whole-archive.
5999             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6000           else
6001             # Exported symbols can be pulled into shared objects from archives
6002             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6003           fi
6004           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6005           # This is similar to how AIX traditionally builds its shared libraries.
6006           _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'
6007         fi
6008       fi
6009       ;;
6010
6011     amigaos*)
6012       case $host_cpu in
6013       powerpc)
6014             # see comment about AmigaOS4 .so support
6015             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6016             _LT_TAGVAR(archive_expsym_cmds, $1)=''
6017         ;;
6018       m68k)
6019             _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)'
6020             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6021             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6022         ;;
6023       esac
6024       ;;
6025
6026     bsdi[[45]]*)
6027       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6028       ;;
6029
6030     cygwin* | mingw* | pw32* | cegcc*)
6031       # When not using gcc, we currently assume that we are using
6032       # Microsoft Visual C++.
6033       # hardcode_libdir_flag_spec is actually meaningless, as there is
6034       # no search path for DLLs.
6035       case $cc_basename in
6036       cl*)
6037         # Native MSVC
6038         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6039         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6040         _LT_TAGVAR(always_export_symbols, $1)=yes
6041         _LT_TAGVAR(file_list_spec, $1)='@'
6042         # Tell ltmain to make .lib files, not .a files.
6043         libext=lib
6044         # Tell ltmain to make .dll files, not .so files.
6045         shrext_cmds=".dll"
6046         # FIXME: Setting linknames here is a bad hack.
6047         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6048         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6049             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6050           else
6051             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6052           fi~
6053           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6054           linknames='
6055         # The linker will not automatically build a static lib if we build a DLL.
6056         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6057         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6058         _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'
6059         # Don't use ranlib
6060         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6061         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6062           lt_tool_outputfile="@TOOL_OUTPUT@"~
6063           case $lt_outputfile in
6064             *.exe|*.EXE) ;;
6065             *)
6066               lt_outputfile="$lt_outputfile.exe"
6067               lt_tool_outputfile="$lt_tool_outputfile.exe"
6068               ;;
6069           esac~
6070           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6071             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6072             $RM "$lt_outputfile.manifest";
6073           fi'
6074         ;;
6075       *)
6076         # Assume MSVC wrapper
6077         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6078         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6079         # Tell ltmain to make .lib files, not .a files.
6080         libext=lib
6081         # Tell ltmain to make .dll files, not .so files.
6082         shrext_cmds=".dll"
6083         # FIXME: Setting linknames here is a bad hack.
6084         _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6085         # The linker will automatically build a .lib file if we build a DLL.
6086         _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6087         # FIXME: Should let the user specify the lib program.
6088         _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6089         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6090         ;;
6091       esac
6092       ;;
6093
6094     darwin* | rhapsody*)
6095       _LT_DARWIN_LINKER_FEATURES($1)
6096       ;;
6097
6098     dgux*)
6099       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6100       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6101       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6102       ;;
6103
6104     freebsd1*)
6105       _LT_TAGVAR(ld_shlibs, $1)=no
6106       ;;
6107
6108     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6109     # support.  Future versions do this automatically, but an explicit c++rt0.o
6110     # does not break anything, and helps significantly (at the cost of a little
6111     # extra space).
6112     freebsd2.2*)
6113       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6114       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6115       _LT_TAGVAR(hardcode_direct, $1)=yes
6116       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6117       ;;
6118
6119     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6120     freebsd2*)
6121       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6122       _LT_TAGVAR(hardcode_direct, $1)=yes
6123       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6124       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6125       ;;
6126
6127     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6128     freebsd* | dragonfly*)
6129       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6130       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6131       _LT_TAGVAR(hardcode_direct, $1)=yes
6132       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6133       ;;
6134
6135     hpux9*)
6136       if test "$GCC" = yes; then
6137         _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'
6138       else
6139         _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'
6140       fi
6141       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6142       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6143       _LT_TAGVAR(hardcode_direct, $1)=yes
6144
6145       # hardcode_minus_L: Not really in the search PATH,
6146       # but as the default location of the library.
6147       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6148       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6149       ;;
6150
6151     hpux10*)
6152       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6153         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6154       else
6155         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6156       fi
6157       if test "$with_gnu_ld" = no; then
6158         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6159         _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6160         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6161         _LT_TAGVAR(hardcode_direct, $1)=yes
6162         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6163         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6164         # hardcode_minus_L: Not really in the search PATH,
6165         # but as the default location of the library.
6166         _LT_TAGVAR(hardcode_minus_L, $1)=yes
6167       fi
6168       ;;
6169
6170     hpux11*)
6171       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6172         case $host_cpu in
6173         hppa*64*)
6174           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6175           ;;
6176         ia64*)
6177           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6178           ;;
6179         *)
6180           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6181           ;;
6182         esac
6183       else
6184         case $host_cpu in
6185         hppa*64*)
6186           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6187           ;;
6188         ia64*)
6189           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6190           ;;
6191         *)
6192         m4_if($1, [], [
6193           # Older versions of the 11.00 compiler do not understand -b yet
6194           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6195           _LT_LINKER_OPTION([if $CC understands -b],
6196             _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6197             [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6198             [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6199           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6200           ;;
6201         esac
6202       fi
6203       if test "$with_gnu_ld" = no; then
6204         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6205         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6206
6207         case $host_cpu in
6208         hppa*64*|ia64*)
6209           _LT_TAGVAR(hardcode_direct, $1)=no
6210           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6211           ;;
6212         *)
6213           _LT_TAGVAR(hardcode_direct, $1)=yes
6214           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6215           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6216
6217           # hardcode_minus_L: Not really in the search PATH,
6218           # but as the default location of the library.
6219           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6220           ;;
6221         esac
6222       fi
6223       ;;
6224
6225     irix5* | irix6* | nonstopux*)
6226       if test "$GCC" = yes; then
6227         _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'
6228         # Try to use the -exported_symbol ld option, if it does not
6229         # work, assume that -exports_file does not work either and
6230         # implicitly export all symbols.
6231         # This should be the same for all languages, so no per-tag cache variable.
6232         AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6233           [lt_cv_irix_exported_symbol],
6234           [save_LDFLAGS="$LDFLAGS"
6235            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6236            AC_LINK_IFELSE(
6237              [AC_LANG_SOURCE(
6238                 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6239                               [C++], [[int foo (void) { return 0; }]],
6240                               [Fortran 77], [[
6241       subroutine foo
6242       end]],
6243                               [Fortran], [[
6244       subroutine foo
6245       end]])])],
6246               [lt_cv_irix_exported_symbol=yes],
6247               [lt_cv_irix_exported_symbol=no])
6248            LDFLAGS="$save_LDFLAGS"])
6249         if test "$lt_cv_irix_exported_symbol" = yes; then
6250           _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'
6251         fi
6252       else
6253         _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'
6254         _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'
6255       fi
6256       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6257       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6258       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6259       _LT_TAGVAR(inherit_rpath, $1)=yes
6260       _LT_TAGVAR(link_all_deplibs, $1)=yes
6261       ;;
6262
6263     netbsd*)
6264       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6265         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6266       else
6267         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6268       fi
6269       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6270       _LT_TAGVAR(hardcode_direct, $1)=yes
6271       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6272       ;;
6273
6274     newsos6)
6275       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6276       _LT_TAGVAR(hardcode_direct, $1)=yes
6277       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6278       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6279       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6280       ;;
6281
6282     *nto* | *qnx*)
6283       ;;
6284
6285     openbsd*)
6286       if test -f /usr/libexec/ld.so; then
6287         _LT_TAGVAR(hardcode_direct, $1)=yes
6288         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6289         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6290         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6291           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6292           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6293           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6294           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6295         else
6296           case $host_os in
6297            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6298              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6299              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6300              ;;
6301            *)
6302              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6303              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6304              ;;
6305           esac
6306         fi
6307       else
6308         _LT_TAGVAR(ld_shlibs, $1)=no
6309       fi
6310       ;;
6311
6312     os2*)
6313       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6314       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6315       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6316       _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'
6317       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6318       ;;
6319
6320     osf3*)
6321       if test "$GCC" = yes; then
6322         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6323         _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'
6324       else
6325         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6326         _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'
6327       fi
6328       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6329       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6330       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6331       ;;
6332
6333     osf4* | osf5*)      # as osf3* with the addition of -msym flag
6334       if test "$GCC" = yes; then
6335         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6336         _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'
6337         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6338       else
6339         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6340         _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'
6341         _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~
6342         $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'
6343
6344         # Both c and cxx compiler support -rpath directly
6345         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6346       fi
6347       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6348       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6349       ;;
6350
6351     solaris*)
6352       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6353       if test "$GCC" = yes; then
6354         wlarc='${wl}'
6355         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6356         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6357           $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'
6358       else
6359         case `$CC -V 2>&1` in
6360         *"Compilers 5.0"*)
6361           wlarc=''
6362           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6363           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6364           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6365           ;;
6366         *)
6367           wlarc='${wl}'
6368           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6369           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6370           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6371           ;;
6372         esac
6373       fi
6374       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6375       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6376       case $host_os in
6377       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6378       *)
6379         # The compiler driver will combine and reorder linker options,
6380         # but understands `-z linker_flag'.  GCC discards it without `$wl',
6381         # but is careful enough not to reorder.
6382         # Supported since Solaris 2.6 (maybe 2.5.1?)
6383         if test "$GCC" = yes; then
6384           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6385         else
6386           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6387         fi
6388         ;;
6389       esac
6390       _LT_TAGVAR(link_all_deplibs, $1)=yes
6391       ;;
6392
6393     sunos4*)
6394       if test "x$host_vendor" = xsequent; then
6395         # Use $CC to link under sequent, because it throws in some extra .o
6396         # files that make .init and .fini sections work.
6397         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6398       else
6399         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6400       fi
6401       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6402       _LT_TAGVAR(hardcode_direct, $1)=yes
6403       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6404       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6405       ;;
6406
6407     sysv4)
6408       case $host_vendor in
6409         sni)
6410           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6411           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6412         ;;
6413         siemens)
6414           ## LD is ld it makes a PLAMLIB
6415           ## CC just makes a GrossModule.
6416           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6417           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6418           _LT_TAGVAR(hardcode_direct, $1)=no
6419         ;;
6420         motorola)
6421           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6422           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6423         ;;
6424       esac
6425       runpath_var='LD_RUN_PATH'
6426       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6427       ;;
6428
6429     sysv4.3*)
6430       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6431       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6432       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6433       ;;
6434
6435     sysv4*MP*)
6436       if test -d /usr/nec; then
6437         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6438         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6439         runpath_var=LD_RUN_PATH
6440         hardcode_runpath_var=yes
6441         _LT_TAGVAR(ld_shlibs, $1)=yes
6442       fi
6443       ;;
6444
6445     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6446       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6447       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6448       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6449       runpath_var='LD_RUN_PATH'
6450
6451       if test "$GCC" = yes; then
6452         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6453         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6454       else
6455         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6456         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6457       fi
6458       ;;
6459
6460     sysv5* | sco3.2v5* | sco5v6*)
6461       # Note: We can NOT use -z defs as we might desire, because we do not
6462       # link with -lc, and that would cause any symbols used from libc to
6463       # always be unresolved, which means just about no library would
6464       # ever link correctly.  If we're not using GNU ld we use -z text
6465       # though, which does catch some bad symbols but isn't as heavy-handed
6466       # as -z defs.
6467       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6468       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6469       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6470       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6471       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6472       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6473       _LT_TAGVAR(link_all_deplibs, $1)=yes
6474       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6475       runpath_var='LD_RUN_PATH'
6476
6477       if test "$GCC" = yes; then
6478         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6479         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6480       else
6481         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6482         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6483       fi
6484       ;;
6485
6486     uts4*)
6487       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6488       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6489       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6490       ;;
6491
6492     *)
6493       _LT_TAGVAR(ld_shlibs, $1)=no
6494       ;;
6495     esac
6496
6497     if test x$host_vendor = xsni; then
6498       case $host in
6499       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6500         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6501         ;;
6502       esac
6503     fi
6504   fi
6505 ])
6506 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6507 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6508
6509 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6510
6511 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6512 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6513 _LT_DECL([], [extract_expsyms_cmds], [2],
6514     [The commands to extract the exported symbol list from a shared archive])
6515
6516 #
6517 # Do we need to explicitly link libc?
6518 #
6519 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6520 x|xyes)
6521   # Assume -lc should be added
6522   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6523
6524   if test "$enable_shared" = yes && test "$GCC" = yes; then
6525     case $_LT_TAGVAR(archive_cmds, $1) in
6526     *'~'*)
6527       # FIXME: we may have to deal with multi-command sequences.
6528       ;;
6529     '$CC '*)
6530       # Test whether the compiler implicitly links with -lc since on some
6531       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6532       # to ld, don't add -lc before -lgcc.
6533       AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6534         [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6535         [$RM conftest*
6536         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6537
6538         if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6539           soname=conftest
6540           lib=conftest
6541           libobjs=conftest.$ac_objext
6542           deplibs=
6543           wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6544           pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6545           compiler_flags=-v
6546           linker_flags=-v
6547           verstring=
6548           output_objdir=.
6549           libname=conftest
6550           lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6551           _LT_TAGVAR(allow_undefined_flag, $1)=
6552           if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6553           then
6554             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6555           else
6556             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6557           fi
6558           _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6559         else
6560           cat conftest.err 1>&5
6561         fi
6562         $RM conftest*
6563         ])
6564       _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6565       ;;
6566     esac
6567   fi
6568   ;;
6569 esac
6570
6571 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6572     [Whether or not to add -lc for building shared libraries])
6573 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6574     [enable_shared_with_static_runtimes], [0],
6575     [Whether or not to disallow shared libs when runtime libs are static])
6576 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6577     [Compiler flag to allow reflexive dlopens])
6578 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6579     [Compiler flag to generate shared objects directly from archives])
6580 _LT_TAGDECL([], [compiler_needs_object], [1],
6581     [Whether the compiler copes with passing no objects directly])
6582 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6583     [Create an old-style archive from a shared archive])
6584 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6585     [Create a temporary old-style archive to link instead of a shared archive])
6586 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6587 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6588 _LT_TAGDECL([], [module_cmds], [2],
6589     [Commands used to build a loadable module if different from building
6590     a shared archive.])
6591 _LT_TAGDECL([], [module_expsym_cmds], [2])
6592 _LT_TAGDECL([], [with_gnu_ld], [1],
6593     [Whether we are building with GNU ld or not])
6594 _LT_TAGDECL([], [allow_undefined_flag], [1],
6595     [Flag that allows shared libraries with undefined symbols to be built])
6596 _LT_TAGDECL([], [no_undefined_flag], [1],
6597     [Flag that enforces no undefined symbols])
6598 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6599     [Flag to hardcode $libdir into a binary during linking.
6600     This must work even if $libdir does not exist])
6601 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6602     [[If ld is used when linking, flag to hardcode $libdir into a binary
6603     during linking.  This must work even if $libdir does not exist]])
6604 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6605     [Whether we need a single "-rpath" flag with a separated argument])
6606 _LT_TAGDECL([], [hardcode_direct], [0],
6607     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6608     DIR into the resulting binary])
6609 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6610     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6611     DIR into the resulting binary and the resulting library dependency is
6612     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6613     library is relocated])
6614 _LT_TAGDECL([], [hardcode_minus_L], [0],
6615     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6616     into the resulting binary])
6617 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6618     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6619     into the resulting binary])
6620 _LT_TAGDECL([], [hardcode_automatic], [0],
6621     [Set to "yes" if building a shared library automatically hardcodes DIR
6622     into the library and all subsequent libraries and executables linked
6623     against it])
6624 _LT_TAGDECL([], [inherit_rpath], [0],
6625     [Set to yes if linker adds runtime paths of dependent libraries
6626     to runtime path list])
6627 _LT_TAGDECL([], [link_all_deplibs], [0],
6628     [Whether libtool must link a program against all its dependency libraries])
6629 _LT_TAGDECL([], [always_export_symbols], [0],
6630     [Set to "yes" if exported symbols are required])
6631 _LT_TAGDECL([], [export_symbols_cmds], [2],
6632     [The commands to list exported symbols])
6633 _LT_TAGDECL([], [exclude_expsyms], [1],
6634     [Symbols that should not be listed in the preloaded symbols])
6635 _LT_TAGDECL([], [include_expsyms], [1],
6636     [Symbols that must always be exported])
6637 _LT_TAGDECL([], [prelink_cmds], [2],
6638     [Commands necessary for linking programs (against libraries) with templates])
6639 _LT_TAGDECL([], [postlink_cmds], [2],
6640     [Commands necessary for finishing linking programs])
6641 _LT_TAGDECL([], [file_list_spec], [1],
6642     [Specify filename containing input files])
6643 dnl FIXME: Not yet implemented
6644 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6645 dnl    [Compiler flag to generate thread safe objects])
6646 ])# _LT_LINKER_SHLIBS
6647
6648
6649 # _LT_LANG_C_CONFIG([TAG])
6650 # ------------------------
6651 # Ensure that the configuration variables for a C compiler are suitably
6652 # defined.  These variables are subsequently used by _LT_CONFIG to write
6653 # the compiler configuration to `libtool'.
6654 m4_defun([_LT_LANG_C_CONFIG],
6655 [m4_require([_LT_DECL_EGREP])dnl
6656 lt_save_CC="$CC"
6657 AC_LANG_PUSH(C)
6658
6659 # Source file extension for C test sources.
6660 ac_ext=c
6661
6662 # Object file extension for compiled C test sources.
6663 objext=o
6664 _LT_TAGVAR(objext, $1)=$objext
6665
6666 # Code to be used in simple compile tests
6667 lt_simple_compile_test_code="int some_variable = 0;"
6668
6669 # Code to be used in simple link tests
6670 lt_simple_link_test_code='int main(){return(0);}'
6671
6672 _LT_TAG_COMPILER
6673 # Save the default compiler, since it gets overwritten when the other
6674 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6675 compiler_DEFAULT=$CC
6676
6677 # save warnings/boilerplate of simple test code
6678 _LT_COMPILER_BOILERPLATE
6679 _LT_LINKER_BOILERPLATE
6680
6681 if test -n "$compiler"; then
6682   _LT_COMPILER_NO_RTTI($1)
6683   _LT_COMPILER_PIC($1)
6684   _LT_COMPILER_C_O($1)
6685   _LT_COMPILER_FILE_LOCKS($1)
6686   _LT_LINKER_SHLIBS($1)
6687   _LT_SYS_DYNAMIC_LINKER($1)
6688   _LT_LINKER_HARDCODE_LIBPATH($1)
6689   LT_SYS_DLOPEN_SELF
6690   _LT_CMD_STRIPLIB
6691
6692   # Report which library types will actually be built
6693   AC_MSG_CHECKING([if libtool supports shared libraries])
6694   AC_MSG_RESULT([$can_build_shared])
6695
6696   AC_MSG_CHECKING([whether to build shared libraries])
6697   test "$can_build_shared" = "no" && enable_shared=no
6698
6699   # On AIX, shared libraries and static libraries use the same namespace, and
6700   # are all built from PIC.
6701   case $host_os in
6702   aix3*)
6703     test "$enable_shared" = yes && enable_static=no
6704     if test -n "$RANLIB"; then
6705       archive_cmds="$archive_cmds~\$RANLIB \$lib"
6706       postinstall_cmds='$RANLIB $lib'
6707     fi
6708     ;;
6709
6710   aix[[4-9]]*)
6711     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6712       test "$enable_shared" = yes && enable_static=no
6713     fi
6714     ;;
6715   esac
6716   AC_MSG_RESULT([$enable_shared])
6717
6718   AC_MSG_CHECKING([whether to build static libraries])
6719   # Make sure either enable_shared or enable_static is yes.
6720   test "$enable_shared" = yes || enable_static=yes
6721   AC_MSG_RESULT([$enable_static])
6722
6723   _LT_CONFIG($1)
6724 fi
6725 AC_LANG_POP
6726 CC="$lt_save_CC"
6727 ])# _LT_LANG_C_CONFIG
6728
6729
6730 # _LT_LANG_CXX_CONFIG([TAG])
6731 # --------------------------
6732 # Ensure that the configuration variables for a C++ compiler are suitably
6733 # defined.  These variables are subsequently used by _LT_CONFIG to write
6734 # the compiler configuration to `libtool'.
6735 m4_defun([_LT_LANG_CXX_CONFIG],
6736 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6737 m4_require([_LT_DECL_EGREP])dnl
6738 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6739 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6740     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6741     (test "X$CXX" != "Xg++"))) ; then
6742   AC_PROG_CXXCPP
6743 else
6744   _lt_caught_CXX_error=yes
6745 fi
6746
6747 AC_LANG_PUSH(C++)
6748 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6749 _LT_TAGVAR(allow_undefined_flag, $1)=
6750 _LT_TAGVAR(always_export_symbols, $1)=no
6751 _LT_TAGVAR(archive_expsym_cmds, $1)=
6752 _LT_TAGVAR(compiler_needs_object, $1)=no
6753 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6754 _LT_TAGVAR(hardcode_direct, $1)=no
6755 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6756 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6757 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6758 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6759 _LT_TAGVAR(hardcode_minus_L, $1)=no
6760 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6761 _LT_TAGVAR(hardcode_automatic, $1)=no
6762 _LT_TAGVAR(inherit_rpath, $1)=no
6763 _LT_TAGVAR(module_cmds, $1)=
6764 _LT_TAGVAR(module_expsym_cmds, $1)=
6765 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6766 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6767 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6768 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6769 _LT_TAGVAR(no_undefined_flag, $1)=
6770 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6771 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6772
6773 # Source file extension for C++ test sources.
6774 ac_ext=cpp
6775
6776 # Object file extension for compiled C++ test sources.
6777 objext=o
6778 _LT_TAGVAR(objext, $1)=$objext
6779
6780 # No sense in running all these tests if we already determined that
6781 # the CXX compiler isn't working.  Some variables (like enable_shared)
6782 # are currently assumed to apply to all compilers on this platform,
6783 # and will be corrupted by setting them based on a non-working compiler.
6784 if test "$_lt_caught_CXX_error" != yes; then
6785   # Code to be used in simple compile tests
6786   lt_simple_compile_test_code="int some_variable = 0;"
6787
6788   # Code to be used in simple link tests
6789   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6790
6791   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6792   _LT_TAG_COMPILER
6793
6794   # save warnings/boilerplate of simple test code
6795   _LT_COMPILER_BOILERPLATE
6796   _LT_LINKER_BOILERPLATE
6797
6798   # Allow CC to be a program name with arguments.
6799   lt_save_CC=$CC
6800   lt_save_CFLAGS=$CFLAGS
6801   lt_save_LD=$LD
6802   lt_save_GCC=$GCC
6803   GCC=$GXX
6804   lt_save_with_gnu_ld=$with_gnu_ld
6805   lt_save_path_LD=$lt_cv_path_LD
6806   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6807     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6808   else
6809     $as_unset lt_cv_prog_gnu_ld
6810   fi
6811   if test -n "${lt_cv_path_LDCXX+set}"; then
6812     lt_cv_path_LD=$lt_cv_path_LDCXX
6813   else
6814     $as_unset lt_cv_path_LD
6815   fi
6816   test -z "${LDCXX+set}" || LD=$LDCXX
6817   CC=${CXX-"c++"}
6818   CFLAGS=$CXXFLAGS
6819   compiler=$CC
6820   _LT_TAGVAR(compiler, $1)=$CC
6821   _LT_CC_BASENAME([$compiler])
6822
6823   if test -n "$compiler"; then
6824     # We don't want -fno-exception when compiling C++ code, so set the
6825     # no_builtin_flag separately
6826     if test "$GXX" = yes; then
6827       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6828     else
6829       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6830     fi
6831
6832     if test "$GXX" = yes; then
6833       # Set up default GNU C++ configuration
6834
6835       LT_PATH_LD
6836
6837       # Check if GNU C++ uses GNU ld as the underlying linker, since the
6838       # archiving commands below assume that GNU ld is being used.
6839       if test "$with_gnu_ld" = yes; then
6840         _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6841         _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'
6842
6843         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6844         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6845
6846         # If archive_cmds runs LD, not CC, wlarc should be empty
6847         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6848         #     investigate it a little bit more. (MM)
6849         wlarc='${wl}'
6850
6851         # ancient GNU ld didn't support --whole-archive et. al.
6852         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6853           $GREP 'no-whole-archive' > /dev/null; then
6854           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6855         else
6856           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6857         fi
6858       else
6859         with_gnu_ld=no
6860         wlarc=
6861
6862         # A generic and very simple default shared library creation
6863         # command for GNU C++ for the case where it uses the native
6864         # linker, instead of GNU ld.  If possible, this setting should
6865         # overridden to take advantage of the native linker features on
6866         # the platform it is being used on.
6867         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6868       fi
6869
6870       # Commands to make compiler produce verbose output that lists
6871       # what "hidden" libraries, object files and flags are used when
6872       # linking a shared library.
6873       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6874
6875     else
6876       GXX=no
6877       with_gnu_ld=no
6878       wlarc=
6879     fi
6880
6881     # PORTME: fill in a description of your system's C++ link characteristics
6882     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6883     _LT_TAGVAR(ld_shlibs, $1)=yes
6884     case $host_os in
6885       aix3*)
6886         # FIXME: insert proper C++ library support
6887         _LT_TAGVAR(ld_shlibs, $1)=no
6888         ;;
6889       aix[[4-9]]*)
6890         if test "$host_cpu" = ia64; then
6891           # On IA64, the linker does run time linking by default, so we don't
6892           # have to do anything special.
6893           aix_use_runtimelinking=no
6894           exp_sym_flag='-Bexport'
6895           no_entry_flag=""
6896         else
6897           aix_use_runtimelinking=no
6898
6899           # Test if we are trying to use run time linking or normal
6900           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6901           # need to do runtime linking.
6902           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6903             for ld_flag in $LDFLAGS; do
6904               case $ld_flag in
6905               *-brtl*)
6906                 aix_use_runtimelinking=yes
6907                 break
6908                 ;;
6909               esac
6910             done
6911             ;;
6912           esac
6913
6914           exp_sym_flag='-bexport'
6915           no_entry_flag='-bnoentry'
6916         fi
6917
6918         # When large executables or shared objects are built, AIX ld can
6919         # have problems creating the table of contents.  If linking a library
6920         # or program results in "error TOC overflow" add -mminimal-toc to
6921         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6922         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6923
6924         _LT_TAGVAR(archive_cmds, $1)=''
6925         _LT_TAGVAR(hardcode_direct, $1)=yes
6926         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6927         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6928         _LT_TAGVAR(link_all_deplibs, $1)=yes
6929         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6930
6931         if test "$GXX" = yes; then
6932           case $host_os in aix4.[[012]]|aix4.[[012]].*)
6933           # We only want to do this on AIX 4.2 and lower, the check
6934           # below for broken collect2 doesn't work under 4.3+
6935           collect2name=`${CC} -print-prog-name=collect2`
6936           if test -f "$collect2name" &&
6937              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6938           then
6939             # We have reworked collect2
6940             :
6941           else
6942             # We have old collect2
6943             _LT_TAGVAR(hardcode_direct, $1)=unsupported
6944             # It fails to find uninstalled libraries when the uninstalled
6945             # path is not listed in the libpath.  Setting hardcode_minus_L
6946             # to unsupported forces relinking
6947             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6948             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6949             _LT_TAGVAR(hardcode_libdir_separator, $1)=
6950           fi
6951           esac
6952           shared_flag='-shared'
6953           if test "$aix_use_runtimelinking" = yes; then
6954             shared_flag="$shared_flag "'${wl}-G'
6955           fi
6956         else
6957           # not using gcc
6958           if test "$host_cpu" = ia64; then
6959           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6960           # chokes on -Wl,-G. The following line is correct:
6961           shared_flag='-G'
6962           else
6963             if test "$aix_use_runtimelinking" = yes; then
6964               shared_flag='${wl}-G'
6965             else
6966               shared_flag='${wl}-bM:SRE'
6967             fi
6968           fi
6969         fi
6970
6971         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6972         # It seems that -bexpall does not export symbols beginning with
6973         # underscore (_), so it is better to generate a list of symbols to
6974         # export.
6975         _LT_TAGVAR(always_export_symbols, $1)=yes
6976         if test "$aix_use_runtimelinking" = yes; then
6977           # Warning - without using the other runtime loading flags (-brtl),
6978           # -berok will link without error, but may produce a broken library.
6979           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6980           # Determine the default libpath from the value encoded in an empty
6981           # executable.
6982           _LT_SYS_MODULE_PATH_AIX([$1])
6983           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6984
6985           _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"
6986         else
6987           if test "$host_cpu" = ia64; then
6988             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6989             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6990             _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"
6991           else
6992             # Determine the default libpath from the value encoded in an
6993             # empty executable.
6994             _LT_SYS_MODULE_PATH_AIX([$1])
6995             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6996             # Warning - without using the other run time loading flags,
6997             # -berok will link without error, but may produce a broken library.
6998             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6999             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7000             if test "$with_gnu_ld" = yes; then
7001               # We only use this code for GNU lds that support --whole-archive.
7002               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7003             else
7004               # Exported symbols can be pulled into shared objects from archives
7005               _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7006             fi
7007             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7008             # This is similar to how AIX traditionally builds its shared
7009             # libraries.
7010             _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'
7011           fi
7012         fi
7013         ;;
7014
7015       beos*)
7016         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7017           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7018           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7019           # support --undefined.  This deserves some investigation.  FIXME
7020           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7021         else
7022           _LT_TAGVAR(ld_shlibs, $1)=no
7023         fi
7024         ;;
7025
7026       chorus*)
7027         case $cc_basename in
7028           *)
7029           # FIXME: insert proper C++ library support
7030           _LT_TAGVAR(ld_shlibs, $1)=no
7031           ;;
7032         esac
7033         ;;
7034
7035       cygwin* | mingw* | pw32* | cegcc*)
7036         case $GXX,$cc_basename in
7037         ,cl* | no,cl*)
7038           # Native MSVC
7039           # hardcode_libdir_flag_spec is actually meaningless, as there is
7040           # no search path for DLLs.
7041           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7042           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7043           _LT_TAGVAR(always_export_symbols, $1)=yes
7044           _LT_TAGVAR(file_list_spec, $1)='@'
7045           # Tell ltmain to make .lib files, not .a files.
7046           libext=lib
7047           # Tell ltmain to make .dll files, not .so files.
7048           shrext_cmds=".dll"
7049           # FIXME: Setting linknames here is a bad hack.
7050           _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7051           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7052               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7053             else
7054               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7055             fi~
7056             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7057             linknames='
7058           # The linker will not automatically build a static lib if we build a DLL.
7059           # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7060           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7061           # Don't use ranlib
7062           _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7063           _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7064             lt_tool_outputfile="@TOOL_OUTPUT@"~
7065             case $lt_outputfile in
7066               *.exe|*.EXE) ;;
7067               *)
7068                 lt_outputfile="$lt_outputfile.exe"
7069                 lt_tool_outputfile="$lt_tool_outputfile.exe"
7070                 ;;
7071             esac~
7072             func_to_tool_file "$lt_outputfile"~
7073             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7074               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7075               $RM "$lt_outputfile.manifest";
7076             fi'
7077           ;;
7078         *)
7079           # g++
7080           # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7081           # as there is no search path for DLLs.
7082           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7083           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7084           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7085           _LT_TAGVAR(always_export_symbols, $1)=no
7086           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7087
7088           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7089             _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'
7090             # If the export-symbols file already is a .def file (1st line
7091             # is EXPORTS), use it as is; otherwise, prepend...
7092             _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7093               cp $export_symbols $output_objdir/$soname.def;
7094             else
7095               echo EXPORTS > $output_objdir/$soname.def;
7096               cat $export_symbols >> $output_objdir/$soname.def;
7097             fi~
7098             $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'
7099           else
7100             _LT_TAGVAR(ld_shlibs, $1)=no
7101           fi
7102           ;;
7103         esac
7104         ;;
7105       darwin* | rhapsody*)
7106         _LT_DARWIN_LINKER_FEATURES($1)
7107         ;;
7108
7109       dgux*)
7110         case $cc_basename in
7111           ec++*)
7112             # FIXME: insert proper C++ library support
7113             _LT_TAGVAR(ld_shlibs, $1)=no
7114             ;;
7115           ghcx*)
7116             # Green Hills C++ Compiler
7117             # FIXME: insert proper C++ library support
7118             _LT_TAGVAR(ld_shlibs, $1)=no
7119             ;;
7120           *)
7121             # FIXME: insert proper C++ library support
7122             _LT_TAGVAR(ld_shlibs, $1)=no
7123             ;;
7124         esac
7125         ;;
7126
7127       freebsd[[12]]*)
7128         # C++ shared libraries reported to be fairly broken before
7129         # switch to ELF
7130         _LT_TAGVAR(ld_shlibs, $1)=no
7131         ;;
7132
7133       freebsd-elf*)
7134         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7135         ;;
7136
7137       freebsd* | dragonfly*)
7138         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7139         # conventions
7140         _LT_TAGVAR(ld_shlibs, $1)=yes
7141         ;;
7142
7143       gnu*)
7144         ;;
7145
7146       haiku*)
7147         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7148         _LT_TAGVAR(link_all_deplibs, $1)=yes
7149         ;;
7150
7151       hpux9*)
7152         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7153         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7154         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7155         _LT_TAGVAR(hardcode_direct, $1)=yes
7156         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7157                                              # but as the default
7158                                              # location of the library.
7159
7160         case $cc_basename in
7161           CC*)
7162             # FIXME: insert proper C++ library support
7163             _LT_TAGVAR(ld_shlibs, $1)=no
7164             ;;
7165           aCC*)
7166             _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'
7167             # Commands to make compiler produce verbose output that lists
7168             # what "hidden" libraries, object files and flags are used when
7169             # linking a shared library.
7170             #
7171             # There doesn't appear to be a way to prevent this compiler from
7172             # explicitly linking system object files so we need to strip them
7173             # from the output so that they don't get included in the library
7174             # dependencies.
7175             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"'
7176             ;;
7177           *)
7178             if test "$GXX" = yes; then
7179               _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'
7180             else
7181               # FIXME: insert proper C++ library support
7182               _LT_TAGVAR(ld_shlibs, $1)=no
7183             fi
7184             ;;
7185         esac
7186         ;;
7187
7188       hpux10*|hpux11*)
7189         if test $with_gnu_ld = no; then
7190           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7191           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7192
7193           case $host_cpu in
7194             hppa*64*|ia64*)
7195               ;;
7196             *)
7197               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7198               ;;
7199           esac
7200         fi
7201         case $host_cpu in
7202           hppa*64*|ia64*)
7203             _LT_TAGVAR(hardcode_direct, $1)=no
7204             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7205             ;;
7206           *)
7207             _LT_TAGVAR(hardcode_direct, $1)=yes
7208             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7209             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7210                                                  # but as the default
7211                                                  # location of the library.
7212             ;;
7213         esac
7214
7215         case $cc_basename in
7216           CC*)
7217             # FIXME: insert proper C++ library support
7218             _LT_TAGVAR(ld_shlibs, $1)=no
7219             ;;
7220           aCC*)
7221             case $host_cpu in
7222               hppa*64*)
7223                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7224                 ;;
7225               ia64*)
7226                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7227                 ;;
7228               *)
7229                 _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'
7230                 ;;
7231             esac
7232             # Commands to make compiler produce verbose output that lists
7233             # what "hidden" libraries, object files and flags are used when
7234             # linking a shared library.
7235             #
7236             # There doesn't appear to be a way to prevent this compiler from
7237             # explicitly linking system object files so we need to strip them
7238             # from the output so that they don't get included in the library
7239             # dependencies.
7240             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"'
7241             ;;
7242           *)
7243             if test "$GXX" = yes; then
7244               if test $with_gnu_ld = no; then
7245                 case $host_cpu in
7246                   hppa*64*)
7247                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7248                     ;;
7249                   ia64*)
7250                     _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'
7251                     ;;
7252                   *)
7253                     _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'
7254                     ;;
7255                 esac
7256               fi
7257             else
7258               # FIXME: insert proper C++ library support
7259               _LT_TAGVAR(ld_shlibs, $1)=no
7260             fi
7261             ;;
7262         esac
7263         ;;
7264
7265       interix[[3-9]]*)
7266         _LT_TAGVAR(hardcode_direct, $1)=no
7267         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7268         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7269         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7270         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7271         # Instead, shared libraries are loaded at an image base (0x10000000 by
7272         # default) and relocated if they conflict, which is a slow very memory
7273         # consuming and fragmenting process.  To avoid this, we pick a random,
7274         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7275         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7276         _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'
7277         _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'
7278         ;;
7279       irix5* | irix6*)
7280         case $cc_basename in
7281           CC*)
7282             # SGI C++
7283             _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'
7284
7285             # Archives containing C++ object files must be created using
7286             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7287             # necessary to make sure instantiated templates are included
7288             # in the archive.
7289             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7290             ;;
7291           *)
7292             if test "$GXX" = yes; then
7293               if test "$with_gnu_ld" = no; then
7294                 _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'
7295               else
7296                 _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'
7297               fi
7298             fi
7299             _LT_TAGVAR(link_all_deplibs, $1)=yes
7300             ;;
7301         esac
7302         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7303         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7304         _LT_TAGVAR(inherit_rpath, $1)=yes
7305         ;;
7306
7307       linux* | k*bsd*-gnu | kopensolaris*-gnu)
7308         case $cc_basename in
7309           KCC*)
7310             # Kuck and Associates, Inc. (KAI) C++ Compiler
7311
7312             # KCC will only create a shared library if the output file
7313             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7314             # to its proper name (with version) after linking.
7315             _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'
7316             _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'
7317             # Commands to make compiler produce verbose output that lists
7318             # what "hidden" libraries, object files and flags are used when
7319             # linking a shared library.
7320             #
7321             # There doesn't appear to be a way to prevent this compiler from
7322             # explicitly linking system object files so we need to strip them
7323             # from the output so that they don't get included in the library
7324             # dependencies.
7325             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"'
7326
7327             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7328             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7329
7330             # Archives containing C++ object files must be created using
7331             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7332             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7333             ;;
7334           icpc* | ecpc* )
7335             # Intel C++
7336             with_gnu_ld=yes
7337             # version 8.0 and above of icpc choke on multiply defined symbols
7338             # if we add $predep_objects and $postdep_objects, however 7.1 and
7339             # earlier do not add the objects themselves.
7340             case `$CC -V 2>&1` in
7341               *"Version 7."*)
7342                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7343                 _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'
7344                 ;;
7345               *)  # Version 8.0 or newer
7346                 tmp_idyn=
7347                 case $host_cpu in
7348                   ia64*) tmp_idyn=' -i_dynamic';;
7349                 esac
7350                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7351                 _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'
7352                 ;;
7353             esac
7354             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7355             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7356             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7357             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7358             ;;
7359           pgCC* | pgcpp*)
7360             # Portland Group C++ compiler
7361             case `$CC -V` in
7362             *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7363               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7364                 rm -rf $tpldir~
7365                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7366                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7367               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7368                 rm -rf $tpldir~
7369                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7370                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7371                 $RANLIB $oldlib'
7372               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7373                 rm -rf $tpldir~
7374                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7375                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7376               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7377                 rm -rf $tpldir~
7378                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7379                 $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'
7380               ;;
7381             *) # Version 6 and above use weak symbols
7382               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7383               _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'
7384               ;;
7385             esac
7386
7387             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7388             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7389             _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'
7390             ;;
7391           cxx*)
7392             # Compaq C++
7393             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7394             _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'
7395
7396             runpath_var=LD_RUN_PATH
7397             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7398             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7399
7400             # Commands to make compiler produce verbose output that lists
7401             # what "hidden" libraries, object files and flags are used when
7402             # linking a shared library.
7403             #
7404             # There doesn't appear to be a way to prevent this compiler from
7405             # explicitly linking system object files so we need to strip them
7406             # from the output so that they don't get included in the library
7407             # dependencies.
7408             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'
7409             ;;
7410           xl* | mpixl* | bgxl*)
7411             # IBM XL 8.0 on PPC, with GNU ld
7412             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7413             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7414             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7415             if test "x$supports_anon_versioning" = xyes; then
7416               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7417                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7418                 echo "local: *; };" >> $output_objdir/$libname.ver~
7419                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7420             fi
7421             ;;
7422           *)
7423             case `$CC -V 2>&1 | sed 5q` in
7424             *Sun\ C*)
7425               # Sun C++ 5.9
7426               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7427               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7428               _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'
7429               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7430               _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'
7431               _LT_TAGVAR(compiler_needs_object, $1)=yes
7432
7433               # Not sure whether something based on
7434               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7435               # would be better.
7436               output_verbose_link_cmd='func_echo_all'
7437
7438               # Archives containing C++ object files must be created using
7439               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7440               # necessary to make sure instantiated templates are included
7441               # in the archive.
7442               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7443               ;;
7444             esac
7445             ;;
7446         esac
7447         ;;
7448
7449       lynxos*)
7450         # FIXME: insert proper C++ library support
7451         _LT_TAGVAR(ld_shlibs, $1)=no
7452         ;;
7453
7454       m88k*)
7455         # FIXME: insert proper C++ library support
7456         _LT_TAGVAR(ld_shlibs, $1)=no
7457         ;;
7458
7459       mvs*)
7460         case $cc_basename in
7461           cxx*)
7462             # FIXME: insert proper C++ library support
7463             _LT_TAGVAR(ld_shlibs, $1)=no
7464             ;;
7465           *)
7466             # FIXME: insert proper C++ library support
7467             _LT_TAGVAR(ld_shlibs, $1)=no
7468             ;;
7469         esac
7470         ;;
7471
7472       netbsd*)
7473         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7474           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7475           wlarc=
7476           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7477           _LT_TAGVAR(hardcode_direct, $1)=yes
7478           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7479         fi
7480         # Workaround some broken pre-1.5 toolchains
7481         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7482         ;;
7483
7484       *nto* | *qnx*)
7485         _LT_TAGVAR(ld_shlibs, $1)=yes
7486         ;;
7487
7488       openbsd2*)
7489         # C++ shared libraries are fairly broken
7490         _LT_TAGVAR(ld_shlibs, $1)=no
7491         ;;
7492
7493       openbsd*)
7494         if test -f /usr/libexec/ld.so; then
7495           _LT_TAGVAR(hardcode_direct, $1)=yes
7496           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7497           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7498           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7499           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7500           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7501             _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'
7502             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7503             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7504           fi
7505           output_verbose_link_cmd=func_echo_all
7506         else
7507           _LT_TAGVAR(ld_shlibs, $1)=no
7508         fi
7509         ;;
7510
7511       osf3* | osf4* | osf5*)
7512         case $cc_basename in
7513           KCC*)
7514             # Kuck and Associates, Inc. (KAI) C++ Compiler
7515
7516             # KCC will only create a shared library if the output file
7517             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7518             # to its proper name (with version) after linking.
7519             _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'
7520
7521             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7522             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7523
7524             # Archives containing C++ object files must be created using
7525             # the KAI C++ compiler.
7526             case $host in
7527               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7528               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7529             esac
7530             ;;
7531           RCC*)
7532             # Rational C++ 2.4.1
7533             # FIXME: insert proper C++ library support
7534             _LT_TAGVAR(ld_shlibs, $1)=no
7535             ;;
7536           cxx*)
7537             case $host in
7538               osf3*)
7539                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7540                 _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'
7541                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7542                 ;;
7543               *)
7544                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7545                 _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'
7546                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7547                   echo "-hidden">> $lib.exp~
7548                   $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~
7549                   $RM $lib.exp'
7550                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7551                 ;;
7552             esac
7553
7554             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7555
7556             # Commands to make compiler produce verbose output that lists
7557             # what "hidden" libraries, object files and flags are used when
7558             # linking a shared library.
7559             #
7560             # There doesn't appear to be a way to prevent this compiler from
7561             # explicitly linking system object files so we need to strip them
7562             # from the output so that they don't get included in the library
7563             # dependencies.
7564             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"'
7565             ;;
7566           *)
7567             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7568               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7569               case $host in
7570                 osf3*)
7571                   _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'
7572                   ;;
7573                 *)
7574                   _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'
7575                   ;;
7576               esac
7577
7578               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7579               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7580
7581               # Commands to make compiler produce verbose output that lists
7582               # what "hidden" libraries, object files and flags are used when
7583               # linking a shared library.
7584               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7585
7586             else
7587               # FIXME: insert proper C++ library support
7588               _LT_TAGVAR(ld_shlibs, $1)=no
7589             fi
7590             ;;
7591         esac
7592         ;;
7593
7594       psos*)
7595         # FIXME: insert proper C++ library support
7596         _LT_TAGVAR(ld_shlibs, $1)=no
7597         ;;
7598
7599       sunos4*)
7600         case $cc_basename in
7601           CC*)
7602             # Sun C++ 4.x
7603             # FIXME: insert proper C++ library support
7604             _LT_TAGVAR(ld_shlibs, $1)=no
7605             ;;
7606           lcc*)
7607             # Lucid
7608             # FIXME: insert proper C++ library support
7609             _LT_TAGVAR(ld_shlibs, $1)=no
7610             ;;
7611           *)
7612             # FIXME: insert proper C++ library support
7613             _LT_TAGVAR(ld_shlibs, $1)=no
7614             ;;
7615         esac
7616         ;;
7617
7618       solaris*)
7619         case $cc_basename in
7620           CC* | sunCC*)
7621             # Sun C++ 4.2, 5.x and Centerline C++
7622             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7623             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7624             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7625             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7626               $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'
7627
7628             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7629             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7630             case $host_os in
7631               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7632               *)
7633                 # The compiler driver will combine and reorder linker options,
7634                 # but understands `-z linker_flag'.
7635                 # Supported since Solaris 2.6 (maybe 2.5.1?)
7636                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7637                 ;;
7638             esac
7639             _LT_TAGVAR(link_all_deplibs, $1)=yes
7640
7641             output_verbose_link_cmd='func_echo_all'
7642
7643             # Archives containing C++ object files must be created using
7644             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7645             # necessary to make sure instantiated templates are included
7646             # in the archive.
7647             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7648             ;;
7649           gcx*)
7650             # Green Hills C++ Compiler
7651             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7652
7653             # The C++ compiler must be used to create the archive.
7654             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7655             ;;
7656           *)
7657             # GNU C++ compiler with Solaris linker
7658             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7659               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7660               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7661                 _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'
7662                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7663                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7664
7665                 # Commands to make compiler produce verbose output that lists
7666                 # what "hidden" libraries, object files and flags are used when
7667                 # linking a shared library.
7668                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7669               else
7670                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7671                 # platform.
7672                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7673                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7674                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7675
7676                 # Commands to make compiler produce verbose output that lists
7677                 # what "hidden" libraries, object files and flags are used when
7678                 # linking a shared library.
7679                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7680               fi
7681
7682               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7683               case $host_os in
7684                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7685                 *)
7686                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7687                   ;;
7688               esac
7689             fi
7690             ;;
7691         esac
7692         ;;
7693
7694     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7695       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7696       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7697       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7698       runpath_var='LD_RUN_PATH'
7699
7700       case $cc_basename in
7701         CC*)
7702           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7703           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7704           ;;
7705         *)
7706           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7707           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7708           ;;
7709       esac
7710       ;;
7711
7712       sysv5* | sco3.2v5* | sco5v6*)
7713         # Note: We can NOT use -z defs as we might desire, because we do not
7714         # link with -lc, and that would cause any symbols used from libc to
7715         # always be unresolved, which means just about no library would
7716         # ever link correctly.  If we're not using GNU ld we use -z text
7717         # though, which does catch some bad symbols but isn't as heavy-handed
7718         # as -z defs.
7719         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7720         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7721         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7722         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7723         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7724         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7725         _LT_TAGVAR(link_all_deplibs, $1)=yes
7726         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7727         runpath_var='LD_RUN_PATH'
7728
7729         case $cc_basename in
7730           CC*)
7731             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7732             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7733             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7734               '"$_LT_TAGVAR(old_archive_cmds, $1)"
7735             _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7736               '"$_LT_TAGVAR(reload_cmds, $1)"
7737             ;;
7738           *)
7739             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7740             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7741             ;;
7742         esac
7743       ;;
7744
7745       tandem*)
7746         case $cc_basename in
7747           NCC*)
7748             # NonStop-UX NCC 3.20
7749             # FIXME: insert proper C++ library support
7750             _LT_TAGVAR(ld_shlibs, $1)=no
7751             ;;
7752           *)
7753             # FIXME: insert proper C++ library support
7754             _LT_TAGVAR(ld_shlibs, $1)=no
7755             ;;
7756         esac
7757         ;;
7758
7759       vxworks*)
7760         # FIXME: insert proper C++ library support
7761         _LT_TAGVAR(ld_shlibs, $1)=no
7762         ;;
7763
7764       *)
7765         # FIXME: insert proper C++ library support
7766         _LT_TAGVAR(ld_shlibs, $1)=no
7767         ;;
7768     esac
7769
7770     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7771     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7772
7773     _LT_TAGVAR(GCC, $1)="$GXX"
7774     _LT_TAGVAR(LD, $1)="$LD"
7775
7776     ## CAVEAT EMPTOR:
7777     ## There is no encapsulation within the following macros, do not change
7778     ## the running order or otherwise move them around unless you know exactly
7779     ## what you are doing...
7780     _LT_SYS_HIDDEN_LIBDEPS($1)
7781     _LT_COMPILER_PIC($1)
7782     _LT_COMPILER_C_O($1)
7783     _LT_COMPILER_FILE_LOCKS($1)
7784     _LT_LINKER_SHLIBS($1)
7785     _LT_SYS_DYNAMIC_LINKER($1)
7786     _LT_LINKER_HARDCODE_LIBPATH($1)
7787
7788     _LT_CONFIG($1)
7789   fi # test -n "$compiler"
7790
7791   CC=$lt_save_CC
7792   CFLAGS=$lt_save_CFLAGS
7793   LDCXX=$LD
7794   LD=$lt_save_LD
7795   GCC=$lt_save_GCC
7796   with_gnu_ld=$lt_save_with_gnu_ld
7797   lt_cv_path_LDCXX=$lt_cv_path_LD
7798   lt_cv_path_LD=$lt_save_path_LD
7799   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7800   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7801 fi # test "$_lt_caught_CXX_error" != yes
7802
7803 AC_LANG_POP
7804 ])# _LT_LANG_CXX_CONFIG
7805
7806
7807 # _LT_FUNC_STRIPNAME_CNF
7808 # ----------------------
7809 # func_stripname_cnf prefix suffix name
7810 # strip PREFIX and SUFFIX off of NAME.
7811 # PREFIX and SUFFIX must not contain globbing or regex special
7812 # characters, hashes, percent signs, but SUFFIX may contain a leading
7813 # dot (in which case that matches only a dot).
7814 #
7815 # This function is identical to the (non-XSI) version of func_stripname,
7816 # except this one can be used by m4 code that may be executed by configure,
7817 # rather than the libtool script.
7818 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7819 AC_REQUIRE([_LT_DECL_SED])
7820 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7821 func_stripname_cnf ()
7822 {
7823   case ${2} in
7824   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7825   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7826   esac
7827 } # func_stripname_cnf
7828 ])# _LT_FUNC_STRIPNAME_CNF
7829
7830 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7831 # ---------------------------------
7832 # Figure out "hidden" library dependencies from verbose
7833 # compiler output when linking a shared library.
7834 # Parse the compiler output and extract the necessary
7835 # objects, libraries and library flags.
7836 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7837 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7838 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7839 # Dependencies to place before and after the object being linked:
7840 _LT_TAGVAR(predep_objects, $1)=
7841 _LT_TAGVAR(postdep_objects, $1)=
7842 _LT_TAGVAR(predeps, $1)=
7843 _LT_TAGVAR(postdeps, $1)=
7844 _LT_TAGVAR(compiler_lib_search_path, $1)=
7845
7846 dnl we can't use the lt_simple_compile_test_code here,
7847 dnl because it contains code intended for an executable,
7848 dnl not a library.  It's possible we should let each
7849 dnl tag define a new lt_????_link_test_code variable,
7850 dnl but it's only used here...
7851 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7852 int a;
7853 void foo (void) { a = 0; }
7854 _LT_EOF
7855 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7856 class Foo
7857 {
7858 public:
7859   Foo (void) { a = 0; }
7860 private:
7861   int a;
7862 };
7863 _LT_EOF
7864 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7865       subroutine foo
7866       implicit none
7867       integer*4 a
7868       a=0
7869       return
7870       end
7871 _LT_EOF
7872 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7873       subroutine foo
7874       implicit none
7875       integer a
7876       a=0
7877       return
7878       end
7879 _LT_EOF
7880 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7881 public class foo {
7882   private int a;
7883   public void bar (void) {
7884     a = 0;
7885   }
7886 };
7887 _LT_EOF
7888 ])
7889
7890 _lt_libdeps_save_CFLAGS=$CFLAGS
7891 case "$CC $CFLAGS " in #(
7892 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7893 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7894 esac
7895
7896 dnl Parse the compiler output and extract the necessary
7897 dnl objects, libraries and library flags.
7898 if AC_TRY_EVAL(ac_compile); then
7899   # Parse the compiler output and extract the necessary
7900   # objects, libraries and library flags.
7901
7902   # Sentinel used to keep track of whether or not we are before
7903   # the conftest object file.
7904   pre_test_object_deps_done=no
7905
7906   for p in `eval "$output_verbose_link_cmd"`; do
7907     case ${prev}${p} in
7908
7909     -L* | -R* | -l*)
7910        # Some compilers place space between "-{L,R}" and the path.
7911        # Remove the space.
7912        if test $p = "-L" ||
7913           test $p = "-R"; then
7914          prev=$p
7915          continue
7916        fi
7917
7918        # Expand the sysroot to ease extracting the directories later.
7919        if test -z "$prev"; then
7920          case $p in
7921          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7922          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7923          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7924          esac
7925        fi
7926        case $p in
7927        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7928        esac
7929        if test "$pre_test_object_deps_done" = no; then
7930          case ${prev} in
7931          -L | -R)
7932            # Internal compiler library paths should come after those
7933            # provided the user.  The postdeps already come after the
7934            # user supplied libs so there is no need to process them.
7935            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7936              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7937            else
7938              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7939            fi
7940            ;;
7941          # The "-l" case would never come before the object being
7942          # linked, so don't bother handling this case.
7943          esac
7944        else
7945          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7946            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7947          else
7948            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7949          fi
7950        fi
7951        prev=
7952        ;;
7953
7954     *.lto.$objext) ;; # Ignore GCC LTO objects
7955     *.$objext)
7956        # This assumes that the test object file only shows up
7957        # once in the compiler output.
7958        if test "$p" = "conftest.$objext"; then
7959          pre_test_object_deps_done=yes
7960          continue
7961        fi
7962
7963        if test "$pre_test_object_deps_done" = no; then
7964          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7965            _LT_TAGVAR(predep_objects, $1)="$p"
7966          else
7967            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7968          fi
7969        else
7970          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7971            _LT_TAGVAR(postdep_objects, $1)="$p"
7972          else
7973            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7974          fi
7975        fi
7976        ;;
7977
7978     *) ;; # Ignore the rest.
7979
7980     esac
7981   done
7982
7983   # Clean up.
7984   rm -f a.out a.exe
7985 else
7986   echo "libtool.m4: error: problem compiling $1 test program"
7987 fi
7988
7989 $RM -f confest.$objext
7990 CFLAGS=$_lt_libdeps_save_CFLAGS
7991
7992 # PORTME: override above test on systems where it is broken
7993 m4_if([$1], [CXX],
7994 [case $host_os in
7995 interix[[3-9]]*)
7996   # Interix 3.5 installs completely hosed .la files for C++, so rather than
7997   # hack all around it, let's just trust "g++" to DTRT.
7998   _LT_TAGVAR(predep_objects,$1)=
7999   _LT_TAGVAR(postdep_objects,$1)=
8000   _LT_TAGVAR(postdeps,$1)=
8001   ;;
8002
8003 linux*)
8004   case `$CC -V 2>&1 | sed 5q` in
8005   *Sun\ C*)
8006     # Sun C++ 5.9
8007
8008     # The more standards-conforming stlport4 library is
8009     # incompatible with the Cstd library. Avoid specifying
8010     # it if it's in CXXFLAGS. Ignore libCrun as
8011     # -library=stlport4 depends on it.
8012     case " $CXX $CXXFLAGS " in
8013     *" -library=stlport4 "*)
8014       solaris_use_stlport4=yes
8015       ;;
8016     esac
8017
8018     if test "$solaris_use_stlport4" != yes; then
8019       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8020     fi
8021     ;;
8022   esac
8023   ;;
8024
8025 solaris*)
8026   case $cc_basename in
8027   CC* | sunCC*)
8028     # The more standards-conforming stlport4 library is
8029     # incompatible with the Cstd library. Avoid specifying
8030     # it if it's in CXXFLAGS. Ignore libCrun as
8031     # -library=stlport4 depends on it.
8032     case " $CXX $CXXFLAGS " in
8033     *" -library=stlport4 "*)
8034       solaris_use_stlport4=yes
8035       ;;
8036     esac
8037
8038     # Adding this requires a known-good setup of shared libraries for
8039     # Sun compiler versions before 5.6, else PIC objects from an old
8040     # archive will be linked into the output, leading to subtle bugs.
8041     if test "$solaris_use_stlport4" != yes; then
8042       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8043     fi
8044     ;;
8045   esac
8046   ;;
8047 esac
8048 ])
8049
8050 case " $_LT_TAGVAR(postdeps, $1) " in
8051 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8052 esac
8053  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8054 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8055  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8056 fi
8057 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8058     [The directories searched by this compiler when creating a shared library])
8059 _LT_TAGDECL([], [predep_objects], [1],
8060     [Dependencies to place before and after the objects being linked to
8061     create a shared library])
8062 _LT_TAGDECL([], [postdep_objects], [1])
8063 _LT_TAGDECL([], [predeps], [1])
8064 _LT_TAGDECL([], [postdeps], [1])
8065 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8066     [The library search path used internally by the compiler when linking
8067     a shared library])
8068 ])# _LT_SYS_HIDDEN_LIBDEPS
8069
8070
8071 # _LT_LANG_F77_CONFIG([TAG])
8072 # --------------------------
8073 # Ensure that the configuration variables for a Fortran 77 compiler are
8074 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8075 # to write the compiler configuration to `libtool'.
8076 m4_defun([_LT_LANG_F77_CONFIG],
8077 [AC_LANG_PUSH(Fortran 77)
8078 if test -z "$F77" || test "X$F77" = "Xno"; then
8079   _lt_disable_F77=yes
8080 fi
8081
8082 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8083 _LT_TAGVAR(allow_undefined_flag, $1)=
8084 _LT_TAGVAR(always_export_symbols, $1)=no
8085 _LT_TAGVAR(archive_expsym_cmds, $1)=
8086 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8087 _LT_TAGVAR(hardcode_direct, $1)=no
8088 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8089 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8090 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8091 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8092 _LT_TAGVAR(hardcode_minus_L, $1)=no
8093 _LT_TAGVAR(hardcode_automatic, $1)=no
8094 _LT_TAGVAR(inherit_rpath, $1)=no
8095 _LT_TAGVAR(module_cmds, $1)=
8096 _LT_TAGVAR(module_expsym_cmds, $1)=
8097 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8098 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8099 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8100 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8101 _LT_TAGVAR(no_undefined_flag, $1)=
8102 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8103 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8104
8105 # Source file extension for f77 test sources.
8106 ac_ext=f
8107
8108 # Object file extension for compiled f77 test sources.
8109 objext=o
8110 _LT_TAGVAR(objext, $1)=$objext
8111
8112 # No sense in running all these tests if we already determined that
8113 # the F77 compiler isn't working.  Some variables (like enable_shared)
8114 # are currently assumed to apply to all compilers on this platform,
8115 # and will be corrupted by setting them based on a non-working compiler.
8116 if test "$_lt_disable_F77" != yes; then
8117   # Code to be used in simple compile tests
8118   lt_simple_compile_test_code="\
8119       subroutine t
8120       return
8121       end
8122 "
8123
8124   # Code to be used in simple link tests
8125   lt_simple_link_test_code="\
8126       program t
8127       end
8128 "
8129
8130   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8131   _LT_TAG_COMPILER
8132
8133   # save warnings/boilerplate of simple test code
8134   _LT_COMPILER_BOILERPLATE
8135   _LT_LINKER_BOILERPLATE
8136
8137   # Allow CC to be a program name with arguments.
8138   lt_save_CC="$CC"
8139   lt_save_GCC=$GCC
8140   lt_save_CFLAGS=$CFLAGS
8141   CC=${F77-"f77"}
8142   CFLAGS=$FFLAGS
8143   compiler=$CC
8144   _LT_TAGVAR(compiler, $1)=$CC
8145   _LT_CC_BASENAME([$compiler])
8146   GCC=$G77
8147   if test -n "$compiler"; then
8148     AC_MSG_CHECKING([if libtool supports shared libraries])
8149     AC_MSG_RESULT([$can_build_shared])
8150
8151     AC_MSG_CHECKING([whether to build shared libraries])
8152     test "$can_build_shared" = "no" && enable_shared=no
8153
8154     # On AIX, shared libraries and static libraries use the same namespace, and
8155     # are all built from PIC.
8156     case $host_os in
8157       aix3*)
8158         test "$enable_shared" = yes && enable_static=no
8159         if test -n "$RANLIB"; then
8160           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8161           postinstall_cmds='$RANLIB $lib'
8162         fi
8163         ;;
8164       aix[[4-9]]*)
8165         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8166           test "$enable_shared" = yes && enable_static=no
8167         fi
8168         ;;
8169     esac
8170     AC_MSG_RESULT([$enable_shared])
8171
8172     AC_MSG_CHECKING([whether to build static libraries])
8173     # Make sure either enable_shared or enable_static is yes.
8174     test "$enable_shared" = yes || enable_static=yes
8175     AC_MSG_RESULT([$enable_static])
8176
8177     _LT_TAGVAR(GCC, $1)="$G77"
8178     _LT_TAGVAR(LD, $1)="$LD"
8179
8180     ## CAVEAT EMPTOR:
8181     ## There is no encapsulation within the following macros, do not change
8182     ## the running order or otherwise move them around unless you know exactly
8183     ## what you are doing...
8184     _LT_COMPILER_PIC($1)
8185     _LT_COMPILER_C_O($1)
8186     _LT_COMPILER_FILE_LOCKS($1)
8187     _LT_LINKER_SHLIBS($1)
8188     _LT_SYS_DYNAMIC_LINKER($1)
8189     _LT_LINKER_HARDCODE_LIBPATH($1)
8190
8191     _LT_CONFIG($1)
8192   fi # test -n "$compiler"
8193
8194   GCC=$lt_save_GCC
8195   CC="$lt_save_CC"
8196   CFLAGS="$lt_save_CFLAGS"
8197 fi # test "$_lt_disable_F77" != yes
8198
8199 AC_LANG_POP
8200 ])# _LT_LANG_F77_CONFIG
8201
8202
8203 # _LT_LANG_FC_CONFIG([TAG])
8204 # -------------------------
8205 # Ensure that the configuration variables for a Fortran compiler are
8206 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8207 # to write the compiler configuration to `libtool'.
8208 m4_defun([_LT_LANG_FC_CONFIG],
8209 [AC_LANG_PUSH(Fortran)
8210
8211 if test -z "$FC" || test "X$FC" = "Xno"; then
8212   _lt_disable_FC=yes
8213 fi
8214
8215 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8216 _LT_TAGVAR(allow_undefined_flag, $1)=
8217 _LT_TAGVAR(always_export_symbols, $1)=no
8218 _LT_TAGVAR(archive_expsym_cmds, $1)=
8219 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8220 _LT_TAGVAR(hardcode_direct, $1)=no
8221 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8222 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8223 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8224 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8225 _LT_TAGVAR(hardcode_minus_L, $1)=no
8226 _LT_TAGVAR(hardcode_automatic, $1)=no
8227 _LT_TAGVAR(inherit_rpath, $1)=no
8228 _LT_TAGVAR(module_cmds, $1)=
8229 _LT_TAGVAR(module_expsym_cmds, $1)=
8230 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8231 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8232 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8233 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8234 _LT_TAGVAR(no_undefined_flag, $1)=
8235 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8236 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8237
8238 # Source file extension for fc test sources.
8239 ac_ext=${ac_fc_srcext-f}
8240
8241 # Object file extension for compiled fc test sources.
8242 objext=o
8243 _LT_TAGVAR(objext, $1)=$objext
8244
8245 # No sense in running all these tests if we already determined that
8246 # the FC compiler isn't working.  Some variables (like enable_shared)
8247 # are currently assumed to apply to all compilers on this platform,
8248 # and will be corrupted by setting them based on a non-working compiler.
8249 if test "$_lt_disable_FC" != yes; then
8250   # Code to be used in simple compile tests
8251   lt_simple_compile_test_code="\
8252       subroutine t
8253       return
8254       end
8255 "
8256
8257   # Code to be used in simple link tests
8258   lt_simple_link_test_code="\
8259       program t
8260       end
8261 "
8262
8263   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8264   _LT_TAG_COMPILER
8265
8266   # save warnings/boilerplate of simple test code
8267   _LT_COMPILER_BOILERPLATE
8268   _LT_LINKER_BOILERPLATE
8269
8270   # Allow CC to be a program name with arguments.
8271   lt_save_CC="$CC"
8272   lt_save_GCC=$GCC
8273   lt_save_CFLAGS=$CFLAGS
8274   CC=${FC-"f95"}
8275   CFLAGS=$FCFLAGS
8276   compiler=$CC
8277   GCC=$ac_cv_fc_compiler_gnu
8278
8279   _LT_TAGVAR(compiler, $1)=$CC
8280   _LT_CC_BASENAME([$compiler])
8281
8282   if test -n "$compiler"; then
8283     AC_MSG_CHECKING([if libtool supports shared libraries])
8284     AC_MSG_RESULT([$can_build_shared])
8285
8286     AC_MSG_CHECKING([whether to build shared libraries])
8287     test "$can_build_shared" = "no" && enable_shared=no
8288
8289     # On AIX, shared libraries and static libraries use the same namespace, and
8290     # are all built from PIC.
8291     case $host_os in
8292       aix3*)
8293         test "$enable_shared" = yes && enable_static=no
8294         if test -n "$RANLIB"; then
8295           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8296           postinstall_cmds='$RANLIB $lib'
8297         fi
8298         ;;
8299       aix[[4-9]]*)
8300         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8301           test "$enable_shared" = yes && enable_static=no
8302         fi
8303         ;;
8304     esac
8305     AC_MSG_RESULT([$enable_shared])
8306
8307     AC_MSG_CHECKING([whether to build static libraries])
8308     # Make sure either enable_shared or enable_static is yes.
8309     test "$enable_shared" = yes || enable_static=yes
8310     AC_MSG_RESULT([$enable_static])
8311
8312     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8313     _LT_TAGVAR(LD, $1)="$LD"
8314
8315     ## CAVEAT EMPTOR:
8316     ## There is no encapsulation within the following macros, do not change
8317     ## the running order or otherwise move them around unless you know exactly
8318     ## what you are doing...
8319     _LT_SYS_HIDDEN_LIBDEPS($1)
8320     _LT_COMPILER_PIC($1)
8321     _LT_COMPILER_C_O($1)
8322     _LT_COMPILER_FILE_LOCKS($1)
8323     _LT_LINKER_SHLIBS($1)
8324     _LT_SYS_DYNAMIC_LINKER($1)
8325     _LT_LINKER_HARDCODE_LIBPATH($1)
8326
8327     _LT_CONFIG($1)
8328   fi # test -n "$compiler"
8329
8330   GCC=$lt_save_GCC
8331   CC=$lt_save_CC
8332   CFLAGS=$lt_save_CFLAGS
8333 fi # test "$_lt_disable_FC" != yes
8334
8335 AC_LANG_POP
8336 ])# _LT_LANG_FC_CONFIG
8337
8338
8339 # _LT_LANG_GCJ_CONFIG([TAG])
8340 # --------------------------
8341 # Ensure that the configuration variables for the GNU Java Compiler compiler
8342 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8343 # to write the compiler configuration to `libtool'.
8344 m4_defun([_LT_LANG_GCJ_CONFIG],
8345 [AC_REQUIRE([LT_PROG_GCJ])dnl
8346 AC_LANG_SAVE
8347
8348 # Source file extension for Java test sources.
8349 ac_ext=java
8350
8351 # Object file extension for compiled Java test sources.
8352 objext=o
8353 _LT_TAGVAR(objext, $1)=$objext
8354
8355 # Code to be used in simple compile tests
8356 lt_simple_compile_test_code="class foo {}"
8357
8358 # Code to be used in simple link tests
8359 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8360
8361 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8362 _LT_TAG_COMPILER
8363
8364 # save warnings/boilerplate of simple test code
8365 _LT_COMPILER_BOILERPLATE
8366 _LT_LINKER_BOILERPLATE
8367
8368 # Allow CC to be a program name with arguments.
8369 lt_save_CC=$CC
8370 lt_save_CFLAGS=$CFLAGS
8371 lt_save_GCC=$GCC
8372 GCC=yes
8373 CC=${GCJ-"gcj"}
8374 CFLAGS=$GCJFLAGS
8375 compiler=$CC
8376 _LT_TAGVAR(compiler, $1)=$CC
8377 _LT_TAGVAR(LD, $1)="$LD"
8378 _LT_CC_BASENAME([$compiler])
8379
8380 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8381 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8382
8383 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8384 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8385 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8386
8387 if test -n "$compiler"; then
8388   _LT_COMPILER_NO_RTTI($1)
8389   _LT_COMPILER_PIC($1)
8390   _LT_COMPILER_C_O($1)
8391   _LT_COMPILER_FILE_LOCKS($1)
8392   _LT_LINKER_SHLIBS($1)
8393   _LT_LINKER_HARDCODE_LIBPATH($1)
8394
8395   _LT_CONFIG($1)
8396 fi
8397
8398 AC_LANG_RESTORE
8399
8400 GCC=$lt_save_GCC
8401 CC=$lt_save_CC
8402 CFLAGS=$lt_save_CFLAGS
8403 ])# _LT_LANG_GCJ_CONFIG
8404
8405
8406 # _LT_LANG_RC_CONFIG([TAG])
8407 # -------------------------
8408 # Ensure that the configuration variables for the Windows resource compiler
8409 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8410 # to write the compiler configuration to `libtool'.
8411 m4_defun([_LT_LANG_RC_CONFIG],
8412 [AC_REQUIRE([LT_PROG_RC])dnl
8413 AC_LANG_SAVE
8414
8415 # Source file extension for RC test sources.
8416 ac_ext=rc
8417
8418 # Object file extension for compiled RC test sources.
8419 objext=o
8420 _LT_TAGVAR(objext, $1)=$objext
8421
8422 # Code to be used in simple compile tests
8423 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8424
8425 # Code to be used in simple link tests
8426 lt_simple_link_test_code="$lt_simple_compile_test_code"
8427
8428 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8429 _LT_TAG_COMPILER
8430
8431 # save warnings/boilerplate of simple test code
8432 _LT_COMPILER_BOILERPLATE
8433 _LT_LINKER_BOILERPLATE
8434
8435 # Allow CC to be a program name with arguments.
8436 lt_save_CC="$CC"
8437 lt_save_CFLAGS=$CFLAGS
8438 lt_save_GCC=$GCC
8439 GCC=
8440 CC=${RC-"windres"}
8441 CFLAGS=
8442 compiler=$CC
8443 _LT_TAGVAR(compiler, $1)=$CC
8444 _LT_CC_BASENAME([$compiler])
8445 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8446
8447 if test -n "$compiler"; then
8448   :
8449   _LT_CONFIG($1)
8450 fi
8451
8452 GCC=$lt_save_GCC
8453 AC_LANG_RESTORE
8454 CC=$lt_save_CC
8455 CFLAGS=$lt_save_CFLAGS
8456 ])# _LT_LANG_RC_CONFIG
8457
8458
8459 # LT_PROG_GCJ
8460 # -----------
8461 AC_DEFUN([LT_PROG_GCJ],
8462 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8463   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8464     [AC_CHECK_TOOL(GCJ, gcj,)
8465       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8466       AC_SUBST(GCJFLAGS)])])[]dnl
8467 ])
8468
8469 # Old name:
8470 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8471 dnl aclocal-1.4 backwards compatibility:
8472 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8473
8474
8475 # LT_PROG_RC
8476 # ----------
8477 AC_DEFUN([LT_PROG_RC],
8478 [AC_CHECK_TOOL(RC, windres,)
8479 ])
8480
8481 # Old name:
8482 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8483 dnl aclocal-1.4 backwards compatibility:
8484 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8485
8486
8487 # _LT_DECL_EGREP
8488 # --------------
8489 # If we don't have a new enough Autoconf to choose the best grep
8490 # available, choose the one first in the user's PATH.
8491 m4_defun([_LT_DECL_EGREP],
8492 [AC_REQUIRE([AC_PROG_EGREP])dnl
8493 AC_REQUIRE([AC_PROG_FGREP])dnl
8494 test -z "$GREP" && GREP=grep
8495 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8496 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8497 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8498 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8499 AC_SUBST([GREP])
8500 ])
8501
8502
8503 # _LT_DECL_OBJDUMP
8504 # --------------
8505 # If we don't have a new enough Autoconf to choose the best objdump
8506 # available, choose the one first in the user's PATH.
8507 m4_defun([_LT_DECL_OBJDUMP],
8508 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8509 test -z "$OBJDUMP" && OBJDUMP=objdump
8510 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8511 AC_SUBST([OBJDUMP])
8512 ])
8513
8514 # _LT_DECL_DLLTOOL
8515 # ----------------
8516 # Ensure DLLTOOL variable is set.
8517 m4_defun([_LT_DECL_DLLTOOL],
8518 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8519 test -z "$DLLTOOL" && DLLTOOL=dlltool
8520 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8521 AC_SUBST([DLLTOOL])
8522 ])
8523
8524 # _LT_DECL_SED
8525 # ------------
8526 # Check for a fully-functional sed program, that truncates
8527 # as few characters as possible.  Prefer GNU sed if found.
8528 m4_defun([_LT_DECL_SED],
8529 [AC_PROG_SED
8530 test -z "$SED" && SED=sed
8531 Xsed="$SED -e 1s/^X//"
8532 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8533 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8534     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8535 ])# _LT_DECL_SED
8536
8537 m4_ifndef([AC_PROG_SED], [
8538 # NOTE: This macro has been submitted for inclusion into   #
8539 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8540 #  a released version of Autoconf we should remove this    #
8541 #  macro and use it instead.                               #
8542
8543 m4_defun([AC_PROG_SED],
8544 [AC_MSG_CHECKING([for a sed that does not truncate output])
8545 AC_CACHE_VAL(lt_cv_path_SED,
8546 [# Loop through the user's path and test for sed and gsed.
8547 # Then use that list of sed's as ones to test for truncation.
8548 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8549 for as_dir in $PATH
8550 do
8551   IFS=$as_save_IFS
8552   test -z "$as_dir" && as_dir=.
8553   for lt_ac_prog in sed gsed; do
8554     for ac_exec_ext in '' $ac_executable_extensions; do
8555       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8556         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8557       fi
8558     done
8559   done
8560 done
8561 IFS=$as_save_IFS
8562 lt_ac_max=0
8563 lt_ac_count=0
8564 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8565 # along with /bin/sed that truncates output.
8566 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8567   test ! -f $lt_ac_sed && continue
8568   cat /dev/null > conftest.in
8569   lt_ac_count=0
8570   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8571   # Check for GNU sed and select it if it is found.
8572   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8573     lt_cv_path_SED=$lt_ac_sed
8574     break
8575   fi
8576   while true; do
8577     cat conftest.in conftest.in >conftest.tmp
8578     mv conftest.tmp conftest.in
8579     cp conftest.in conftest.nl
8580     echo >>conftest.nl
8581     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8582     cmp -s conftest.out conftest.nl || break
8583     # 10000 chars as input seems more than enough
8584     test $lt_ac_count -gt 10 && break
8585     lt_ac_count=`expr $lt_ac_count + 1`
8586     if test $lt_ac_count -gt $lt_ac_max; then
8587       lt_ac_max=$lt_ac_count
8588       lt_cv_path_SED=$lt_ac_sed
8589     fi
8590   done
8591 done
8592 ])
8593 SED=$lt_cv_path_SED
8594 AC_SUBST([SED])
8595 AC_MSG_RESULT([$SED])
8596 ])#AC_PROG_SED
8597 ])#m4_ifndef
8598
8599 # Old name:
8600 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8601 dnl aclocal-1.4 backwards compatibility:
8602 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8603
8604
8605 # _LT_CHECK_SHELL_FEATURES
8606 # ------------------------
8607 # Find out whether the shell is Bourne or XSI compatible,
8608 # or has some other useful features.
8609 m4_defun([_LT_CHECK_SHELL_FEATURES],
8610 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8611 # Try some XSI features
8612 xsi_shell=no
8613 ( _lt_dummy="a/b/c"
8614   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8615       = c,a/b,b/c, \
8616     && eval 'test $(( 1 + 1 )) -eq 2 \
8617     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8618   && xsi_shell=yes
8619 AC_MSG_RESULT([$xsi_shell])
8620 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8621
8622 AC_MSG_CHECKING([whether the shell understands "+="])
8623 lt_shell_append=no
8624 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8625     >/dev/null 2>&1 \
8626   && lt_shell_append=yes
8627 AC_MSG_RESULT([$lt_shell_append])
8628 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8629
8630 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8631   lt_unset=unset
8632 else
8633   lt_unset=false
8634 fi
8635 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8636
8637 # test EBCDIC or ASCII
8638 case `echo X|tr X '\101'` in
8639  A) # ASCII based system
8640     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8641   lt_SP2NL='tr \040 \012'
8642   lt_NL2SP='tr \015\012 \040\040'
8643   ;;
8644  *) # EBCDIC based system
8645   lt_SP2NL='tr \100 \n'
8646   lt_NL2SP='tr \r\n \100\100'
8647   ;;
8648 esac
8649 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8650 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8651 ])# _LT_CHECK_SHELL_FEATURES
8652
8653
8654 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8655 # ------------------------------------------------------
8656 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8657 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8658 m4_defun([_LT_PROG_FUNCTION_REPLACE],
8659 [dnl {
8660 sed -e '/^$1 ()$/,/^} # $1 /c\
8661 $1 ()\
8662 {\
8663 m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
8664 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8665   && mv -f "$cfgfile.tmp" "$cfgfile" \
8666     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8667 test 0 -eq $? || _lt_function_replace_fail=:
8668 ])
8669
8670
8671 # _LT_PROG_REPLACE_SHELLFNS
8672 # -------------------------
8673 # Replace existing portable implementations of several shell functions with
8674 # equivalent extended shell implementations where those features are available..
8675 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8676 [if test x"$xsi_shell" = xyes; then
8677   _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8678     case ${1} in
8679       */*) func_dirname_result="${1%/*}${2}" ;;
8680       *  ) func_dirname_result="${3}" ;;
8681     esac])
8682
8683   _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8684     func_basename_result="${1##*/}"])
8685
8686   _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8687     case ${1} in
8688       */*) func_dirname_result="${1%/*}${2}" ;;
8689       *  ) func_dirname_result="${3}" ;;
8690     esac
8691     func_basename_result="${1##*/}"])
8692
8693   _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8694     # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8695     # positional parameters, so assign one to ordinary parameter first.
8696     func_stripname_result=${3}
8697     func_stripname_result=${func_stripname_result#"${1}"}
8698     func_stripname_result=${func_stripname_result%"${2}"}])
8699
8700   _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8701     func_split_long_opt_name=${1%%=*}
8702     func_split_long_opt_arg=${1#*=}])
8703
8704   _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8705     func_split_short_opt_arg=${1#??}
8706     func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8707
8708   _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8709     case ${1} in
8710       *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8711       *)    func_lo2o_result=${1} ;;
8712     esac])
8713
8714   _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
8715
8716   _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
8717
8718   _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
8719 fi
8720
8721 if test x"$lt_shell_append" = xyes; then
8722   _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
8723
8724   _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8725     func_quote_for_eval "${2}"
8726 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8727     eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8728
8729   # Save a `func_append' function call where possible by direct use of '+='
8730   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8731     && mv -f "$cfgfile.tmp" "$cfgfile" \
8732       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8733   test 0 -eq $? || _lt_function_replace_fail=:
8734 else
8735   # Save a `func_append' function call even when '+=' is not available
8736   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8737     && mv -f "$cfgfile.tmp" "$cfgfile" \
8738       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8739   test 0 -eq $? || _lt_function_replace_fail=:
8740 fi
8741
8742 if test x"$_lt_function_replace_fail" = x":"; then
8743   AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8744 fi
8745 ])
8746
8747 # _LT_PATH_CONVERSION_FUNCTIONS
8748 # -----------------------------
8749 # Determine which file name conversion functions should be used by
8750 # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8751 # for certain cross-compile configurations and native mingw.
8752 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8753 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8754 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8755 AC_MSG_CHECKING([how to convert $build file names to $host format])
8756 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8757 [case $host in
8758   *-*-mingw* )
8759     case $build in
8760       *-*-mingw* ) # actually msys
8761         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8762         ;;
8763       *-*-cygwin* )
8764         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8765         ;;
8766       * ) # otherwise, assume *nix
8767         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8768         ;;
8769     esac
8770     ;;
8771   *-*-cygwin* )
8772     case $build in
8773       *-*-mingw* ) # actually msys
8774         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8775         ;;
8776       *-*-cygwin* )
8777         lt_cv_to_host_file_cmd=func_convert_file_noop
8778         ;;
8779       * ) # otherwise, assume *nix
8780         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8781         ;;
8782     esac
8783     ;;
8784   * ) # unhandled hosts (and "normal" native builds)
8785     lt_cv_to_host_file_cmd=func_convert_file_noop
8786     ;;
8787 esac
8788 ])
8789 to_host_file_cmd=$lt_cv_to_host_file_cmd
8790 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8791 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8792          [0], [convert $build file names to $host format])dnl
8793
8794 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8795 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8796 [#assume ordinary cross tools, or native build.
8797 lt_cv_to_tool_file_cmd=func_convert_file_noop
8798 case $host in
8799   *-*-mingw* )
8800     case $build in
8801       *-*-mingw* ) # actually msys
8802         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8803         ;;
8804     esac
8805     ;;
8806 esac
8807 ])
8808 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8809 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8810 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8811          [0], [convert $build files to toolchain format])dnl
8812 ])# _LT_PATH_CONVERSION_FUNCTIONS
8813
8814 # Helper functions for option handling.                    -*- Autoconf -*-
8815 #
8816 #   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8817 #   Inc.
8818 #   Written by Gary V. Vaughan, 2004
8819 #
8820 # This file is free software; the Free Software Foundation gives
8821 # unlimited permission to copy and/or distribute it, with or without
8822 # modifications, as long as this notice is preserved.
8823
8824 # serial 7 ltoptions.m4
8825
8826 # This is to help aclocal find these macros, as it can't see m4_define.
8827 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8828
8829
8830 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8831 # ------------------------------------------
8832 m4_define([_LT_MANGLE_OPTION],
8833 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8834
8835
8836 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8837 # ---------------------------------------
8838 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8839 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8840 # saved as a flag.
8841 m4_define([_LT_SET_OPTION],
8842 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8843 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8844         _LT_MANGLE_DEFUN([$1], [$2]),
8845     [m4_warning([Unknown $1 option `$2'])])[]dnl
8846 ])
8847
8848
8849 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8850 # ------------------------------------------------------------
8851 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8852 m4_define([_LT_IF_OPTION],
8853 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8854
8855
8856 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8857 # -------------------------------------------------------
8858 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8859 # are set.
8860 m4_define([_LT_UNLESS_OPTIONS],
8861 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8862             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8863                       [m4_define([$0_found])])])[]dnl
8864 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8865 ])[]dnl
8866 ])
8867
8868
8869 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8870 # ----------------------------------------
8871 # OPTION-LIST is a space-separated list of Libtool options associated
8872 # with MACRO-NAME.  If any OPTION has a matching handler declared with
8873 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8874 # the unknown option and exit.
8875 m4_defun([_LT_SET_OPTIONS],
8876 [# Set options
8877 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8878     [_LT_SET_OPTION([$1], _LT_Option)])
8879
8880 m4_if([$1],[LT_INIT],[
8881   dnl
8882   dnl Simply set some default values (i.e off) if boolean options were not
8883   dnl specified:
8884   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8885   ])
8886   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8887   ])
8888   dnl
8889   dnl If no reference was made to various pairs of opposing options, then
8890   dnl we run the default mode handler for the pair.  For example, if neither
8891   dnl `shared' nor `disable-shared' was passed, we enable building of shared
8892   dnl archives by default:
8893   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8894   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8895   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8896   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8897                    [_LT_ENABLE_FAST_INSTALL])
8898   ])
8899 ])# _LT_SET_OPTIONS
8900
8901
8902
8903 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8904 # -----------------------------------------
8905 m4_define([_LT_MANGLE_DEFUN],
8906 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8907
8908
8909 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8910 # -----------------------------------------------
8911 m4_define([LT_OPTION_DEFINE],
8912 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8913 ])# LT_OPTION_DEFINE
8914
8915
8916 # dlopen
8917 # ------
8918 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8919 ])
8920
8921 AU_DEFUN([AC_LIBTOOL_DLOPEN],
8922 [_LT_SET_OPTION([LT_INIT], [dlopen])
8923 AC_DIAGNOSE([obsolete],
8924 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8925 put the `dlopen' option into LT_INIT's first parameter.])
8926 ])
8927
8928 dnl aclocal-1.4 backwards compatibility:
8929 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8930
8931
8932 # win32-dll
8933 # ---------
8934 # Declare package support for building win32 dll's.
8935 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8936 [enable_win32_dll=yes
8937
8938 case $host in
8939 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8940   AC_CHECK_TOOL(AS, as, false)
8941   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8942   AC_CHECK_TOOL(OBJDUMP, objdump, false)
8943   ;;
8944 esac
8945
8946 test -z "$AS" && AS=as
8947 _LT_DECL([], [AS],      [1], [Assembler program])dnl
8948
8949 test -z "$DLLTOOL" && DLLTOOL=dlltool
8950 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8951
8952 test -z "$OBJDUMP" && OBJDUMP=objdump
8953 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8954 ])# win32-dll
8955
8956 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8957 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8958 _LT_SET_OPTION([LT_INIT], [win32-dll])
8959 AC_DIAGNOSE([obsolete],
8960 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8961 put the `win32-dll' option into LT_INIT's first parameter.])
8962 ])
8963
8964 dnl aclocal-1.4 backwards compatibility:
8965 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8966
8967
8968 # _LT_ENABLE_SHARED([DEFAULT])
8969 # ----------------------------
8970 # implement the --enable-shared flag, and supports the `shared' and
8971 # `disable-shared' LT_INIT options.
8972 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8973 m4_define([_LT_ENABLE_SHARED],
8974 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8975 AC_ARG_ENABLE([shared],
8976     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8977         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8978     [p=${PACKAGE-default}
8979     case $enableval in
8980     yes) enable_shared=yes ;;
8981     no) enable_shared=no ;;
8982     *)
8983       enable_shared=no
8984       # Look at the argument we got.  We use all the common list separators.
8985       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8986       for pkg in $enableval; do
8987         IFS="$lt_save_ifs"
8988         if test "X$pkg" = "X$p"; then
8989           enable_shared=yes
8990         fi
8991       done
8992       IFS="$lt_save_ifs"
8993       ;;
8994     esac],
8995     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8996
8997     _LT_DECL([build_libtool_libs], [enable_shared], [0],
8998         [Whether or not to build shared libraries])
8999 ])# _LT_ENABLE_SHARED
9000
9001 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9002 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9003
9004 # Old names:
9005 AC_DEFUN([AC_ENABLE_SHARED],
9006 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9007 ])
9008
9009 AC_DEFUN([AC_DISABLE_SHARED],
9010 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9011 ])
9012
9013 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9014 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9015
9016 dnl aclocal-1.4 backwards compatibility:
9017 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9018 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9019
9020
9021
9022 # _LT_ENABLE_STATIC([DEFAULT])
9023 # ----------------------------
9024 # implement the --enable-static flag, and support the `static' and
9025 # `disable-static' LT_INIT options.
9026 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9027 m4_define([_LT_ENABLE_STATIC],
9028 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9029 AC_ARG_ENABLE([static],
9030     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9031         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9032     [p=${PACKAGE-default}
9033     case $enableval in
9034     yes) enable_static=yes ;;
9035     no) enable_static=no ;;
9036     *)
9037      enable_static=no
9038       # Look at the argument we got.  We use all the common list separators.
9039       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9040       for pkg in $enableval; do
9041         IFS="$lt_save_ifs"
9042         if test "X$pkg" = "X$p"; then
9043           enable_static=yes
9044         fi
9045       done
9046       IFS="$lt_save_ifs"
9047       ;;
9048     esac],
9049     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9050
9051     _LT_DECL([build_old_libs], [enable_static], [0],
9052         [Whether or not to build static libraries])
9053 ])# _LT_ENABLE_STATIC
9054
9055 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9056 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9057
9058 # Old names:
9059 AC_DEFUN([AC_ENABLE_STATIC],
9060 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9061 ])
9062
9063 AC_DEFUN([AC_DISABLE_STATIC],
9064 [_LT_SET_OPTION([LT_INIT], [disable-static])
9065 ])
9066
9067 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9068 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9069
9070 dnl aclocal-1.4 backwards compatibility:
9071 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9072 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9073
9074
9075
9076 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9077 # ----------------------------------
9078 # implement the --enable-fast-install flag, and support the `fast-install'
9079 # and `disable-fast-install' LT_INIT options.
9080 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9081 m4_define([_LT_ENABLE_FAST_INSTALL],
9082 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9083 AC_ARG_ENABLE([fast-install],
9084     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9085     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9086     [p=${PACKAGE-default}
9087     case $enableval in
9088     yes) enable_fast_install=yes ;;
9089     no) enable_fast_install=no ;;
9090     *)
9091       enable_fast_install=no
9092       # Look at the argument we got.  We use all the common list separators.
9093       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9094       for pkg in $enableval; do
9095         IFS="$lt_save_ifs"
9096         if test "X$pkg" = "X$p"; then
9097           enable_fast_install=yes
9098         fi
9099       done
9100       IFS="$lt_save_ifs"
9101       ;;
9102     esac],
9103     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9104
9105 _LT_DECL([fast_install], [enable_fast_install], [0],
9106          [Whether or not to optimize for fast installation])dnl
9107 ])# _LT_ENABLE_FAST_INSTALL
9108
9109 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9110 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9111
9112 # Old names:
9113 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9114 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9115 AC_DIAGNOSE([obsolete],
9116 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9117 the `fast-install' option into LT_INIT's first parameter.])
9118 ])
9119
9120 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9121 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9122 AC_DIAGNOSE([obsolete],
9123 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9124 the `disable-fast-install' option into LT_INIT's first parameter.])
9125 ])
9126
9127 dnl aclocal-1.4 backwards compatibility:
9128 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9129 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9130
9131
9132 # _LT_WITH_PIC([MODE])
9133 # --------------------
9134 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9135 # LT_INIT options.
9136 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9137 m4_define([_LT_WITH_PIC],
9138 [AC_ARG_WITH([pic],
9139     [AS_HELP_STRING([--with-pic],
9140         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9141     [pic_mode="$withval"],
9142     [pic_mode=default])
9143
9144 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9145
9146 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9147 ])# _LT_WITH_PIC
9148
9149 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9150 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9151
9152 # Old name:
9153 AU_DEFUN([AC_LIBTOOL_PICMODE],
9154 [_LT_SET_OPTION([LT_INIT], [pic-only])
9155 AC_DIAGNOSE([obsolete],
9156 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9157 put the `pic-only' option into LT_INIT's first parameter.])
9158 ])
9159
9160 dnl aclocal-1.4 backwards compatibility:
9161 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9162
9163
9164 m4_define([_LTDL_MODE], [])
9165 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9166                  [m4_define([_LTDL_MODE], [nonrecursive])])
9167 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9168                  [m4_define([_LTDL_MODE], [recursive])])
9169 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9170                  [m4_define([_LTDL_MODE], [subproject])])
9171
9172 m4_define([_LTDL_TYPE], [])
9173 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9174                  [m4_define([_LTDL_TYPE], [installable])])
9175 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9176                  [m4_define([_LTDL_TYPE], [convenience])])
9177
9178 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9179 #
9180 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9181 # Written by Gary V. Vaughan, 2004
9182 #
9183 # This file is free software; the Free Software Foundation gives
9184 # unlimited permission to copy and/or distribute it, with or without
9185 # modifications, as long as this notice is preserved.
9186
9187 # serial 6 ltsugar.m4
9188
9189 # This is to help aclocal find these macros, as it can't see m4_define.
9190 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9191
9192
9193 # lt_join(SEP, ARG1, [ARG2...])
9194 # -----------------------------
9195 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9196 # associated separator.
9197 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9198 # versions in m4sugar had bugs.
9199 m4_define([lt_join],
9200 [m4_if([$#], [1], [],
9201        [$#], [2], [[$2]],
9202        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9203 m4_define([_lt_join],
9204 [m4_if([$#$2], [2], [],
9205        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9206
9207
9208 # lt_car(LIST)
9209 # lt_cdr(LIST)
9210 # ------------
9211 # Manipulate m4 lists.
9212 # These macros are necessary as long as will still need to support
9213 # Autoconf-2.59 which quotes differently.
9214 m4_define([lt_car], [[$1]])
9215 m4_define([lt_cdr],
9216 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9217        [$#], 1, [],
9218        [m4_dquote(m4_shift($@))])])
9219 m4_define([lt_unquote], $1)
9220
9221
9222 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9223 # ------------------------------------------
9224 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9225 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9226 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9227 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9228 # than defined and empty).
9229 #
9230 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9231 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9232 m4_define([lt_append],
9233 [m4_define([$1],
9234            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9235
9236
9237
9238 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9239 # ----------------------------------------------------------
9240 # Produce a SEP delimited list of all paired combinations of elements of
9241 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9242 # has the form PREFIXmINFIXSUFFIXn.
9243 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9244 m4_define([lt_combine],
9245 [m4_if(m4_eval([$# > 3]), [1],
9246        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9247 [[m4_foreach([_Lt_prefix], [$2],
9248              [m4_foreach([_Lt_suffix],
9249                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9250         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9251
9252
9253 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9254 # -----------------------------------------------------------------------
9255 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9256 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9257 m4_define([lt_if_append_uniq],
9258 [m4_ifdef([$1],
9259           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9260                  [lt_append([$1], [$2], [$3])$4],
9261                  [$5])],
9262           [lt_append([$1], [$2], [$3])$4])])
9263
9264
9265 # lt_dict_add(DICT, KEY, VALUE)
9266 # -----------------------------
9267 m4_define([lt_dict_add],
9268 [m4_define([$1($2)], [$3])])
9269
9270
9271 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9272 # --------------------------------------------
9273 m4_define([lt_dict_add_subkey],
9274 [m4_define([$1($2:$3)], [$4])])
9275
9276
9277 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9278 # ----------------------------------
9279 m4_define([lt_dict_fetch],
9280 [m4_ifval([$3],
9281         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9282     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9283
9284
9285 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9286 # -----------------------------------------------------------------
9287 m4_define([lt_if_dict_fetch],
9288 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9289         [$5],
9290     [$6])])
9291
9292
9293 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9294 # --------------------------------------------------------------
9295 m4_define([lt_dict_filter],
9296 [m4_if([$5], [], [],
9297   [lt_join(m4_quote(m4_default([$4], [[, ]])),
9298            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9299                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9300 ])
9301
9302 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
9303 #
9304 #   Copyright (C) 2004 Free Software Foundation, Inc.
9305 #   Written by Scott James Remnant, 2004
9306 #
9307 # This file is free software; the Free Software Foundation gives
9308 # unlimited permission to copy and/or distribute it, with or without
9309 # modifications, as long as this notice is preserved.
9310
9311 # @configure_input@
9312
9313 # serial 3293 ltversion.m4
9314 # This file is part of GNU Libtool
9315
9316 m4_define([LT_PACKAGE_VERSION], [2.4])
9317 m4_define([LT_PACKAGE_REVISION], [1.3293])
9318
9319 AC_DEFUN([LTVERSION_VERSION],
9320 [macro_version='2.4'
9321 macro_revision='1.3293'
9322 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9323 _LT_DECL(, macro_revision, 0)
9324 ])
9325
9326 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9327 #
9328 #   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9329 #   Written by Scott James Remnant, 2004.
9330 #
9331 # This file is free software; the Free Software Foundation gives
9332 # unlimited permission to copy and/or distribute it, with or without
9333 # modifications, as long as this notice is preserved.
9334
9335 # serial 5 lt~obsolete.m4
9336
9337 # These exist entirely to fool aclocal when bootstrapping libtool.
9338 #
9339 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9340 # which have later been changed to m4_define as they aren't part of the
9341 # exported API, or moved to Autoconf or Automake where they belong.
9342 #
9343 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9344 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9345 # using a macro with the same name in our local m4/libtool.m4 it'll
9346 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9347 # and doesn't know about Autoconf macros at all.)
9348 #
9349 # So we provide this file, which has a silly filename so it's always
9350 # included after everything else.  This provides aclocal with the
9351 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9352 # because those macros already exist, or will be overwritten later.
9353 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9354 #
9355 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9356 # Yes, that means every name once taken will need to remain here until
9357 # we give up compatibility with versions before 1.7, at which point
9358 # we need to keep only those names which we still refer to.
9359
9360 # This is to help aclocal find these macros, as it can't see m4_define.
9361 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9362
9363 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9364 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
9365 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9366 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
9367 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9368 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
9369 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
9370 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9371 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
9372 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9373 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
9374 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9375 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9376 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9377 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9378 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9379 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
9380 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9381 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9382 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
9383 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
9384 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9385 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9386 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9387 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9388 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9389 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9390 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9391 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
9392 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
9393 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
9394 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9395 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9396 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
9397 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
9398 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9399 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9400 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
9401 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9402 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
9403 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
9404 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
9405 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9406 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9407 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9408 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9409 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9410 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9411 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9412 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9413 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9414 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9415 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9416 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9417 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9418 m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9419 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9420 m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9421 m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
9422 m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
9423 m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
9424
9425 # nls.m4 serial 5 (gettext-0.18)
9426 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
9427 dnl Inc.
9428 dnl This file is free software; the Free Software Foundation
9429 dnl gives unlimited permission to copy and/or distribute it,
9430 dnl with or without modifications, as long as this notice is preserved.
9431 dnl
9432 dnl This file can can be used in projects which are not available under
9433 dnl the GNU General Public License or the GNU Library General Public
9434 dnl License but which still want to provide support for the GNU gettext
9435 dnl functionality.
9436 dnl Please note that the actual code of the GNU gettext library is covered
9437 dnl by the GNU Library General Public License, and the rest of the GNU
9438 dnl gettext package package is covered by the GNU General Public License.
9439 dnl They are *not* in the public domain.
9440
9441 dnl Authors:
9442 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9443 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9444
9445 AC_PREREQ([2.50])
9446
9447 AC_DEFUN([AM_NLS],
9448 [
9449   AC_MSG_CHECKING([whether NLS is requested])
9450   dnl Default is enabled NLS
9451   AC_ARG_ENABLE([nls],
9452     [  --disable-nls           do not use Native Language Support],
9453     USE_NLS=$enableval, USE_NLS=yes)
9454   AC_MSG_RESULT([$USE_NLS])
9455   AC_SUBST([USE_NLS])
9456 ])
9457
9458 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9459 # serial 1 (pkg-config-0.24)
9460
9461 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
9462 #
9463 # This program is free software; you can redistribute it and/or modify
9464 # it under the terms of the GNU General Public License as published by
9465 # the Free Software Foundation; either version 2 of the License, or
9466 # (at your option) any later version.
9467 #
9468 # This program is distributed in the hope that it will be useful, but
9469 # WITHOUT ANY WARRANTY; without even the implied warranty of
9470 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9471 # General Public License for more details.
9472 #
9473 # You should have received a copy of the GNU General Public License
9474 # along with this program; if not, write to the Free Software
9475 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9476 #
9477 # As a special exception to the GNU General Public License, if you
9478 # distribute this file as part of a program that contains a
9479 # configuration script generated by Autoconf, you may include it under
9480 # the same distribution terms that you use for the rest of that program.
9481
9482 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9483 # ----------------------------------
9484 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9485 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9486 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9487 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9488 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9489 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9490
9491 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9492         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9493 fi
9494 if test -n "$PKG_CONFIG"; then
9495         _pkg_min_version=m4_default([$1], [0.9.0])
9496         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9497         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9498                 AC_MSG_RESULT([yes])
9499         else
9500                 AC_MSG_RESULT([no])
9501                 PKG_CONFIG=""
9502         fi
9503 fi[]dnl
9504 ])# PKG_PROG_PKG_CONFIG
9505
9506 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9507 #
9508 # Check to see whether a particular set of modules exists.  Similar
9509 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9510 #
9511 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9512 # only at the first occurence in configure.ac, so if the first place
9513 # it's called might be skipped (such as if it is within an "if", you
9514 # have to call PKG_CHECK_EXISTS manually
9515 # --------------------------------------------------------------
9516 AC_DEFUN([PKG_CHECK_EXISTS],
9517 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9518 if test -n "$PKG_CONFIG" && \
9519     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9520   m4_default([$2], [:])
9521 m4_ifvaln([$3], [else
9522   $3])dnl
9523 fi])
9524
9525 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9526 # ---------------------------------------------
9527 m4_define([_PKG_CONFIG],
9528 [if test -n "$$1"; then
9529     pkg_cv_[]$1="$$1"
9530  elif test -n "$PKG_CONFIG"; then
9531     PKG_CHECK_EXISTS([$3],
9532                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9533                      [pkg_failed=yes])
9534  else
9535     pkg_failed=untried
9536 fi[]dnl
9537 ])# _PKG_CONFIG
9538
9539 # _PKG_SHORT_ERRORS_SUPPORTED
9540 # -----------------------------
9541 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9542 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9543 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9544         _pkg_short_errors_supported=yes
9545 else
9546         _pkg_short_errors_supported=no
9547 fi[]dnl
9548 ])# _PKG_SHORT_ERRORS_SUPPORTED
9549
9550
9551 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9552 # [ACTION-IF-NOT-FOUND])
9553 #
9554 #
9555 # Note that if there is a possibility the first call to
9556 # PKG_CHECK_MODULES might not happen, you should be sure to include an
9557 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9558 #
9559 #
9560 # --------------------------------------------------------------
9561 AC_DEFUN([PKG_CHECK_MODULES],
9562 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9563 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9564 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9565
9566 pkg_failed=no
9567 AC_MSG_CHECKING([for $1])
9568
9569 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9570 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
9571
9572 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9573 and $1[]_LIBS to avoid the need to call pkg-config.
9574 See the pkg-config man page for more details.])
9575
9576 if test $pkg_failed = yes; then
9577         AC_MSG_RESULT([no])
9578         _PKG_SHORT_ERRORS_SUPPORTED
9579         if test $_pkg_short_errors_supported = yes; then
9580                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
9581         else 
9582                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
9583         fi
9584         # Put the nasty error message in config.log where it belongs
9585         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9586
9587         m4_default([$4], [AC_MSG_ERROR(
9588 [Package requirements ($2) were not met:
9589
9590 $$1_PKG_ERRORS
9591
9592 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9593 installed software in a non-standard prefix.
9594
9595 _PKG_TEXT])
9596         ])
9597 elif test $pkg_failed = untried; then
9598         AC_MSG_RESULT([no])
9599         m4_default([$4], [AC_MSG_FAILURE(
9600 [The pkg-config script could not be found or is too old.  Make sure it
9601 is in your PATH or set the PKG_CONFIG environment variable to the full
9602 path to pkg-config.
9603
9604 _PKG_TEXT
9605
9606 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
9607         ])
9608 else
9609         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9610         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9611         AC_MSG_RESULT([yes])
9612         $3
9613 fi[]dnl
9614 ])# PKG_CHECK_MODULES
9615
9616 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
9617 #
9618 # This file is free software; the Free Software Foundation
9619 # gives unlimited permission to copy and/or distribute it,
9620 # with or without modifications, as long as this notice is preserved.
9621
9622 # AM_AUTOMAKE_VERSION(VERSION)
9623 # ----------------------------
9624 # Automake X.Y traces this macro to ensure aclocal.m4 has been
9625 # generated from the m4 files accompanying Automake X.Y.
9626 # (This private macro should not be called outside this file.)
9627 AC_DEFUN([AM_AUTOMAKE_VERSION],
9628 [am__api_version='1.11'
9629 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9630 dnl require some minimum version.  Point them to the right macro.
9631 m4_if([$1], [1.11.1], [],
9632       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9633 ])
9634
9635 # _AM_AUTOCONF_VERSION(VERSION)
9636 # -----------------------------
9637 # aclocal traces this macro to find the Autoconf version.
9638 # This is a private macro too.  Using m4_define simplifies
9639 # the logic in aclocal, which can simply ignore this definition.
9640 m4_define([_AM_AUTOCONF_VERSION], [])
9641
9642 # AM_SET_CURRENT_AUTOMAKE_VERSION
9643 # -------------------------------
9644 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9645 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9646 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9647 [AM_AUTOMAKE_VERSION([1.11.1])dnl
9648 m4_ifndef([AC_AUTOCONF_VERSION],
9649   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9650 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9651
9652 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
9653
9654 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9655 #
9656 # This file is free software; the Free Software Foundation
9657 # gives unlimited permission to copy and/or distribute it,
9658 # with or without modifications, as long as this notice is preserved.
9659
9660 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9661 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
9662 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9663 #
9664 # Of course, Automake must honor this variable whenever it calls a
9665 # tool from the auxiliary directory.  The problem is that $srcdir (and
9666 # therefore $ac_aux_dir as well) can be either absolute or relative,
9667 # depending on how configure is run.  This is pretty annoying, since
9668 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
9669 # source directory, any form will work fine, but in subdirectories a
9670 # relative path needs to be adjusted first.
9671 #
9672 # $ac_aux_dir/missing
9673 #    fails when called from a subdirectory if $ac_aux_dir is relative
9674 # $top_srcdir/$ac_aux_dir/missing
9675 #    fails if $ac_aux_dir is absolute,
9676 #    fails when called from a subdirectory in a VPATH build with
9677 #          a relative $ac_aux_dir
9678 #
9679 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9680 # are both prefixed by $srcdir.  In an in-source build this is usually
9681 # harmless because $srcdir is `.', but things will broke when you
9682 # start a VPATH build or use an absolute $srcdir.
9683 #
9684 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9685 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9686 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9687 # and then we would define $MISSING as
9688 #   MISSING="\${SHELL} $am_aux_dir/missing"
9689 # This will work as long as MISSING is not called from configure, because
9690 # unfortunately $(top_srcdir) has no meaning in configure.
9691 # However there are other variables, like CC, which are often used in
9692 # configure, and could therefore not use this "fixed" $ac_aux_dir.
9693 #
9694 # Another solution, used here, is to always expand $ac_aux_dir to an
9695 # absolute PATH.  The drawback is that using absolute paths prevent a
9696 # configured tree to be moved without reconfiguration.
9697
9698 AC_DEFUN([AM_AUX_DIR_EXPAND],
9699 [dnl Rely on autoconf to set up CDPATH properly.
9700 AC_PREREQ([2.50])dnl
9701 # expand $ac_aux_dir to an absolute path
9702 am_aux_dir=`cd $ac_aux_dir && pwd`
9703 ])
9704
9705 # AM_CONDITIONAL                                            -*- Autoconf -*-
9706
9707 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9708 # Free Software Foundation, Inc.
9709 #
9710 # This file is free software; the Free Software Foundation
9711 # gives unlimited permission to copy and/or distribute it,
9712 # with or without modifications, as long as this notice is preserved.
9713
9714 # serial 9
9715
9716 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
9717 # -------------------------------------
9718 # Define a conditional.
9719 AC_DEFUN([AM_CONDITIONAL],
9720 [AC_PREREQ(2.52)dnl
9721  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
9722         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9723 AC_SUBST([$1_TRUE])dnl
9724 AC_SUBST([$1_FALSE])dnl
9725 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
9726 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
9727 m4_define([_AM_COND_VALUE_$1], [$2])dnl
9728 if $2; then
9729   $1_TRUE=
9730   $1_FALSE='#'
9731 else
9732   $1_TRUE='#'
9733   $1_FALSE=
9734 fi
9735 AC_CONFIG_COMMANDS_PRE(
9736 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9737   AC_MSG_ERROR([[conditional "$1" was never defined.
9738 Usually this means the macro was only invoked conditionally.]])
9739 fi])])
9740
9741 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9742 # Free Software Foundation, Inc.
9743 #
9744 # This file is free software; the Free Software Foundation
9745 # gives unlimited permission to copy and/or distribute it,
9746 # with or without modifications, as long as this notice is preserved.
9747
9748 # serial 10
9749
9750 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9751 # written in clear, in which case automake, when reading aclocal.m4,
9752 # will think it sees a *use*, and therefore will trigger all it's
9753 # C support machinery.  Also note that it means that autoscan, seeing
9754 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9755
9756
9757 # _AM_DEPENDENCIES(NAME)
9758 # ----------------------
9759 # See how the compiler implements dependency checking.
9760 # NAME is "CC", "CXX", "GCJ", or "OBJC".
9761 # We try a few techniques and use that to set a single cache variable.
9762 #
9763 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9764 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9765 # dependency, and given that the user is not expected to run this macro,
9766 # just rely on AC_PROG_CC.
9767 AC_DEFUN([_AM_DEPENDENCIES],
9768 [AC_REQUIRE([AM_SET_DEPDIR])dnl
9769 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9770 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9771 AC_REQUIRE([AM_DEP_TRACK])dnl
9772
9773 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
9774        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
9775        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9776        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
9777        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9778                    [depcc="$$1"   am_compiler_list=])
9779
9780 AC_CACHE_CHECK([dependency style of $depcc],
9781                [am_cv_$1_dependencies_compiler_type],
9782 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9783   # We make a subdir and do the tests there.  Otherwise we can end up
9784   # making bogus files that we don't know about and never remove.  For
9785   # instance it was reported that on HP-UX the gcc test will end up
9786   # making a dummy file named `D' -- because `-MD' means `put the output
9787   # in D'.
9788   mkdir conftest.dir
9789   # Copy depcomp to subdir because otherwise we won't find it if we're
9790   # using a relative directory.
9791   cp "$am_depcomp" conftest.dir
9792   cd conftest.dir
9793   # We will build objects and dependencies in a subdirectory because
9794   # it helps to detect inapplicable dependency modes.  For instance
9795   # both Tru64's cc and ICC support -MD to output dependencies as a
9796   # side effect of compilation, but ICC will put the dependencies in
9797   # the current directory while Tru64 will put them in the object
9798   # directory.
9799   mkdir sub
9800
9801   am_cv_$1_dependencies_compiler_type=none
9802   if test "$am_compiler_list" = ""; then
9803      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9804   fi
9805   am__universal=false
9806   m4_case([$1], [CC],
9807     [case " $depcc " in #(
9808      *\ -arch\ *\ -arch\ *) am__universal=true ;;
9809      esac],
9810     [CXX],
9811     [case " $depcc " in #(
9812      *\ -arch\ *\ -arch\ *) am__universal=true ;;
9813      esac])
9814
9815   for depmode in $am_compiler_list; do
9816     # Setup a source with many dependencies, because some compilers
9817     # like to wrap large dependency lists on column 80 (with \), and
9818     # we should not choose a depcomp mode which is confused by this.
9819     #
9820     # We need to recreate these files for each test, as the compiler may
9821     # overwrite some of them when testing with obscure command lines.
9822     # This happens at least with the AIX C compiler.
9823     : > sub/conftest.c
9824     for i in 1 2 3 4 5 6; do
9825       echo '#include "conftst'$i'.h"' >> sub/conftest.c
9826       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9827       # Solaris 8's {/usr,}/bin/sh.
9828       touch sub/conftst$i.h
9829     done
9830     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9831
9832     # We check with `-c' and `-o' for the sake of the "dashmstdout"
9833     # mode.  It turns out that the SunPro C++ compiler does not properly
9834     # handle `-M -o', and we need to detect this.  Also, some Intel
9835     # versions had trouble with output in subdirs
9836     am__obj=sub/conftest.${OBJEXT-o}
9837     am__minus_obj="-o $am__obj"
9838     case $depmode in
9839     gcc)
9840       # This depmode causes a compiler race in universal mode.
9841       test "$am__universal" = false || continue
9842       ;;
9843     nosideeffect)
9844       # after this tag, mechanisms are not by side-effect, so they'll
9845       # only be used when explicitly requested
9846       if test "x$enable_dependency_tracking" = xyes; then
9847         continue
9848       else
9849         break
9850       fi
9851       ;;
9852     msvisualcpp | msvcmsys)
9853       # This compiler won't grok `-c -o', but also, the minuso test has
9854       # not run yet.  These depmodes are late enough in the game, and
9855       # so weak that their functioning should not be impacted.
9856       am__obj=conftest.${OBJEXT-o}
9857       am__minus_obj=
9858       ;;
9859     none) break ;;
9860     esac
9861     if depmode=$depmode \
9862        source=sub/conftest.c object=$am__obj \
9863        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9864        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9865          >/dev/null 2>conftest.err &&
9866        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9867        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9868        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9869        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9870       # icc doesn't choke on unknown options, it will just issue warnings
9871       # or remarks (even with -Werror).  So we grep stderr for any message
9872       # that says an option was ignored or not supported.
9873       # When given -MP, icc 7.0 and 7.1 complain thusly:
9874       #   icc: Command line warning: ignoring option '-M'; no argument required
9875       # The diagnosis changed in icc 8.0:
9876       #   icc: Command line remark: option '-MP' not supported
9877       if (grep 'ignoring option' conftest.err ||
9878           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9879         am_cv_$1_dependencies_compiler_type=$depmode
9880         break
9881       fi
9882     fi
9883   done
9884
9885   cd ..
9886   rm -rf conftest.dir
9887 else
9888   am_cv_$1_dependencies_compiler_type=none
9889 fi
9890 ])
9891 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9892 AM_CONDITIONAL([am__fastdep$1], [
9893   test "x$enable_dependency_tracking" != xno \
9894   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9895 ])
9896
9897
9898 # AM_SET_DEPDIR
9899 # -------------
9900 # Choose a directory name for dependency files.
9901 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
9902 AC_DEFUN([AM_SET_DEPDIR],
9903 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9904 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9905 ])
9906
9907
9908 # AM_DEP_TRACK
9909 # ------------
9910 AC_DEFUN([AM_DEP_TRACK],
9911 [AC_ARG_ENABLE(dependency-tracking,
9912 [  --disable-dependency-tracking  speeds up one-time build
9913   --enable-dependency-tracking   do not reject slow dependency extractors])
9914 if test "x$enable_dependency_tracking" != xno; then
9915   am_depcomp="$ac_aux_dir/depcomp"
9916   AMDEPBACKSLASH='\'
9917 fi
9918 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9919 AC_SUBST([AMDEPBACKSLASH])dnl
9920 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9921 ])
9922
9923 # Generate code to set up dependency tracking.              -*- Autoconf -*-
9924
9925 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9926 # Free Software Foundation, Inc.
9927 #
9928 # This file is free software; the Free Software Foundation
9929 # gives unlimited permission to copy and/or distribute it,
9930 # with or without modifications, as long as this notice is preserved.
9931
9932 #serial 5
9933
9934 # _AM_OUTPUT_DEPENDENCY_COMMANDS
9935 # ------------------------------
9936 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9937 [{
9938   # Autoconf 2.62 quotes --file arguments for eval, but not when files
9939   # are listed without --file.  Let's play safe and only enable the eval
9940   # if we detect the quoting.
9941   case $CONFIG_FILES in
9942   *\'*) eval set x "$CONFIG_FILES" ;;
9943   *)   set x $CONFIG_FILES ;;
9944   esac
9945   shift
9946   for mf
9947   do
9948     # Strip MF so we end up with the name of the file.
9949     mf=`echo "$mf" | sed -e 's/:.*$//'`
9950     # Check whether this is an Automake generated Makefile or not.
9951     # We used to match only the files named `Makefile.in', but
9952     # some people rename them; so instead we look at the file content.
9953     # Grep'ing the first line is not enough: some people post-process
9954     # each Makefile.in and add a new line on top of each file to say so.
9955     # Grep'ing the whole file is not good either: AIX grep has a line
9956     # limit of 2048, but all sed's we know have understand at least 4000.
9957     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9958       dirpart=`AS_DIRNAME("$mf")`
9959     else
9960       continue
9961     fi
9962     # Extract the definition of DEPDIR, am__include, and am__quote
9963     # from the Makefile without running `make'.
9964     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9965     test -z "$DEPDIR" && continue
9966     am__include=`sed -n 's/^am__include = //p' < "$mf"`
9967     test -z "am__include" && continue
9968     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9969     # When using ansi2knr, U may be empty or an underscore; expand it
9970     U=`sed -n 's/^U = //p' < "$mf"`
9971     # Find all dependency output files, they are included files with
9972     # $(DEPDIR) in their names.  We invoke sed twice because it is the
9973     # simplest approach to changing $(DEPDIR) to its actual value in the
9974     # expansion.
9975     for file in `sed -n "
9976       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9977          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9978       # Make sure the directory exists.
9979       test -f "$dirpart/$file" && continue
9980       fdir=`AS_DIRNAME(["$file"])`
9981       AS_MKDIR_P([$dirpart/$fdir])
9982       # echo "creating $dirpart/$file"
9983       echo '# dummy' > "$dirpart/$file"
9984     done
9985   done
9986 }
9987 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9988
9989
9990 # AM_OUTPUT_DEPENDENCY_COMMANDS
9991 # -----------------------------
9992 # This macro should only be invoked once -- use via AC_REQUIRE.
9993 #
9994 # This code is only required when automatic dependency tracking
9995 # is enabled.  FIXME.  This creates each `.P' file that we will
9996 # need in order to bootstrap the dependency handling code.
9997 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9998 [AC_CONFIG_COMMANDS([depfiles],
9999      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10000      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10001 ])
10002
10003 # Do all the work for Automake.                             -*- Autoconf -*-
10004
10005 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
10006 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
10007 #
10008 # This file is free software; the Free Software Foundation
10009 # gives unlimited permission to copy and/or distribute it,
10010 # with or without modifications, as long as this notice is preserved.
10011
10012 # serial 16
10013
10014 # This macro actually does too much.  Some checks are only needed if
10015 # your package does certain things.  But this isn't really a big deal.
10016
10017 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10018 # AM_INIT_AUTOMAKE([OPTIONS])
10019 # -----------------------------------------------
10020 # The call with PACKAGE and VERSION arguments is the old style
10021 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
10022 # and VERSION should now be passed to AC_INIT and removed from
10023 # the call to AM_INIT_AUTOMAKE.
10024 # We support both call styles for the transition.  After
10025 # the next Automake release, Autoconf can make the AC_INIT
10026 # arguments mandatory, and then we can depend on a new Autoconf
10027 # release and drop the old call support.
10028 AC_DEFUN([AM_INIT_AUTOMAKE],
10029 [AC_PREREQ([2.62])dnl
10030 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
10031 dnl the ones we care about.
10032 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10033 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10034 AC_REQUIRE([AC_PROG_INSTALL])dnl
10035 if test "`cd $srcdir && pwd`" != "`pwd`"; then
10036   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10037   # is not polluted with repeated "-I."
10038   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10039   # test to see if srcdir already configured
10040   if test -f $srcdir/config.status; then
10041     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10042   fi
10043 fi
10044
10045 # test whether we have cygpath
10046 if test -z "$CYGPATH_W"; then
10047   if (cygpath --version) >/dev/null 2>/dev/null; then
10048     CYGPATH_W='cygpath -w'
10049   else
10050     CYGPATH_W=echo
10051   fi
10052 fi
10053 AC_SUBST([CYGPATH_W])
10054
10055 # Define the identity of the package.
10056 dnl Distinguish between old-style and new-style calls.
10057 m4_ifval([$2],
10058 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10059  AC_SUBST([PACKAGE], [$1])dnl
10060  AC_SUBST([VERSION], [$2])],
10061 [_AM_SET_OPTIONS([$1])dnl
10062 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10063 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
10064   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10065  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10066  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10067
10068 _AM_IF_OPTION([no-define],,
10069 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
10070  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
10071
10072 # Some tools Automake needs.
10073 AC_REQUIRE([AM_SANITY_CHECK])dnl
10074 AC_REQUIRE([AC_ARG_PROGRAM])dnl
10075 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
10076 AM_MISSING_PROG(AUTOCONF, autoconf)
10077 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
10078 AM_MISSING_PROG(AUTOHEADER, autoheader)
10079 AM_MISSING_PROG(MAKEINFO, makeinfo)
10080 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10081 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
10082 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
10083 # We need awk for the "check" target.  The system "awk" is bad on
10084 # some platforms.
10085 AC_REQUIRE([AC_PROG_AWK])dnl
10086 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10087 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10088 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
10089               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10090                              [_AM_PROG_TAR([v7])])])
10091 _AM_IF_OPTION([no-dependencies],,
10092 [AC_PROVIDE_IFELSE([AC_PROG_CC],
10093                   [_AM_DEPENDENCIES(CC)],
10094                   [define([AC_PROG_CC],
10095                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
10096 AC_PROVIDE_IFELSE([AC_PROG_CXX],
10097                   [_AM_DEPENDENCIES(CXX)],
10098                   [define([AC_PROG_CXX],
10099                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
10100 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
10101                   [_AM_DEPENDENCIES(OBJC)],
10102                   [define([AC_PROG_OBJC],
10103                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
10104 ])
10105 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
10106 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
10107 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
10108 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
10109 AC_CONFIG_COMMANDS_PRE(dnl
10110 [m4_provide_if([_AM_COMPILER_EXEEXT],
10111   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
10112 ])
10113
10114 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
10115 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10116 dnl mangled by Autoconf and run in a shell conditional statement.
10117 m4_define([_AC_COMPILER_EXEEXT],
10118 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10119
10120
10121 # When config.status generates a header, we must update the stamp-h file.
10122 # This file resides in the same directory as the config header
10123 # that is generated.  The stamp files are numbered to have different names.
10124
10125 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10126 # loop where config.status creates the headers, so we can generate
10127 # our stamp files there.
10128 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10129 [# Compute $1's index in $config_headers.
10130 _am_arg=$1
10131 _am_stamp_count=1
10132 for _am_header in $config_headers :; do
10133   case $_am_header in
10134     $_am_arg | $_am_arg:* )
10135       break ;;
10136     * )
10137       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10138   esac
10139 done
10140 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10141
10142 # Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
10143 #
10144 # This file is free software; the Free Software Foundation
10145 # gives unlimited permission to copy and/or distribute it,
10146 # with or without modifications, as long as this notice is preserved.
10147
10148 # AM_PROG_INSTALL_SH
10149 # ------------------
10150 # Define $install_sh.
10151 AC_DEFUN([AM_PROG_INSTALL_SH],
10152 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10153 if test x"${install_sh}" != xset; then
10154   case $am_aux_dir in
10155   *\ * | *\     *)
10156     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10157   *)
10158     install_sh="\${SHELL} $am_aux_dir/install-sh"
10159   esac
10160 fi
10161 AC_SUBST(install_sh)])
10162
10163 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
10164 #
10165 # This file is free software; the Free Software Foundation
10166 # gives unlimited permission to copy and/or distribute it,
10167 # with or without modifications, as long as this notice is preserved.
10168
10169 # serial 2
10170
10171 # Check whether the underlying file-system supports filenames
10172 # with a leading dot.  For instance MS-DOS doesn't.
10173 AC_DEFUN([AM_SET_LEADING_DOT],
10174 [rm -rf .tst 2>/dev/null
10175 mkdir .tst 2>/dev/null
10176 if test -d .tst; then
10177   am__leading_dot=.
10178 else
10179   am__leading_dot=_
10180 fi
10181 rmdir .tst 2>/dev/null
10182 AC_SUBST([am__leading_dot])])
10183
10184 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
10185 # From Jim Meyering
10186
10187 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
10188 # Free Software Foundation, Inc.
10189 #
10190 # This file is free software; the Free Software Foundation
10191 # gives unlimited permission to copy and/or distribute it,
10192 # with or without modifications, as long as this notice is preserved.
10193
10194 # serial 5
10195
10196 # AM_MAINTAINER_MODE([DEFAULT-MODE])
10197 # ----------------------------------
10198 # Control maintainer-specific portions of Makefiles.
10199 # Default is to disable them, unless `enable' is passed literally.
10200 # For symmetry, `disable' may be passed as well.  Anyway, the user
10201 # can override the default with the --enable/--disable switch.
10202 AC_DEFUN([AM_MAINTAINER_MODE],
10203 [m4_case(m4_default([$1], [disable]),
10204        [enable], [m4_define([am_maintainer_other], [disable])],
10205        [disable], [m4_define([am_maintainer_other], [enable])],
10206        [m4_define([am_maintainer_other], [enable])
10207         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
10208 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
10209   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
10210   AC_ARG_ENABLE([maintainer-mode],
10211 [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
10212                           (and sometimes confusing) to the casual installer],
10213       [USE_MAINTAINER_MODE=$enableval],
10214       [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
10215   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
10216   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
10217   MAINT=$MAINTAINER_MODE_TRUE
10218   AC_SUBST([MAINT])dnl
10219 ]
10220 )
10221
10222 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
10223
10224 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
10225
10226 # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
10227 #
10228 # This file is free software; the Free Software Foundation
10229 # gives unlimited permission to copy and/or distribute it,
10230 # with or without modifications, as long as this notice is preserved.
10231
10232 # serial 4
10233
10234 # AM_MAKE_INCLUDE()
10235 # -----------------
10236 # Check to see how make treats includes.
10237 AC_DEFUN([AM_MAKE_INCLUDE],
10238 [am_make=${MAKE-make}
10239 cat > confinc << 'END'
10240 am__doit:
10241         @echo this is the am__doit target
10242 .PHONY: am__doit
10243 END
10244 # If we don't find an include directive, just comment out the code.
10245 AC_MSG_CHECKING([for style of include used by $am_make])
10246 am__include="#"
10247 am__quote=
10248 _am_result=none
10249 # First try GNU make style include.
10250 echo "include confinc" > confmf
10251 # Ignore all kinds of additional output from `make'.
10252 case `$am_make -s -f confmf 2> /dev/null` in #(
10253 *the\ am__doit\ target*)
10254   am__include=include
10255   am__quote=
10256   _am_result=GNU
10257   ;;
10258 esac
10259 # Now try BSD make style include.
10260 if test "$am__include" = "#"; then
10261    echo '.include "confinc"' > confmf
10262    case `$am_make -s -f confmf 2> /dev/null` in #(
10263    *the\ am__doit\ target*)
10264      am__include=.include
10265      am__quote="\""
10266      _am_result=BSD
10267      ;;
10268    esac
10269 fi
10270 AC_SUBST([am__include])
10271 AC_SUBST([am__quote])
10272 AC_MSG_RESULT([$_am_result])
10273 rm -f confinc confmf
10274 ])
10275
10276 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10277
10278 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
10279 # Free Software Foundation, Inc.
10280 #
10281 # This file is free software; the Free Software Foundation
10282 # gives unlimited permission to copy and/or distribute it,
10283 # with or without modifications, as long as this notice is preserved.
10284
10285 # serial 6
10286
10287 # AM_MISSING_PROG(NAME, PROGRAM)
10288 # ------------------------------
10289 AC_DEFUN([AM_MISSING_PROG],
10290 [AC_REQUIRE([AM_MISSING_HAS_RUN])
10291 $1=${$1-"${am_missing_run}$2"}
10292 AC_SUBST($1)])
10293
10294
10295 # AM_MISSING_HAS_RUN
10296 # ------------------
10297 # Define MISSING if not defined so far and test if it supports --run.
10298 # If it does, set am_missing_run to use it, otherwise, to nothing.
10299 AC_DEFUN([AM_MISSING_HAS_RUN],
10300 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10301 AC_REQUIRE_AUX_FILE([missing])dnl
10302 if test x"${MISSING+set}" != xset; then
10303   case $am_aux_dir in
10304   *\ * | *\     *)
10305     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10306   *)
10307     MISSING="\${SHELL} $am_aux_dir/missing" ;;
10308   esac
10309 fi
10310 # Use eval to expand $SHELL
10311 if eval "$MISSING --run true"; then
10312   am_missing_run="$MISSING --run "
10313 else
10314   am_missing_run=
10315   AC_MSG_WARN([`missing' script is too old or missing])
10316 fi
10317 ])
10318
10319 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
10320 #
10321 # This file is free software; the Free Software Foundation
10322 # gives unlimited permission to copy and/or distribute it,
10323 # with or without modifications, as long as this notice is preserved.
10324
10325 # AM_PROG_MKDIR_P
10326 # ---------------
10327 # Check for `mkdir -p'.
10328 AC_DEFUN([AM_PROG_MKDIR_P],
10329 [AC_PREREQ([2.60])dnl
10330 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10331 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
10332 dnl while keeping a definition of mkdir_p for backward compatibility.
10333 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
10334 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
10335 dnl Makefile.ins that do not define MKDIR_P, so we do our own
10336 dnl adjustment using top_builddir (which is defined more often than
10337 dnl MKDIR_P).
10338 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
10339 case $mkdir_p in
10340   [[\\/$]]* | ?:[[\\/]]*) ;;
10341   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
10342 esac
10343 ])
10344
10345 # Helper functions for option handling.                     -*- Autoconf -*-
10346
10347 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
10348 #
10349 # This file is free software; the Free Software Foundation
10350 # gives unlimited permission to copy and/or distribute it,
10351 # with or without modifications, as long as this notice is preserved.
10352
10353 # serial 4
10354
10355 # _AM_MANGLE_OPTION(NAME)
10356 # -----------------------
10357 AC_DEFUN([_AM_MANGLE_OPTION],
10358 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10359
10360 # _AM_SET_OPTION(NAME)
10361 # ------------------------------
10362 # Set option NAME.  Presently that only means defining a flag for this option.
10363 AC_DEFUN([_AM_SET_OPTION],
10364 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10365
10366 # _AM_SET_OPTIONS(OPTIONS)
10367 # ----------------------------------
10368 # OPTIONS is a space-separated list of Automake options.
10369 AC_DEFUN([_AM_SET_OPTIONS],
10370 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10371
10372 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10373 # -------------------------------------------
10374 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10375 AC_DEFUN([_AM_IF_OPTION],
10376 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10377
10378 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
10379
10380 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
10381 # Free Software Foundation, Inc.
10382 #
10383 # This file is free software; the Free Software Foundation
10384 # gives unlimited permission to copy and/or distribute it,
10385 # with or without modifications, as long as this notice is preserved.
10386
10387 # serial 5
10388
10389 # AM_SANITY_CHECK
10390 # ---------------
10391 AC_DEFUN([AM_SANITY_CHECK],
10392 [AC_MSG_CHECKING([whether build environment is sane])
10393 # Just in case
10394 sleep 1
10395 echo timestamp > conftest.file
10396 # Reject unsafe characters in $srcdir or the absolute working directory
10397 # name.  Accept space and tab only in the latter.
10398 am_lf='
10399 '
10400 case `pwd` in
10401   *[[\\\"\#\$\&\'\`$am_lf]]*)
10402     AC_MSG_ERROR([unsafe absolute working directory name]);;
10403 esac
10404 case $srcdir in
10405   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
10406     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
10407 esac
10408
10409 # Do `set' in a subshell so we don't clobber the current shell's
10410 # arguments.  Must try -L first in case configure is actually a
10411 # symlink; some systems play weird games with the mod time of symlinks
10412 # (eg FreeBSD returns the mod time of the symlink's containing
10413 # directory).
10414 if (
10415    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10416    if test "$[*]" = "X"; then
10417       # -L didn't work.
10418       set X `ls -t "$srcdir/configure" conftest.file`
10419    fi
10420    rm -f conftest.file
10421    if test "$[*]" != "X $srcdir/configure conftest.file" \
10422       && test "$[*]" != "X conftest.file $srcdir/configure"; then
10423
10424       # If neither matched, then we have a broken ls.  This can happen
10425       # if, for instance, CONFIG_SHELL is bash and it inherits a
10426       # broken ls alias from the environment.  This has actually
10427       # happened.  Such a system could not be considered "sane".
10428       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10429 alias in your environment])
10430    fi
10431
10432    test "$[2]" = conftest.file
10433    )
10434 then
10435    # Ok.
10436    :
10437 else
10438    AC_MSG_ERROR([newly created file is older than distributed files!
10439 Check your system clock])
10440 fi
10441 AC_MSG_RESULT(yes)])
10442
10443 # Copyright (C) 2009  Free Software Foundation, Inc.
10444 #
10445 # This file is free software; the Free Software Foundation
10446 # gives unlimited permission to copy and/or distribute it,
10447 # with or without modifications, as long as this notice is preserved.
10448
10449 # serial 1
10450
10451 # AM_SILENT_RULES([DEFAULT])
10452 # --------------------------
10453 # Enable less verbose build rules; with the default set to DEFAULT
10454 # (`yes' being less verbose, `no' or empty being verbose).
10455 AC_DEFUN([AM_SILENT_RULES],
10456 [AC_ARG_ENABLE([silent-rules],
10457 [  --enable-silent-rules          less verbose build output (undo: `make V=1')
10458   --disable-silent-rules         verbose build output (undo: `make V=0')])
10459 case $enable_silent_rules in
10460 yes) AM_DEFAULT_VERBOSITY=0;;
10461 no)  AM_DEFAULT_VERBOSITY=1;;
10462 *)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
10463 esac
10464 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10465 AM_BACKSLASH='\'
10466 AC_SUBST([AM_BACKSLASH])dnl
10467 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10468 ])
10469
10470 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
10471 #
10472 # This file is free software; the Free Software Foundation
10473 # gives unlimited permission to copy and/or distribute it,
10474 # with or without modifications, as long as this notice is preserved.
10475
10476 # AM_PROG_INSTALL_STRIP
10477 # ---------------------
10478 # One issue with vendor `install' (even GNU) is that you can't
10479 # specify the program used to strip binaries.  This is especially
10480 # annoying in cross-compiling environments, where the build's strip
10481 # is unlikely to handle the host's binaries.
10482 # Fortunately install-sh will honor a STRIPPROG variable, so we
10483 # always use install-sh in `make install-strip', and initialize
10484 # STRIPPROG with the value of the STRIP variable (set by the user).
10485 AC_DEFUN([AM_PROG_INSTALL_STRIP],
10486 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10487 # Installed binaries are usually stripped using `strip' when the user
10488 # run `make install-strip'.  However `strip' might not be the right
10489 # tool to use in cross-compilation environments, therefore Automake
10490 # will honor the `STRIP' environment variable to overrule this program.
10491 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10492 if test "$cross_compiling" != no; then
10493   AC_CHECK_TOOL([STRIP], [strip], :)
10494 fi
10495 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10496 AC_SUBST([INSTALL_STRIP_PROGRAM])])
10497
10498 # Copyright (C) 2006, 2008  Free Software Foundation, Inc.
10499 #
10500 # This file is free software; the Free Software Foundation
10501 # gives unlimited permission to copy and/or distribute it,
10502 # with or without modifications, as long as this notice is preserved.
10503
10504 # serial 2
10505
10506 # _AM_SUBST_NOTMAKE(VARIABLE)
10507 # ---------------------------
10508 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10509 # This macro is traced by Automake.
10510 AC_DEFUN([_AM_SUBST_NOTMAKE])
10511
10512 # AM_SUBST_NOTMAKE(VARIABLE)
10513 # ---------------------------
10514 # Public sister of _AM_SUBST_NOTMAKE.
10515 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10516
10517 # Check how to create a tarball.                            -*- Autoconf -*-
10518
10519 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
10520 #
10521 # This file is free software; the Free Software Foundation
10522 # gives unlimited permission to copy and/or distribute it,
10523 # with or without modifications, as long as this notice is preserved.
10524
10525 # serial 2
10526
10527 # _AM_PROG_TAR(FORMAT)
10528 # --------------------
10529 # Check how to create a tarball in format FORMAT.
10530 # FORMAT should be one of `v7', `ustar', or `pax'.
10531 #
10532 # Substitute a variable $(am__tar) that is a command
10533 # writing to stdout a FORMAT-tarball containing the directory
10534 # $tardir.
10535 #     tardir=directory && $(am__tar) > result.tar
10536 #
10537 # Substitute a variable $(am__untar) that extract such
10538 # a tarball read from stdin.
10539 #     $(am__untar) < result.tar
10540 AC_DEFUN([_AM_PROG_TAR],
10541 [# Always define AMTAR for backward compatibility.
10542 AM_MISSING_PROG([AMTAR], [tar])
10543 m4_if([$1], [v7],
10544      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
10545      [m4_case([$1], [ustar],, [pax],,
10546               [m4_fatal([Unknown tar format])])
10547 AC_MSG_CHECKING([how to create a $1 tar archive])
10548 # Loop over all known methods to create a tar archive until one works.
10549 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10550 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10551 # Do not fold the above two line into one, because Tru64 sh and
10552 # Solaris sh will not grok spaces in the rhs of `-'.
10553 for _am_tool in $_am_tools
10554 do
10555   case $_am_tool in
10556   gnutar)
10557     for _am_tar in tar gnutar gtar;
10558     do
10559       AM_RUN_LOG([$_am_tar --version]) && break
10560     done
10561     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10562     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10563     am__untar="$_am_tar -xf -"
10564     ;;
10565   plaintar)
10566     # Must skip GNU tar: if it does not support --format= it doesn't create
10567     # ustar tarball either.
10568     (tar --version) >/dev/null 2>&1 && continue
10569     am__tar='tar chf - "$$tardir"'
10570     am__tar_='tar chf - "$tardir"'
10571     am__untar='tar xf -'
10572     ;;
10573   pax)
10574     am__tar='pax -L -x $1 -w "$$tardir"'
10575     am__tar_='pax -L -x $1 -w "$tardir"'
10576     am__untar='pax -r'
10577     ;;
10578   cpio)
10579     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10580     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10581     am__untar='cpio -i -H $1 -d'
10582     ;;
10583   none)
10584     am__tar=false
10585     am__tar_=false
10586     am__untar=false
10587     ;;
10588   esac
10589
10590   # If the value was cached, stop now.  We just wanted to have am__tar
10591   # and am__untar set.
10592   test -n "${am_cv_prog_tar_$1}" && break
10593
10594   # tar/untar a dummy directory, and stop if the command works
10595   rm -rf conftest.dir
10596   mkdir conftest.dir
10597   echo GrepMe > conftest.dir/file
10598   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10599   rm -rf conftest.dir
10600   if test -s conftest.tar; then
10601     AM_RUN_LOG([$am__untar <conftest.tar])
10602     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10603   fi
10604 done
10605 rm -rf conftest.dir
10606
10607 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10608 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10609 AC_SUBST([am__tar])
10610 AC_SUBST([am__untar])
10611 ]) # _AM_PROG_TAR
10612