]> git.sur5r.net Git - glabels/blob - aclocal.m4
Upload to unstable
[glabels] / aclocal.m4
1 # generated automatically by aclocal 1.15 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
4
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 m4_ifndef([AC_AUTOCONF_VERSION],
16   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf.  It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
24 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
25 #
26 # This file is free software, distributed under the terms of the GNU
27 # General Public License.  As a special exception to the GNU General
28 # Public License, this file may be distributed as part of a program
29 # that contains a configuration script generated by Autoconf, under
30 # the same distribution terms as the rest of that program.
31 #
32 # This file can be copied and used freely without restrictions.  It can
33 # be used in projects which are not available under the GNU Public License
34 # but which still want to provide support for the GNU gettext functionality.
35 #
36 # Macro to add for using GNU gettext.
37 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
38 #
39 # Modified to never use included libintl. 
40 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
41 #
42 # Major rework to remove unused code
43 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
44 #
45 # Added better handling of ALL_LINGUAS from GNU gettext version 
46 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
47 #
48 # Modified to require ngettext
49 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
50 #
51 # We need this here as well, since someone might use autoconf-2.5x
52 # to configure GLib then an older version to configure a package
53 # using AM_GLIB_GNU_GETTEXT
54 AC_PREREQ(2.53)
55
56 dnl
57 dnl We go to great lengths to make sure that aclocal won't 
58 dnl try to pull in the installed version of these macros
59 dnl when running aclocal in the glib directory.
60 dnl
61 m4_copy([AC_DEFUN],[glib_DEFUN])
62 m4_copy([AC_REQUIRE],[glib_REQUIRE])
63 dnl
64 dnl At the end, if we're not within glib, we'll define the public
65 dnl definitions in terms of our private definitions.
66 dnl
67
68 # GLIB_LC_MESSAGES
69 #--------------------
70 glib_DEFUN([GLIB_LC_MESSAGES],
71   [AC_CHECK_HEADERS([locale.h])
72     if test $ac_cv_header_locale_h = yes; then
73     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
74       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
75        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
76     if test $am_cv_val_LC_MESSAGES = yes; then
77       AC_DEFINE(HAVE_LC_MESSAGES, 1,
78         [Define if your <locale.h> file defines LC_MESSAGES.])
79     fi
80   fi])
81
82 # GLIB_PATH_PROG_WITH_TEST
83 #----------------------------
84 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
85 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
86 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
87 [# Extract the first word of "$2", so it can be a program name with args.
88 set dummy $2; ac_word=[$]2
89 AC_MSG_CHECKING([for $ac_word])
90 AC_CACHE_VAL(ac_cv_path_$1,
91 [case "[$]$1" in
92   /*)
93   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
94   ;;
95   *)
96   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
97   for ac_dir in ifelse([$5], , $PATH, [$5]); do
98     test -z "$ac_dir" && ac_dir=.
99     if test -f $ac_dir/$ac_word; then
100       if [$3]; then
101         ac_cv_path_$1="$ac_dir/$ac_word"
102         break
103       fi
104     fi
105   done
106   IFS="$ac_save_ifs"
107 dnl If no 4th arg is given, leave the cache variable unset,
108 dnl so AC_PATH_PROGS will keep looking.
109 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
110 ])dnl
111   ;;
112 esac])dnl
113 $1="$ac_cv_path_$1"
114 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
115   AC_MSG_RESULT([$]$1)
116 else
117   AC_MSG_RESULT(no)
118 fi
119 AC_SUBST($1)dnl
120 ])
121
122 # GLIB_WITH_NLS
123 #-----------------
124 glib_DEFUN([GLIB_WITH_NLS],
125   dnl NLS is obligatory
126   [USE_NLS=yes
127     AC_SUBST(USE_NLS)
128
129     gt_cv_have_gettext=no
130
131     CATOBJEXT=NONE
132     XGETTEXT=:
133     INTLLIBS=
134
135     AC_CHECK_HEADER(libintl.h,
136      [gt_cv_func_dgettext_libintl="no"
137       libintl_extra_libs=""
138
139       #
140       # First check in libc
141       #
142       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
143         [AC_TRY_LINK([
144 #include <libintl.h>
145 ],
146          [return !ngettext ("","", 1)],
147           gt_cv_func_ngettext_libc=yes,
148           gt_cv_func_ngettext_libc=no)
149         ])
150   
151       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
152               AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
153                 [AC_TRY_LINK([
154 #include <libintl.h>
155 ],
156                   [return !dgettext ("","")],
157                   gt_cv_func_dgettext_libc=yes,
158                   gt_cv_func_dgettext_libc=no)
159                 ])
160       fi
161   
162       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
163         AC_CHECK_FUNCS(bind_textdomain_codeset)
164       fi
165
166       #
167       # If we don't have everything we want, check in libintl
168       #
169       if test "$gt_cv_func_dgettext_libc" != "yes" \
170          || test "$gt_cv_func_ngettext_libc" != "yes" \
171          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
172         
173         AC_CHECK_LIB(intl, bindtextdomain,
174             [AC_CHECK_LIB(intl, ngettext,
175                     [AC_CHECK_LIB(intl, dgettext,
176                                   gt_cv_func_dgettext_libintl=yes)])])
177
178         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
179           AC_MSG_CHECKING([if -liconv is needed to use gettext])
180           AC_MSG_RESULT([])
181           AC_CHECK_LIB(intl, ngettext,
182                 [AC_CHECK_LIB(intl, dcgettext,
183                        [gt_cv_func_dgettext_libintl=yes
184                         libintl_extra_libs=-liconv],
185                         :,-liconv)],
186                 :,-liconv)
187         fi
188
189         #
190         # If we found libintl, then check in it for bind_textdomain_codeset();
191         # we'll prefer libc if neither have bind_textdomain_codeset(),
192         # and both have dgettext and ngettext
193         #
194         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
195           glib_save_LIBS="$LIBS"
196           LIBS="$LIBS -lintl $libintl_extra_libs"
197           unset ac_cv_func_bind_textdomain_codeset
198           AC_CHECK_FUNCS(bind_textdomain_codeset)
199           LIBS="$glib_save_LIBS"
200
201           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
202             gt_cv_func_dgettext_libc=no
203           else
204             if test "$gt_cv_func_dgettext_libc" = "yes" \
205                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
206               gt_cv_func_dgettext_libintl=no
207             fi
208           fi
209         fi
210       fi
211
212       if test "$gt_cv_func_dgettext_libc" = "yes" \
213         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
214         gt_cv_have_gettext=yes
215       fi
216   
217       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
218         INTLLIBS="-lintl $libintl_extra_libs"
219       fi
220   
221       if test "$gt_cv_have_gettext" = "yes"; then
222         AC_DEFINE(HAVE_GETTEXT,1,
223           [Define if the GNU gettext() function is already present or preinstalled.])
224         GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
225           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
226         if test "$MSGFMT" != "no"; then
227           glib_save_LIBS="$LIBS"
228           LIBS="$LIBS $INTLLIBS"
229           AC_CHECK_FUNCS(dcgettext)
230           MSGFMT_OPTS=
231           AC_MSG_CHECKING([if msgfmt accepts -c])
232           GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
233 msgid ""
234 msgstr ""
235 "Content-Type: text/plain; charset=UTF-8\n"
236 "Project-Id-Version: test 1.0\n"
237 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
238 "Last-Translator: test <foo@bar.xx>\n"
239 "Language-Team: C <LL@li.org>\n"
240 "MIME-Version: 1.0\n"
241 "Content-Transfer-Encoding: 8bit\n"
242 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
243           AC_SUBST(MSGFMT_OPTS)
244           AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
245           GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
246             [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
247           AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
248                          return _nl_msg_cat_cntr],
249             [CATOBJEXT=.gmo 
250              DATADIRNAME=share],
251             [case $host in
252             *-*-solaris*)
253             dnl On Solaris, if bind_textdomain_codeset is in libc,
254             dnl GNU format message catalog is always supported,
255             dnl since both are added to the libc all together.
256             dnl Hence, we'd like to go with DATADIRNAME=share and
257             dnl and CATOBJEXT=.gmo in this case.
258             AC_CHECK_FUNC(bind_textdomain_codeset,
259               [CATOBJEXT=.gmo 
260                DATADIRNAME=share],
261               [CATOBJEXT=.mo
262                DATADIRNAME=lib])
263             ;;
264             *-*-openbsd*)
265             CATOBJEXT=.mo
266             DATADIRNAME=share
267             ;;
268             *)
269             CATOBJEXT=.mo
270             DATADIRNAME=lib
271             ;;
272             esac])
273           LIBS="$glib_save_LIBS"
274           INSTOBJEXT=.mo
275         else
276           gt_cv_have_gettext=no
277         fi
278       fi
279     ])
280
281     if test "$gt_cv_have_gettext" = "yes" ; then
282       AC_DEFINE(ENABLE_NLS, 1,
283         [always defined to indicate that i18n is enabled])
284     fi
285
286     dnl Test whether we really found GNU xgettext.
287     if test "$XGETTEXT" != ":"; then
288       dnl If it is not GNU xgettext we define it as : so that the
289       dnl Makefiles still can work.
290       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
291         : ;
292       else
293         AC_MSG_RESULT(
294           [found xgettext program is not GNU xgettext; ignore it])
295         XGETTEXT=":"
296       fi
297     fi
298
299     # We need to process the po/ directory.
300     POSUB=po
301
302     AC_OUTPUT_COMMANDS(
303       [case "$CONFIG_FILES" in *po/Makefile.in*)
304         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
305       esac])
306
307     dnl These rules are solely for the distribution goal.  While doing this
308     dnl we only have to keep exactly one list of the available catalogs
309     dnl in configure.ac.
310     for lang in $ALL_LINGUAS; do
311       GMOFILES="$GMOFILES $lang.gmo"
312       POFILES="$POFILES $lang.po"
313     done
314
315     dnl Make all variables we use known to autoconf.
316     AC_SUBST(CATALOGS)
317     AC_SUBST(CATOBJEXT)
318     AC_SUBST(DATADIRNAME)
319     AC_SUBST(GMOFILES)
320     AC_SUBST(INSTOBJEXT)
321     AC_SUBST(INTLLIBS)
322     AC_SUBST(PO_IN_DATADIR_TRUE)
323     AC_SUBST(PO_IN_DATADIR_FALSE)
324     AC_SUBST(POFILES)
325     AC_SUBST(POSUB)
326   ])
327
328 # AM_GLIB_GNU_GETTEXT
329 # -------------------
330 # Do checks necessary for use of gettext. If a suitable implementation 
331 # of gettext is found in either in libintl or in the C library,
332 # it will set INTLLIBS to the libraries needed for use of gettext
333 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
334 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
335 # on various variables needed by the Makefile.in.in installed by 
336 # glib-gettextize.
337 dnl
338 glib_DEFUN([GLIB_GNU_GETTEXT],
339   [AC_REQUIRE([AC_PROG_CC])dnl
340    
341    GLIB_LC_MESSAGES
342    GLIB_WITH_NLS
343
344    if test "$gt_cv_have_gettext" = "yes"; then
345      if test "x$ALL_LINGUAS" = "x"; then
346        LINGUAS=
347      else
348        AC_MSG_CHECKING(for catalogs to be installed)
349        NEW_LINGUAS=
350        for presentlang in $ALL_LINGUAS; do
351          useit=no
352          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
353            desiredlanguages="$LINGUAS"
354          else
355            desiredlanguages="$ALL_LINGUAS"
356          fi
357          for desiredlang in $desiredlanguages; do
358            # Use the presentlang catalog if desiredlang is
359            #   a. equal to presentlang, or
360            #   b. a variant of presentlang (because in this case,
361            #      presentlang can be used as a fallback for messages
362            #      which are not translated in the desiredlang catalog).
363            case "$desiredlang" in
364              "$presentlang"*) useit=yes;;
365            esac
366          done
367          if test $useit = yes; then
368            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
369          fi
370        done
371        LINGUAS=$NEW_LINGUAS
372        AC_MSG_RESULT($LINGUAS)
373      fi
374
375      dnl Construct list of names of catalog files to be constructed.
376      if test -n "$LINGUAS"; then
377        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
378      fi
379    fi
380
381    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
382    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
383    dnl Try to locate is.
384    MKINSTALLDIRS=
385    if test -n "$ac_aux_dir"; then
386      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
387    fi
388    if test -z "$MKINSTALLDIRS"; then
389      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
390    fi
391    AC_SUBST(MKINSTALLDIRS)
392
393    dnl Generate list of files to be processed by xgettext which will
394    dnl be included in po/Makefile.
395    test -d po || mkdir po
396    if test "x$srcdir" != "x."; then
397      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
398        posrcprefix="$srcdir/"
399      else
400        posrcprefix="../$srcdir/"
401      fi
402    else
403      posrcprefix="../"
404    fi
405    rm -f po/POTFILES
406    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
407         < $srcdir/po/POTFILES.in > po/POTFILES
408   ])
409
410 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
411 # -------------------------------
412 # Define VARIABLE to the location where catalog files will
413 # be installed by po/Makefile.
414 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
415 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
416 glib_save_prefix="$prefix"
417 glib_save_exec_prefix="$exec_prefix"
418 glib_save_datarootdir="$datarootdir"
419 test "x$prefix" = xNONE && prefix=$ac_default_prefix
420 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
421 datarootdir=`eval echo "${datarootdir}"`
422 if test "x$CATOBJEXT" = "x.mo" ; then
423   localedir=`eval echo "${libdir}/locale"`
424 else
425   localedir=`eval echo "${datadir}/locale"`
426 fi
427 prefix="$glib_save_prefix"
428 exec_prefix="$glib_save_exec_prefix"
429 datarootdir="$glib_save_datarootdir"
430 AC_DEFINE_UNQUOTED($1, "$localedir",
431   [Define the location where the catalogs will be installed])
432 ])
433
434 dnl
435 dnl Now the definitions that aclocal will find
436 dnl
437 ifdef(glib_configure_ac,[],[
438 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
439 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
440 ])dnl
441
442 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
443
444 # Create a temporary file with TEST-FILE as its contents and pass the
445 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
446 # 0 and perform ACTION-IF-FAIL for any other exit status.
447 AC_DEFUN([GLIB_RUN_PROG],
448 [cat >conftest.foo <<_ACEOF
449 $2
450 _ACEOF
451 if AC_RUN_LOG([$1 conftest.foo]); then
452   m4_ifval([$3], [$3], [:])
453 m4_ifvaln([$4], [else $4])dnl
454 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
455 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
456 fi])
457
458
459 # gnome-compiler-flags.m4
460 #
461 # serial 2
462 #
463
464 dnl GNOME_COMPILE_WARNINGS
465 dnl Turn on many useful compiler warnings and substitute the result into
466 dnl WARN_CFLAGS
467 dnl For now, only works on GCC
468 dnl Pass the default value of the --enable-compile-warnings configure option as
469 dnl the first argument to the macro, defaulting to 'yes'.
470 dnl Additional warning/error flags can be passed as an optional second argument.
471 dnl
472 dnl For example: GNOME_COMPILE_WARNINGS([maximum],[-Werror=some-flag -Wfoobar])
473 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
474     dnl ******************************
475     dnl More compiler warnings
476     dnl ******************************
477
478     AC_ARG_ENABLE(compile-warnings, 
479                   AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
480                                  [Turn on compiler warnings]),,
481                   [enable_compile_warnings="m4_default([$1],[yes])"])
482
483     if test "x$GCC" != xyes; then
484         enable_compile_warnings=no
485     fi
486
487     warning_flags=
488     realsave_CFLAGS="$CFLAGS"
489
490     dnl These are warning flags that aren't marked as fatal.  Can be
491     dnl overridden on a per-project basis with -Wno-foo.
492     base_warn_flags=" \
493         -Wall \
494         -Wstrict-prototypes \
495         -Wnested-externs \
496     "
497
498     dnl These compiler flags typically indicate very broken or suspicious
499     dnl code.  Some of them such as implicit-function-declaration are
500     dnl just not default because gcc compiles a lot of legacy code.
501     dnl We choose to make this set into explicit errors.
502     base_error_flags=" \
503         -Werror=missing-prototypes \
504         -Werror=implicit-function-declaration \
505         -Werror=pointer-arith \
506         -Werror=init-self \
507         -Werror=format-security \
508         -Werror=format=2 \
509         -Werror=missing-include-dirs \
510     "
511
512     dnl Additional warning or error flags provided by the module author to
513     dnl allow stricter standards to be imposed on a per-module basis.
514     dnl The author can pass -W or -Werror flags here as they see fit.
515     additional_flags="m4_default([$2],[])"
516
517     case "$enable_compile_warnings" in
518     no)
519         warning_flags="-w"
520         ;;
521     minimum)
522         warning_flags="-Wall"
523         ;;
524     yes|maximum|error)
525         warning_flags="$base_warn_flags $base_error_flags $additional_flags"
526         ;;
527     *)
528         AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
529         ;;
530     esac
531
532     if test "$enable_compile_warnings" = "error" ; then
533         warning_flags="$warning_flags -Werror"
534     fi
535
536     dnl Check whether GCC supports the warning options
537     for option in $warning_flags; do
538         save_CFLAGS="$CFLAGS"
539         CFLAGS="$CFLAGS $option"
540         AC_MSG_CHECKING([whether gcc understands $option])
541         AC_TRY_COMPILE([], [],
542             has_option=yes,
543             has_option=no,)
544         CFLAGS="$save_CFLAGS"
545         AC_MSG_RESULT([$has_option])
546         if test $has_option = yes; then
547             tested_warning_flags="$tested_warning_flags $option"
548         fi
549         unset has_option
550         unset save_CFLAGS
551     done
552     unset option
553     CFLAGS="$realsave_CFLAGS"
554     AC_MSG_CHECKING(what warning flags to pass to the C compiler)
555     AC_MSG_RESULT($tested_warning_flags)
556
557     AC_ARG_ENABLE(iso-c,
558                   AS_HELP_STRING([--enable-iso-c],
559                                  [Try to warn if code is not ISO C ]),,
560                   [enable_iso_c=no])
561
562     AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
563     complCFLAGS=
564     if test "x$enable_iso_c" != "xno"; then
565         if test "x$GCC" = "xyes"; then
566         case " $CFLAGS " in
567             *[\ \       ]-ansi[\ \      ]*) ;;
568             *) complCFLAGS="$complCFLAGS -ansi" ;;
569         esac
570         case " $CFLAGS " in
571             *[\ \       ]-pedantic[\ \  ]*) ;;
572             *) complCFLAGS="$complCFLAGS -pedantic" ;;
573         esac
574         fi
575     fi
576     AC_MSG_RESULT($complCFLAGS)
577
578     WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
579     AC_SUBST(WARN_CFLAGS)
580 ])
581
582 dnl For C++, do basically the same thing.
583
584 AC_DEFUN([GNOME_CXX_WARNINGS],[
585   AC_ARG_ENABLE(cxx-warnings,
586                 AS_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
587                                [Turn on compiler warnings.]),,
588                 [enable_cxx_warnings="m4_default([$1],[minimum])"])
589
590   AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
591   warnCXXFLAGS=
592   if test "x$GXX" != xyes; then
593     enable_cxx_warnings=no
594   fi
595   if test "x$enable_cxx_warnings" != "xno"; then
596     if test "x$GXX" = "xyes"; then
597       case " $CXXFLAGS " in
598       *[\ \     ]-Wall[\ \      ]*) ;;
599       *) warnCXXFLAGS="-Wall -Wno-unused" ;;
600       esac
601
602       ## -W is not all that useful.  And it cannot be controlled
603       ## with individual -Wno-xxx flags, unlike -Wall
604       if test "x$enable_cxx_warnings" = "xyes"; then
605         warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
606       fi
607     fi
608   fi
609   AC_MSG_RESULT($warnCXXFLAGS)
610
611    AC_ARG_ENABLE(iso-cxx,
612                  AS_HELP_STRING([--enable-iso-cxx],
613                                 [Try to warn if code is not ISO C++ ]),,
614                  [enable_iso_cxx=no])
615
616    AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
617    complCXXFLAGS=
618    if test "x$enable_iso_cxx" != "xno"; then
619      if test "x$GXX" = "xyes"; then
620       case " $CXXFLAGS " in
621       *[\ \     ]-ansi[\ \      ]*) ;;
622       *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
623       esac
624
625       case " $CXXFLAGS " in
626       *[\ \     ]-pedantic[\ \  ]*) ;;
627       *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
628       esac
629      fi
630    fi
631   AC_MSG_RESULT($complCXXFLAGS)
632
633   WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
634   AC_SUBST(WARN_CXXFLAGS)
635 ])
636
637 dnl GLIB_GSETTINGS
638 dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
639 dnl the schema should be compiled
640 dnl
641
642 AC_DEFUN([GLIB_GSETTINGS],
643 [
644   m4_pattern_allow([AM_V_GEN])
645   AC_ARG_ENABLE(schemas-compile,
646                 AS_HELP_STRING([--disable-schemas-compile],
647                                [Disable regeneration of gschemas.compiled on install]),
648                 [case ${enableval} in
649                   yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
650                   no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
651                   *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
652                  esac])
653   AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
654   PKG_PROG_PKG_CONFIG([0.16])
655   AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
656   if test x$cross_compiling != xyes; then
657     GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
658   else
659     AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
660   fi
661   AC_SUBST(GLIB_COMPILE_SCHEMAS)
662   if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
663     ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
664   else
665     ifelse([$1],,[:],[$1])
666   fi
667
668   GSETTINGS_RULES='
669 .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
670
671 mostlyclean-am: clean-gsettings-schemas
672
673 gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
674
675 %.gschema.valid: %.gschema.xml $(gsettings__enum_file)
676         $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p [$](@D) && touch [$]@
677
678 all-am: $(gsettings_SCHEMAS:.xml=.valid)
679 uninstall-am: uninstall-gsettings-schemas
680 install-data-am: install-gsettings-schemas
681
682 .SECONDARY: $(gsettings_SCHEMAS)
683
684 install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
685         @$(NORMAL_INSTALL)
686         if test -n "$^"; then \
687                 test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
688                 $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
689                 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
690         fi
691
692 uninstall-gsettings-schemas:
693         @$(NORMAL_UNINSTALL)
694         @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
695         files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
696         test -n "$$files" || exit 0; \
697         echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
698         cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
699         test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
700
701 clean-gsettings-schemas:
702         rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
703
704 ifdef gsettings_ENUM_NAMESPACE
705 $(gsettings__enum_file): $(gsettings_ENUM_FILES)
706         $(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 [$]@
707 endif
708 '
709   _GSETTINGS_SUBST(GSETTINGS_RULES)
710 ])
711
712 dnl _GSETTINGS_SUBST(VARIABLE)
713 dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
714 AC_DEFUN([_GSETTINGS_SUBST],
715 [
716 AC_SUBST([$1])
717 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
718 ]
719 )
720
721 dnl -*- mode: autoconf -*-
722
723 # serial 2
724
725 dnl Usage:
726 dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
727 AC_DEFUN([GTK_DOC_CHECK],
728 [
729   AC_REQUIRE([PKG_PROG_PKG_CONFIG])
730   AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
731   AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
732
733   ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"])
734   AC_MSG_CHECKING([for gtk-doc])
735   PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
736   AC_MSG_RESULT($have_gtk_doc)
737
738   if test "$have_gtk_doc" = "no"; then
739       AC_MSG_WARN([
740   You will not be able to create source packages with 'make dist'
741   because $gtk_doc_requires is not found.])
742   fi
743
744   dnl check for tools we added during development
745   dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that
746   dnl may not be writable by the user. Currently, automake requires that the
747   dnl test name must end in '.test'.
748   dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638
749   AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test])
750   AC_PATH_PROG([GTKDOC_CHECK_PATH],[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   AC_MSG_CHECKING([whether to build gtk-doc documentation])
768   AC_MSG_RESULT($enable_gtk_doc)
769
770   if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then
771     AC_MSG_ERROR([
772   You must have $gtk_doc_requires installed to build documentation for
773   $PACKAGE_NAME. Please install gtk-doc or disable building the
774   documentation by adding '--disable-gtk-doc' to '[$]0'.])
775   fi
776
777   dnl don't check for glib if we build glib
778   if test "x$PACKAGE_NAME" != "xglib"; then
779     dnl don't fail if someone does not have glib
780     PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,[:])
781   fi
782
783   dnl enable/disable output formats
784   AC_ARG_ENABLE([gtk-doc-html],
785     AS_HELP_STRING([--enable-gtk-doc-html],
786                    [build documentation in html format [[default=yes]]]),,
787     [enable_gtk_doc_html=yes])
788     AC_ARG_ENABLE([gtk-doc-pdf],
789       AS_HELP_STRING([--enable-gtk-doc-pdf],
790                      [build documentation in pdf format [[default=no]]]),,
791       [enable_gtk_doc_pdf=no])
792
793   if test -z "$GTKDOC_MKPDF"; then
794     enable_gtk_doc_pdf=no
795   fi
796
797   if test -z "$AM_DEFAULT_VERBOSITY"; then
798     AM_DEFAULT_VERBOSITY=1
799   fi
800   AC_SUBST([AM_DEFAULT_VERBOSITY])
801
802   AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes])
803   AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
804   AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
805   AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
806   AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
807   AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
808 ])
809
810
811 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
812 # serial 42 IT_PROG_INTLTOOL
813 AC_DEFUN([IT_PROG_INTLTOOL], [
814 AC_PREREQ([2.50])dnl
815 AC_REQUIRE([AM_NLS])dnl
816
817 case "$am__api_version" in
818     1.[01234])
819         AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
820     ;;
821     *)
822     ;;
823 esac
824
825 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
826 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
827 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
828 if test -n "$1"; then
829     AC_MSG_CHECKING([for intltool >= $1])
830     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
831     test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
832         AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
833 fi
834
835 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
836 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
837 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
838 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
839     AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
840 fi
841
842 if test -z "$AM_DEFAULT_VERBOSITY"; then
843   AM_DEFAULT_VERBOSITY=1
844 fi
845 AC_SUBST([AM_DEFAULT_VERBOSITY])
846
847 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
848 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
849 INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
850 AC_SUBST(INTLTOOL_V_MERGE)
851 AC_SUBST(INTLTOOL__v_MERGE_)
852 AC_SUBST(INTLTOOL__v_MERGE_0)
853
854 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
855 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
856 intltool__v_merge_options_0='-q'
857 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
858 AC_SUBST(intltool__v_merge_options_)
859 AC_SUBST(intltool__v_merge_options_0)
860
861   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
862 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
863      INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
864      INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
865       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
866      INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
867    INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
868     INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
869 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
870        INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
871       INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
872 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
873       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
874 else
875       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
876 fi
877       INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
878       INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
879     INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
880   INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
881     INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
882     INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
883    INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
884
885 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
886 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
887 _IT_SUBST(INTLTOOL_KEYS_RULE)
888 _IT_SUBST(INTLTOOL_PROP_RULE)
889 _IT_SUBST(INTLTOOL_OAF_RULE)
890 _IT_SUBST(INTLTOOL_PONG_RULE)
891 _IT_SUBST(INTLTOOL_SERVER_RULE)
892 _IT_SUBST(INTLTOOL_SHEET_RULE)
893 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
894 _IT_SUBST(INTLTOOL_UI_RULE)
895 _IT_SUBST(INTLTOOL_XAM_RULE)
896 _IT_SUBST(INTLTOOL_KBD_RULE)
897 _IT_SUBST(INTLTOOL_XML_RULE)
898 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
899 _IT_SUBST(INTLTOOL_CAVES_RULE)
900 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
901 _IT_SUBST(INTLTOOL_THEME_RULE)
902 _IT_SUBST(INTLTOOL_SERVICE_RULE)
903 _IT_SUBST(INTLTOOL_POLICY_RULE)
904
905 # Check the gettext tools to make sure they are GNU
906 AC_PATH_PROG(XGETTEXT, xgettext)
907 AC_PATH_PROG(MSGMERGE, msgmerge)
908 AC_PATH_PROG(MSGFMT, msgfmt)
909 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
910 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
911     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
912 fi
913 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
914 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
915 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
916 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
917     AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
918 fi
919
920 AC_PATH_PROG(INTLTOOL_PERL, perl)
921 if test -z "$INTLTOOL_PERL"; then
922    AC_MSG_ERROR([perl not found])
923 fi
924 AC_MSG_CHECKING([for perl >= 5.8.1])
925 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
926 if test $? -ne 0; then
927    AC_MSG_ERROR([perl 5.8.1 is required for intltool])
928 else
929    IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
930    AC_MSG_RESULT([$IT_PERL_VERSION])
931 fi
932 if test "x$2" != "xno-xml"; then
933    AC_MSG_CHECKING([for XML::Parser])
934    if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
935        AC_MSG_RESULT([ok])
936    else
937        AC_MSG_ERROR([XML::Parser perl module is required for intltool])
938    fi
939 fi
940
941 # Substitute ALL_LINGUAS so we can use it in po/Makefile
942 AC_SUBST(ALL_LINGUAS)
943
944 IT_PO_SUBDIR([po])
945
946 ])
947
948
949 # IT_PO_SUBDIR(DIRNAME)
950 # ---------------------
951 # All po subdirs have to be declared with this macro; the subdir "po" is
952 # declared by IT_PROG_INTLTOOL.
953 #
954 AC_DEFUN([IT_PO_SUBDIR],
955 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
956 dnl
957 dnl The following CONFIG_COMMANDS should be executed at the very end
958 dnl of config.status.
959 AC_CONFIG_COMMANDS_PRE([
960   AC_CONFIG_COMMANDS([$1/stamp-it], [
961     if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
962        AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
963     fi
964     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
965     >"$1/stamp-it.tmp"
966     [sed '/^#/d
967          s/^[[].*] *//
968          /^[    ]*$/d
969         '"s|^|  $ac_top_srcdir/|" \
970       "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
971     ]
972     [sed '/^POTFILES =/,/[^\\]$/ {
973                 /^POTFILES =/!d
974                 r $1/POTFILES
975           }
976          ' "$1/Makefile.in" >"$1/Makefile"]
977     rm -f "$1/Makefile.tmp"
978     mv "$1/stamp-it.tmp" "$1/stamp-it"
979   ])
980 ])dnl
981 ])
982
983 # _IT_SUBST(VARIABLE)
984 # -------------------
985 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
986 #
987 AC_DEFUN([_IT_SUBST],
988 [
989 AC_SUBST([$1])
990 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
991 ]
992 )
993
994 # deprecated macros
995 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
996 # A hint is needed for aclocal from Automake <= 1.9.4:
997 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
998
999
1000 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1001 #
1002 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1003 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1004 #                 Foundation, Inc.
1005 #   Written by Gordon Matzigkeit, 1996
1006 #
1007 # This file is free software; the Free Software Foundation gives
1008 # unlimited permission to copy and/or distribute it, with or without
1009 # modifications, as long as this notice is preserved.
1010
1011 m4_define([_LT_COPYING], [dnl
1012 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1013 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1014 #                 Foundation, Inc.
1015 #   Written by Gordon Matzigkeit, 1996
1016 #
1017 #   This file is part of GNU Libtool.
1018 #
1019 # GNU Libtool is free software; you can redistribute it and/or
1020 # modify it under the terms of the GNU General Public License as
1021 # published by the Free Software Foundation; either version 2 of
1022 # the License, or (at your option) any later version.
1023 #
1024 # As a special exception to the GNU General Public License,
1025 # if you distribute this file as part of a program or library that
1026 # is built using GNU Libtool, you may include this file under the
1027 # same distribution terms that you use for the rest of that program.
1028 #
1029 # GNU Libtool is distributed in the hope that it will be useful,
1030 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1031 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1032 # GNU General Public License for more details.
1033 #
1034 # You should have received a copy of the GNU General Public License
1035 # along with GNU Libtool; see the file COPYING.  If not, a copy
1036 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1037 # obtained by writing to the Free Software Foundation, Inc.,
1038 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1039 ])
1040
1041 # serial 57 LT_INIT
1042
1043
1044 # LT_PREREQ(VERSION)
1045 # ------------------
1046 # Complain and exit if this libtool version is less that VERSION.
1047 m4_defun([LT_PREREQ],
1048 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1049        [m4_default([$3],
1050                    [m4_fatal([Libtool version $1 or higher is required],
1051                              63)])],
1052        [$2])])
1053
1054
1055 # _LT_CHECK_BUILDDIR
1056 # ------------------
1057 # Complain if the absolute build directory name contains unusual characters
1058 m4_defun([_LT_CHECK_BUILDDIR],
1059 [case `pwd` in
1060   *\ * | *\     *)
1061     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1062 esac
1063 ])
1064
1065
1066 # LT_INIT([OPTIONS])
1067 # ------------------
1068 AC_DEFUN([LT_INIT],
1069 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1070 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1071 AC_BEFORE([$0], [LT_LANG])dnl
1072 AC_BEFORE([$0], [LT_OUTPUT])dnl
1073 AC_BEFORE([$0], [LTDL_INIT])dnl
1074 m4_require([_LT_CHECK_BUILDDIR])dnl
1075
1076 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1077 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1078 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1079 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1080 dnl unless we require an AC_DEFUNed macro:
1081 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1082 AC_REQUIRE([LTSUGAR_VERSION])dnl
1083 AC_REQUIRE([LTVERSION_VERSION])dnl
1084 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1085 m4_require([_LT_PROG_LTMAIN])dnl
1086
1087 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1088
1089 dnl Parse OPTIONS
1090 _LT_SET_OPTIONS([$0], [$1])
1091
1092 # This can be used to rebuild libtool when needed
1093 LIBTOOL_DEPS="$ltmain"
1094
1095 # Always use our own libtool.
1096 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1097 AC_SUBST(LIBTOOL)dnl
1098
1099 _LT_SETUP
1100
1101 # Only expand once:
1102 m4_define([LT_INIT])
1103 ])# LT_INIT
1104
1105 # Old names:
1106 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1107 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1108 dnl aclocal-1.4 backwards compatibility:
1109 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1110 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1111
1112
1113 # _LT_CC_BASENAME(CC)
1114 # -------------------
1115 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1116 m4_defun([_LT_CC_BASENAME],
1117 [for cc_temp in $1""; do
1118   case $cc_temp in
1119     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1120     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1121     \-*) ;;
1122     *) break;;
1123   esac
1124 done
1125 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1126 ])
1127
1128
1129 # _LT_FILEUTILS_DEFAULTS
1130 # ----------------------
1131 # It is okay to use these file commands and assume they have been set
1132 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1133 m4_defun([_LT_FILEUTILS_DEFAULTS],
1134 [: ${CP="cp -f"}
1135 : ${MV="mv -f"}
1136 : ${RM="rm -f"}
1137 ])# _LT_FILEUTILS_DEFAULTS
1138
1139
1140 # _LT_SETUP
1141 # ---------
1142 m4_defun([_LT_SETUP],
1143 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1144 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1145 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1146 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1147
1148 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1149 dnl
1150 _LT_DECL([], [host_alias], [0], [The host system])dnl
1151 _LT_DECL([], [host], [0])dnl
1152 _LT_DECL([], [host_os], [0])dnl
1153 dnl
1154 _LT_DECL([], [build_alias], [0], [The build system])dnl
1155 _LT_DECL([], [build], [0])dnl
1156 _LT_DECL([], [build_os], [0])dnl
1157 dnl
1158 AC_REQUIRE([AC_PROG_CC])dnl
1159 AC_REQUIRE([LT_PATH_LD])dnl
1160 AC_REQUIRE([LT_PATH_NM])dnl
1161 dnl
1162 AC_REQUIRE([AC_PROG_LN_S])dnl
1163 test -z "$LN_S" && LN_S="ln -s"
1164 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1165 dnl
1166 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1167 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1168 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1169 dnl
1170 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1171 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1172 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1173 m4_require([_LT_CMD_RELOAD])dnl
1174 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1175 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1176 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1177 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1178 m4_require([_LT_WITH_SYSROOT])dnl
1179
1180 _LT_CONFIG_LIBTOOL_INIT([
1181 # See if we are running on zsh, and set the options which allow our
1182 # commands through without removal of \ escapes INIT.
1183 if test -n "\${ZSH_VERSION+set}" ; then
1184    setopt NO_GLOB_SUBST
1185 fi
1186 ])
1187 if test -n "${ZSH_VERSION+set}" ; then
1188    setopt NO_GLOB_SUBST
1189 fi
1190
1191 _LT_CHECK_OBJDIR
1192
1193 m4_require([_LT_TAG_COMPILER])dnl
1194
1195 case $host_os in
1196 aix3*)
1197   # AIX sometimes has problems with the GCC collect2 program.  For some
1198   # reason, if we set the COLLECT_NAMES environment variable, the problems
1199   # vanish in a puff of smoke.
1200   if test "X${COLLECT_NAMES+set}" != Xset; then
1201     COLLECT_NAMES=
1202     export COLLECT_NAMES
1203   fi
1204   ;;
1205 esac
1206
1207 # Global variables:
1208 ofile=libtool
1209 can_build_shared=yes
1210
1211 # All known linkers require a `.a' archive for static linking (except MSVC,
1212 # which needs '.lib').
1213 libext=a
1214
1215 with_gnu_ld="$lt_cv_prog_gnu_ld"
1216
1217 old_CC="$CC"
1218 old_CFLAGS="$CFLAGS"
1219
1220 # Set sane defaults for various variables
1221 test -z "$CC" && CC=cc
1222 test -z "$LTCC" && LTCC=$CC
1223 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1224 test -z "$LD" && LD=ld
1225 test -z "$ac_objext" && ac_objext=o
1226
1227 _LT_CC_BASENAME([$compiler])
1228
1229 # Only perform the check for file, if the check method requires it
1230 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1231 case $deplibs_check_method in
1232 file_magic*)
1233   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1234     _LT_PATH_MAGIC
1235   fi
1236   ;;
1237 esac
1238
1239 # Use C for the default configuration in the libtool script
1240 LT_SUPPORTED_TAG([CC])
1241 _LT_LANG_C_CONFIG
1242 _LT_LANG_DEFAULT_CONFIG
1243 _LT_CONFIG_COMMANDS
1244 ])# _LT_SETUP
1245
1246
1247 # _LT_PREPARE_SED_QUOTE_VARS
1248 # --------------------------
1249 # Define a few sed substitution that help us do robust quoting.
1250 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1251 [# Backslashify metacharacters that are still active within
1252 # double-quoted strings.
1253 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1254
1255 # Same as above, but do not quote variable references.
1256 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1257
1258 # Sed substitution to delay expansion of an escaped shell variable in a
1259 # double_quote_subst'ed string.
1260 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1261
1262 # Sed substitution to delay expansion of an escaped single quote.
1263 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1264
1265 # Sed substitution to avoid accidental globbing in evaled expressions
1266 no_glob_subst='s/\*/\\\*/g'
1267 ])
1268
1269 # _LT_PROG_LTMAIN
1270 # ---------------
1271 # Note that this code is called both from `configure', and `config.status'
1272 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1273 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1274 # so we pass a copy along to make sure it has a sensible value anyway.
1275 m4_defun([_LT_PROG_LTMAIN],
1276 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1277 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1278 ltmain="$ac_aux_dir/ltmain.sh"
1279 ])# _LT_PROG_LTMAIN
1280
1281
1282
1283 # So that we can recreate a full libtool script including additional
1284 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1285 # in macros and then make a single call at the end using the `libtool'
1286 # label.
1287
1288
1289 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1290 # ----------------------------------------
1291 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1292 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1293 [m4_ifval([$1],
1294           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1295                      [$1
1296 ])])])
1297
1298 # Initialize.
1299 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1300
1301
1302 # _LT_CONFIG_LIBTOOL([COMMANDS])
1303 # ------------------------------
1304 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1305 m4_define([_LT_CONFIG_LIBTOOL],
1306 [m4_ifval([$1],
1307           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1308                      [$1
1309 ])])])
1310
1311 # Initialize.
1312 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1313
1314
1315 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1316 # -----------------------------------------------------
1317 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1318 [_LT_CONFIG_LIBTOOL([$1])
1319 _LT_CONFIG_LIBTOOL_INIT([$2])
1320 ])
1321
1322
1323 # _LT_FORMAT_COMMENT([COMMENT])
1324 # -----------------------------
1325 # Add leading comment marks to the start of each line, and a trailing
1326 # full-stop to the whole comment if one is not present already.
1327 m4_define([_LT_FORMAT_COMMENT],
1328 [m4_ifval([$1], [
1329 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1330               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1331 )])
1332
1333
1334
1335
1336
1337 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1338 # -------------------------------------------------------------------
1339 # CONFIGNAME is the name given to the value in the libtool script.
1340 # VARNAME is the (base) name used in the configure script.
1341 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1342 # VARNAME.  Any other value will be used directly.
1343 m4_define([_LT_DECL],
1344 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1345     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1346         [m4_ifval([$1], [$1], [$2])])
1347     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1348     m4_ifval([$4],
1349         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1350     lt_dict_add_subkey([lt_decl_dict], [$2],
1351         [tagged?], [m4_ifval([$5], [yes], [no])])])
1352 ])
1353
1354
1355 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1356 # --------------------------------------------------------
1357 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1358
1359
1360 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1361 # ------------------------------------------------
1362 m4_define([lt_decl_tag_varnames],
1363 [_lt_decl_filter([tagged?], [yes], $@)])
1364
1365
1366 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1367 # ---------------------------------------------------------
1368 m4_define([_lt_decl_filter],
1369 [m4_case([$#],
1370   [0], [m4_fatal([$0: too few arguments: $#])],
1371   [1], [m4_fatal([$0: too few arguments: $#: $1])],
1372   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1373   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1374   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1375 ])
1376
1377
1378 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1379 # --------------------------------------------------
1380 m4_define([lt_decl_quote_varnames],
1381 [_lt_decl_filter([value], [1], $@)])
1382
1383
1384 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1385 # ---------------------------------------------------
1386 m4_define([lt_decl_dquote_varnames],
1387 [_lt_decl_filter([value], [2], $@)])
1388
1389
1390 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1391 # ---------------------------------------------------
1392 m4_define([lt_decl_varnames_tagged],
1393 [m4_assert([$# <= 2])dnl
1394 _$0(m4_quote(m4_default([$1], [[, ]])),
1395     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1396     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1397 m4_define([_lt_decl_varnames_tagged],
1398 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1399
1400
1401 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1402 # ------------------------------------------------
1403 m4_define([lt_decl_all_varnames],
1404 [_$0(m4_quote(m4_default([$1], [[, ]])),
1405      m4_if([$2], [],
1406            m4_quote(lt_decl_varnames),
1407         m4_quote(m4_shift($@))))[]dnl
1408 ])
1409 m4_define([_lt_decl_all_varnames],
1410 [lt_join($@, lt_decl_varnames_tagged([$1],
1411                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1412 ])
1413
1414
1415 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1416 # ------------------------------------
1417 # Quote a variable value, and forward it to `config.status' so that its
1418 # declaration there will have the same value as in `configure'.  VARNAME
1419 # must have a single quote delimited value for this to work.
1420 m4_define([_LT_CONFIG_STATUS_DECLARE],
1421 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1422
1423
1424 # _LT_CONFIG_STATUS_DECLARATIONS
1425 # ------------------------------
1426 # We delimit libtool config variables with single quotes, so when
1427 # we write them to config.status, we have to be sure to quote all
1428 # embedded single quotes properly.  In configure, this macro expands
1429 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1430 #
1431 #    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1432 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1433 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1434     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1435
1436
1437 # _LT_LIBTOOL_TAGS
1438 # ----------------
1439 # Output comment and list of tags supported by the script
1440 m4_defun([_LT_LIBTOOL_TAGS],
1441 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1442 available_tags="_LT_TAGS"dnl
1443 ])
1444
1445
1446 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1447 # -----------------------------------
1448 # Extract the dictionary values for VARNAME (optionally with TAG) and
1449 # expand to a commented shell variable setting:
1450 #
1451 #    # Some comment about what VAR is for.
1452 #    visible_name=$lt_internal_name
1453 m4_define([_LT_LIBTOOL_DECLARE],
1454 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1455                                            [description])))[]dnl
1456 m4_pushdef([_libtool_name],
1457     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1458 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1459     [0], [_libtool_name=[$]$1],
1460     [1], [_libtool_name=$lt_[]$1],
1461     [2], [_libtool_name=$lt_[]$1],
1462     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1463 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1464 ])
1465
1466
1467 # _LT_LIBTOOL_CONFIG_VARS
1468 # -----------------------
1469 # Produce commented declarations of non-tagged libtool config variables
1470 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1471 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1472 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1473 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1474 [m4_foreach([_lt_var],
1475     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1476     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1477
1478
1479 # _LT_LIBTOOL_TAG_VARS(TAG)
1480 # -------------------------
1481 m4_define([_LT_LIBTOOL_TAG_VARS],
1482 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1483     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1484
1485
1486 # _LT_TAGVAR(VARNAME, [TAGNAME])
1487 # ------------------------------
1488 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1489
1490
1491 # _LT_CONFIG_COMMANDS
1492 # -------------------
1493 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1494 # variables for single and double quote escaping we saved from calls
1495 # to _LT_DECL, we can put quote escaped variables declarations
1496 # into `config.status', and then the shell code to quote escape them in
1497 # for loops in `config.status'.  Finally, any additional code accumulated
1498 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1499 m4_defun([_LT_CONFIG_COMMANDS],
1500 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1501         dnl If the libtool generation code has been placed in $CONFIG_LT,
1502         dnl instead of duplicating it all over again into config.status,
1503         dnl then we will have config.status run $CONFIG_LT later, so it
1504         dnl needs to know what name is stored there:
1505         [AC_CONFIG_COMMANDS([libtool],
1506             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1507     dnl If the libtool generation code is destined for config.status,
1508     dnl expand the accumulated commands and init code now:
1509     [AC_CONFIG_COMMANDS([libtool],
1510         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1511 ])#_LT_CONFIG_COMMANDS
1512
1513
1514 # Initialize.
1515 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1516 [
1517
1518 # The HP-UX ksh and POSIX shell print the target directory to stdout
1519 # if CDPATH is set.
1520 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1521
1522 sed_quote_subst='$sed_quote_subst'
1523 double_quote_subst='$double_quote_subst'
1524 delay_variable_subst='$delay_variable_subst'
1525 _LT_CONFIG_STATUS_DECLARATIONS
1526 LTCC='$LTCC'
1527 LTCFLAGS='$LTCFLAGS'
1528 compiler='$compiler_DEFAULT'
1529
1530 # A function that is used when there is no print builtin or printf.
1531 func_fallback_echo ()
1532 {
1533   eval 'cat <<_LTECHO_EOF
1534 \$[]1
1535 _LTECHO_EOF'
1536 }
1537
1538 # Quote evaled strings.
1539 for var in lt_decl_all_varnames([[ \
1540 ]], lt_decl_quote_varnames); do
1541     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1542     *[[\\\\\\\`\\"\\\$]]*)
1543       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1544       ;;
1545     *)
1546       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1547       ;;
1548     esac
1549 done
1550
1551 # Double-quote double-evaled strings.
1552 for var in lt_decl_all_varnames([[ \
1553 ]], lt_decl_dquote_varnames); do
1554     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1555     *[[\\\\\\\`\\"\\\$]]*)
1556       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1557       ;;
1558     *)
1559       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1560       ;;
1561     esac
1562 done
1563
1564 _LT_OUTPUT_LIBTOOL_INIT
1565 ])
1566
1567 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1568 # ------------------------------------
1569 # Generate a child script FILE with all initialization necessary to
1570 # reuse the environment learned by the parent script, and make the
1571 # file executable.  If COMMENT is supplied, it is inserted after the
1572 # `#!' sequence but before initialization text begins.  After this
1573 # macro, additional text can be appended to FILE to form the body of
1574 # the child script.  The macro ends with non-zero status if the
1575 # file could not be fully written (such as if the disk is full).
1576 m4_ifdef([AS_INIT_GENERATED],
1577 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1578 [m4_defun([_LT_GENERATED_FILE_INIT],
1579 [m4_require([AS_PREPARE])]dnl
1580 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1581 [lt_write_fail=0
1582 cat >$1 <<_ASEOF || lt_write_fail=1
1583 #! $SHELL
1584 # Generated by $as_me.
1585 $2
1586 SHELL=\${CONFIG_SHELL-$SHELL}
1587 export SHELL
1588 _ASEOF
1589 cat >>$1 <<\_ASEOF || lt_write_fail=1
1590 AS_SHELL_SANITIZE
1591 _AS_PREPARE
1592 exec AS_MESSAGE_FD>&1
1593 _ASEOF
1594 test $lt_write_fail = 0 && chmod +x $1[]dnl
1595 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1596
1597 # LT_OUTPUT
1598 # ---------
1599 # This macro allows early generation of the libtool script (before
1600 # AC_OUTPUT is called), incase it is used in configure for compilation
1601 # tests.
1602 AC_DEFUN([LT_OUTPUT],
1603 [: ${CONFIG_LT=./config.lt}
1604 AC_MSG_NOTICE([creating $CONFIG_LT])
1605 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1606 [# Run this file to recreate a libtool stub with the current configuration.])
1607
1608 cat >>"$CONFIG_LT" <<\_LTEOF
1609 lt_cl_silent=false
1610 exec AS_MESSAGE_LOG_FD>>config.log
1611 {
1612   echo
1613   AS_BOX([Running $as_me.])
1614 } >&AS_MESSAGE_LOG_FD
1615
1616 lt_cl_help="\
1617 \`$as_me' creates a local libtool stub from the current configuration,
1618 for use in further configure time tests before the real libtool is
1619 generated.
1620
1621 Usage: $[0] [[OPTIONS]]
1622
1623   -h, --help      print this help, then exit
1624   -V, --version   print version number, then exit
1625   -q, --quiet     do not print progress messages
1626   -d, --debug     don't remove temporary files
1627
1628 Report bugs to <bug-libtool@gnu.org>."
1629
1630 lt_cl_version="\
1631 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1632 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1633 configured by $[0], generated by m4_PACKAGE_STRING.
1634
1635 Copyright (C) 2011 Free Software Foundation, Inc.
1636 This config.lt script is free software; the Free Software Foundation
1637 gives unlimited permision to copy, distribute and modify it."
1638
1639 while test $[#] != 0
1640 do
1641   case $[1] in
1642     --version | --v* | -V )
1643       echo "$lt_cl_version"; exit 0 ;;
1644     --help | --h* | -h )
1645       echo "$lt_cl_help"; exit 0 ;;
1646     --debug | --d* | -d )
1647       debug=: ;;
1648     --quiet | --q* | --silent | --s* | -q )
1649       lt_cl_silent=: ;;
1650
1651     -*) AC_MSG_ERROR([unrecognized option: $[1]
1652 Try \`$[0] --help' for more information.]) ;;
1653
1654     *) AC_MSG_ERROR([unrecognized argument: $[1]
1655 Try \`$[0] --help' for more information.]) ;;
1656   esac
1657   shift
1658 done
1659
1660 if $lt_cl_silent; then
1661   exec AS_MESSAGE_FD>/dev/null
1662 fi
1663 _LTEOF
1664
1665 cat >>"$CONFIG_LT" <<_LTEOF
1666 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1667 _LTEOF
1668
1669 cat >>"$CONFIG_LT" <<\_LTEOF
1670 AC_MSG_NOTICE([creating $ofile])
1671 _LT_OUTPUT_LIBTOOL_COMMANDS
1672 AS_EXIT(0)
1673 _LTEOF
1674 chmod +x "$CONFIG_LT"
1675
1676 # configure is writing to config.log, but config.lt does its own redirection,
1677 # appending to config.log, which fails on DOS, as config.log is still kept
1678 # open by configure.  Here we exec the FD to /dev/null, effectively closing
1679 # config.log, so it can be properly (re)opened and appended to by config.lt.
1680 lt_cl_success=:
1681 test "$silent" = yes &&
1682   lt_config_lt_args="$lt_config_lt_args --quiet"
1683 exec AS_MESSAGE_LOG_FD>/dev/null
1684 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1685 exec AS_MESSAGE_LOG_FD>>config.log
1686 $lt_cl_success || AS_EXIT(1)
1687 ])# LT_OUTPUT
1688
1689
1690 # _LT_CONFIG(TAG)
1691 # ---------------
1692 # If TAG is the built-in tag, create an initial libtool script with a
1693 # default configuration from the untagged config vars.  Otherwise add code
1694 # to config.status for appending the configuration named by TAG from the
1695 # matching tagged config vars.
1696 m4_defun([_LT_CONFIG],
1697 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1698 _LT_CONFIG_SAVE_COMMANDS([
1699   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1700   m4_if(_LT_TAG, [C], [
1701     # See if we are running on zsh, and set the options which allow our
1702     # commands through without removal of \ escapes.
1703     if test -n "${ZSH_VERSION+set}" ; then
1704       setopt NO_GLOB_SUBST
1705     fi
1706
1707     cfgfile="${ofile}T"
1708     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1709     $RM "$cfgfile"
1710
1711     cat <<_LT_EOF >> "$cfgfile"
1712 #! $SHELL
1713
1714 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1715 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1716 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1717 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1718 #
1719 _LT_COPYING
1720 _LT_LIBTOOL_TAGS
1721
1722 # ### BEGIN LIBTOOL CONFIG
1723 _LT_LIBTOOL_CONFIG_VARS
1724 _LT_LIBTOOL_TAG_VARS
1725 # ### END LIBTOOL CONFIG
1726
1727 _LT_EOF
1728
1729   case $host_os in
1730   aix3*)
1731     cat <<\_LT_EOF >> "$cfgfile"
1732 # AIX sometimes has problems with the GCC collect2 program.  For some
1733 # reason, if we set the COLLECT_NAMES environment variable, the problems
1734 # vanish in a puff of smoke.
1735 if test "X${COLLECT_NAMES+set}" != Xset; then
1736   COLLECT_NAMES=
1737   export COLLECT_NAMES
1738 fi
1739 _LT_EOF
1740     ;;
1741   esac
1742
1743   _LT_PROG_LTMAIN
1744
1745   # We use sed instead of cat because bash on DJGPP gets confused if
1746   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1747   # text mode, it properly converts lines to CR/LF.  This bash problem
1748   # is reportedly fixed, but why not run on old versions too?
1749   sed '$q' "$ltmain" >> "$cfgfile" \
1750      || (rm -f "$cfgfile"; exit 1)
1751
1752   _LT_PROG_REPLACE_SHELLFNS
1753
1754    mv -f "$cfgfile" "$ofile" ||
1755     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1756   chmod +x "$ofile"
1757 ],
1758 [cat <<_LT_EOF >> "$ofile"
1759
1760 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1761 dnl in a comment (ie after a #).
1762 # ### BEGIN LIBTOOL TAG CONFIG: $1
1763 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
1764 # ### END LIBTOOL TAG CONFIG: $1
1765 _LT_EOF
1766 ])dnl /m4_if
1767 ],
1768 [m4_if([$1], [], [
1769     PACKAGE='$PACKAGE'
1770     VERSION='$VERSION'
1771     TIMESTAMP='$TIMESTAMP'
1772     RM='$RM'
1773     ofile='$ofile'], [])
1774 ])dnl /_LT_CONFIG_SAVE_COMMANDS
1775 ])# _LT_CONFIG
1776
1777
1778 # LT_SUPPORTED_TAG(TAG)
1779 # ---------------------
1780 # Trace this macro to discover what tags are supported by the libtool
1781 # --tag option, using:
1782 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1783 AC_DEFUN([LT_SUPPORTED_TAG], [])
1784
1785
1786 # C support is built-in for now
1787 m4_define([_LT_LANG_C_enabled], [])
1788 m4_define([_LT_TAGS], [])
1789
1790
1791 # LT_LANG(LANG)
1792 # -------------
1793 # Enable libtool support for the given language if not already enabled.
1794 AC_DEFUN([LT_LANG],
1795 [AC_BEFORE([$0], [LT_OUTPUT])dnl
1796 m4_case([$1],
1797   [C],                  [_LT_LANG(C)],
1798   [C++],                [_LT_LANG(CXX)],
1799   [Go],                 [_LT_LANG(GO)],
1800   [Java],               [_LT_LANG(GCJ)],
1801   [Fortran 77],         [_LT_LANG(F77)],
1802   [Fortran],            [_LT_LANG(FC)],
1803   [Windows Resource],   [_LT_LANG(RC)],
1804   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1805     [_LT_LANG($1)],
1806     [m4_fatal([$0: unsupported language: "$1"])])])dnl
1807 ])# LT_LANG
1808
1809
1810 # _LT_LANG(LANGNAME)
1811 # ------------------
1812 m4_defun([_LT_LANG],
1813 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
1814   [LT_SUPPORTED_TAG([$1])dnl
1815   m4_append([_LT_TAGS], [$1 ])dnl
1816   m4_define([_LT_LANG_]$1[_enabled], [])dnl
1817   _LT_LANG_$1_CONFIG($1)])dnl
1818 ])# _LT_LANG
1819
1820
1821 m4_ifndef([AC_PROG_GO], [
1822 # NOTE: This macro has been submitted for inclusion into   #
1823 #  GNU Autoconf as AC_PROG_GO.  When it is available in    #
1824 #  a released version of Autoconf we should remove this    #
1825 #  macro and use it instead.                               #
1826 m4_defun([AC_PROG_GO],
1827 [AC_LANG_PUSH(Go)dnl
1828 AC_ARG_VAR([GOC],     [Go compiler command])dnl
1829 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1830 _AC_ARG_VAR_LDFLAGS()dnl
1831 AC_CHECK_TOOL(GOC, gccgo)
1832 if test -z "$GOC"; then
1833   if test -n "$ac_tool_prefix"; then
1834     AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1835   fi
1836 fi
1837 if test -z "$GOC"; then
1838   AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1839 fi
1840 ])#m4_defun
1841 ])#m4_ifndef
1842
1843
1844 # _LT_LANG_DEFAULT_CONFIG
1845 # -----------------------
1846 m4_defun([_LT_LANG_DEFAULT_CONFIG],
1847 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
1848   [LT_LANG(CXX)],
1849   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1850
1851 AC_PROVIDE_IFELSE([AC_PROG_F77],
1852   [LT_LANG(F77)],
1853   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1854
1855 AC_PROVIDE_IFELSE([AC_PROG_FC],
1856   [LT_LANG(FC)],
1857   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1858
1859 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1860 dnl pulling things in needlessly.
1861 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1862   [LT_LANG(GCJ)],
1863   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1864     [LT_LANG(GCJ)],
1865     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1866       [LT_LANG(GCJ)],
1867       [m4_ifdef([AC_PROG_GCJ],
1868         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1869        m4_ifdef([A][M_PROG_GCJ],
1870         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1871        m4_ifdef([LT_PROG_GCJ],
1872         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1873
1874 AC_PROVIDE_IFELSE([AC_PROG_GO],
1875   [LT_LANG(GO)],
1876   [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
1877
1878 AC_PROVIDE_IFELSE([LT_PROG_RC],
1879   [LT_LANG(RC)],
1880   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1881 ])# _LT_LANG_DEFAULT_CONFIG
1882
1883 # Obsolete macros:
1884 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1885 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1886 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1887 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1888 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1889 dnl aclocal-1.4 backwards compatibility:
1890 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1891 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1892 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1893 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1894 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1895
1896
1897 # _LT_TAG_COMPILER
1898 # ----------------
1899 m4_defun([_LT_TAG_COMPILER],
1900 [AC_REQUIRE([AC_PROG_CC])dnl
1901
1902 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1903 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1904 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1905 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1906
1907 # If no C compiler was specified, use CC.
1908 LTCC=${LTCC-"$CC"}
1909
1910 # If no C compiler flags were specified, use CFLAGS.
1911 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1912
1913 # Allow CC to be a program name with arguments.
1914 compiler=$CC
1915 ])# _LT_TAG_COMPILER
1916
1917
1918 # _LT_COMPILER_BOILERPLATE
1919 # ------------------------
1920 # Check for compiler boilerplate output or warnings with
1921 # the simple compiler test code.
1922 m4_defun([_LT_COMPILER_BOILERPLATE],
1923 [m4_require([_LT_DECL_SED])dnl
1924 ac_outfile=conftest.$ac_objext
1925 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1926 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1927 _lt_compiler_boilerplate=`cat conftest.err`
1928 $RM conftest*
1929 ])# _LT_COMPILER_BOILERPLATE
1930
1931
1932 # _LT_LINKER_BOILERPLATE
1933 # ----------------------
1934 # Check for linker boilerplate output or warnings with
1935 # the simple link test code.
1936 m4_defun([_LT_LINKER_BOILERPLATE],
1937 [m4_require([_LT_DECL_SED])dnl
1938 ac_outfile=conftest.$ac_objext
1939 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1940 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1941 _lt_linker_boilerplate=`cat conftest.err`
1942 $RM -r conftest*
1943 ])# _LT_LINKER_BOILERPLATE
1944
1945 # _LT_REQUIRED_DARWIN_CHECKS
1946 # -------------------------
1947 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1948   case $host_os in
1949     rhapsody* | darwin*)
1950     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1951     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1952     AC_CHECK_TOOL([LIPO], [lipo], [:])
1953     AC_CHECK_TOOL([OTOOL], [otool], [:])
1954     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1955     _LT_DECL([], [DSYMUTIL], [1],
1956       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1957     _LT_DECL([], [NMEDIT], [1],
1958       [Tool to change global to local symbols on Mac OS X])
1959     _LT_DECL([], [LIPO], [1],
1960       [Tool to manipulate fat objects and archives on Mac OS X])
1961     _LT_DECL([], [OTOOL], [1],
1962       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1963     _LT_DECL([], [OTOOL64], [1],
1964       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1965
1966     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1967       [lt_cv_apple_cc_single_mod=no
1968       if test -z "${LT_MULTI_MODULE}"; then
1969         # By default we will add the -single_module flag. You can override
1970         # by either setting the environment variable LT_MULTI_MODULE
1971         # non-empty at configure time, or by adding -multi_module to the
1972         # link flags.
1973         rm -rf libconftest.dylib*
1974         echo "int foo(void){return 1;}" > conftest.c
1975         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1976 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1977         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1978           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1979         _lt_result=$?
1980         # If there is a non-empty error log, and "single_module"
1981         # appears in it, assume the flag caused a linker warning
1982         if test -s conftest.err && $GREP single_module conftest.err; then
1983           cat conftest.err >&AS_MESSAGE_LOG_FD
1984         # Otherwise, if the output was created with a 0 exit code from
1985         # the compiler, it worked.
1986         elif test -f libconftest.dylib && test $_lt_result -eq 0; then
1987           lt_cv_apple_cc_single_mod=yes
1988         else
1989           cat conftest.err >&AS_MESSAGE_LOG_FD
1990         fi
1991         rm -rf libconftest.dylib*
1992         rm -f conftest.*
1993       fi])
1994
1995     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1996       [lt_cv_ld_exported_symbols_list],
1997       [lt_cv_ld_exported_symbols_list=no
1998       save_LDFLAGS=$LDFLAGS
1999       echo "_main" > conftest.sym
2000       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2001       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2002         [lt_cv_ld_exported_symbols_list=yes],
2003         [lt_cv_ld_exported_symbols_list=no])
2004         LDFLAGS="$save_LDFLAGS"
2005     ])
2006
2007     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2008       [lt_cv_ld_force_load=no
2009       cat > conftest.c << _LT_EOF
2010 int forced_loaded() { return 2;}
2011 _LT_EOF
2012       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2013       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2014       echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2015       $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2016       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2017       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2018       cat > conftest.c << _LT_EOF
2019 int main() { return 0;}
2020 _LT_EOF
2021       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2022       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2023       _lt_result=$?
2024       if test -s conftest.err && $GREP force_load conftest.err; then
2025         cat conftest.err >&AS_MESSAGE_LOG_FD
2026       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
2027         lt_cv_ld_force_load=yes
2028       else
2029         cat conftest.err >&AS_MESSAGE_LOG_FD
2030       fi
2031         rm -f conftest.err libconftest.a conftest conftest.c
2032         rm -rf conftest.dSYM
2033     ])
2034     case $host_os in
2035     rhapsody* | darwin1.[[012]])
2036       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2037     darwin1.*)
2038       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2039     darwin*) # darwin 5.x on
2040       # if running on 10.5 or later, the deployment target defaults
2041       # to the OS version, if on x86, and 10.4, the deployment
2042       # target defaults to 10.4. Don't you love it?
2043       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2044         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2045           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2046         10.[[012]]*)
2047           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2048         10.*)
2049           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2050       esac
2051     ;;
2052   esac
2053     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2054       _lt_dar_single_mod='$single_module'
2055     fi
2056     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2057       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2058     else
2059       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2060     fi
2061     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2062       _lt_dsymutil='~$DSYMUTIL $lib || :'
2063     else
2064       _lt_dsymutil=
2065     fi
2066     ;;
2067   esac
2068 ])
2069
2070
2071 # _LT_DARWIN_LINKER_FEATURES([TAG])
2072 # ---------------------------------
2073 # Checks for linker and compiler features on darwin
2074 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2075 [
2076   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2077   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2078   _LT_TAGVAR(hardcode_direct, $1)=no
2079   _LT_TAGVAR(hardcode_automatic, $1)=yes
2080   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2081   if test "$lt_cv_ld_force_load" = "yes"; then
2082     _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\"`'
2083     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2084                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2085   else
2086     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2087   fi
2088   _LT_TAGVAR(link_all_deplibs, $1)=yes
2089   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2090   case $cc_basename in
2091      ifort*) _lt_dar_can_shared=yes ;;
2092      *) _lt_dar_can_shared=$GCC ;;
2093   esac
2094   if test "$_lt_dar_can_shared" = "yes"; then
2095     output_verbose_link_cmd=func_echo_all
2096     _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}"
2097     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2098     _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}"
2099     _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}"
2100     m4_if([$1], [CXX],
2101 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2102       _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}"
2103       _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}"
2104     fi
2105 ],[])
2106   else
2107   _LT_TAGVAR(ld_shlibs, $1)=no
2108   fi
2109 ])
2110
2111 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2112 # ----------------------------------
2113 # Links a minimal program and checks the executable
2114 # for the system default hardcoded library path. In most cases,
2115 # this is /usr/lib:/lib, but when the MPI compilers are used
2116 # the location of the communication and MPI libs are included too.
2117 # If we don't find anything, use the default library path according
2118 # to the aix ld manual.
2119 # Store the results from the different compilers for each TAGNAME.
2120 # Allow to override them for all tags through lt_cv_aix_libpath.
2121 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2122 [m4_require([_LT_DECL_SED])dnl
2123 if test "${lt_cv_aix_libpath+set}" = set; then
2124   aix_libpath=$lt_cv_aix_libpath
2125 else
2126   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2127   [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2128   lt_aix_libpath_sed='[
2129       /Import File Strings/,/^$/ {
2130           /^0/ {
2131               s/^0  *\([^ ]*\) *$/\1/
2132               p
2133           }
2134       }]'
2135   _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2136   # Check for a 64-bit object if we didn't find anything.
2137   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2138     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2139   fi],[])
2140   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2141     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2142   fi
2143   ])
2144   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2145 fi
2146 ])# _LT_SYS_MODULE_PATH_AIX
2147
2148
2149 # _LT_SHELL_INIT(ARG)
2150 # -------------------
2151 m4_define([_LT_SHELL_INIT],
2152 [m4_divert_text([M4SH-INIT], [$1
2153 ])])# _LT_SHELL_INIT
2154
2155
2156
2157 # _LT_PROG_ECHO_BACKSLASH
2158 # -----------------------
2159 # Find how we can fake an echo command that does not interpret backslash.
2160 # In particular, with Autoconf 2.60 or later we add some code to the start
2161 # of the generated configure script which will find a shell with a builtin
2162 # printf (which we can use as an echo command).
2163 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2164 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2165 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2166 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2167
2168 AC_MSG_CHECKING([how to print strings])
2169 # Test print first, because it will be a builtin if present.
2170 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2171    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2172   ECHO='print -r --'
2173 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2174   ECHO='printf %s\n'
2175 else
2176   # Use this function as a fallback that always works.
2177   func_fallback_echo ()
2178   {
2179     eval 'cat <<_LTECHO_EOF
2180 $[]1
2181 _LTECHO_EOF'
2182   }
2183   ECHO='func_fallback_echo'
2184 fi
2185
2186 # func_echo_all arg...
2187 # Invoke $ECHO with all args, space-separated.
2188 func_echo_all ()
2189 {
2190     $ECHO "$*" 
2191 }
2192
2193 case "$ECHO" in
2194   printf*) AC_MSG_RESULT([printf]) ;;
2195   print*) AC_MSG_RESULT([print -r]) ;;
2196   *) AC_MSG_RESULT([cat]) ;;
2197 esac
2198
2199 m4_ifdef([_AS_DETECT_SUGGESTED],
2200 [_AS_DETECT_SUGGESTED([
2201   test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2202     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2203     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2204     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2205     PATH=/empty FPATH=/empty; export PATH FPATH
2206     test "X`printf %s $ECHO`" = "X$ECHO" \
2207       || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2208
2209 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2210 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2211 ])# _LT_PROG_ECHO_BACKSLASH
2212
2213
2214 # _LT_WITH_SYSROOT
2215 # ----------------
2216 AC_DEFUN([_LT_WITH_SYSROOT],
2217 [AC_MSG_CHECKING([for sysroot])
2218 AC_ARG_WITH([sysroot],
2219 [  --with-sysroot[=DIR] Search for dependent libraries within DIR
2220                         (or the compiler's sysroot if not specified).],
2221 [], [with_sysroot=no])
2222
2223 dnl lt_sysroot will always be passed unquoted.  We quote it here
2224 dnl in case the user passed a directory name.
2225 lt_sysroot=
2226 case ${with_sysroot} in #(
2227  yes)
2228    if test "$GCC" = yes; then
2229      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2230    fi
2231    ;; #(
2232  /*)
2233    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2234    ;; #(
2235  no|'')
2236    ;; #(
2237  *)
2238    AC_MSG_RESULT([${with_sysroot}])
2239    AC_MSG_ERROR([The sysroot must be an absolute path.])
2240    ;;
2241 esac
2242
2243  AC_MSG_RESULT([${lt_sysroot:-no}])
2244 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2245 [dependent libraries, and in which our libraries should be installed.])])
2246
2247 # _LT_ENABLE_LOCK
2248 # ---------------
2249 m4_defun([_LT_ENABLE_LOCK],
2250 [AC_ARG_ENABLE([libtool-lock],
2251   [AS_HELP_STRING([--disable-libtool-lock],
2252     [avoid locking (might break parallel builds)])])
2253 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2254
2255 # Some flags need to be propagated to the compiler or linker for good
2256 # libtool support.
2257 case $host in
2258 ia64-*-hpux*)
2259   # Find out which ABI we are using.
2260   echo 'int i;' > conftest.$ac_ext
2261   if AC_TRY_EVAL(ac_compile); then
2262     case `/usr/bin/file conftest.$ac_objext` in
2263       *ELF-32*)
2264         HPUX_IA64_MODE="32"
2265         ;;
2266       *ELF-64*)
2267         HPUX_IA64_MODE="64"
2268         ;;
2269     esac
2270   fi
2271   rm -rf conftest*
2272   ;;
2273 *-*-irix6*)
2274   # Find out which ABI we are using.
2275   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2276   if AC_TRY_EVAL(ac_compile); then
2277     if test "$lt_cv_prog_gnu_ld" = yes; then
2278       case `/usr/bin/file conftest.$ac_objext` in
2279         *32-bit*)
2280           LD="${LD-ld} -melf32bsmip"
2281           ;;
2282         *N32*)
2283           LD="${LD-ld} -melf32bmipn32"
2284           ;;
2285         *64-bit*)
2286           LD="${LD-ld} -melf64bmip"
2287         ;;
2288       esac
2289     else
2290       case `/usr/bin/file conftest.$ac_objext` in
2291         *32-bit*)
2292           LD="${LD-ld} -32"
2293           ;;
2294         *N32*)
2295           LD="${LD-ld} -n32"
2296           ;;
2297         *64-bit*)
2298           LD="${LD-ld} -64"
2299           ;;
2300       esac
2301     fi
2302   fi
2303   rm -rf conftest*
2304   ;;
2305
2306 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
2307 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2308   # Find out which ABI we are using.
2309   echo 'int i;' > conftest.$ac_ext
2310   if AC_TRY_EVAL(ac_compile); then
2311     case `/usr/bin/file conftest.o` in
2312       *32-bit*)
2313         case $host in
2314           x86_64-*kfreebsd*-gnu)
2315             LD="${LD-ld} -m elf_i386_fbsd"
2316             ;;
2317           x86_64-*linux*)
2318             case `/usr/bin/file conftest.o` in
2319               *x86-64*)
2320                 LD="${LD-ld} -m elf32_x86_64"
2321                 ;;
2322               *)
2323                 LD="${LD-ld} -m elf_i386"
2324                 ;;
2325             esac
2326             ;;
2327           powerpc64le-*)
2328             LD="${LD-ld} -m elf32lppclinux"
2329             ;;
2330           powerpc64-*)
2331             LD="${LD-ld} -m elf32ppclinux"
2332             ;;
2333           s390x-*linux*)
2334             LD="${LD-ld} -m elf_s390"
2335             ;;
2336           sparc64-*linux*)
2337             LD="${LD-ld} -m elf32_sparc"
2338             ;;
2339         esac
2340         ;;
2341       *64-bit*)
2342         case $host in
2343           x86_64-*kfreebsd*-gnu)
2344             LD="${LD-ld} -m elf_x86_64_fbsd"
2345             ;;
2346           x86_64-*linux*)
2347             LD="${LD-ld} -m elf_x86_64"
2348             ;;
2349           powerpcle-*)
2350             LD="${LD-ld} -m elf64lppc"
2351             ;;
2352           powerpc-*)
2353             LD="${LD-ld} -m elf64ppc"
2354             ;;
2355           s390*-*linux*|s390*-*tpf*)
2356             LD="${LD-ld} -m elf64_s390"
2357             ;;
2358           sparc*-*linux*)
2359             LD="${LD-ld} -m elf64_sparc"
2360             ;;
2361         esac
2362         ;;
2363     esac
2364   fi
2365   rm -rf conftest*
2366   ;;
2367
2368 *-*-sco3.2v5*)
2369   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2370   SAVE_CFLAGS="$CFLAGS"
2371   CFLAGS="$CFLAGS -belf"
2372   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2373     [AC_LANG_PUSH(C)
2374      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2375      AC_LANG_POP])
2376   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2377     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2378     CFLAGS="$SAVE_CFLAGS"
2379   fi
2380   ;;
2381 *-*solaris*)
2382   # Find out which ABI we are using.
2383   echo 'int i;' > conftest.$ac_ext
2384   if AC_TRY_EVAL(ac_compile); then
2385     case `/usr/bin/file conftest.o` in
2386     *64-bit*)
2387       case $lt_cv_prog_gnu_ld in
2388       yes*)
2389         case $host in
2390         i?86-*-solaris*)
2391           LD="${LD-ld} -m elf_x86_64"
2392           ;;
2393         sparc*-*-solaris*)
2394           LD="${LD-ld} -m elf64_sparc"
2395           ;;
2396         esac
2397         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
2398         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2399           LD="${LD-ld}_sol2"
2400         fi
2401         ;;
2402       *)
2403         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2404           LD="${LD-ld} -64"
2405         fi
2406         ;;
2407       esac
2408       ;;
2409     esac
2410   fi
2411   rm -rf conftest*
2412   ;;
2413 esac
2414
2415 need_locks="$enable_libtool_lock"
2416 ])# _LT_ENABLE_LOCK
2417
2418
2419 # _LT_PROG_AR
2420 # -----------
2421 m4_defun([_LT_PROG_AR],
2422 [AC_CHECK_TOOLS(AR, [ar], false)
2423 : ${AR=ar}
2424 : ${AR_FLAGS=cru}
2425 _LT_DECL([], [AR], [1], [The archiver])
2426 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2427
2428 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2429   [lt_cv_ar_at_file=no
2430    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2431      [echo conftest.$ac_objext > conftest.lst
2432       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2433       AC_TRY_EVAL([lt_ar_try])
2434       if test "$ac_status" -eq 0; then
2435         # Ensure the archiver fails upon bogus file names.
2436         rm -f conftest.$ac_objext libconftest.a
2437         AC_TRY_EVAL([lt_ar_try])
2438         if test "$ac_status" -ne 0; then
2439           lt_cv_ar_at_file=@
2440         fi
2441       fi
2442       rm -f conftest.* libconftest.a
2443      ])
2444   ])
2445
2446 if test "x$lt_cv_ar_at_file" = xno; then
2447   archiver_list_spec=
2448 else
2449   archiver_list_spec=$lt_cv_ar_at_file
2450 fi
2451 _LT_DECL([], [archiver_list_spec], [1],
2452   [How to feed a file listing to the archiver])
2453 ])# _LT_PROG_AR
2454
2455
2456 # _LT_CMD_OLD_ARCHIVE
2457 # -------------------
2458 m4_defun([_LT_CMD_OLD_ARCHIVE],
2459 [_LT_PROG_AR
2460
2461 AC_CHECK_TOOL(STRIP, strip, :)
2462 test -z "$STRIP" && STRIP=:
2463 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2464
2465 AC_CHECK_TOOL(RANLIB, ranlib, :)
2466 test -z "$RANLIB" && RANLIB=:
2467 _LT_DECL([], [RANLIB], [1],
2468     [Commands used to install an old-style archive])
2469
2470 # Determine commands to create old-style static archives.
2471 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2472 old_postinstall_cmds='chmod 644 $oldlib'
2473 old_postuninstall_cmds=
2474
2475 if test -n "$RANLIB"; then
2476   case $host_os in
2477   openbsd*)
2478     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2479     ;;
2480   *)
2481     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2482     ;;
2483   esac
2484   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2485 fi
2486
2487 case $host_os in
2488   darwin*)
2489     lock_old_archive_extraction=yes ;;
2490   *)
2491     lock_old_archive_extraction=no ;;
2492 esac
2493 _LT_DECL([], [old_postinstall_cmds], [2])
2494 _LT_DECL([], [old_postuninstall_cmds], [2])
2495 _LT_TAGDECL([], [old_archive_cmds], [2],
2496     [Commands used to build an old-style archive])
2497 _LT_DECL([], [lock_old_archive_extraction], [0],
2498     [Whether to use a lock for old archive extraction])
2499 ])# _LT_CMD_OLD_ARCHIVE
2500
2501
2502 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2503 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2504 # ----------------------------------------------------------------
2505 # Check whether the given compiler option works
2506 AC_DEFUN([_LT_COMPILER_OPTION],
2507 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2508 m4_require([_LT_DECL_SED])dnl
2509 AC_CACHE_CHECK([$1], [$2],
2510   [$2=no
2511    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2512    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2513    lt_compiler_flag="$3"
2514    # Insert the option either (1) after the last *FLAGS variable, or
2515    # (2) before a word containing "conftest.", or (3) at the end.
2516    # Note that $ac_compile itself does not contain backslashes and begins
2517    # with a dollar sign (not a hyphen), so the echo should work correctly.
2518    # The option is referenced via a variable to avoid confusing sed.
2519    lt_compile=`echo "$ac_compile" | $SED \
2520    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2521    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2522    -e 's:$: $lt_compiler_flag:'`
2523    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2524    (eval "$lt_compile" 2>conftest.err)
2525    ac_status=$?
2526    cat conftest.err >&AS_MESSAGE_LOG_FD
2527    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2528    if (exit $ac_status) && test -s "$ac_outfile"; then
2529      # The compiler can only warn and ignore the option if not recognized
2530      # So say no if there are warnings other than the usual output.
2531      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2532      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2533      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2534        $2=yes
2535      fi
2536    fi
2537    $RM conftest*
2538 ])
2539
2540 if test x"[$]$2" = xyes; then
2541     m4_if([$5], , :, [$5])
2542 else
2543     m4_if([$6], , :, [$6])
2544 fi
2545 ])# _LT_COMPILER_OPTION
2546
2547 # Old name:
2548 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2549 dnl aclocal-1.4 backwards compatibility:
2550 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2551
2552
2553 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2554 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
2555 # ----------------------------------------------------
2556 # Check whether the given linker option works
2557 AC_DEFUN([_LT_LINKER_OPTION],
2558 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2559 m4_require([_LT_DECL_SED])dnl
2560 AC_CACHE_CHECK([$1], [$2],
2561   [$2=no
2562    save_LDFLAGS="$LDFLAGS"
2563    LDFLAGS="$LDFLAGS $3"
2564    echo "$lt_simple_link_test_code" > conftest.$ac_ext
2565    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2566      # The linker can only warn and ignore the option if not recognized
2567      # So say no if there are warnings
2568      if test -s conftest.err; then
2569        # Append any errors to the config.log.
2570        cat conftest.err 1>&AS_MESSAGE_LOG_FD
2571        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2572        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2573        if diff conftest.exp conftest.er2 >/dev/null; then
2574          $2=yes
2575        fi
2576      else
2577        $2=yes
2578      fi
2579    fi
2580    $RM -r conftest*
2581    LDFLAGS="$save_LDFLAGS"
2582 ])
2583
2584 if test x"[$]$2" = xyes; then
2585     m4_if([$4], , :, [$4])
2586 else
2587     m4_if([$5], , :, [$5])
2588 fi
2589 ])# _LT_LINKER_OPTION
2590
2591 # Old name:
2592 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2593 dnl aclocal-1.4 backwards compatibility:
2594 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2595
2596
2597 # LT_CMD_MAX_LEN
2598 #---------------
2599 AC_DEFUN([LT_CMD_MAX_LEN],
2600 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2601 # find the maximum length of command line arguments
2602 AC_MSG_CHECKING([the maximum length of command line arguments])
2603 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2604   i=0
2605   teststring="ABCD"
2606
2607   case $build_os in
2608   msdosdjgpp*)
2609     # On DJGPP, this test can blow up pretty badly due to problems in libc
2610     # (any single argument exceeding 2000 bytes causes a buffer overrun
2611     # during glob expansion).  Even if it were fixed, the result of this
2612     # check would be larger than it should be.
2613     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2614     ;;
2615
2616   gnu*)
2617     # Under GNU Hurd, this test is not required because there is
2618     # no limit to the length of command line arguments.
2619     # Libtool will interpret -1 as no limit whatsoever
2620     lt_cv_sys_max_cmd_len=-1;
2621     ;;
2622
2623   cygwin* | mingw* | cegcc*)
2624     # On Win9x/ME, this test blows up -- it succeeds, but takes
2625     # about 5 minutes as the teststring grows exponentially.
2626     # Worse, since 9x/ME are not pre-emptively multitasking,
2627     # you end up with a "frozen" computer, even though with patience
2628     # the test eventually succeeds (with a max line length of 256k).
2629     # Instead, let's just punt: use the minimum linelength reported by
2630     # all of the supported platforms: 8192 (on NT/2K/XP).
2631     lt_cv_sys_max_cmd_len=8192;
2632     ;;
2633
2634   mint*)
2635     # On MiNT this can take a long time and run out of memory.
2636     lt_cv_sys_max_cmd_len=8192;
2637     ;;
2638
2639   amigaos*)
2640     # On AmigaOS with pdksh, this test takes hours, literally.
2641     # So we just punt and use a minimum line length of 8192.
2642     lt_cv_sys_max_cmd_len=8192;
2643     ;;
2644
2645   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2646     # This has been around since 386BSD, at least.  Likely further.
2647     if test -x /sbin/sysctl; then
2648       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2649     elif test -x /usr/sbin/sysctl; then
2650       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2651     else
2652       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
2653     fi
2654     # And add a safety zone
2655     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2656     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2657     ;;
2658
2659   interix*)
2660     # We know the value 262144 and hardcode it with a safety zone (like BSD)
2661     lt_cv_sys_max_cmd_len=196608
2662     ;;
2663
2664   os2*)
2665     # The test takes a long time on OS/2.
2666     lt_cv_sys_max_cmd_len=8192
2667     ;;
2668
2669   osf*)
2670     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2671     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2672     # nice to cause kernel panics so lets avoid the loop below.
2673     # First set a reasonable default.
2674     lt_cv_sys_max_cmd_len=16384
2675     #
2676     if test -x /sbin/sysconfig; then
2677       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2678         *1*) lt_cv_sys_max_cmd_len=-1 ;;
2679       esac
2680     fi
2681     ;;
2682   sco3.2v5*)
2683     lt_cv_sys_max_cmd_len=102400
2684     ;;
2685   sysv5* | sco5v6* | sysv4.2uw2*)
2686     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2687     if test -n "$kargmax"; then
2688       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
2689     else
2690       lt_cv_sys_max_cmd_len=32768
2691     fi
2692     ;;
2693   *)
2694     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2695     if test -n "$lt_cv_sys_max_cmd_len" && \
2696         test undefined != "$lt_cv_sys_max_cmd_len"; then
2697       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2698       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2699     else
2700       # Make teststring a little bigger before we do anything with it.
2701       # a 1K string should be a reasonable start.
2702       for i in 1 2 3 4 5 6 7 8 ; do
2703         teststring=$teststring$teststring
2704       done
2705       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2706       # If test is not a shell built-in, we'll probably end up computing a
2707       # maximum length that is only half of the actual maximum length, but
2708       # we can't tell.
2709       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
2710                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2711               test $i != 17 # 1/2 MB should be enough
2712       do
2713         i=`expr $i + 1`
2714         teststring=$teststring$teststring
2715       done
2716       # Only check the string length outside the loop.
2717       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2718       teststring=
2719       # Add a significant safety factor because C++ compilers can tack on
2720       # massive amounts of additional arguments before passing them to the
2721       # linker.  It appears as though 1/2 is a usable value.
2722       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2723     fi
2724     ;;
2725   esac
2726 ])
2727 if test -n $lt_cv_sys_max_cmd_len ; then
2728   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2729 else
2730   AC_MSG_RESULT(none)
2731 fi
2732 max_cmd_len=$lt_cv_sys_max_cmd_len
2733 _LT_DECL([], [max_cmd_len], [0],
2734     [What is the maximum length of a command?])
2735 ])# LT_CMD_MAX_LEN
2736
2737 # Old name:
2738 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2739 dnl aclocal-1.4 backwards compatibility:
2740 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2741
2742
2743 # _LT_HEADER_DLFCN
2744 # ----------------
2745 m4_defun([_LT_HEADER_DLFCN],
2746 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2747 ])# _LT_HEADER_DLFCN
2748
2749
2750 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2751 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2752 # ----------------------------------------------------------------
2753 m4_defun([_LT_TRY_DLOPEN_SELF],
2754 [m4_require([_LT_HEADER_DLFCN])dnl
2755 if test "$cross_compiling" = yes; then :
2756   [$4]
2757 else
2758   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2759   lt_status=$lt_dlunknown
2760   cat > conftest.$ac_ext <<_LT_EOF
2761 [#line $LINENO "configure"
2762 #include "confdefs.h"
2763
2764 #if HAVE_DLFCN_H
2765 #include <dlfcn.h>
2766 #endif
2767
2768 #include <stdio.h>
2769
2770 #ifdef RTLD_GLOBAL
2771 #  define LT_DLGLOBAL           RTLD_GLOBAL
2772 #else
2773 #  ifdef DL_GLOBAL
2774 #    define LT_DLGLOBAL         DL_GLOBAL
2775 #  else
2776 #    define LT_DLGLOBAL         0
2777 #  endif
2778 #endif
2779
2780 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2781    find out it does not work in some platform. */
2782 #ifndef LT_DLLAZY_OR_NOW
2783 #  ifdef RTLD_LAZY
2784 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
2785 #  else
2786 #    ifdef DL_LAZY
2787 #      define LT_DLLAZY_OR_NOW          DL_LAZY
2788 #    else
2789 #      ifdef RTLD_NOW
2790 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
2791 #      else
2792 #        ifdef DL_NOW
2793 #          define LT_DLLAZY_OR_NOW      DL_NOW
2794 #        else
2795 #          define LT_DLLAZY_OR_NOW      0
2796 #        endif
2797 #      endif
2798 #    endif
2799 #  endif
2800 #endif
2801
2802 /* When -fvisbility=hidden is used, assume the code has been annotated
2803    correspondingly for the symbols needed.  */
2804 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2805 int fnord () __attribute__((visibility("default")));
2806 #endif
2807
2808 int fnord () { return 42; }
2809 int main ()
2810 {
2811   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2812   int status = $lt_dlunknown;
2813
2814   if (self)
2815     {
2816       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2817       else
2818         {
2819           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2820           else puts (dlerror ());
2821         }
2822       /* dlclose (self); */
2823     }
2824   else
2825     puts (dlerror ());
2826
2827   return status;
2828 }]
2829 _LT_EOF
2830   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2831     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2832     lt_status=$?
2833     case x$lt_status in
2834       x$lt_dlno_uscore) $1 ;;
2835       x$lt_dlneed_uscore) $2 ;;
2836       x$lt_dlunknown|x*) $3 ;;
2837     esac
2838   else :
2839     # compilation failed
2840     $3
2841   fi
2842 fi
2843 rm -fr conftest*
2844 ])# _LT_TRY_DLOPEN_SELF
2845
2846
2847 # LT_SYS_DLOPEN_SELF
2848 # ------------------
2849 AC_DEFUN([LT_SYS_DLOPEN_SELF],
2850 [m4_require([_LT_HEADER_DLFCN])dnl
2851 if test "x$enable_dlopen" != xyes; then
2852   enable_dlopen=unknown
2853   enable_dlopen_self=unknown
2854   enable_dlopen_self_static=unknown
2855 else
2856   lt_cv_dlopen=no
2857   lt_cv_dlopen_libs=
2858
2859   case $host_os in
2860   beos*)
2861     lt_cv_dlopen="load_add_on"
2862     lt_cv_dlopen_libs=
2863     lt_cv_dlopen_self=yes
2864     ;;
2865
2866   mingw* | pw32* | cegcc*)
2867     lt_cv_dlopen="LoadLibrary"
2868     lt_cv_dlopen_libs=
2869     ;;
2870
2871   cygwin*)
2872     lt_cv_dlopen="dlopen"
2873     lt_cv_dlopen_libs=
2874     ;;
2875
2876   darwin*)
2877   # if libdl is installed we need to link against it
2878     AC_CHECK_LIB([dl], [dlopen],
2879                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2880     lt_cv_dlopen="dyld"
2881     lt_cv_dlopen_libs=
2882     lt_cv_dlopen_self=yes
2883     ])
2884     ;;
2885
2886   *)
2887     AC_CHECK_FUNC([shl_load],
2888           [lt_cv_dlopen="shl_load"],
2889       [AC_CHECK_LIB([dld], [shl_load],
2890             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2891         [AC_CHECK_FUNC([dlopen],
2892               [lt_cv_dlopen="dlopen"],
2893           [AC_CHECK_LIB([dl], [dlopen],
2894                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2895             [AC_CHECK_LIB([svld], [dlopen],
2896                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2897               [AC_CHECK_LIB([dld], [dld_link],
2898                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2899               ])
2900             ])
2901           ])
2902         ])
2903       ])
2904     ;;
2905   esac
2906
2907   if test "x$lt_cv_dlopen" != xno; then
2908     enable_dlopen=yes
2909   else
2910     enable_dlopen=no
2911   fi
2912
2913   case $lt_cv_dlopen in
2914   dlopen)
2915     save_CPPFLAGS="$CPPFLAGS"
2916     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2917
2918     save_LDFLAGS="$LDFLAGS"
2919     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2920
2921     save_LIBS="$LIBS"
2922     LIBS="$lt_cv_dlopen_libs $LIBS"
2923
2924     AC_CACHE_CHECK([whether a program can dlopen itself],
2925           lt_cv_dlopen_self, [dnl
2926           _LT_TRY_DLOPEN_SELF(
2927             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2928             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2929     ])
2930
2931     if test "x$lt_cv_dlopen_self" = xyes; then
2932       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2933       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2934           lt_cv_dlopen_self_static, [dnl
2935           _LT_TRY_DLOPEN_SELF(
2936             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2937             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2938       ])
2939     fi
2940
2941     CPPFLAGS="$save_CPPFLAGS"
2942     LDFLAGS="$save_LDFLAGS"
2943     LIBS="$save_LIBS"
2944     ;;
2945   esac
2946
2947   case $lt_cv_dlopen_self in
2948   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2949   *) enable_dlopen_self=unknown ;;
2950   esac
2951
2952   case $lt_cv_dlopen_self_static in
2953   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2954   *) enable_dlopen_self_static=unknown ;;
2955   esac
2956 fi
2957 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2958          [Whether dlopen is supported])
2959 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2960          [Whether dlopen of programs is supported])
2961 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2962          [Whether dlopen of statically linked programs is supported])
2963 ])# LT_SYS_DLOPEN_SELF
2964
2965 # Old name:
2966 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2967 dnl aclocal-1.4 backwards compatibility:
2968 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2969
2970
2971 # _LT_COMPILER_C_O([TAGNAME])
2972 # ---------------------------
2973 # Check to see if options -c and -o are simultaneously supported by compiler.
2974 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2975 m4_defun([_LT_COMPILER_C_O],
2976 [m4_require([_LT_DECL_SED])dnl
2977 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2978 m4_require([_LT_TAG_COMPILER])dnl
2979 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2980   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2981   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2982    $RM -r conftest 2>/dev/null
2983    mkdir conftest
2984    cd conftest
2985    mkdir out
2986    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2987
2988    lt_compiler_flag="-o out/conftest2.$ac_objext"
2989    # Insert the option either (1) after the last *FLAGS variable, or
2990    # (2) before a word containing "conftest.", or (3) at the end.
2991    # Note that $ac_compile itself does not contain backslashes and begins
2992    # with a dollar sign (not a hyphen), so the echo should work correctly.
2993    lt_compile=`echo "$ac_compile" | $SED \
2994    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2995    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2996    -e 's:$: $lt_compiler_flag:'`
2997    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2998    (eval "$lt_compile" 2>out/conftest.err)
2999    ac_status=$?
3000    cat out/conftest.err >&AS_MESSAGE_LOG_FD
3001    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3002    if (exit $ac_status) && test -s out/conftest2.$ac_objext
3003    then
3004      # The compiler can only warn and ignore the option if not recognized
3005      # So say no if there are warnings
3006      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3007      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3008      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3009        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3010      fi
3011    fi
3012    chmod u+w . 2>&AS_MESSAGE_LOG_FD
3013    $RM conftest*
3014    # SGI C++ compiler will create directory out/ii_files/ for
3015    # template instantiation
3016    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3017    $RM out/* && rmdir out
3018    cd ..
3019    $RM -r conftest
3020    $RM conftest*
3021 ])
3022 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3023         [Does compiler simultaneously support -c and -o options?])
3024 ])# _LT_COMPILER_C_O
3025
3026
3027 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3028 # ----------------------------------
3029 # Check to see if we can do hard links to lock some files if needed
3030 m4_defun([_LT_COMPILER_FILE_LOCKS],
3031 [m4_require([_LT_ENABLE_LOCK])dnl
3032 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3033 _LT_COMPILER_C_O([$1])
3034
3035 hard_links="nottested"
3036 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3037   # do not overwrite the value of need_locks provided by the user
3038   AC_MSG_CHECKING([if we can lock with hard links])
3039   hard_links=yes
3040   $RM conftest*
3041   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3042   touch conftest.a
3043   ln conftest.a conftest.b 2>&5 || hard_links=no
3044   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3045   AC_MSG_RESULT([$hard_links])
3046   if test "$hard_links" = no; then
3047     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3048     need_locks=warn
3049   fi
3050 else
3051   need_locks=no
3052 fi
3053 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3054 ])# _LT_COMPILER_FILE_LOCKS
3055
3056
3057 # _LT_CHECK_OBJDIR
3058 # ----------------
3059 m4_defun([_LT_CHECK_OBJDIR],
3060 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3061 [rm -f .libs 2>/dev/null
3062 mkdir .libs 2>/dev/null
3063 if test -d .libs; then
3064   lt_cv_objdir=.libs
3065 else
3066   # MS-DOS does not allow filenames that begin with a dot.
3067   lt_cv_objdir=_libs
3068 fi
3069 rmdir .libs 2>/dev/null])
3070 objdir=$lt_cv_objdir
3071 _LT_DECL([], [objdir], [0],
3072          [The name of the directory that contains temporary libtool files])dnl
3073 m4_pattern_allow([LT_OBJDIR])dnl
3074 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3075   [Define to the sub-directory in which libtool stores uninstalled libraries.])
3076 ])# _LT_CHECK_OBJDIR
3077
3078
3079 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3080 # --------------------------------------
3081 # Check hardcoding attributes.
3082 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3083 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3084 _LT_TAGVAR(hardcode_action, $1)=
3085 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3086    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3087    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3088
3089   # We can hardcode non-existent directories.
3090   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3091      # If the only mechanism to avoid hardcoding is shlibpath_var, we
3092      # have to relink, otherwise we might link with an installed library
3093      # when we should be linking with a yet-to-be-installed one
3094      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3095      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3096     # Linking always hardcodes the temporary library directory.
3097     _LT_TAGVAR(hardcode_action, $1)=relink
3098   else
3099     # We can link without hardcoding, and we can hardcode nonexisting dirs.
3100     _LT_TAGVAR(hardcode_action, $1)=immediate
3101   fi
3102 else
3103   # We cannot hardcode anything, or else we can only hardcode existing
3104   # directories.
3105   _LT_TAGVAR(hardcode_action, $1)=unsupported
3106 fi
3107 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3108
3109 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3110    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3111   # Fast installation is not supported
3112   enable_fast_install=no
3113 elif test "$shlibpath_overrides_runpath" = yes ||
3114      test "$enable_shared" = no; then
3115   # Fast installation is not necessary
3116   enable_fast_install=needless
3117 fi
3118 _LT_TAGDECL([], [hardcode_action], [0],
3119     [How to hardcode a shared library path into an executable])
3120 ])# _LT_LINKER_HARDCODE_LIBPATH
3121
3122
3123 # _LT_CMD_STRIPLIB
3124 # ----------------
3125 m4_defun([_LT_CMD_STRIPLIB],
3126 [m4_require([_LT_DECL_EGREP])
3127 striplib=
3128 old_striplib=
3129 AC_MSG_CHECKING([whether stripping libraries is possible])
3130 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3131   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3132   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3133   AC_MSG_RESULT([yes])
3134 else
3135 # FIXME - insert some real tests, host_os isn't really good enough
3136   case $host_os in
3137   darwin*)
3138     if test -n "$STRIP" ; then
3139       striplib="$STRIP -x"
3140       old_striplib="$STRIP -S"
3141       AC_MSG_RESULT([yes])
3142     else
3143       AC_MSG_RESULT([no])
3144     fi
3145     ;;
3146   *)
3147     AC_MSG_RESULT([no])
3148     ;;
3149   esac
3150 fi
3151 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3152 _LT_DECL([], [striplib], [1])
3153 ])# _LT_CMD_STRIPLIB
3154
3155
3156 # _LT_SYS_DYNAMIC_LINKER([TAG])
3157 # -----------------------------
3158 # PORTME Fill in your ld.so characteristics
3159 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3160 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3161 m4_require([_LT_DECL_EGREP])dnl
3162 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3163 m4_require([_LT_DECL_OBJDUMP])dnl
3164 m4_require([_LT_DECL_SED])dnl
3165 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3166 AC_MSG_CHECKING([dynamic linker characteristics])
3167 m4_if([$1],
3168         [], [
3169 if test "$GCC" = yes; then
3170   case $host_os in
3171     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3172     *) lt_awk_arg="/^libraries:/" ;;
3173   esac
3174   case $host_os in
3175     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3176     *) lt_sed_strip_eq="s,=/,/,g" ;;
3177   esac
3178   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3179   case $lt_search_path_spec in
3180   *\;*)
3181     # if the path contains ";" then we assume it to be the separator
3182     # otherwise default to the standard path separator (i.e. ":") - it is
3183     # assumed that no part of a normal pathname contains ";" but that should
3184     # okay in the real world where ";" in dirpaths is itself problematic.
3185     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3186     ;;
3187   *)
3188     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3189     ;;
3190   esac
3191   # Ok, now we have the path, separated by spaces, we can step through it
3192   # and add multilib dir if necessary.
3193   lt_tmp_lt_search_path_spec=
3194   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3195   for lt_sys_path in $lt_search_path_spec; do
3196     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3197       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3198     else
3199       test -d "$lt_sys_path" && \
3200         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3201     fi
3202   done
3203   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3204 BEGIN {RS=" "; FS="/|\n";} {
3205   lt_foo="";
3206   lt_count=0;
3207   for (lt_i = NF; lt_i > 0; lt_i--) {
3208     if ($lt_i != "" && $lt_i != ".") {
3209       if ($lt_i == "..") {
3210         lt_count++;
3211       } else {
3212         if (lt_count == 0) {
3213           lt_foo="/" $lt_i lt_foo;
3214         } else {
3215           lt_count--;
3216         }
3217       }
3218     }
3219   }
3220   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3221   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3222 }'`
3223   # AWK program above erroneously prepends '/' to C:/dos/paths
3224   # for these hosts.
3225   case $host_os in
3226     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3227       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3228   esac
3229   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3230 else
3231   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3232 fi])
3233 library_names_spec=
3234 libname_spec='lib$name'
3235 soname_spec=
3236 shrext_cmds=".so"
3237 postinstall_cmds=
3238 postuninstall_cmds=
3239 finish_cmds=
3240 finish_eval=
3241 shlibpath_var=
3242 shlibpath_overrides_runpath=unknown
3243 version_type=none
3244 dynamic_linker="$host_os ld.so"
3245 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3246 need_lib_prefix=unknown
3247 hardcode_into_libs=no
3248
3249 # when you set need_version to no, make sure it does not cause -set_version
3250 # flags to be left without arguments
3251 need_version=unknown
3252
3253 case $host_os in
3254 aix3*)
3255   version_type=linux # correct to gnu/linux during the next big refactor
3256   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3257   shlibpath_var=LIBPATH
3258
3259   # AIX 3 has no versioning support, so we append a major version to the name.
3260   soname_spec='${libname}${release}${shared_ext}$major'
3261   ;;
3262
3263 aix[[4-9]]*)
3264   version_type=linux # correct to gnu/linux during the next big refactor
3265   need_lib_prefix=no
3266   need_version=no
3267   hardcode_into_libs=yes
3268   if test "$host_cpu" = ia64; then
3269     # AIX 5 supports IA64
3270     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3271     shlibpath_var=LD_LIBRARY_PATH
3272   else
3273     # With GCC up to 2.95.x, collect2 would create an import file
3274     # for dependence libraries.  The import file would start with
3275     # the line `#! .'.  This would cause the generated library to
3276     # depend on `.', always an invalid library.  This was fixed in
3277     # development snapshots of GCC prior to 3.0.
3278     case $host_os in
3279       aix4 | aix4.[[01]] | aix4.[[01]].*)
3280       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3281            echo ' yes '
3282            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3283         :
3284       else
3285         can_build_shared=no
3286       fi
3287       ;;
3288     esac
3289     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3290     # soname into executable. Probably we can add versioning support to
3291     # collect2, so additional links can be useful in future.
3292     if test "$aix_use_runtimelinking" = yes; then
3293       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3294       # instead of lib<name>.a to let people know that these are not
3295       # typical AIX shared libraries.
3296       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3297     else
3298       # We preserve .a as extension for shared libraries through AIX4.2
3299       # and later when we are not doing run time linking.
3300       library_names_spec='${libname}${release}.a $libname.a'
3301       soname_spec='${libname}${release}${shared_ext}$major'
3302     fi
3303     shlibpath_var=LIBPATH
3304   fi
3305   ;;
3306
3307 amigaos*)
3308   case $host_cpu in
3309   powerpc)
3310     # Since July 2007 AmigaOS4 officially supports .so libraries.
3311     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3312     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3313     ;;
3314   m68k)
3315     library_names_spec='$libname.ixlibrary $libname.a'
3316     # Create ${libname}_ixlibrary.a entries in /sys/libs.
3317     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'
3318     ;;
3319   esac
3320   ;;
3321
3322 beos*)
3323   library_names_spec='${libname}${shared_ext}'
3324   dynamic_linker="$host_os ld.so"
3325   shlibpath_var=LIBRARY_PATH
3326   ;;
3327
3328 bsdi[[45]]*)
3329   version_type=linux # correct to gnu/linux during the next big refactor
3330   need_version=no
3331   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3332   soname_spec='${libname}${release}${shared_ext}$major'
3333   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3334   shlibpath_var=LD_LIBRARY_PATH
3335   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3336   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3337   # the default ld.so.conf also contains /usr/contrib/lib and
3338   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3339   # libtool to hard-code these into programs
3340   ;;
3341
3342 cygwin* | mingw* | pw32* | cegcc*)
3343   version_type=windows
3344   shrext_cmds=".dll"
3345   need_version=no
3346   need_lib_prefix=no
3347
3348   case $GCC,$cc_basename in
3349   yes,*)
3350     # gcc
3351     library_names_spec='$libname.dll.a'
3352     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3353     postinstall_cmds='base_file=`basename \${file}`~
3354       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3355       dldir=$destdir/`dirname \$dlpath`~
3356       test -d \$dldir || mkdir -p \$dldir~
3357       $install_prog $dir/$dlname \$dldir/$dlname~
3358       chmod a+x \$dldir/$dlname~
3359       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3360         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3361       fi'
3362     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3363       dlpath=$dir/\$dldll~
3364        $RM \$dlpath'
3365     shlibpath_overrides_runpath=yes
3366
3367     case $host_os in
3368     cygwin*)
3369       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3370       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3371 m4_if([$1], [],[
3372       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3373       ;;
3374     mingw* | cegcc*)
3375       # MinGW DLLs use traditional 'lib' prefix
3376       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3377       ;;
3378     pw32*)
3379       # pw32 DLLs use 'pw' prefix rather than 'lib'
3380       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3381       ;;
3382     esac
3383     dynamic_linker='Win32 ld.exe'
3384     ;;
3385
3386   *,cl*)
3387     # Native MSVC
3388     libname_spec='$name'
3389     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3390     library_names_spec='${libname}.dll.lib'
3391
3392     case $build_os in
3393     mingw*)
3394       sys_lib_search_path_spec=
3395       lt_save_ifs=$IFS
3396       IFS=';'
3397       for lt_path in $LIB
3398       do
3399         IFS=$lt_save_ifs
3400         # Let DOS variable expansion print the short 8.3 style file name.
3401         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3402         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3403       done
3404       IFS=$lt_save_ifs
3405       # Convert to MSYS style.
3406       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3407       ;;
3408     cygwin*)
3409       # Convert to unix form, then to dos form, then back to unix form
3410       # but this time dos style (no spaces!) so that the unix form looks
3411       # like /cygdrive/c/PROGRA~1:/cygdr...
3412       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3413       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3414       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3415       ;;
3416     *)
3417       sys_lib_search_path_spec="$LIB"
3418       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3419         # It is most probably a Windows format PATH.
3420         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3421       else
3422         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3423       fi
3424       # FIXME: find the short name or the path components, as spaces are
3425       # common. (e.g. "Program Files" -> "PROGRA~1")
3426       ;;
3427     esac
3428
3429     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3430     postinstall_cmds='base_file=`basename \${file}`~
3431       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3432       dldir=$destdir/`dirname \$dlpath`~
3433       test -d \$dldir || mkdir -p \$dldir~
3434       $install_prog $dir/$dlname \$dldir/$dlname'
3435     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3436       dlpath=$dir/\$dldll~
3437        $RM \$dlpath'
3438     shlibpath_overrides_runpath=yes
3439     dynamic_linker='Win32 link.exe'
3440     ;;
3441
3442   *)
3443     # Assume MSVC wrapper
3444     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3445     dynamic_linker='Win32 ld.exe'
3446     ;;
3447   esac
3448   # FIXME: first we should search . and the directory the executable is in
3449   shlibpath_var=PATH
3450   ;;
3451
3452 darwin* | rhapsody*)
3453   dynamic_linker="$host_os dyld"
3454   version_type=darwin
3455   need_lib_prefix=no
3456   need_version=no
3457   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3458   soname_spec='${libname}${release}${major}$shared_ext'
3459   shlibpath_overrides_runpath=yes
3460   shlibpath_var=DYLD_LIBRARY_PATH
3461   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3462 m4_if([$1], [],[
3463   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3464   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3465   ;;
3466
3467 dgux*)
3468   version_type=linux # correct to gnu/linux during the next big refactor
3469   need_lib_prefix=no
3470   need_version=no
3471   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3472   soname_spec='${libname}${release}${shared_ext}$major'
3473   shlibpath_var=LD_LIBRARY_PATH
3474   ;;
3475
3476 freebsd* | dragonfly*)
3477   # DragonFly does not have aout.  When/if they implement a new
3478   # versioning mechanism, adjust this.
3479   if test -x /usr/bin/objformat; then
3480     objformat=`/usr/bin/objformat`
3481   else
3482     case $host_os in
3483     freebsd[[23]].*) objformat=aout ;;
3484     *) objformat=elf ;;
3485     esac
3486   fi
3487   version_type=freebsd-$objformat
3488   case $version_type in
3489     freebsd-elf*)
3490       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3491       need_version=no
3492       need_lib_prefix=no
3493       ;;
3494     freebsd-*)
3495       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3496       need_version=yes
3497       ;;
3498   esac
3499   shlibpath_var=LD_LIBRARY_PATH
3500   case $host_os in
3501   freebsd2.*)
3502     shlibpath_overrides_runpath=yes
3503     ;;
3504   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3505     shlibpath_overrides_runpath=yes
3506     hardcode_into_libs=yes
3507     ;;
3508   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3509   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3510     shlibpath_overrides_runpath=no
3511     hardcode_into_libs=yes
3512     ;;
3513   *) # from 4.6 on, and DragonFly
3514     shlibpath_overrides_runpath=yes
3515     hardcode_into_libs=yes
3516     ;;
3517   esac
3518   ;;
3519
3520 haiku*)
3521   version_type=linux # correct to gnu/linux during the next big refactor
3522   need_lib_prefix=no
3523   need_version=no
3524   dynamic_linker="$host_os runtime_loader"
3525   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3526   soname_spec='${libname}${release}${shared_ext}$major'
3527   shlibpath_var=LIBRARY_PATH
3528   shlibpath_overrides_runpath=yes
3529   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3530   hardcode_into_libs=yes
3531   ;;
3532
3533 hpux9* | hpux10* | hpux11*)
3534   # Give a soname corresponding to the major version so that dld.sl refuses to
3535   # link against other versions.
3536   version_type=sunos
3537   need_lib_prefix=no
3538   need_version=no
3539   case $host_cpu in
3540   ia64*)
3541     shrext_cmds='.so'
3542     hardcode_into_libs=yes
3543     dynamic_linker="$host_os dld.so"
3544     shlibpath_var=LD_LIBRARY_PATH
3545     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3546     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3547     soname_spec='${libname}${release}${shared_ext}$major'
3548     if test "X$HPUX_IA64_MODE" = X32; then
3549       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3550     else
3551       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3552     fi
3553     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3554     ;;
3555   hppa*64*)
3556     shrext_cmds='.sl'
3557     hardcode_into_libs=yes
3558     dynamic_linker="$host_os dld.sl"
3559     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3560     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3561     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3562     soname_spec='${libname}${release}${shared_ext}$major'
3563     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3564     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3565     ;;
3566   *)
3567     shrext_cmds='.sl'
3568     dynamic_linker="$host_os dld.sl"
3569     shlibpath_var=SHLIB_PATH
3570     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3571     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3572     soname_spec='${libname}${release}${shared_ext}$major'
3573     ;;
3574   esac
3575   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3576   postinstall_cmds='chmod 555 $lib'
3577   # or fails outright, so override atomically:
3578   install_override_mode=555
3579   ;;
3580
3581 interix[[3-9]]*)
3582   version_type=linux # correct to gnu/linux during the next big refactor
3583   need_lib_prefix=no
3584   need_version=no
3585   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3586   soname_spec='${libname}${release}${shared_ext}$major'
3587   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3588   shlibpath_var=LD_LIBRARY_PATH
3589   shlibpath_overrides_runpath=no
3590   hardcode_into_libs=yes
3591   ;;
3592
3593 irix5* | irix6* | nonstopux*)
3594   case $host_os in
3595     nonstopux*) version_type=nonstopux ;;
3596     *)
3597         if test "$lt_cv_prog_gnu_ld" = yes; then
3598                 version_type=linux # correct to gnu/linux during the next big refactor
3599         else
3600                 version_type=irix
3601         fi ;;
3602   esac
3603   need_lib_prefix=no
3604   need_version=no
3605   soname_spec='${libname}${release}${shared_ext}$major'
3606   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3607   case $host_os in
3608   irix5* | nonstopux*)
3609     libsuff= shlibsuff=
3610     ;;
3611   *)
3612     case $LD in # libtool.m4 will add one of these switches to LD
3613     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3614       libsuff= shlibsuff= libmagic=32-bit;;
3615     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3616       libsuff=32 shlibsuff=N32 libmagic=N32;;
3617     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3618       libsuff=64 shlibsuff=64 libmagic=64-bit;;
3619     *) libsuff= shlibsuff= libmagic=never-match;;
3620     esac
3621     ;;
3622   esac
3623   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3624   shlibpath_overrides_runpath=no
3625   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3626   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3627   hardcode_into_libs=yes
3628   ;;
3629
3630 # No shared lib support for Linux oldld, aout, or coff.
3631 linux*oldld* | linux*aout* | linux*coff*)
3632   dynamic_linker=no
3633   ;;
3634
3635 # This must be glibc/ELF.
3636 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3637   version_type=linux # correct to gnu/linux during the next big refactor
3638   need_lib_prefix=no
3639   need_version=no
3640   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3641   soname_spec='${libname}${release}${shared_ext}$major'
3642   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3643   shlibpath_var=LD_LIBRARY_PATH
3644   shlibpath_overrides_runpath=no
3645
3646   # Some binutils ld are patched to set DT_RUNPATH
3647   AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3648     [lt_cv_shlibpath_overrides_runpath=no
3649     save_LDFLAGS=$LDFLAGS
3650     save_libdir=$libdir
3651     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3652          LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3653     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3654       [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3655          [lt_cv_shlibpath_overrides_runpath=yes])])
3656     LDFLAGS=$save_LDFLAGS
3657     libdir=$save_libdir
3658     ])
3659   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3660
3661   # This implies no fast_install, which is unacceptable.
3662   # Some rework will be needed to allow for fast_install
3663   # before this can be enabled.
3664   hardcode_into_libs=yes
3665
3666   # Append ld.so.conf contents to the search path
3667   if test -f /etc/ld.so.conf; then
3668     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' ' '`
3669     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3670   fi
3671
3672   # We used to test for /lib/ld.so.1 and disable shared libraries on
3673   # powerpc, because MkLinux only supported shared libraries with the
3674   # GNU dynamic linker.  Since this was broken with cross compilers,
3675   # most powerpc-linux boxes support dynamic linking these days and
3676   # people can always --disable-shared, the test was removed, and we
3677   # assume the GNU/Linux dynamic linker is in use.
3678   dynamic_linker='GNU/Linux ld.so'
3679   ;;
3680
3681 netbsdelf*-gnu)
3682   version_type=linux
3683   need_lib_prefix=no
3684   need_version=no
3685   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3686   soname_spec='${libname}${release}${shared_ext}$major'
3687   shlibpath_var=LD_LIBRARY_PATH
3688   shlibpath_overrides_runpath=no
3689   hardcode_into_libs=yes
3690   dynamic_linker='NetBSD ld.elf_so'
3691   ;;
3692
3693 netbsd*)
3694   version_type=sunos
3695   need_lib_prefix=no
3696   need_version=no
3697   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3698     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3699     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3700     dynamic_linker='NetBSD (a.out) ld.so'
3701   else
3702     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3703     soname_spec='${libname}${release}${shared_ext}$major'
3704     dynamic_linker='NetBSD ld.elf_so'
3705   fi
3706   shlibpath_var=LD_LIBRARY_PATH
3707   shlibpath_overrides_runpath=yes
3708   hardcode_into_libs=yes
3709   ;;
3710
3711 newsos6)
3712   version_type=linux # correct to gnu/linux during the next big refactor
3713   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3714   shlibpath_var=LD_LIBRARY_PATH
3715   shlibpath_overrides_runpath=yes
3716   ;;
3717
3718 *nto* | *qnx*)
3719   version_type=qnx
3720   need_lib_prefix=no
3721   need_version=no
3722   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3723   soname_spec='${libname}${release}${shared_ext}$major'
3724   shlibpath_var=LD_LIBRARY_PATH
3725   shlibpath_overrides_runpath=no
3726   hardcode_into_libs=yes
3727   dynamic_linker='ldqnx.so'
3728   ;;
3729
3730 openbsd*)
3731   version_type=sunos
3732   sys_lib_dlsearch_path_spec="/usr/lib"
3733   need_lib_prefix=no
3734   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3735   case $host_os in
3736     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
3737     *)                          need_version=no  ;;
3738   esac
3739   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3740   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3741   shlibpath_var=LD_LIBRARY_PATH
3742   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3743     case $host_os in
3744       openbsd2.[[89]] | openbsd2.[[89]].*)
3745         shlibpath_overrides_runpath=no
3746         ;;
3747       *)
3748         shlibpath_overrides_runpath=yes
3749         ;;
3750       esac
3751   else
3752     shlibpath_overrides_runpath=yes
3753   fi
3754   ;;
3755
3756 os2*)
3757   libname_spec='$name'
3758   shrext_cmds=".dll"
3759   need_lib_prefix=no
3760   library_names_spec='$libname${shared_ext} $libname.a'
3761   dynamic_linker='OS/2 ld.exe'
3762   shlibpath_var=LIBPATH
3763   ;;
3764
3765 osf3* | osf4* | osf5*)
3766   version_type=osf
3767   need_lib_prefix=no
3768   need_version=no
3769   soname_spec='${libname}${release}${shared_ext}$major'
3770   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3771   shlibpath_var=LD_LIBRARY_PATH
3772   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3773   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3774   ;;
3775
3776 rdos*)
3777   dynamic_linker=no
3778   ;;
3779
3780 solaris*)
3781   version_type=linux # correct to gnu/linux during the next big refactor
3782   need_lib_prefix=no
3783   need_version=no
3784   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3785   soname_spec='${libname}${release}${shared_ext}$major'
3786   shlibpath_var=LD_LIBRARY_PATH
3787   shlibpath_overrides_runpath=yes
3788   hardcode_into_libs=yes
3789   # ldd complains unless libraries are executable
3790   postinstall_cmds='chmod +x $lib'
3791   ;;
3792
3793 sunos4*)
3794   version_type=sunos
3795   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3796   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3797   shlibpath_var=LD_LIBRARY_PATH
3798   shlibpath_overrides_runpath=yes
3799   if test "$with_gnu_ld" = yes; then
3800     need_lib_prefix=no
3801   fi
3802   need_version=yes
3803   ;;
3804
3805 sysv4 | sysv4.3*)
3806   version_type=linux # correct to gnu/linux during the next big refactor
3807   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3808   soname_spec='${libname}${release}${shared_ext}$major'
3809   shlibpath_var=LD_LIBRARY_PATH
3810   case $host_vendor in
3811     sni)
3812       shlibpath_overrides_runpath=no
3813       need_lib_prefix=no
3814       runpath_var=LD_RUN_PATH
3815       ;;
3816     siemens)
3817       need_lib_prefix=no
3818       ;;
3819     motorola)
3820       need_lib_prefix=no
3821       need_version=no
3822       shlibpath_overrides_runpath=no
3823       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3824       ;;
3825   esac
3826   ;;
3827
3828 sysv4*MP*)
3829   if test -d /usr/nec ;then
3830     version_type=linux # correct to gnu/linux during the next big refactor
3831     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3832     soname_spec='$libname${shared_ext}.$major'
3833     shlibpath_var=LD_LIBRARY_PATH
3834   fi
3835   ;;
3836
3837 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3838   version_type=freebsd-elf
3839   need_lib_prefix=no
3840   need_version=no
3841   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3842   soname_spec='${libname}${release}${shared_ext}$major'
3843   shlibpath_var=LD_LIBRARY_PATH
3844   shlibpath_overrides_runpath=yes
3845   hardcode_into_libs=yes
3846   if test "$with_gnu_ld" = yes; then
3847     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3848   else
3849     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3850     case $host_os in
3851       sco3.2v5*)
3852         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3853         ;;
3854     esac
3855   fi
3856   sys_lib_dlsearch_path_spec='/usr/lib'
3857   ;;
3858
3859 tpf*)
3860   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3861   version_type=linux # correct to gnu/linux during the next big refactor
3862   need_lib_prefix=no
3863   need_version=no
3864   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3865   shlibpath_var=LD_LIBRARY_PATH
3866   shlibpath_overrides_runpath=no
3867   hardcode_into_libs=yes
3868   ;;
3869
3870 uts4*)
3871   version_type=linux # correct to gnu/linux during the next big refactor
3872   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3873   soname_spec='${libname}${release}${shared_ext}$major'
3874   shlibpath_var=LD_LIBRARY_PATH
3875   ;;
3876
3877 *)
3878   dynamic_linker=no
3879   ;;
3880 esac
3881 AC_MSG_RESULT([$dynamic_linker])
3882 test "$dynamic_linker" = no && can_build_shared=no
3883
3884 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3885 if test "$GCC" = yes; then
3886   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3887 fi
3888
3889 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3890   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3891 fi
3892 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3893   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3894 fi
3895
3896 _LT_DECL([], [variables_saved_for_relink], [1],
3897     [Variables whose values should be saved in libtool wrapper scripts and
3898     restored at link time])
3899 _LT_DECL([], [need_lib_prefix], [0],
3900     [Do we need the "lib" prefix for modules?])
3901 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3902 _LT_DECL([], [version_type], [0], [Library versioning type])
3903 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3904 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3905 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3906     [Is shlibpath searched before the hard-coded library search path?])
3907 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3908 _LT_DECL([], [library_names_spec], [1],
3909     [[List of archive names.  First name is the real one, the rest are links.
3910     The last name is the one that the linker finds with -lNAME]])
3911 _LT_DECL([], [soname_spec], [1],
3912     [[The coded name of the library, if different from the real name]])
3913 _LT_DECL([], [install_override_mode], [1],
3914     [Permission mode override for installation of shared libraries])
3915 _LT_DECL([], [postinstall_cmds], [2],
3916     [Command to use after installation of a shared archive])
3917 _LT_DECL([], [postuninstall_cmds], [2],
3918     [Command to use after uninstallation of a shared archive])
3919 _LT_DECL([], [finish_cmds], [2],
3920     [Commands used to finish a libtool library installation in a directory])
3921 _LT_DECL([], [finish_eval], [1],
3922     [[As "finish_cmds", except a single script fragment to be evaled but
3923     not shown]])
3924 _LT_DECL([], [hardcode_into_libs], [0],
3925     [Whether we should hardcode library paths into libraries])
3926 _LT_DECL([], [sys_lib_search_path_spec], [2],
3927     [Compile-time system search path for libraries])
3928 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3929     [Run-time system search path for libraries])
3930 ])# _LT_SYS_DYNAMIC_LINKER
3931
3932
3933 # _LT_PATH_TOOL_PREFIX(TOOL)
3934 # --------------------------
3935 # find a file program which can recognize shared library
3936 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3937 [m4_require([_LT_DECL_EGREP])dnl
3938 AC_MSG_CHECKING([for $1])
3939 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3940 [case $MAGIC_CMD in
3941 [[\\/*] |  ?:[\\/]*])
3942   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3943   ;;
3944 *)
3945   lt_save_MAGIC_CMD="$MAGIC_CMD"
3946   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3947 dnl $ac_dummy forces splitting on constant user-supplied paths.
3948 dnl POSIX.2 word splitting is done only on the output of word expansions,
3949 dnl not every word.  This closes a longstanding sh security hole.
3950   ac_dummy="m4_if([$2], , $PATH, [$2])"
3951   for ac_dir in $ac_dummy; do
3952     IFS="$lt_save_ifs"
3953     test -z "$ac_dir" && ac_dir=.
3954     if test -f $ac_dir/$1; then
3955       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3956       if test -n "$file_magic_test_file"; then
3957         case $deplibs_check_method in
3958         "file_magic "*)
3959           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3960           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3961           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3962             $EGREP "$file_magic_regex" > /dev/null; then
3963             :
3964           else
3965             cat <<_LT_EOF 1>&2
3966
3967 *** Warning: the command libtool uses to detect shared libraries,
3968 *** $file_magic_cmd, produces output that libtool cannot recognize.
3969 *** The result is that libtool may fail to recognize shared libraries
3970 *** as such.  This will affect the creation of libtool libraries that
3971 *** depend on shared libraries, but programs linked with such libtool
3972 *** libraries will work regardless of this problem.  Nevertheless, you
3973 *** may want to report the problem to your system manager and/or to
3974 *** bug-libtool@gnu.org
3975
3976 _LT_EOF
3977           fi ;;
3978         esac
3979       fi
3980       break
3981     fi
3982   done
3983   IFS="$lt_save_ifs"
3984   MAGIC_CMD="$lt_save_MAGIC_CMD"
3985   ;;
3986 esac])
3987 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3988 if test -n "$MAGIC_CMD"; then
3989   AC_MSG_RESULT($MAGIC_CMD)
3990 else
3991   AC_MSG_RESULT(no)
3992 fi
3993 _LT_DECL([], [MAGIC_CMD], [0],
3994          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3995 ])# _LT_PATH_TOOL_PREFIX
3996
3997 # Old name:
3998 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3999 dnl aclocal-1.4 backwards compatibility:
4000 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4001
4002
4003 # _LT_PATH_MAGIC
4004 # --------------
4005 # find a file program which can recognize a shared library
4006 m4_defun([_LT_PATH_MAGIC],
4007 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4008 if test -z "$lt_cv_path_MAGIC_CMD"; then
4009   if test -n "$ac_tool_prefix"; then
4010     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4011   else
4012     MAGIC_CMD=:
4013   fi
4014 fi
4015 ])# _LT_PATH_MAGIC
4016
4017
4018 # LT_PATH_LD
4019 # ----------
4020 # find the pathname to the GNU or non-GNU linker
4021 AC_DEFUN([LT_PATH_LD],
4022 [AC_REQUIRE([AC_PROG_CC])dnl
4023 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4024 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4025 m4_require([_LT_DECL_SED])dnl
4026 m4_require([_LT_DECL_EGREP])dnl
4027 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4028
4029 AC_ARG_WITH([gnu-ld],
4030     [AS_HELP_STRING([--with-gnu-ld],
4031         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4032     [test "$withval" = no || with_gnu_ld=yes],
4033     [with_gnu_ld=no])dnl
4034
4035 ac_prog=ld
4036 if test "$GCC" = yes; then
4037   # Check if gcc -print-prog-name=ld gives a path.
4038   AC_MSG_CHECKING([for ld used by $CC])
4039   case $host in
4040   *-*-mingw*)
4041     # gcc leaves a trailing carriage return which upsets mingw
4042     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4043   *)
4044     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4045   esac
4046   case $ac_prog in
4047     # Accept absolute paths.
4048     [[\\/]]* | ?:[[\\/]]*)
4049       re_direlt='/[[^/]][[^/]]*/\.\./'
4050       # Canonicalize the pathname of ld
4051       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4052       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4053         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4054       done
4055       test -z "$LD" && LD="$ac_prog"
4056       ;;
4057   "")
4058     # If it fails, then pretend we aren't using GCC.
4059     ac_prog=ld
4060     ;;
4061   *)
4062     # If it is relative, then search for the first ld in PATH.
4063     with_gnu_ld=unknown
4064     ;;
4065   esac
4066 elif test "$with_gnu_ld" = yes; then
4067   AC_MSG_CHECKING([for GNU ld])
4068 else
4069   AC_MSG_CHECKING([for non-GNU ld])
4070 fi
4071 AC_CACHE_VAL(lt_cv_path_LD,
4072 [if test -z "$LD"; then
4073   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4074   for ac_dir in $PATH; do
4075     IFS="$lt_save_ifs"
4076     test -z "$ac_dir" && ac_dir=.
4077     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4078       lt_cv_path_LD="$ac_dir/$ac_prog"
4079       # Check to see if the program is GNU ld.  I'd rather use --version,
4080       # but apparently some variants of GNU ld only accept -v.
4081       # Break only if it was the GNU/non-GNU ld that we prefer.
4082       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4083       *GNU* | *'with BFD'*)
4084         test "$with_gnu_ld" != no && break
4085         ;;
4086       *)
4087         test "$with_gnu_ld" != yes && break
4088         ;;
4089       esac
4090     fi
4091   done
4092   IFS="$lt_save_ifs"
4093 else
4094   lt_cv_path_LD="$LD" # Let the user override the test with a path.
4095 fi])
4096 LD="$lt_cv_path_LD"
4097 if test -n "$LD"; then
4098   AC_MSG_RESULT($LD)
4099 else
4100   AC_MSG_RESULT(no)
4101 fi
4102 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4103 _LT_PATH_LD_GNU
4104 AC_SUBST([LD])
4105
4106 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4107 ])# LT_PATH_LD
4108
4109 # Old names:
4110 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4111 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4112 dnl aclocal-1.4 backwards compatibility:
4113 dnl AC_DEFUN([AM_PROG_LD], [])
4114 dnl AC_DEFUN([AC_PROG_LD], [])
4115
4116
4117 # _LT_PATH_LD_GNU
4118 #- --------------
4119 m4_defun([_LT_PATH_LD_GNU],
4120 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4121 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4122 case `$LD -v 2>&1 </dev/null` in
4123 *GNU* | *'with BFD'*)
4124   lt_cv_prog_gnu_ld=yes
4125   ;;
4126 *)
4127   lt_cv_prog_gnu_ld=no
4128   ;;
4129 esac])
4130 with_gnu_ld=$lt_cv_prog_gnu_ld
4131 ])# _LT_PATH_LD_GNU
4132
4133
4134 # _LT_CMD_RELOAD
4135 # --------------
4136 # find reload flag for linker
4137 #   -- PORTME Some linkers may need a different reload flag.
4138 m4_defun([_LT_CMD_RELOAD],
4139 [AC_CACHE_CHECK([for $LD option to reload object files],
4140   lt_cv_ld_reload_flag,
4141   [lt_cv_ld_reload_flag='-r'])
4142 reload_flag=$lt_cv_ld_reload_flag
4143 case $reload_flag in
4144 "" | " "*) ;;
4145 *) reload_flag=" $reload_flag" ;;
4146 esac
4147 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4148 case $host_os in
4149   cygwin* | mingw* | pw32* | cegcc*)
4150     if test "$GCC" != yes; then
4151       reload_cmds=false
4152     fi
4153     ;;
4154   darwin*)
4155     if test "$GCC" = yes; then
4156       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4157     else
4158       reload_cmds='$LD$reload_flag -o $output$reload_objs'
4159     fi
4160     ;;
4161 esac
4162 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4163 _LT_TAGDECL([], [reload_cmds], [2])dnl
4164 ])# _LT_CMD_RELOAD
4165
4166
4167 # _LT_CHECK_MAGIC_METHOD
4168 # ----------------------
4169 # how to check for library dependencies
4170 #  -- PORTME fill in with the dynamic library characteristics
4171 m4_defun([_LT_CHECK_MAGIC_METHOD],
4172 [m4_require([_LT_DECL_EGREP])
4173 m4_require([_LT_DECL_OBJDUMP])
4174 AC_CACHE_CHECK([how to recognize dependent libraries],
4175 lt_cv_deplibs_check_method,
4176 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4177 lt_cv_file_magic_test_file=
4178 lt_cv_deplibs_check_method='unknown'
4179 # Need to set the preceding variable on all platforms that support
4180 # interlibrary dependencies.
4181 # 'none' -- dependencies not supported.
4182 # `unknown' -- same as none, but documents that we really don't know.
4183 # 'pass_all' -- all dependencies passed with no checks.
4184 # 'test_compile' -- check by making test program.
4185 # 'file_magic [[regex]]' -- check by looking for files in library path
4186 # which responds to the $file_magic_cmd with a given extended regex.
4187 # If you have `file' or equivalent on your system and you're not sure
4188 # whether `pass_all' will *always* work, you probably want this one.
4189
4190 case $host_os in
4191 aix[[4-9]]*)
4192   lt_cv_deplibs_check_method=pass_all
4193   ;;
4194
4195 beos*)
4196   lt_cv_deplibs_check_method=pass_all
4197   ;;
4198
4199 bsdi[[45]]*)
4200   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4201   lt_cv_file_magic_cmd='/usr/bin/file -L'
4202   lt_cv_file_magic_test_file=/shlib/libc.so
4203   ;;
4204
4205 cygwin*)
4206   # func_win32_libid is a shell function defined in ltmain.sh
4207   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4208   lt_cv_file_magic_cmd='func_win32_libid'
4209   ;;
4210
4211 mingw* | pw32*)
4212   # Base MSYS/MinGW do not provide the 'file' command needed by
4213   # func_win32_libid shell function, so use a weaker test based on 'objdump',
4214   # unless we find 'file', for example because we are cross-compiling.
4215   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4216   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4217     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4218     lt_cv_file_magic_cmd='func_win32_libid'
4219   else
4220     # Keep this pattern in sync with the one in func_win32_libid.
4221     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4222     lt_cv_file_magic_cmd='$OBJDUMP -f'
4223   fi
4224   ;;
4225
4226 cegcc*)
4227   # use the weaker test based on 'objdump'. See mingw*.
4228   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4229   lt_cv_file_magic_cmd='$OBJDUMP -f'
4230   ;;
4231
4232 darwin* | rhapsody*)
4233   lt_cv_deplibs_check_method=pass_all
4234   ;;
4235
4236 freebsd* | dragonfly*)
4237   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4238     case $host_cpu in
4239     i*86 )
4240       # Not sure whether the presence of OpenBSD here was a mistake.
4241       # Let's accept both of them until this is cleared up.
4242       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4243       lt_cv_file_magic_cmd=/usr/bin/file
4244       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4245       ;;
4246     esac
4247   else
4248     lt_cv_deplibs_check_method=pass_all
4249   fi
4250   ;;
4251
4252 haiku*)
4253   lt_cv_deplibs_check_method=pass_all
4254   ;;
4255
4256 hpux10.20* | hpux11*)
4257   lt_cv_file_magic_cmd=/usr/bin/file
4258   case $host_cpu in
4259   ia64*)
4260     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4261     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4262     ;;
4263   hppa*64*)
4264     [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]']
4265     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4266     ;;
4267   *)
4268     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4269     lt_cv_file_magic_test_file=/usr/lib/libc.sl
4270     ;;
4271   esac
4272   ;;
4273
4274 interix[[3-9]]*)
4275   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4276   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4277   ;;
4278
4279 irix5* | irix6* | nonstopux*)
4280   case $LD in
4281   *-32|*"-32 ") libmagic=32-bit;;
4282   *-n32|*"-n32 ") libmagic=N32;;
4283   *-64|*"-64 ") libmagic=64-bit;;
4284   *) libmagic=never-match;;
4285   esac
4286   lt_cv_deplibs_check_method=pass_all
4287   ;;
4288
4289 # This must be glibc/ELF.
4290 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4291   lt_cv_deplibs_check_method=pass_all
4292   ;;
4293
4294 netbsd* | netbsdelf*-gnu)
4295   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4296     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4297   else
4298     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4299   fi
4300   ;;
4301
4302 newos6*)
4303   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4304   lt_cv_file_magic_cmd=/usr/bin/file
4305   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4306   ;;
4307
4308 *nto* | *qnx*)
4309   lt_cv_deplibs_check_method=pass_all
4310   ;;
4311
4312 openbsd*)
4313   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4314     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4315   else
4316     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4317   fi
4318   ;;
4319
4320 osf3* | osf4* | osf5*)
4321   lt_cv_deplibs_check_method=pass_all
4322   ;;
4323
4324 rdos*)
4325   lt_cv_deplibs_check_method=pass_all
4326   ;;
4327
4328 solaris*)
4329   lt_cv_deplibs_check_method=pass_all
4330   ;;
4331
4332 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4333   lt_cv_deplibs_check_method=pass_all
4334   ;;
4335
4336 sysv4 | sysv4.3*)
4337   case $host_vendor in
4338   motorola)
4339     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]]'
4340     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4341     ;;
4342   ncr)
4343     lt_cv_deplibs_check_method=pass_all
4344     ;;
4345   sequent)
4346     lt_cv_file_magic_cmd='/bin/file'
4347     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4348     ;;
4349   sni)
4350     lt_cv_file_magic_cmd='/bin/file'
4351     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4352     lt_cv_file_magic_test_file=/lib/libc.so
4353     ;;
4354   siemens)
4355     lt_cv_deplibs_check_method=pass_all
4356     ;;
4357   pc)
4358     lt_cv_deplibs_check_method=pass_all
4359     ;;
4360   esac
4361   ;;
4362
4363 tpf*)
4364   lt_cv_deplibs_check_method=pass_all
4365   ;;
4366 esac
4367 ])
4368
4369 file_magic_glob=
4370 want_nocaseglob=no
4371 if test "$build" = "$host"; then
4372   case $host_os in
4373   mingw* | pw32*)
4374     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4375       want_nocaseglob=yes
4376     else
4377       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4378     fi
4379     ;;
4380   esac
4381 fi
4382
4383 file_magic_cmd=$lt_cv_file_magic_cmd
4384 deplibs_check_method=$lt_cv_deplibs_check_method
4385 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4386
4387 _LT_DECL([], [deplibs_check_method], [1],
4388     [Method to check whether dependent libraries are shared objects])
4389 _LT_DECL([], [file_magic_cmd], [1],
4390     [Command to use when deplibs_check_method = "file_magic"])
4391 _LT_DECL([], [file_magic_glob], [1],
4392     [How to find potential files when deplibs_check_method = "file_magic"])
4393 _LT_DECL([], [want_nocaseglob], [1],
4394     [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4395 ])# _LT_CHECK_MAGIC_METHOD
4396
4397
4398 # LT_PATH_NM
4399 # ----------
4400 # find the pathname to a BSD- or MS-compatible name lister
4401 AC_DEFUN([LT_PATH_NM],
4402 [AC_REQUIRE([AC_PROG_CC])dnl
4403 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4404 [if test -n "$NM"; then
4405   # Let the user override the test.
4406   lt_cv_path_NM="$NM"
4407 else
4408   lt_nm_to_check="${ac_tool_prefix}nm"
4409   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4410     lt_nm_to_check="$lt_nm_to_check nm"
4411   fi
4412   for lt_tmp_nm in $lt_nm_to_check; do
4413     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4414     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4415       IFS="$lt_save_ifs"
4416       test -z "$ac_dir" && ac_dir=.
4417       tmp_nm="$ac_dir/$lt_tmp_nm"
4418       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4419         # Check to see if the nm accepts a BSD-compat flag.
4420         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4421         #   nm: unknown option "B" ignored
4422         # Tru64's nm complains that /dev/null is an invalid object file
4423         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4424         */dev/null* | *'Invalid file or object type'*)
4425           lt_cv_path_NM="$tmp_nm -B"
4426           break
4427           ;;
4428         *)
4429           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4430           */dev/null*)
4431             lt_cv_path_NM="$tmp_nm -p"
4432             break
4433             ;;
4434           *)
4435             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4436             continue # so that we can try to find one that supports BSD flags
4437             ;;
4438           esac
4439           ;;
4440         esac
4441       fi
4442     done
4443     IFS="$lt_save_ifs"
4444   done
4445   : ${lt_cv_path_NM=no}
4446 fi])
4447 if test "$lt_cv_path_NM" != "no"; then
4448   NM="$lt_cv_path_NM"
4449 else
4450   # Didn't find any BSD compatible name lister, look for dumpbin.
4451   if test -n "$DUMPBIN"; then :
4452     # Let the user override the test.
4453   else
4454     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4455     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4456     *COFF*)
4457       DUMPBIN="$DUMPBIN -symbols"
4458       ;;
4459     *)
4460       DUMPBIN=:
4461       ;;
4462     esac
4463   fi
4464   AC_SUBST([DUMPBIN])
4465   if test "$DUMPBIN" != ":"; then
4466     NM="$DUMPBIN"
4467   fi
4468 fi
4469 test -z "$NM" && NM=nm
4470 AC_SUBST([NM])
4471 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4472
4473 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4474   [lt_cv_nm_interface="BSD nm"
4475   echo "int some_variable = 0;" > conftest.$ac_ext
4476   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4477   (eval "$ac_compile" 2>conftest.err)
4478   cat conftest.err >&AS_MESSAGE_LOG_FD
4479   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4480   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4481   cat conftest.err >&AS_MESSAGE_LOG_FD
4482   (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4483   cat conftest.out >&AS_MESSAGE_LOG_FD
4484   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4485     lt_cv_nm_interface="MS dumpbin"
4486   fi
4487   rm -f conftest*])
4488 ])# LT_PATH_NM
4489
4490 # Old names:
4491 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4492 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4493 dnl aclocal-1.4 backwards compatibility:
4494 dnl AC_DEFUN([AM_PROG_NM], [])
4495 dnl AC_DEFUN([AC_PROG_NM], [])
4496
4497 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4498 # --------------------------------
4499 # how to determine the name of the shared library
4500 # associated with a specific link library.
4501 #  -- PORTME fill in with the dynamic library characteristics
4502 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4503 [m4_require([_LT_DECL_EGREP])
4504 m4_require([_LT_DECL_OBJDUMP])
4505 m4_require([_LT_DECL_DLLTOOL])
4506 AC_CACHE_CHECK([how to associate runtime and link libraries],
4507 lt_cv_sharedlib_from_linklib_cmd,
4508 [lt_cv_sharedlib_from_linklib_cmd='unknown'
4509
4510 case $host_os in
4511 cygwin* | mingw* | pw32* | cegcc*)
4512   # two different shell functions defined in ltmain.sh
4513   # decide which to use based on capabilities of $DLLTOOL
4514   case `$DLLTOOL --help 2>&1` in
4515   *--identify-strict*)
4516     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4517     ;;
4518   *)
4519     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4520     ;;
4521   esac
4522   ;;
4523 *)
4524   # fallback: assume linklib IS sharedlib
4525   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4526   ;;
4527 esac
4528 ])
4529 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4530 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4531
4532 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4533     [Command to associate shared and link libraries])
4534 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4535
4536
4537 # _LT_PATH_MANIFEST_TOOL
4538 # ----------------------
4539 # locate the manifest tool
4540 m4_defun([_LT_PATH_MANIFEST_TOOL],
4541 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4542 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4543 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4544   [lt_cv_path_mainfest_tool=no
4545   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4546   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4547   cat conftest.err >&AS_MESSAGE_LOG_FD
4548   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4549     lt_cv_path_mainfest_tool=yes
4550   fi
4551   rm -f conftest*])
4552 if test "x$lt_cv_path_mainfest_tool" != xyes; then
4553   MANIFEST_TOOL=:
4554 fi
4555 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4556 ])# _LT_PATH_MANIFEST_TOOL
4557
4558
4559 # LT_LIB_M
4560 # --------
4561 # check for math library
4562 AC_DEFUN([LT_LIB_M],
4563 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4564 LIBM=
4565 case $host in
4566 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4567   # These system don't have libm, or don't need it
4568   ;;
4569 *-ncr-sysv4.3*)
4570   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4571   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4572   ;;
4573 *)
4574   AC_CHECK_LIB(m, cos, LIBM="-lm")
4575   ;;
4576 esac
4577 AC_SUBST([LIBM])
4578 ])# LT_LIB_M
4579
4580 # Old name:
4581 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4582 dnl aclocal-1.4 backwards compatibility:
4583 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4584
4585
4586 # _LT_COMPILER_NO_RTTI([TAGNAME])
4587 # -------------------------------
4588 m4_defun([_LT_COMPILER_NO_RTTI],
4589 [m4_require([_LT_TAG_COMPILER])dnl
4590
4591 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4592
4593 if test "$GCC" = yes; then
4594   case $cc_basename in
4595   nvcc*)
4596     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4597   *)
4598     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4599   esac
4600
4601   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4602     lt_cv_prog_compiler_rtti_exceptions,
4603     [-fno-rtti -fno-exceptions], [],
4604     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4605 fi
4606 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4607         [Compiler flag to turn off builtin functions])
4608 ])# _LT_COMPILER_NO_RTTI
4609
4610
4611 # _LT_CMD_GLOBAL_SYMBOLS
4612 # ----------------------
4613 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4614 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4615 AC_REQUIRE([AC_PROG_CC])dnl
4616 AC_REQUIRE([AC_PROG_AWK])dnl
4617 AC_REQUIRE([LT_PATH_NM])dnl
4618 AC_REQUIRE([LT_PATH_LD])dnl
4619 m4_require([_LT_DECL_SED])dnl
4620 m4_require([_LT_DECL_EGREP])dnl
4621 m4_require([_LT_TAG_COMPILER])dnl
4622
4623 # Check for command to grab the raw symbol name followed by C symbol from nm.
4624 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4625 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4626 [
4627 # These are sane defaults that work on at least a few old systems.
4628 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4629
4630 # Character class describing NM global symbol codes.
4631 symcode='[[BCDEGRST]]'
4632
4633 # Regexp to match symbols that can be accessed directly from C.
4634 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4635
4636 # Define system-specific variables.
4637 case $host_os in
4638 aix*)
4639   symcode='[[BCDT]]'
4640   ;;
4641 cygwin* | mingw* | pw32* | cegcc*)
4642   symcode='[[ABCDGISTW]]'
4643   ;;
4644 hpux*)
4645   if test "$host_cpu" = ia64; then
4646     symcode='[[ABCDEGRST]]'
4647   fi
4648   ;;
4649 irix* | nonstopux*)
4650   symcode='[[BCDEGRST]]'
4651   ;;
4652 osf*)
4653   symcode='[[BCDEGQRST]]'
4654   ;;
4655 solaris*)
4656   symcode='[[BDRT]]'
4657   ;;
4658 sco3.2v5*)
4659   symcode='[[DT]]'
4660   ;;
4661 sysv4.2uw2*)
4662   symcode='[[DT]]'
4663   ;;
4664 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4665   symcode='[[ABDT]]'
4666   ;;
4667 sysv4)
4668   symcode='[[DFNSTU]]'
4669   ;;
4670 esac
4671
4672 # If we're using GNU nm, then use its standard symbol codes.
4673 case `$NM -V 2>&1` in
4674 *GNU* | *'with BFD'*)
4675   symcode='[[ABCDGIRSTW]]' ;;
4676 esac
4677
4678 # Transform an extracted symbol line into a proper C declaration.
4679 # Some systems (esp. on ia64) link data and code symbols differently,
4680 # so use this general approach.
4681 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4682
4683 # Transform an extracted symbol line into symbol name and symbol address
4684 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4685 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'"
4686
4687 # Handle CRLF in mingw tool chain
4688 opt_cr=
4689 case $build_os in
4690 mingw*)
4691   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4692   ;;
4693 esac
4694
4695 # Try without a prefix underscore, then with it.
4696 for ac_symprfx in "" "_"; do
4697
4698   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4699   symxfrm="\\1 $ac_symprfx\\2 \\2"
4700
4701   # Write the raw and C identifiers.
4702   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4703     # Fake it for dumpbin and say T for any non-static function
4704     # and D for any global variable.
4705     # Also find C++ and __fastcall symbols from MSVC++,
4706     # which start with @ or ?.
4707     lt_cv_sys_global_symbol_pipe="$AWK ['"\
4708 "     {last_section=section; section=\$ 3};"\
4709 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4710 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4711 "     \$ 0!~/External *\|/{next};"\
4712 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4713 "     {if(hide[section]) next};"\
4714 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4715 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4716 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4717 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4718 "     ' prfx=^$ac_symprfx]"
4719   else
4720     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4721   fi
4722   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4723
4724   # Check to see that the pipe works correctly.
4725   pipe_works=no
4726
4727   rm -f conftest*
4728   cat > conftest.$ac_ext <<_LT_EOF
4729 #ifdef __cplusplus
4730 extern "C" {
4731 #endif
4732 char nm_test_var;
4733 void nm_test_func(void);
4734 void nm_test_func(void){}
4735 #ifdef __cplusplus
4736 }
4737 #endif
4738 int main(){nm_test_var='a';nm_test_func();return(0);}
4739 _LT_EOF
4740
4741   if AC_TRY_EVAL(ac_compile); then
4742     # Now try to grab the symbols.
4743     nlist=conftest.nm
4744     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4745       # Try sorting and uniquifying the output.
4746       if sort "$nlist" | uniq > "$nlist"T; then
4747         mv -f "$nlist"T "$nlist"
4748       else
4749         rm -f "$nlist"T
4750       fi
4751
4752       # Make sure that we snagged all the symbols we need.
4753       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4754         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4755           cat <<_LT_EOF > conftest.$ac_ext
4756 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4757 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4758 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4759    relocations are performed -- see ld's documentation on pseudo-relocs.  */
4760 # define LT@&t@_DLSYM_CONST
4761 #elif defined(__osf__)
4762 /* This system does not cope well with relocations in const data.  */
4763 # define LT@&t@_DLSYM_CONST
4764 #else
4765 # define LT@&t@_DLSYM_CONST const
4766 #endif
4767
4768 #ifdef __cplusplus
4769 extern "C" {
4770 #endif
4771
4772 _LT_EOF
4773           # Now generate the symbol file.
4774           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4775
4776           cat <<_LT_EOF >> conftest.$ac_ext
4777
4778 /* The mapping between symbol names and symbols.  */
4779 LT@&t@_DLSYM_CONST struct {
4780   const char *name;
4781   void       *address;
4782 }
4783 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4784 {
4785   { "@PROGRAM@", (void *) 0 },
4786 _LT_EOF
4787           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4788           cat <<\_LT_EOF >> conftest.$ac_ext
4789   {0, (void *) 0}
4790 };
4791
4792 /* This works around a problem in FreeBSD linker */
4793 #ifdef FREEBSD_WORKAROUND
4794 static const void *lt_preloaded_setup() {
4795   return lt__PROGRAM__LTX_preloaded_symbols;
4796 }
4797 #endif
4798
4799 #ifdef __cplusplus
4800 }
4801 #endif
4802 _LT_EOF
4803           # Now try linking the two files.
4804           mv conftest.$ac_objext conftstm.$ac_objext
4805           lt_globsym_save_LIBS=$LIBS
4806           lt_globsym_save_CFLAGS=$CFLAGS
4807           LIBS="conftstm.$ac_objext"
4808           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4809           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4810             pipe_works=yes
4811           fi
4812           LIBS=$lt_globsym_save_LIBS
4813           CFLAGS=$lt_globsym_save_CFLAGS
4814         else
4815           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4816         fi
4817       else
4818         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4819       fi
4820     else
4821       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4822     fi
4823   else
4824     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4825     cat conftest.$ac_ext >&5
4826   fi
4827   rm -rf conftest* conftst*
4828
4829   # Do not use the global_symbol_pipe unless it works.
4830   if test "$pipe_works" = yes; then
4831     break
4832   else
4833     lt_cv_sys_global_symbol_pipe=
4834   fi
4835 done
4836 ])
4837 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4838   lt_cv_sys_global_symbol_to_cdecl=
4839 fi
4840 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4841   AC_MSG_RESULT(failed)
4842 else
4843   AC_MSG_RESULT(ok)
4844 fi
4845
4846 # Response file support.
4847 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4848   nm_file_list_spec='@'
4849 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4850   nm_file_list_spec='@'
4851 fi
4852
4853 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4854     [Take the output of nm and produce a listing of raw symbols and C names])
4855 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4856     [Transform the output of nm in a proper C declaration])
4857 _LT_DECL([global_symbol_to_c_name_address],
4858     [lt_cv_sys_global_symbol_to_c_name_address], [1],
4859     [Transform the output of nm in a C name address pair])
4860 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4861     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4862     [Transform the output of nm in a C name address pair when lib prefix is needed])
4863 _LT_DECL([], [nm_file_list_spec], [1],
4864     [Specify filename containing input files for $NM])
4865 ]) # _LT_CMD_GLOBAL_SYMBOLS
4866
4867
4868 # _LT_COMPILER_PIC([TAGNAME])
4869 # ---------------------------
4870 m4_defun([_LT_COMPILER_PIC],
4871 [m4_require([_LT_TAG_COMPILER])dnl
4872 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4873 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4874 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4875
4876 m4_if([$1], [CXX], [
4877   # C++ specific cases for pic, static, wl, etc.
4878   if test "$GXX" = yes; then
4879     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4880     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4881
4882     case $host_os in
4883     aix*)
4884       # All AIX code is PIC.
4885       if test "$host_cpu" = ia64; then
4886         # AIX 5 now supports IA64 processor
4887         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4888       fi
4889       ;;
4890
4891     amigaos*)
4892       case $host_cpu in
4893       powerpc)
4894             # see comment about AmigaOS4 .so support
4895             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4896         ;;
4897       m68k)
4898             # FIXME: we need at least 68020 code to build shared libraries, but
4899             # adding the `-m68020' flag to GCC prevents building anything better,
4900             # like `-m68040'.
4901             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4902         ;;
4903       esac
4904       ;;
4905
4906     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4907       # PIC is the default for these OSes.
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       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4913       # (--disable-auto-import) libraries
4914       m4_if([$1], [GCJ], [],
4915         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4916       ;;
4917     darwin* | rhapsody*)
4918       # PIC is the default on this platform
4919       # Common symbols not allowed in MH_DYLIB files
4920       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4921       ;;
4922     *djgpp*)
4923       # DJGPP does not support shared libraries at all
4924       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4925       ;;
4926     haiku*)
4927       # PIC is the default for Haiku.
4928       # The "-static" flag exists, but is broken.
4929       _LT_TAGVAR(lt_prog_compiler_static, $1)=
4930       ;;
4931     interix[[3-9]]*)
4932       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4933       # Instead, we relocate shared libraries at runtime.
4934       ;;
4935     sysv4*MP*)
4936       if test -d /usr/nec; then
4937         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4938       fi
4939       ;;
4940     hpux*)
4941       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4942       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4943       # sets the default TLS model and affects inlining.
4944       case $host_cpu in
4945       hppa*64*)
4946         ;;
4947       *)
4948         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4949         ;;
4950       esac
4951       ;;
4952     *qnx* | *nto*)
4953       # QNX uses GNU C++, but need to define -shared option too, otherwise
4954       # it will coredump.
4955       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4956       ;;
4957     *)
4958       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4959       ;;
4960     esac
4961   else
4962     case $host_os in
4963       aix[[4-9]]*)
4964         # All AIX code is PIC.
4965         if test "$host_cpu" = ia64; then
4966           # AIX 5 now supports IA64 processor
4967           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4968         else
4969           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4970         fi
4971         ;;
4972       chorus*)
4973         case $cc_basename in
4974         cxch68*)
4975           # Green Hills C++ Compiler
4976           # _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"
4977           ;;
4978         esac
4979         ;;
4980       mingw* | cygwin* | os2* | pw32* | cegcc*)
4981         # This hack is so that the source file can tell whether it is being
4982         # built for inclusion in a dll (and should export symbols for example).
4983         m4_if([$1], [GCJ], [],
4984           [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4985         ;;
4986       dgux*)
4987         case $cc_basename in
4988           ec++*)
4989             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4990             ;;
4991           ghcx*)
4992             # Green Hills C++ Compiler
4993             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4994             ;;
4995           *)
4996             ;;
4997         esac
4998         ;;
4999       freebsd* | dragonfly*)
5000         # FreeBSD uses GNU C++
5001         ;;
5002       hpux9* | hpux10* | hpux11*)
5003         case $cc_basename in
5004           CC*)
5005             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5006             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5007             if test "$host_cpu" != ia64; then
5008               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5009             fi
5010             ;;
5011           aCC*)
5012             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5013             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5014             case $host_cpu in
5015             hppa*64*|ia64*)
5016               # +Z the default
5017               ;;
5018             *)
5019               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5020               ;;
5021             esac
5022             ;;
5023           *)
5024             ;;
5025         esac
5026         ;;
5027       interix*)
5028         # This is c89, which is MS Visual C++ (no shared libs)
5029         # Anyone wants to do a port?
5030         ;;
5031       irix5* | irix6* | nonstopux*)
5032         case $cc_basename in
5033           CC*)
5034             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5035             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5036             # CC pic flag -KPIC is the default.
5037             ;;
5038           *)
5039             ;;
5040         esac
5041         ;;
5042       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5043         case $cc_basename in
5044           KCC*)
5045             # KAI C++ Compiler
5046             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5047             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5048             ;;
5049           ecpc* )
5050             # old Intel C++ for x86_64 which still supported -KPIC.
5051             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5052             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5053             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5054             ;;
5055           icpc* )
5056             # Intel C++, used to be incompatible with GCC.
5057             # ICC 10 doesn't accept -KPIC any more.
5058             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5059             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5060             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5061             ;;
5062           pgCC* | pgcpp*)
5063             # Portland Group C++ compiler
5064             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5065             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5066             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5067             ;;
5068           cxx*)
5069             # Compaq C++
5070             # Make sure the PIC flag is empty.  It appears that all Alpha
5071             # Linux and Compaq Tru64 Unix objects are PIC.
5072             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5073             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5074             ;;
5075           xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5076             # IBM XL 8.0, 9.0 on PPC and BlueGene
5077             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5078             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5079             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5080             ;;
5081           *)
5082             case `$CC -V 2>&1 | sed 5q` in
5083             *Sun\ C*)
5084               # Sun C++ 5.9
5085               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5086               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5087               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5088               ;;
5089             esac
5090             ;;
5091         esac
5092         ;;
5093       lynxos*)
5094         ;;
5095       m88k*)
5096         ;;
5097       mvs*)
5098         case $cc_basename in
5099           cxx*)
5100             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5101             ;;
5102           *)
5103             ;;
5104         esac
5105         ;;
5106       netbsd* | netbsdelf*-gnu)
5107         ;;
5108       *qnx* | *nto*)
5109         # QNX uses GNU C++, but need to define -shared option too, otherwise
5110         # it will coredump.
5111         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5112         ;;
5113       osf3* | osf4* | osf5*)
5114         case $cc_basename in
5115           KCC*)
5116             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5117             ;;
5118           RCC*)
5119             # Rational C++ 2.4.1
5120             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5121             ;;
5122           cxx*)
5123             # Digital/Compaq C++
5124             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5125             # Make sure the PIC flag is empty.  It appears that all Alpha
5126             # Linux and Compaq Tru64 Unix objects are PIC.
5127             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5128             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5129             ;;
5130           *)
5131             ;;
5132         esac
5133         ;;
5134       psos*)
5135         ;;
5136       solaris*)
5137         case $cc_basename in
5138           CC* | sunCC*)
5139             # Sun C++ 4.2, 5.x and Centerline C++
5140             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5141             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5142             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5143             ;;
5144           gcx*)
5145             # Green Hills C++ Compiler
5146             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5147             ;;
5148           *)
5149             ;;
5150         esac
5151         ;;
5152       sunos4*)
5153         case $cc_basename in
5154           CC*)
5155             # Sun C++ 4.x
5156             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5157             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5158             ;;
5159           lcc*)
5160             # Lucid
5161             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5162             ;;
5163           *)
5164             ;;
5165         esac
5166         ;;
5167       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5168         case $cc_basename in
5169           CC*)
5170             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5171             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5172             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5173             ;;
5174         esac
5175         ;;
5176       tandem*)
5177         case $cc_basename in
5178           NCC*)
5179             # NonStop-UX NCC 3.20
5180             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5181             ;;
5182           *)
5183             ;;
5184         esac
5185         ;;
5186       vxworks*)
5187         ;;
5188       *)
5189         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5190         ;;
5191     esac
5192   fi
5193 ],
5194 [
5195   if test "$GCC" = yes; then
5196     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5197     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5198
5199     case $host_os in
5200       aix*)
5201       # All AIX code is PIC.
5202       if test "$host_cpu" = ia64; then
5203         # AIX 5 now supports IA64 processor
5204         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5205       fi
5206       ;;
5207
5208     amigaos*)
5209       case $host_cpu in
5210       powerpc)
5211             # see comment about AmigaOS4 .so support
5212             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5213         ;;
5214       m68k)
5215             # FIXME: we need at least 68020 code to build shared libraries, but
5216             # adding the `-m68020' flag to GCC prevents building anything better,
5217             # like `-m68040'.
5218             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5219         ;;
5220       esac
5221       ;;
5222
5223     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5224       # PIC is the default for these OSes.
5225       ;;
5226
5227     mingw* | cygwin* | pw32* | os2* | cegcc*)
5228       # This hack is so that the source file can tell whether it is being
5229       # built for inclusion in a dll (and should export symbols for example).
5230       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5231       # (--disable-auto-import) libraries
5232       m4_if([$1], [GCJ], [],
5233         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5234       ;;
5235
5236     darwin* | rhapsody*)
5237       # PIC is the default on this platform
5238       # Common symbols not allowed in MH_DYLIB files
5239       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5240       ;;
5241
5242     haiku*)
5243       # PIC is the default for Haiku.
5244       # The "-static" flag exists, but is broken.
5245       _LT_TAGVAR(lt_prog_compiler_static, $1)=
5246       ;;
5247
5248     hpux*)
5249       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5250       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5251       # sets the default TLS model and affects inlining.
5252       case $host_cpu in
5253       hppa*64*)
5254         # +Z the default
5255         ;;
5256       *)
5257         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5258         ;;
5259       esac
5260       ;;
5261
5262     interix[[3-9]]*)
5263       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5264       # Instead, we relocate shared libraries at runtime.
5265       ;;
5266
5267     msdosdjgpp*)
5268       # Just because we use GCC doesn't mean we suddenly get shared libraries
5269       # on systems that don't support them.
5270       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5271       enable_shared=no
5272       ;;
5273
5274     *nto* | *qnx*)
5275       # QNX uses GNU C++, but need to define -shared option too, otherwise
5276       # it will coredump.
5277       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5278       ;;
5279
5280     sysv4*MP*)
5281       if test -d /usr/nec; then
5282         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5283       fi
5284       ;;
5285
5286     *)
5287       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5288       ;;
5289     esac
5290
5291     case $cc_basename in
5292     nvcc*) # Cuda Compiler Driver 2.2
5293       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5294       if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5295         _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5296       fi
5297       ;;
5298     esac
5299   else
5300     # PORTME Check for flag to pass linker flags through the system compiler.
5301     case $host_os in
5302     aix*)
5303       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5304       if test "$host_cpu" = ia64; then
5305         # AIX 5 now supports IA64 processor
5306         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5307       else
5308         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5309       fi
5310       ;;
5311
5312     mingw* | cygwin* | pw32* | os2* | cegcc*)
5313       # This hack is so that the source file can tell whether it is being
5314       # built for inclusion in a dll (and should export symbols for example).
5315       m4_if([$1], [GCJ], [],
5316         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5317       ;;
5318
5319     hpux9* | hpux10* | hpux11*)
5320       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5321       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5322       # not for PA HP-UX.
5323       case $host_cpu in
5324       hppa*64*|ia64*)
5325         # +Z the default
5326         ;;
5327       *)
5328         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5329         ;;
5330       esac
5331       # Is there a better lt_prog_compiler_static that works with the bundled CC?
5332       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5333       ;;
5334
5335     irix5* | irix6* | nonstopux*)
5336       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5337       # PIC (with -KPIC) is the default.
5338       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5339       ;;
5340
5341     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5342       case $cc_basename in
5343       # old Intel for x86_64 which still supported -KPIC.
5344       ecc*)
5345         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5346         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5347         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5348         ;;
5349       # icc used to be incompatible with GCC.
5350       # ICC 10 doesn't accept -KPIC any more.
5351       icc* | ifort*)
5352         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5353         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5354         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5355         ;;
5356       # Lahey Fortran 8.1.
5357       lf95*)
5358         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5359         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5360         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5361         ;;
5362       nagfor*)
5363         # NAG Fortran compiler
5364         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5365         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5366         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5367         ;;
5368       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5369         # Portland Group compilers (*not* the Pentium gcc compiler,
5370         # which looks to be a dead project)
5371         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5372         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5373         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5374         ;;
5375       ccc*)
5376         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5377         # All Alpha code is PIC.
5378         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5379         ;;
5380       xl* | bgxl* | bgf* | mpixl*)
5381         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5382         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5383         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5384         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5385         ;;
5386       *)
5387         case `$CC -V 2>&1 | sed 5q` in
5388         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5389           # Sun Fortran 8.3 passes all unrecognized flags to the linker
5390           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5391           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5392           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5393           ;;
5394         *Sun\ F* | *Sun*Fortran*)
5395           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5396           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5397           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5398           ;;
5399         *Sun\ C*)
5400           # Sun C 5.9
5401           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5402           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5403           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5404           ;;
5405         *Intel*\ [[CF]]*Compiler*)
5406           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5407           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5408           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5409           ;;
5410         *Portland\ Group*)
5411           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5412           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5413           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5414           ;;
5415         esac
5416         ;;
5417       esac
5418       ;;
5419
5420     newsos6)
5421       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5422       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5423       ;;
5424
5425     *nto* | *qnx*)
5426       # QNX uses GNU C++, but need to define -shared option too, otherwise
5427       # it will coredump.
5428       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5429       ;;
5430
5431     osf3* | osf4* | osf5*)
5432       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5433       # All OSF/1 code is PIC.
5434       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5435       ;;
5436
5437     rdos*)
5438       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5439       ;;
5440
5441     solaris*)
5442       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5443       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5444       case $cc_basename in
5445       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5446         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5447       *)
5448         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5449       esac
5450       ;;
5451
5452     sunos4*)
5453       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5454       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5455       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5456       ;;
5457
5458     sysv4 | sysv4.2uw2* | sysv4.3*)
5459       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5460       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5461       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5462       ;;
5463
5464     sysv4*MP*)
5465       if test -d /usr/nec ;then
5466         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5467         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5468       fi
5469       ;;
5470
5471     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5472       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5473       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5474       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5475       ;;
5476
5477     unicos*)
5478       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5479       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5480       ;;
5481
5482     uts4*)
5483       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5484       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5485       ;;
5486
5487     *)
5488       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5489       ;;
5490     esac
5491   fi
5492 ])
5493 case $host_os in
5494   # For platforms which do not support PIC, -DPIC is meaningless:
5495   *djgpp*)
5496     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5497     ;;
5498   *)
5499     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5500     ;;
5501 esac
5502
5503 AC_CACHE_CHECK([for $compiler option to produce PIC],
5504   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5505   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5506 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5507
5508 #
5509 # Check to make sure the PIC flag actually works.
5510 #
5511 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5512   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5513     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5514     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5515     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5516      "" | " "*) ;;
5517      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5518      esac],
5519     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5520      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5521 fi
5522 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5523         [Additional compiler flags for building library objects])
5524
5525 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5526         [How to pass a linker flag through the compiler])
5527 #
5528 # Check to make sure the static flag actually works.
5529 #
5530 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5531 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5532   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5533   $lt_tmp_static_flag,
5534   [],
5535   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5536 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5537         [Compiler flag to prevent dynamic linking])
5538 ])# _LT_COMPILER_PIC
5539
5540
5541 # _LT_LINKER_SHLIBS([TAGNAME])
5542 # ----------------------------
5543 # See if the linker supports building shared libraries.
5544 m4_defun([_LT_LINKER_SHLIBS],
5545 [AC_REQUIRE([LT_PATH_LD])dnl
5546 AC_REQUIRE([LT_PATH_NM])dnl
5547 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5548 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5549 m4_require([_LT_DECL_EGREP])dnl
5550 m4_require([_LT_DECL_SED])dnl
5551 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5552 m4_require([_LT_TAG_COMPILER])dnl
5553 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5554 m4_if([$1], [CXX], [
5555   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5556   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5557   case $host_os in
5558   aix[[4-9]]*)
5559     # If we're using GNU nm, then we don't want the "-C" option.
5560     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5561     # Also, AIX nm treats weak defined symbols like other global defined
5562     # symbols, whereas GNU nm marks them as "W".
5563     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5564       _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'
5565     else
5566       _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'
5567     fi
5568     ;;
5569   pw32*)
5570     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5571     ;;
5572   cygwin* | mingw* | cegcc*)
5573     case $cc_basename in
5574     cl*)
5575       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5576       ;;
5577     *)
5578       _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'
5579       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5580       ;;
5581     esac
5582     ;;
5583   linux* | k*bsd*-gnu | gnu*)
5584     _LT_TAGVAR(link_all_deplibs, $1)=no
5585     ;;
5586   *)
5587     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5588     ;;
5589   esac
5590 ], [
5591   runpath_var=
5592   _LT_TAGVAR(allow_undefined_flag, $1)=
5593   _LT_TAGVAR(always_export_symbols, $1)=no
5594   _LT_TAGVAR(archive_cmds, $1)=
5595   _LT_TAGVAR(archive_expsym_cmds, $1)=
5596   _LT_TAGVAR(compiler_needs_object, $1)=no
5597   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5598   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5599   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5600   _LT_TAGVAR(hardcode_automatic, $1)=no
5601   _LT_TAGVAR(hardcode_direct, $1)=no
5602   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5603   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5604   _LT_TAGVAR(hardcode_libdir_separator, $1)=
5605   _LT_TAGVAR(hardcode_minus_L, $1)=no
5606   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5607   _LT_TAGVAR(inherit_rpath, $1)=no
5608   _LT_TAGVAR(link_all_deplibs, $1)=unknown
5609   _LT_TAGVAR(module_cmds, $1)=
5610   _LT_TAGVAR(module_expsym_cmds, $1)=
5611   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5612   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5613   _LT_TAGVAR(thread_safe_flag_spec, $1)=
5614   _LT_TAGVAR(whole_archive_flag_spec, $1)=
5615   # include_expsyms should be a list of space-separated symbols to be *always*
5616   # included in the symbol list
5617   _LT_TAGVAR(include_expsyms, $1)=
5618   # exclude_expsyms can be an extended regexp of symbols to exclude
5619   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5620   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5621   # as well as any symbol that contains `d'.
5622   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5623   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5624   # platforms (ab)use it in PIC code, but their linkers get confused if
5625   # the symbol is explicitly referenced.  Since portable code cannot
5626   # rely on this symbol name, it's probably fine to never include it in
5627   # preloaded symbol tables.
5628   # Exclude shared library initialization/finalization symbols.
5629 dnl Note also adjust exclude_expsyms for C++ above.
5630   extract_expsyms_cmds=
5631
5632   case $host_os in
5633   cygwin* | mingw* | pw32* | cegcc*)
5634     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5635     # When not using gcc, we currently assume that we are using
5636     # Microsoft Visual C++.
5637     if test "$GCC" != yes; then
5638       with_gnu_ld=no
5639     fi
5640     ;;
5641   interix*)
5642     # we just hope/assume this is gcc and not c89 (= MSVC++)
5643     with_gnu_ld=yes
5644     ;;
5645   openbsd*)
5646     with_gnu_ld=no
5647     ;;
5648   linux* | k*bsd*-gnu | gnu*)
5649     _LT_TAGVAR(link_all_deplibs, $1)=no
5650     ;;
5651   esac
5652
5653   _LT_TAGVAR(ld_shlibs, $1)=yes
5654
5655   # On some targets, GNU ld is compatible enough with the native linker
5656   # that we're better off using the native interface for both.
5657   lt_use_gnu_ld_interface=no
5658   if test "$with_gnu_ld" = yes; then
5659     case $host_os in
5660       aix*)
5661         # The AIX port of GNU ld has always aspired to compatibility
5662         # with the native linker.  However, as the warning in the GNU ld
5663         # block says, versions before 2.19.5* couldn't really create working
5664         # shared libraries, regardless of the interface used.
5665         case `$LD -v 2>&1` in
5666           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5667           *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5668           *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5669           *)
5670             lt_use_gnu_ld_interface=yes
5671             ;;
5672         esac
5673         ;;
5674       *)
5675         lt_use_gnu_ld_interface=yes
5676         ;;
5677     esac
5678   fi
5679
5680   if test "$lt_use_gnu_ld_interface" = yes; then
5681     # If archive_cmds runs LD, not CC, wlarc should be empty
5682     wlarc='${wl}'
5683
5684     # Set some defaults for GNU ld with shared library support. These
5685     # are reset later if shared libraries are not supported. Putting them
5686     # here allows them to be overridden if necessary.
5687     runpath_var=LD_RUN_PATH
5688     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5689     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5690     # ancient GNU ld didn't support --whole-archive et. al.
5691     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5692       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5693     else
5694       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5695     fi
5696     supports_anon_versioning=no
5697     case `$LD -v 2>&1` in
5698       *GNU\ gold*) supports_anon_versioning=yes ;;
5699       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5700       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5701       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5702       *\ 2.11.*) ;; # other 2.11 versions
5703       *) supports_anon_versioning=yes ;;
5704     esac
5705
5706     # See if GNU ld supports shared libraries.
5707     case $host_os in
5708     aix[[3-9]]*)
5709       # On AIX/PPC, the GNU linker is very broken
5710       if test "$host_cpu" != ia64; then
5711         _LT_TAGVAR(ld_shlibs, $1)=no
5712         cat <<_LT_EOF 1>&2
5713
5714 *** Warning: the GNU linker, at least up to release 2.19, is reported
5715 *** to be unable to reliably create shared libraries on AIX.
5716 *** Therefore, libtool is disabling shared libraries support.  If you
5717 *** really care for shared libraries, you may want to install binutils
5718 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5719 *** You will then need to restart the configuration process.
5720
5721 _LT_EOF
5722       fi
5723       ;;
5724
5725     amigaos*)
5726       case $host_cpu in
5727       powerpc)
5728             # see comment about AmigaOS4 .so support
5729             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5730             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5731         ;;
5732       m68k)
5733             _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)'
5734             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5735             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5736         ;;
5737       esac
5738       ;;
5739
5740     beos*)
5741       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5742         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5743         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5744         # support --undefined.  This deserves some investigation.  FIXME
5745         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5746       else
5747         _LT_TAGVAR(ld_shlibs, $1)=no
5748       fi
5749       ;;
5750
5751     cygwin* | mingw* | pw32* | cegcc*)
5752       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5753       # as there is no search path for DLLs.
5754       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5755       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5756       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5757       _LT_TAGVAR(always_export_symbols, $1)=no
5758       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5759       _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'
5760       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5761
5762       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5763         _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'
5764         # If the export-symbols file already is a .def file (1st line
5765         # is EXPORTS), use it as is; otherwise, prepend...
5766         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5767           cp $export_symbols $output_objdir/$soname.def;
5768         else
5769           echo EXPORTS > $output_objdir/$soname.def;
5770           cat $export_symbols >> $output_objdir/$soname.def;
5771         fi~
5772         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5773       else
5774         _LT_TAGVAR(ld_shlibs, $1)=no
5775       fi
5776       ;;
5777
5778     haiku*)
5779       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5780       _LT_TAGVAR(link_all_deplibs, $1)=yes
5781       ;;
5782
5783     interix[[3-9]]*)
5784       _LT_TAGVAR(hardcode_direct, $1)=no
5785       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5786       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5787       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5788       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5789       # Instead, shared libraries are loaded at an image base (0x10000000 by
5790       # default) and relocated if they conflict, which is a slow very memory
5791       # consuming and fragmenting process.  To avoid this, we pick a random,
5792       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5793       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5794       _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'
5795       _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'
5796       ;;
5797
5798     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5799       tmp_diet=no
5800       if test "$host_os" = linux-dietlibc; then
5801         case $cc_basename in
5802           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
5803         esac
5804       fi
5805       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5806          && test "$tmp_diet" = no
5807       then
5808         tmp_addflag=' $pic_flag'
5809         tmp_sharedflag='-shared'
5810         case $cc_basename,$host_cpu in
5811         pgcc*)                          # Portland Group C compiler
5812           _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'
5813           tmp_addflag=' $pic_flag'
5814           ;;
5815         pgf77* | pgf90* | pgf95* | pgfortran*)
5816                                         # Portland Group f77 and f90 compilers
5817           _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'
5818           tmp_addflag=' $pic_flag -Mnomain' ;;
5819         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
5820           tmp_addflag=' -i_dynamic' ;;
5821         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
5822           tmp_addflag=' -i_dynamic -nofor_main' ;;
5823         ifc* | ifort*)                  # Intel Fortran compiler
5824           tmp_addflag=' -nofor_main' ;;
5825         lf95*)                          # Lahey Fortran 8.1
5826           _LT_TAGVAR(whole_archive_flag_spec, $1)=
5827           tmp_sharedflag='--shared' ;;
5828         xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5829           tmp_sharedflag='-qmkshrobj'
5830           tmp_addflag= ;;
5831         nvcc*)  # Cuda Compiler Driver 2.2
5832           _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'
5833           _LT_TAGVAR(compiler_needs_object, $1)=yes
5834           ;;
5835         esac
5836         case `$CC -V 2>&1 | sed 5q` in
5837         *Sun\ C*)                       # Sun C 5.9
5838           _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'
5839           _LT_TAGVAR(compiler_needs_object, $1)=yes
5840           tmp_sharedflag='-G' ;;
5841         *Sun\ F*)                       # Sun Fortran 8.3
5842           tmp_sharedflag='-G' ;;
5843         esac
5844         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5845
5846         if test "x$supports_anon_versioning" = xyes; then
5847           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5848             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5849             echo "local: *; };" >> $output_objdir/$libname.ver~
5850             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5851         fi
5852
5853         case $cc_basename in
5854         xlf* | bgf* | bgxlf* | mpixlf*)
5855           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5856           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5857           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5858           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5859           if test "x$supports_anon_versioning" = xyes; then
5860             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5861               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5862               echo "local: *; };" >> $output_objdir/$libname.ver~
5863               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5864           fi
5865           ;;
5866         esac
5867       else
5868         _LT_TAGVAR(ld_shlibs, $1)=no
5869       fi
5870       ;;
5871
5872     netbsd* | netbsdelf*-gnu)
5873       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5874         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5875         wlarc=
5876       else
5877         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5878         _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'
5879       fi
5880       ;;
5881
5882     solaris*)
5883       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5884         _LT_TAGVAR(ld_shlibs, $1)=no
5885         cat <<_LT_EOF 1>&2
5886
5887 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5888 *** create shared libraries on Solaris systems.  Therefore, libtool
5889 *** is disabling shared libraries support.  We urge you to upgrade GNU
5890 *** binutils to release 2.9.1 or newer.  Another option is to modify
5891 *** your PATH or compiler configuration so that the native linker is
5892 *** used, and then restart.
5893
5894 _LT_EOF
5895       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5896         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5897         _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'
5898       else
5899         _LT_TAGVAR(ld_shlibs, $1)=no
5900       fi
5901       ;;
5902
5903     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5904       case `$LD -v 2>&1` in
5905         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5906         _LT_TAGVAR(ld_shlibs, $1)=no
5907         cat <<_LT_EOF 1>&2
5908
5909 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5910 *** reliably create shared libraries on SCO systems.  Therefore, libtool
5911 *** is disabling shared libraries support.  We urge you to upgrade GNU
5912 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5913 *** your PATH or compiler configuration so that the native linker is
5914 *** used, and then restart.
5915
5916 _LT_EOF
5917         ;;
5918         *)
5919           # For security reasons, it is highly recommended that you always
5920           # use absolute paths for naming shared libraries, and exclude the
5921           # DT_RUNPATH tag from executables and libraries.  But doing so
5922           # requires that you compile everything twice, which is a pain.
5923           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5924             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5925             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5926             _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'
5927           else
5928             _LT_TAGVAR(ld_shlibs, $1)=no
5929           fi
5930         ;;
5931       esac
5932       ;;
5933
5934     sunos4*)
5935       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5936       wlarc=
5937       _LT_TAGVAR(hardcode_direct, $1)=yes
5938       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5939       ;;
5940
5941     *)
5942       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5943         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5944         _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'
5945       else
5946         _LT_TAGVAR(ld_shlibs, $1)=no
5947       fi
5948       ;;
5949     esac
5950
5951     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5952       runpath_var=
5953       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5954       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5955       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5956     fi
5957   else
5958     # PORTME fill in a description of your system's linker (not GNU ld)
5959     case $host_os in
5960     aix3*)
5961       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5962       _LT_TAGVAR(always_export_symbols, $1)=yes
5963       _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'
5964       # Note: this linker hardcodes the directories in LIBPATH if there
5965       # are no directories specified by -L.
5966       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5967       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5968         # Neither direct hardcoding nor static linking is supported with a
5969         # broken collect2.
5970         _LT_TAGVAR(hardcode_direct, $1)=unsupported
5971       fi
5972       ;;
5973
5974     aix[[4-9]]*)
5975       if test "$host_cpu" = ia64; then
5976         # On IA64, the linker does run time linking by default, so we don't
5977         # have to do anything special.
5978         aix_use_runtimelinking=no
5979         exp_sym_flag='-Bexport'
5980         no_entry_flag=""
5981       else
5982         # If we're using GNU nm, then we don't want the "-C" option.
5983         # -C means demangle to AIX nm, but means don't demangle with GNU nm
5984         # Also, AIX nm treats weak defined symbols like other global
5985         # defined symbols, whereas GNU nm marks them as "W".
5986         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5987           _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'
5988         else
5989           _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'
5990         fi
5991         aix_use_runtimelinking=no
5992
5993         # Test if we are trying to use run time linking or normal
5994         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5995         # need to do runtime linking.
5996         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5997           for ld_flag in $LDFLAGS; do
5998           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5999             aix_use_runtimelinking=yes
6000             break
6001           fi
6002           done
6003           ;;
6004         esac
6005
6006         exp_sym_flag='-bexport'
6007         no_entry_flag='-bnoentry'
6008       fi
6009
6010       # When large executables or shared objects are built, AIX ld can
6011       # have problems creating the table of contents.  If linking a library
6012       # or program results in "error TOC overflow" add -mminimal-toc to
6013       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6014       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6015
6016       _LT_TAGVAR(archive_cmds, $1)=''
6017       _LT_TAGVAR(hardcode_direct, $1)=yes
6018       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6019       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6020       _LT_TAGVAR(link_all_deplibs, $1)=yes
6021       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6022
6023       if test "$GCC" = yes; then
6024         case $host_os in aix4.[[012]]|aix4.[[012]].*)
6025         # We only want to do this on AIX 4.2 and lower, the check
6026         # below for broken collect2 doesn't work under 4.3+
6027           collect2name=`${CC} -print-prog-name=collect2`
6028           if test -f "$collect2name" &&
6029            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6030           then
6031           # We have reworked collect2
6032           :
6033           else
6034           # We have old collect2
6035           _LT_TAGVAR(hardcode_direct, $1)=unsupported
6036           # It fails to find uninstalled libraries when the uninstalled
6037           # path is not listed in the libpath.  Setting hardcode_minus_L
6038           # to unsupported forces relinking
6039           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6040           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6041           _LT_TAGVAR(hardcode_libdir_separator, $1)=
6042           fi
6043           ;;
6044         esac
6045         shared_flag='-shared'
6046         if test "$aix_use_runtimelinking" = yes; then
6047           shared_flag="$shared_flag "'${wl}-G'
6048         fi
6049         _LT_TAGVAR(link_all_deplibs, $1)=no
6050       else
6051         # not using gcc
6052         if test "$host_cpu" = ia64; then
6053         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6054         # chokes on -Wl,-G. The following line is correct:
6055           shared_flag='-G'
6056         else
6057           if test "$aix_use_runtimelinking" = yes; then
6058             shared_flag='${wl}-G'
6059           else
6060             shared_flag='${wl}-bM:SRE'
6061           fi
6062         fi
6063       fi
6064
6065       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6066       # It seems that -bexpall does not export symbols beginning with
6067       # underscore (_), so it is better to generate a list of symbols to export.
6068       _LT_TAGVAR(always_export_symbols, $1)=yes
6069       if test "$aix_use_runtimelinking" = yes; then
6070         # Warning - without using the other runtime loading flags (-brtl),
6071         # -berok will link without error, but may produce a broken library.
6072         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6073         # Determine the default libpath from the value encoded in an
6074         # empty executable.
6075         _LT_SYS_MODULE_PATH_AIX([$1])
6076         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6077         _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"
6078       else
6079         if test "$host_cpu" = ia64; then
6080           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6081           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6082           _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"
6083         else
6084          # Determine the default libpath from the value encoded in an
6085          # empty executable.
6086          _LT_SYS_MODULE_PATH_AIX([$1])
6087          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6088           # Warning - without using the other run time loading flags,
6089           # -berok will link without error, but may produce a broken library.
6090           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6091           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6092           if test "$with_gnu_ld" = yes; then
6093             # We only use this code for GNU lds that support --whole-archive.
6094             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6095           else
6096             # Exported symbols can be pulled into shared objects from archives
6097             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6098           fi
6099           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6100           # This is similar to how AIX traditionally builds its shared libraries.
6101           _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'
6102         fi
6103       fi
6104       ;;
6105
6106     amigaos*)
6107       case $host_cpu in
6108       powerpc)
6109             # see comment about AmigaOS4 .so support
6110             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6111             _LT_TAGVAR(archive_expsym_cmds, $1)=''
6112         ;;
6113       m68k)
6114             _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)'
6115             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6116             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6117         ;;
6118       esac
6119       ;;
6120
6121     bsdi[[45]]*)
6122       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6123       ;;
6124
6125     cygwin* | mingw* | pw32* | cegcc*)
6126       # When not using gcc, we currently assume that we are using
6127       # Microsoft Visual C++.
6128       # hardcode_libdir_flag_spec is actually meaningless, as there is
6129       # no search path for DLLs.
6130       case $cc_basename in
6131       cl*)
6132         # Native MSVC
6133         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6134         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6135         _LT_TAGVAR(always_export_symbols, $1)=yes
6136         _LT_TAGVAR(file_list_spec, $1)='@'
6137         # Tell ltmain to make .lib files, not .a files.
6138         libext=lib
6139         # Tell ltmain to make .dll files, not .so files.
6140         shrext_cmds=".dll"
6141         # FIXME: Setting linknames here is a bad hack.
6142         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6143         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6144             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6145           else
6146             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6147           fi~
6148           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6149           linknames='
6150         # The linker will not automatically build a static lib if we build a DLL.
6151         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6152         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6153         _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6154         _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'
6155         # Don't use ranlib
6156         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6157         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6158           lt_tool_outputfile="@TOOL_OUTPUT@"~
6159           case $lt_outputfile in
6160             *.exe|*.EXE) ;;
6161             *)
6162               lt_outputfile="$lt_outputfile.exe"
6163               lt_tool_outputfile="$lt_tool_outputfile.exe"
6164               ;;
6165           esac~
6166           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6167             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6168             $RM "$lt_outputfile.manifest";
6169           fi'
6170         ;;
6171       *)
6172         # Assume MSVC wrapper
6173         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6174         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6175         # Tell ltmain to make .lib files, not .a files.
6176         libext=lib
6177         # Tell ltmain to make .dll files, not .so files.
6178         shrext_cmds=".dll"
6179         # FIXME: Setting linknames here is a bad hack.
6180         _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6181         # The linker will automatically build a .lib file if we build a DLL.
6182         _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6183         # FIXME: Should let the user specify the lib program.
6184         _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6185         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6186         ;;
6187       esac
6188       ;;
6189
6190     darwin* | rhapsody*)
6191       _LT_DARWIN_LINKER_FEATURES($1)
6192       ;;
6193
6194     dgux*)
6195       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6196       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6197       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6198       ;;
6199
6200     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6201     # support.  Future versions do this automatically, but an explicit c++rt0.o
6202     # does not break anything, and helps significantly (at the cost of a little
6203     # extra space).
6204     freebsd2.2*)
6205       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6206       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6207       _LT_TAGVAR(hardcode_direct, $1)=yes
6208       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6209       ;;
6210
6211     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6212     freebsd2.*)
6213       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6214       _LT_TAGVAR(hardcode_direct, $1)=yes
6215       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6216       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6217       ;;
6218
6219     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6220     freebsd* | dragonfly*)
6221       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6222       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6223       _LT_TAGVAR(hardcode_direct, $1)=yes
6224       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6225       ;;
6226
6227     hpux9*)
6228       if test "$GCC" = yes; then
6229         _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'
6230       else
6231         _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'
6232       fi
6233       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6234       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6235       _LT_TAGVAR(hardcode_direct, $1)=yes
6236
6237       # hardcode_minus_L: Not really in the search PATH,
6238       # but as the default location of the library.
6239       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6240       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6241       ;;
6242
6243     hpux10*)
6244       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6245         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6246       else
6247         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6248       fi
6249       if test "$with_gnu_ld" = no; then
6250         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6251         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6252         _LT_TAGVAR(hardcode_direct, $1)=yes
6253         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6254         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6255         # hardcode_minus_L: Not really in the search PATH,
6256         # but as the default location of the library.
6257         _LT_TAGVAR(hardcode_minus_L, $1)=yes
6258       fi
6259       ;;
6260
6261     hpux11*)
6262       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6263         case $host_cpu in
6264         hppa*64*)
6265           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6266           ;;
6267         ia64*)
6268           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6269           ;;
6270         *)
6271           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6272           ;;
6273         esac
6274       else
6275         case $host_cpu in
6276         hppa*64*)
6277           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6278           ;;
6279         ia64*)
6280           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6281           ;;
6282         *)
6283         m4_if($1, [], [
6284           # Older versions of the 11.00 compiler do not understand -b yet
6285           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6286           _LT_LINKER_OPTION([if $CC understands -b],
6287             _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6288             [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6289             [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6290           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6291           ;;
6292         esac
6293       fi
6294       if test "$with_gnu_ld" = no; then
6295         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6296         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6297
6298         case $host_cpu in
6299         hppa*64*|ia64*)
6300           _LT_TAGVAR(hardcode_direct, $1)=no
6301           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6302           ;;
6303         *)
6304           _LT_TAGVAR(hardcode_direct, $1)=yes
6305           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6306           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6307
6308           # hardcode_minus_L: Not really in the search PATH,
6309           # but as the default location of the library.
6310           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6311           ;;
6312         esac
6313       fi
6314       ;;
6315
6316     irix5* | irix6* | nonstopux*)
6317       if test "$GCC" = yes; then
6318         _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'
6319         # Try to use the -exported_symbol ld option, if it does not
6320         # work, assume that -exports_file does not work either and
6321         # implicitly export all symbols.
6322         # This should be the same for all languages, so no per-tag cache variable.
6323         AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6324           [lt_cv_irix_exported_symbol],
6325           [save_LDFLAGS="$LDFLAGS"
6326            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6327            AC_LINK_IFELSE(
6328              [AC_LANG_SOURCE(
6329                 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6330                               [C++], [[int foo (void) { return 0; }]],
6331                               [Fortran 77], [[
6332       subroutine foo
6333       end]],
6334                               [Fortran], [[
6335       subroutine foo
6336       end]])])],
6337               [lt_cv_irix_exported_symbol=yes],
6338               [lt_cv_irix_exported_symbol=no])
6339            LDFLAGS="$save_LDFLAGS"])
6340         if test "$lt_cv_irix_exported_symbol" = yes; then
6341           _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'
6342         fi
6343       else
6344         _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'
6345         _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'
6346       fi
6347       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6348       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6349       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6350       _LT_TAGVAR(inherit_rpath, $1)=yes
6351       _LT_TAGVAR(link_all_deplibs, $1)=yes
6352       ;;
6353
6354     netbsd* | netbsdelf*-gnu)
6355       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6356         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6357       else
6358         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6359       fi
6360       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6361       _LT_TAGVAR(hardcode_direct, $1)=yes
6362       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6363       ;;
6364
6365     newsos6)
6366       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6367       _LT_TAGVAR(hardcode_direct, $1)=yes
6368       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6369       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6370       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6371       ;;
6372
6373     *nto* | *qnx*)
6374       ;;
6375
6376     openbsd*)
6377       if test -f /usr/libexec/ld.so; then
6378         _LT_TAGVAR(hardcode_direct, $1)=yes
6379         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6380         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6381         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6382           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6383           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6384           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6385           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6386         else
6387           case $host_os in
6388            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6389              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6390              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6391              ;;
6392            *)
6393              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6394              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6395              ;;
6396           esac
6397         fi
6398       else
6399         _LT_TAGVAR(ld_shlibs, $1)=no
6400       fi
6401       ;;
6402
6403     os2*)
6404       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6405       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6406       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6407       _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'
6408       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6409       ;;
6410
6411     osf3*)
6412       if test "$GCC" = yes; then
6413         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6414         _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'
6415       else
6416         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6417         _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'
6418       fi
6419       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6420       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6421       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6422       ;;
6423
6424     osf4* | osf5*)      # as osf3* with the addition of -msym flag
6425       if test "$GCC" = yes; then
6426         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6427         _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'
6428         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6429       else
6430         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6431         _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'
6432         _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~
6433         $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'
6434
6435         # Both c and cxx compiler support -rpath directly
6436         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6437       fi
6438       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6439       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6440       ;;
6441
6442     solaris*)
6443       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6444       if test "$GCC" = yes; then
6445         wlarc='${wl}'
6446         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6447         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6448           $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'
6449       else
6450         case `$CC -V 2>&1` in
6451         *"Compilers 5.0"*)
6452           wlarc=''
6453           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6454           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6455           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6456           ;;
6457         *)
6458           wlarc='${wl}'
6459           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6460           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6461           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6462           ;;
6463         esac
6464       fi
6465       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6466       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6467       case $host_os in
6468       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6469       *)
6470         # The compiler driver will combine and reorder linker options,
6471         # but understands `-z linker_flag'.  GCC discards it without `$wl',
6472         # but is careful enough not to reorder.
6473         # Supported since Solaris 2.6 (maybe 2.5.1?)
6474         if test "$GCC" = yes; then
6475           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6476         else
6477           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6478         fi
6479         ;;
6480       esac
6481       _LT_TAGVAR(link_all_deplibs, $1)=yes
6482       ;;
6483
6484     sunos4*)
6485       if test "x$host_vendor" = xsequent; then
6486         # Use $CC to link under sequent, because it throws in some extra .o
6487         # files that make .init and .fini sections work.
6488         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6489       else
6490         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6491       fi
6492       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6493       _LT_TAGVAR(hardcode_direct, $1)=yes
6494       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6495       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6496       ;;
6497
6498     sysv4)
6499       case $host_vendor in
6500         sni)
6501           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6502           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6503         ;;
6504         siemens)
6505           ## LD is ld it makes a PLAMLIB
6506           ## CC just makes a GrossModule.
6507           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6508           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6509           _LT_TAGVAR(hardcode_direct, $1)=no
6510         ;;
6511         motorola)
6512           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6513           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6514         ;;
6515       esac
6516       runpath_var='LD_RUN_PATH'
6517       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6518       ;;
6519
6520     sysv4.3*)
6521       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6522       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6523       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6524       ;;
6525
6526     sysv4*MP*)
6527       if test -d /usr/nec; then
6528         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6529         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6530         runpath_var=LD_RUN_PATH
6531         hardcode_runpath_var=yes
6532         _LT_TAGVAR(ld_shlibs, $1)=yes
6533       fi
6534       ;;
6535
6536     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6537       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6538       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6539       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6540       runpath_var='LD_RUN_PATH'
6541
6542       if test "$GCC" = yes; then
6543         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6544         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6545       else
6546         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6547         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6548       fi
6549       ;;
6550
6551     sysv5* | sco3.2v5* | sco5v6*)
6552       # Note: We can NOT use -z defs as we might desire, because we do not
6553       # link with -lc, and that would cause any symbols used from libc to
6554       # always be unresolved, which means just about no library would
6555       # ever link correctly.  If we're not using GNU ld we use -z text
6556       # though, which does catch some bad symbols but isn't as heavy-handed
6557       # as -z defs.
6558       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6559       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6560       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6561       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6562       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6563       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6564       _LT_TAGVAR(link_all_deplibs, $1)=yes
6565       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6566       runpath_var='LD_RUN_PATH'
6567
6568       if test "$GCC" = yes; then
6569         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6570         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6571       else
6572         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6573         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6574       fi
6575       ;;
6576
6577     uts4*)
6578       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6579       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6580       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6581       ;;
6582
6583     *)
6584       _LT_TAGVAR(ld_shlibs, $1)=no
6585       ;;
6586     esac
6587
6588     if test x$host_vendor = xsni; then
6589       case $host in
6590       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6591         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6592         ;;
6593       esac
6594     fi
6595   fi
6596 ])
6597 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6598 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6599
6600 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6601
6602 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6603 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6604 _LT_DECL([], [extract_expsyms_cmds], [2],
6605     [The commands to extract the exported symbol list from a shared archive])
6606
6607 #
6608 # Do we need to explicitly link libc?
6609 #
6610 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6611 x|xyes)
6612   # Assume -lc should be added
6613   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6614
6615   if test "$enable_shared" = yes && test "$GCC" = yes; then
6616     case $_LT_TAGVAR(archive_cmds, $1) in
6617     *'~'*)
6618       # FIXME: we may have to deal with multi-command sequences.
6619       ;;
6620     '$CC '*)
6621       # Test whether the compiler implicitly links with -lc since on some
6622       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6623       # to ld, don't add -lc before -lgcc.
6624       AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6625         [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6626         [$RM conftest*
6627         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6628
6629         if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6630           soname=conftest
6631           lib=conftest
6632           libobjs=conftest.$ac_objext
6633           deplibs=
6634           wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6635           pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6636           compiler_flags=-v
6637           linker_flags=-v
6638           verstring=
6639           output_objdir=.
6640           libname=conftest
6641           lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6642           _LT_TAGVAR(allow_undefined_flag, $1)=
6643           if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6644           then
6645             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6646           else
6647             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6648           fi
6649           _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6650         else
6651           cat conftest.err 1>&5
6652         fi
6653         $RM conftest*
6654         ])
6655       _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6656       ;;
6657     esac
6658   fi
6659   ;;
6660 esac
6661
6662 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6663     [Whether or not to add -lc for building shared libraries])
6664 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6665     [enable_shared_with_static_runtimes], [0],
6666     [Whether or not to disallow shared libs when runtime libs are static])
6667 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6668     [Compiler flag to allow reflexive dlopens])
6669 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6670     [Compiler flag to generate shared objects directly from archives])
6671 _LT_TAGDECL([], [compiler_needs_object], [1],
6672     [Whether the compiler copes with passing no objects directly])
6673 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6674     [Create an old-style archive from a shared archive])
6675 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6676     [Create a temporary old-style archive to link instead of a shared archive])
6677 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6678 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6679 _LT_TAGDECL([], [module_cmds], [2],
6680     [Commands used to build a loadable module if different from building
6681     a shared archive.])
6682 _LT_TAGDECL([], [module_expsym_cmds], [2])
6683 _LT_TAGDECL([], [with_gnu_ld], [1],
6684     [Whether we are building with GNU ld or not])
6685 _LT_TAGDECL([], [allow_undefined_flag], [1],
6686     [Flag that allows shared libraries with undefined symbols to be built])
6687 _LT_TAGDECL([], [no_undefined_flag], [1],
6688     [Flag that enforces no undefined symbols])
6689 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6690     [Flag to hardcode $libdir into a binary during linking.
6691     This must work even if $libdir does not exist])
6692 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6693     [Whether we need a single "-rpath" flag with a separated argument])
6694 _LT_TAGDECL([], [hardcode_direct], [0],
6695     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6696     DIR into the resulting binary])
6697 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6698     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6699     DIR into the resulting binary and the resulting library dependency is
6700     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6701     library is relocated])
6702 _LT_TAGDECL([], [hardcode_minus_L], [0],
6703     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6704     into the resulting binary])
6705 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6706     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6707     into the resulting binary])
6708 _LT_TAGDECL([], [hardcode_automatic], [0],
6709     [Set to "yes" if building a shared library automatically hardcodes DIR
6710     into the library and all subsequent libraries and executables linked
6711     against it])
6712 _LT_TAGDECL([], [inherit_rpath], [0],
6713     [Set to yes if linker adds runtime paths of dependent libraries
6714     to runtime path list])
6715 _LT_TAGDECL([], [link_all_deplibs], [0],
6716     [Whether libtool must link a program against all its dependency libraries])
6717 _LT_TAGDECL([], [always_export_symbols], [0],
6718     [Set to "yes" if exported symbols are required])
6719 _LT_TAGDECL([], [export_symbols_cmds], [2],
6720     [The commands to list exported symbols])
6721 _LT_TAGDECL([], [exclude_expsyms], [1],
6722     [Symbols that should not be listed in the preloaded symbols])
6723 _LT_TAGDECL([], [include_expsyms], [1],
6724     [Symbols that must always be exported])
6725 _LT_TAGDECL([], [prelink_cmds], [2],
6726     [Commands necessary for linking programs (against libraries) with templates])
6727 _LT_TAGDECL([], [postlink_cmds], [2],
6728     [Commands necessary for finishing linking programs])
6729 _LT_TAGDECL([], [file_list_spec], [1],
6730     [Specify filename containing input files])
6731 dnl FIXME: Not yet implemented
6732 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6733 dnl    [Compiler flag to generate thread safe objects])
6734 ])# _LT_LINKER_SHLIBS
6735
6736
6737 # _LT_LANG_C_CONFIG([TAG])
6738 # ------------------------
6739 # Ensure that the configuration variables for a C compiler are suitably
6740 # defined.  These variables are subsequently used by _LT_CONFIG to write
6741 # the compiler configuration to `libtool'.
6742 m4_defun([_LT_LANG_C_CONFIG],
6743 [m4_require([_LT_DECL_EGREP])dnl
6744 lt_save_CC="$CC"
6745 AC_LANG_PUSH(C)
6746
6747 # Source file extension for C test sources.
6748 ac_ext=c
6749
6750 # Object file extension for compiled C test sources.
6751 objext=o
6752 _LT_TAGVAR(objext, $1)=$objext
6753
6754 # Code to be used in simple compile tests
6755 lt_simple_compile_test_code="int some_variable = 0;"
6756
6757 # Code to be used in simple link tests
6758 lt_simple_link_test_code='int main(){return(0);}'
6759
6760 _LT_TAG_COMPILER
6761 # Save the default compiler, since it gets overwritten when the other
6762 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6763 compiler_DEFAULT=$CC
6764
6765 # save warnings/boilerplate of simple test code
6766 _LT_COMPILER_BOILERPLATE
6767 _LT_LINKER_BOILERPLATE
6768
6769 if test -n "$compiler"; then
6770   _LT_COMPILER_NO_RTTI($1)
6771   _LT_COMPILER_PIC($1)
6772   _LT_COMPILER_C_O($1)
6773   _LT_COMPILER_FILE_LOCKS($1)
6774   _LT_LINKER_SHLIBS($1)
6775   _LT_SYS_DYNAMIC_LINKER($1)
6776   _LT_LINKER_HARDCODE_LIBPATH($1)
6777   LT_SYS_DLOPEN_SELF
6778   _LT_CMD_STRIPLIB
6779
6780   # Report which library types will actually be built
6781   AC_MSG_CHECKING([if libtool supports shared libraries])
6782   AC_MSG_RESULT([$can_build_shared])
6783
6784   AC_MSG_CHECKING([whether to build shared libraries])
6785   test "$can_build_shared" = "no" && enable_shared=no
6786
6787   # On AIX, shared libraries and static libraries use the same namespace, and
6788   # are all built from PIC.
6789   case $host_os in
6790   aix3*)
6791     test "$enable_shared" = yes && enable_static=no
6792     if test -n "$RANLIB"; then
6793       archive_cmds="$archive_cmds~\$RANLIB \$lib"
6794       postinstall_cmds='$RANLIB $lib'
6795     fi
6796     ;;
6797
6798   aix[[4-9]]*)
6799     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6800       test "$enable_shared" = yes && enable_static=no
6801     fi
6802     ;;
6803   esac
6804   AC_MSG_RESULT([$enable_shared])
6805
6806   AC_MSG_CHECKING([whether to build static libraries])
6807   # Make sure either enable_shared or enable_static is yes.
6808   test "$enable_shared" = yes || enable_static=yes
6809   AC_MSG_RESULT([$enable_static])
6810
6811   _LT_CONFIG($1)
6812 fi
6813 AC_LANG_POP
6814 CC="$lt_save_CC"
6815 ])# _LT_LANG_C_CONFIG
6816
6817
6818 # _LT_LANG_CXX_CONFIG([TAG])
6819 # --------------------------
6820 # Ensure that the configuration variables for a C++ compiler are suitably
6821 # defined.  These variables are subsequently used by _LT_CONFIG to write
6822 # the compiler configuration to `libtool'.
6823 m4_defun([_LT_LANG_CXX_CONFIG],
6824 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6825 m4_require([_LT_DECL_EGREP])dnl
6826 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6827 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6828     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6829     (test "X$CXX" != "Xg++"))) ; then
6830   AC_PROG_CXXCPP
6831 else
6832   _lt_caught_CXX_error=yes
6833 fi
6834
6835 AC_LANG_PUSH(C++)
6836 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6837 _LT_TAGVAR(allow_undefined_flag, $1)=
6838 _LT_TAGVAR(always_export_symbols, $1)=no
6839 _LT_TAGVAR(archive_expsym_cmds, $1)=
6840 _LT_TAGVAR(compiler_needs_object, $1)=no
6841 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6842 _LT_TAGVAR(hardcode_direct, $1)=no
6843 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6844 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6845 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6846 _LT_TAGVAR(hardcode_minus_L, $1)=no
6847 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6848 _LT_TAGVAR(hardcode_automatic, $1)=no
6849 _LT_TAGVAR(inherit_rpath, $1)=no
6850 _LT_TAGVAR(module_cmds, $1)=
6851 _LT_TAGVAR(module_expsym_cmds, $1)=
6852 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6853 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6854 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6855 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6856 _LT_TAGVAR(no_undefined_flag, $1)=
6857 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6858 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6859
6860 # Source file extension for C++ test sources.
6861 ac_ext=cpp
6862
6863 # Object file extension for compiled C++ test sources.
6864 objext=o
6865 _LT_TAGVAR(objext, $1)=$objext
6866
6867 # No sense in running all these tests if we already determined that
6868 # the CXX compiler isn't working.  Some variables (like enable_shared)
6869 # are currently assumed to apply to all compilers on this platform,
6870 # and will be corrupted by setting them based on a non-working compiler.
6871 if test "$_lt_caught_CXX_error" != yes; then
6872   # Code to be used in simple compile tests
6873   lt_simple_compile_test_code="int some_variable = 0;"
6874
6875   # Code to be used in simple link tests
6876   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6877
6878   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6879   _LT_TAG_COMPILER
6880
6881   # save warnings/boilerplate of simple test code
6882   _LT_COMPILER_BOILERPLATE
6883   _LT_LINKER_BOILERPLATE
6884
6885   # Allow CC to be a program name with arguments.
6886   lt_save_CC=$CC
6887   lt_save_CFLAGS=$CFLAGS
6888   lt_save_LD=$LD
6889   lt_save_GCC=$GCC
6890   GCC=$GXX
6891   lt_save_with_gnu_ld=$with_gnu_ld
6892   lt_save_path_LD=$lt_cv_path_LD
6893   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6894     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6895   else
6896     $as_unset lt_cv_prog_gnu_ld
6897   fi
6898   if test -n "${lt_cv_path_LDCXX+set}"; then
6899     lt_cv_path_LD=$lt_cv_path_LDCXX
6900   else
6901     $as_unset lt_cv_path_LD
6902   fi
6903   test -z "${LDCXX+set}" || LD=$LDCXX
6904   CC=${CXX-"c++"}
6905   CFLAGS=$CXXFLAGS
6906   compiler=$CC
6907   _LT_TAGVAR(compiler, $1)=$CC
6908   _LT_CC_BASENAME([$compiler])
6909
6910   if test -n "$compiler"; then
6911     # We don't want -fno-exception when compiling C++ code, so set the
6912     # no_builtin_flag separately
6913     if test "$GXX" = yes; then
6914       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6915     else
6916       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6917     fi
6918
6919     if test "$GXX" = yes; then
6920       # Set up default GNU C++ configuration
6921
6922       LT_PATH_LD
6923
6924       # Check if GNU C++ uses GNU ld as the underlying linker, since the
6925       # archiving commands below assume that GNU ld is being used.
6926       if test "$with_gnu_ld" = yes; then
6927         _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6928         _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'
6929
6930         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6931         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6932
6933         # If archive_cmds runs LD, not CC, wlarc should be empty
6934         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6935         #     investigate it a little bit more. (MM)
6936         wlarc='${wl}'
6937
6938         # ancient GNU ld didn't support --whole-archive et. al.
6939         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6940           $GREP 'no-whole-archive' > /dev/null; then
6941           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6942         else
6943           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6944         fi
6945       else
6946         with_gnu_ld=no
6947         wlarc=
6948
6949         # A generic and very simple default shared library creation
6950         # command for GNU C++ for the case where it uses the native
6951         # linker, instead of GNU ld.  If possible, this setting should
6952         # overridden to take advantage of the native linker features on
6953         # the platform it is being used on.
6954         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6955       fi
6956
6957       # Commands to make compiler produce verbose output that lists
6958       # what "hidden" libraries, object files and flags are used when
6959       # linking a shared library.
6960       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6961
6962     else
6963       GXX=no
6964       with_gnu_ld=no
6965       wlarc=
6966     fi
6967
6968     # PORTME: fill in a description of your system's C++ link characteristics
6969     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6970     _LT_TAGVAR(ld_shlibs, $1)=yes
6971     case $host_os in
6972       aix3*)
6973         # FIXME: insert proper C++ library support
6974         _LT_TAGVAR(ld_shlibs, $1)=no
6975         ;;
6976       aix[[4-9]]*)
6977         if test "$host_cpu" = ia64; then
6978           # On IA64, the linker does run time linking by default, so we don't
6979           # have to do anything special.
6980           aix_use_runtimelinking=no
6981           exp_sym_flag='-Bexport'
6982           no_entry_flag=""
6983         else
6984           aix_use_runtimelinking=no
6985
6986           # Test if we are trying to use run time linking or normal
6987           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6988           # need to do runtime linking.
6989           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6990             for ld_flag in $LDFLAGS; do
6991               case $ld_flag in
6992               *-brtl*)
6993                 aix_use_runtimelinking=yes
6994                 break
6995                 ;;
6996               esac
6997             done
6998             ;;
6999           esac
7000
7001           exp_sym_flag='-bexport'
7002           no_entry_flag='-bnoentry'
7003         fi
7004
7005         # When large executables or shared objects are built, AIX ld can
7006         # have problems creating the table of contents.  If linking a library
7007         # or program results in "error TOC overflow" add -mminimal-toc to
7008         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7009         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7010
7011         _LT_TAGVAR(archive_cmds, $1)=''
7012         _LT_TAGVAR(hardcode_direct, $1)=yes
7013         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7014         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7015         _LT_TAGVAR(link_all_deplibs, $1)=yes
7016         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7017
7018         if test "$GXX" = yes; then
7019           case $host_os in aix4.[[012]]|aix4.[[012]].*)
7020           # We only want to do this on AIX 4.2 and lower, the check
7021           # below for broken collect2 doesn't work under 4.3+
7022           collect2name=`${CC} -print-prog-name=collect2`
7023           if test -f "$collect2name" &&
7024              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7025           then
7026             # We have reworked collect2
7027             :
7028           else
7029             # We have old collect2
7030             _LT_TAGVAR(hardcode_direct, $1)=unsupported
7031             # It fails to find uninstalled libraries when the uninstalled
7032             # path is not listed in the libpath.  Setting hardcode_minus_L
7033             # to unsupported forces relinking
7034             _LT_TAGVAR(hardcode_minus_L, $1)=yes
7035             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7036             _LT_TAGVAR(hardcode_libdir_separator, $1)=
7037           fi
7038           esac
7039           shared_flag='-shared'
7040           if test "$aix_use_runtimelinking" = yes; then
7041             shared_flag="$shared_flag "'${wl}-G'
7042           fi
7043         else
7044           # not using gcc
7045           if test "$host_cpu" = ia64; then
7046           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7047           # chokes on -Wl,-G. The following line is correct:
7048           shared_flag='-G'
7049           else
7050             if test "$aix_use_runtimelinking" = yes; then
7051               shared_flag='${wl}-G'
7052             else
7053               shared_flag='${wl}-bM:SRE'
7054             fi
7055           fi
7056         fi
7057
7058         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7059         # It seems that -bexpall does not export symbols beginning with
7060         # underscore (_), so it is better to generate a list of symbols to
7061         # export.
7062         _LT_TAGVAR(always_export_symbols, $1)=yes
7063         if test "$aix_use_runtimelinking" = yes; then
7064           # Warning - without using the other runtime loading flags (-brtl),
7065           # -berok will link without error, but may produce a broken library.
7066           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7067           # Determine the default libpath from the value encoded in an empty
7068           # executable.
7069           _LT_SYS_MODULE_PATH_AIX([$1])
7070           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7071
7072           _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"
7073         else
7074           if test "$host_cpu" = ia64; then
7075             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7076             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7077             _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"
7078           else
7079             # Determine the default libpath from the value encoded in an
7080             # empty executable.
7081             _LT_SYS_MODULE_PATH_AIX([$1])
7082             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7083             # Warning - without using the other run time loading flags,
7084             # -berok will link without error, but may produce a broken library.
7085             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7086             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7087             if test "$with_gnu_ld" = yes; then
7088               # We only use this code for GNU lds that support --whole-archive.
7089               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7090             else
7091               # Exported symbols can be pulled into shared objects from archives
7092               _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7093             fi
7094             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7095             # This is similar to how AIX traditionally builds its shared
7096             # libraries.
7097             _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'
7098           fi
7099         fi
7100         ;;
7101
7102       beos*)
7103         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7104           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7105           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7106           # support --undefined.  This deserves some investigation.  FIXME
7107           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7108         else
7109           _LT_TAGVAR(ld_shlibs, $1)=no
7110         fi
7111         ;;
7112
7113       chorus*)
7114         case $cc_basename in
7115           *)
7116           # FIXME: insert proper C++ library support
7117           _LT_TAGVAR(ld_shlibs, $1)=no
7118           ;;
7119         esac
7120         ;;
7121
7122       cygwin* | mingw* | pw32* | cegcc*)
7123         case $GXX,$cc_basename in
7124         ,cl* | no,cl*)
7125           # Native MSVC
7126           # hardcode_libdir_flag_spec is actually meaningless, as there is
7127           # no search path for DLLs.
7128           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7129           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7130           _LT_TAGVAR(always_export_symbols, $1)=yes
7131           _LT_TAGVAR(file_list_spec, $1)='@'
7132           # Tell ltmain to make .lib files, not .a files.
7133           libext=lib
7134           # Tell ltmain to make .dll files, not .so files.
7135           shrext_cmds=".dll"
7136           # FIXME: Setting linknames here is a bad hack.
7137           _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7138           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7139               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7140             else
7141               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7142             fi~
7143             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7144             linknames='
7145           # The linker will not automatically build a static lib if we build a DLL.
7146           # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7147           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7148           # Don't use ranlib
7149           _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7150           _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7151             lt_tool_outputfile="@TOOL_OUTPUT@"~
7152             case $lt_outputfile in
7153               *.exe|*.EXE) ;;
7154               *)
7155                 lt_outputfile="$lt_outputfile.exe"
7156                 lt_tool_outputfile="$lt_tool_outputfile.exe"
7157                 ;;
7158             esac~
7159             func_to_tool_file "$lt_outputfile"~
7160             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7161               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7162               $RM "$lt_outputfile.manifest";
7163             fi'
7164           ;;
7165         *)
7166           # g++
7167           # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7168           # as there is no search path for DLLs.
7169           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7170           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7171           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7172           _LT_TAGVAR(always_export_symbols, $1)=no
7173           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7174
7175           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7176             _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'
7177             # If the export-symbols file already is a .def file (1st line
7178             # is EXPORTS), use it as is; otherwise, prepend...
7179             _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7180               cp $export_symbols $output_objdir/$soname.def;
7181             else
7182               echo EXPORTS > $output_objdir/$soname.def;
7183               cat $export_symbols >> $output_objdir/$soname.def;
7184             fi~
7185             $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'
7186           else
7187             _LT_TAGVAR(ld_shlibs, $1)=no
7188           fi
7189           ;;
7190         esac
7191         ;;
7192       darwin* | rhapsody*)
7193         _LT_DARWIN_LINKER_FEATURES($1)
7194         ;;
7195
7196       dgux*)
7197         case $cc_basename in
7198           ec++*)
7199             # FIXME: insert proper C++ library support
7200             _LT_TAGVAR(ld_shlibs, $1)=no
7201             ;;
7202           ghcx*)
7203             # Green Hills C++ Compiler
7204             # FIXME: insert proper C++ library support
7205             _LT_TAGVAR(ld_shlibs, $1)=no
7206             ;;
7207           *)
7208             # FIXME: insert proper C++ library support
7209             _LT_TAGVAR(ld_shlibs, $1)=no
7210             ;;
7211         esac
7212         ;;
7213
7214       freebsd2.*)
7215         # C++ shared libraries reported to be fairly broken before
7216         # switch to ELF
7217         _LT_TAGVAR(ld_shlibs, $1)=no
7218         ;;
7219
7220       freebsd-elf*)
7221         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7222         ;;
7223
7224       freebsd* | dragonfly*)
7225         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7226         # conventions
7227         _LT_TAGVAR(ld_shlibs, $1)=yes
7228         ;;
7229
7230       haiku*)
7231         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7232         _LT_TAGVAR(link_all_deplibs, $1)=yes
7233         ;;
7234
7235       hpux9*)
7236         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7237         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7238         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7239         _LT_TAGVAR(hardcode_direct, $1)=yes
7240         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7241                                              # but as the default
7242                                              # location of the library.
7243
7244         case $cc_basename in
7245           CC*)
7246             # FIXME: insert proper C++ library support
7247             _LT_TAGVAR(ld_shlibs, $1)=no
7248             ;;
7249           aCC*)
7250             _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'
7251             # Commands to make compiler produce verbose output that lists
7252             # what "hidden" libraries, object files and flags are used when
7253             # linking a shared library.
7254             #
7255             # There doesn't appear to be a way to prevent this compiler from
7256             # explicitly linking system object files so we need to strip them
7257             # from the output so that they don't get included in the library
7258             # dependencies.
7259             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"'
7260             ;;
7261           *)
7262             if test "$GXX" = yes; then
7263               _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'
7264             else
7265               # FIXME: insert proper C++ library support
7266               _LT_TAGVAR(ld_shlibs, $1)=no
7267             fi
7268             ;;
7269         esac
7270         ;;
7271
7272       hpux10*|hpux11*)
7273         if test $with_gnu_ld = no; then
7274           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7275           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7276
7277           case $host_cpu in
7278             hppa*64*|ia64*)
7279               ;;
7280             *)
7281               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7282               ;;
7283           esac
7284         fi
7285         case $host_cpu in
7286           hppa*64*|ia64*)
7287             _LT_TAGVAR(hardcode_direct, $1)=no
7288             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7289             ;;
7290           *)
7291             _LT_TAGVAR(hardcode_direct, $1)=yes
7292             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7293             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7294                                                  # but as the default
7295                                                  # location of the library.
7296             ;;
7297         esac
7298
7299         case $cc_basename in
7300           CC*)
7301             # FIXME: insert proper C++ library support
7302             _LT_TAGVAR(ld_shlibs, $1)=no
7303             ;;
7304           aCC*)
7305             case $host_cpu in
7306               hppa*64*)
7307                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7308                 ;;
7309               ia64*)
7310                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7311                 ;;
7312               *)
7313                 _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'
7314                 ;;
7315             esac
7316             # Commands to make compiler produce verbose output that lists
7317             # what "hidden" libraries, object files and flags are used when
7318             # linking a shared library.
7319             #
7320             # There doesn't appear to be a way to prevent this compiler from
7321             # explicitly linking system object files so we need to strip them
7322             # from the output so that they don't get included in the library
7323             # dependencies.
7324             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"'
7325             ;;
7326           *)
7327             if test "$GXX" = yes; then
7328               if test $with_gnu_ld = no; then
7329                 case $host_cpu in
7330                   hppa*64*)
7331                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7332                     ;;
7333                   ia64*)
7334                     _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'
7335                     ;;
7336                   *)
7337                     _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'
7338                     ;;
7339                 esac
7340               fi
7341             else
7342               # FIXME: insert proper C++ library support
7343               _LT_TAGVAR(ld_shlibs, $1)=no
7344             fi
7345             ;;
7346         esac
7347         ;;
7348
7349       interix[[3-9]]*)
7350         _LT_TAGVAR(hardcode_direct, $1)=no
7351         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7352         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7353         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7354         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7355         # Instead, shared libraries are loaded at an image base (0x10000000 by
7356         # default) and relocated if they conflict, which is a slow very memory
7357         # consuming and fragmenting process.  To avoid this, we pick a random,
7358         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7359         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7360         _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'
7361         _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'
7362         ;;
7363       irix5* | irix6*)
7364         case $cc_basename in
7365           CC*)
7366             # SGI C++
7367             _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'
7368
7369             # Archives containing C++ object files must be created using
7370             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7371             # necessary to make sure instantiated templates are included
7372             # in the archive.
7373             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7374             ;;
7375           *)
7376             if test "$GXX" = yes; then
7377               if test "$with_gnu_ld" = no; then
7378                 _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'
7379               else
7380                 _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'
7381               fi
7382             fi
7383             _LT_TAGVAR(link_all_deplibs, $1)=yes
7384             ;;
7385         esac
7386         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7387         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7388         _LT_TAGVAR(inherit_rpath, $1)=yes
7389         ;;
7390
7391       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7392         case $cc_basename in
7393           KCC*)
7394             # Kuck and Associates, Inc. (KAI) C++ Compiler
7395
7396             # KCC will only create a shared library if the output file
7397             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7398             # to its proper name (with version) after linking.
7399             _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'
7400             _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'
7401             # Commands to make compiler produce verbose output that lists
7402             # what "hidden" libraries, object files and flags are used when
7403             # linking a shared library.
7404             #
7405             # There doesn't appear to be a way to prevent this compiler from
7406             # explicitly linking system object files so we need to strip them
7407             # from the output so that they don't get included in the library
7408             # dependencies.
7409             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"'
7410
7411             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7412             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7413
7414             # Archives containing C++ object files must be created using
7415             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7416             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7417             ;;
7418           icpc* | ecpc* )
7419             # Intel C++
7420             with_gnu_ld=yes
7421             # version 8.0 and above of icpc choke on multiply defined symbols
7422             # if we add $predep_objects and $postdep_objects, however 7.1 and
7423             # earlier do not add the objects themselves.
7424             case `$CC -V 2>&1` in
7425               *"Version 7."*)
7426                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7427                 _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'
7428                 ;;
7429               *)  # Version 8.0 or newer
7430                 tmp_idyn=
7431                 case $host_cpu in
7432                   ia64*) tmp_idyn=' -i_dynamic';;
7433                 esac
7434                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7435                 _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'
7436                 ;;
7437             esac
7438             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7439             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7440             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7441             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7442             ;;
7443           pgCC* | pgcpp*)
7444             # Portland Group C++ compiler
7445             case `$CC -V` in
7446             *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7447               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7448                 rm -rf $tpldir~
7449                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7450                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7451               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7452                 rm -rf $tpldir~
7453                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7454                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7455                 $RANLIB $oldlib'
7456               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7457                 rm -rf $tpldir~
7458                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7459                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7460               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7461                 rm -rf $tpldir~
7462                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7463                 $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'
7464               ;;
7465             *) # Version 6 and above use weak symbols
7466               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7467               _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'
7468               ;;
7469             esac
7470
7471             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7472             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7473             _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'
7474             ;;
7475           cxx*)
7476             # Compaq C++
7477             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7478             _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'
7479
7480             runpath_var=LD_RUN_PATH
7481             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7482             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7483
7484             # Commands to make compiler produce verbose output that lists
7485             # what "hidden" libraries, object files and flags are used when
7486             # linking a shared library.
7487             #
7488             # There doesn't appear to be a way to prevent this compiler from
7489             # explicitly linking system object files so we need to strip them
7490             # from the output so that they don't get included in the library
7491             # dependencies.
7492             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'
7493             ;;
7494           xl* | mpixl* | bgxl*)
7495             # IBM XL 8.0 on PPC, with GNU ld
7496             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7497             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7498             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7499             if test "x$supports_anon_versioning" = xyes; then
7500               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7501                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7502                 echo "local: *; };" >> $output_objdir/$libname.ver~
7503                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7504             fi
7505             ;;
7506           *)
7507             case `$CC -V 2>&1 | sed 5q` in
7508             *Sun\ C*)
7509               # Sun C++ 5.9
7510               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7511               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7512               _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'
7513               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7514               _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'
7515               _LT_TAGVAR(compiler_needs_object, $1)=yes
7516
7517               # Not sure whether something based on
7518               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7519               # would be better.
7520               output_verbose_link_cmd='func_echo_all'
7521
7522               # Archives containing C++ object files must be created using
7523               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7524               # necessary to make sure instantiated templates are included
7525               # in the archive.
7526               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7527               ;;
7528             esac
7529             ;;
7530         esac
7531         ;;
7532
7533       lynxos*)
7534         # FIXME: insert proper C++ library support
7535         _LT_TAGVAR(ld_shlibs, $1)=no
7536         ;;
7537
7538       m88k*)
7539         # FIXME: insert proper C++ library support
7540         _LT_TAGVAR(ld_shlibs, $1)=no
7541         ;;
7542
7543       mvs*)
7544         case $cc_basename in
7545           cxx*)
7546             # FIXME: insert proper C++ library support
7547             _LT_TAGVAR(ld_shlibs, $1)=no
7548             ;;
7549           *)
7550             # FIXME: insert proper C++ library support
7551             _LT_TAGVAR(ld_shlibs, $1)=no
7552             ;;
7553         esac
7554         ;;
7555
7556       netbsd*)
7557         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7558           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7559           wlarc=
7560           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7561           _LT_TAGVAR(hardcode_direct, $1)=yes
7562           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7563         fi
7564         # Workaround some broken pre-1.5 toolchains
7565         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7566         ;;
7567
7568       *nto* | *qnx*)
7569         _LT_TAGVAR(ld_shlibs, $1)=yes
7570         ;;
7571
7572       openbsd2*)
7573         # C++ shared libraries are fairly broken
7574         _LT_TAGVAR(ld_shlibs, $1)=no
7575         ;;
7576
7577       openbsd*)
7578         if test -f /usr/libexec/ld.so; then
7579           _LT_TAGVAR(hardcode_direct, $1)=yes
7580           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7581           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7582           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7583           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7584           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7585             _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'
7586             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7587             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7588           fi
7589           output_verbose_link_cmd=func_echo_all
7590         else
7591           _LT_TAGVAR(ld_shlibs, $1)=no
7592         fi
7593         ;;
7594
7595       osf3* | osf4* | osf5*)
7596         case $cc_basename in
7597           KCC*)
7598             # Kuck and Associates, Inc. (KAI) C++ Compiler
7599
7600             # KCC will only create a shared library if the output file
7601             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7602             # to its proper name (with version) after linking.
7603             _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'
7604
7605             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7606             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7607
7608             # Archives containing C++ object files must be created using
7609             # the KAI C++ compiler.
7610             case $host in
7611               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7612               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7613             esac
7614             ;;
7615           RCC*)
7616             # Rational C++ 2.4.1
7617             # FIXME: insert proper C++ library support
7618             _LT_TAGVAR(ld_shlibs, $1)=no
7619             ;;
7620           cxx*)
7621             case $host in
7622               osf3*)
7623                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7624                 _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'
7625                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7626                 ;;
7627               *)
7628                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7629                 _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'
7630                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7631                   echo "-hidden">> $lib.exp~
7632                   $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~
7633                   $RM $lib.exp'
7634                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7635                 ;;
7636             esac
7637
7638             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7639
7640             # Commands to make compiler produce verbose output that lists
7641             # what "hidden" libraries, object files and flags are used when
7642             # linking a shared library.
7643             #
7644             # There doesn't appear to be a way to prevent this compiler from
7645             # explicitly linking system object files so we need to strip them
7646             # from the output so that they don't get included in the library
7647             # dependencies.
7648             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"'
7649             ;;
7650           *)
7651             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7652               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7653               case $host in
7654                 osf3*)
7655                   _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'
7656                   ;;
7657                 *)
7658                   _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'
7659                   ;;
7660               esac
7661
7662               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7663               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
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
7670             else
7671               # FIXME: insert proper C++ library support
7672               _LT_TAGVAR(ld_shlibs, $1)=no
7673             fi
7674             ;;
7675         esac
7676         ;;
7677
7678       psos*)
7679         # FIXME: insert proper C++ library support
7680         _LT_TAGVAR(ld_shlibs, $1)=no
7681         ;;
7682
7683       sunos4*)
7684         case $cc_basename in
7685           CC*)
7686             # Sun C++ 4.x
7687             # FIXME: insert proper C++ library support
7688             _LT_TAGVAR(ld_shlibs, $1)=no
7689             ;;
7690           lcc*)
7691             # Lucid
7692             # FIXME: insert proper C++ library support
7693             _LT_TAGVAR(ld_shlibs, $1)=no
7694             ;;
7695           *)
7696             # FIXME: insert proper C++ library support
7697             _LT_TAGVAR(ld_shlibs, $1)=no
7698             ;;
7699         esac
7700         ;;
7701
7702       solaris*)
7703         case $cc_basename in
7704           CC* | sunCC*)
7705             # Sun C++ 4.2, 5.x and Centerline C++
7706             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7707             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7708             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7709             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7710               $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7711
7712             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7713             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7714             case $host_os in
7715               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7716               *)
7717                 # The compiler driver will combine and reorder linker options,
7718                 # but understands `-z linker_flag'.
7719                 # Supported since Solaris 2.6 (maybe 2.5.1?)
7720                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7721                 ;;
7722             esac
7723             _LT_TAGVAR(link_all_deplibs, $1)=yes
7724
7725             output_verbose_link_cmd='func_echo_all'
7726
7727             # Archives containing C++ object files must be created using
7728             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7729             # necessary to make sure instantiated templates are included
7730             # in the archive.
7731             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7732             ;;
7733           gcx*)
7734             # Green Hills C++ Compiler
7735             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7736
7737             # The C++ compiler must be used to create the archive.
7738             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7739             ;;
7740           *)
7741             # GNU C++ compiler with Solaris linker
7742             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7743               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7744               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7745                 _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'
7746                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7747                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7748
7749                 # Commands to make compiler produce verbose output that lists
7750                 # what "hidden" libraries, object files and flags are used when
7751                 # linking a shared library.
7752                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7753               else
7754                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7755                 # platform.
7756                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7757                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7758                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7759
7760                 # Commands to make compiler produce verbose output that lists
7761                 # what "hidden" libraries, object files and flags are used when
7762                 # linking a shared library.
7763                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7764               fi
7765
7766               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7767               case $host_os in
7768                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7769                 *)
7770                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7771                   ;;
7772               esac
7773             fi
7774             ;;
7775         esac
7776         ;;
7777
7778     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7779       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7780       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7781       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7782       runpath_var='LD_RUN_PATH'
7783
7784       case $cc_basename in
7785         CC*)
7786           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7787           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7788           ;;
7789         *)
7790           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7791           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7792           ;;
7793       esac
7794       ;;
7795
7796       sysv5* | sco3.2v5* | sco5v6*)
7797         # Note: We can NOT use -z defs as we might desire, because we do not
7798         # link with -lc, and that would cause any symbols used from libc to
7799         # always be unresolved, which means just about no library would
7800         # ever link correctly.  If we're not using GNU ld we use -z text
7801         # though, which does catch some bad symbols but isn't as heavy-handed
7802         # as -z defs.
7803         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7804         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7805         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7806         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7807         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7808         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7809         _LT_TAGVAR(link_all_deplibs, $1)=yes
7810         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7811         runpath_var='LD_RUN_PATH'
7812
7813         case $cc_basename in
7814           CC*)
7815             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7816             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7817             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7818               '"$_LT_TAGVAR(old_archive_cmds, $1)"
7819             _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7820               '"$_LT_TAGVAR(reload_cmds, $1)"
7821             ;;
7822           *)
7823             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7824             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7825             ;;
7826         esac
7827       ;;
7828
7829       tandem*)
7830         case $cc_basename in
7831           NCC*)
7832             # NonStop-UX NCC 3.20
7833             # FIXME: insert proper C++ library support
7834             _LT_TAGVAR(ld_shlibs, $1)=no
7835             ;;
7836           *)
7837             # FIXME: insert proper C++ library support
7838             _LT_TAGVAR(ld_shlibs, $1)=no
7839             ;;
7840         esac
7841         ;;
7842
7843       vxworks*)
7844         # FIXME: insert proper C++ library support
7845         _LT_TAGVAR(ld_shlibs, $1)=no
7846         ;;
7847
7848       *)
7849         # FIXME: insert proper C++ library support
7850         _LT_TAGVAR(ld_shlibs, $1)=no
7851         ;;
7852     esac
7853
7854     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7855     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7856
7857     _LT_TAGVAR(GCC, $1)="$GXX"
7858     _LT_TAGVAR(LD, $1)="$LD"
7859
7860     ## CAVEAT EMPTOR:
7861     ## There is no encapsulation within the following macros, do not change
7862     ## the running order or otherwise move them around unless you know exactly
7863     ## what you are doing...
7864     _LT_SYS_HIDDEN_LIBDEPS($1)
7865     _LT_COMPILER_PIC($1)
7866     _LT_COMPILER_C_O($1)
7867     _LT_COMPILER_FILE_LOCKS($1)
7868     _LT_LINKER_SHLIBS($1)
7869     _LT_SYS_DYNAMIC_LINKER($1)
7870     _LT_LINKER_HARDCODE_LIBPATH($1)
7871
7872     _LT_CONFIG($1)
7873   fi # test -n "$compiler"
7874
7875   CC=$lt_save_CC
7876   CFLAGS=$lt_save_CFLAGS
7877   LDCXX=$LD
7878   LD=$lt_save_LD
7879   GCC=$lt_save_GCC
7880   with_gnu_ld=$lt_save_with_gnu_ld
7881   lt_cv_path_LDCXX=$lt_cv_path_LD
7882   lt_cv_path_LD=$lt_save_path_LD
7883   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7884   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7885 fi # test "$_lt_caught_CXX_error" != yes
7886
7887 AC_LANG_POP
7888 ])# _LT_LANG_CXX_CONFIG
7889
7890
7891 # _LT_FUNC_STRIPNAME_CNF
7892 # ----------------------
7893 # func_stripname_cnf prefix suffix name
7894 # strip PREFIX and SUFFIX off of NAME.
7895 # PREFIX and SUFFIX must not contain globbing or regex special
7896 # characters, hashes, percent signs, but SUFFIX may contain a leading
7897 # dot (in which case that matches only a dot).
7898 #
7899 # This function is identical to the (non-XSI) version of func_stripname,
7900 # except this one can be used by m4 code that may be executed by configure,
7901 # rather than the libtool script.
7902 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7903 AC_REQUIRE([_LT_DECL_SED])
7904 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7905 func_stripname_cnf ()
7906 {
7907   case ${2} in
7908   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7909   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7910   esac
7911 } # func_stripname_cnf
7912 ])# _LT_FUNC_STRIPNAME_CNF
7913
7914 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7915 # ---------------------------------
7916 # Figure out "hidden" library dependencies from verbose
7917 # compiler output when linking a shared library.
7918 # Parse the compiler output and extract the necessary
7919 # objects, libraries and library flags.
7920 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7921 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7922 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7923 # Dependencies to place before and after the object being linked:
7924 _LT_TAGVAR(predep_objects, $1)=
7925 _LT_TAGVAR(postdep_objects, $1)=
7926 _LT_TAGVAR(predeps, $1)=
7927 _LT_TAGVAR(postdeps, $1)=
7928 _LT_TAGVAR(compiler_lib_search_path, $1)=
7929
7930 dnl we can't use the lt_simple_compile_test_code here,
7931 dnl because it contains code intended for an executable,
7932 dnl not a library.  It's possible we should let each
7933 dnl tag define a new lt_????_link_test_code variable,
7934 dnl but it's only used here...
7935 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7936 int a;
7937 void foo (void) { a = 0; }
7938 _LT_EOF
7939 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7940 class Foo
7941 {
7942 public:
7943   Foo (void) { a = 0; }
7944 private:
7945   int a;
7946 };
7947 _LT_EOF
7948 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7949       subroutine foo
7950       implicit none
7951       integer*4 a
7952       a=0
7953       return
7954       end
7955 _LT_EOF
7956 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7957       subroutine foo
7958       implicit none
7959       integer a
7960       a=0
7961       return
7962       end
7963 _LT_EOF
7964 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7965 public class foo {
7966   private int a;
7967   public void bar (void) {
7968     a = 0;
7969   }
7970 };
7971 _LT_EOF
7972 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7973 package foo
7974 func foo() {
7975 }
7976 _LT_EOF
7977 ])
7978
7979 _lt_libdeps_save_CFLAGS=$CFLAGS
7980 case "$CC $CFLAGS " in #(
7981 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7982 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7983 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7984 esac
7985
7986 dnl Parse the compiler output and extract the necessary
7987 dnl objects, libraries and library flags.
7988 if AC_TRY_EVAL(ac_compile); then
7989   # Parse the compiler output and extract the necessary
7990   # objects, libraries and library flags.
7991
7992   # Sentinel used to keep track of whether or not we are before
7993   # the conftest object file.
7994   pre_test_object_deps_done=no
7995
7996   for p in `eval "$output_verbose_link_cmd"`; do
7997     case ${prev}${p} in
7998
7999     -L* | -R* | -l*)
8000        # Some compilers place space between "-{L,R}" and the path.
8001        # Remove the space.
8002        if test $p = "-L" ||
8003           test $p = "-R"; then
8004          prev=$p
8005          continue
8006        fi
8007
8008        # Expand the sysroot to ease extracting the directories later.
8009        if test -z "$prev"; then
8010          case $p in
8011          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8012          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8013          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8014          esac
8015        fi
8016        case $p in
8017        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8018        esac
8019        if test "$pre_test_object_deps_done" = no; then
8020          case ${prev} in
8021          -L | -R)
8022            # Internal compiler library paths should come after those
8023            # provided the user.  The postdeps already come after the
8024            # user supplied libs so there is no need to process them.
8025            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8026              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8027            else
8028              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8029            fi
8030            ;;
8031          # The "-l" case would never come before the object being
8032          # linked, so don't bother handling this case.
8033          esac
8034        else
8035          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8036            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8037          else
8038            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8039          fi
8040        fi
8041        prev=
8042        ;;
8043
8044     *.lto.$objext) ;; # Ignore GCC LTO objects
8045     *.$objext)
8046        # This assumes that the test object file only shows up
8047        # once in the compiler output.
8048        if test "$p" = "conftest.$objext"; then
8049          pre_test_object_deps_done=yes
8050          continue
8051        fi
8052
8053        if test "$pre_test_object_deps_done" = no; then
8054          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8055            _LT_TAGVAR(predep_objects, $1)="$p"
8056          else
8057            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8058          fi
8059        else
8060          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8061            _LT_TAGVAR(postdep_objects, $1)="$p"
8062          else
8063            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8064          fi
8065        fi
8066        ;;
8067
8068     *) ;; # Ignore the rest.
8069
8070     esac
8071   done
8072
8073   # Clean up.
8074   rm -f a.out a.exe
8075 else
8076   echo "libtool.m4: error: problem compiling $1 test program"
8077 fi
8078
8079 $RM -f confest.$objext
8080 CFLAGS=$_lt_libdeps_save_CFLAGS
8081
8082 # PORTME: override above test on systems where it is broken
8083 m4_if([$1], [CXX],
8084 [case $host_os in
8085 interix[[3-9]]*)
8086   # Interix 3.5 installs completely hosed .la files for C++, so rather than
8087   # hack all around it, let's just trust "g++" to DTRT.
8088   _LT_TAGVAR(predep_objects,$1)=
8089   _LT_TAGVAR(postdep_objects,$1)=
8090   _LT_TAGVAR(postdeps,$1)=
8091   ;;
8092
8093 linux*)
8094   case `$CC -V 2>&1 | sed 5q` in
8095   *Sun\ C*)
8096     # Sun C++ 5.9
8097
8098     # The more standards-conforming stlport4 library is
8099     # incompatible with the Cstd library. Avoid specifying
8100     # it if it's in CXXFLAGS. Ignore libCrun as
8101     # -library=stlport4 depends on it.
8102     case " $CXX $CXXFLAGS " in
8103     *" -library=stlport4 "*)
8104       solaris_use_stlport4=yes
8105       ;;
8106     esac
8107
8108     if test "$solaris_use_stlport4" != yes; then
8109       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8110     fi
8111     ;;
8112   esac
8113   ;;
8114
8115 solaris*)
8116   case $cc_basename in
8117   CC* | sunCC*)
8118     # The more standards-conforming stlport4 library is
8119     # incompatible with the Cstd library. Avoid specifying
8120     # it if it's in CXXFLAGS. Ignore libCrun as
8121     # -library=stlport4 depends on it.
8122     case " $CXX $CXXFLAGS " in
8123     *" -library=stlport4 "*)
8124       solaris_use_stlport4=yes
8125       ;;
8126     esac
8127
8128     # Adding this requires a known-good setup of shared libraries for
8129     # Sun compiler versions before 5.6, else PIC objects from an old
8130     # archive will be linked into the output, leading to subtle bugs.
8131     if test "$solaris_use_stlport4" != yes; then
8132       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8133     fi
8134     ;;
8135   esac
8136   ;;
8137 esac
8138 ])
8139
8140 case " $_LT_TAGVAR(postdeps, $1) " in
8141 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8142 esac
8143  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8144 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8145  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8146 fi
8147 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8148     [The directories searched by this compiler when creating a shared library])
8149 _LT_TAGDECL([], [predep_objects], [1],
8150     [Dependencies to place before and after the objects being linked to
8151     create a shared library])
8152 _LT_TAGDECL([], [postdep_objects], [1])
8153 _LT_TAGDECL([], [predeps], [1])
8154 _LT_TAGDECL([], [postdeps], [1])
8155 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8156     [The library search path used internally by the compiler when linking
8157     a shared library])
8158 ])# _LT_SYS_HIDDEN_LIBDEPS
8159
8160
8161 # _LT_LANG_F77_CONFIG([TAG])
8162 # --------------------------
8163 # Ensure that the configuration variables for a Fortran 77 compiler are
8164 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8165 # to write the compiler configuration to `libtool'.
8166 m4_defun([_LT_LANG_F77_CONFIG],
8167 [AC_LANG_PUSH(Fortran 77)
8168 if test -z "$F77" || test "X$F77" = "Xno"; then
8169   _lt_disable_F77=yes
8170 fi
8171
8172 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8173 _LT_TAGVAR(allow_undefined_flag, $1)=
8174 _LT_TAGVAR(always_export_symbols, $1)=no
8175 _LT_TAGVAR(archive_expsym_cmds, $1)=
8176 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8177 _LT_TAGVAR(hardcode_direct, $1)=no
8178 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8179 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8180 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8181 _LT_TAGVAR(hardcode_minus_L, $1)=no
8182 _LT_TAGVAR(hardcode_automatic, $1)=no
8183 _LT_TAGVAR(inherit_rpath, $1)=no
8184 _LT_TAGVAR(module_cmds, $1)=
8185 _LT_TAGVAR(module_expsym_cmds, $1)=
8186 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8187 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8188 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8189 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8190 _LT_TAGVAR(no_undefined_flag, $1)=
8191 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8192 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8193
8194 # Source file extension for f77 test sources.
8195 ac_ext=f
8196
8197 # Object file extension for compiled f77 test sources.
8198 objext=o
8199 _LT_TAGVAR(objext, $1)=$objext
8200
8201 # No sense in running all these tests if we already determined that
8202 # the F77 compiler isn't working.  Some variables (like enable_shared)
8203 # are currently assumed to apply to all compilers on this platform,
8204 # and will be corrupted by setting them based on a non-working compiler.
8205 if test "$_lt_disable_F77" != yes; then
8206   # Code to be used in simple compile tests
8207   lt_simple_compile_test_code="\
8208       subroutine t
8209       return
8210       end
8211 "
8212
8213   # Code to be used in simple link tests
8214   lt_simple_link_test_code="\
8215       program t
8216       end
8217 "
8218
8219   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8220   _LT_TAG_COMPILER
8221
8222   # save warnings/boilerplate of simple test code
8223   _LT_COMPILER_BOILERPLATE
8224   _LT_LINKER_BOILERPLATE
8225
8226   # Allow CC to be a program name with arguments.
8227   lt_save_CC="$CC"
8228   lt_save_GCC=$GCC
8229   lt_save_CFLAGS=$CFLAGS
8230   CC=${F77-"f77"}
8231   CFLAGS=$FFLAGS
8232   compiler=$CC
8233   _LT_TAGVAR(compiler, $1)=$CC
8234   _LT_CC_BASENAME([$compiler])
8235   GCC=$G77
8236   if test -n "$compiler"; then
8237     AC_MSG_CHECKING([if libtool supports shared libraries])
8238     AC_MSG_RESULT([$can_build_shared])
8239
8240     AC_MSG_CHECKING([whether to build shared libraries])
8241     test "$can_build_shared" = "no" && enable_shared=no
8242
8243     # On AIX, shared libraries and static libraries use the same namespace, and
8244     # are all built from PIC.
8245     case $host_os in
8246       aix3*)
8247         test "$enable_shared" = yes && enable_static=no
8248         if test -n "$RANLIB"; then
8249           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8250           postinstall_cmds='$RANLIB $lib'
8251         fi
8252         ;;
8253       aix[[4-9]]*)
8254         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8255           test "$enable_shared" = yes && enable_static=no
8256         fi
8257         ;;
8258     esac
8259     AC_MSG_RESULT([$enable_shared])
8260
8261     AC_MSG_CHECKING([whether to build static libraries])
8262     # Make sure either enable_shared or enable_static is yes.
8263     test "$enable_shared" = yes || enable_static=yes
8264     AC_MSG_RESULT([$enable_static])
8265
8266     _LT_TAGVAR(GCC, $1)="$G77"
8267     _LT_TAGVAR(LD, $1)="$LD"
8268
8269     ## CAVEAT EMPTOR:
8270     ## There is no encapsulation within the following macros, do not change
8271     ## the running order or otherwise move them around unless you know exactly
8272     ## what you are doing...
8273     _LT_COMPILER_PIC($1)
8274     _LT_COMPILER_C_O($1)
8275     _LT_COMPILER_FILE_LOCKS($1)
8276     _LT_LINKER_SHLIBS($1)
8277     _LT_SYS_DYNAMIC_LINKER($1)
8278     _LT_LINKER_HARDCODE_LIBPATH($1)
8279
8280     _LT_CONFIG($1)
8281   fi # test -n "$compiler"
8282
8283   GCC=$lt_save_GCC
8284   CC="$lt_save_CC"
8285   CFLAGS="$lt_save_CFLAGS"
8286 fi # test "$_lt_disable_F77" != yes
8287
8288 AC_LANG_POP
8289 ])# _LT_LANG_F77_CONFIG
8290
8291
8292 # _LT_LANG_FC_CONFIG([TAG])
8293 # -------------------------
8294 # Ensure that the configuration variables for a Fortran compiler are
8295 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8296 # to write the compiler configuration to `libtool'.
8297 m4_defun([_LT_LANG_FC_CONFIG],
8298 [AC_LANG_PUSH(Fortran)
8299
8300 if test -z "$FC" || test "X$FC" = "Xno"; then
8301   _lt_disable_FC=yes
8302 fi
8303
8304 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8305 _LT_TAGVAR(allow_undefined_flag, $1)=
8306 _LT_TAGVAR(always_export_symbols, $1)=no
8307 _LT_TAGVAR(archive_expsym_cmds, $1)=
8308 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8309 _LT_TAGVAR(hardcode_direct, $1)=no
8310 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8311 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8312 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8313 _LT_TAGVAR(hardcode_minus_L, $1)=no
8314 _LT_TAGVAR(hardcode_automatic, $1)=no
8315 _LT_TAGVAR(inherit_rpath, $1)=no
8316 _LT_TAGVAR(module_cmds, $1)=
8317 _LT_TAGVAR(module_expsym_cmds, $1)=
8318 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8319 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8320 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8321 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8322 _LT_TAGVAR(no_undefined_flag, $1)=
8323 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8324 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8325
8326 # Source file extension for fc test sources.
8327 ac_ext=${ac_fc_srcext-f}
8328
8329 # Object file extension for compiled fc test sources.
8330 objext=o
8331 _LT_TAGVAR(objext, $1)=$objext
8332
8333 # No sense in running all these tests if we already determined that
8334 # the FC compiler isn't working.  Some variables (like enable_shared)
8335 # are currently assumed to apply to all compilers on this platform,
8336 # and will be corrupted by setting them based on a non-working compiler.
8337 if test "$_lt_disable_FC" != yes; then
8338   # Code to be used in simple compile tests
8339   lt_simple_compile_test_code="\
8340       subroutine t
8341       return
8342       end
8343 "
8344
8345   # Code to be used in simple link tests
8346   lt_simple_link_test_code="\
8347       program t
8348       end
8349 "
8350
8351   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8352   _LT_TAG_COMPILER
8353
8354   # save warnings/boilerplate of simple test code
8355   _LT_COMPILER_BOILERPLATE
8356   _LT_LINKER_BOILERPLATE
8357
8358   # Allow CC to be a program name with arguments.
8359   lt_save_CC="$CC"
8360   lt_save_GCC=$GCC
8361   lt_save_CFLAGS=$CFLAGS
8362   CC=${FC-"f95"}
8363   CFLAGS=$FCFLAGS
8364   compiler=$CC
8365   GCC=$ac_cv_fc_compiler_gnu
8366
8367   _LT_TAGVAR(compiler, $1)=$CC
8368   _LT_CC_BASENAME([$compiler])
8369
8370   if test -n "$compiler"; then
8371     AC_MSG_CHECKING([if libtool supports shared libraries])
8372     AC_MSG_RESULT([$can_build_shared])
8373
8374     AC_MSG_CHECKING([whether to build shared libraries])
8375     test "$can_build_shared" = "no" && enable_shared=no
8376
8377     # On AIX, shared libraries and static libraries use the same namespace, and
8378     # are all built from PIC.
8379     case $host_os in
8380       aix3*)
8381         test "$enable_shared" = yes && enable_static=no
8382         if test -n "$RANLIB"; then
8383           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8384           postinstall_cmds='$RANLIB $lib'
8385         fi
8386         ;;
8387       aix[[4-9]]*)
8388         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8389           test "$enable_shared" = yes && enable_static=no
8390         fi
8391         ;;
8392     esac
8393     AC_MSG_RESULT([$enable_shared])
8394
8395     AC_MSG_CHECKING([whether to build static libraries])
8396     # Make sure either enable_shared or enable_static is yes.
8397     test "$enable_shared" = yes || enable_static=yes
8398     AC_MSG_RESULT([$enable_static])
8399
8400     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8401     _LT_TAGVAR(LD, $1)="$LD"
8402
8403     ## CAVEAT EMPTOR:
8404     ## There is no encapsulation within the following macros, do not change
8405     ## the running order or otherwise move them around unless you know exactly
8406     ## what you are doing...
8407     _LT_SYS_HIDDEN_LIBDEPS($1)
8408     _LT_COMPILER_PIC($1)
8409     _LT_COMPILER_C_O($1)
8410     _LT_COMPILER_FILE_LOCKS($1)
8411     _LT_LINKER_SHLIBS($1)
8412     _LT_SYS_DYNAMIC_LINKER($1)
8413     _LT_LINKER_HARDCODE_LIBPATH($1)
8414
8415     _LT_CONFIG($1)
8416   fi # test -n "$compiler"
8417
8418   GCC=$lt_save_GCC
8419   CC=$lt_save_CC
8420   CFLAGS=$lt_save_CFLAGS
8421 fi # test "$_lt_disable_FC" != yes
8422
8423 AC_LANG_POP
8424 ])# _LT_LANG_FC_CONFIG
8425
8426
8427 # _LT_LANG_GCJ_CONFIG([TAG])
8428 # --------------------------
8429 # Ensure that the configuration variables for the GNU Java Compiler compiler
8430 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8431 # to write the compiler configuration to `libtool'.
8432 m4_defun([_LT_LANG_GCJ_CONFIG],
8433 [AC_REQUIRE([LT_PROG_GCJ])dnl
8434 AC_LANG_SAVE
8435
8436 # Source file extension for Java test sources.
8437 ac_ext=java
8438
8439 # Object file extension for compiled Java test sources.
8440 objext=o
8441 _LT_TAGVAR(objext, $1)=$objext
8442
8443 # Code to be used in simple compile tests
8444 lt_simple_compile_test_code="class foo {}"
8445
8446 # Code to be used in simple link tests
8447 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8448
8449 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8450 _LT_TAG_COMPILER
8451
8452 # save warnings/boilerplate of simple test code
8453 _LT_COMPILER_BOILERPLATE
8454 _LT_LINKER_BOILERPLATE
8455
8456 # Allow CC to be a program name with arguments.
8457 lt_save_CC=$CC
8458 lt_save_CFLAGS=$CFLAGS
8459 lt_save_GCC=$GCC
8460 GCC=yes
8461 CC=${GCJ-"gcj"}
8462 CFLAGS=$GCJFLAGS
8463 compiler=$CC
8464 _LT_TAGVAR(compiler, $1)=$CC
8465 _LT_TAGVAR(LD, $1)="$LD"
8466 _LT_CC_BASENAME([$compiler])
8467
8468 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8469 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8470
8471 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8472 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8473 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8474
8475 if test -n "$compiler"; then
8476   _LT_COMPILER_NO_RTTI($1)
8477   _LT_COMPILER_PIC($1)
8478   _LT_COMPILER_C_O($1)
8479   _LT_COMPILER_FILE_LOCKS($1)
8480   _LT_LINKER_SHLIBS($1)
8481   _LT_LINKER_HARDCODE_LIBPATH($1)
8482
8483   _LT_CONFIG($1)
8484 fi
8485
8486 AC_LANG_RESTORE
8487
8488 GCC=$lt_save_GCC
8489 CC=$lt_save_CC
8490 CFLAGS=$lt_save_CFLAGS
8491 ])# _LT_LANG_GCJ_CONFIG
8492
8493
8494 # _LT_LANG_GO_CONFIG([TAG])
8495 # --------------------------
8496 # Ensure that the configuration variables for the GNU Go compiler
8497 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8498 # to write the compiler configuration to `libtool'.
8499 m4_defun([_LT_LANG_GO_CONFIG],
8500 [AC_REQUIRE([LT_PROG_GO])dnl
8501 AC_LANG_SAVE
8502
8503 # Source file extension for Go test sources.
8504 ac_ext=go
8505
8506 # Object file extension for compiled Go test sources.
8507 objext=o
8508 _LT_TAGVAR(objext, $1)=$objext
8509
8510 # Code to be used in simple compile tests
8511 lt_simple_compile_test_code="package main; func main() { }"
8512
8513 # Code to be used in simple link tests
8514 lt_simple_link_test_code='package main; func main() { }'
8515
8516 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8517 _LT_TAG_COMPILER
8518
8519 # save warnings/boilerplate of simple test code
8520 _LT_COMPILER_BOILERPLATE
8521 _LT_LINKER_BOILERPLATE
8522
8523 # Allow CC to be a program name with arguments.
8524 lt_save_CC=$CC
8525 lt_save_CFLAGS=$CFLAGS
8526 lt_save_GCC=$GCC
8527 GCC=yes
8528 CC=${GOC-"gccgo"}
8529 CFLAGS=$GOFLAGS
8530 compiler=$CC
8531 _LT_TAGVAR(compiler, $1)=$CC
8532 _LT_TAGVAR(LD, $1)="$LD"
8533 _LT_CC_BASENAME([$compiler])
8534
8535 # Go did not exist at the time GCC didn't implicitly link libc in.
8536 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8537
8538 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8539 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8540 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8541
8542 if test -n "$compiler"; then
8543   _LT_COMPILER_NO_RTTI($1)
8544   _LT_COMPILER_PIC($1)
8545   _LT_COMPILER_C_O($1)
8546   _LT_COMPILER_FILE_LOCKS($1)
8547   _LT_LINKER_SHLIBS($1)
8548   _LT_LINKER_HARDCODE_LIBPATH($1)
8549
8550   _LT_CONFIG($1)
8551 fi
8552
8553 AC_LANG_RESTORE
8554
8555 GCC=$lt_save_GCC
8556 CC=$lt_save_CC
8557 CFLAGS=$lt_save_CFLAGS
8558 ])# _LT_LANG_GO_CONFIG
8559
8560
8561 # _LT_LANG_RC_CONFIG([TAG])
8562 # -------------------------
8563 # Ensure that the configuration variables for the Windows resource compiler
8564 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8565 # to write the compiler configuration to `libtool'.
8566 m4_defun([_LT_LANG_RC_CONFIG],
8567 [AC_REQUIRE([LT_PROG_RC])dnl
8568 AC_LANG_SAVE
8569
8570 # Source file extension for RC test sources.
8571 ac_ext=rc
8572
8573 # Object file extension for compiled RC test sources.
8574 objext=o
8575 _LT_TAGVAR(objext, $1)=$objext
8576
8577 # Code to be used in simple compile tests
8578 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8579
8580 # Code to be used in simple link tests
8581 lt_simple_link_test_code="$lt_simple_compile_test_code"
8582
8583 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8584 _LT_TAG_COMPILER
8585
8586 # save warnings/boilerplate of simple test code
8587 _LT_COMPILER_BOILERPLATE
8588 _LT_LINKER_BOILERPLATE
8589
8590 # Allow CC to be a program name with arguments.
8591 lt_save_CC="$CC"
8592 lt_save_CFLAGS=$CFLAGS
8593 lt_save_GCC=$GCC
8594 GCC=
8595 CC=${RC-"windres"}
8596 CFLAGS=
8597 compiler=$CC
8598 _LT_TAGVAR(compiler, $1)=$CC
8599 _LT_CC_BASENAME([$compiler])
8600 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8601
8602 if test -n "$compiler"; then
8603   :
8604   _LT_CONFIG($1)
8605 fi
8606
8607 GCC=$lt_save_GCC
8608 AC_LANG_RESTORE
8609 CC=$lt_save_CC
8610 CFLAGS=$lt_save_CFLAGS
8611 ])# _LT_LANG_RC_CONFIG
8612
8613
8614 # LT_PROG_GCJ
8615 # -----------
8616 AC_DEFUN([LT_PROG_GCJ],
8617 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8618   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8619     [AC_CHECK_TOOL(GCJ, gcj,)
8620       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8621       AC_SUBST(GCJFLAGS)])])[]dnl
8622 ])
8623
8624 # Old name:
8625 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8626 dnl aclocal-1.4 backwards compatibility:
8627 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8628
8629
8630 # LT_PROG_GO
8631 # ----------
8632 AC_DEFUN([LT_PROG_GO],
8633 [AC_CHECK_TOOL(GOC, gccgo,)
8634 ])
8635
8636
8637 # LT_PROG_RC
8638 # ----------
8639 AC_DEFUN([LT_PROG_RC],
8640 [AC_CHECK_TOOL(RC, windres,)
8641 ])
8642
8643 # Old name:
8644 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8645 dnl aclocal-1.4 backwards compatibility:
8646 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8647
8648
8649 # _LT_DECL_EGREP
8650 # --------------
8651 # If we don't have a new enough Autoconf to choose the best grep
8652 # available, choose the one first in the user's PATH.
8653 m4_defun([_LT_DECL_EGREP],
8654 [AC_REQUIRE([AC_PROG_EGREP])dnl
8655 AC_REQUIRE([AC_PROG_FGREP])dnl
8656 test -z "$GREP" && GREP=grep
8657 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8658 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8659 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8660 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8661 AC_SUBST([GREP])
8662 ])
8663
8664
8665 # _LT_DECL_OBJDUMP
8666 # --------------
8667 # If we don't have a new enough Autoconf to choose the best objdump
8668 # available, choose the one first in the user's PATH.
8669 m4_defun([_LT_DECL_OBJDUMP],
8670 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8671 test -z "$OBJDUMP" && OBJDUMP=objdump
8672 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8673 AC_SUBST([OBJDUMP])
8674 ])
8675
8676 # _LT_DECL_DLLTOOL
8677 # ----------------
8678 # Ensure DLLTOOL variable is set.
8679 m4_defun([_LT_DECL_DLLTOOL],
8680 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8681 test -z "$DLLTOOL" && DLLTOOL=dlltool
8682 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8683 AC_SUBST([DLLTOOL])
8684 ])
8685
8686 # _LT_DECL_SED
8687 # ------------
8688 # Check for a fully-functional sed program, that truncates
8689 # as few characters as possible.  Prefer GNU sed if found.
8690 m4_defun([_LT_DECL_SED],
8691 [AC_PROG_SED
8692 test -z "$SED" && SED=sed
8693 Xsed="$SED -e 1s/^X//"
8694 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8695 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8696     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8697 ])# _LT_DECL_SED
8698
8699 m4_ifndef([AC_PROG_SED], [
8700 # NOTE: This macro has been submitted for inclusion into   #
8701 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8702 #  a released version of Autoconf we should remove this    #
8703 #  macro and use it instead.                               #
8704
8705 m4_defun([AC_PROG_SED],
8706 [AC_MSG_CHECKING([for a sed that does not truncate output])
8707 AC_CACHE_VAL(lt_cv_path_SED,
8708 [# Loop through the user's path and test for sed and gsed.
8709 # Then use that list of sed's as ones to test for truncation.
8710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8711 for as_dir in $PATH
8712 do
8713   IFS=$as_save_IFS
8714   test -z "$as_dir" && as_dir=.
8715   for lt_ac_prog in sed gsed; do
8716     for ac_exec_ext in '' $ac_executable_extensions; do
8717       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8718         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8719       fi
8720     done
8721   done
8722 done
8723 IFS=$as_save_IFS
8724 lt_ac_max=0
8725 lt_ac_count=0
8726 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8727 # along with /bin/sed that truncates output.
8728 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8729   test ! -f $lt_ac_sed && continue
8730   cat /dev/null > conftest.in
8731   lt_ac_count=0
8732   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8733   # Check for GNU sed and select it if it is found.
8734   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8735     lt_cv_path_SED=$lt_ac_sed
8736     break
8737   fi
8738   while true; do
8739     cat conftest.in conftest.in >conftest.tmp
8740     mv conftest.tmp conftest.in
8741     cp conftest.in conftest.nl
8742     echo >>conftest.nl
8743     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8744     cmp -s conftest.out conftest.nl || break
8745     # 10000 chars as input seems more than enough
8746     test $lt_ac_count -gt 10 && break
8747     lt_ac_count=`expr $lt_ac_count + 1`
8748     if test $lt_ac_count -gt $lt_ac_max; then
8749       lt_ac_max=$lt_ac_count
8750       lt_cv_path_SED=$lt_ac_sed
8751     fi
8752   done
8753 done
8754 ])
8755 SED=$lt_cv_path_SED
8756 AC_SUBST([SED])
8757 AC_MSG_RESULT([$SED])
8758 ])#AC_PROG_SED
8759 ])#m4_ifndef
8760
8761 # Old name:
8762 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8763 dnl aclocal-1.4 backwards compatibility:
8764 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8765
8766
8767 # _LT_CHECK_SHELL_FEATURES
8768 # ------------------------
8769 # Find out whether the shell is Bourne or XSI compatible,
8770 # or has some other useful features.
8771 m4_defun([_LT_CHECK_SHELL_FEATURES],
8772 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8773 # Try some XSI features
8774 xsi_shell=no
8775 ( _lt_dummy="a/b/c"
8776   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8777       = c,a/b,b/c, \
8778     && eval 'test $(( 1 + 1 )) -eq 2 \
8779     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8780   && xsi_shell=yes
8781 AC_MSG_RESULT([$xsi_shell])
8782 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8783
8784 AC_MSG_CHECKING([whether the shell understands "+="])
8785 lt_shell_append=no
8786 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8787     >/dev/null 2>&1 \
8788   && lt_shell_append=yes
8789 AC_MSG_RESULT([$lt_shell_append])
8790 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8791
8792 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8793   lt_unset=unset
8794 else
8795   lt_unset=false
8796 fi
8797 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8798
8799 # test EBCDIC or ASCII
8800 case `echo X|tr X '\101'` in
8801  A) # ASCII based system
8802     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8803   lt_SP2NL='tr \040 \012'
8804   lt_NL2SP='tr \015\012 \040\040'
8805   ;;
8806  *) # EBCDIC based system
8807   lt_SP2NL='tr \100 \n'
8808   lt_NL2SP='tr \r\n \100\100'
8809   ;;
8810 esac
8811 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8812 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8813 ])# _LT_CHECK_SHELL_FEATURES
8814
8815
8816 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8817 # ------------------------------------------------------
8818 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8819 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8820 m4_defun([_LT_PROG_FUNCTION_REPLACE],
8821 [dnl {
8822 sed -e '/^$1 ()$/,/^} # $1 /c\
8823 $1 ()\
8824 {\
8825 m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
8826 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8827   && mv -f "$cfgfile.tmp" "$cfgfile" \
8828     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8829 test 0 -eq $? || _lt_function_replace_fail=:
8830 ])
8831
8832
8833 # _LT_PROG_REPLACE_SHELLFNS
8834 # -------------------------
8835 # Replace existing portable implementations of several shell functions with
8836 # equivalent extended shell implementations where those features are available..
8837 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8838 [if test x"$xsi_shell" = xyes; then
8839   _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8840     case ${1} in
8841       */*) func_dirname_result="${1%/*}${2}" ;;
8842       *  ) func_dirname_result="${3}" ;;
8843     esac])
8844
8845   _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8846     func_basename_result="${1##*/}"])
8847
8848   _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8849     case ${1} in
8850       */*) func_dirname_result="${1%/*}${2}" ;;
8851       *  ) func_dirname_result="${3}" ;;
8852     esac
8853     func_basename_result="${1##*/}"])
8854
8855   _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8856     # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8857     # positional parameters, so assign one to ordinary parameter first.
8858     func_stripname_result=${3}
8859     func_stripname_result=${func_stripname_result#"${1}"}
8860     func_stripname_result=${func_stripname_result%"${2}"}])
8861
8862   _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8863     func_split_long_opt_name=${1%%=*}
8864     func_split_long_opt_arg=${1#*=}])
8865
8866   _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8867     func_split_short_opt_arg=${1#??}
8868     func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8869
8870   _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8871     case ${1} in
8872       *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8873       *)    func_lo2o_result=${1} ;;
8874     esac])
8875
8876   _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
8877
8878   _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
8879
8880   _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
8881 fi
8882
8883 if test x"$lt_shell_append" = xyes; then
8884   _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
8885
8886   _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8887     func_quote_for_eval "${2}"
8888 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8889     eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8890
8891   # Save a `func_append' function call where possible by direct use of '+='
8892   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8893     && mv -f "$cfgfile.tmp" "$cfgfile" \
8894       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8895   test 0 -eq $? || _lt_function_replace_fail=:
8896 else
8897   # Save a `func_append' function call even when '+=' is not available
8898   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8899     && mv -f "$cfgfile.tmp" "$cfgfile" \
8900       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8901   test 0 -eq $? || _lt_function_replace_fail=:
8902 fi
8903
8904 if test x"$_lt_function_replace_fail" = x":"; then
8905   AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8906 fi
8907 ])
8908
8909 # _LT_PATH_CONVERSION_FUNCTIONS
8910 # -----------------------------
8911 # Determine which file name conversion functions should be used by
8912 # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8913 # for certain cross-compile configurations and native mingw.
8914 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8915 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8916 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8917 AC_MSG_CHECKING([how to convert $build file names to $host format])
8918 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8919 [case $host in
8920   *-*-mingw* )
8921     case $build in
8922       *-*-mingw* ) # actually msys
8923         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8924         ;;
8925       *-*-cygwin* )
8926         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8927         ;;
8928       * ) # otherwise, assume *nix
8929         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8930         ;;
8931     esac
8932     ;;
8933   *-*-cygwin* )
8934     case $build in
8935       *-*-mingw* ) # actually msys
8936         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8937         ;;
8938       *-*-cygwin* )
8939         lt_cv_to_host_file_cmd=func_convert_file_noop
8940         ;;
8941       * ) # otherwise, assume *nix
8942         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8943         ;;
8944     esac
8945     ;;
8946   * ) # unhandled hosts (and "normal" native builds)
8947     lt_cv_to_host_file_cmd=func_convert_file_noop
8948     ;;
8949 esac
8950 ])
8951 to_host_file_cmd=$lt_cv_to_host_file_cmd
8952 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8953 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8954          [0], [convert $build file names to $host format])dnl
8955
8956 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8957 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8958 [#assume ordinary cross tools, or native build.
8959 lt_cv_to_tool_file_cmd=func_convert_file_noop
8960 case $host in
8961   *-*-mingw* )
8962     case $build in
8963       *-*-mingw* ) # actually msys
8964         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8965         ;;
8966     esac
8967     ;;
8968 esac
8969 ])
8970 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8971 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8972 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8973          [0], [convert $build files to toolchain format])dnl
8974 ])# _LT_PATH_CONVERSION_FUNCTIONS
8975
8976 # Helper functions for option handling.                    -*- Autoconf -*-
8977 #
8978 #   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8979 #   Inc.
8980 #   Written by Gary V. Vaughan, 2004
8981 #
8982 # This file is free software; the Free Software Foundation gives
8983 # unlimited permission to copy and/or distribute it, with or without
8984 # modifications, as long as this notice is preserved.
8985
8986 # serial 7 ltoptions.m4
8987
8988 # This is to help aclocal find these macros, as it can't see m4_define.
8989 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8990
8991
8992 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8993 # ------------------------------------------
8994 m4_define([_LT_MANGLE_OPTION],
8995 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8996
8997
8998 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8999 # ---------------------------------------
9000 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9001 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9002 # saved as a flag.
9003 m4_define([_LT_SET_OPTION],
9004 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9005 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9006         _LT_MANGLE_DEFUN([$1], [$2]),
9007     [m4_warning([Unknown $1 option `$2'])])[]dnl
9008 ])
9009
9010
9011 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9012 # ------------------------------------------------------------
9013 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9014 m4_define([_LT_IF_OPTION],
9015 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9016
9017
9018 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9019 # -------------------------------------------------------
9020 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9021 # are set.
9022 m4_define([_LT_UNLESS_OPTIONS],
9023 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9024             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9025                       [m4_define([$0_found])])])[]dnl
9026 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9027 ])[]dnl
9028 ])
9029
9030
9031 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9032 # ----------------------------------------
9033 # OPTION-LIST is a space-separated list of Libtool options associated
9034 # with MACRO-NAME.  If any OPTION has a matching handler declared with
9035 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9036 # the unknown option and exit.
9037 m4_defun([_LT_SET_OPTIONS],
9038 [# Set options
9039 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9040     [_LT_SET_OPTION([$1], _LT_Option)])
9041
9042 m4_if([$1],[LT_INIT],[
9043   dnl
9044   dnl Simply set some default values (i.e off) if boolean options were not
9045   dnl specified:
9046   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9047   ])
9048   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9049   ])
9050   dnl
9051   dnl If no reference was made to various pairs of opposing options, then
9052   dnl we run the default mode handler for the pair.  For example, if neither
9053   dnl `shared' nor `disable-shared' was passed, we enable building of shared
9054   dnl archives by default:
9055   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9056   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9057   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9058   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9059                    [_LT_ENABLE_FAST_INSTALL])
9060   ])
9061 ])# _LT_SET_OPTIONS
9062
9063
9064
9065 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9066 # -----------------------------------------
9067 m4_define([_LT_MANGLE_DEFUN],
9068 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9069
9070
9071 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9072 # -----------------------------------------------
9073 m4_define([LT_OPTION_DEFINE],
9074 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9075 ])# LT_OPTION_DEFINE
9076
9077
9078 # dlopen
9079 # ------
9080 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9081 ])
9082
9083 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9084 [_LT_SET_OPTION([LT_INIT], [dlopen])
9085 AC_DIAGNOSE([obsolete],
9086 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9087 put the `dlopen' option into LT_INIT's first parameter.])
9088 ])
9089
9090 dnl aclocal-1.4 backwards compatibility:
9091 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9092
9093
9094 # win32-dll
9095 # ---------
9096 # Declare package support for building win32 dll's.
9097 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9098 [enable_win32_dll=yes
9099
9100 case $host in
9101 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9102   AC_CHECK_TOOL(AS, as, false)
9103   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9104   AC_CHECK_TOOL(OBJDUMP, objdump, false)
9105   ;;
9106 esac
9107
9108 test -z "$AS" && AS=as
9109 _LT_DECL([], [AS],      [1], [Assembler program])dnl
9110
9111 test -z "$DLLTOOL" && DLLTOOL=dlltool
9112 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9113
9114 test -z "$OBJDUMP" && OBJDUMP=objdump
9115 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9116 ])# win32-dll
9117
9118 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9119 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9120 _LT_SET_OPTION([LT_INIT], [win32-dll])
9121 AC_DIAGNOSE([obsolete],
9122 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9123 put the `win32-dll' option into LT_INIT's first parameter.])
9124 ])
9125
9126 dnl aclocal-1.4 backwards compatibility:
9127 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9128
9129
9130 # _LT_ENABLE_SHARED([DEFAULT])
9131 # ----------------------------
9132 # implement the --enable-shared flag, and supports the `shared' and
9133 # `disable-shared' LT_INIT options.
9134 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9135 m4_define([_LT_ENABLE_SHARED],
9136 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9137 AC_ARG_ENABLE([shared],
9138     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9139         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9140     [p=${PACKAGE-default}
9141     case $enableval in
9142     yes) enable_shared=yes ;;
9143     no) enable_shared=no ;;
9144     *)
9145       enable_shared=no
9146       # Look at the argument we got.  We use all the common list separators.
9147       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9148       for pkg in $enableval; do
9149         IFS="$lt_save_ifs"
9150         if test "X$pkg" = "X$p"; then
9151           enable_shared=yes
9152         fi
9153       done
9154       IFS="$lt_save_ifs"
9155       ;;
9156     esac],
9157     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9158
9159     _LT_DECL([build_libtool_libs], [enable_shared], [0],
9160         [Whether or not to build shared libraries])
9161 ])# _LT_ENABLE_SHARED
9162
9163 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9164 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9165
9166 # Old names:
9167 AC_DEFUN([AC_ENABLE_SHARED],
9168 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9169 ])
9170
9171 AC_DEFUN([AC_DISABLE_SHARED],
9172 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9173 ])
9174
9175 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9176 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9177
9178 dnl aclocal-1.4 backwards compatibility:
9179 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9180 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9181
9182
9183
9184 # _LT_ENABLE_STATIC([DEFAULT])
9185 # ----------------------------
9186 # implement the --enable-static flag, and support the `static' and
9187 # `disable-static' LT_INIT options.
9188 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9189 m4_define([_LT_ENABLE_STATIC],
9190 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9191 AC_ARG_ENABLE([static],
9192     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9193         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9194     [p=${PACKAGE-default}
9195     case $enableval in
9196     yes) enable_static=yes ;;
9197     no) enable_static=no ;;
9198     *)
9199      enable_static=no
9200       # Look at the argument we got.  We use all the common list separators.
9201       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9202       for pkg in $enableval; do
9203         IFS="$lt_save_ifs"
9204         if test "X$pkg" = "X$p"; then
9205           enable_static=yes
9206         fi
9207       done
9208       IFS="$lt_save_ifs"
9209       ;;
9210     esac],
9211     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9212
9213     _LT_DECL([build_old_libs], [enable_static], [0],
9214         [Whether or not to build static libraries])
9215 ])# _LT_ENABLE_STATIC
9216
9217 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9218 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9219
9220 # Old names:
9221 AC_DEFUN([AC_ENABLE_STATIC],
9222 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9223 ])
9224
9225 AC_DEFUN([AC_DISABLE_STATIC],
9226 [_LT_SET_OPTION([LT_INIT], [disable-static])
9227 ])
9228
9229 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9230 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9231
9232 dnl aclocal-1.4 backwards compatibility:
9233 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9234 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9235
9236
9237
9238 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9239 # ----------------------------------
9240 # implement the --enable-fast-install flag, and support the `fast-install'
9241 # and `disable-fast-install' LT_INIT options.
9242 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9243 m4_define([_LT_ENABLE_FAST_INSTALL],
9244 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9245 AC_ARG_ENABLE([fast-install],
9246     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9247     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9248     [p=${PACKAGE-default}
9249     case $enableval in
9250     yes) enable_fast_install=yes ;;
9251     no) enable_fast_install=no ;;
9252     *)
9253       enable_fast_install=no
9254       # Look at the argument we got.  We use all the common list separators.
9255       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9256       for pkg in $enableval; do
9257         IFS="$lt_save_ifs"
9258         if test "X$pkg" = "X$p"; then
9259           enable_fast_install=yes
9260         fi
9261       done
9262       IFS="$lt_save_ifs"
9263       ;;
9264     esac],
9265     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9266
9267 _LT_DECL([fast_install], [enable_fast_install], [0],
9268          [Whether or not to optimize for fast installation])dnl
9269 ])# _LT_ENABLE_FAST_INSTALL
9270
9271 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9272 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9273
9274 # Old names:
9275 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9276 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9277 AC_DIAGNOSE([obsolete],
9278 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9279 the `fast-install' option into LT_INIT's first parameter.])
9280 ])
9281
9282 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9283 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9284 AC_DIAGNOSE([obsolete],
9285 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9286 the `disable-fast-install' option into LT_INIT's first parameter.])
9287 ])
9288
9289 dnl aclocal-1.4 backwards compatibility:
9290 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9291 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9292
9293
9294 # _LT_WITH_PIC([MODE])
9295 # --------------------
9296 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9297 # LT_INIT options.
9298 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9299 m4_define([_LT_WITH_PIC],
9300 [AC_ARG_WITH([pic],
9301     [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9302         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9303     [lt_p=${PACKAGE-default}
9304     case $withval in
9305     yes|no) pic_mode=$withval ;;
9306     *)
9307       pic_mode=default
9308       # Look at the argument we got.  We use all the common list separators.
9309       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9310       for lt_pkg in $withval; do
9311         IFS="$lt_save_ifs"
9312         if test "X$lt_pkg" = "X$lt_p"; then
9313           pic_mode=yes
9314         fi
9315       done
9316       IFS="$lt_save_ifs"
9317       ;;
9318     esac],
9319     [pic_mode=default])
9320
9321 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9322
9323 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9324 ])# _LT_WITH_PIC
9325
9326 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9327 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9328
9329 # Old name:
9330 AU_DEFUN([AC_LIBTOOL_PICMODE],
9331 [_LT_SET_OPTION([LT_INIT], [pic-only])
9332 AC_DIAGNOSE([obsolete],
9333 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9334 put the `pic-only' option into LT_INIT's first parameter.])
9335 ])
9336
9337 dnl aclocal-1.4 backwards compatibility:
9338 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9339
9340
9341 m4_define([_LTDL_MODE], [])
9342 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9343                  [m4_define([_LTDL_MODE], [nonrecursive])])
9344 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9345                  [m4_define([_LTDL_MODE], [recursive])])
9346 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9347                  [m4_define([_LTDL_MODE], [subproject])])
9348
9349 m4_define([_LTDL_TYPE], [])
9350 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9351                  [m4_define([_LTDL_TYPE], [installable])])
9352 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9353                  [m4_define([_LTDL_TYPE], [convenience])])
9354
9355 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9356 #
9357 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9358 # Written by Gary V. Vaughan, 2004
9359 #
9360 # This file is free software; the Free Software Foundation gives
9361 # unlimited permission to copy and/or distribute it, with or without
9362 # modifications, as long as this notice is preserved.
9363
9364 # serial 6 ltsugar.m4
9365
9366 # This is to help aclocal find these macros, as it can't see m4_define.
9367 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9368
9369
9370 # lt_join(SEP, ARG1, [ARG2...])
9371 # -----------------------------
9372 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9373 # associated separator.
9374 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9375 # versions in m4sugar had bugs.
9376 m4_define([lt_join],
9377 [m4_if([$#], [1], [],
9378        [$#], [2], [[$2]],
9379        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9380 m4_define([_lt_join],
9381 [m4_if([$#$2], [2], [],
9382        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9383
9384
9385 # lt_car(LIST)
9386 # lt_cdr(LIST)
9387 # ------------
9388 # Manipulate m4 lists.
9389 # These macros are necessary as long as will still need to support
9390 # Autoconf-2.59 which quotes differently.
9391 m4_define([lt_car], [[$1]])
9392 m4_define([lt_cdr],
9393 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9394        [$#], 1, [],
9395        [m4_dquote(m4_shift($@))])])
9396 m4_define([lt_unquote], $1)
9397
9398
9399 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9400 # ------------------------------------------
9401 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9402 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9403 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9404 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9405 # than defined and empty).
9406 #
9407 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9408 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9409 m4_define([lt_append],
9410 [m4_define([$1],
9411            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9412
9413
9414
9415 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9416 # ----------------------------------------------------------
9417 # Produce a SEP delimited list of all paired combinations of elements of
9418 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9419 # has the form PREFIXmINFIXSUFFIXn.
9420 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9421 m4_define([lt_combine],
9422 [m4_if(m4_eval([$# > 3]), [1],
9423        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9424 [[m4_foreach([_Lt_prefix], [$2],
9425              [m4_foreach([_Lt_suffix],
9426                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9427         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9428
9429
9430 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9431 # -----------------------------------------------------------------------
9432 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9433 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9434 m4_define([lt_if_append_uniq],
9435 [m4_ifdef([$1],
9436           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9437                  [lt_append([$1], [$2], [$3])$4],
9438                  [$5])],
9439           [lt_append([$1], [$2], [$3])$4])])
9440
9441
9442 # lt_dict_add(DICT, KEY, VALUE)
9443 # -----------------------------
9444 m4_define([lt_dict_add],
9445 [m4_define([$1($2)], [$3])])
9446
9447
9448 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9449 # --------------------------------------------
9450 m4_define([lt_dict_add_subkey],
9451 [m4_define([$1($2:$3)], [$4])])
9452
9453
9454 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9455 # ----------------------------------
9456 m4_define([lt_dict_fetch],
9457 [m4_ifval([$3],
9458         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9459     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9460
9461
9462 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9463 # -----------------------------------------------------------------
9464 m4_define([lt_if_dict_fetch],
9465 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9466         [$5],
9467     [$6])])
9468
9469
9470 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9471 # --------------------------------------------------------------
9472 m4_define([lt_dict_filter],
9473 [m4_if([$5], [], [],
9474   [lt_join(m4_quote(m4_default([$4], [[, ]])),
9475            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9476                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9477 ])
9478
9479 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
9480 #
9481 #   Copyright (C) 2004 Free Software Foundation, Inc.
9482 #   Written by Scott James Remnant, 2004
9483 #
9484 # This file is free software; the Free Software Foundation gives
9485 # unlimited permission to copy and/or distribute it, with or without
9486 # modifications, as long as this notice is preserved.
9487
9488 # @configure_input@
9489
9490 # serial 3337 ltversion.m4
9491 # This file is part of GNU Libtool
9492
9493 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9494 m4_define([LT_PACKAGE_REVISION], [1.3337])
9495
9496 AC_DEFUN([LTVERSION_VERSION],
9497 [macro_version='2.4.2'
9498 macro_revision='1.3337'
9499 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9500 _LT_DECL(, macro_revision, 0)
9501 ])
9502
9503 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9504 #
9505 #   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9506 #   Written by Scott James Remnant, 2004.
9507 #
9508 # This file is free software; the Free Software Foundation gives
9509 # unlimited permission to copy and/or distribute it, with or without
9510 # modifications, as long as this notice is preserved.
9511
9512 # serial 5 lt~obsolete.m4
9513
9514 # These exist entirely to fool aclocal when bootstrapping libtool.
9515 #
9516 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9517 # which have later been changed to m4_define as they aren't part of the
9518 # exported API, or moved to Autoconf or Automake where they belong.
9519 #
9520 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9521 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9522 # using a macro with the same name in our local m4/libtool.m4 it'll
9523 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9524 # and doesn't know about Autoconf macros at all.)
9525 #
9526 # So we provide this file, which has a silly filename so it's always
9527 # included after everything else.  This provides aclocal with the
9528 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9529 # because those macros already exist, or will be overwritten later.
9530 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9531 #
9532 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9533 # Yes, that means every name once taken will need to remain here until
9534 # we give up compatibility with versions before 1.7, at which point
9535 # we need to keep only those names which we still refer to.
9536
9537 # This is to help aclocal find these macros, as it can't see m4_define.
9538 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9539
9540 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9541 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
9542 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9543 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
9544 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9545 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
9546 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
9547 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9548 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
9549 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9550 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
9551 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9552 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9553 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9554 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9555 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9556 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
9557 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9558 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9559 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
9560 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
9561 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9562 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9563 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9564 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9565 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9566 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9567 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9568 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
9569 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
9570 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
9571 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9572 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9573 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
9574 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
9575 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9576 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9577 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
9578 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9579 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
9580 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
9581 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
9582 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9583 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9584 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9585 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9586 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9587 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9588 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9589 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9590 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9591 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9592 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9593 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9594 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9595 m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9596 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9597 m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9598 m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
9599 m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
9600 m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
9601
9602 # nls.m4 serial 5 (gettext-0.18)
9603 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
9604 dnl Inc.
9605 dnl This file is free software; the Free Software Foundation
9606 dnl gives unlimited permission to copy and/or distribute it,
9607 dnl with or without modifications, as long as this notice is preserved.
9608 dnl
9609 dnl This file can can be used in projects which are not available under
9610 dnl the GNU General Public License or the GNU Library General Public
9611 dnl License but which still want to provide support for the GNU gettext
9612 dnl functionality.
9613 dnl Please note that the actual code of the GNU gettext library is covered
9614 dnl by the GNU Library General Public License, and the rest of the GNU
9615 dnl gettext package package is covered by the GNU General Public License.
9616 dnl They are *not* in the public domain.
9617
9618 dnl Authors:
9619 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9620 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9621
9622 AC_PREREQ([2.50])
9623
9624 AC_DEFUN([AM_NLS],
9625 [
9626   AC_MSG_CHECKING([whether NLS is requested])
9627   dnl Default is enabled NLS
9628   AC_ARG_ENABLE([nls],
9629     [  --disable-nls           do not use Native Language Support],
9630     USE_NLS=$enableval, USE_NLS=yes)
9631   AC_MSG_RESULT([$USE_NLS])
9632   AC_SUBST([USE_NLS])
9633 ])
9634
9635 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9636 # serial 1 (pkg-config-0.24)
9637
9638 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
9639 #
9640 # This program is free software; you can redistribute it and/or modify
9641 # it under the terms of the GNU General Public License as published by
9642 # the Free Software Foundation; either version 2 of the License, or
9643 # (at your option) any later version.
9644 #
9645 # This program is distributed in the hope that it will be useful, but
9646 # WITHOUT ANY WARRANTY; without even the implied warranty of
9647 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9648 # General Public License for more details.
9649 #
9650 # You should have received a copy of the GNU General Public License
9651 # along with this program; if not, write to the Free Software
9652 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9653 #
9654 # As a special exception to the GNU General Public License, if you
9655 # distribute this file as part of a program that contains a
9656 # configuration script generated by Autoconf, you may include it under
9657 # the same distribution terms that you use for the rest of that program.
9658
9659 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9660 # ----------------------------------
9661 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9662 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9663 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9664 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9665 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9666 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9667 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9668
9669 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9670         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9671 fi
9672 if test -n "$PKG_CONFIG"; then
9673         _pkg_min_version=m4_default([$1], [0.9.0])
9674         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9675         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9676                 AC_MSG_RESULT([yes])
9677         else
9678                 AC_MSG_RESULT([no])
9679                 PKG_CONFIG=""
9680         fi
9681 fi[]dnl
9682 ])# PKG_PROG_PKG_CONFIG
9683
9684 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9685 #
9686 # Check to see whether a particular set of modules exists.  Similar
9687 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9688 #
9689 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9690 # only at the first occurence in configure.ac, so if the first place
9691 # it's called might be skipped (such as if it is within an "if", you
9692 # have to call PKG_CHECK_EXISTS manually
9693 # --------------------------------------------------------------
9694 AC_DEFUN([PKG_CHECK_EXISTS],
9695 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9696 if test -n "$PKG_CONFIG" && \
9697     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9698   m4_default([$2], [:])
9699 m4_ifvaln([$3], [else
9700   $3])dnl
9701 fi])
9702
9703 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9704 # ---------------------------------------------
9705 m4_define([_PKG_CONFIG],
9706 [if test -n "$$1"; then
9707     pkg_cv_[]$1="$$1"
9708  elif test -n "$PKG_CONFIG"; then
9709     PKG_CHECK_EXISTS([$3],
9710                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9711                       test "x$?" != "x0" && pkg_failed=yes ],
9712                      [pkg_failed=yes])
9713  else
9714     pkg_failed=untried
9715 fi[]dnl
9716 ])# _PKG_CONFIG
9717
9718 # _PKG_SHORT_ERRORS_SUPPORTED
9719 # -----------------------------
9720 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9721 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9722 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9723         _pkg_short_errors_supported=yes
9724 else
9725         _pkg_short_errors_supported=no
9726 fi[]dnl
9727 ])# _PKG_SHORT_ERRORS_SUPPORTED
9728
9729
9730 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9731 # [ACTION-IF-NOT-FOUND])
9732 #
9733 #
9734 # Note that if there is a possibility the first call to
9735 # PKG_CHECK_MODULES might not happen, you should be sure to include an
9736 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9737 #
9738 #
9739 # --------------------------------------------------------------
9740 AC_DEFUN([PKG_CHECK_MODULES],
9741 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9742 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9743 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9744
9745 pkg_failed=no
9746 AC_MSG_CHECKING([for $1])
9747
9748 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9749 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
9750
9751 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9752 and $1[]_LIBS to avoid the need to call pkg-config.
9753 See the pkg-config man page for more details.])
9754
9755 if test $pkg_failed = yes; then
9756         AC_MSG_RESULT([no])
9757         _PKG_SHORT_ERRORS_SUPPORTED
9758         if test $_pkg_short_errors_supported = yes; then
9759                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9760         else 
9761                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9762         fi
9763         # Put the nasty error message in config.log where it belongs
9764         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9765
9766         m4_default([$4], [AC_MSG_ERROR(
9767 [Package requirements ($2) were not met:
9768
9769 $$1_PKG_ERRORS
9770
9771 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9772 installed software in a non-standard prefix.
9773
9774 _PKG_TEXT])[]dnl
9775         ])
9776 elif test $pkg_failed = untried; then
9777         AC_MSG_RESULT([no])
9778         m4_default([$4], [AC_MSG_FAILURE(
9779 [The pkg-config script could not be found or is too old.  Make sure it
9780 is in your PATH or set the PKG_CONFIG environment variable to the full
9781 path to pkg-config.
9782
9783 _PKG_TEXT
9784
9785 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
9786         ])
9787 else
9788         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9789         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9790         AC_MSG_RESULT([yes])
9791         $3
9792 fi[]dnl
9793 ])# PKG_CHECK_MODULES
9794
9795
9796 # PKG_INSTALLDIR(DIRECTORY)
9797 # -------------------------
9798 # Substitutes the variable pkgconfigdir as the location where a module
9799 # should install pkg-config .pc files. By default the directory is
9800 # $libdir/pkgconfig, but the default can be changed by passing
9801 # DIRECTORY. The user can override through the --with-pkgconfigdir
9802 # parameter.
9803 AC_DEFUN([PKG_INSTALLDIR],
9804 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
9805 m4_pushdef([pkg_description],
9806     [pkg-config installation directory @<:@]pkg_default[@:>@])
9807 AC_ARG_WITH([pkgconfigdir],
9808     [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
9809     [with_pkgconfigdir=]pkg_default)
9810 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
9811 m4_popdef([pkg_default])
9812 m4_popdef([pkg_description])
9813 ]) dnl PKG_INSTALLDIR
9814
9815
9816 # PKG_NOARCH_INSTALLDIR(DIRECTORY)
9817 # -------------------------
9818 # Substitutes the variable noarch_pkgconfigdir as the location where a
9819 # module should install arch-independent pkg-config .pc files. By
9820 # default the directory is $datadir/pkgconfig, but the default can be
9821 # changed by passing DIRECTORY. The user can override through the
9822 # --with-noarch-pkgconfigdir parameter.
9823 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
9824 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
9825 m4_pushdef([pkg_description],
9826     [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
9827 AC_ARG_WITH([noarch-pkgconfigdir],
9828     [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
9829     [with_noarch_pkgconfigdir=]pkg_default)
9830 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
9831 m4_popdef([pkg_default])
9832 m4_popdef([pkg_description])
9833 ]) dnl PKG_NOARCH_INSTALLDIR
9834
9835
9836 # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
9837 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9838 # -------------------------------------------
9839 # Retrieves the value of the pkg-config variable for the given module.
9840 AC_DEFUN([PKG_CHECK_VAR],
9841 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9842 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
9843
9844 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
9845 AS_VAR_COPY([$1], [pkg_cv_][$1])
9846
9847 AS_VAR_IF([$1], [""], [$5], [$4])dnl
9848 ])# PKG_CHECK_VAR
9849
9850 AC_DEFUN([YELP_HELP_INIT],
9851 [
9852 AC_REQUIRE([AC_PROG_LN_S])
9853 m4_pattern_allow([AM_V_at])
9854 m4_pattern_allow([AM_V_GEN])
9855 m4_pattern_allow([AM_DEFAULT_VERBOSITY])
9856
9857 YELP_LC_MEDIA_LINKS=true
9858 YELP_LC_DIST=true
9859
9860 for yelpopt in [$1]; do
9861   case $yelpopt in
9862     lc-media-links)    YELP_LC_MEDIA_LINKS=true ;;
9863     no-lc-media-links) YELP_LC_MEDIA_LINKS= ;;
9864     lc-dist)           YELP_LC_DIST=true ;;
9865     no-lc-dist)        YELP_LC_DIST= ;;
9866     *) AC_MSG_ERROR([Unrecognized [YELP_HELP_INIT] option $yelpopt"]) ;;
9867   esac
9868 done;
9869 AC_SUBST([YELP_LC_MEDIA_LINKS])
9870 AC_SUBST([YELP_LC_DIST])
9871
9872 AC_ARG_WITH([help-dir],
9873             AS_HELP_STRING([--with-help-dir=DIR],
9874                            [path where help files are installed]),,
9875             [with_help_dir='${datadir}/help'])
9876 HELP_DIR="$with_help_dir"
9877 AC_SUBST(HELP_DIR)
9878
9879 AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
9880 AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
9881 if test x"$ITSTOOL" = x; then
9882   AC_MSG_ERROR([itstool not found])
9883 fi
9884
9885 AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
9886 AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
9887 if test x"$XMLLINT" = x; then
9888   AC_MSG_ERROR([xmllint not found])
9889 fi
9890
9891 YELP_HELP_RULES='
9892 HELP_ID ?=
9893 HELP_POT ?=
9894 HELP_FILES ?=
9895 HELP_EXTRA ?=
9896 HELP_MEDIA ?=
9897 HELP_LINGUAS ?=
9898
9899 _HELP_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),$(filter $(LINGUAS),$(HELP_LINGUAS)),$(HELP_LINGUAS))
9900 _HELP_POTFILE = $(if $(HELP_POT),$(HELP_POT),$(if $(HELP_ID),$(HELP_ID).pot))
9901 _HELP_POFILES = $(if $(HELP_ID),$(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).po))
9902 _HELP_MOFILES = $(patsubst %.po,%.mo,$(_HELP_POFILES))
9903 _HELP_C_FILES = $(foreach f,$(HELP_FILES),C/$(f))
9904 _HELP_C_EXTRA = $(foreach f,$(HELP_EXTRA),C/$(f))
9905 _HELP_C_MEDIA = $(foreach f,$(HELP_MEDIA),C/$(f))
9906 _HELP_LC_FILES = $(foreach lc,$(_HELP_LINGUAS),$(foreach f,$(HELP_FILES),$(lc)/$(f)))
9907 _HELP_LC_STAMPS = $(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).stamp)
9908
9909 _HELP_DEFAULT_V = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
9910 _HELP_V = $(if $(V),$(V),$(_HELP_DEFAULT_V))
9911 _HELP_LC_VERBOSE = $(_HELP_LC_VERBOSE_$(_HELP_V))
9912 _HELP_LC_VERBOSE_ = $(_HELP_LC_VERBOSE_$(_HELP_DEFAULT_V))
9913 _HELP_LC_VERBOSE_0 = @echo "  GEN    "$(dir [$]@);
9914
9915 all: $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_LC_FILES) $(_HELP_POFILES)
9916
9917 .PHONY: pot
9918 pot: $(_HELP_POTFILE)
9919 $(_HELP_POTFILE): $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
9920         $(AM_V_GEN)if test -d "C"; then d=; else d="$(srcdir)/"; fi; \
9921         $(ITSTOOL) -o "[$]@" $(foreach f,$(_HELP_C_FILES),"$${d}$(f)")
9922
9923 .PHONY: repo
9924 repo: $(_HELP_POTFILE)
9925         $(AM_V_at)for po in $(_HELP_POFILES); do \
9926           if test "x[$](_HELP_V)" = "x0"; then echo "  GEN    $${po}"; fi; \
9927           msgmerge -q -o "$${po}" "$${po}" "$(_HELP_POTFILE)"; \
9928         done
9929
9930 $(_HELP_POFILES):
9931         $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
9932         $(AM_V_at)if test ! -f "[$]@" -a -f "$(srcdir)/[$]@"; then cp "$(srcdir)/[$]@" "[$]@"; fi
9933         $(AM_V_GEN)if ! test -f "[$]@"; then \
9934           (cd "$(dir [$]@)" && \
9935             $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
9936             mv "$(notdir [$]@).tmp" "$(notdir [$]@)"); \
9937         else \
9938           (cd "$(dir [$]@)" && \
9939             $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
9940             msgmerge -o "$(notdir [$]@)" "$(notdir [$]@)" "$(notdir [$]@).tmp" && \
9941             rm "$(notdir [$]@).tmp"); \
9942         fi
9943
9944 $(_HELP_MOFILES): %.mo: %.po
9945         $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
9946         $(AM_V_GEN)msgfmt -o "[$]@" "$<"
9947
9948 $(_HELP_LC_FILES): $(_HELP_LINGUAS)
9949 $(_HELP_LINGUAS): $(_HELP_LC_STAMPS)
9950 $(_HELP_LC_STAMPS): %.stamp: %.mo
9951 $(_HELP_LC_STAMPS): $(_HELP_C_FILES) $(_HELP_C_EXTRA)
9952         $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
9953         $(_HELP_LC_VERBOSE)if test -d "C"; then d="../"; else d="$(abs_srcdir)/"; fi; \
9954         mo="$(dir [$]@)$(patsubst %/$(notdir [$]@),%,[$]@).mo"; \
9955         if test -f "$${mo}"; then mo="../$${mo}"; else mo="$(abs_srcdir)/$${mo}"; fi; \
9956         (cd "$(dir [$]@)" && $(ITSTOOL) -m "$${mo}" $(foreach f,$(_HELP_C_FILES),$${d}/$(f))) && \
9957         touch "[$]@"
9958
9959 .PHONY: clean-help
9960 mostlyclean-am: $(if $(HELP_ID),clean-help)
9961 clean-help:
9962         rm -f $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_MOFILES)
9963
9964 EXTRA_DIST ?=
9965 EXTRA_DIST += $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
9966 EXTRA_DIST += $(if $(YELP_LC_DIST),$(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).stamp))
9967 EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).po)
9968 EXTRA_DIST += $(foreach f,$(HELP_MEDIA),$(foreach lc,$(HELP_LINGUAS),$(wildcard $(lc)/$(f))))
9969
9970 distdir: distdir-help-files
9971 distdir-help-files: $(_HELP_LC_FILES)
9972         @for lc in C $(if $(YELP_LC_DIST),$(HELP_LINGUAS)) ; do \
9973           $(MKDIR_P) "$(distdir)/$$lc"; \
9974           for file in $(HELP_FILES); do \
9975             if test -f "$$lc/$$file"; then d=./; else d=$(srcdir)/; fi; \
9976             cp -p "$$d$$lc/$$file" "$(distdir)/$$lc/" || exit 1; \
9977           done; \
9978         done; \
9979
9980 .PHONY: check-help
9981 check: check-help
9982 check-help:
9983         for lc in C $(_HELP_LINGUAS); do \
9984           if test -d "$$lc"; \
9985             then d=; \
9986             xmlpath="$$lc"; \
9987           else \
9988             d="$(srcdir)/"; \
9989             xmlpath="$$lc:$(srcdir)/$$lc"; \
9990           fi; \
9991           for page in $(HELP_FILES); do \
9992             echo "$(XMLLINT) --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
9993             $(XMLLINT) --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
9994           done; \
9995         done
9996
9997
9998 .PHONY: install-help
9999 install-data-am: $(if $(HELP_ID),install-help)
10000 install-help: $(_HELP_LC_FILES)
10001         @for lc in C $(_HELP_LINGUAS); do \
10002           $(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)" || exit 1; \
10003         done
10004         @for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
10005           if test -f "$$lc/$$f"; then d=; else d="$(srcdir)/"; fi; \
10006           helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
10007           if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
10008           echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir`basename $$f`"; \
10009           $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir`basename $$f`" || exit 1; \
10010         done; done
10011         @for f in $(_HELP_C_EXTRA); do \
10012           lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
10013           if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
10014           helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
10015           if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
10016           echo "$(INSTALL_DATA) $$d$$f $$helpdir`basename $$f`"; \
10017           $(INSTALL_DATA) "$$d$$f" "$$helpdir`basename $$f`" || exit 1; \
10018         done
10019         @for f in $(HELP_MEDIA); do \
10020           for lc in C $(_HELP_LINGUAS); do \
10021             if test -f "$$lc$$f"; then d=; else d="$(srcdir)/"; fi; \
10022             helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
10023             mdir=`dirname "$$f"`; \
10024             if test "x$mdir" = "x."; then mdir=""; fi; \
10025             if ! test -d "$$helpdir$$mdir"; then $(mkinstalldirs) "$$helpdir$$mdir"; fi; \
10026             if test -f "$$d$$lc/$$f"; then \
10027               echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir$$f"; \
10028               $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir$$f" || exit 1; \
10029             elif test "x$$lc" != "xC"; then \
10030               if test "x$(YELP_LC_MEDIA_LINKS)" != "x"; then \
10031                 echo "$(LN_S) -f $(HELP_DIR)/C/$(HELP_ID)/$$f $$helpdir$$f"; \
10032                 $(LN_S) -f "$(HELP_DIR)/C/$(HELP_ID)/$$f" "$$helpdir$$f" || exit 1; \
10033               fi; \
10034             fi; \
10035           done; \
10036         done
10037
10038 .PHONY: uninstall-help
10039 uninstall-am: $(if $(HELP_ID),uninstall-help)
10040 uninstall-help:
10041         for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
10042           helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
10043           echo "rm -f $$helpdir`basename $$f`"; \
10044           rm -f "$$helpdir`basename $$f`"; \
10045         done; done
10046         @for f in $(_HELP_C_EXTRA); do \
10047           lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
10048           helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
10049           echo "rm -f $$helpdir`basename $$f`"; \
10050           rm -f "$$helpdir`basename $$f`"; \
10051         done
10052         @for f in $(HELP_MEDIA); do \
10053           for lc in C $(_HELP_LINGUAS); do \
10054             helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
10055             echo "rm -f $$helpdir$$f"; \
10056             rm -f "$$helpdir$$f"; \
10057           done; \
10058         done;
10059 '
10060 AC_SUBST([YELP_HELP_RULES])
10061 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([YELP_HELP_RULES])])
10062 ])
10063
10064 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
10065 #
10066 # This file is free software; the Free Software Foundation
10067 # gives unlimited permission to copy and/or distribute it,
10068 # with or without modifications, as long as this notice is preserved.
10069
10070 # AM_AUTOMAKE_VERSION(VERSION)
10071 # ----------------------------
10072 # Automake X.Y traces this macro to ensure aclocal.m4 has been
10073 # generated from the m4 files accompanying Automake X.Y.
10074 # (This private macro should not be called outside this file.)
10075 AC_DEFUN([AM_AUTOMAKE_VERSION],
10076 [am__api_version='1.15'
10077 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
10078 dnl require some minimum version.  Point them to the right macro.
10079 m4_if([$1], [1.15], [],
10080       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
10081 ])
10082
10083 # _AM_AUTOCONF_VERSION(VERSION)
10084 # -----------------------------
10085 # aclocal traces this macro to find the Autoconf version.
10086 # This is a private macro too.  Using m4_define simplifies
10087 # the logic in aclocal, which can simply ignore this definition.
10088 m4_define([_AM_AUTOCONF_VERSION], [])
10089
10090 # AM_SET_CURRENT_AUTOMAKE_VERSION
10091 # -------------------------------
10092 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
10093 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
10094 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
10095 [AM_AUTOMAKE_VERSION([1.15])dnl
10096 m4_ifndef([AC_AUTOCONF_VERSION],
10097   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
10098 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
10099
10100 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
10101
10102 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
10103 #
10104 # This file is free software; the Free Software Foundation
10105 # gives unlimited permission to copy and/or distribute it,
10106 # with or without modifications, as long as this notice is preserved.
10107
10108 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
10109 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
10110 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
10111 #
10112 # Of course, Automake must honor this variable whenever it calls a
10113 # tool from the auxiliary directory.  The problem is that $srcdir (and
10114 # therefore $ac_aux_dir as well) can be either absolute or relative,
10115 # depending on how configure is run.  This is pretty annoying, since
10116 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
10117 # source directory, any form will work fine, but in subdirectories a
10118 # relative path needs to be adjusted first.
10119 #
10120 # $ac_aux_dir/missing
10121 #    fails when called from a subdirectory if $ac_aux_dir is relative
10122 # $top_srcdir/$ac_aux_dir/missing
10123 #    fails if $ac_aux_dir is absolute,
10124 #    fails when called from a subdirectory in a VPATH build with
10125 #          a relative $ac_aux_dir
10126 #
10127 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
10128 # are both prefixed by $srcdir.  In an in-source build this is usually
10129 # harmless because $srcdir is '.', but things will broke when you
10130 # start a VPATH build or use an absolute $srcdir.
10131 #
10132 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
10133 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
10134 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
10135 # and then we would define $MISSING as
10136 #   MISSING="\${SHELL} $am_aux_dir/missing"
10137 # This will work as long as MISSING is not called from configure, because
10138 # unfortunately $(top_srcdir) has no meaning in configure.
10139 # However there are other variables, like CC, which are often used in
10140 # configure, and could therefore not use this "fixed" $ac_aux_dir.
10141 #
10142 # Another solution, used here, is to always expand $ac_aux_dir to an
10143 # absolute PATH.  The drawback is that using absolute paths prevent a
10144 # configured tree to be moved without reconfiguration.
10145
10146 AC_DEFUN([AM_AUX_DIR_EXPAND],
10147 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
10148 # Expand $ac_aux_dir to an absolute path.
10149 am_aux_dir=`cd "$ac_aux_dir" && pwd`
10150 ])
10151
10152 # AM_CONDITIONAL                                            -*- Autoconf -*-
10153
10154 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
10155 #
10156 # This file is free software; the Free Software Foundation
10157 # gives unlimited permission to copy and/or distribute it,
10158 # with or without modifications, as long as this notice is preserved.
10159
10160 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
10161 # -------------------------------------
10162 # Define a conditional.
10163 AC_DEFUN([AM_CONDITIONAL],
10164 [AC_PREREQ([2.52])dnl
10165  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
10166        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
10167 AC_SUBST([$1_TRUE])dnl
10168 AC_SUBST([$1_FALSE])dnl
10169 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
10170 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
10171 m4_define([_AM_COND_VALUE_$1], [$2])dnl
10172 if $2; then
10173   $1_TRUE=
10174   $1_FALSE='#'
10175 else
10176   $1_TRUE='#'
10177   $1_FALSE=
10178 fi
10179 AC_CONFIG_COMMANDS_PRE(
10180 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
10181   AC_MSG_ERROR([[conditional "$1" was never defined.
10182 Usually this means the macro was only invoked conditionally.]])
10183 fi])])
10184
10185 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
10186 #
10187 # This file is free software; the Free Software Foundation
10188 # gives unlimited permission to copy and/or distribute it,
10189 # with or without modifications, as long as this notice is preserved.
10190
10191
10192 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
10193 # written in clear, in which case automake, when reading aclocal.m4,
10194 # will think it sees a *use*, and therefore will trigger all it's
10195 # C support machinery.  Also note that it means that autoscan, seeing
10196 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10197
10198
10199 # _AM_DEPENDENCIES(NAME)
10200 # ----------------------
10201 # See how the compiler implements dependency checking.
10202 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
10203 # We try a few techniques and use that to set a single cache variable.
10204 #
10205 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
10206 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
10207 # dependency, and given that the user is not expected to run this macro,
10208 # just rely on AC_PROG_CC.
10209 AC_DEFUN([_AM_DEPENDENCIES],
10210 [AC_REQUIRE([AM_SET_DEPDIR])dnl
10211 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
10212 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
10213 AC_REQUIRE([AM_DEP_TRACK])dnl
10214
10215 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
10216       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
10217       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
10218       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
10219       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
10220       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
10221                     [depcc="$$1"   am_compiler_list=])
10222
10223 AC_CACHE_CHECK([dependency style of $depcc],
10224                [am_cv_$1_dependencies_compiler_type],
10225 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10226   # We make a subdir and do the tests there.  Otherwise we can end up
10227   # making bogus files that we don't know about and never remove.  For
10228   # instance it was reported that on HP-UX the gcc test will end up
10229   # making a dummy file named 'D' -- because '-MD' means "put the output
10230   # in D".
10231   rm -rf conftest.dir
10232   mkdir conftest.dir
10233   # Copy depcomp to subdir because otherwise we won't find it if we're
10234   # using a relative directory.
10235   cp "$am_depcomp" conftest.dir
10236   cd conftest.dir
10237   # We will build objects and dependencies in a subdirectory because
10238   # it helps to detect inapplicable dependency modes.  For instance
10239   # both Tru64's cc and ICC support -MD to output dependencies as a
10240   # side effect of compilation, but ICC will put the dependencies in
10241   # the current directory while Tru64 will put them in the object
10242   # directory.
10243   mkdir sub
10244
10245   am_cv_$1_dependencies_compiler_type=none
10246   if test "$am_compiler_list" = ""; then
10247      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
10248   fi
10249   am__universal=false
10250   m4_case([$1], [CC],
10251     [case " $depcc " in #(
10252      *\ -arch\ *\ -arch\ *) am__universal=true ;;
10253      esac],
10254     [CXX],
10255     [case " $depcc " in #(
10256      *\ -arch\ *\ -arch\ *) am__universal=true ;;
10257      esac])
10258
10259   for depmode in $am_compiler_list; do
10260     # Setup a source with many dependencies, because some compilers
10261     # like to wrap large dependency lists on column 80 (with \), and
10262     # we should not choose a depcomp mode which is confused by this.
10263     #
10264     # We need to recreate these files for each test, as the compiler may
10265     # overwrite some of them when testing with obscure command lines.
10266     # This happens at least with the AIX C compiler.
10267     : > sub/conftest.c
10268     for i in 1 2 3 4 5 6; do
10269       echo '#include "conftst'$i'.h"' >> sub/conftest.c
10270       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
10271       # Solaris 10 /bin/sh.
10272       echo '/* dummy */' > sub/conftst$i.h
10273     done
10274     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10275
10276     # We check with '-c' and '-o' for the sake of the "dashmstdout"
10277     # mode.  It turns out that the SunPro C++ compiler does not properly
10278     # handle '-M -o', and we need to detect this.  Also, some Intel
10279     # versions had trouble with output in subdirs.
10280     am__obj=sub/conftest.${OBJEXT-o}
10281     am__minus_obj="-o $am__obj"
10282     case $depmode in
10283     gcc)
10284       # This depmode causes a compiler race in universal mode.
10285       test "$am__universal" = false || continue
10286       ;;
10287     nosideeffect)
10288       # After this tag, mechanisms are not by side-effect, so they'll
10289       # only be used when explicitly requested.
10290       if test "x$enable_dependency_tracking" = xyes; then
10291         continue
10292       else
10293         break
10294       fi
10295       ;;
10296     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
10297       # This compiler won't grok '-c -o', but also, the minuso test has
10298       # not run yet.  These depmodes are late enough in the game, and
10299       # so weak that their functioning should not be impacted.
10300       am__obj=conftest.${OBJEXT-o}
10301       am__minus_obj=
10302       ;;
10303     none) break ;;
10304     esac
10305     if depmode=$depmode \
10306        source=sub/conftest.c object=$am__obj \
10307        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
10308        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
10309          >/dev/null 2>conftest.err &&
10310        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
10311        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
10312        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
10313        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10314       # icc doesn't choke on unknown options, it will just issue warnings
10315       # or remarks (even with -Werror).  So we grep stderr for any message
10316       # that says an option was ignored or not supported.
10317       # When given -MP, icc 7.0 and 7.1 complain thusly:
10318       #   icc: Command line warning: ignoring option '-M'; no argument required
10319       # The diagnosis changed in icc 8.0:
10320       #   icc: Command line remark: option '-MP' not supported
10321       if (grep 'ignoring option' conftest.err ||
10322           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10323         am_cv_$1_dependencies_compiler_type=$depmode
10324         break
10325       fi
10326     fi
10327   done
10328
10329   cd ..
10330   rm -rf conftest.dir
10331 else
10332   am_cv_$1_dependencies_compiler_type=none
10333 fi
10334 ])
10335 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10336 AM_CONDITIONAL([am__fastdep$1], [
10337   test "x$enable_dependency_tracking" != xno \
10338   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
10339 ])
10340
10341
10342 # AM_SET_DEPDIR
10343 # -------------
10344 # Choose a directory name for dependency files.
10345 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
10346 AC_DEFUN([AM_SET_DEPDIR],
10347 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10348 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
10349 ])
10350
10351
10352 # AM_DEP_TRACK
10353 # ------------
10354 AC_DEFUN([AM_DEP_TRACK],
10355 [AC_ARG_ENABLE([dependency-tracking], [dnl
10356 AS_HELP_STRING(
10357   [--enable-dependency-tracking],
10358   [do not reject slow dependency extractors])
10359 AS_HELP_STRING(
10360   [--disable-dependency-tracking],
10361   [speeds up one-time build])])
10362 if test "x$enable_dependency_tracking" != xno; then
10363   am_depcomp="$ac_aux_dir/depcomp"
10364   AMDEPBACKSLASH='\'
10365   am__nodep='_no'
10366 fi
10367 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
10368 AC_SUBST([AMDEPBACKSLASH])dnl
10369 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
10370 AC_SUBST([am__nodep])dnl
10371 _AM_SUBST_NOTMAKE([am__nodep])dnl
10372 ])
10373
10374 # Generate code to set up dependency tracking.              -*- Autoconf -*-
10375
10376 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
10377 #
10378 # This file is free software; the Free Software Foundation
10379 # gives unlimited permission to copy and/or distribute it,
10380 # with or without modifications, as long as this notice is preserved.
10381
10382
10383 # _AM_OUTPUT_DEPENDENCY_COMMANDS
10384 # ------------------------------
10385 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
10386 [{
10387   # Older Autoconf quotes --file arguments for eval, but not when files
10388   # are listed without --file.  Let's play safe and only enable the eval
10389   # if we detect the quoting.
10390   case $CONFIG_FILES in
10391   *\'*) eval set x "$CONFIG_FILES" ;;
10392   *)   set x $CONFIG_FILES ;;
10393   esac
10394   shift
10395   for mf
10396   do
10397     # Strip MF so we end up with the name of the file.
10398     mf=`echo "$mf" | sed -e 's/:.*$//'`
10399     # Check whether this is an Automake generated Makefile or not.
10400     # We used to match only the files named 'Makefile.in', but
10401     # some people rename them; so instead we look at the file content.
10402     # Grep'ing the first line is not enough: some people post-process
10403     # each Makefile.in and add a new line on top of each file to say so.
10404     # Grep'ing the whole file is not good either: AIX grep has a line
10405     # limit of 2048, but all sed's we know have understand at least 4000.
10406     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
10407       dirpart=`AS_DIRNAME("$mf")`
10408     else
10409       continue
10410     fi
10411     # Extract the definition of DEPDIR, am__include, and am__quote
10412     # from the Makefile without running 'make'.
10413     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
10414     test -z "$DEPDIR" && continue
10415     am__include=`sed -n 's/^am__include = //p' < "$mf"`
10416     test -z "$am__include" && continue
10417     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
10418     # Find all dependency output files, they are included files with
10419     # $(DEPDIR) in their names.  We invoke sed twice because it is the
10420     # simplest approach to changing $(DEPDIR) to its actual value in the
10421     # expansion.
10422     for file in `sed -n "
10423       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
10424          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
10425       # Make sure the directory exists.
10426       test -f "$dirpart/$file" && continue
10427       fdir=`AS_DIRNAME(["$file"])`
10428       AS_MKDIR_P([$dirpart/$fdir])
10429       # echo "creating $dirpart/$file"
10430       echo '# dummy' > "$dirpart/$file"
10431     done
10432   done
10433 }
10434 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10435
10436
10437 # AM_OUTPUT_DEPENDENCY_COMMANDS
10438 # -----------------------------
10439 # This macro should only be invoked once -- use via AC_REQUIRE.
10440 #
10441 # This code is only required when automatic dependency tracking
10442 # is enabled.  FIXME.  This creates each '.P' file that we will
10443 # need in order to bootstrap the dependency handling code.
10444 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10445 [AC_CONFIG_COMMANDS([depfiles],
10446      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10447      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10448 ])
10449
10450 # Do all the work for Automake.                             -*- Autoconf -*-
10451
10452 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
10453 #
10454 # This file is free software; the Free Software Foundation
10455 # gives unlimited permission to copy and/or distribute it,
10456 # with or without modifications, as long as this notice is preserved.
10457
10458 # This macro actually does too much.  Some checks are only needed if
10459 # your package does certain things.  But this isn't really a big deal.
10460
10461 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
10462 m4_define([AC_PROG_CC],
10463 m4_defn([AC_PROG_CC])
10464 [_AM_PROG_CC_C_O
10465 ])
10466
10467 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10468 # AM_INIT_AUTOMAKE([OPTIONS])
10469 # -----------------------------------------------
10470 # The call with PACKAGE and VERSION arguments is the old style
10471 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
10472 # and VERSION should now be passed to AC_INIT and removed from
10473 # the call to AM_INIT_AUTOMAKE.
10474 # We support both call styles for the transition.  After
10475 # the next Automake release, Autoconf can make the AC_INIT
10476 # arguments mandatory, and then we can depend on a new Autoconf
10477 # release and drop the old call support.
10478 AC_DEFUN([AM_INIT_AUTOMAKE],
10479 [AC_PREREQ([2.65])dnl
10480 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
10481 dnl the ones we care about.
10482 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10483 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10484 AC_REQUIRE([AC_PROG_INSTALL])dnl
10485 if test "`cd $srcdir && pwd`" != "`pwd`"; then
10486   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10487   # is not polluted with repeated "-I."
10488   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10489   # test to see if srcdir already configured
10490   if test -f $srcdir/config.status; then
10491     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10492   fi
10493 fi
10494
10495 # test whether we have cygpath
10496 if test -z "$CYGPATH_W"; then
10497   if (cygpath --version) >/dev/null 2>/dev/null; then
10498     CYGPATH_W='cygpath -w'
10499   else
10500     CYGPATH_W=echo
10501   fi
10502 fi
10503 AC_SUBST([CYGPATH_W])
10504
10505 # Define the identity of the package.
10506 dnl Distinguish between old-style and new-style calls.
10507 m4_ifval([$2],
10508 [AC_DIAGNOSE([obsolete],
10509              [$0: two- and three-arguments forms are deprecated.])
10510 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10511  AC_SUBST([PACKAGE], [$1])dnl
10512  AC_SUBST([VERSION], [$2])],
10513 [_AM_SET_OPTIONS([$1])dnl
10514 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10515 m4_if(
10516   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
10517   [ok:ok],,
10518   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10519  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10520  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10521
10522 _AM_IF_OPTION([no-define],,
10523 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
10524  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
10525
10526 # Some tools Automake needs.
10527 AC_REQUIRE([AM_SANITY_CHECK])dnl
10528 AC_REQUIRE([AC_ARG_PROGRAM])dnl
10529 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
10530 AM_MISSING_PROG([AUTOCONF], [autoconf])
10531 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
10532 AM_MISSING_PROG([AUTOHEADER], [autoheader])
10533 AM_MISSING_PROG([MAKEINFO], [makeinfo])
10534 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10535 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
10536 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10537 # For better backward compatibility.  To be removed once Automake 1.9.x
10538 # dies out for good.  For more background, see:
10539 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
10540 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
10541 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
10542 # We need awk for the "check" target (and possibly the TAP driver).  The
10543 # system "awk" is bad on some platforms.
10544 AC_REQUIRE([AC_PROG_AWK])dnl
10545 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10546 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10547 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
10548               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10549                              [_AM_PROG_TAR([v7])])])
10550 _AM_IF_OPTION([no-dependencies],,
10551 [AC_PROVIDE_IFELSE([AC_PROG_CC],
10552                   [_AM_DEPENDENCIES([CC])],
10553                   [m4_define([AC_PROG_CC],
10554                              m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
10555 AC_PROVIDE_IFELSE([AC_PROG_CXX],
10556                   [_AM_DEPENDENCIES([CXX])],
10557                   [m4_define([AC_PROG_CXX],
10558                              m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
10559 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
10560                   [_AM_DEPENDENCIES([OBJC])],
10561                   [m4_define([AC_PROG_OBJC],
10562                              m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
10563 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
10564                   [_AM_DEPENDENCIES([OBJCXX])],
10565                   [m4_define([AC_PROG_OBJCXX],
10566                              m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
10567 ])
10568 AC_REQUIRE([AM_SILENT_RULES])dnl
10569 dnl The testsuite driver may need to know about EXEEXT, so add the
10570 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
10571 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
10572 AC_CONFIG_COMMANDS_PRE(dnl
10573 [m4_provide_if([_AM_COMPILER_EXEEXT],
10574   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
10575
10576 # POSIX will say in a future version that running "rm -f" with no argument
10577 # is OK; and we want to be able to make that assumption in our Makefile
10578 # recipes.  So use an aggressive probe to check that the usage we want is
10579 # actually supported "in the wild" to an acceptable degree.
10580 # See automake bug#10828.
10581 # To make any issue more visible, cause the running configure to be aborted
10582 # by default if the 'rm' program in use doesn't match our expectations; the
10583 # user can still override this though.
10584 if rm -f && rm -fr && rm -rf; then : OK; else
10585   cat >&2 <<'END'
10586 Oops!
10587
10588 Your 'rm' program seems unable to run without file operands specified
10589 on the command line, even when the '-f' option is present.  This is contrary
10590 to the behaviour of most rm programs out there, and not conforming with
10591 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
10592
10593 Please tell bug-automake@gnu.org about your system, including the value
10594 of your $PATH and any error possibly output before this message.  This
10595 can help us improve future automake versions.
10596
10597 END
10598   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
10599     echo 'Configuration will proceed anyway, since you have set the' >&2
10600     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
10601     echo >&2
10602   else
10603     cat >&2 <<'END'
10604 Aborting the configuration process, to ensure you take notice of the issue.
10605
10606 You can download and install GNU coreutils to get an 'rm' implementation
10607 that behaves properly: <http://www.gnu.org/software/coreutils/>.
10608
10609 If you want to complete the configuration process using your problematic
10610 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
10611 to "yes", and re-run configure.
10612
10613 END
10614     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
10615   fi
10616 fi
10617 dnl The trailing newline in this macro's definition is deliberate, for
10618 dnl backward compatibility and to allow trailing 'dnl'-style comments
10619 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
10620 ])
10621
10622 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
10623 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10624 dnl mangled by Autoconf and run in a shell conditional statement.
10625 m4_define([_AC_COMPILER_EXEEXT],
10626 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10627
10628 # When config.status generates a header, we must update the stamp-h file.
10629 # This file resides in the same directory as the config header
10630 # that is generated.  The stamp files are numbered to have different names.
10631
10632 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10633 # loop where config.status creates the headers, so we can generate
10634 # our stamp files there.
10635 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10636 [# Compute $1's index in $config_headers.
10637 _am_arg=$1
10638 _am_stamp_count=1
10639 for _am_header in $config_headers :; do
10640   case $_am_header in
10641     $_am_arg | $_am_arg:* )
10642       break ;;
10643     * )
10644       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10645   esac
10646 done
10647 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10648
10649 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
10650 #
10651 # This file is free software; the Free Software Foundation
10652 # gives unlimited permission to copy and/or distribute it,
10653 # with or without modifications, as long as this notice is preserved.
10654
10655 # AM_PROG_INSTALL_SH
10656 # ------------------
10657 # Define $install_sh.
10658 AC_DEFUN([AM_PROG_INSTALL_SH],
10659 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10660 if test x"${install_sh+set}" != xset; then
10661   case $am_aux_dir in
10662   *\ * | *\     *)
10663     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10664   *)
10665     install_sh="\${SHELL} $am_aux_dir/install-sh"
10666   esac
10667 fi
10668 AC_SUBST([install_sh])])
10669
10670 # Copyright (C) 2003-2014 Free Software Foundation, Inc.
10671 #
10672 # This file is free software; the Free Software Foundation
10673 # gives unlimited permission to copy and/or distribute it,
10674 # with or without modifications, as long as this notice is preserved.
10675
10676 # Check whether the underlying file-system supports filenames
10677 # with a leading dot.  For instance MS-DOS doesn't.
10678 AC_DEFUN([AM_SET_LEADING_DOT],
10679 [rm -rf .tst 2>/dev/null
10680 mkdir .tst 2>/dev/null
10681 if test -d .tst; then
10682   am__leading_dot=.
10683 else
10684   am__leading_dot=_
10685 fi
10686 rmdir .tst 2>/dev/null
10687 AC_SUBST([am__leading_dot])])
10688
10689 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
10690 # From Jim Meyering
10691
10692 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
10693 #
10694 # This file is free software; the Free Software Foundation
10695 # gives unlimited permission to copy and/or distribute it,
10696 # with or without modifications, as long as this notice is preserved.
10697
10698 # AM_MAINTAINER_MODE([DEFAULT-MODE])
10699 # ----------------------------------
10700 # Control maintainer-specific portions of Makefiles.
10701 # Default is to disable them, unless 'enable' is passed literally.
10702 # For symmetry, 'disable' may be passed as well.  Anyway, the user
10703 # can override the default with the --enable/--disable switch.
10704 AC_DEFUN([AM_MAINTAINER_MODE],
10705 [m4_case(m4_default([$1], [disable]),
10706        [enable], [m4_define([am_maintainer_other], [disable])],
10707        [disable], [m4_define([am_maintainer_other], [enable])],
10708        [m4_define([am_maintainer_other], [enable])
10709         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
10710 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
10711   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
10712   AC_ARG_ENABLE([maintainer-mode],
10713     [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
10714       am_maintainer_other[ make rules and dependencies not useful
10715       (and sometimes confusing) to the casual installer])],
10716     [USE_MAINTAINER_MODE=$enableval],
10717     [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
10718   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
10719   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
10720   MAINT=$MAINTAINER_MODE_TRUE
10721   AC_SUBST([MAINT])dnl
10722 ]
10723 )
10724
10725 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
10726
10727 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
10728 #
10729 # This file is free software; the Free Software Foundation
10730 # gives unlimited permission to copy and/or distribute it,
10731 # with or without modifications, as long as this notice is preserved.
10732
10733 # AM_MAKE_INCLUDE()
10734 # -----------------
10735 # Check to see how make treats includes.
10736 AC_DEFUN([AM_MAKE_INCLUDE],
10737 [am_make=${MAKE-make}
10738 cat > confinc << 'END'
10739 am__doit:
10740         @echo this is the am__doit target
10741 .PHONY: am__doit
10742 END
10743 # If we don't find an include directive, just comment out the code.
10744 AC_MSG_CHECKING([for style of include used by $am_make])
10745 am__include="#"
10746 am__quote=
10747 _am_result=none
10748 # First try GNU make style include.
10749 echo "include confinc" > confmf
10750 # Ignore all kinds of additional output from 'make'.
10751 case `$am_make -s -f confmf 2> /dev/null` in #(
10752 *the\ am__doit\ target*)
10753   am__include=include
10754   am__quote=
10755   _am_result=GNU
10756   ;;
10757 esac
10758 # Now try BSD make style include.
10759 if test "$am__include" = "#"; then
10760    echo '.include "confinc"' > confmf
10761    case `$am_make -s -f confmf 2> /dev/null` in #(
10762    *the\ am__doit\ target*)
10763      am__include=.include
10764      am__quote="\""
10765      _am_result=BSD
10766      ;;
10767    esac
10768 fi
10769 AC_SUBST([am__include])
10770 AC_SUBST([am__quote])
10771 AC_MSG_RESULT([$_am_result])
10772 rm -f confinc confmf
10773 ])
10774
10775 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10776
10777 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
10778 #
10779 # This file is free software; the Free Software Foundation
10780 # gives unlimited permission to copy and/or distribute it,
10781 # with or without modifications, as long as this notice is preserved.
10782
10783 # AM_MISSING_PROG(NAME, PROGRAM)
10784 # ------------------------------
10785 AC_DEFUN([AM_MISSING_PROG],
10786 [AC_REQUIRE([AM_MISSING_HAS_RUN])
10787 $1=${$1-"${am_missing_run}$2"}
10788 AC_SUBST($1)])
10789
10790 # AM_MISSING_HAS_RUN
10791 # ------------------
10792 # Define MISSING if not defined so far and test if it is modern enough.
10793 # If it is, set am_missing_run to use it, otherwise, to nothing.
10794 AC_DEFUN([AM_MISSING_HAS_RUN],
10795 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10796 AC_REQUIRE_AUX_FILE([missing])dnl
10797 if test x"${MISSING+set}" != xset; then
10798   case $am_aux_dir in
10799   *\ * | *\     *)
10800     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10801   *)
10802     MISSING="\${SHELL} $am_aux_dir/missing" ;;
10803   esac
10804 fi
10805 # Use eval to expand $SHELL
10806 if eval "$MISSING --is-lightweight"; then
10807   am_missing_run="$MISSING "
10808 else
10809   am_missing_run=
10810   AC_MSG_WARN(['missing' script is too old or missing])
10811 fi
10812 ])
10813
10814 # Helper functions for option handling.                     -*- Autoconf -*-
10815
10816 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
10817 #
10818 # This file is free software; the Free Software Foundation
10819 # gives unlimited permission to copy and/or distribute it,
10820 # with or without modifications, as long as this notice is preserved.
10821
10822 # _AM_MANGLE_OPTION(NAME)
10823 # -----------------------
10824 AC_DEFUN([_AM_MANGLE_OPTION],
10825 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10826
10827 # _AM_SET_OPTION(NAME)
10828 # --------------------
10829 # Set option NAME.  Presently that only means defining a flag for this option.
10830 AC_DEFUN([_AM_SET_OPTION],
10831 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
10832
10833 # _AM_SET_OPTIONS(OPTIONS)
10834 # ------------------------
10835 # OPTIONS is a space-separated list of Automake options.
10836 AC_DEFUN([_AM_SET_OPTIONS],
10837 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10838
10839 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10840 # -------------------------------------------
10841 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10842 AC_DEFUN([_AM_IF_OPTION],
10843 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10844
10845 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
10846 #
10847 # This file is free software; the Free Software Foundation
10848 # gives unlimited permission to copy and/or distribute it,
10849 # with or without modifications, as long as this notice is preserved.
10850
10851 # _AM_PROG_CC_C_O
10852 # ---------------
10853 # Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
10854 # to automatically call this.
10855 AC_DEFUN([_AM_PROG_CC_C_O],
10856 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10857 AC_REQUIRE_AUX_FILE([compile])dnl
10858 AC_LANG_PUSH([C])dnl
10859 AC_CACHE_CHECK(
10860   [whether $CC understands -c and -o together],
10861   [am_cv_prog_cc_c_o],
10862   [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
10863   # Make sure it works both with $CC and with simple cc.
10864   # Following AC_PROG_CC_C_O, we do the test twice because some
10865   # compilers refuse to overwrite an existing .o file with -o,
10866   # though they will create one.
10867   am_cv_prog_cc_c_o=yes
10868   for am_i in 1 2; do
10869     if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
10870          && test -f conftest2.$ac_objext; then
10871       : OK
10872     else
10873       am_cv_prog_cc_c_o=no
10874       break
10875     fi
10876   done
10877   rm -f core conftest*
10878   unset am_i])
10879 if test "$am_cv_prog_cc_c_o" != yes; then
10880    # Losing compiler, so override with the script.
10881    # FIXME: It is wrong to rewrite CC.
10882    # But if we don't then we get into trouble of one sort or another.
10883    # A longer-term fix would be to have automake use am__CC in this case,
10884    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
10885    CC="$am_aux_dir/compile $CC"
10886 fi
10887 AC_LANG_POP([C])])
10888
10889 # For backward compatibility.
10890 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
10891
10892 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
10893 #
10894 # This file is free software; the Free Software Foundation
10895 # gives unlimited permission to copy and/or distribute it,
10896 # with or without modifications, as long as this notice is preserved.
10897
10898 # AM_RUN_LOG(COMMAND)
10899 # -------------------
10900 # Run COMMAND, save the exit status in ac_status, and log it.
10901 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
10902 AC_DEFUN([AM_RUN_LOG],
10903 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
10904    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
10905    ac_status=$?
10906    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
10907    (exit $ac_status); }])
10908
10909 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
10910
10911 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
10912 #
10913 # This file is free software; the Free Software Foundation
10914 # gives unlimited permission to copy and/or distribute it,
10915 # with or without modifications, as long as this notice is preserved.
10916
10917 # AM_SANITY_CHECK
10918 # ---------------
10919 AC_DEFUN([AM_SANITY_CHECK],
10920 [AC_MSG_CHECKING([whether build environment is sane])
10921 # Reject unsafe characters in $srcdir or the absolute working directory
10922 # name.  Accept space and tab only in the latter.
10923 am_lf='
10924 '
10925 case `pwd` in
10926   *[[\\\"\#\$\&\'\`$am_lf]]*)
10927     AC_MSG_ERROR([unsafe absolute working directory name]);;
10928 esac
10929 case $srcdir in
10930   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
10931     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
10932 esac
10933
10934 # Do 'set' in a subshell so we don't clobber the current shell's
10935 # arguments.  Must try -L first in case configure is actually a
10936 # symlink; some systems play weird games with the mod time of symlinks
10937 # (eg FreeBSD returns the mod time of the symlink's containing
10938 # directory).
10939 if (
10940    am_has_slept=no
10941    for am_try in 1 2; do
10942      echo "timestamp, slept: $am_has_slept" > conftest.file
10943      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10944      if test "$[*]" = "X"; then
10945         # -L didn't work.
10946         set X `ls -t "$srcdir/configure" conftest.file`
10947      fi
10948      if test "$[*]" != "X $srcdir/configure conftest.file" \
10949         && test "$[*]" != "X conftest.file $srcdir/configure"; then
10950
10951         # If neither matched, then we have a broken ls.  This can happen
10952         # if, for instance, CONFIG_SHELL is bash and it inherits a
10953         # broken ls alias from the environment.  This has actually
10954         # happened.  Such a system could not be considered "sane".
10955         AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10956   alias in your environment])
10957      fi
10958      if test "$[2]" = conftest.file || test $am_try -eq 2; then
10959        break
10960      fi
10961      # Just in case.
10962      sleep 1
10963      am_has_slept=yes
10964    done
10965    test "$[2]" = conftest.file
10966    )
10967 then
10968    # Ok.
10969    :
10970 else
10971    AC_MSG_ERROR([newly created file is older than distributed files!
10972 Check your system clock])
10973 fi
10974 AC_MSG_RESULT([yes])
10975 # If we didn't sleep, we still need to ensure time stamps of config.status and
10976 # generated files are strictly newer.
10977 am_sleep_pid=
10978 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
10979   ( sleep 1 ) &
10980   am_sleep_pid=$!
10981 fi
10982 AC_CONFIG_COMMANDS_PRE(
10983   [AC_MSG_CHECKING([that generated files are newer than configure])
10984    if test -n "$am_sleep_pid"; then
10985      # Hide warnings about reused PIDs.
10986      wait $am_sleep_pid 2>/dev/null
10987    fi
10988    AC_MSG_RESULT([done])])
10989 rm -f conftest.file
10990 ])
10991
10992 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
10993 #
10994 # This file is free software; the Free Software Foundation
10995 # gives unlimited permission to copy and/or distribute it,
10996 # with or without modifications, as long as this notice is preserved.
10997
10998 # AM_SILENT_RULES([DEFAULT])
10999 # --------------------------
11000 # Enable less verbose build rules; with the default set to DEFAULT
11001 # ("yes" being less verbose, "no" or empty being verbose).
11002 AC_DEFUN([AM_SILENT_RULES],
11003 [AC_ARG_ENABLE([silent-rules], [dnl
11004 AS_HELP_STRING(
11005   [--enable-silent-rules],
11006   [less verbose build output (undo: "make V=1")])
11007 AS_HELP_STRING(
11008   [--disable-silent-rules],
11009   [verbose build output (undo: "make V=0")])dnl
11010 ])
11011 case $enable_silent_rules in @%:@ (((
11012   yes) AM_DEFAULT_VERBOSITY=0;;
11013    no) AM_DEFAULT_VERBOSITY=1;;
11014     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
11015 esac
11016 dnl
11017 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
11018 dnl do not support nested variable expansions.
11019 dnl See automake bug#9928 and bug#10237.
11020 am_make=${MAKE-make}
11021 AC_CACHE_CHECK([whether $am_make supports nested variables],
11022    [am_cv_make_support_nested_variables],
11023    [if AS_ECHO([['TRUE=$(BAR$(V))
11024 BAR0=false
11025 BAR1=true
11026 V=1
11027 am__doit:
11028         @$(TRUE)
11029 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
11030   am_cv_make_support_nested_variables=yes
11031 else
11032   am_cv_make_support_nested_variables=no
11033 fi])
11034 if test $am_cv_make_support_nested_variables = yes; then
11035   dnl Using '$V' instead of '$(V)' breaks IRIX make.
11036   AM_V='$(V)'
11037   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
11038 else
11039   AM_V=$AM_DEFAULT_VERBOSITY
11040   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
11041 fi
11042 AC_SUBST([AM_V])dnl
11043 AM_SUBST_NOTMAKE([AM_V])dnl
11044 AC_SUBST([AM_DEFAULT_V])dnl
11045 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
11046 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
11047 AM_BACKSLASH='\'
11048 AC_SUBST([AM_BACKSLASH])dnl
11049 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
11050 ])
11051
11052 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
11053 #
11054 # This file is free software; the Free Software Foundation
11055 # gives unlimited permission to copy and/or distribute it,
11056 # with or without modifications, as long as this notice is preserved.
11057
11058 # AM_PROG_INSTALL_STRIP
11059 # ---------------------
11060 # One issue with vendor 'install' (even GNU) is that you can't
11061 # specify the program used to strip binaries.  This is especially
11062 # annoying in cross-compiling environments, where the build's strip
11063 # is unlikely to handle the host's binaries.
11064 # Fortunately install-sh will honor a STRIPPROG variable, so we
11065 # always use install-sh in "make install-strip", and initialize
11066 # STRIPPROG with the value of the STRIP variable (set by the user).
11067 AC_DEFUN([AM_PROG_INSTALL_STRIP],
11068 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
11069 # Installed binaries are usually stripped using 'strip' when the user
11070 # run "make install-strip".  However 'strip' might not be the right
11071 # tool to use in cross-compilation environments, therefore Automake
11072 # will honor the 'STRIP' environment variable to overrule this program.
11073 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
11074 if test "$cross_compiling" != no; then
11075   AC_CHECK_TOOL([STRIP], [strip], :)
11076 fi
11077 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
11078 AC_SUBST([INSTALL_STRIP_PROGRAM])])
11079
11080 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
11081 #
11082 # This file is free software; the Free Software Foundation
11083 # gives unlimited permission to copy and/or distribute it,
11084 # with or without modifications, as long as this notice is preserved.
11085
11086 # _AM_SUBST_NOTMAKE(VARIABLE)
11087 # ---------------------------
11088 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
11089 # This macro is traced by Automake.
11090 AC_DEFUN([_AM_SUBST_NOTMAKE])
11091
11092 # AM_SUBST_NOTMAKE(VARIABLE)
11093 # --------------------------
11094 # Public sister of _AM_SUBST_NOTMAKE.
11095 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
11096
11097 # Check how to create a tarball.                            -*- Autoconf -*-
11098
11099 # Copyright (C) 2004-2014 Free Software Foundation, Inc.
11100 #
11101 # This file is free software; the Free Software Foundation
11102 # gives unlimited permission to copy and/or distribute it,
11103 # with or without modifications, as long as this notice is preserved.
11104
11105 # _AM_PROG_TAR(FORMAT)
11106 # --------------------
11107 # Check how to create a tarball in format FORMAT.
11108 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
11109 #
11110 # Substitute a variable $(am__tar) that is a command
11111 # writing to stdout a FORMAT-tarball containing the directory
11112 # $tardir.
11113 #     tardir=directory && $(am__tar) > result.tar
11114 #
11115 # Substitute a variable $(am__untar) that extract such
11116 # a tarball read from stdin.
11117 #     $(am__untar) < result.tar
11118 #
11119 AC_DEFUN([_AM_PROG_TAR],
11120 [# Always define AMTAR for backward compatibility.  Yes, it's still used
11121 # in the wild :-(  We should find a proper way to deprecate it ...
11122 AC_SUBST([AMTAR], ['$${TAR-tar}'])
11123
11124 # We'll loop over all known methods to create a tar archive until one works.
11125 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
11126
11127 m4_if([$1], [v7],
11128   [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
11129
11130   [m4_case([$1],
11131     [ustar],
11132      [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
11133       # There is notably a 21 bits limit for the UID and the GID.  In fact,
11134       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
11135       # and bug#13588).
11136       am_max_uid=2097151 # 2^21 - 1
11137       am_max_gid=$am_max_uid
11138       # The $UID and $GID variables are not portable, so we need to resort
11139       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
11140       # below are definitely unexpected, so allow the users to see them
11141       # (that is, avoid stderr redirection).
11142       am_uid=`id -u || echo unknown`
11143       am_gid=`id -g || echo unknown`
11144       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
11145       if test $am_uid -le $am_max_uid; then
11146          AC_MSG_RESULT([yes])
11147       else
11148          AC_MSG_RESULT([no])
11149          _am_tools=none
11150       fi
11151       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
11152       if test $am_gid -le $am_max_gid; then
11153          AC_MSG_RESULT([yes])
11154       else
11155         AC_MSG_RESULT([no])
11156         _am_tools=none
11157       fi],
11158
11159   [pax],
11160     [],
11161
11162   [m4_fatal([Unknown tar format])])
11163
11164   AC_MSG_CHECKING([how to create a $1 tar archive])
11165
11166   # Go ahead even if we have the value already cached.  We do so because we
11167   # need to set the values for the 'am__tar' and 'am__untar' variables.
11168   _am_tools=${am_cv_prog_tar_$1-$_am_tools}
11169
11170   for _am_tool in $_am_tools; do
11171     case $_am_tool in
11172     gnutar)
11173       for _am_tar in tar gnutar gtar; do
11174         AM_RUN_LOG([$_am_tar --version]) && break
11175       done
11176       am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
11177       am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
11178       am__untar="$_am_tar -xf -"
11179       ;;
11180     plaintar)
11181       # Must skip GNU tar: if it does not support --format= it doesn't create
11182       # ustar tarball either.
11183       (tar --version) >/dev/null 2>&1 && continue
11184       am__tar='tar chf - "$$tardir"'
11185       am__tar_='tar chf - "$tardir"'
11186       am__untar='tar xf -'
11187       ;;
11188     pax)
11189       am__tar='pax -L -x $1 -w "$$tardir"'
11190       am__tar_='pax -L -x $1 -w "$tardir"'
11191       am__untar='pax -r'
11192       ;;
11193     cpio)
11194       am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11195       am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11196       am__untar='cpio -i -H $1 -d'
11197       ;;
11198     none)
11199       am__tar=false
11200       am__tar_=false
11201       am__untar=false
11202       ;;
11203     esac
11204
11205     # If the value was cached, stop now.  We just wanted to have am__tar
11206     # and am__untar set.
11207     test -n "${am_cv_prog_tar_$1}" && break
11208
11209     # tar/untar a dummy directory, and stop if the command works.
11210     rm -rf conftest.dir
11211     mkdir conftest.dir
11212     echo GrepMe > conftest.dir/file
11213     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
11214     rm -rf conftest.dir
11215     if test -s conftest.tar; then
11216       AM_RUN_LOG([$am__untar <conftest.tar])
11217       AM_RUN_LOG([cat conftest.dir/file])
11218       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
11219     fi
11220   done
11221   rm -rf conftest.dir
11222
11223   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11224   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
11225
11226 AC_SUBST([am__tar])
11227 AC_SUBST([am__untar])
11228 ]) # _AM_PROG_TAR
11229