Uploaded initial version.
[guivpn] / trunk / vpngui / aclocal.m4
1 # generated automatically by aclocal 1.8.5 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
15 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
16 #
17 # This file is free software, distributed under the terms of the GNU
18 # General Public License.  As a special exception to the GNU General
19 # Public License, this file may be distributed as part of a program
20 # that contains a configuration script generated by Autoconf, under
21 # the same distribution terms as the rest of that program.
22 #
23 # This file can be copied and used freely without restrictions.  It can
24 # be used in projects which are not available under the GNU Public License
25 # but which still want to provide support for the GNU gettext functionality.
26 #
27 # Macro to add for using GNU gettext.
28 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
29 #
30 # Modified to never use included libintl. 
31 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
32 #
33 # Major rework to remove unused code
34 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
35 #
36 # Added better handling of ALL_LINGUAS from GNU gettext version 
37 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
38 #
39 # Modified to require ngettext
40 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
41 #
42 # We need this here as well, since someone might use autoconf-2.5x
43 # to configure GLib then an older version to configure a package
44 # using AM_GLIB_GNU_GETTEXT
45 AC_PREREQ(2.53)
46
47 dnl
48 dnl We go to great lengths to make sure that aclocal won't 
49 dnl try to pull in the installed version of these macros
50 dnl when running aclocal in the glib directory.
51 dnl
52 m4_copy([AC_DEFUN],[glib_DEFUN])
53 m4_copy([AC_REQUIRE],[glib_REQUIRE])
54 dnl
55 dnl At the end, if we're not within glib, we'll define the public
56 dnl definitions in terms of our private definitions.
57 dnl
58
59 # GLIB_LC_MESSAGES
60 #--------------------
61 glib_DEFUN([GLIB_LC_MESSAGES],
62   [AC_CHECK_HEADERS([locale.h])
63     if test $ac_cv_header_locale_h = yes; then
64     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
65       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
66        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
67     if test $am_cv_val_LC_MESSAGES = yes; then
68       AC_DEFINE(HAVE_LC_MESSAGES, 1,
69         [Define if your <locale.h> file defines LC_MESSAGES.])
70     fi
71   fi])
72
73 # GLIB_PATH_PROG_WITH_TEST
74 #----------------------------
75 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
76 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
77 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
78 [# Extract the first word of "$2", so it can be a program name with args.
79 set dummy $2; ac_word=[$]2
80 AC_MSG_CHECKING([for $ac_word])
81 AC_CACHE_VAL(ac_cv_path_$1,
82 [case "[$]$1" in
83   /*)
84   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
85   ;;
86   *)
87   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
88   for ac_dir in ifelse([$5], , $PATH, [$5]); do
89     test -z "$ac_dir" && ac_dir=.
90     if test -f $ac_dir/$ac_word; then
91       if [$3]; then
92         ac_cv_path_$1="$ac_dir/$ac_word"
93         break
94       fi
95     fi
96   done
97   IFS="$ac_save_ifs"
98 dnl If no 4th arg is given, leave the cache variable unset,
99 dnl so AC_PATH_PROGS will keep looking.
100 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
101 ])dnl
102   ;;
103 esac])dnl
104 $1="$ac_cv_path_$1"
105 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
106   AC_MSG_RESULT([$]$1)
107 else
108   AC_MSG_RESULT(no)
109 fi
110 AC_SUBST($1)dnl
111 ])
112
113 # GLIB_WITH_NLS
114 #-----------------
115 glib_DEFUN([GLIB_WITH_NLS],
116   dnl NLS is obligatory
117   [USE_NLS=yes
118     AC_SUBST(USE_NLS)
119
120     gt_cv_have_gettext=no
121
122     CATOBJEXT=NONE
123     XGETTEXT=:
124     INTLLIBS=
125
126     AC_CHECK_HEADER(libintl.h,
127      [gt_cv_func_dgettext_libintl="no"
128       libintl_extra_libs=""
129
130       #
131       # First check in libc
132       #
133       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
134         [AC_TRY_LINK([
135 #include <libintl.h>
136 ],
137          [return !ngettext ("","", 1)],
138           gt_cv_func_ngettext_libc=yes,
139           gt_cv_func_ngettext_libc=no)
140         ])
141   
142       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
143               AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
144                 [AC_TRY_LINK([
145 #include <libintl.h>
146 ],
147                   [return !dgettext ("","")],
148                   gt_cv_func_dgettext_libc=yes,
149                   gt_cv_func_dgettext_libc=no)
150                 ])
151       fi
152   
153       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
154         AC_CHECK_FUNCS(bind_textdomain_codeset)
155       fi
156
157       #
158       # If we don't have everything we want, check in libintl
159       #
160       if test "$gt_cv_func_dgettext_libc" != "yes" \
161          || test "$gt_cv_func_ngettext_libc" != "yes" \
162          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
163         
164         AC_CHECK_LIB(intl, bindtextdomain,
165             [AC_CHECK_LIB(intl, ngettext,
166                     [AC_CHECK_LIB(intl, dgettext,
167                                   gt_cv_func_dgettext_libintl=yes)])])
168
169         if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
170           AC_MSG_CHECKING([if -liconv is needed to use gettext])
171           AC_MSG_RESULT([])
172           AC_CHECK_LIB(intl, ngettext,
173                 [AC_CHECK_LIB(intl, dcgettext,
174                        [gt_cv_func_dgettext_libintl=yes
175                         libintl_extra_libs=-liconv],
176                         :,-liconv)],
177                 :,-liconv)
178         fi
179
180         #
181         # If we found libintl, then check in it for bind_textdomain_codeset();
182         # we'll prefer libc if neither have bind_textdomain_codeset(),
183         # and both have dgettext and ngettext
184         #
185         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
186           glib_save_LIBS="$LIBS"
187           LIBS="$LIBS -lintl $libintl_extra_libs"
188           unset ac_cv_func_bind_textdomain_codeset
189           AC_CHECK_FUNCS(bind_textdomain_codeset)
190           LIBS="$glib_save_LIBS"
191
192           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
193             gt_cv_func_dgettext_libc=no
194           else
195             if test "$gt_cv_func_dgettext_libc" = "yes" \
196                 && test "$gt_cv_func_ngettext_libc" = "yes"; then
197               gt_cv_func_dgettext_libintl=no
198             fi
199           fi
200         fi
201       fi
202
203       if test "$gt_cv_func_dgettext_libc" = "yes" \
204         || test "$gt_cv_func_dgettext_libintl" = "yes"; then
205         gt_cv_have_gettext=yes
206       fi
207   
208       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
209         INTLLIBS="-lintl $libintl_extra_libs"
210       fi
211   
212       if test "$gt_cv_have_gettext" = "yes"; then
213         AC_DEFINE(HAVE_GETTEXT,1,
214           [Define if the GNU gettext() function is already present or preinstalled.])
215         GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
216           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
217         if test "$MSGFMT" != "no"; then
218           glib_save_LIBS="$LIBS"
219           LIBS="$LIBS $INTLLIBS"
220           AC_CHECK_FUNCS(dcgettext)
221           MSGFMT_OPTS=
222           AC_MSG_CHECKING([if msgfmt accepts -c])
223           GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
224 msgid ""
225 msgstr ""
226 "Content-Type: text/plain; charset=UTF-8\n"
227 "Project-Id-Version: test 1.0\n"
228 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
229 "Last-Translator: test <foo@bar.xx>\n"
230 "Language-Team: C <LL@li.org>\n"
231 "MIME-Version: 1.0\n"
232 "Content-Transfer-Encoding: 8bit\n"
233 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
234           AC_SUBST(MSGFMT_OPTS)
235           AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
236           GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
237             [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
238           AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
239                          return _nl_msg_cat_cntr],
240             [CATOBJEXT=.gmo 
241              DATADIRNAME=share],
242             [case $host in
243             *-*-solaris*)
244             dnl On Solaris, if bind_textdomain_codeset is in libc,
245             dnl GNU format message catalog is always supported,
246             dnl since both are added to the libc all together.
247             dnl Hence, we'd like to go with DATADIRNAME=share and
248             dnl and CATOBJEXT=.gmo in this case.
249             AC_CHECK_FUNC(bind_textdomain_codeset,
250               [CATOBJEXT=.gmo 
251                DATADIRNAME=share],
252               [CATOBJEXT=.mo
253                DATADIRNAME=lib])
254             ;;
255             *)
256             CATOBJEXT=.mo
257             DATADIRNAME=lib
258             ;;
259             esac])
260           LIBS="$glib_save_LIBS"
261           INSTOBJEXT=.mo
262         else
263           gt_cv_have_gettext=no
264         fi
265       fi
266     ])
267
268     if test "$gt_cv_have_gettext" = "yes" ; then
269       AC_DEFINE(ENABLE_NLS, 1,
270         [always defined to indicate that i18n is enabled])
271     fi
272
273     dnl Test whether we really found GNU xgettext.
274     if test "$XGETTEXT" != ":"; then
275       dnl If it is not GNU xgettext we define it as : so that the
276       dnl Makefiles still can work.
277       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
278         : ;
279       else
280         AC_MSG_RESULT(
281           [found xgettext program is not GNU xgettext; ignore it])
282         XGETTEXT=":"
283       fi
284     fi
285
286     # We need to process the po/ directory.
287     POSUB=po
288
289     AC_OUTPUT_COMMANDS(
290       [case "$CONFIG_FILES" in *po/Makefile.in*)
291         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
292       esac])
293
294     dnl These rules are solely for the distribution goal.  While doing this
295     dnl we only have to keep exactly one list of the available catalogs
296     dnl in configure.in.
297     for lang in $ALL_LINGUAS; do
298       GMOFILES="$GMOFILES $lang.gmo"
299       POFILES="$POFILES $lang.po"
300     done
301
302     dnl Make all variables we use known to autoconf.
303     AC_SUBST(CATALOGS)
304     AC_SUBST(CATOBJEXT)
305     AC_SUBST(DATADIRNAME)
306     AC_SUBST(GMOFILES)
307     AC_SUBST(INSTOBJEXT)
308     AC_SUBST(INTLLIBS)
309     AC_SUBST(PO_IN_DATADIR_TRUE)
310     AC_SUBST(PO_IN_DATADIR_FALSE)
311     AC_SUBST(POFILES)
312     AC_SUBST(POSUB)
313   ])
314
315 # AM_GLIB_GNU_GETTEXT
316 # -------------------
317 # Do checks necessary for use of gettext. If a suitable implementation 
318 # of gettext is found in either in libintl or in the C library,
319 # it will set INTLLIBS to the libraries needed for use of gettext
320 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
321 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
322 # on various variables needed by the Makefile.in.in installed by 
323 # glib-gettextize.
324 dnl
325 glib_DEFUN([GLIB_GNU_GETTEXT],
326   [AC_REQUIRE([AC_PROG_CC])dnl
327    AC_REQUIRE([AC_HEADER_STDC])dnl
328    
329    GLIB_LC_MESSAGES
330    GLIB_WITH_NLS
331
332    if test "$gt_cv_have_gettext" = "yes"; then
333      if test "x$ALL_LINGUAS" = "x"; then
334        LINGUAS=
335      else
336        AC_MSG_CHECKING(for catalogs to be installed)
337        NEW_LINGUAS=
338        for presentlang in $ALL_LINGUAS; do
339          useit=no
340          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
341            desiredlanguages="$LINGUAS"
342          else
343            desiredlanguages="$ALL_LINGUAS"
344          fi
345          for desiredlang in $desiredlanguages; do
346            # Use the presentlang catalog if desiredlang is
347            #   a. equal to presentlang, or
348            #   b. a variant of presentlang (because in this case,
349            #      presentlang can be used as a fallback for messages
350            #      which are not translated in the desiredlang catalog).
351            case "$desiredlang" in
352              "$presentlang"*) useit=yes;;
353            esac
354          done
355          if test $useit = yes; then
356            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
357          fi
358        done
359        LINGUAS=$NEW_LINGUAS
360        AC_MSG_RESULT($LINGUAS)
361      fi
362
363      dnl Construct list of names of catalog files to be constructed.
364      if test -n "$LINGUAS"; then
365        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
366      fi
367    fi
368
369    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
370    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
371    dnl Try to locate is.
372    MKINSTALLDIRS=
373    if test -n "$ac_aux_dir"; then
374      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
375    fi
376    if test -z "$MKINSTALLDIRS"; then
377      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
378    fi
379    AC_SUBST(MKINSTALLDIRS)
380
381    dnl Generate list of files to be processed by xgettext which will
382    dnl be included in po/Makefile.
383    test -d po || mkdir po
384    if test "x$srcdir" != "x."; then
385      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
386        posrcprefix="$srcdir/"
387      else
388        posrcprefix="../$srcdir/"
389      fi
390    else
391      posrcprefix="../"
392    fi
393    rm -f po/POTFILES
394    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
395         < $srcdir/po/POTFILES.in > po/POTFILES
396   ])
397
398 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
399 # -------------------------------
400 # Define VARIABLE to the location where catalog files will
401 # be installed by po/Makefile.
402 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
403 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
404 glib_save_prefix="$prefix"
405 glib_save_exec_prefix="$exec_prefix"
406 glib_save_datarootdir="$datarootdir"
407 test "x$prefix" = xNONE && prefix=$ac_default_prefix
408 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
409 datarootdir=`eval echo "${datarootdir}"`
410 if test "x$CATOBJEXT" = "x.mo" ; then
411   localedir=`eval echo "${libdir}/locale"`
412 else
413   localedir=`eval echo "${datadir}/locale"`
414 fi
415 prefix="$glib_save_prefix"
416 exec_prefix="$glib_save_exec_prefix"
417 datarootdir="$glib_save_datarootdir"
418 AC_DEFINE_UNQUOTED($1, "$localedir",
419   [Define the location where the catalogs will be installed])
420 ])
421
422 dnl
423 dnl Now the definitions that aclocal will find
424 dnl
425 ifdef(glib_configure_in,[],[
426 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
427 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
428 ])dnl
429
430 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
431
432 # Create a temporary file with TEST-FILE as its contents and pass the
433 # file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
434 # 0 and perform ACTION-IF-FAIL for any other exit status.
435 AC_DEFUN([GLIB_RUN_PROG],
436 [cat >conftest.foo <<_ACEOF
437 $2
438 _ACEOF
439 if AC_RUN_LOG([$1 conftest.foo]); then
440   m4_ifval([$3], [$3], [:])
441 m4_ifvaln([$4], [else $4])dnl
442 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
443 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
444 fi])
445
446
447 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
448
449 # serial 47 AC_PROG_LIBTOOL
450
451
452 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
453 # -----------------------------------------------------------
454 # If this macro is not defined by Autoconf, define it here.
455 m4_ifdef([AC_PROVIDE_IFELSE],
456          [],
457          [m4_define([AC_PROVIDE_IFELSE],
458                  [m4_ifdef([AC_PROVIDE_$1],
459                            [$2], [$3])])])
460
461
462 # AC_PROG_LIBTOOL
463 # ---------------
464 AC_DEFUN([AC_PROG_LIBTOOL],
465 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
466 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
467 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
468   AC_PROVIDE_IFELSE([AC_PROG_CXX],
469     [AC_LIBTOOL_CXX],
470     [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
471   ])])
472 dnl And a similar setup for Fortran 77 support
473   AC_PROVIDE_IFELSE([AC_PROG_F77],
474     [AC_LIBTOOL_F77],
475     [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
476 ])])
477
478 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
479 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
480 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
481   AC_PROVIDE_IFELSE([AC_PROG_GCJ],
482     [AC_LIBTOOL_GCJ],
483     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
484       [AC_LIBTOOL_GCJ],
485       [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
486         [AC_LIBTOOL_GCJ],
487       [ifdef([AC_PROG_GCJ],
488              [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
489        ifdef([A][M_PROG_GCJ],
490              [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
491        ifdef([LT_AC_PROG_GCJ],
492              [define([LT_AC_PROG_GCJ],
493                 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
494 ])])# AC_PROG_LIBTOOL
495
496
497 # _AC_PROG_LIBTOOL
498 # ----------------
499 AC_DEFUN([_AC_PROG_LIBTOOL],
500 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
501 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
502 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
503 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
504
505 # This can be used to rebuild libtool when needed
506 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
507
508 # Always use our own libtool.
509 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
510 AC_SUBST(LIBTOOL)dnl
511
512 # Prevent multiple expansion
513 define([AC_PROG_LIBTOOL], [])
514 ])# _AC_PROG_LIBTOOL
515
516
517 # AC_LIBTOOL_SETUP
518 # ----------------
519 AC_DEFUN([AC_LIBTOOL_SETUP],
520 [AC_PREREQ(2.50)dnl
521 AC_REQUIRE([AC_ENABLE_SHARED])dnl
522 AC_REQUIRE([AC_ENABLE_STATIC])dnl
523 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
524 AC_REQUIRE([AC_CANONICAL_HOST])dnl
525 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
526 AC_REQUIRE([AC_PROG_CC])dnl
527 AC_REQUIRE([AC_PROG_LD])dnl
528 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
529 AC_REQUIRE([AC_PROG_NM])dnl
530
531 AC_REQUIRE([AC_PROG_LN_S])dnl
532 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
533 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
534 AC_REQUIRE([AC_OBJEXT])dnl
535 AC_REQUIRE([AC_EXEEXT])dnl
536 dnl
537
538 AC_LIBTOOL_SYS_MAX_CMD_LEN
539 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
540 AC_LIBTOOL_OBJDIR
541
542 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
543 _LT_AC_PROG_ECHO_BACKSLASH
544
545 case $host_os in
546 aix3*)
547   # AIX sometimes has problems with the GCC collect2 program.  For some
548   # reason, if we set the COLLECT_NAMES environment variable, the problems
549   # vanish in a puff of smoke.
550   if test "X${COLLECT_NAMES+set}" != Xset; then
551     COLLECT_NAMES=
552     export COLLECT_NAMES
553   fi
554   ;;
555 esac
556
557 # Sed substitution that helps us do robust quoting.  It backslashifies
558 # metacharacters that are still active within double-quoted strings.
559 Xsed='sed -e 1s/^X//'
560 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
561
562 # Same as above, but do not quote variable references.
563 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
564
565 # Sed substitution to delay expansion of an escaped shell variable in a
566 # double_quote_subst'ed string.
567 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
568
569 # Sed substitution to avoid accidental globbing in evaled expressions
570 no_glob_subst='s/\*/\\\*/g'
571
572 # Constants:
573 rm="rm -f"
574
575 # Global variables:
576 default_ofile=libtool
577 can_build_shared=yes
578
579 # All known linkers require a `.a' archive for static linking (except MSVC,
580 # which needs '.lib').
581 libext=a
582 ltmain="$ac_aux_dir/ltmain.sh"
583 ofile="$default_ofile"
584 with_gnu_ld="$lt_cv_prog_gnu_ld"
585
586 AC_CHECK_TOOL(AR, ar, false)
587 AC_CHECK_TOOL(RANLIB, ranlib, :)
588 AC_CHECK_TOOL(STRIP, strip, :)
589
590 old_CC="$CC"
591 old_CFLAGS="$CFLAGS"
592
593 # Set sane defaults for various variables
594 test -z "$AR" && AR=ar
595 test -z "$AR_FLAGS" && AR_FLAGS=cru
596 test -z "$AS" && AS=as
597 test -z "$CC" && CC=cc
598 test -z "$LTCC" && LTCC=$CC
599 test -z "$DLLTOOL" && DLLTOOL=dlltool
600 test -z "$LD" && LD=ld
601 test -z "$LN_S" && LN_S="ln -s"
602 test -z "$MAGIC_CMD" && MAGIC_CMD=file
603 test -z "$NM" && NM=nm
604 test -z "$SED" && SED=sed
605 test -z "$OBJDUMP" && OBJDUMP=objdump
606 test -z "$RANLIB" && RANLIB=:
607 test -z "$STRIP" && STRIP=:
608 test -z "$ac_objext" && ac_objext=o
609
610 # Determine commands to create old-style static archives.
611 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
612 old_postinstall_cmds='chmod 644 $oldlib'
613 old_postuninstall_cmds=
614
615 if test -n "$RANLIB"; then
616   case $host_os in
617   openbsd*)
618     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
619     ;;
620   *)
621     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
622     ;;
623   esac
624   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
625 fi
626
627 _LT_CC_BASENAME([$compiler])
628
629 # Only perform the check for file, if the check method requires it
630 case $deplibs_check_method in
631 file_magic*)
632   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
633     AC_PATH_MAGIC
634   fi
635   ;;
636 esac
637
638 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
639 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
640 enable_win32_dll=yes, enable_win32_dll=no)
641
642 AC_ARG_ENABLE([libtool-lock],
643     [AC_HELP_STRING([--disable-libtool-lock],
644         [avoid locking (might break parallel builds)])])
645 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
646
647 AC_ARG_WITH([pic],
648     [AC_HELP_STRING([--with-pic],
649         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
650     [pic_mode="$withval"],
651     [pic_mode=default])
652 test -z "$pic_mode" && pic_mode=default
653
654 # Use C for the default configuration in the libtool script
655 tagname=
656 AC_LIBTOOL_LANG_C_CONFIG
657 _LT_AC_TAGCONFIG
658 ])# AC_LIBTOOL_SETUP
659
660
661 # _LT_AC_SYS_COMPILER
662 # -------------------
663 AC_DEFUN([_LT_AC_SYS_COMPILER],
664 [AC_REQUIRE([AC_PROG_CC])dnl
665
666 # If no C compiler was specified, use CC.
667 LTCC=${LTCC-"$CC"}
668
669 # Allow CC to be a program name with arguments.
670 compiler=$CC
671 ])# _LT_AC_SYS_COMPILER
672
673
674 # _LT_CC_BASENAME(CC)
675 # -------------------
676 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
677 AC_DEFUN([_LT_CC_BASENAME],
678 [for cc_temp in $1""; do
679   case $cc_temp in
680     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
681     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
682     \-*) ;;
683     *) break;;
684   esac
685 done
686 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
687 ])
688
689
690 # _LT_COMPILER_BOILERPLATE
691 # ------------------------
692 # Check for compiler boilerplate output or warnings with
693 # the simple compiler test code.
694 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
695 [ac_outfile=conftest.$ac_objext
696 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
697 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
698 _lt_compiler_boilerplate=`cat conftest.err`
699 $rm conftest*
700 ])# _LT_COMPILER_BOILERPLATE
701
702
703 # _LT_LINKER_BOILERPLATE
704 # ----------------------
705 # Check for linker boilerplate output or warnings with
706 # the simple link test code.
707 AC_DEFUN([_LT_LINKER_BOILERPLATE],
708 [ac_outfile=conftest.$ac_objext
709 printf "$lt_simple_link_test_code" >conftest.$ac_ext
710 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
711 _lt_linker_boilerplate=`cat conftest.err`
712 $rm conftest*
713 ])# _LT_LINKER_BOILERPLATE
714
715
716 # _LT_AC_SYS_LIBPATH_AIX
717 # ----------------------
718 # Links a minimal program and checks the executable
719 # for the system default hardcoded library path. In most cases,
720 # this is /usr/lib:/lib, but when the MPI compilers are used
721 # the location of the communication and MPI libs are included too.
722 # If we don't find anything, use the default library path according
723 # to the aix ld manual.
724 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
725 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
726 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
727 }'`
728 # Check for a 64-bit object if we didn't find anything.
729 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
730 }'`; fi],[])
731 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
732 ])# _LT_AC_SYS_LIBPATH_AIX
733
734
735 # _LT_AC_SHELL_INIT(ARG)
736 # ----------------------
737 AC_DEFUN([_LT_AC_SHELL_INIT],
738 [ifdef([AC_DIVERSION_NOTICE],
739              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
740          [AC_DIVERT_PUSH(NOTICE)])
741 $1
742 AC_DIVERT_POP
743 ])# _LT_AC_SHELL_INIT
744
745
746 # _LT_AC_PROG_ECHO_BACKSLASH
747 # --------------------------
748 # Add some code to the start of the generated configure script which
749 # will find an echo command which doesn't interpret backslashes.
750 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
751 [_LT_AC_SHELL_INIT([
752 # Check that we are running under the correct shell.
753 SHELL=${CONFIG_SHELL-/bin/sh}
754
755 case X$ECHO in
756 X*--fallback-echo)
757   # Remove one level of quotation (which was required for Make).
758   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
759   ;;
760 esac
761
762 echo=${ECHO-echo}
763 if test "X[$]1" = X--no-reexec; then
764   # Discard the --no-reexec flag, and continue.
765   shift
766 elif test "X[$]1" = X--fallback-echo; then
767   # Avoid inline document here, it may be left over
768   :
769 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
770   # Yippee, $echo works!
771   :
772 else
773   # Restart under the correct shell.
774   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
775 fi
776
777 if test "X[$]1" = X--fallback-echo; then
778   # used as fallback echo
779   shift
780   cat <<EOF
781 [$]*
782 EOF
783   exit 0
784 fi
785
786 # The HP-UX ksh and POSIX shell print the target directory to stdout
787 # if CDPATH is set.
788 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
789
790 if test -z "$ECHO"; then
791 if test "X${echo_test_string+set}" != Xset; then
792 # find a string as large as possible, as long as the shell can cope with it
793   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
794     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
795     if (echo_test_string=`eval $cmd`) 2>/dev/null &&
796        echo_test_string=`eval $cmd` &&
797        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
798     then
799       break
800     fi
801   done
802 fi
803
804 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
805    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
806    test "X$echo_testing_string" = "X$echo_test_string"; then
807   :
808 else
809   # The Solaris, AIX, and Digital Unix default echo programs unquote
810   # backslashes.  This makes it impossible to quote backslashes using
811   #   echo "$something" | sed 's/\\/\\\\/g'
812   #
813   # So, first we look for a working echo in the user's PATH.
814
815   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
816   for dir in $PATH /usr/ucb; do
817     IFS="$lt_save_ifs"
818     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
819        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
820        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
821        test "X$echo_testing_string" = "X$echo_test_string"; then
822       echo="$dir/echo"
823       break
824     fi
825   done
826   IFS="$lt_save_ifs"
827
828   if test "X$echo" = Xecho; then
829     # We didn't find a better echo, so look for alternatives.
830     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
831        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
832        test "X$echo_testing_string" = "X$echo_test_string"; then
833       # This shell has a builtin print -r that does the trick.
834       echo='print -r'
835     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
836          test "X$CONFIG_SHELL" != X/bin/ksh; then
837       # If we have ksh, try running configure again with it.
838       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
839       export ORIGINAL_CONFIG_SHELL
840       CONFIG_SHELL=/bin/ksh
841       export CONFIG_SHELL
842       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
843     else
844       # Try using printf.
845       echo='printf %s\n'
846       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
847          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
848          test "X$echo_testing_string" = "X$echo_test_string"; then
849         # Cool, printf works
850         :
851       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
852            test "X$echo_testing_string" = 'X\t' &&
853            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
854            test "X$echo_testing_string" = "X$echo_test_string"; then
855         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
856         export CONFIG_SHELL
857         SHELL="$CONFIG_SHELL"
858         export SHELL
859         echo="$CONFIG_SHELL [$]0 --fallback-echo"
860       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
861            test "X$echo_testing_string" = 'X\t' &&
862            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
863            test "X$echo_testing_string" = "X$echo_test_string"; then
864         echo="$CONFIG_SHELL [$]0 --fallback-echo"
865       else
866         # maybe with a smaller string...
867         prev=:
868
869         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
870           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
871           then
872             break
873           fi
874           prev="$cmd"
875         done
876
877         if test "$prev" != 'sed 50q "[$]0"'; then
878           echo_test_string=`eval $prev`
879           export echo_test_string
880           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
881         else
882           # Oops.  We lost completely, so just stick with echo.
883           echo=echo
884         fi
885       fi
886     fi
887   fi
888 fi
889 fi
890
891 # Copy echo and quote the copy suitably for passing to libtool from
892 # the Makefile, instead of quoting the original, which is used later.
893 ECHO=$echo
894 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
895    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
896 fi
897
898 AC_SUBST(ECHO)
899 ])])# _LT_AC_PROG_ECHO_BACKSLASH
900
901
902 # _LT_AC_LOCK
903 # -----------
904 AC_DEFUN([_LT_AC_LOCK],
905 [AC_ARG_ENABLE([libtool-lock],
906     [AC_HELP_STRING([--disable-libtool-lock],
907         [avoid locking (might break parallel builds)])])
908 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
909
910 # Some flags need to be propagated to the compiler or linker for good
911 # libtool support.
912 case $host in
913 ia64-*-hpux*)
914   # Find out which ABI we are using.
915   echo 'int i;' > conftest.$ac_ext
916   if AC_TRY_EVAL(ac_compile); then
917     case `/usr/bin/file conftest.$ac_objext` in
918     *ELF-32*)
919       HPUX_IA64_MODE="32"
920       ;;
921     *ELF-64*)
922       HPUX_IA64_MODE="64"
923       ;;
924     esac
925   fi
926   rm -rf conftest*
927   ;;
928 *-*-irix6*)
929   # Find out which ABI we are using.
930   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
931   if AC_TRY_EVAL(ac_compile); then
932    if test "$lt_cv_prog_gnu_ld" = yes; then
933     case `/usr/bin/file conftest.$ac_objext` in
934     *32-bit*)
935       LD="${LD-ld} -melf32bsmip"
936       ;;
937     *N32*)
938       LD="${LD-ld} -melf32bmipn32"
939       ;;
940     *64-bit*)
941       LD="${LD-ld} -melf64bmip"
942       ;;
943     esac
944    else
945     case `/usr/bin/file conftest.$ac_objext` in
946     *32-bit*)
947       LD="${LD-ld} -32"
948       ;;
949     *N32*)
950       LD="${LD-ld} -n32"
951       ;;
952     *64-bit*)
953       LD="${LD-ld} -64"
954       ;;
955     esac
956    fi
957   fi
958   rm -rf conftest*
959   ;;
960
961 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
962   # Find out which ABI we are using.
963   echo 'int i;' > conftest.$ac_ext
964   if AC_TRY_EVAL(ac_compile); then
965     case `/usr/bin/file conftest.o` in
966     *32-bit*)
967       case $host in
968         x86_64-*linux*)
969           LD="${LD-ld} -m elf_i386"
970           ;;
971         ppc64-*linux*|powerpc64-*linux*)
972           LD="${LD-ld} -m elf32ppclinux"
973           ;;
974         s390x-*linux*)
975           LD="${LD-ld} -m elf_s390"
976           ;;
977         sparc64-*linux*)
978           LD="${LD-ld} -m elf32_sparc"
979           ;;
980       esac
981       ;;
982     *64-bit*)
983       case $host in
984         x86_64-*linux*)
985           LD="${LD-ld} -m elf_x86_64"
986           ;;
987         ppc*-*linux*|powerpc*-*linux*)
988           LD="${LD-ld} -m elf64ppc"
989           ;;
990         s390*-*linux*)
991           LD="${LD-ld} -m elf64_s390"
992           ;;
993         sparc*-*linux*)
994           LD="${LD-ld} -m elf64_sparc"
995           ;;
996       esac
997       ;;
998     esac
999   fi
1000   rm -rf conftest*
1001   ;;
1002
1003 *-*-sco3.2v5*)
1004   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1005   SAVE_CFLAGS="$CFLAGS"
1006   CFLAGS="$CFLAGS -belf"
1007   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1008     [AC_LANG_PUSH(C)
1009      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1010      AC_LANG_POP])
1011   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1012     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1013     CFLAGS="$SAVE_CFLAGS"
1014   fi
1015   ;;
1016 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1017 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1018   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1019   AC_CHECK_TOOL(AS, as, false)
1020   AC_CHECK_TOOL(OBJDUMP, objdump, false)
1021   ;;
1022   ])
1023 esac
1024
1025 need_locks="$enable_libtool_lock"
1026
1027 ])# _LT_AC_LOCK
1028
1029
1030 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1031 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1032 # ----------------------------------------------------------------
1033 # Check whether the given compiler option works
1034 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1035 [AC_REQUIRE([LT_AC_PROG_SED])
1036 AC_CACHE_CHECK([$1], [$2],
1037   [$2=no
1038   ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1039    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1040    lt_compiler_flag="$3"
1041    # Insert the option either (1) after the last *FLAGS variable, or
1042    # (2) before a word containing "conftest.", or (3) at the end.
1043    # Note that $ac_compile itself does not contain backslashes and begins
1044    # with a dollar sign (not a hyphen), so the echo should work correctly.
1045    # The option is referenced via a variable to avoid confusing sed.
1046    lt_compile=`echo "$ac_compile" | $SED \
1047    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1048    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1049    -e 's:$: $lt_compiler_flag:'`
1050    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1051    (eval "$lt_compile" 2>conftest.err)
1052    ac_status=$?
1053    cat conftest.err >&AS_MESSAGE_LOG_FD
1054    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1055    if (exit $ac_status) && test -s "$ac_outfile"; then
1056      # The compiler can only warn and ignore the option if not recognized
1057      # So say no if there are warnings other than the usual output.
1058      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
1059      $SED '/^$/d' conftest.err >conftest.er2
1060      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
1061        $2=yes
1062      fi
1063    fi
1064    $rm conftest*
1065 ])
1066
1067 if test x"[$]$2" = xyes; then
1068     ifelse([$5], , :, [$5])
1069 else
1070     ifelse([$6], , :, [$6])
1071 fi
1072 ])# AC_LIBTOOL_COMPILER_OPTION
1073
1074
1075 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1076 #                          [ACTION-SUCCESS], [ACTION-FAILURE])
1077 # ------------------------------------------------------------
1078 # Check whether the given compiler option works
1079 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1080 [AC_CACHE_CHECK([$1], [$2],
1081   [$2=no
1082    save_LDFLAGS="$LDFLAGS"
1083    LDFLAGS="$LDFLAGS $3"
1084    printf "$lt_simple_link_test_code" > conftest.$ac_ext
1085    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1086      # The linker can only warn and ignore the option if not recognized
1087      # So say no if there are warnings
1088      if test -s conftest.err; then
1089        # Append any errors to the config.log.
1090        cat conftest.err 1>&AS_MESSAGE_LOG_FD
1091        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
1092        $SED '/^$/d' conftest.err >conftest.er2
1093        if diff conftest.exp conftest.er2 >/dev/null; then
1094          $2=yes
1095        fi
1096      else
1097        $2=yes
1098      fi
1099    fi
1100    $rm conftest*
1101    LDFLAGS="$save_LDFLAGS"
1102 ])
1103
1104 if test x"[$]$2" = xyes; then
1105     ifelse([$4], , :, [$4])
1106 else
1107     ifelse([$5], , :, [$5])
1108 fi
1109 ])# AC_LIBTOOL_LINKER_OPTION
1110
1111
1112 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1113 # --------------------------
1114 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1115 [# find the maximum length of command line arguments
1116 AC_MSG_CHECKING([the maximum length of command line arguments])
1117 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1118   i=0
1119   teststring="ABCD"
1120
1121   case $build_os in
1122   msdosdjgpp*)
1123     # On DJGPP, this test can blow up pretty badly due to problems in libc
1124     # (any single argument exceeding 2000 bytes causes a buffer overrun
1125     # during glob expansion).  Even if it were fixed, the result of this
1126     # check would be larger than it should be.
1127     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1128     ;;
1129
1130   gnu*)
1131     # Under GNU Hurd, this test is not required because there is
1132     # no limit to the length of command line arguments.
1133     # Libtool will interpret -1 as no limit whatsoever
1134     lt_cv_sys_max_cmd_len=-1;
1135     ;;
1136
1137   cygwin* | mingw*)
1138     # On Win9x/ME, this test blows up -- it succeeds, but takes
1139     # about 5 minutes as the teststring grows exponentially.
1140     # Worse, since 9x/ME are not pre-emptively multitasking,
1141     # you end up with a "frozen" computer, even though with patience
1142     # the test eventually succeeds (with a max line length of 256k).
1143     # Instead, let's just punt: use the minimum linelength reported by
1144     # all of the supported platforms: 8192 (on NT/2K/XP).
1145     lt_cv_sys_max_cmd_len=8192;
1146     ;;
1147
1148   amigaos*)
1149     # On AmigaOS with pdksh, this test takes hours, literally.
1150     # So we just punt and use a minimum line length of 8192.
1151     lt_cv_sys_max_cmd_len=8192;
1152     ;;
1153
1154   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1155     # This has been around since 386BSD, at least.  Likely further.
1156     if test -x /sbin/sysctl; then
1157       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1158     elif test -x /usr/sbin/sysctl; then
1159       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1160     else
1161       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
1162     fi
1163     # And add a safety zone
1164     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1165     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1166     ;;
1167   osf*)
1168     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1169     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1170     # nice to cause kernel panics so lets avoid the loop below.
1171     # First set a reasonable default.
1172     lt_cv_sys_max_cmd_len=16384
1173     #
1174     if test -x /sbin/sysconfig; then
1175       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1176         *1*) lt_cv_sys_max_cmd_len=-1 ;;
1177       esac
1178     fi
1179     ;;
1180   *)
1181     # If test is not a shell built-in, we'll probably end up computing a
1182     # maximum length that is only half of the actual maximum length, but
1183     # we can't tell.
1184     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1185     while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1186                = "XX$teststring") >/dev/null 2>&1 &&
1187             new_result=`expr "X$teststring" : ".*" 2>&1` &&
1188             lt_cv_sys_max_cmd_len=$new_result &&
1189             test $i != 17 # 1/2 MB should be enough
1190     do
1191       i=`expr $i + 1`
1192       teststring=$teststring$teststring
1193     done
1194     teststring=
1195     # Add a significant safety factor because C++ compilers can tack on massive
1196     # amounts of additional arguments before passing them to the linker.
1197     # It appears as though 1/2 is a usable value.
1198     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1199     ;;
1200   esac
1201 ])
1202 if test -n $lt_cv_sys_max_cmd_len ; then
1203   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1204 else
1205   AC_MSG_RESULT(none)
1206 fi
1207 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1208
1209
1210 # _LT_AC_CHECK_DLFCN
1211 # --------------------
1212 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1213 [AC_CHECK_HEADERS(dlfcn.h)dnl
1214 ])# _LT_AC_CHECK_DLFCN
1215
1216
1217 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1218 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1219 # ------------------------------------------------------------------
1220 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1221 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1222 if test "$cross_compiling" = yes; then :
1223   [$4]
1224 else
1225   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1226   lt_status=$lt_dlunknown
1227   cat > conftest.$ac_ext <<EOF
1228 [#line __oline__ "configure"
1229 #include "confdefs.h"
1230
1231 #if HAVE_DLFCN_H
1232 #include <dlfcn.h>
1233 #endif
1234
1235 #include <stdio.h>
1236
1237 #ifdef RTLD_GLOBAL
1238 #  define LT_DLGLOBAL           RTLD_GLOBAL
1239 #else
1240 #  ifdef DL_GLOBAL
1241 #    define LT_DLGLOBAL         DL_GLOBAL
1242 #  else
1243 #    define LT_DLGLOBAL         0
1244 #  endif
1245 #endif
1246
1247 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1248    find out it does not work in some platform. */
1249 #ifndef LT_DLLAZY_OR_NOW
1250 #  ifdef RTLD_LAZY
1251 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
1252 #  else
1253 #    ifdef DL_LAZY
1254 #      define LT_DLLAZY_OR_NOW          DL_LAZY
1255 #    else
1256 #      ifdef RTLD_NOW
1257 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
1258 #      else
1259 #        ifdef DL_NOW
1260 #          define LT_DLLAZY_OR_NOW      DL_NOW
1261 #        else
1262 #          define LT_DLLAZY_OR_NOW      0
1263 #        endif
1264 #      endif
1265 #    endif
1266 #  endif
1267 #endif
1268
1269 #ifdef __cplusplus
1270 extern "C" void exit (int);
1271 #endif
1272
1273 void fnord() { int i=42;}
1274 int main ()
1275 {
1276   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1277   int status = $lt_dlunknown;
1278
1279   if (self)
1280     {
1281       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1282       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1283       /* dlclose (self); */
1284     }
1285
1286     exit (status);
1287 }]
1288 EOF
1289   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1290     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1291     lt_status=$?
1292     case x$lt_status in
1293       x$lt_dlno_uscore) $1 ;;
1294       x$lt_dlneed_uscore) $2 ;;
1295       x$lt_unknown|x*) $3 ;;
1296     esac
1297   else :
1298     # compilation failed
1299     $3
1300   fi
1301 fi
1302 rm -fr conftest*
1303 ])# _LT_AC_TRY_DLOPEN_SELF
1304
1305
1306 # AC_LIBTOOL_DLOPEN_SELF
1307 # -------------------
1308 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1309 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1310 if test "x$enable_dlopen" != xyes; then
1311   enable_dlopen=unknown
1312   enable_dlopen_self=unknown
1313   enable_dlopen_self_static=unknown
1314 else
1315   lt_cv_dlopen=no
1316   lt_cv_dlopen_libs=
1317
1318   case $host_os in
1319   beos*)
1320     lt_cv_dlopen="load_add_on"
1321     lt_cv_dlopen_libs=
1322     lt_cv_dlopen_self=yes
1323     ;;
1324
1325   mingw* | pw32*)
1326     lt_cv_dlopen="LoadLibrary"
1327     lt_cv_dlopen_libs=
1328    ;;
1329
1330   cygwin*)
1331     lt_cv_dlopen="dlopen"
1332     lt_cv_dlopen_libs=
1333    ;;
1334
1335   darwin*)
1336   # if libdl is installed we need to link against it
1337     AC_CHECK_LIB([dl], [dlopen],
1338                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1339     lt_cv_dlopen="dyld"
1340     lt_cv_dlopen_libs=
1341     lt_cv_dlopen_self=yes
1342     ])
1343    ;;
1344
1345   *)
1346     AC_CHECK_FUNC([shl_load],
1347           [lt_cv_dlopen="shl_load"],
1348       [AC_CHECK_LIB([dld], [shl_load],
1349             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1350         [AC_CHECK_FUNC([dlopen],
1351               [lt_cv_dlopen="dlopen"],
1352           [AC_CHECK_LIB([dl], [dlopen],
1353                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1354             [AC_CHECK_LIB([svld], [dlopen],
1355                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1356               [AC_CHECK_LIB([dld], [dld_link],
1357                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1358               ])
1359             ])
1360           ])
1361         ])
1362       ])
1363     ;;
1364   esac
1365
1366   if test "x$lt_cv_dlopen" != xno; then
1367     enable_dlopen=yes
1368   else
1369     enable_dlopen=no
1370   fi
1371
1372   case $lt_cv_dlopen in
1373   dlopen)
1374     save_CPPFLAGS="$CPPFLAGS"
1375     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1376
1377     save_LDFLAGS="$LDFLAGS"
1378     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1379
1380     save_LIBS="$LIBS"
1381     LIBS="$lt_cv_dlopen_libs $LIBS"
1382
1383     AC_CACHE_CHECK([whether a program can dlopen itself],
1384           lt_cv_dlopen_self, [dnl
1385           _LT_AC_TRY_DLOPEN_SELF(
1386             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1387             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1388     ])
1389
1390     if test "x$lt_cv_dlopen_self" = xyes; then
1391       LDFLAGS="$LDFLAGS $link_static_flag"
1392       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1393           lt_cv_dlopen_self_static, [dnl
1394           _LT_AC_TRY_DLOPEN_SELF(
1395             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1396             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1397       ])
1398     fi
1399
1400     CPPFLAGS="$save_CPPFLAGS"
1401     LDFLAGS="$save_LDFLAGS"
1402     LIBS="$save_LIBS"
1403     ;;
1404   esac
1405
1406   case $lt_cv_dlopen_self in
1407   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1408   *) enable_dlopen_self=unknown ;;
1409   esac
1410
1411   case $lt_cv_dlopen_self_static in
1412   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1413   *) enable_dlopen_self_static=unknown ;;
1414   esac
1415 fi
1416 ])# AC_LIBTOOL_DLOPEN_SELF
1417
1418
1419 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1420 # ---------------------------------
1421 # Check to see if options -c and -o are simultaneously supported by compiler
1422 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1423 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1424 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1425   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1426   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1427    $rm -r conftest 2>/dev/null
1428    mkdir conftest
1429    cd conftest
1430    mkdir out
1431    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1432
1433    lt_compiler_flag="-o out/conftest2.$ac_objext"
1434    # Insert the option either (1) after the last *FLAGS variable, or
1435    # (2) before a word containing "conftest.", or (3) at the end.
1436    # Note that $ac_compile itself does not contain backslashes and begins
1437    # with a dollar sign (not a hyphen), so the echo should work correctly.
1438    lt_compile=`echo "$ac_compile" | $SED \
1439    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1440    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1441    -e 's:$: $lt_compiler_flag:'`
1442    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1443    (eval "$lt_compile" 2>out/conftest.err)
1444    ac_status=$?
1445    cat out/conftest.err >&AS_MESSAGE_LOG_FD
1446    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1447    if (exit $ac_status) && test -s out/conftest2.$ac_objext
1448    then
1449      # The compiler can only warn and ignore the option if not recognized
1450      # So say no if there are warnings
1451      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
1452      $SED '/^$/d' out/conftest.err >out/conftest.er2
1453      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1454        _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1455      fi
1456    fi
1457    chmod u+w . 2>&AS_MESSAGE_LOG_FD
1458    $rm conftest*
1459    # SGI C++ compiler will create directory out/ii_files/ for
1460    # template instantiation
1461    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1462    $rm out/* && rmdir out
1463    cd ..
1464    rmdir conftest
1465    $rm conftest*
1466 ])
1467 ])# AC_LIBTOOL_PROG_CC_C_O
1468
1469
1470 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1471 # -----------------------------------------
1472 # Check to see if we can do hard links to lock some files if needed
1473 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1474 [AC_REQUIRE([_LT_AC_LOCK])dnl
1475
1476 hard_links="nottested"
1477 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1478   # do not overwrite the value of need_locks provided by the user
1479   AC_MSG_CHECKING([if we can lock with hard links])
1480   hard_links=yes
1481   $rm conftest*
1482   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1483   touch conftest.a
1484   ln conftest.a conftest.b 2>&5 || hard_links=no
1485   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1486   AC_MSG_RESULT([$hard_links])
1487   if test "$hard_links" = no; then
1488     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1489     need_locks=warn
1490   fi
1491 else
1492   need_locks=no
1493 fi
1494 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1495
1496
1497 # AC_LIBTOOL_OBJDIR
1498 # -----------------
1499 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1500 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1501 [rm -f .libs 2>/dev/null
1502 mkdir .libs 2>/dev/null
1503 if test -d .libs; then
1504   lt_cv_objdir=.libs
1505 else
1506   # MS-DOS does not allow filenames that begin with a dot.
1507   lt_cv_objdir=_libs
1508 fi
1509 rmdir .libs 2>/dev/null])
1510 objdir=$lt_cv_objdir
1511 ])# AC_LIBTOOL_OBJDIR
1512
1513
1514 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1515 # ----------------------------------------------
1516 # Check hardcoding attributes.
1517 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1518 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1519 _LT_AC_TAGVAR(hardcode_action, $1)=
1520 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1521    test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1522    test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1523
1524   # We can hardcode non-existant directories.
1525   if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1526      # If the only mechanism to avoid hardcoding is shlibpath_var, we
1527      # have to relink, otherwise we might link with an installed library
1528      # when we should be linking with a yet-to-be-installed one
1529      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1530      test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1531     # Linking always hardcodes the temporary library directory.
1532     _LT_AC_TAGVAR(hardcode_action, $1)=relink
1533   else
1534     # We can link without hardcoding, and we can hardcode nonexisting dirs.
1535     _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1536   fi
1537 else
1538   # We cannot hardcode anything, or else we can only hardcode existing
1539   # directories.
1540   _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1541 fi
1542 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1543
1544 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1545   # Fast installation is not supported
1546   enable_fast_install=no
1547 elif test "$shlibpath_overrides_runpath" = yes ||
1548      test "$enable_shared" = no; then
1549   # Fast installation is not necessary
1550   enable_fast_install=needless
1551 fi
1552 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1553
1554
1555 # AC_LIBTOOL_SYS_LIB_STRIP
1556 # ------------------------
1557 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1558 [striplib=
1559 old_striplib=
1560 AC_MSG_CHECKING([whether stripping libraries is possible])
1561 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1562   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1563   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1564   AC_MSG_RESULT([yes])
1565 else
1566 # FIXME - insert some real tests, host_os isn't really good enough
1567   case $host_os in
1568    darwin*)
1569        if test -n "$STRIP" ; then
1570          striplib="$STRIP -x"
1571          AC_MSG_RESULT([yes])
1572        else
1573   AC_MSG_RESULT([no])
1574 fi
1575        ;;
1576    *)
1577   AC_MSG_RESULT([no])
1578     ;;
1579   esac
1580 fi
1581 ])# AC_LIBTOOL_SYS_LIB_STRIP
1582
1583
1584 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1585 # -----------------------------
1586 # PORTME Fill in your ld.so characteristics
1587 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1588 [AC_MSG_CHECKING([dynamic linker characteristics])
1589 library_names_spec=
1590 libname_spec='lib$name'
1591 soname_spec=
1592 shrext_cmds=".so"
1593 postinstall_cmds=
1594 postuninstall_cmds=
1595 finish_cmds=
1596 finish_eval=
1597 shlibpath_var=
1598 shlibpath_overrides_runpath=unknown
1599 version_type=none
1600 dynamic_linker="$host_os ld.so"
1601 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1602 if test "$GCC" = yes; then
1603   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1604   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1605     # if the path contains ";" then we assume it to be the separator
1606     # otherwise default to the standard path separator (i.e. ":") - it is
1607     # assumed that no part of a normal pathname contains ";" but that should
1608     # okay in the real world where ";" in dirpaths is itself problematic.
1609     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1610   else
1611     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1612   fi
1613 else
1614   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1615 fi
1616 need_lib_prefix=unknown
1617 hardcode_into_libs=no
1618
1619 # when you set need_version to no, make sure it does not cause -set_version
1620 # flags to be left without arguments
1621 need_version=unknown
1622
1623 case $host_os in
1624 aix3*)
1625   version_type=linux
1626   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1627   shlibpath_var=LIBPATH
1628
1629   # AIX 3 has no versioning support, so we append a major version to the name.
1630   soname_spec='${libname}${release}${shared_ext}$major'
1631   ;;
1632
1633 aix4* | aix5*)
1634   version_type=linux
1635   need_lib_prefix=no
1636   need_version=no
1637   hardcode_into_libs=yes
1638   if test "$host_cpu" = ia64; then
1639     # AIX 5 supports IA64
1640     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1641     shlibpath_var=LD_LIBRARY_PATH
1642   else
1643     # With GCC up to 2.95.x, collect2 would create an import file
1644     # for dependence libraries.  The import file would start with
1645     # the line `#! .'.  This would cause the generated library to
1646     # depend on `.', always an invalid library.  This was fixed in
1647     # development snapshots of GCC prior to 3.0.
1648     case $host_os in
1649       aix4 | aix4.[[01]] | aix4.[[01]].*)
1650       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1651            echo ' yes '
1652            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1653         :
1654       else
1655         can_build_shared=no
1656       fi
1657       ;;
1658     esac
1659     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1660     # soname into executable. Probably we can add versioning support to
1661     # collect2, so additional links can be useful in future.
1662     if test "$aix_use_runtimelinking" = yes; then
1663       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1664       # instead of lib<name>.a to let people know that these are not
1665       # typical AIX shared libraries.
1666       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1667     else
1668       # We preserve .a as extension for shared libraries through AIX4.2
1669       # and later when we are not doing run time linking.
1670       library_names_spec='${libname}${release}.a $libname.a'
1671       soname_spec='${libname}${release}${shared_ext}$major'
1672     fi
1673     shlibpath_var=LIBPATH
1674   fi
1675   ;;
1676
1677 amigaos*)
1678   library_names_spec='$libname.ixlibrary $libname.a'
1679   # Create ${libname}_ixlibrary.a entries in /sys/libs.
1680   finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''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'
1681   ;;
1682
1683 beos*)
1684   library_names_spec='${libname}${shared_ext}'
1685   dynamic_linker="$host_os ld.so"
1686   shlibpath_var=LIBRARY_PATH
1687   ;;
1688
1689 bsdi[[45]]*)
1690   version_type=linux
1691   need_version=no
1692   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1693   soname_spec='${libname}${release}${shared_ext}$major'
1694   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1695   shlibpath_var=LD_LIBRARY_PATH
1696   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1697   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1698   # the default ld.so.conf also contains /usr/contrib/lib and
1699   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1700   # libtool to hard-code these into programs
1701   ;;
1702
1703 cygwin* | mingw* | pw32*)
1704   version_type=windows
1705   shrext_cmds=".dll"
1706   need_version=no
1707   need_lib_prefix=no
1708
1709   case $GCC,$host_os in
1710   yes,cygwin* | yes,mingw* | yes,pw32*)
1711     library_names_spec='$libname.dll.a'
1712     # DLL is installed to $(libdir)/../bin by postinstall_cmds
1713     postinstall_cmds='base_file=`basename \${file}`~
1714       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1715       dldir=$destdir/`dirname \$dlpath`~
1716       test -d \$dldir || mkdir -p \$dldir~
1717       $install_prog $dir/$dlname \$dldir/$dlname~
1718       chmod a+x \$dldir/$dlname'
1719     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1720       dlpath=$dir/\$dldll~
1721        $rm \$dlpath'
1722     shlibpath_overrides_runpath=yes
1723
1724     case $host_os in
1725     cygwin*)
1726       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1727       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1728       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1729       ;;
1730     mingw*)
1731       # MinGW DLLs use traditional 'lib' prefix
1732       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1733       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1734       if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1735         # It is most probably a Windows format PATH printed by
1736         # mingw gcc, but we are running on Cygwin. Gcc prints its search
1737         # path with ; separators, and with drive letters. We can handle the
1738         # drive letters (cygwin fileutils understands them), so leave them,
1739         # especially as we might pass files found there to a mingw objdump,
1740         # which wouldn't understand a cygwinified path. Ahh.
1741         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1742       else
1743         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1744       fi
1745       ;;
1746     pw32*)
1747       # pw32 DLLs use 'pw' prefix rather than 'lib'
1748       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1749       ;;
1750     esac
1751     ;;
1752
1753   *)
1754     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1755     ;;
1756   esac
1757   dynamic_linker='Win32 ld.exe'
1758   # FIXME: first we should search . and the directory the executable is in
1759   shlibpath_var=PATH
1760   ;;
1761
1762 darwin* | rhapsody*)
1763   dynamic_linker="$host_os dyld"
1764   version_type=darwin
1765   need_lib_prefix=no
1766   need_version=no
1767   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1768   soname_spec='${libname}${release}${major}$shared_ext'
1769   shlibpath_overrides_runpath=yes
1770   shlibpath_var=DYLD_LIBRARY_PATH
1771   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1772   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1773   if test "$GCC" = yes; then
1774     sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
1775   else
1776     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1777   fi
1778   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1779   ;;
1780
1781 dgux*)
1782   version_type=linux
1783   need_lib_prefix=no
1784   need_version=no
1785   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1786   soname_spec='${libname}${release}${shared_ext}$major'
1787   shlibpath_var=LD_LIBRARY_PATH
1788   ;;
1789
1790 freebsd1*)
1791   dynamic_linker=no
1792   ;;
1793
1794 kfreebsd*-gnu)
1795   version_type=linux
1796   need_lib_prefix=no
1797   need_version=no
1798   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1799   soname_spec='${libname}${release}${shared_ext}$major'
1800   shlibpath_var=LD_LIBRARY_PATH
1801   shlibpath_overrides_runpath=no
1802   hardcode_into_libs=yes
1803   dynamic_linker='GNU ld.so'
1804   ;;
1805
1806 freebsd* | dragonfly*)
1807   # DragonFly does not have aout.  When/if they implement a new
1808   # versioning mechanism, adjust this.
1809   if test -x /usr/bin/objformat; then
1810     objformat=`/usr/bin/objformat`
1811   else
1812     case $host_os in
1813     freebsd[[123]]*) objformat=aout ;;
1814     *) objformat=elf ;;
1815     esac
1816   fi
1817   version_type=freebsd-$objformat
1818   case $version_type in
1819     freebsd-elf*)
1820       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1821       need_version=no
1822       need_lib_prefix=no
1823       ;;
1824     freebsd-*)
1825       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1826       need_version=yes
1827       ;;
1828   esac
1829   shlibpath_var=LD_LIBRARY_PATH
1830   case $host_os in
1831   freebsd2*)
1832     shlibpath_overrides_runpath=yes
1833     ;;
1834   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1835     shlibpath_overrides_runpath=yes
1836     hardcode_into_libs=yes
1837     ;;
1838   *) # from 3.2 on
1839     shlibpath_overrides_runpath=no
1840     hardcode_into_libs=yes
1841     ;;
1842   esac
1843   ;;
1844
1845 gnu*)
1846   version_type=linux
1847   need_lib_prefix=no
1848   need_version=no
1849   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1850   soname_spec='${libname}${release}${shared_ext}$major'
1851   shlibpath_var=LD_LIBRARY_PATH
1852   hardcode_into_libs=yes
1853   ;;
1854
1855 hpux9* | hpux10* | hpux11*)
1856   # Give a soname corresponding to the major version so that dld.sl refuses to
1857   # link against other versions.
1858   version_type=sunos
1859   need_lib_prefix=no
1860   need_version=no
1861   case $host_cpu in
1862   ia64*)
1863     shrext_cmds='.so'
1864     hardcode_into_libs=yes
1865     dynamic_linker="$host_os dld.so"
1866     shlibpath_var=LD_LIBRARY_PATH
1867     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1868     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1869     soname_spec='${libname}${release}${shared_ext}$major'
1870     if test "X$HPUX_IA64_MODE" = X32; then
1871       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1872     else
1873       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1874     fi
1875     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1876     ;;
1877    hppa*64*)
1878      shrext_cmds='.sl'
1879      hardcode_into_libs=yes
1880      dynamic_linker="$host_os dld.sl"
1881      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1882      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1883      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1884      soname_spec='${libname}${release}${shared_ext}$major'
1885      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1886      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1887      ;;
1888    *)
1889     shrext_cmds='.sl'
1890     dynamic_linker="$host_os dld.sl"
1891     shlibpath_var=SHLIB_PATH
1892     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1893     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1894     soname_spec='${libname}${release}${shared_ext}$major'
1895     ;;
1896   esac
1897   # HP-UX runs *really* slowly unless shared libraries are mode 555.
1898   postinstall_cmds='chmod 555 $lib'
1899   ;;
1900
1901 irix5* | irix6* | nonstopux*)
1902   case $host_os in
1903     nonstopux*) version_type=nonstopux ;;
1904     *)
1905         if test "$lt_cv_prog_gnu_ld" = yes; then
1906                 version_type=linux
1907         else
1908                 version_type=irix
1909         fi ;;
1910   esac
1911   need_lib_prefix=no
1912   need_version=no
1913   soname_spec='${libname}${release}${shared_ext}$major'
1914   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1915   case $host_os in
1916   irix5* | nonstopux*)
1917     libsuff= shlibsuff=
1918     ;;
1919   *)
1920     case $LD in # libtool.m4 will add one of these switches to LD
1921     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1922       libsuff= shlibsuff= libmagic=32-bit;;
1923     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1924       libsuff=32 shlibsuff=N32 libmagic=N32;;
1925     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1926       libsuff=64 shlibsuff=64 libmagic=64-bit;;
1927     *) libsuff= shlibsuff= libmagic=never-match;;
1928     esac
1929     ;;
1930   esac
1931   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1932   shlibpath_overrides_runpath=no
1933   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1934   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1935   hardcode_into_libs=yes
1936   ;;
1937
1938 # No shared lib support for Linux oldld, aout, or coff.
1939 linux*oldld* | linux*aout* | linux*coff*)
1940   dynamic_linker=no
1941   ;;
1942
1943 # This must be Linux ELF.
1944 linux*)
1945   version_type=linux
1946   need_lib_prefix=no
1947   need_version=no
1948   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1949   soname_spec='${libname}${release}${shared_ext}$major'
1950   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1951   shlibpath_var=LD_LIBRARY_PATH
1952   shlibpath_overrides_runpath=no
1953   # This implies no fast_install, which is unacceptable.
1954   # Some rework will be needed to allow for fast_install
1955   # before this can be enabled.
1956   hardcode_into_libs=yes
1957
1958   # Append ld.so.conf contents to the search path
1959   if test -f /etc/ld.so.conf; then
1960     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,    ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1961     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1962   fi
1963
1964   # We used to test for /lib/ld.so.1 and disable shared libraries on
1965   # powerpc, because MkLinux only supported shared libraries with the
1966   # GNU dynamic linker.  Since this was broken with cross compilers,
1967   # most powerpc-linux boxes support dynamic linking these days and
1968   # people can always --disable-shared, the test was removed, and we
1969   # assume the GNU/Linux dynamic linker is in use.
1970   dynamic_linker='GNU/Linux ld.so'
1971   ;;
1972
1973 knetbsd*-gnu)
1974   version_type=linux
1975   need_lib_prefix=no
1976   need_version=no
1977   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1978   soname_spec='${libname}${release}${shared_ext}$major'
1979   shlibpath_var=LD_LIBRARY_PATH
1980   shlibpath_overrides_runpath=no
1981   hardcode_into_libs=yes
1982   dynamic_linker='GNU ld.so'
1983   ;;
1984
1985 netbsd*)
1986   version_type=sunos
1987   need_lib_prefix=no
1988   need_version=no
1989   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1990     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1991     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1992     dynamic_linker='NetBSD (a.out) ld.so'
1993   else
1994     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1995     soname_spec='${libname}${release}${shared_ext}$major'
1996     dynamic_linker='NetBSD ld.elf_so'
1997   fi
1998   shlibpath_var=LD_LIBRARY_PATH
1999   shlibpath_overrides_runpath=yes
2000   hardcode_into_libs=yes
2001   ;;
2002
2003 newsos6)
2004   version_type=linux
2005   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2006   shlibpath_var=LD_LIBRARY_PATH
2007   shlibpath_overrides_runpath=yes
2008   ;;
2009
2010 nto-qnx*)
2011   version_type=linux
2012   need_lib_prefix=no
2013   need_version=no
2014   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2015   soname_spec='${libname}${release}${shared_ext}$major'
2016   shlibpath_var=LD_LIBRARY_PATH
2017   shlibpath_overrides_runpath=yes
2018   ;;
2019
2020 openbsd*)
2021   version_type=sunos
2022   need_lib_prefix=no
2023   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2024   case $host_os in
2025     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2026     *)                         need_version=no  ;;
2027   esac
2028   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2029   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2030   shlibpath_var=LD_LIBRARY_PATH
2031   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2032     case $host_os in
2033       openbsd2.[[89]] | openbsd2.[[89]].*)
2034         shlibpath_overrides_runpath=no
2035         ;;
2036       *)
2037         shlibpath_overrides_runpath=yes
2038         ;;
2039       esac
2040   else
2041     shlibpath_overrides_runpath=yes
2042   fi
2043   ;;
2044
2045 os2*)
2046   libname_spec='$name'
2047   shrext_cmds=".dll"
2048   need_lib_prefix=no
2049   library_names_spec='$libname${shared_ext} $libname.a'
2050   dynamic_linker='OS/2 ld.exe'
2051   shlibpath_var=LIBPATH
2052   ;;
2053
2054 osf3* | osf4* | osf5*)
2055   version_type=osf
2056   need_lib_prefix=no
2057   need_version=no
2058   soname_spec='${libname}${release}${shared_ext}$major'
2059   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2060   shlibpath_var=LD_LIBRARY_PATH
2061   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2062   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2063   ;;
2064
2065 sco3.2v5*)
2066   version_type=osf
2067   soname_spec='${libname}${release}${shared_ext}$major'
2068   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2069   shlibpath_var=LD_LIBRARY_PATH
2070   ;;
2071
2072 solaris*)
2073   version_type=linux
2074   need_lib_prefix=no
2075   need_version=no
2076   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2077   soname_spec='${libname}${release}${shared_ext}$major'
2078   shlibpath_var=LD_LIBRARY_PATH
2079   shlibpath_overrides_runpath=yes
2080   hardcode_into_libs=yes
2081   # ldd complains unless libraries are executable
2082   postinstall_cmds='chmod +x $lib'
2083   ;;
2084
2085 sunos4*)
2086   version_type=sunos
2087   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2088   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2089   shlibpath_var=LD_LIBRARY_PATH
2090   shlibpath_overrides_runpath=yes
2091   if test "$with_gnu_ld" = yes; then
2092     need_lib_prefix=no
2093   fi
2094   need_version=yes
2095   ;;
2096
2097 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2098   version_type=linux
2099   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2100   soname_spec='${libname}${release}${shared_ext}$major'
2101   shlibpath_var=LD_LIBRARY_PATH
2102   case $host_vendor in
2103     sni)
2104       shlibpath_overrides_runpath=no
2105       need_lib_prefix=no
2106       export_dynamic_flag_spec='${wl}-Blargedynsym'
2107       runpath_var=LD_RUN_PATH
2108       ;;
2109     siemens)
2110       need_lib_prefix=no
2111       ;;
2112     motorola)
2113       need_lib_prefix=no
2114       need_version=no
2115       shlibpath_overrides_runpath=no
2116       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2117       ;;
2118   esac
2119   ;;
2120
2121 sysv4*MP*)
2122   if test -d /usr/nec ;then
2123     version_type=linux
2124     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2125     soname_spec='$libname${shared_ext}.$major'
2126     shlibpath_var=LD_LIBRARY_PATH
2127   fi
2128   ;;
2129
2130 uts4*)
2131   version_type=linux
2132   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2133   soname_spec='${libname}${release}${shared_ext}$major'
2134   shlibpath_var=LD_LIBRARY_PATH
2135   ;;
2136
2137 *)
2138   dynamic_linker=no
2139   ;;
2140 esac
2141 AC_MSG_RESULT([$dynamic_linker])
2142 test "$dynamic_linker" = no && can_build_shared=no
2143 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2144
2145
2146 # _LT_AC_TAGCONFIG
2147 # ----------------
2148 AC_DEFUN([_LT_AC_TAGCONFIG],
2149 [AC_ARG_WITH([tags],
2150     [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2151         [include additional configurations @<:@automatic@:>@])],
2152     [tagnames="$withval"])
2153
2154 if test -f "$ltmain" && test -n "$tagnames"; then
2155   if test ! -f "${ofile}"; then
2156     AC_MSG_WARN([output file `$ofile' does not exist])
2157   fi
2158
2159   if test -z "$LTCC"; then
2160     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2161     if test -z "$LTCC"; then
2162       AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2163     else
2164       AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2165     fi
2166   fi
2167
2168   # Extract list of available tagged configurations in $ofile.
2169   # Note that this assumes the entire list is on one line.
2170   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2171
2172   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2173   for tagname in $tagnames; do
2174     IFS="$lt_save_ifs"
2175     # Check whether tagname contains only valid characters
2176     case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2177     "") ;;
2178     *)  AC_MSG_ERROR([invalid tag name: $tagname])
2179         ;;
2180     esac
2181
2182     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2183     then
2184       AC_MSG_ERROR([tag name \"$tagname\" already exists])
2185     fi
2186
2187     # Update the list of available tags.
2188     if test -n "$tagname"; then
2189       echo appending configuration tag \"$tagname\" to $ofile
2190
2191       case $tagname in
2192       CXX)
2193         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2194             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2195             (test "X$CXX" != "Xg++"))) ; then
2196           AC_LIBTOOL_LANG_CXX_CONFIG
2197         else
2198           tagname=""
2199         fi
2200         ;;
2201
2202       F77)
2203         if test -n "$F77" && test "X$F77" != "Xno"; then
2204           AC_LIBTOOL_LANG_F77_CONFIG
2205         else
2206           tagname=""
2207         fi
2208         ;;
2209
2210       GCJ)
2211         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2212           AC_LIBTOOL_LANG_GCJ_CONFIG
2213         else
2214           tagname=""
2215         fi
2216         ;;
2217
2218       RC)
2219         AC_LIBTOOL_LANG_RC_CONFIG
2220         ;;
2221
2222       *)
2223         AC_MSG_ERROR([Unsupported tag name: $tagname])
2224         ;;
2225       esac
2226
2227       # Append the new tag name to the list of available tags.
2228       if test -n "$tagname" ; then
2229       available_tags="$available_tags $tagname"
2230     fi
2231     fi
2232   done
2233   IFS="$lt_save_ifs"
2234
2235   # Now substitute the updated list of available tags.
2236   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2237     mv "${ofile}T" "$ofile"
2238     chmod +x "$ofile"
2239   else
2240     rm -f "${ofile}T"
2241     AC_MSG_ERROR([unable to update list of available tagged configurations.])
2242   fi
2243 fi
2244 ])# _LT_AC_TAGCONFIG
2245
2246
2247 # AC_LIBTOOL_DLOPEN
2248 # -----------------
2249 # enable checks for dlopen support
2250 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2251  [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2252 ])# AC_LIBTOOL_DLOPEN
2253
2254
2255 # AC_LIBTOOL_WIN32_DLL
2256 # --------------------
2257 # declare package support for building win32 DLLs
2258 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2259 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2260 ])# AC_LIBTOOL_WIN32_DLL
2261
2262
2263 # AC_ENABLE_SHARED([DEFAULT])
2264 # ---------------------------
2265 # implement the --enable-shared flag
2266 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2267 AC_DEFUN([AC_ENABLE_SHARED],
2268 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2269 AC_ARG_ENABLE([shared],
2270     [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2271         [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2272     [p=${PACKAGE-default}
2273     case $enableval in
2274     yes) enable_shared=yes ;;
2275     no) enable_shared=no ;;
2276     *)
2277       enable_shared=no
2278       # Look at the argument we got.  We use all the common list separators.
2279       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2280       for pkg in $enableval; do
2281         IFS="$lt_save_ifs"
2282         if test "X$pkg" = "X$p"; then
2283           enable_shared=yes
2284         fi
2285       done
2286       IFS="$lt_save_ifs"
2287       ;;
2288     esac],
2289     [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2290 ])# AC_ENABLE_SHARED
2291
2292
2293 # AC_DISABLE_SHARED
2294 # -----------------
2295 #- set the default shared flag to --disable-shared
2296 AC_DEFUN([AC_DISABLE_SHARED],
2297 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2298 AC_ENABLE_SHARED(no)
2299 ])# AC_DISABLE_SHARED
2300
2301
2302 # AC_ENABLE_STATIC([DEFAULT])
2303 # ---------------------------
2304 # implement the --enable-static flag
2305 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2306 AC_DEFUN([AC_ENABLE_STATIC],
2307 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2308 AC_ARG_ENABLE([static],
2309     [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2310         [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2311     [p=${PACKAGE-default}
2312     case $enableval in
2313     yes) enable_static=yes ;;
2314     no) enable_static=no ;;
2315     *)
2316      enable_static=no
2317       # Look at the argument we got.  We use all the common list separators.
2318       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2319       for pkg in $enableval; do
2320         IFS="$lt_save_ifs"
2321         if test "X$pkg" = "X$p"; then
2322           enable_static=yes
2323         fi
2324       done
2325       IFS="$lt_save_ifs"
2326       ;;
2327     esac],
2328     [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2329 ])# AC_ENABLE_STATIC
2330
2331
2332 # AC_DISABLE_STATIC
2333 # -----------------
2334 # set the default static flag to --disable-static
2335 AC_DEFUN([AC_DISABLE_STATIC],
2336 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2337 AC_ENABLE_STATIC(no)
2338 ])# AC_DISABLE_STATIC
2339
2340
2341 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2342 # ---------------------------------
2343 # implement the --enable-fast-install flag
2344 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2345 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2346 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2347 AC_ARG_ENABLE([fast-install],
2348     [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2349     [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2350     [p=${PACKAGE-default}
2351     case $enableval in
2352     yes) enable_fast_install=yes ;;
2353     no) enable_fast_install=no ;;
2354     *)
2355       enable_fast_install=no
2356       # Look at the argument we got.  We use all the common list separators.
2357       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2358       for pkg in $enableval; do
2359         IFS="$lt_save_ifs"
2360         if test "X$pkg" = "X$p"; then
2361           enable_fast_install=yes
2362         fi
2363       done
2364       IFS="$lt_save_ifs"
2365       ;;
2366     esac],
2367     [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2368 ])# AC_ENABLE_FAST_INSTALL
2369
2370
2371 # AC_DISABLE_FAST_INSTALL
2372 # -----------------------
2373 # set the default to --disable-fast-install
2374 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2375 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2376 AC_ENABLE_FAST_INSTALL(no)
2377 ])# AC_DISABLE_FAST_INSTALL
2378
2379
2380 # AC_LIBTOOL_PICMODE([MODE])
2381 # --------------------------
2382 # implement the --with-pic flag
2383 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2384 AC_DEFUN([AC_LIBTOOL_PICMODE],
2385 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2386 pic_mode=ifelse($#,1,$1,default)
2387 ])# AC_LIBTOOL_PICMODE
2388
2389
2390 # AC_PROG_EGREP
2391 # -------------
2392 # This is predefined starting with Autoconf 2.54, so this conditional
2393 # definition can be removed once we require Autoconf 2.54 or later.
2394 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2395 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2396    [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2397     then ac_cv_prog_egrep='grep -E'
2398     else ac_cv_prog_egrep='egrep'
2399     fi])
2400  EGREP=$ac_cv_prog_egrep
2401  AC_SUBST([EGREP])
2402 ])])
2403
2404
2405 # AC_PATH_TOOL_PREFIX
2406 # -------------------
2407 # find a file program which can recognise shared library
2408 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2409 [AC_REQUIRE([AC_PROG_EGREP])dnl
2410 AC_MSG_CHECKING([for $1])
2411 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2412 [case $MAGIC_CMD in
2413 [[\\/*] |  ?:[\\/]*])
2414   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2415   ;;
2416 *)
2417   lt_save_MAGIC_CMD="$MAGIC_CMD"
2418   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2419 dnl $ac_dummy forces splitting on constant user-supplied paths.
2420 dnl POSIX.2 word splitting is done only on the output of word expansions,
2421 dnl not every word.  This closes a longstanding sh security hole.
2422   ac_dummy="ifelse([$2], , $PATH, [$2])"
2423   for ac_dir in $ac_dummy; do
2424     IFS="$lt_save_ifs"
2425     test -z "$ac_dir" && ac_dir=.
2426     if test -f $ac_dir/$1; then
2427       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2428       if test -n "$file_magic_test_file"; then
2429         case $deplibs_check_method in
2430         "file_magic "*)
2431           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2432           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2433           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2434             $EGREP "$file_magic_regex" > /dev/null; then
2435             :
2436           else
2437             cat <<EOF 1>&2
2438
2439 *** Warning: the command libtool uses to detect shared libraries,
2440 *** $file_magic_cmd, produces output that libtool cannot recognize.
2441 *** The result is that libtool may fail to recognize shared libraries
2442 *** as such.  This will affect the creation of libtool libraries that
2443 *** depend on shared libraries, but programs linked with such libtool
2444 *** libraries will work regardless of this problem.  Nevertheless, you
2445 *** may want to report the problem to your system manager and/or to
2446 *** bug-libtool@gnu.org
2447
2448 EOF
2449           fi ;;
2450         esac
2451       fi
2452       break
2453     fi
2454   done
2455   IFS="$lt_save_ifs"
2456   MAGIC_CMD="$lt_save_MAGIC_CMD"
2457   ;;
2458 esac])
2459 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2460 if test -n "$MAGIC_CMD"; then
2461   AC_MSG_RESULT($MAGIC_CMD)
2462 else
2463   AC_MSG_RESULT(no)
2464 fi
2465 ])# AC_PATH_TOOL_PREFIX
2466
2467
2468 # AC_PATH_MAGIC
2469 # -------------
2470 # find a file program which can recognise a shared library
2471 AC_DEFUN([AC_PATH_MAGIC],
2472 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2473 if test -z "$lt_cv_path_MAGIC_CMD"; then
2474   if test -n "$ac_tool_prefix"; then
2475     AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2476   else
2477     MAGIC_CMD=:
2478   fi
2479 fi
2480 ])# AC_PATH_MAGIC
2481
2482
2483 # AC_PROG_LD
2484 # ----------
2485 # find the pathname to the GNU or non-GNU linker
2486 AC_DEFUN([AC_PROG_LD],
2487 [AC_ARG_WITH([gnu-ld],
2488     [AC_HELP_STRING([--with-gnu-ld],
2489         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2490     [test "$withval" = no || with_gnu_ld=yes],
2491     [with_gnu_ld=no])
2492 AC_REQUIRE([LT_AC_PROG_SED])dnl
2493 AC_REQUIRE([AC_PROG_CC])dnl
2494 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2495 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2496 ac_prog=ld
2497 if test "$GCC" = yes; then
2498   # Check if gcc -print-prog-name=ld gives a path.
2499   AC_MSG_CHECKING([for ld used by $CC])
2500   case $host in
2501   *-*-mingw*)
2502     # gcc leaves a trailing carriage return which upsets mingw
2503     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2504   *)
2505     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2506   esac
2507   case $ac_prog in
2508     # Accept absolute paths.
2509     [[\\/]]* | ?:[[\\/]]*)
2510       re_direlt='/[[^/]][[^/]]*/\.\./'
2511       # Canonicalize the pathname of ld
2512       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2513       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2514         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2515       done
2516       test -z "$LD" && LD="$ac_prog"
2517       ;;
2518   "")
2519     # If it fails, then pretend we aren't using GCC.
2520     ac_prog=ld
2521     ;;
2522   *)
2523     # If it is relative, then search for the first ld in PATH.
2524     with_gnu_ld=unknown
2525     ;;
2526   esac
2527 elif test "$with_gnu_ld" = yes; then
2528   AC_MSG_CHECKING([for GNU ld])
2529 else
2530   AC_MSG_CHECKING([for non-GNU ld])
2531 fi
2532 AC_CACHE_VAL(lt_cv_path_LD,
2533 [if test -z "$LD"; then
2534   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2535   for ac_dir in $PATH; do
2536     IFS="$lt_save_ifs"
2537     test -z "$ac_dir" && ac_dir=.
2538     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2539       lt_cv_path_LD="$ac_dir/$ac_prog"
2540       # Check to see if the program is GNU ld.  I'd rather use --version,
2541       # but apparently some variants of GNU ld only accept -v.
2542       # Break only if it was the GNU/non-GNU ld that we prefer.
2543       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2544       *GNU* | *'with BFD'*)
2545         test "$with_gnu_ld" != no && break
2546         ;;
2547       *)
2548         test "$with_gnu_ld" != yes && break
2549         ;;
2550       esac
2551     fi
2552   done
2553   IFS="$lt_save_ifs"
2554 else
2555   lt_cv_path_LD="$LD" # Let the user override the test with a path.
2556 fi])
2557 LD="$lt_cv_path_LD"
2558 if test -n "$LD"; then
2559   AC_MSG_RESULT($LD)
2560 else
2561   AC_MSG_RESULT(no)
2562 fi
2563 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2564 AC_PROG_LD_GNU
2565 ])# AC_PROG_LD
2566
2567
2568 # AC_PROG_LD_GNU
2569 # --------------
2570 AC_DEFUN([AC_PROG_LD_GNU],
2571 [AC_REQUIRE([AC_PROG_EGREP])dnl
2572 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2573 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2574 case `$LD -v 2>&1 </dev/null` in
2575 *GNU* | *'with BFD'*)
2576   lt_cv_prog_gnu_ld=yes
2577   ;;
2578 *)
2579   lt_cv_prog_gnu_ld=no
2580   ;;
2581 esac])
2582 with_gnu_ld=$lt_cv_prog_gnu_ld
2583 ])# AC_PROG_LD_GNU
2584
2585
2586 # AC_PROG_LD_RELOAD_FLAG
2587 # ----------------------
2588 # find reload flag for linker
2589 #   -- PORTME Some linkers may need a different reload flag.
2590 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2591 [AC_CACHE_CHECK([for $LD option to reload object files],
2592   lt_cv_ld_reload_flag,
2593   [lt_cv_ld_reload_flag='-r'])
2594 reload_flag=$lt_cv_ld_reload_flag
2595 case $reload_flag in
2596 "" | " "*) ;;
2597 *) reload_flag=" $reload_flag" ;;
2598 esac
2599 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2600 case $host_os in
2601   darwin*)
2602     if test "$GCC" = yes; then
2603       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
2604     else
2605       reload_cmds='$LD$reload_flag -o $output$reload_objs'
2606     fi
2607     ;;
2608 esac
2609 ])# AC_PROG_LD_RELOAD_FLAG
2610
2611
2612 # AC_DEPLIBS_CHECK_METHOD
2613 # -----------------------
2614 # how to check for library dependencies
2615 #  -- PORTME fill in with the dynamic library characteristics
2616 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2617 [AC_CACHE_CHECK([how to recognise dependent libraries],
2618 lt_cv_deplibs_check_method,
2619 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2620 lt_cv_file_magic_test_file=
2621 lt_cv_deplibs_check_method='unknown'
2622 # Need to set the preceding variable on all platforms that support
2623 # interlibrary dependencies.
2624 # 'none' -- dependencies not supported.
2625 # `unknown' -- same as none, but documents that we really don't know.
2626 # 'pass_all' -- all dependencies passed with no checks.
2627 # 'test_compile' -- check by making test program.
2628 # 'file_magic [[regex]]' -- check by looking for files in library path
2629 # which responds to the $file_magic_cmd with a given extended regex.
2630 # If you have `file' or equivalent on your system and you're not sure
2631 # whether `pass_all' will *always* work, you probably want this one.
2632
2633 case $host_os in
2634 aix4* | aix5*)
2635   lt_cv_deplibs_check_method=pass_all
2636   ;;
2637
2638 beos*)
2639   lt_cv_deplibs_check_method=pass_all
2640   ;;
2641
2642 bsdi[[45]]*)
2643   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2644   lt_cv_file_magic_cmd='/usr/bin/file -L'
2645   lt_cv_file_magic_test_file=/shlib/libc.so
2646   ;;
2647
2648 cygwin*)
2649   # func_win32_libid is a shell function defined in ltmain.sh
2650   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2651   lt_cv_file_magic_cmd='func_win32_libid'
2652   ;;
2653
2654 mingw* | pw32*)
2655   # Base MSYS/MinGW do not provide the 'file' command needed by
2656   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2657   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2658   lt_cv_file_magic_cmd='$OBJDUMP -f'
2659   ;;
2660
2661 darwin* | rhapsody*)
2662   lt_cv_deplibs_check_method=pass_all
2663   ;;
2664
2665 freebsd* | kfreebsd*-gnu | dragonfly*)
2666   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2667     case $host_cpu in
2668     i*86 )
2669       # Not sure whether the presence of OpenBSD here was a mistake.
2670       # Let's accept both of them until this is cleared up.
2671       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2672       lt_cv_file_magic_cmd=/usr/bin/file
2673       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2674       ;;
2675     esac
2676   else
2677     lt_cv_deplibs_check_method=pass_all
2678   fi
2679   ;;
2680
2681 gnu*)
2682   lt_cv_deplibs_check_method=pass_all
2683   ;;
2684
2685 hpux10.20* | hpux11*)
2686   lt_cv_file_magic_cmd=/usr/bin/file
2687   case $host_cpu in
2688   ia64*)
2689     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2690     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2691     ;;
2692   hppa*64*)
2693     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
2694     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2695     ;;
2696   *)
2697     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2698     lt_cv_file_magic_test_file=/usr/lib/libc.sl
2699     ;;
2700   esac
2701   ;;
2702
2703 irix5* | irix6* | nonstopux*)
2704   case $LD in
2705   *-32|*"-32 ") libmagic=32-bit;;
2706   *-n32|*"-n32 ") libmagic=N32;;
2707   *-64|*"-64 ") libmagic=64-bit;;
2708   *) libmagic=never-match;;
2709   esac
2710   lt_cv_deplibs_check_method=pass_all
2711   ;;
2712
2713 # This must be Linux ELF.
2714 linux*)
2715   lt_cv_deplibs_check_method=pass_all
2716   ;;
2717
2718 netbsd*)
2719   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2720     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2721   else
2722     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2723   fi
2724   ;;
2725
2726 newos6*)
2727   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2728   lt_cv_file_magic_cmd=/usr/bin/file
2729   lt_cv_file_magic_test_file=/usr/lib/libnls.so
2730   ;;
2731
2732 nto-qnx*)
2733   lt_cv_deplibs_check_method=unknown
2734   ;;
2735
2736 openbsd*)
2737   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2738     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2739   else
2740     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2741   fi
2742   ;;
2743
2744 osf3* | osf4* | osf5*)
2745   lt_cv_deplibs_check_method=pass_all
2746   ;;
2747
2748 sco3.2v5*)
2749   lt_cv_deplibs_check_method=pass_all
2750   ;;
2751
2752 solaris*)
2753   lt_cv_deplibs_check_method=pass_all
2754   ;;
2755
2756 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2757   case $host_vendor in
2758   motorola)
2759     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]]'
2760     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2761     ;;
2762   ncr)
2763     lt_cv_deplibs_check_method=pass_all
2764     ;;
2765   sequent)
2766     lt_cv_file_magic_cmd='/bin/file'
2767     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2768     ;;
2769   sni)
2770     lt_cv_file_magic_cmd='/bin/file'
2771     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2772     lt_cv_file_magic_test_file=/lib/libc.so
2773     ;;
2774   siemens)
2775     lt_cv_deplibs_check_method=pass_all
2776     ;;
2777   esac
2778   ;;
2779
2780 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2781   lt_cv_deplibs_check_method=pass_all
2782   ;;
2783 esac
2784 ])
2785 file_magic_cmd=$lt_cv_file_magic_cmd
2786 deplibs_check_method=$lt_cv_deplibs_check_method
2787 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2788 ])# AC_DEPLIBS_CHECK_METHOD
2789
2790
2791 # AC_PROG_NM
2792 # ----------
2793 # find the pathname to a BSD-compatible name lister
2794 AC_DEFUN([AC_PROG_NM],
2795 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2796 [if test -n "$NM"; then
2797   # Let the user override the test.
2798   lt_cv_path_NM="$NM"
2799 else
2800   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2801   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2802     IFS="$lt_save_ifs"
2803     test -z "$ac_dir" && ac_dir=.
2804     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2805     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2806       # Check to see if the nm accepts a BSD-compat flag.
2807       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2808       #   nm: unknown option "B" ignored
2809       # Tru64's nm complains that /dev/null is an invalid object file
2810       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2811       */dev/null* | *'Invalid file or object type'*)
2812         lt_cv_path_NM="$tmp_nm -B"
2813         break
2814         ;;
2815       *)
2816         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2817         */dev/null*)
2818           lt_cv_path_NM="$tmp_nm -p"
2819           break
2820           ;;
2821         *)
2822           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2823           continue # so that we can try to find one that supports BSD flags
2824           ;;
2825         esac
2826       esac
2827     fi
2828   done
2829   IFS="$lt_save_ifs"
2830   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2831 fi])
2832 NM="$lt_cv_path_NM"
2833 ])# AC_PROG_NM
2834
2835
2836 # AC_CHECK_LIBM
2837 # -------------
2838 # check for math library
2839 AC_DEFUN([AC_CHECK_LIBM],
2840 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2841 LIBM=
2842 case $host in
2843 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2844   # These system don't have libm, or don't need it
2845   ;;
2846 *-ncr-sysv4.3*)
2847   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2848   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2849   ;;
2850 *)
2851   AC_CHECK_LIB(m, cos, LIBM="-lm")
2852   ;;
2853 esac
2854 ])# AC_CHECK_LIBM
2855
2856
2857 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2858 # -----------------------------------
2859 # sets LIBLTDL to the link flags for the libltdl convenience library and
2860 # LTDLINCL to the include flags for the libltdl header and adds
2861 # --enable-ltdl-convenience to the configure arguments.  Note that
2862 # AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2863 # it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
2864 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2865 # (note the single quotes!).  If your package is not flat and you're not
2866 # using automake, define top_builddir and top_srcdir appropriately in
2867 # the Makefiles.
2868 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2869 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2870   case $enable_ltdl_convenience in
2871   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2872   "") enable_ltdl_convenience=yes
2873       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2874   esac
2875   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2876   LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2877   # For backwards non-gettext consistent compatibility...
2878   INCLTDL="$LTDLINCL"
2879 ])# AC_LIBLTDL_CONVENIENCE
2880
2881
2882 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2883 # -----------------------------------
2884 # sets LIBLTDL to the link flags for the libltdl installable library and
2885 # LTDLINCL to the include flags for the libltdl header and adds
2886 # --enable-ltdl-install to the configure arguments.  Note that
2887 # AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2888 # and an installed libltdl is not found, it is assumed to be `libltdl'.
2889 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2890 # '${top_srcdir}/' (note the single quotes!).  If your package is not
2891 # flat and you're not using automake, define top_builddir and top_srcdir
2892 # appropriately in the Makefiles.
2893 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2894 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2895 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2896   AC_CHECK_LIB(ltdl, lt_dlinit,
2897   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2898   [if test x"$enable_ltdl_install" = xno; then
2899      AC_MSG_WARN([libltdl not installed, but installation disabled])
2900    else
2901      enable_ltdl_install=yes
2902    fi
2903   ])
2904   if test x"$enable_ltdl_install" = x"yes"; then
2905     ac_configure_args="$ac_configure_args --enable-ltdl-install"
2906     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2907     LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2908   else
2909     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2910     LIBLTDL="-lltdl"
2911     LTDLINCL=
2912   fi
2913   # For backwards non-gettext consistent compatibility...
2914   INCLTDL="$LTDLINCL"
2915 ])# AC_LIBLTDL_INSTALLABLE
2916
2917
2918 # AC_LIBTOOL_CXX
2919 # --------------
2920 # enable support for C++ libraries
2921 AC_DEFUN([AC_LIBTOOL_CXX],
2922 [AC_REQUIRE([_LT_AC_LANG_CXX])
2923 ])# AC_LIBTOOL_CXX
2924
2925
2926 # _LT_AC_LANG_CXX
2927 # ---------------
2928 AC_DEFUN([_LT_AC_LANG_CXX],
2929 [AC_REQUIRE([AC_PROG_CXX])
2930 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2931 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2932 ])# _LT_AC_LANG_CXX
2933
2934 # _LT_AC_PROG_CXXCPP
2935 # ---------------
2936 AC_DEFUN([_LT_AC_PROG_CXXCPP],
2937 [
2938 AC_REQUIRE([AC_PROG_CXX])
2939 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2940     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2941     (test "X$CXX" != "Xg++"))) ; then
2942   AC_PROG_CXXCPP
2943 fi
2944 ])# _LT_AC_PROG_CXXCPP
2945
2946 # AC_LIBTOOL_F77
2947 # --------------
2948 # enable support for Fortran 77 libraries
2949 AC_DEFUN([AC_LIBTOOL_F77],
2950 [AC_REQUIRE([_LT_AC_LANG_F77])
2951 ])# AC_LIBTOOL_F77
2952
2953
2954 # _LT_AC_LANG_F77
2955 # ---------------
2956 AC_DEFUN([_LT_AC_LANG_F77],
2957 [AC_REQUIRE([AC_PROG_F77])
2958 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2959 ])# _LT_AC_LANG_F77
2960
2961
2962 # AC_LIBTOOL_GCJ
2963 # --------------
2964 # enable support for GCJ libraries
2965 AC_DEFUN([AC_LIBTOOL_GCJ],
2966 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2967 ])# AC_LIBTOOL_GCJ
2968
2969
2970 # _LT_AC_LANG_GCJ
2971 # ---------------
2972 AC_DEFUN([_LT_AC_LANG_GCJ],
2973 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2974   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2975     [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2976       [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2977          [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2978            [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2979 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2980 ])# _LT_AC_LANG_GCJ
2981
2982
2983 # AC_LIBTOOL_RC
2984 # --------------
2985 # enable support for Windows resource files
2986 AC_DEFUN([AC_LIBTOOL_RC],
2987 [AC_REQUIRE([LT_AC_PROG_RC])
2988 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2989 ])# AC_LIBTOOL_RC
2990
2991
2992 # AC_LIBTOOL_LANG_C_CONFIG
2993 # ------------------------
2994 # Ensure that the configuration vars for the C compiler are
2995 # suitably defined.  Those variables are subsequently used by
2996 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2997 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2998 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2999 [lt_save_CC="$CC"
3000 AC_LANG_PUSH(C)
3001
3002 # Source file extension for C test sources.
3003 ac_ext=c
3004
3005 # Object file extension for compiled C test sources.
3006 objext=o
3007 _LT_AC_TAGVAR(objext, $1)=$objext
3008
3009 # Code to be used in simple compile tests
3010 lt_simple_compile_test_code="int some_variable = 0;\n"
3011
3012 # Code to be used in simple link tests
3013 lt_simple_link_test_code='int main(){return(0);}\n'
3014
3015 _LT_AC_SYS_COMPILER
3016
3017 # save warnings/boilerplate of simple test code
3018 _LT_COMPILER_BOILERPLATE
3019 _LT_LINKER_BOILERPLATE
3020
3021 #
3022 # Check for any special shared library compilation flags.
3023 #
3024 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3025 if test "$GCC" = no; then
3026   case $host_os in
3027   sco3.2v5*)
3028     _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3029     ;;
3030   esac
3031 fi
3032 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3033   AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3034   if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[        ]]" >/dev/null; then :
3035   else
3036     AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3037     _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3038   fi
3039 fi
3040
3041
3042 #
3043 # Check to make sure the static flag actually works.
3044 #
3045 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3046   _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3047   $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3048   [],
3049   [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3050
3051
3052 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3053 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3054 AC_LIBTOOL_PROG_CC_C_O($1)
3055 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3056 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3057 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3058 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3059 AC_LIBTOOL_SYS_LIB_STRIP
3060 AC_LIBTOOL_DLOPEN_SELF($1)
3061
3062 # Report which librarie types wil actually be built
3063 AC_MSG_CHECKING([if libtool supports shared libraries])
3064 AC_MSG_RESULT([$can_build_shared])
3065
3066 AC_MSG_CHECKING([whether to build shared libraries])
3067 test "$can_build_shared" = "no" && enable_shared=no
3068
3069 # On AIX, shared libraries and static libraries use the same namespace, and
3070 # are all built from PIC.
3071 case $host_os in
3072 aix3*)
3073   test "$enable_shared" = yes && enable_static=no
3074   if test -n "$RANLIB"; then
3075     archive_cmds="$archive_cmds~\$RANLIB \$lib"
3076     postinstall_cmds='$RANLIB $lib'
3077   fi
3078   ;;
3079
3080 aix4* | aix5*)
3081   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3082     test "$enable_shared" = yes && enable_static=no
3083   fi
3084     ;;
3085 esac
3086 AC_MSG_RESULT([$enable_shared])
3087
3088 AC_MSG_CHECKING([whether to build static libraries])
3089 # Make sure either enable_shared or enable_static is yes.
3090 test "$enable_shared" = yes || enable_static=yes
3091 AC_MSG_RESULT([$enable_static])
3092
3093 AC_LIBTOOL_CONFIG($1)
3094
3095 AC_LANG_POP
3096 CC="$lt_save_CC"
3097 ])# AC_LIBTOOL_LANG_C_CONFIG
3098
3099
3100 # AC_LIBTOOL_LANG_CXX_CONFIG
3101 # --------------------------
3102 # Ensure that the configuration vars for the C compiler are
3103 # suitably defined.  Those variables are subsequently used by
3104 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3105 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3106 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3107 [AC_LANG_PUSH(C++)
3108 AC_REQUIRE([AC_PROG_CXX])
3109 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3110
3111 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3112 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3113 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3114 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3115 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3116 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3117 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3118 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3119 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3120 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3121 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3122 _LT_AC_TAGVAR(module_cmds, $1)=
3123 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3124 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3125 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3126 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3127 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3128 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3129
3130 # Dependencies to place before and after the object being linked:
3131 _LT_AC_TAGVAR(predep_objects, $1)=
3132 _LT_AC_TAGVAR(postdep_objects, $1)=
3133 _LT_AC_TAGVAR(predeps, $1)=
3134 _LT_AC_TAGVAR(postdeps, $1)=
3135 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3136
3137 # Source file extension for C++ test sources.
3138 ac_ext=cpp
3139
3140 # Object file extension for compiled C++ test sources.
3141 objext=o
3142 _LT_AC_TAGVAR(objext, $1)=$objext
3143
3144 # Code to be used in simple compile tests
3145 lt_simple_compile_test_code="int some_variable = 0;\n"
3146
3147 # Code to be used in simple link tests
3148 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3149
3150 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3151 _LT_AC_SYS_COMPILER
3152
3153 # save warnings/boilerplate of simple test code
3154 _LT_COMPILER_BOILERPLATE
3155 _LT_LINKER_BOILERPLATE
3156
3157 # Allow CC to be a program name with arguments.
3158 lt_save_CC=$CC
3159 lt_save_LD=$LD
3160 lt_save_GCC=$GCC
3161 GCC=$GXX
3162 lt_save_with_gnu_ld=$with_gnu_ld
3163 lt_save_path_LD=$lt_cv_path_LD
3164 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3165   lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3166 else
3167   unset lt_cv_prog_gnu_ld
3168 fi
3169 if test -n "${lt_cv_path_LDCXX+set}"; then
3170   lt_cv_path_LD=$lt_cv_path_LDCXX
3171 else
3172   unset lt_cv_path_LD
3173 fi
3174 test -z "${LDCXX+set}" || LD=$LDCXX
3175 CC=${CXX-"c++"}
3176 compiler=$CC
3177 _LT_AC_TAGVAR(compiler, $1)=$CC
3178 _LT_CC_BASENAME([$compiler])
3179
3180 # We don't want -fno-exception wen compiling C++ code, so set the
3181 # no_builtin_flag separately
3182 if test "$GXX" = yes; then
3183   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3184 else
3185   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3186 fi
3187
3188 if test "$GXX" = yes; then
3189   # Set up default GNU C++ configuration
3190
3191   AC_PROG_LD
3192
3193   # Check if GNU C++ uses GNU ld as the underlying linker, since the
3194   # archiving commands below assume that GNU ld is being used.
3195   if test "$with_gnu_ld" = yes; then
3196     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3197     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3198
3199     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3200     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3201
3202     # If archive_cmds runs LD, not CC, wlarc should be empty
3203     # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3204     #     investigate it a little bit more. (MM)
3205     wlarc='${wl}'
3206
3207     # ancient GNU ld didn't support --whole-archive et. al.
3208     if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3209         grep 'no-whole-archive' > /dev/null; then
3210       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3211     else
3212       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3213     fi
3214   else
3215     with_gnu_ld=no
3216     wlarc=
3217
3218     # A generic and very simple default shared library creation
3219     # command for GNU C++ for the case where it uses the native
3220     # linker, instead of GNU ld.  If possible, this setting should
3221     # overridden to take advantage of the native linker features on
3222     # the platform it is being used on.
3223     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3224   fi
3225
3226   # Commands to make compiler produce verbose output that lists
3227   # what "hidden" libraries, object files and flags are used when
3228   # linking a shared library.
3229   output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3230
3231 else
3232   GXX=no
3233   with_gnu_ld=no
3234   wlarc=
3235 fi
3236
3237 # PORTME: fill in a description of your system's C++ link characteristics
3238 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3239 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3240 case $host_os in
3241   aix3*)
3242     # FIXME: insert proper C++ library support
3243     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3244     ;;
3245   aix4* | aix5*)
3246     if test "$host_cpu" = ia64; then
3247       # On IA64, the linker does run time linking by default, so we don't
3248       # have to do anything special.
3249       aix_use_runtimelinking=no
3250       exp_sym_flag='-Bexport'
3251       no_entry_flag=""
3252     else
3253       aix_use_runtimelinking=no
3254
3255       # Test if we are trying to use run time linking or normal
3256       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3257       # need to do runtime linking.
3258       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3259         for ld_flag in $LDFLAGS; do
3260           case $ld_flag in
3261           *-brtl*)
3262             aix_use_runtimelinking=yes
3263             break
3264             ;;
3265           esac
3266         done
3267       esac
3268
3269       exp_sym_flag='-bexport'
3270       no_entry_flag='-bnoentry'
3271     fi
3272
3273     # When large executables or shared objects are built, AIX ld can
3274     # have problems creating the table of contents.  If linking a library
3275     # or program results in "error TOC overflow" add -mminimal-toc to
3276     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3277     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3278
3279     _LT_AC_TAGVAR(archive_cmds, $1)=''
3280     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3281     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3282     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3283
3284     if test "$GXX" = yes; then
3285       case $host_os in aix4.[[012]]|aix4.[[012]].*)
3286       # We only want to do this on AIX 4.2 and lower, the check
3287       # below for broken collect2 doesn't work under 4.3+
3288         collect2name=`${CC} -print-prog-name=collect2`
3289         if test -f "$collect2name" && \
3290            strings "$collect2name" | grep resolve_lib_name >/dev/null
3291         then
3292           # We have reworked collect2
3293           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3294         else
3295           # We have old collect2
3296           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3297           # It fails to find uninstalled libraries when the uninstalled
3298           # path is not listed in the libpath.  Setting hardcode_minus_L
3299           # to unsupported forces relinking
3300           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3301           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3302           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3303         fi
3304       esac
3305       shared_flag='-shared'
3306       if test "$aix_use_runtimelinking" = yes; then
3307         shared_flag="$shared_flag "'${wl}-G'
3308       fi
3309     else
3310       # not using gcc
3311       if test "$host_cpu" = ia64; then
3312         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3313         # chokes on -Wl,-G. The following line is correct:
3314         shared_flag='-G'
3315       else
3316         if test "$aix_use_runtimelinking" = yes; then
3317           shared_flag='${wl}-G'
3318         else
3319           shared_flag='${wl}-bM:SRE'
3320         fi
3321       fi
3322     fi
3323
3324     # It seems that -bexpall does not export symbols beginning with
3325     # underscore (_), so it is better to generate a list of symbols to export.
3326     _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3327     if test "$aix_use_runtimelinking" = yes; then
3328       # Warning - without using the other runtime loading flags (-brtl),
3329       # -berok will link without error, but may produce a broken library.
3330       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3331       # Determine the default libpath from the value encoded in an empty executable.
3332       _LT_AC_SYS_LIBPATH_AIX
3333       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3334
3335       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3336      else
3337       if test "$host_cpu" = ia64; then
3338         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3339         _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3340         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3341       else
3342         # Determine the default libpath from the value encoded in an empty executable.
3343         _LT_AC_SYS_LIBPATH_AIX
3344         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3345         # Warning - without using the other run time loading flags,
3346         # -berok will link without error, but may produce a broken library.
3347         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3348         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3349         # -bexpall does not export symbols beginning with underscore (_)
3350         _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3351         # Exported symbols can be pulled into shared objects from archives
3352         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3353         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3354         # This is similar to how AIX traditionally builds its shared libraries.
3355         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3356       fi
3357     fi
3358     ;;
3359   chorus*)
3360     case $cc_basename in
3361       *)
3362         # FIXME: insert proper C++ library support
3363         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3364         ;;
3365     esac
3366     ;;
3367
3368
3369   cygwin* | mingw* | pw32*)
3370     # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3371     # as there is no search path for DLLs.
3372     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3373     _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3374     _LT_AC_TAGVAR(always_export_symbols, $1)=no
3375     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3376
3377     if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3378       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3379       # If the export-symbols file already is a .def file (1st line
3380       # is EXPORTS), use it as is; otherwise, prepend...
3381       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3382         cp $export_symbols $output_objdir/$soname.def;
3383       else
3384         echo EXPORTS > $output_objdir/$soname.def;
3385         cat $export_symbols >> $output_objdir/$soname.def;
3386       fi~
3387       $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3388     else
3389       _LT_AC_TAGVAR(ld_shlibs, $1)=no
3390     fi
3391   ;;
3392       darwin* | rhapsody*)
3393         case $host_os in
3394         rhapsody* | darwin1.[[012]])
3395          _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3396          ;;
3397        *) # Darwin 1.3 on
3398          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3399            _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3400          else
3401            case ${MACOSX_DEPLOYMENT_TARGET} in
3402              10.[[012]])
3403                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3404                ;;
3405              10.*)
3406                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3407                ;;
3408            esac
3409          fi
3410          ;;
3411         esac
3412       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3413       _LT_AC_TAGVAR(hardcode_direct, $1)=no
3414       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3415       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3416       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3417       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3418
3419     if test "$GXX" = yes ; then
3420       lt_int_apple_cc_single_mod=no
3421       output_verbose_link_cmd='echo'
3422       if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3423        lt_int_apple_cc_single_mod=yes
3424       fi
3425       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3426        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3427       else
3428           _LT_AC_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'
3429         fi
3430         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3431         # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3432           if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3433             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3434           else
3435             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3436           fi
3437             _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3438       else
3439       case $cc_basename in
3440         xlc*)
3441          output_verbose_link_cmd='echo'
3442           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3443           _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3444           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3445           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3446           _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3447           ;;
3448        *)
3449          _LT_AC_TAGVAR(ld_shlibs, $1)=no
3450           ;;
3451       esac
3452       fi
3453         ;;
3454
3455   dgux*)
3456     case $cc_basename in
3457       ec++*)
3458         # FIXME: insert proper C++ library support
3459         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3460         ;;
3461       ghcx*)
3462         # Green Hills C++ Compiler
3463         # FIXME: insert proper C++ library support
3464         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3465         ;;
3466       *)
3467         # FIXME: insert proper C++ library support
3468         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3469         ;;
3470     esac
3471     ;;
3472   freebsd[[12]]*)
3473     # C++ shared libraries reported to be fairly broken before switch to ELF
3474     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3475     ;;
3476   freebsd-elf*)
3477     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3478     ;;
3479   freebsd* | kfreebsd*-gnu | dragonfly*)
3480     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3481     # conventions
3482     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3483     ;;
3484   gnu*)
3485     ;;
3486   hpux9*)
3487     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3488     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3489     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3490     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3491     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3492                                 # but as the default
3493                                 # location of the library.
3494
3495     case $cc_basename in
3496     CC*)
3497       # FIXME: insert proper C++ library support
3498       _LT_AC_TAGVAR(ld_shlibs, $1)=no
3499       ;;
3500     aCC*)
3501       _LT_AC_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'
3502       # Commands to make compiler produce verbose output that lists
3503       # what "hidden" libraries, object files and flags are used when
3504       # linking a shared library.
3505       #
3506       # There doesn't appear to be a way to prevent this compiler from
3507       # explicitly linking system object files so we need to strip them
3508       # from the output so that they don't get included in the library
3509       # dependencies.
3510       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; echo $list'
3511       ;;
3512     *)
3513       if test "$GXX" = yes; then
3514         _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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'
3515       else
3516         # FIXME: insert proper C++ library support
3517         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3518       fi
3519       ;;
3520     esac
3521     ;;
3522   hpux10*|hpux11*)
3523     if test $with_gnu_ld = no; then
3524       case $host_cpu in
3525       hppa*64*)
3526         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3527         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3528         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3529         ;;
3530       ia64*)
3531         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3532         ;;
3533       *)
3534         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3535         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3536         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3537         ;;
3538       esac
3539     fi
3540     case $host_cpu in
3541     hppa*64*)
3542       _LT_AC_TAGVAR(hardcode_direct, $1)=no
3543       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3544       ;;
3545     ia64*)
3546       _LT_AC_TAGVAR(hardcode_direct, $1)=no
3547       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3548       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3549                                               # but as the default
3550                                               # location of the library.
3551       ;;
3552     *)
3553       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3554       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3555                                               # but as the default
3556                                               # location of the library.
3557       ;;
3558     esac
3559
3560     case $cc_basename in
3561       CC*)
3562         # FIXME: insert proper C++ library support
3563         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3564         ;;
3565       aCC*)
3566         case $host_cpu in
3567         hppa*64*|ia64*)
3568           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3569           ;;
3570         *)
3571           _LT_AC_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'
3572           ;;
3573         esac
3574         # Commands to make compiler produce verbose output that lists
3575         # what "hidden" libraries, object files and flags are used when
3576         # linking a shared library.
3577         #
3578         # There doesn't appear to be a way to prevent this compiler from
3579         # explicitly linking system object files so we need to strip them
3580         # from the output so that they don't get included in the library
3581         # dependencies.
3582         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; echo $list'
3583         ;;
3584       *)
3585         if test "$GXX" = yes; then
3586           if test $with_gnu_ld = no; then
3587             case $host_cpu in
3588             ia64*|hppa*64*)
3589               _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3590               ;;
3591             *)
3592               _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3593               ;;
3594             esac
3595           fi
3596         else
3597           # FIXME: insert proper C++ library support
3598           _LT_AC_TAGVAR(ld_shlibs, $1)=no
3599         fi
3600         ;;
3601     esac
3602     ;;
3603   irix5* | irix6*)
3604     case $cc_basename in
3605       CC*)
3606         # SGI C++
3607         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3608
3609         # Archives containing C++ object files must be created using
3610         # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3611         # necessary to make sure instantiated templates are included
3612         # in the archive.
3613         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3614         ;;
3615       *)
3616         if test "$GXX" = yes; then
3617           if test "$with_gnu_ld" = no; then
3618             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3619           else
3620             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3621           fi
3622         fi
3623         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3624         ;;
3625     esac
3626     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3627     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3628     ;;
3629   linux*)
3630     case $cc_basename in
3631       KCC*)
3632         # Kuck and Associates, Inc. (KAI) C++ Compiler
3633
3634         # KCC will only create a shared library if the output file
3635         # ends with ".so" (or ".sl" for HP-UX), so rename the library
3636         # to its proper name (with version) after linking.
3637         _LT_AC_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'
3638         _LT_AC_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'
3639         # Commands to make compiler produce verbose output that lists
3640         # what "hidden" libraries, object files and flags are used when
3641         # linking a shared library.
3642         #
3643         # There doesn't appear to be a way to prevent this compiler from
3644         # explicitly linking system object files so we need to strip them
3645         # from the output so that they don't get included in the library
3646         # dependencies.
3647         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; echo $list'
3648
3649         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3650         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3651
3652         # Archives containing C++ object files must be created using
3653         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3654         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3655         ;;
3656       icpc*)
3657         # Intel C++
3658         with_gnu_ld=yes
3659         # version 8.0 and above of icpc choke on multiply defined symbols
3660         # if we add $predep_objects and $postdep_objects, however 7.1 and
3661         # earlier do not add the objects themselves.
3662         case `$CC -V 2>&1` in
3663         *"Version 7."*)
3664           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3665           _LT_AC_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'
3666           ;;
3667         *)  # Version 8.0 or newer
3668           tmp_idyn=
3669           case $host_cpu in
3670             ia64*) tmp_idyn=' -i_dynamic';;
3671           esac
3672           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3673           _LT_AC_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'
3674           ;;
3675         esac
3676         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3677         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3678         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3679         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3680         ;;
3681       pgCC*)
3682         # Portland Group C++ compiler
3683         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3684         _LT_AC_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'
3685
3686         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3687         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3688         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3689         ;;
3690       cxx*)
3691         # Compaq C++
3692         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3693         _LT_AC_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'
3694
3695         runpath_var=LD_RUN_PATH
3696         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3697         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3698
3699         # Commands to make compiler produce verbose output that lists
3700         # what "hidden" libraries, object files and flags are used when
3701         # linking a shared library.
3702         #
3703         # There doesn't appear to be a way to prevent this compiler from
3704         # explicitly linking system object files so we need to strip them
3705         # from the output so that they don't get included in the library
3706         # dependencies.
3707         output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list'
3708         ;;
3709     esac
3710     ;;
3711   lynxos*)
3712     # FIXME: insert proper C++ library support
3713     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3714     ;;
3715   m88k*)
3716     # FIXME: insert proper C++ library support
3717     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3718     ;;
3719   mvs*)
3720     case $cc_basename in
3721       cxx*)
3722         # FIXME: insert proper C++ library support
3723         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3724         ;;
3725       *)
3726         # FIXME: insert proper C++ library support
3727         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3728         ;;
3729     esac
3730     ;;
3731   netbsd*)
3732     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3733       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3734       wlarc=
3735       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3736       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3737       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3738     fi
3739     # Workaround some broken pre-1.5 toolchains
3740     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3741     ;;
3742   openbsd2*)
3743     # C++ shared libraries are fairly broken
3744     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3745     ;;
3746   openbsd*)
3747     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3748     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3749     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3750     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3751     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3752       _LT_AC_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'
3753       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3754       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3755     fi
3756     output_verbose_link_cmd='echo'
3757     ;;
3758   osf3*)
3759     case $cc_basename in
3760       KCC*)
3761         # Kuck and Associates, Inc. (KAI) C++ Compiler
3762
3763         # KCC will only create a shared library if the output file
3764         # ends with ".so" (or ".sl" for HP-UX), so rename the library
3765         # to its proper name (with version) after linking.
3766         _LT_AC_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'
3767
3768         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3769         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3770
3771         # Archives containing C++ object files must be created using
3772         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3773         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3774
3775         ;;
3776       RCC*)
3777         # Rational C++ 2.4.1
3778         # FIXME: insert proper C++ library support
3779         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3780         ;;
3781       cxx*)
3782         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3783         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3784
3785         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3786         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3787
3788         # Commands to make compiler produce verbose output that lists
3789         # what "hidden" libraries, object files and flags are used when
3790         # linking a shared library.
3791         #
3792         # There doesn't appear to be a way to prevent this compiler from
3793         # explicitly linking system object files so we need to strip them
3794         # from the output so that they don't get included in the library
3795         # dependencies.
3796         output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
3797         ;;
3798       *)
3799         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3800           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3801           _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3802
3803           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3804           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3805
3806           # Commands to make compiler produce verbose output that lists
3807           # what "hidden" libraries, object files and flags are used when
3808           # linking a shared library.
3809           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3810
3811         else
3812           # FIXME: insert proper C++ library support
3813           _LT_AC_TAGVAR(ld_shlibs, $1)=no
3814         fi
3815         ;;
3816     esac
3817     ;;
3818   osf4* | osf5*)
3819     case $cc_basename in
3820       KCC*)
3821         # Kuck and Associates, Inc. (KAI) C++ Compiler
3822
3823         # KCC will only create a shared library if the output file
3824         # ends with ".so" (or ".sl" for HP-UX), so rename the library
3825         # to its proper name (with version) after linking.
3826         _LT_AC_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'
3827
3828         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3829         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3830
3831         # Archives containing C++ object files must be created using
3832         # the KAI C++ compiler.
3833         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3834         ;;
3835       RCC*)
3836         # Rational C++ 2.4.1
3837         # FIXME: insert proper C++ library support
3838         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3839         ;;
3840       cxx*)
3841         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3842         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3843         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3844           echo "-hidden">> $lib.exp~
3845           $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~
3846           $rm $lib.exp'
3847
3848         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3849         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3850
3851         # Commands to make compiler produce verbose output that lists
3852         # what "hidden" libraries, object files and flags are used when
3853         # linking a shared library.
3854         #
3855         # There doesn't appear to be a way to prevent this compiler from
3856         # explicitly linking system object files so we need to strip them
3857         # from the output so that they don't get included in the library
3858         # dependencies.
3859         output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
3860         ;;
3861       *)
3862         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3863           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3864          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3865
3866           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3867           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3868
3869           # Commands to make compiler produce verbose output that lists
3870           # what "hidden" libraries, object files and flags are used when
3871           # linking a shared library.
3872           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3873
3874         else
3875           # FIXME: insert proper C++ library support
3876           _LT_AC_TAGVAR(ld_shlibs, $1)=no
3877         fi
3878         ;;
3879     esac
3880     ;;
3881   psos*)
3882     # FIXME: insert proper C++ library support
3883     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3884     ;;
3885   sco*)
3886     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3887     case $cc_basename in
3888       CC*)
3889         # FIXME: insert proper C++ library support
3890         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3891         ;;
3892       *)
3893         # FIXME: insert proper C++ library support
3894         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3895         ;;
3896     esac
3897     ;;
3898   sunos4*)
3899     case $cc_basename in
3900       CC*)
3901         # Sun C++ 4.x
3902         # FIXME: insert proper C++ library support
3903         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3904         ;;
3905       lcc*)
3906         # Lucid
3907         # FIXME: insert proper C++ library support
3908         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3909         ;;
3910       *)
3911         # FIXME: insert proper C++ library support
3912         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3913         ;;
3914     esac
3915     ;;
3916   solaris*)
3917     case $cc_basename in
3918       CC*)
3919         # Sun C++ 4.2, 5.x and Centerline C++
3920         _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3921         _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3922         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3923         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3924         $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'
3925
3926         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3927         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3928         case $host_os in
3929           solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3930           *)
3931             # The C++ compiler is used as linker so we must use $wl
3932             # flag to pass the commands to the underlying system
3933             # linker. We must also pass each convience library through
3934             # to the system linker between allextract/defaultextract.
3935             # The C++ compiler will combine linker options so we
3936             # cannot just pass the convience library names through
3937             # without $wl.
3938             # Supported since Solaris 2.6 (maybe 2.5.1?)
3939             _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
3940             ;;
3941         esac
3942         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3943
3944         output_verbose_link_cmd='echo'
3945
3946         # Archives containing C++ object files must be created using
3947         # "CC -xar", where "CC" is the Sun C++ compiler.  This is
3948         # necessary to make sure instantiated templates are included
3949         # in the archive.
3950         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3951         ;;
3952       gcx*)
3953         # Green Hills C++ Compiler
3954         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3955
3956         # The C++ compiler must be used to create the archive.
3957         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3958         ;;
3959       *)
3960         # GNU C++ compiler with Solaris linker
3961         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3962           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3963           if $CC --version | grep -v '^2\.7' > /dev/null; then
3964             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3965             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3966                 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3967
3968             # Commands to make compiler produce verbose output that lists
3969             # what "hidden" libraries, object files and flags are used when
3970             # linking a shared library.
3971             output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3972           else
3973             # g++ 2.7 appears to require `-G' NOT `-shared' on this
3974             # platform.
3975             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3976             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3977                 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3978
3979             # Commands to make compiler produce verbose output that lists
3980             # what "hidden" libraries, object files and flags are used when
3981             # linking a shared library.
3982             output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3983           fi
3984
3985           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3986         fi
3987         ;;
3988     esac
3989     ;;
3990   sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3991     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3992     ;;
3993   tandem*)
3994     case $cc_basename in
3995       NCC*)
3996         # NonStop-UX NCC 3.20
3997         # FIXME: insert proper C++ library support
3998         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3999         ;;
4000       *)
4001         # FIXME: insert proper C++ library support
4002         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4003         ;;
4004     esac
4005     ;;
4006   vxworks*)
4007     # FIXME: insert proper C++ library support
4008     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4009     ;;
4010   *)
4011     # FIXME: insert proper C++ library support
4012     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4013     ;;
4014 esac
4015 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4016 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4017
4018 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4019 _LT_AC_TAGVAR(LD, $1)="$LD"
4020
4021 AC_LIBTOOL_POSTDEP_PREDEP($1)
4022 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4023 AC_LIBTOOL_PROG_CC_C_O($1)
4024 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4025 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4026 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4027 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4028 AC_LIBTOOL_SYS_LIB_STRIP
4029 AC_LIBTOOL_DLOPEN_SELF($1)
4030
4031 AC_LIBTOOL_CONFIG($1)
4032
4033 AC_LANG_POP
4034 CC=$lt_save_CC
4035 LDCXX=$LD
4036 LD=$lt_save_LD
4037 GCC=$lt_save_GCC
4038 with_gnu_ldcxx=$with_gnu_ld
4039 with_gnu_ld=$lt_save_with_gnu_ld
4040 lt_cv_path_LDCXX=$lt_cv_path_LD
4041 lt_cv_path_LD=$lt_save_path_LD
4042 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4043 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4044 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4045
4046 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4047 # ------------------------
4048 # Figure out "hidden" library dependencies from verbose
4049 # compiler output when linking a shared library.
4050 # Parse the compiler output and extract the necessary
4051 # objects, libraries and library flags.
4052 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4053 dnl we can't use the lt_simple_compile_test_code here,
4054 dnl because it contains code intended for an executable,
4055 dnl not a library.  It's possible we should let each
4056 dnl tag define a new lt_????_link_test_code variable,
4057 dnl but it's only used here...
4058 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4059 int a;
4060 void foo (void) { a = 0; }
4061 EOF
4062 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4063 class Foo
4064 {
4065 public:
4066   Foo (void) { a = 0; }
4067 private:
4068   int a;
4069 };
4070 EOF
4071 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4072       subroutine foo
4073       implicit none
4074       integer*4 a
4075       a=0
4076       return
4077       end
4078 EOF
4079 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4080 public class foo {
4081   private int a;
4082   public void bar (void) {
4083     a = 0;
4084   }
4085 };
4086 EOF
4087 ])
4088 dnl Parse the compiler output and extract the necessary
4089 dnl objects, libraries and library flags.
4090 if AC_TRY_EVAL(ac_compile); then
4091   # Parse the compiler output and extract the necessary
4092   # objects, libraries and library flags.
4093
4094   # Sentinel used to keep track of whether or not we are before
4095   # the conftest object file.
4096   pre_test_object_deps_done=no
4097
4098   # The `*' in the case matches for architectures that use `case' in
4099   # $output_verbose_cmd can trigger glob expansion during the loop
4100   # eval without this substitution.
4101   output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4102
4103   for p in `eval $output_verbose_link_cmd`; do
4104     case $p in
4105
4106     -L* | -R* | -l*)
4107        # Some compilers place space between "-{L,R}" and the path.
4108        # Remove the space.
4109        if test $p = "-L" \
4110           || test $p = "-R"; then
4111          prev=$p
4112          continue
4113        else
4114          prev=
4115        fi
4116
4117        if test "$pre_test_object_deps_done" = no; then
4118          case $p in
4119          -L* | -R*)
4120            # Internal compiler library paths should come after those
4121            # provided the user.  The postdeps already come after the
4122            # user supplied libs so there is no need to process them.
4123            if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4124              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4125            else
4126              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4127            fi
4128            ;;
4129          # The "-l" case would never come before the object being
4130          # linked, so don't bother handling this case.
4131          esac
4132        else
4133          if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4134            _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4135          else
4136            _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4137          fi
4138        fi
4139        ;;
4140
4141     *.$objext)
4142        # This assumes that the test object file only shows up
4143        # once in the compiler output.
4144        if test "$p" = "conftest.$objext"; then
4145          pre_test_object_deps_done=yes
4146          continue
4147        fi
4148
4149        if test "$pre_test_object_deps_done" = no; then
4150          if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4151            _LT_AC_TAGVAR(predep_objects, $1)="$p"
4152          else
4153            _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4154          fi
4155        else
4156          if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4157            _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4158          else
4159            _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4160          fi
4161        fi
4162        ;;
4163
4164     *) ;; # Ignore the rest.
4165
4166     esac
4167   done
4168
4169   # Clean up.
4170   rm -f a.out a.exe
4171 else
4172   echo "libtool.m4: error: problem compiling $1 test program"
4173 fi
4174
4175 $rm -f confest.$objext
4176
4177 # PORTME: override above test on systems where it is broken
4178 ifelse([$1],[CXX],
4179 [case $host_os in
4180 solaris*)
4181   case $cc_basename in
4182   CC*)
4183     # Adding this requires a known-good setup of shared libraries for
4184     # Sun compiler versions before 5.6, else PIC objects from an old
4185     # archive will be linked into the output, leading to subtle bugs.
4186     _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
4187     ;;
4188   esac
4189 esac
4190 ])
4191
4192 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4193 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4194 esac
4195 ])# AC_LIBTOOL_POSTDEP_PREDEP
4196
4197 # AC_LIBTOOL_LANG_F77_CONFIG
4198 # ------------------------
4199 # Ensure that the configuration vars for the C compiler are
4200 # suitably defined.  Those variables are subsequently used by
4201 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4202 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4203 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4204 [AC_REQUIRE([AC_PROG_F77])
4205 AC_LANG_PUSH(Fortran 77)
4206
4207 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4208 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4209 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4210 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4211 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4212 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4213 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4214 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4215 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4216 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4217 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4218 _LT_AC_TAGVAR(module_cmds, $1)=
4219 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4220 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4221 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4222 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4223 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4224 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4225
4226 # Source file extension for f77 test sources.
4227 ac_ext=f
4228
4229 # Object file extension for compiled f77 test sources.
4230 objext=o
4231 _LT_AC_TAGVAR(objext, $1)=$objext
4232
4233 # Code to be used in simple compile tests
4234 lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
4235
4236 # Code to be used in simple link tests
4237 lt_simple_link_test_code="      program t\n      end\n"
4238
4239 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4240 _LT_AC_SYS_COMPILER
4241
4242 # save warnings/boilerplate of simple test code
4243 _LT_COMPILER_BOILERPLATE
4244 _LT_LINKER_BOILERPLATE
4245
4246 # Allow CC to be a program name with arguments.
4247 lt_save_CC="$CC"
4248 CC=${F77-"f77"}
4249 compiler=$CC
4250 _LT_AC_TAGVAR(compiler, $1)=$CC
4251 _LT_CC_BASENAME([$compiler])
4252
4253 AC_MSG_CHECKING([if libtool supports shared libraries])
4254 AC_MSG_RESULT([$can_build_shared])
4255
4256 AC_MSG_CHECKING([whether to build shared libraries])
4257 test "$can_build_shared" = "no" && enable_shared=no
4258
4259 # On AIX, shared libraries and static libraries use the same namespace, and
4260 # are all built from PIC.
4261 case $host_os in
4262 aix3*)
4263   test "$enable_shared" = yes && enable_static=no
4264   if test -n "$RANLIB"; then
4265     archive_cmds="$archive_cmds~\$RANLIB \$lib"
4266     postinstall_cmds='$RANLIB $lib'
4267   fi
4268   ;;
4269 aix4* | aix5*)
4270   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4271     test "$enable_shared" = yes && enable_static=no
4272   fi
4273   ;;
4274 esac
4275 AC_MSG_RESULT([$enable_shared])
4276
4277 AC_MSG_CHECKING([whether to build static libraries])
4278 # Make sure either enable_shared or enable_static is yes.
4279 test "$enable_shared" = yes || enable_static=yes
4280 AC_MSG_RESULT([$enable_static])
4281
4282 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4283
4284 _LT_AC_TAGVAR(GCC, $1)="$G77"
4285 _LT_AC_TAGVAR(LD, $1)="$LD"
4286
4287 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4288 AC_LIBTOOL_PROG_CC_C_O($1)
4289 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4290 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4291 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4292 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4293 AC_LIBTOOL_SYS_LIB_STRIP
4294
4295
4296 AC_LIBTOOL_CONFIG($1)
4297
4298 AC_LANG_POP
4299 CC="$lt_save_CC"
4300 ])# AC_LIBTOOL_LANG_F77_CONFIG
4301
4302
4303 # AC_LIBTOOL_LANG_GCJ_CONFIG
4304 # --------------------------
4305 # Ensure that the configuration vars for the C compiler are
4306 # suitably defined.  Those variables are subsequently used by
4307 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4308 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4309 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4310 [AC_LANG_SAVE
4311
4312 # Source file extension for Java test sources.
4313 ac_ext=java
4314
4315 # Object file extension for compiled Java test sources.
4316 objext=o
4317 _LT_AC_TAGVAR(objext, $1)=$objext
4318
4319 # Code to be used in simple compile tests
4320 lt_simple_compile_test_code="class foo {}\n"
4321
4322 # Code to be used in simple link tests
4323 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4324
4325 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4326 _LT_AC_SYS_COMPILER
4327
4328 # save warnings/boilerplate of simple test code
4329 _LT_COMPILER_BOILERPLATE
4330 _LT_LINKER_BOILERPLATE
4331
4332 # Allow CC to be a program name with arguments.
4333 lt_save_CC="$CC"
4334 CC=${GCJ-"gcj"}
4335 compiler=$CC
4336 _LT_AC_TAGVAR(compiler, $1)=$CC
4337 _LT_CC_BASENAME([$compiler])
4338
4339 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4340 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4341
4342 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4343
4344 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4345 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4346 AC_LIBTOOL_PROG_CC_C_O($1)
4347 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4348 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4349 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4350 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4351 AC_LIBTOOL_SYS_LIB_STRIP
4352 AC_LIBTOOL_DLOPEN_SELF($1)
4353
4354 AC_LIBTOOL_CONFIG($1)
4355
4356 AC_LANG_RESTORE
4357 CC="$lt_save_CC"
4358 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4359
4360
4361 # AC_LIBTOOL_LANG_RC_CONFIG
4362 # --------------------------
4363 # Ensure that the configuration vars for the Windows resource compiler are
4364 # suitably defined.  Those variables are subsequently used by
4365 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4366 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4367 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4368 [AC_LANG_SAVE
4369
4370 # Source file extension for RC test sources.
4371 ac_ext=rc
4372
4373 # Object file extension for compiled RC test sources.
4374 objext=o
4375 _LT_AC_TAGVAR(objext, $1)=$objext
4376
4377 # Code to be used in simple compile tests
4378 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4379
4380 # Code to be used in simple link tests
4381 lt_simple_link_test_code="$lt_simple_compile_test_code"
4382
4383 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4384 _LT_AC_SYS_COMPILER
4385
4386 # save warnings/boilerplate of simple test code
4387 _LT_COMPILER_BOILERPLATE
4388 _LT_LINKER_BOILERPLATE
4389
4390 # Allow CC to be a program name with arguments.
4391 lt_save_CC="$CC"
4392 CC=${RC-"windres"}
4393 compiler=$CC
4394 _LT_AC_TAGVAR(compiler, $1)=$CC
4395 _LT_CC_BASENAME([$compiler])
4396 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4397
4398 AC_LIBTOOL_CONFIG($1)
4399
4400 AC_LANG_RESTORE
4401 CC="$lt_save_CC"
4402 ])# AC_LIBTOOL_LANG_RC_CONFIG
4403
4404
4405 # AC_LIBTOOL_CONFIG([TAGNAME])
4406 # ----------------------------
4407 # If TAGNAME is not passed, then create an initial libtool script
4408 # with a default configuration from the untagged config vars.  Otherwise
4409 # add code to config.status for appending the configuration named by
4410 # TAGNAME from the matching tagged config vars.
4411 AC_DEFUN([AC_LIBTOOL_CONFIG],
4412 [# The else clause should only fire when bootstrapping the
4413 # libtool distribution, otherwise you forgot to ship ltmain.sh
4414 # with your package, and you will get complaints that there are
4415 # no rules to generate ltmain.sh.
4416 if test -f "$ltmain"; then
4417   # See if we are running on zsh, and set the options which allow our commands through
4418   # without removal of \ escapes.
4419   if test -n "${ZSH_VERSION+set}" ; then
4420     setopt NO_GLOB_SUBST
4421   fi
4422   # Now quote all the things that may contain metacharacters while being
4423   # careful not to overquote the AC_SUBSTed values.  We take copies of the
4424   # variables and quote the copies for generation of the libtool script.
4425   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4426     SED SHELL STRIP \
4427     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4428     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4429     deplibs_check_method reload_flag reload_cmds need_locks \
4430     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4431     lt_cv_sys_global_symbol_to_c_name_address \
4432     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4433     old_postinstall_cmds old_postuninstall_cmds \
4434     _LT_AC_TAGVAR(compiler, $1) \
4435     _LT_AC_TAGVAR(CC, $1) \
4436     _LT_AC_TAGVAR(LD, $1) \
4437     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4438     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4439     _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4440     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4441     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4442     _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4443     _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4444     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4445     _LT_AC_TAGVAR(old_archive_cmds, $1) \
4446     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4447     _LT_AC_TAGVAR(predep_objects, $1) \
4448     _LT_AC_TAGVAR(postdep_objects, $1) \
4449     _LT_AC_TAGVAR(predeps, $1) \
4450     _LT_AC_TAGVAR(postdeps, $1) \
4451     _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4452     _LT_AC_TAGVAR(archive_cmds, $1) \
4453     _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4454     _LT_AC_TAGVAR(postinstall_cmds, $1) \
4455     _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4456     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4457     _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4458     _LT_AC_TAGVAR(no_undefined_flag, $1) \
4459     _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4460     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4461     _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4462     _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4463     _LT_AC_TAGVAR(hardcode_automatic, $1) \
4464     _LT_AC_TAGVAR(module_cmds, $1) \
4465     _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4466     _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4467     _LT_AC_TAGVAR(exclude_expsyms, $1) \
4468     _LT_AC_TAGVAR(include_expsyms, $1); do
4469
4470     case $var in
4471     _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4472     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4473     _LT_AC_TAGVAR(archive_cmds, $1) | \
4474     _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4475     _LT_AC_TAGVAR(module_cmds, $1) | \
4476     _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4477     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4478     _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4479     extract_expsyms_cmds | reload_cmds | finish_cmds | \
4480     postinstall_cmds | postuninstall_cmds | \
4481     old_postinstall_cmds | old_postuninstall_cmds | \
4482     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4483       # Double-quote double-evaled strings.
4484       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4485       ;;
4486     *)
4487       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4488       ;;
4489     esac
4490   done
4491
4492   case $lt_echo in
4493   *'\[$]0 --fallback-echo"')
4494     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4495     ;;
4496   esac
4497
4498 ifelse([$1], [],
4499   [cfgfile="${ofile}T"
4500   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4501   $rm -f "$cfgfile"
4502   AC_MSG_NOTICE([creating $ofile])],
4503   [cfgfile="$ofile"])
4504
4505   cat <<__EOF__ >> "$cfgfile"
4506 ifelse([$1], [],
4507 [#! $SHELL
4508
4509 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4510 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4511 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4512 #
4513 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4514 # Free Software Foundation, Inc.
4515 #
4516 # This file is part of GNU Libtool:
4517 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4518 #
4519 # This program is free software; you can redistribute it and/or modify
4520 # it under the terms of the GNU General Public License as published by
4521 # the Free Software Foundation; either version 2 of the License, or
4522 # (at your option) any later version.
4523 #
4524 # This program is distributed in the hope that it will be useful, but
4525 # WITHOUT ANY WARRANTY; without even the implied warranty of
4526 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4527 # General Public License for more details.
4528 #
4529 # You should have received a copy of the GNU General Public License
4530 # along with this program; if not, write to the Free Software
4531 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4532 #
4533 # As a special exception to the GNU General Public License, if you
4534 # distribute this file as part of a program that contains a
4535 # configuration script generated by Autoconf, you may include it under
4536 # the same distribution terms that you use for the rest of that program.
4537
4538 # A sed program that does not truncate output.
4539 SED=$lt_SED
4540
4541 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4542 Xsed="$SED -e 1s/^X//"
4543
4544 # The HP-UX ksh and POSIX shell print the target directory to stdout
4545 # if CDPATH is set.
4546 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4547
4548 # The names of the tagged configurations supported by this script.
4549 available_tags=
4550
4551 # ### BEGIN LIBTOOL CONFIG],
4552 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4553
4554 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4555
4556 # Shell to use when invoking shell scripts.
4557 SHELL=$lt_SHELL
4558
4559 # Whether or not to build shared libraries.
4560 build_libtool_libs=$enable_shared
4561
4562 # Whether or not to build static libraries.
4563 build_old_libs=$enable_static
4564
4565 # Whether or not to add -lc for building shared libraries.
4566 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4567
4568 # Whether or not to disallow shared libs when runtime libs are static
4569 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4570
4571 # Whether or not to optimize for fast installation.
4572 fast_install=$enable_fast_install
4573
4574 # The host system.
4575 host_alias=$host_alias
4576 host=$host
4577 host_os=$host_os
4578
4579 # The build system.
4580 build_alias=$build_alias
4581 build=$build
4582 build_os=$build_os
4583
4584 # An echo program that does not interpret backslashes.
4585 echo=$lt_echo
4586
4587 # The archiver.
4588 AR=$lt_AR
4589 AR_FLAGS=$lt_AR_FLAGS
4590
4591 # A C compiler.
4592 LTCC=$lt_LTCC
4593
4594 # A language-specific compiler.
4595 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4596
4597 # Is the compiler the GNU C compiler?
4598 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4599
4600 # An ERE matcher.
4601 EGREP=$lt_EGREP
4602
4603 # The linker used to build libraries.
4604 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4605
4606 # Whether we need hard or soft links.
4607 LN_S=$lt_LN_S
4608
4609 # A BSD-compatible nm program.
4610 NM=$lt_NM
4611
4612 # A symbol stripping program
4613 STRIP=$lt_STRIP
4614
4615 # Used to examine libraries when file_magic_cmd begins "file"
4616 MAGIC_CMD=$MAGIC_CMD
4617
4618 # Used on cygwin: DLL creation program.
4619 DLLTOOL="$DLLTOOL"
4620
4621 # Used on cygwin: object dumper.
4622 OBJDUMP="$OBJDUMP"
4623
4624 # Used on cygwin: assembler.
4625 AS="$AS"
4626
4627 # The name of the directory that contains temporary libtool files.
4628 objdir=$objdir
4629
4630 # How to create reloadable object files.
4631 reload_flag=$lt_reload_flag
4632 reload_cmds=$lt_reload_cmds
4633
4634 # How to pass a linker flag through the compiler.
4635 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4636
4637 # Object file suffix (normally "o").
4638 objext="$ac_objext"
4639
4640 # Old archive suffix (normally "a").
4641 libext="$libext"
4642
4643 # Shared library suffix (normally ".so").
4644 shrext_cmds='$shrext_cmds'
4645
4646 # Executable file suffix (normally "").
4647 exeext="$exeext"
4648
4649 # Additional compiler flags for building library objects.
4650 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4651 pic_mode=$pic_mode
4652
4653 # What is the maximum length of a command?
4654 max_cmd_len=$lt_cv_sys_max_cmd_len
4655
4656 # Does compiler simultaneously support -c and -o options?
4657 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4658
4659 # Must we lock files when doing compilation?
4660 need_locks=$lt_need_locks
4661
4662 # Do we need the lib prefix for modules?
4663 need_lib_prefix=$need_lib_prefix
4664
4665 # Do we need a version for libraries?
4666 need_version=$need_version
4667
4668 # Whether dlopen is supported.
4669 dlopen_support=$enable_dlopen
4670
4671 # Whether dlopen of programs is supported.
4672 dlopen_self=$enable_dlopen_self
4673
4674 # Whether dlopen of statically linked programs is supported.
4675 dlopen_self_static=$enable_dlopen_self_static
4676
4677 # Compiler flag to prevent dynamic linking.
4678 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4679
4680 # Compiler flag to turn off builtin functions.
4681 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4682
4683 # Compiler flag to allow reflexive dlopens.
4684 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4685
4686 # Compiler flag to generate shared objects directly from archives.
4687 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4688
4689 # Compiler flag to generate thread-safe objects.
4690 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4691
4692 # Library versioning type.
4693 version_type=$version_type
4694
4695 # Format of library name prefix.
4696 libname_spec=$lt_libname_spec
4697
4698 # List of archive names.  First name is the real one, the rest are links.
4699 # The last name is the one that the linker finds with -lNAME.
4700 library_names_spec=$lt_library_names_spec
4701
4702 # The coded name of the library, if different from the real name.
4703 soname_spec=$lt_soname_spec
4704
4705 # Commands used to build and install an old-style archive.
4706 RANLIB=$lt_RANLIB
4707 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4708 old_postinstall_cmds=$lt_old_postinstall_cmds
4709 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4710
4711 # Create an old-style archive from a shared archive.
4712 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4713
4714 # Create a temporary old-style archive to link instead of a shared archive.
4715 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4716
4717 # Commands used to build and install a shared archive.
4718 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4719 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4720 postinstall_cmds=$lt_postinstall_cmds
4721 postuninstall_cmds=$lt_postuninstall_cmds
4722
4723 # Commands used to build a loadable module (assumed same as above if empty)
4724 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4725 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4726
4727 # Commands to strip libraries.
4728 old_striplib=$lt_old_striplib
4729 striplib=$lt_striplib
4730
4731 # Dependencies to place before the objects being linked to create a
4732 # shared library.
4733 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4734
4735 # Dependencies to place after the objects being linked to create a
4736 # shared library.
4737 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4738
4739 # Dependencies to place before the objects being linked to create a
4740 # shared library.
4741 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4742
4743 # Dependencies to place after the objects being linked to create a
4744 # shared library.
4745 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4746
4747 # The library search path used internally by the compiler when linking
4748 # a shared library.
4749 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4750
4751 # Method to check whether dependent libraries are shared objects.
4752 deplibs_check_method=$lt_deplibs_check_method
4753
4754 # Command to use when deplibs_check_method == file_magic.
4755 file_magic_cmd=$lt_file_magic_cmd
4756
4757 # Flag that allows shared libraries with undefined symbols to be built.
4758 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4759
4760 # Flag that forces no undefined symbols.
4761 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4762
4763 # Commands used to finish a libtool library installation in a directory.
4764 finish_cmds=$lt_finish_cmds
4765
4766 # Same as above, but a single script fragment to be evaled but not shown.
4767 finish_eval=$lt_finish_eval
4768
4769 # Take the output of nm and produce a listing of raw symbols and C names.
4770 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4771
4772 # Transform the output of nm in a proper C declaration
4773 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4774
4775 # Transform the output of nm in a C name address pair
4776 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4777
4778 # This is the shared library runtime path variable.
4779 runpath_var=$runpath_var
4780
4781 # This is the shared library path variable.
4782 shlibpath_var=$shlibpath_var
4783
4784 # Is shlibpath searched before the hard-coded library search path?
4785 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4786
4787 # How to hardcode a shared library path into an executable.
4788 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4789
4790 # Whether we should hardcode library paths into libraries.
4791 hardcode_into_libs=$hardcode_into_libs
4792
4793 # Flag to hardcode \$libdir into a binary during linking.
4794 # This must work even if \$libdir does not exist.
4795 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4796
4797 # If ld is used when linking, flag to hardcode \$libdir into
4798 # a binary during linking. This must work even if \$libdir does
4799 # not exist.
4800 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4801
4802 # Whether we need a single -rpath flag with a separated argument.
4803 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4804
4805 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4806 # resulting binary.
4807 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4808
4809 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4810 # resulting binary.
4811 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4812
4813 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4814 # the resulting binary.
4815 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4816
4817 # Set to yes if building a shared library automatically hardcodes DIR into the library
4818 # and all subsequent libraries and executables linked against it.
4819 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4820
4821 # Variables whose values should be saved in libtool wrapper scripts and
4822 # restored at relink time.
4823 variables_saved_for_relink="$variables_saved_for_relink"
4824
4825 # Whether libtool must link a program against all its dependency libraries.
4826 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4827
4828 # Compile-time system search path for libraries
4829 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4830
4831 # Run-time system search path for libraries
4832 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4833
4834 # Fix the shell variable \$srcfile for the compiler.
4835 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4836
4837 # Set to yes if exported symbols are required.
4838 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4839
4840 # The commands to list exported symbols.
4841 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4842
4843 # The commands to extract the exported symbol list from a shared archive.
4844 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4845
4846 # Symbols that should not be listed in the preloaded symbols.
4847 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4848
4849 # Symbols that must always be exported.
4850 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4851
4852 ifelse([$1],[],
4853 [# ### END LIBTOOL CONFIG],
4854 [# ### END LIBTOOL TAG CONFIG: $tagname])
4855
4856 __EOF__
4857
4858 ifelse([$1],[], [
4859   case $host_os in
4860   aix3*)
4861     cat <<\EOF >> "$cfgfile"
4862
4863 # AIX sometimes has problems with the GCC collect2 program.  For some
4864 # reason, if we set the COLLECT_NAMES environment variable, the problems
4865 # vanish in a puff of smoke.
4866 if test "X${COLLECT_NAMES+set}" != Xset; then
4867   COLLECT_NAMES=
4868   export COLLECT_NAMES
4869 fi
4870 EOF
4871     ;;
4872   esac
4873
4874   # We use sed instead of cat because bash on DJGPP gets confused if
4875   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4876   # text mode, it properly converts lines to CR/LF.  This bash problem
4877   # is reportedly fixed, but why not run on old versions too?
4878   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4879
4880   mv -f "$cfgfile" "$ofile" || \
4881     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4882   chmod +x "$ofile"
4883 ])
4884 else
4885   # If there is no Makefile yet, we rely on a make rule to execute
4886   # `config.status --recheck' to rerun these tests and create the
4887   # libtool script then.
4888   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4889   if test -f "$ltmain_in"; then
4890     test -f Makefile && make "$ltmain"
4891   fi
4892 fi
4893 ])# AC_LIBTOOL_CONFIG
4894
4895
4896 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4897 # -------------------------------------------
4898 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4899 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4900
4901 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4902
4903 if test "$GCC" = yes; then
4904   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4905
4906   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4907     lt_cv_prog_compiler_rtti_exceptions,
4908     [-fno-rtti -fno-exceptions], [],
4909     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4910 fi
4911 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4912
4913
4914 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4915 # ---------------------------------
4916 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4917 [AC_REQUIRE([AC_CANONICAL_HOST])
4918 AC_REQUIRE([AC_PROG_NM])
4919 AC_REQUIRE([AC_OBJEXT])
4920 # Check for command to grab the raw symbol name followed by C symbol from nm.
4921 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4922 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4923 [
4924 # These are sane defaults that work on at least a few old systems.
4925 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4926
4927 # Character class describing NM global symbol codes.
4928 symcode='[[BCDEGRST]]'
4929
4930 # Regexp to match symbols that can be accessed directly from C.
4931 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4932
4933 # Transform an extracted symbol line into a proper C declaration
4934 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4935
4936 # Transform an extracted symbol line into symbol name and symbol address
4937 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4938
4939 # Define system-specific variables.
4940 case $host_os in
4941 aix*)
4942   symcode='[[BCDT]]'
4943   ;;
4944 cygwin* | mingw* | pw32*)
4945   symcode='[[ABCDGISTW]]'
4946   ;;
4947 hpux*) # Its linker distinguishes data from code symbols
4948   if test "$host_cpu" = ia64; then
4949     symcode='[[ABCDEGRST]]'
4950   fi
4951   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4952   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4953   ;;
4954 linux*)
4955   if test "$host_cpu" = ia64; then
4956     symcode='[[ABCDGIRSTW]]'
4957     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4958     lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4959   fi
4960   ;;
4961 irix* | nonstopux*)
4962   symcode='[[BCDEGRST]]'
4963   ;;
4964 osf*)
4965   symcode='[[BCDEGQRST]]'
4966   ;;
4967 solaris* | sysv5*)
4968   symcode='[[BDRT]]'
4969   ;;
4970 sysv4)
4971   symcode='[[DFNSTU]]'
4972   ;;
4973 esac
4974
4975 # Handle CRLF in mingw tool chain
4976 opt_cr=
4977 case $build_os in
4978 mingw*)
4979   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4980   ;;
4981 esac
4982
4983 # If we're using GNU nm, then use its standard symbol codes.
4984 case `$NM -V 2>&1` in
4985 *GNU* | *'with BFD'*)
4986   symcode='[[ABCDGIRSTW]]' ;;
4987 esac
4988
4989 # Try without a prefix undercore, then with it.
4990 for ac_symprfx in "" "_"; do
4991
4992   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4993   symxfrm="\\1 $ac_symprfx\\2 \\2"
4994
4995   # Write the raw and C identifiers.
4996   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4997
4998   # Check to see that the pipe works correctly.
4999   pipe_works=no
5000
5001   rm -f conftest*
5002   cat > conftest.$ac_ext <<EOF
5003 #ifdef __cplusplus
5004 extern "C" {
5005 #endif
5006 char nm_test_var;
5007 void nm_test_func(){}
5008 #ifdef __cplusplus
5009 }
5010 #endif
5011 int main(){nm_test_var='a';nm_test_func();return(0);}
5012 EOF
5013
5014   if AC_TRY_EVAL(ac_compile); then
5015     # Now try to grab the symbols.
5016     nlist=conftest.nm
5017     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5018       # Try sorting and uniquifying the output.
5019       if sort "$nlist" | uniq > "$nlist"T; then
5020         mv -f "$nlist"T "$nlist"
5021       else
5022         rm -f "$nlist"T
5023       fi
5024
5025       # Make sure that we snagged all the symbols we need.
5026       if grep ' nm_test_var$' "$nlist" >/dev/null; then
5027         if grep ' nm_test_func$' "$nlist" >/dev/null; then
5028           cat <<EOF > conftest.$ac_ext
5029 #ifdef __cplusplus
5030 extern "C" {
5031 #endif
5032
5033 EOF
5034           # Now generate the symbol file.
5035           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5036
5037           cat <<EOF >> conftest.$ac_ext
5038 #if defined (__STDC__) && __STDC__
5039 # define lt_ptr_t void *
5040 #else
5041 # define lt_ptr_t char *
5042 # define const
5043 #endif
5044
5045 /* The mapping between symbol names and symbols. */
5046 const struct {
5047   const char *name;
5048   lt_ptr_t address;
5049 }
5050 lt_preloaded_symbols[[]] =
5051 {
5052 EOF
5053           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5054           cat <<\EOF >> conftest.$ac_ext
5055   {0, (lt_ptr_t) 0}
5056 };
5057
5058 #ifdef __cplusplus
5059 }
5060 #endif
5061 EOF
5062           # Now try linking the two files.
5063           mv conftest.$ac_objext conftstm.$ac_objext
5064           lt_save_LIBS="$LIBS"
5065           lt_save_CFLAGS="$CFLAGS"
5066           LIBS="conftstm.$ac_objext"
5067           CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5068           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5069             pipe_works=yes
5070           fi
5071           LIBS="$lt_save_LIBS"
5072           CFLAGS="$lt_save_CFLAGS"
5073         else
5074           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5075         fi
5076       else
5077         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5078       fi
5079     else
5080       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5081     fi
5082   else
5083     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5084     cat conftest.$ac_ext >&5
5085   fi
5086   rm -f conftest* conftst*
5087
5088   # Do not use the global_symbol_pipe unless it works.
5089   if test "$pipe_works" = yes; then
5090     break
5091   else
5092     lt_cv_sys_global_symbol_pipe=
5093   fi
5094 done
5095 ])
5096 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5097   lt_cv_sys_global_symbol_to_cdecl=
5098 fi
5099 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5100   AC_MSG_RESULT(failed)
5101 else
5102   AC_MSG_RESULT(ok)
5103 fi
5104 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5105
5106
5107 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5108 # ---------------------------------------
5109 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5110 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5111 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5112 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5113
5114 AC_MSG_CHECKING([for $compiler option to produce PIC])
5115  ifelse([$1],[CXX],[
5116   # C++ specific cases for pic, static, wl, etc.
5117   if test "$GXX" = yes; then
5118     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5119     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5120
5121     case $host_os in
5122     aix*)
5123       # All AIX code is PIC.
5124       if test "$host_cpu" = ia64; then
5125         # AIX 5 now supports IA64 processor
5126         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5127       fi
5128       ;;
5129     amigaos*)
5130       # FIXME: we need at least 68020 code to build shared libraries, but
5131       # adding the `-m68020' flag to GCC prevents building anything better,
5132       # like `-m68040'.
5133       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5134       ;;
5135     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5136       # PIC is the default for these OSes.
5137       ;;
5138     mingw* | os2* | pw32*)
5139       # This hack is so that the source file can tell whether it is being
5140       # built for inclusion in a dll (and should export symbols for example).
5141       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5142       ;;
5143     darwin* | rhapsody*)
5144       # PIC is the default on this platform
5145       # Common symbols not allowed in MH_DYLIB files
5146       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5147       ;;
5148     *djgpp*)
5149       # DJGPP does not support shared libraries at all
5150       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5151       ;;
5152     sysv4*MP*)
5153       if test -d /usr/nec; then
5154         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5155       fi
5156       ;;
5157     hpux*)
5158       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5159       # not for PA HP-UX.
5160       case $host_cpu in
5161       hppa*64*|ia64*)
5162         ;;
5163       *)
5164         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5165         ;;
5166       esac
5167       ;;
5168     *)
5169       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5170       ;;
5171     esac
5172   else
5173     case $host_os in
5174       aix4* | aix5*)
5175         # All AIX code is PIC.
5176         if test "$host_cpu" = ia64; then
5177           # AIX 5 now supports IA64 processor
5178           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5179         else
5180           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5181         fi
5182         ;;
5183       chorus*)
5184         case $cc_basename in
5185         cxch68*)
5186           # Green Hills C++ Compiler
5187           # _LT_AC_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"
5188           ;;
5189         esac
5190         ;;
5191        darwin*)
5192          # PIC is the default on this platform
5193          # Common symbols not allowed in MH_DYLIB files
5194          case $cc_basename in
5195            xlc*)
5196            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5197            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5198            ;;
5199          esac
5200        ;;
5201       dgux*)
5202         case $cc_basename in
5203           ec++*)
5204             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5205             ;;
5206           ghcx*)
5207             # Green Hills C++ Compiler
5208             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5209             ;;
5210           *)
5211             ;;
5212         esac
5213         ;;
5214       freebsd* | kfreebsd*-gnu | dragonfly*)
5215         # FreeBSD uses GNU C++
5216         ;;
5217       hpux9* | hpux10* | hpux11*)
5218         case $cc_basename in
5219           CC*)
5220             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5221             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5222             if test "$host_cpu" != ia64; then
5223               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5224             fi
5225             ;;
5226           aCC*)
5227             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5228             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5229             case $host_cpu in
5230             hppa*64*|ia64*)
5231               # +Z the default
5232               ;;
5233             *)
5234               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5235               ;;
5236             esac
5237             ;;
5238           *)
5239             ;;
5240         esac
5241         ;;
5242       irix5* | irix6* | nonstopux*)
5243         case $cc_basename in
5244           CC*)
5245             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5246             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5247             # CC pic flag -KPIC is the default.
5248             ;;
5249           *)
5250             ;;
5251         esac
5252         ;;
5253       linux*)
5254         case $cc_basename in
5255           KCC*)
5256             # KAI C++ Compiler
5257             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5258             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5259             ;;
5260           icpc* | ecpc*)
5261             # Intel C++
5262             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5263             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5264             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5265             ;;
5266           pgCC*)
5267             # Portland Group C++ compiler.
5268             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5269             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5270             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5271             ;;
5272           cxx*)
5273             # Compaq C++
5274             # Make sure the PIC flag is empty.  It appears that all Alpha
5275             # Linux and Compaq Tru64 Unix objects are PIC.
5276             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5277             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5278             ;;
5279           *)
5280             ;;
5281         esac
5282         ;;
5283       lynxos*)
5284         ;;
5285       m88k*)
5286         ;;
5287       mvs*)
5288         case $cc_basename in
5289           cxx*)
5290             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5291             ;;
5292           *)
5293             ;;
5294         esac
5295         ;;
5296       netbsd*)
5297         ;;
5298       osf3* | osf4* | osf5*)
5299         case $cc_basename in
5300           KCC*)
5301             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5302             ;;
5303           RCC*)
5304             # Rational C++ 2.4.1
5305             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5306             ;;
5307           cxx*)
5308             # Digital/Compaq C++
5309             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5310             # Make sure the PIC flag is empty.  It appears that all Alpha
5311             # Linux and Compaq Tru64 Unix objects are PIC.
5312             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5313             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5314             ;;
5315           *)
5316             ;;
5317         esac
5318         ;;
5319       psos*)
5320         ;;
5321       sco*)
5322         case $cc_basename in
5323           CC*)
5324             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5325             ;;
5326           *)
5327             ;;
5328         esac
5329         ;;
5330       solaris*)
5331         case $cc_basename in
5332           CC*)
5333             # Sun C++ 4.2, 5.x and Centerline C++
5334             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5335             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5336             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5337             ;;
5338           gcx*)
5339             # Green Hills C++ Compiler
5340             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5341             ;;
5342           *)
5343             ;;
5344         esac
5345         ;;
5346       sunos4*)
5347         case $cc_basename in
5348           CC*)
5349             # Sun C++ 4.x
5350             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5351             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5352             ;;
5353           lcc*)
5354             # Lucid
5355             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5356             ;;
5357           *)
5358             ;;
5359         esac
5360         ;;
5361       tandem*)
5362         case $cc_basename in
5363           NCC*)
5364             # NonStop-UX NCC 3.20
5365             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5366             ;;
5367           *)
5368             ;;
5369         esac
5370         ;;
5371       unixware*)
5372         ;;
5373       vxworks*)
5374         ;;
5375       *)
5376         _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5377         ;;
5378     esac
5379   fi
5380 ],
5381 [
5382   if test "$GCC" = yes; then
5383     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5384     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5385
5386     case $host_os in
5387       aix*)
5388       # All AIX code is PIC.
5389       if test "$host_cpu" = ia64; then
5390         # AIX 5 now supports IA64 processor
5391         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5392       fi
5393       ;;
5394
5395     amigaos*)
5396       # FIXME: we need at least 68020 code to build shared libraries, but
5397       # adding the `-m68020' flag to GCC prevents building anything better,
5398       # like `-m68040'.
5399       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5400       ;;
5401
5402     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5403       # PIC is the default for these OSes.
5404       ;;
5405
5406     mingw* | pw32* | os2*)
5407       # This hack is so that the source file can tell whether it is being
5408       # built for inclusion in a dll (and should export symbols for example).
5409       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5410       ;;
5411
5412     darwin* | rhapsody*)
5413       # PIC is the default on this platform
5414       # Common symbols not allowed in MH_DYLIB files
5415       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5416       ;;
5417
5418     msdosdjgpp*)
5419       # Just because we use GCC doesn't mean we suddenly get shared libraries
5420       # on systems that don't support them.
5421       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5422       enable_shared=no
5423       ;;
5424
5425     sysv4*MP*)
5426       if test -d /usr/nec; then
5427         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5428       fi
5429       ;;
5430
5431     hpux*)
5432       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5433       # not for PA HP-UX.
5434       case $host_cpu in
5435       hppa*64*|ia64*)
5436         # +Z the default
5437         ;;
5438       *)
5439         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5440         ;;
5441       esac
5442       ;;
5443
5444     *)
5445       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5446       ;;
5447     esac
5448   else
5449     # PORTME Check for flag to pass linker flags through the system compiler.
5450     case $host_os in
5451     aix*)
5452       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5453       if test "$host_cpu" = ia64; then
5454         # AIX 5 now supports IA64 processor
5455         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5456       else
5457         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5458       fi
5459       ;;
5460       darwin*)
5461         # PIC is the default on this platform
5462         # Common symbols not allowed in MH_DYLIB files
5463        case $cc_basename in
5464          xlc*)
5465          _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5466          _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5467          ;;
5468        esac
5469        ;;
5470
5471     mingw* | pw32* | os2*)
5472       # This hack is so that the source file can tell whether it is being
5473       # built for inclusion in a dll (and should export symbols for example).
5474       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5475       ;;
5476
5477     hpux9* | hpux10* | hpux11*)
5478       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5479       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5480       # not for PA HP-UX.
5481       case $host_cpu in
5482       hppa*64*|ia64*)
5483         # +Z the default
5484         ;;
5485       *)
5486         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5487         ;;
5488       esac
5489       # Is there a better lt_prog_compiler_static that works with the bundled CC?
5490       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5491       ;;
5492
5493     irix5* | irix6* | nonstopux*)
5494       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5495       # PIC (with -KPIC) is the default.
5496       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5497       ;;
5498
5499     newsos6)
5500       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5501       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5502       ;;
5503
5504     linux*)
5505       case $cc_basename in
5506       icc* | ecc*)
5507         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5508         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5509         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5510         ;;
5511       pgcc* | pgf77* | pgf90* | pgf95*)
5512         # Portland Group compilers (*not* the Pentium gcc compiler,
5513         # which looks to be a dead project)
5514         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5515         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5516         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5517         ;;
5518       ccc*)
5519         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5520         # All Alpha code is PIC.
5521         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5522         ;;
5523       esac
5524       ;;
5525
5526     osf3* | osf4* | osf5*)
5527       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5528       # All OSF/1 code is PIC.
5529       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5530       ;;
5531
5532     sco3.2v5*)
5533       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5534       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5535       ;;
5536
5537     solaris*)
5538       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5539       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5540       case $cc_basename in
5541       f77* | f90* | f95*)
5542         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5543       *)
5544         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5545       esac
5546       ;;
5547
5548     sunos4*)
5549       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5550       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5551       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5552       ;;
5553
5554     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5555       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5556       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5557       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5558       ;;
5559
5560     sysv4*MP*)
5561       if test -d /usr/nec ;then
5562         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5563         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5564       fi
5565       ;;
5566
5567     unicos*)
5568       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5569       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5570       ;;
5571
5572     uts4*)
5573       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5574       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5575       ;;
5576
5577     *)
5578       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5579       ;;
5580     esac
5581   fi
5582 ])
5583 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5584
5585 #
5586 # Check to make sure the PIC flag actually works.
5587 #
5588 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5589   AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5590     _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5591     [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5592     [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5593      "" | " "*) ;;
5594      *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5595      esac],
5596     [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5597      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5598 fi
5599 case $host_os in
5600   # For platforms which do not support PIC, -DPIC is meaningless:
5601   *djgpp*)
5602     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5603     ;;
5604   *)
5605     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5606     ;;
5607 esac
5608 ])
5609
5610
5611 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5612 # ------------------------------------
5613 # See if the linker supports building shared libraries.
5614 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5615 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5616 ifelse([$1],[CXX],[
5617   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5618   case $host_os in
5619   aix4* | aix5*)
5620     # If we're using GNU nm, then we don't want the "-C" option.
5621     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5622     if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5623       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5624     else
5625       _LT_AC_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'
5626     fi
5627     ;;
5628   pw32*)
5629     _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5630   ;;
5631   cygwin* | mingw*)
5632     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5633   ;;
5634   *)
5635     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5636   ;;
5637   esac
5638 ],[
5639   runpath_var=
5640   _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5641   _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5642   _LT_AC_TAGVAR(archive_cmds, $1)=
5643   _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5644   _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5645   _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5646   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5647   _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5648   _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5649   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5650   _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5651   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5652   _LT_AC_TAGVAR(hardcode_direct, $1)=no
5653   _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5654   _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5655   _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5656   _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5657   _LT_AC_TAGVAR(module_cmds, $1)=
5658   _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5659   _LT_AC_TAGVAR(always_export_symbols, $1)=no
5660   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5661   # include_expsyms should be a list of space-separated symbols to be *always*
5662   # included in the symbol list
5663   _LT_AC_TAGVAR(include_expsyms, $1)=
5664   # exclude_expsyms can be an extended regexp of symbols to exclude
5665   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5666   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5667   # as well as any symbol that contains `d'.
5668   _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5669   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5670   # platforms (ab)use it in PIC code, but their linkers get confused if
5671   # the symbol is explicitly referenced.  Since portable code cannot
5672   # rely on this symbol name, it's probably fine to never include it in
5673   # preloaded symbol tables.
5674   extract_expsyms_cmds=
5675   # Just being paranoid about ensuring that cc_basename is set.
5676   _LT_CC_BASENAME([$compiler])
5677   case $host_os in
5678   cygwin* | mingw* | pw32*)
5679     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5680     # When not using gcc, we currently assume that we are using
5681     # Microsoft Visual C++.
5682     if test "$GCC" != yes; then
5683       with_gnu_ld=no
5684     fi
5685     ;;
5686   openbsd*)
5687     with_gnu_ld=no
5688     ;;
5689   esac
5690
5691   _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5692   if test "$with_gnu_ld" = yes; then
5693     # If archive_cmds runs LD, not CC, wlarc should be empty
5694     wlarc='${wl}'
5695
5696     # Set some defaults for GNU ld with shared library support. These
5697     # are reset later if shared libraries are not supported. Putting them
5698     # here allows them to be overridden if necessary.
5699     runpath_var=LD_RUN_PATH
5700     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5701     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5702     # ancient GNU ld didn't support --whole-archive et. al.
5703     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5704         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5705       else
5706         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5707     fi
5708     supports_anon_versioning=no
5709     case `$LD -v 2>/dev/null` in
5710       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5711       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5712       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5713       *\ 2.11.*) ;; # other 2.11 versions
5714       *) supports_anon_versioning=yes ;;
5715     esac
5716
5717     # See if GNU ld supports shared libraries.
5718     case $host_os in
5719     aix3* | aix4* | aix5*)
5720       # On AIX/PPC, the GNU linker is very broken
5721       if test "$host_cpu" != ia64; then
5722         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5723         cat <<EOF 1>&2
5724
5725 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5726 *** to be unable to reliably create shared libraries on AIX.
5727 *** Therefore, libtool is disabling shared libraries support.  If you
5728 *** really care for shared libraries, you may want to modify your PATH
5729 *** so that a non-GNU linker is found, and then restart.
5730
5731 EOF
5732       fi
5733       ;;
5734
5735     amigaos*)
5736       _LT_AC_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)'
5737       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5738       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5739
5740       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5741       # that the semantics of dynamic libraries on AmigaOS, at least up
5742       # to version 4, is to share data among multiple programs linked
5743       # with the same dynamic library.  Since this doesn't match the
5744       # behavior of shared libraries on other platforms, we can't use
5745       # them.
5746       _LT_AC_TAGVAR(ld_shlibs, $1)=no
5747       ;;
5748
5749     beos*)
5750       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5751         _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5752         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5753         # support --undefined.  This deserves some investigation.  FIXME
5754         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5755       else
5756         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5757       fi
5758       ;;
5759
5760     cygwin* | mingw* | pw32*)
5761       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5762       # as there is no search path for DLLs.
5763       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5764       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5765       _LT_AC_TAGVAR(always_export_symbols, $1)=no
5766       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5767       _LT_AC_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'
5768
5769       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5770         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5771         # If the export-symbols file already is a .def file (1st line
5772         # is EXPORTS), use it as is; otherwise, prepend...
5773         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5774           cp $export_symbols $output_objdir/$soname.def;
5775         else
5776           echo EXPORTS > $output_objdir/$soname.def;
5777           cat $export_symbols >> $output_objdir/$soname.def;
5778         fi~
5779         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
5780       else
5781         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5782       fi
5783       ;;
5784
5785     linux*)
5786       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5787         tmp_addflag=
5788         case $cc_basename,$host_cpu in
5789         pgcc*)                          # Portland Group C compiler
5790           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5791           tmp_addflag=' $pic_flag'
5792           ;;
5793         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
5794           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5795           tmp_addflag=' $pic_flag -Mnomain' ;;
5796         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
5797           tmp_addflag=' -i_dynamic' ;;
5798         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
5799           tmp_addflag=' -i_dynamic -nofor_main' ;;
5800         ifc* | ifort*)                  # Intel Fortran compiler
5801           tmp_addflag=' -nofor_main' ;;
5802         esac
5803         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5804
5805         if test $supports_anon_versioning = yes; then
5806           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5807   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5808   $echo "local: *; };" >> $output_objdir/$libname.ver~
5809           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5810         fi
5811       else
5812         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5813       fi
5814       ;;
5815
5816     netbsd*)
5817       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5818         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5819         wlarc=
5820       else
5821         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5822         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5823       fi
5824       ;;
5825
5826     solaris* | sysv5*)
5827       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5828         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5829         cat <<EOF 1>&2
5830
5831 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5832 *** create shared libraries on Solaris systems.  Therefore, libtool
5833 *** is disabling shared libraries support.  We urge you to upgrade GNU
5834 *** binutils to release 2.9.1 or newer.  Another option is to modify
5835 *** your PATH or compiler configuration so that the native linker is
5836 *** used, and then restart.
5837
5838 EOF
5839       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5840         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5841         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5842       else
5843         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5844       fi
5845       ;;
5846
5847     sunos4*)
5848       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5849       wlarc=
5850       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5851       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5852       ;;
5853
5854     *)
5855       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5856         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5857         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5858       else
5859         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5860       fi
5861       ;;
5862     esac
5863
5864     if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5865       runpath_var=
5866       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5867       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5868       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5869     fi
5870   else
5871     # PORTME fill in a description of your system's linker (not GNU ld)
5872     case $host_os in
5873     aix3*)
5874       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5875       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5876       _LT_AC_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'
5877       # Note: this linker hardcodes the directories in LIBPATH if there
5878       # are no directories specified by -L.
5879       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5880       if test "$GCC" = yes && test -z "$link_static_flag"; then
5881         # Neither direct hardcoding nor static linking is supported with a
5882         # broken collect2.
5883         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5884       fi
5885       ;;
5886
5887     aix4* | aix5*)
5888       if test "$host_cpu" = ia64; then
5889         # On IA64, the linker does run time linking by default, so we don't
5890         # have to do anything special.
5891         aix_use_runtimelinking=no
5892         exp_sym_flag='-Bexport'
5893         no_entry_flag=""
5894       else
5895         # If we're using GNU nm, then we don't want the "-C" option.
5896         # -C means demangle to AIX nm, but means don't demangle with GNU nm
5897         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5898           _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5899         else
5900           _LT_AC_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'
5901         fi
5902         aix_use_runtimelinking=no
5903
5904         # Test if we are trying to use run time linking or normal
5905         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5906         # need to do runtime linking.
5907         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5908           for ld_flag in $LDFLAGS; do
5909           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5910             aix_use_runtimelinking=yes
5911             break
5912           fi
5913           done
5914         esac
5915
5916         exp_sym_flag='-bexport'
5917         no_entry_flag='-bnoentry'
5918       fi
5919
5920       # When large executables or shared objects are built, AIX ld can
5921       # have problems creating the table of contents.  If linking a library
5922       # or program results in "error TOC overflow" add -mminimal-toc to
5923       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5924       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5925
5926       _LT_AC_TAGVAR(archive_cmds, $1)=''
5927       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5928       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5929       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5930
5931       if test "$GCC" = yes; then
5932         case $host_os in aix4.[[012]]|aix4.[[012]].*)
5933         # We only want to do this on AIX 4.2 and lower, the check
5934         # below for broken collect2 doesn't work under 4.3+
5935           collect2name=`${CC} -print-prog-name=collect2`
5936           if test -f "$collect2name" && \
5937            strings "$collect2name" | grep resolve_lib_name >/dev/null
5938           then
5939           # We have reworked collect2
5940           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5941           else
5942           # We have old collect2
5943           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5944           # It fails to find uninstalled libraries when the uninstalled
5945           # path is not listed in the libpath.  Setting hardcode_minus_L
5946           # to unsupported forces relinking
5947           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5948           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5949           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5950           fi
5951         esac
5952         shared_flag='-shared'
5953         if test "$aix_use_runtimelinking" = yes; then
5954           shared_flag="$shared_flag "'${wl}-G'
5955         fi
5956       else
5957         # not using gcc
5958         if test "$host_cpu" = ia64; then
5959         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5960         # chokes on -Wl,-G. The following line is correct:
5961           shared_flag='-G'
5962         else
5963         if test "$aix_use_runtimelinking" = yes; then
5964             shared_flag='${wl}-G'
5965           else
5966             shared_flag='${wl}-bM:SRE'
5967         fi
5968         fi
5969       fi
5970
5971       # It seems that -bexpall does not export symbols beginning with
5972       # underscore (_), so it is better to generate a list of symbols to export.
5973       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5974       if test "$aix_use_runtimelinking" = yes; then
5975         # Warning - without using the other runtime loading flags (-brtl),
5976         # -berok will link without error, but may produce a broken library.
5977         _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5978        # Determine the default libpath from the value encoded in an empty executable.
5979        _LT_AC_SYS_LIBPATH_AIX
5980        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5981         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5982        else
5983         if test "$host_cpu" = ia64; then
5984           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5985           _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5986           _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5987         else
5988          # Determine the default libpath from the value encoded in an empty executable.
5989          _LT_AC_SYS_LIBPATH_AIX
5990          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5991           # Warning - without using the other run time loading flags,
5992           # -berok will link without error, but may produce a broken library.
5993           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5994           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5995           # -bexpall does not export symbols beginning with underscore (_)
5996           _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5997           # Exported symbols can be pulled into shared objects from archives
5998           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5999           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6000           # This is similar to how AIX traditionally builds its shared libraries.
6001           _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6002         fi
6003       fi
6004       ;;
6005
6006     amigaos*)
6007       _LT_AC_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)'
6008       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6009       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6010       # see comment about different semantics on the GNU ld section
6011       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6012       ;;
6013
6014     bsdi[[45]]*)
6015       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6016       ;;
6017
6018     cygwin* | mingw* | pw32*)
6019       # When not using gcc, we currently assume that we are using
6020       # Microsoft Visual C++.
6021       # hardcode_libdir_flag_spec is actually meaningless, as there is
6022       # no search path for DLLs.
6023       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6024       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6025       # Tell ltmain to make .lib files, not .a files.
6026       libext=lib
6027       # Tell ltmain to make .dll files, not .so files.
6028       shrext_cmds=".dll"
6029       # FIXME: Setting linknames here is a bad hack.
6030       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6031       # The linker will automatically build a .lib file if we build a DLL.
6032       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6033       # FIXME: Should let the user specify the lib program.
6034       _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6035       _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6036       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6037       ;;
6038
6039     darwin* | rhapsody*)
6040       case $host_os in
6041         rhapsody* | darwin1.[[012]])
6042          _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6043          ;;
6044        *) # Darwin 1.3 on
6045          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6046            _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6047          else
6048            case ${MACOSX_DEPLOYMENT_TARGET} in
6049              10.[[012]])
6050                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6051                ;;
6052              10.*)
6053                _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6054                ;;
6055            esac
6056          fi
6057          ;;
6058       esac
6059       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6060       _LT_AC_TAGVAR(hardcode_direct, $1)=no
6061       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6062       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6063       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6064       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6065     if test "$GCC" = yes ; then
6066         output_verbose_link_cmd='echo'
6067         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6068       _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6069       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6070       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6071       _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6072     else
6073       case $cc_basename in
6074         xlc*)
6075          output_verbose_link_cmd='echo'
6076          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
6077          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6078           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6079          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6080           _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6081           ;;
6082        *)
6083          _LT_AC_TAGVAR(ld_shlibs, $1)=no
6084           ;;
6085       esac
6086     fi
6087       ;;
6088
6089     dgux*)
6090       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6091       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6092       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6093       ;;
6094
6095     freebsd1*)
6096       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6097       ;;
6098
6099     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6100     # support.  Future versions do this automatically, but an explicit c++rt0.o
6101     # does not break anything, and helps significantly (at the cost of a little
6102     # extra space).
6103     freebsd2.2*)
6104       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6105       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6106       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6107       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6108       ;;
6109
6110     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6111     freebsd2*)
6112       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6113       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6114       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6115       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6116       ;;
6117
6118     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6119     freebsd* | kfreebsd*-gnu | dragonfly*)
6120       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6121       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6122       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6123       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6124       ;;
6125
6126     hpux9*)
6127       if test "$GCC" = yes; then
6128         _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6129       else
6130         _LT_AC_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'
6131       fi
6132       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6133       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6134       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6135
6136       # hardcode_minus_L: Not really in the search PATH,
6137       # but as the default location of the library.
6138       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6139       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6140       ;;
6141
6142     hpux10* | hpux11*)
6143       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6144         case $host_cpu in
6145         hppa*64*|ia64*)
6146           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6147           ;;
6148         *)
6149           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6150           ;;
6151         esac
6152       else
6153         case $host_cpu in
6154         hppa*64*|ia64*)
6155           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6156           ;;
6157         *)
6158           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6159           ;;
6160         esac
6161       fi
6162       if test "$with_gnu_ld" = no; then
6163         case $host_cpu in
6164         hppa*64*)
6165           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6166           _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6167           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6168           _LT_AC_TAGVAR(hardcode_direct, $1)=no
6169           _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6170           ;;
6171         ia64*)
6172           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6173           _LT_AC_TAGVAR(hardcode_direct, $1)=no
6174           _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6175
6176           # hardcode_minus_L: Not really in the search PATH,
6177           # but as the default location of the library.
6178           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6179           ;;
6180         *)
6181           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6182           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6183           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6184           _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6185
6186           # hardcode_minus_L: Not really in the search PATH,
6187           # but as the default location of the library.
6188           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6189           ;;
6190         esac
6191       fi
6192       ;;
6193
6194     irix5* | irix6* | nonstopux*)
6195       if test "$GCC" = yes; then
6196         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6197       else
6198         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6199         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6200       fi
6201       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6202       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6203       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6204       ;;
6205
6206     netbsd*)
6207       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6208         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6209       else
6210         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6211       fi
6212       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6213       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6214       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6215       ;;
6216
6217     newsos6)
6218       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6219       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6220       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6221       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6222       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6223       ;;
6224
6225     openbsd*)
6226       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6227       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6228       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6229         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6230         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6231         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6232         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6233       else
6234        case $host_os in
6235          openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6236            _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6237            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6238            ;;
6239          *)
6240            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6241            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6242            ;;
6243        esac
6244       fi
6245       ;;
6246
6247     os2*)
6248       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6249       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6250       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6251       _LT_AC_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'
6252       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6253       ;;
6254
6255     osf3*)
6256       if test "$GCC" = yes; then
6257         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6258         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6259       else
6260         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6261         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6262       fi
6263       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6264       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6265       ;;
6266
6267     osf4* | osf5*)      # as osf3* with the addition of -msym flag
6268       if test "$GCC" = yes; then
6269         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6270         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6271         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6272       else
6273         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6274         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6275         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6276         $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6277
6278         # Both c and cxx compiler support -rpath directly
6279         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6280       fi
6281       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6282       ;;
6283
6284     sco3.2v5*)
6285       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6286       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6287       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6288       runpath_var=LD_RUN_PATH
6289       hardcode_runpath_var=yes
6290       ;;
6291
6292     solaris*)
6293       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6294       if test "$GCC" = yes; then
6295         wlarc='${wl}'
6296         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6297         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6298           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6299       else
6300         wlarc=''
6301         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6302         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6303         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6304       fi
6305       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6306       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6307       case $host_os in
6308       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6309       *)
6310         # The compiler driver will combine linker options so we
6311         # cannot just pass the convience library names through
6312         # without $wl, iff we do not link with $LD.
6313         # Luckily, gcc supports the same syntax we need for Sun Studio.
6314         # Supported since Solaris 2.6 (maybe 2.5.1?)
6315         case $wlarc in
6316         '')
6317           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6318         *)
6319           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6320         esac ;;
6321       esac
6322       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6323       ;;
6324
6325     sunos4*)
6326       if test "x$host_vendor" = xsequent; then
6327         # Use $CC to link under sequent, because it throws in some extra .o
6328         # files that make .init and .fini sections work.
6329         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6330       else
6331         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6332       fi
6333       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6334       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6335       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6336       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6337       ;;
6338
6339     sysv4)
6340       case $host_vendor in
6341         sni)
6342           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6343           _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6344         ;;
6345         siemens)
6346           ## LD is ld it makes a PLAMLIB
6347           ## CC just makes a GrossModule.
6348           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6349           _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6350           _LT_AC_TAGVAR(hardcode_direct, $1)=no
6351         ;;
6352         motorola)
6353           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6354           _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6355         ;;
6356       esac
6357       runpath_var='LD_RUN_PATH'
6358       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6359       ;;
6360
6361     sysv4.3*)
6362       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6363       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6364       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6365       ;;
6366
6367     sysv4*MP*)
6368       if test -d /usr/nec; then
6369         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6370         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6371         runpath_var=LD_RUN_PATH
6372         hardcode_runpath_var=yes
6373         _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6374       fi
6375       ;;
6376
6377     sysv4.2uw2*)
6378       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6379       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6380       _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6381       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6382       hardcode_runpath_var=yes
6383       runpath_var=LD_RUN_PATH
6384       ;;
6385
6386    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
6387       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6388       if test "$GCC" = yes; then
6389         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6390       else
6391         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6392       fi
6393       runpath_var='LD_RUN_PATH'
6394       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6395       ;;
6396
6397     sysv5*)
6398       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6399       # $CC -shared without GNU ld will not create a library from C++
6400       # object files and a static libstdc++, better avoid it by now
6401       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6402       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6403                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6404       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6405       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6406       runpath_var='LD_RUN_PATH'
6407       ;;
6408
6409     uts4*)
6410       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6411       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6412       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6413       ;;
6414
6415     *)
6416       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6417       ;;
6418     esac
6419   fi
6420 ])
6421 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6422 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6423
6424 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6425 if test "$GCC" = yes; then
6426   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6427 fi
6428
6429 #
6430 # Do we need to explicitly link libc?
6431 #
6432 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6433 x|xyes)
6434   # Assume -lc should be added
6435   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6436
6437   if test "$enable_shared" = yes && test "$GCC" = yes; then
6438     case $_LT_AC_TAGVAR(archive_cmds, $1) in
6439     *'~'*)
6440       # FIXME: we may have to deal with multi-command sequences.
6441       ;;
6442     '$CC '*)
6443       # Test whether the compiler implicitly links with -lc since on some
6444       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6445       # to ld, don't add -lc before -lgcc.
6446       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6447       $rm conftest*
6448       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6449
6450       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6451         soname=conftest
6452         lib=conftest
6453         libobjs=conftest.$ac_objext
6454         deplibs=
6455         wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6456         compiler_flags=-v
6457         linker_flags=-v
6458         verstring=
6459         output_objdir=.
6460         libname=conftest
6461         lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6462         _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6463         if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6464         then
6465           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6466         else
6467           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6468         fi
6469         _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6470       else
6471         cat conftest.err 1>&5
6472       fi
6473       $rm conftest*
6474       AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6475       ;;
6476     esac
6477   fi
6478   ;;
6479 esac
6480 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6481
6482
6483 # _LT_AC_FILE_LTDLL_C
6484 # -------------------
6485 # Be careful that the start marker always follows a newline.
6486 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6487 # /* ltdll.c starts here */
6488 # #define WIN32_LEAN_AND_MEAN
6489 # #include <windows.h>
6490 # #undef WIN32_LEAN_AND_MEAN
6491 # #include <stdio.h>
6492 #
6493 # #ifndef __CYGWIN__
6494 # #  ifdef __CYGWIN32__
6495 # #    define __CYGWIN__ __CYGWIN32__
6496 # #  endif
6497 # #endif
6498 #
6499 # #ifdef __cplusplus
6500 # extern "C" {
6501 # #endif
6502 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6503 # #ifdef __cplusplus
6504 # }
6505 # #endif
6506 #
6507 # #ifdef __CYGWIN__
6508 # #include <cygwin/cygwin_dll.h>
6509 # DECLARE_CYGWIN_DLL( DllMain );
6510 # #endif
6511 # HINSTANCE __hDllInstance_base;
6512 #
6513 # BOOL APIENTRY
6514 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6515 # {
6516 #   __hDllInstance_base = hInst;
6517 #   return TRUE;
6518 # }
6519 # /* ltdll.c ends here */
6520 ])# _LT_AC_FILE_LTDLL_C
6521
6522
6523 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6524 # ---------------------------------
6525 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6526
6527
6528 # old names
6529 AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6530 AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6531 AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6532 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6533 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6534 AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6535 AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6536
6537 # This is just to silence aclocal about the macro not being used
6538 ifelse([AC_DISABLE_FAST_INSTALL])
6539
6540 AC_DEFUN([LT_AC_PROG_GCJ],
6541 [AC_CHECK_TOOL(GCJ, gcj, no)
6542   test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6543   AC_SUBST(GCJFLAGS)
6544 ])
6545
6546 AC_DEFUN([LT_AC_PROG_RC],
6547 [AC_CHECK_TOOL(RC, windres, no)
6548 ])
6549
6550 # NOTE: This macro has been submitted for inclusion into   #
6551 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6552 #  a released version of Autoconf we should remove this    #
6553 #  macro and use it instead.                               #
6554 # LT_AC_PROG_SED
6555 # --------------
6556 # Check for a fully-functional sed program, that truncates
6557 # as few characters as possible.  Prefer GNU sed if found.
6558 AC_DEFUN([LT_AC_PROG_SED],
6559 [AC_MSG_CHECKING([for a sed that does not truncate output])
6560 AC_CACHE_VAL(lt_cv_path_SED,
6561 [# Loop through the user's path and test for sed and gsed.
6562 # Then use that list of sed's as ones to test for truncation.
6563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6564 for as_dir in $PATH
6565 do
6566   IFS=$as_save_IFS
6567   test -z "$as_dir" && as_dir=.
6568   for lt_ac_prog in sed gsed; do
6569     for ac_exec_ext in '' $ac_executable_extensions; do
6570       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6571         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6572       fi
6573     done
6574   done
6575 done
6576 lt_ac_max=0
6577 lt_ac_count=0
6578 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6579 # along with /bin/sed that truncates output.
6580 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6581   test ! -f $lt_ac_sed && continue
6582   cat /dev/null > conftest.in
6583   lt_ac_count=0
6584   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6585   # Check for GNU sed and select it if it is found.
6586   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6587     lt_cv_path_SED=$lt_ac_sed
6588     break
6589   fi
6590   while true; do
6591     cat conftest.in conftest.in >conftest.tmp
6592     mv conftest.tmp conftest.in
6593     cp conftest.in conftest.nl
6594     echo >>conftest.nl
6595     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6596     cmp -s conftest.out conftest.nl || break
6597     # 10000 chars as input seems more than enough
6598     test $lt_ac_count -gt 10 && break
6599     lt_ac_count=`expr $lt_ac_count + 1`
6600     if test $lt_ac_count -gt $lt_ac_max; then
6601       lt_ac_max=$lt_ac_count
6602       lt_cv_path_SED=$lt_ac_sed
6603     fi
6604   done
6605 done
6606 ])
6607 SED=$lt_cv_path_SED
6608 AC_MSG_RESULT([$SED])
6609 ])
6610
6611 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
6612
6613 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
6614 #
6615 # This program is free software; you can redistribute it and/or modify
6616 # it under the terms of the GNU General Public License as published by
6617 # the Free Software Foundation; either version 2 of the License, or
6618 # (at your option) any later version.
6619 #
6620 # This program is distributed in the hope that it will be useful, but
6621 # WITHOUT ANY WARRANTY; without even the implied warranty of
6622 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6623 # General Public License for more details.
6624 #
6625 # You should have received a copy of the GNU General Public License
6626 # along with this program; if not, write to the Free Software
6627 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6628 #
6629 # As a special exception to the GNU General Public License, if you
6630 # distribute this file as part of a program that contains a
6631 # configuration script generated by Autoconf, you may include it under
6632 # the same distribution terms that you use for the rest of that program.
6633
6634 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
6635 # ----------------------------------
6636 AC_DEFUN([PKG_PROG_PKG_CONFIG],
6637 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
6638 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
6639 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
6640 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6641         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6642 fi
6643 if test -n "$PKG_CONFIG"; then
6644         _pkg_min_version=m4_default([$1], [0.9.0])
6645         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
6646         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6647                 AC_MSG_RESULT([yes])
6648         else
6649                 AC_MSG_RESULT([no])
6650                 PKG_CONFIG=""
6651         fi
6652                 
6653 fi[]dnl
6654 ])# PKG_PROG_PKG_CONFIG
6655
6656 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
6657 #
6658 # Check to see whether a particular set of modules exists.  Similar
6659 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
6660 #
6661 #
6662 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
6663 # this or PKG_CHECK_MODULES is called, or make sure to call
6664 # PKG_CHECK_EXISTS manually
6665 # --------------------------------------------------------------
6666 AC_DEFUN([PKG_CHECK_EXISTS],
6667 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6668 if test -n "$PKG_CONFIG" && \
6669     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
6670   m4_ifval([$2], [$2], [:])
6671 m4_ifvaln([$3], [else
6672   $3])dnl
6673 fi])
6674
6675
6676 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
6677 # ---------------------------------------------
6678 m4_define([_PKG_CONFIG],
6679 [if test -n "$PKG_CONFIG"; then
6680     if test -n "$$1"; then
6681         pkg_cv_[]$1="$$1"
6682     else
6683         PKG_CHECK_EXISTS([$3],
6684                          [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6685                          [pkg_failed=yes])
6686     fi
6687 else
6688         pkg_failed=untried
6689 fi[]dnl
6690 ])# _PKG_CONFIG
6691
6692 # _PKG_SHORT_ERRORS_SUPPORTED
6693 # -----------------------------
6694 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
6695 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
6696 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
6697         _pkg_short_errors_supported=yes
6698 else
6699         _pkg_short_errors_supported=no
6700 fi[]dnl
6701 ])# _PKG_SHORT_ERRORS_SUPPORTED
6702
6703
6704 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
6705 # [ACTION-IF-NOT-FOUND])
6706 #
6707 #
6708 # Note that if there is a possibility the first call to
6709 # PKG_CHECK_MODULES might not happen, you should be sure to include an
6710 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
6711 #
6712 #
6713 # --------------------------------------------------------------
6714 AC_DEFUN([PKG_CHECK_MODULES],
6715 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6716 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
6717 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
6718
6719 pkg_failed=no
6720 AC_MSG_CHECKING([for $1])
6721
6722 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
6723 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
6724
6725 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
6726 and $1[]_LIBS to avoid the need to call pkg-config.
6727 See the pkg-config man page for more details.])
6728
6729 if test $pkg_failed = yes; then
6730         _PKG_SHORT_ERRORS_SUPPORTED
6731         if test $_pkg_short_errors_supported = yes; then
6732                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
6733         else 
6734                 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6735         fi
6736         # Put the nasty error message in config.log where it belongs
6737         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
6738
6739         ifelse([$4], , [AC_MSG_ERROR(dnl
6740 [Package requirements ($2) were not met:
6741
6742 $$1_PKG_ERRORS
6743
6744 Consider adjusting the PKG_CONFIG_PATH environment variable if you
6745 installed software in a non-standard prefix.
6746
6747 _PKG_TEXT
6748 ])],
6749                 [AC_MSG_RESULT([no])
6750                 $4])
6751 elif test $pkg_failed = untried; then
6752         ifelse([$4], , [AC_MSG_FAILURE(dnl
6753 [The pkg-config script could not be found or is too old.  Make sure it
6754 is in your PATH or set the PKG_CONFIG environment variable to the full
6755 path to pkg-config.
6756
6757 _PKG_TEXT
6758
6759 To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
6760                 [$4])
6761 else
6762         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6763         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
6764         AC_MSG_RESULT([yes])
6765         ifelse([$3], , :, [$3])
6766 fi[]dnl
6767 ])# PKG_CHECK_MODULES
6768
6769 #                                                        -*- Autoconf -*-
6770 # Copyright (C) 2002, 2003  Free Software Foundation, Inc.
6771 # Generated from amversion.in; do not edit by hand.
6772
6773 # This program is free software; you can redistribute it and/or modify
6774 # it under the terms of the GNU General Public License as published by
6775 # the Free Software Foundation; either version 2, or (at your option)
6776 # any later version.
6777
6778 # This program is distributed in the hope that it will be useful,
6779 # but WITHOUT ANY WARRANTY; without even the implied warranty of
6780 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6781 # GNU General Public License for more details.
6782
6783 # You should have received a copy of the GNU General Public License
6784 # along with this program; if not, write to the Free Software
6785 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6786
6787 # AM_AUTOMAKE_VERSION(VERSION)
6788 # ----------------------------
6789 # Automake X.Y traces this macro to ensure aclocal.m4 has been
6790 # generated from the m4 files accompanying Automake X.Y.
6791 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
6792
6793 # AM_SET_CURRENT_AUTOMAKE_VERSION
6794 # -------------------------------
6795 # Call AM_AUTOMAKE_VERSION so it can be traced.
6796 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6797 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6798          [AM_AUTOMAKE_VERSION([1.8.5])])
6799
6800 # AM_AUX_DIR_EXPAND
6801
6802 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
6803
6804 # This program is free software; you can redistribute it and/or modify
6805 # it under the terms of the GNU General Public License as published by
6806 # the Free Software Foundation; either version 2, or (at your option)
6807 # any later version.
6808
6809 # This program is distributed in the hope that it will be useful,
6810 # but WITHOUT ANY WARRANTY; without even the implied warranty of
6811 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6812 # GNU General Public License for more details.
6813
6814 # You should have received a copy of the GNU General Public License
6815 # along with this program; if not, write to the Free Software
6816 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6817 # 02111-1307, USA.
6818
6819 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6820 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
6821 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6822 #
6823 # Of course, Automake must honor this variable whenever it calls a
6824 # tool from the auxiliary directory.  The problem is that $srcdir (and
6825 # therefore $ac_aux_dir as well) can be either absolute or relative,
6826 # depending on how configure is run.  This is pretty annoying, since
6827 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
6828 # source directory, any form will work fine, but in subdirectories a
6829 # relative path needs to be adjusted first.
6830 #
6831 # $ac_aux_dir/missing
6832 #    fails when called from a subdirectory if $ac_aux_dir is relative
6833 # $top_srcdir/$ac_aux_dir/missing
6834 #    fails if $ac_aux_dir is absolute,
6835 #    fails when called from a subdirectory in a VPATH build with
6836 #          a relative $ac_aux_dir
6837 #
6838 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6839 # are both prefixed by $srcdir.  In an in-source build this is usually
6840 # harmless because $srcdir is `.', but things will broke when you
6841 # start a VPATH build or use an absolute $srcdir.
6842 #
6843 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6844 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
6845 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6846 # and then we would define $MISSING as
6847 #   MISSING="\${SHELL} $am_aux_dir/missing"
6848 # This will work as long as MISSING is not called from configure, because
6849 # unfortunately $(top_srcdir) has no meaning in configure.
6850 # However there are other variables, like CC, which are often used in
6851 # configure, and could therefore not use this "fixed" $ac_aux_dir.
6852 #
6853 # Another solution, used here, is to always expand $ac_aux_dir to an
6854 # absolute PATH.  The drawback is that using absolute paths prevent a
6855 # configured tree to be moved without reconfiguration.
6856
6857 AC_DEFUN([AM_AUX_DIR_EXPAND],
6858 [dnl Rely on autoconf to set up CDPATH properly.
6859 AC_PREREQ([2.50])dnl
6860 # expand $ac_aux_dir to an absolute path
6861 am_aux_dir=`cd $ac_aux_dir && pwd`
6862 ])
6863
6864 # AM_CONDITIONAL                                              -*- Autoconf -*-
6865
6866 # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
6867
6868 # This program is free software; you can redistribute it and/or modify
6869 # it under the terms of the GNU General Public License as published by
6870 # the Free Software Foundation; either version 2, or (at your option)
6871 # any later version.
6872
6873 # This program is distributed in the hope that it will be useful,
6874 # but WITHOUT ANY WARRANTY; without even the implied warranty of
6875 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6876 # GNU General Public License for more details.
6877
6878 # You should have received a copy of the GNU General Public License
6879 # along with this program; if not, write to the Free Software
6880 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6881 # 02111-1307, USA.
6882
6883 # serial 6
6884
6885 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
6886 # -------------------------------------
6887 # Define a conditional.
6888 AC_DEFUN([AM_CONDITIONAL],
6889 [AC_PREREQ(2.52)dnl
6890  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
6891         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6892 AC_SUBST([$1_TRUE])
6893 AC_SUBST([$1_FALSE])
6894 if $2; then
6895   $1_TRUE=
6896   $1_FALSE='#'
6897 else
6898   $1_TRUE='#'
6899   $1_FALSE=
6900 fi
6901 AC_CONFIG_COMMANDS_PRE(
6902 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6903   AC_MSG_ERROR([conditional "$1" was never defined.
6904 Usually this means the macro was only invoked conditionally.])
6905 fi])])
6906
6907 # serial 7                                              -*- Autoconf -*-
6908
6909 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
6910 # Free Software Foundation, Inc.
6911
6912 # This program is free software; you can redistribute it and/or modify
6913 # it under the terms of the GNU General Public License as published by
6914 # the Free Software Foundation; either version 2, or (at your option)
6915 # any later version.
6916
6917 # This program is distributed in the hope that it will be useful,
6918 # but WITHOUT ANY WARRANTY; without even the implied warranty of
6919 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6920 # GNU General Public License for more details.
6921
6922 # You should have received a copy of the GNU General Public License
6923 # along with this program; if not, write to the Free Software
6924 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6925 # 02111-1307, USA.
6926
6927
6928 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6929 # written in clear, in which case automake, when reading aclocal.m4,
6930 # will think it sees a *use*, and therefore will trigger all it's
6931 # C support machinery.  Also note that it means that autoscan, seeing
6932 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6933
6934
6935
6936 # _AM_DEPENDENCIES(NAME)
6937 # ----------------------
6938 # See how the compiler implements dependency checking.
6939 # NAME is "CC", "CXX", "GCJ", or "OBJC".
6940 # We try a few techniques and use that to set a single cache variable.
6941 #
6942 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6943 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6944 # dependency, and given that the user is not expected to run this macro,
6945 # just rely on AC_PROG_CC.
6946 AC_DEFUN([_AM_DEPENDENCIES],
6947 [AC_REQUIRE([AM_SET_DEPDIR])dnl
6948 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6949 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6950 AC_REQUIRE([AM_DEP_TRACK])dnl
6951
6952 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
6953        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
6954        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6955        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
6956                    [depcc="$$1"   am_compiler_list=])
6957
6958 AC_CACHE_CHECK([dependency style of $depcc],
6959                [am_cv_$1_dependencies_compiler_type],
6960 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6961   # We make a subdir and do the tests there.  Otherwise we can end up
6962   # making bogus files that we don't know about and never remove.  For
6963   # instance it was reported that on HP-UX the gcc test will end up
6964   # making a dummy file named `D' -- because `-MD' means `put the output
6965   # in D'.
6966   mkdir conftest.dir
6967   # Copy depcomp to subdir because otherwise we won't find it if we're
6968   # using a relative directory.
6969   cp "$am_depcomp" conftest.dir
6970   cd conftest.dir
6971   # We will build objects and dependencies in a subdirectory because
6972   # it helps to detect inapplicable dependency modes.  For instance
6973   # both Tru64's cc and ICC support -MD to output dependencies as a
6974   # side effect of compilation, but ICC will put the dependencies in
6975   # the current directory while Tru64 will put them in the object
6976   # directory.
6977   mkdir sub
6978
6979   am_cv_$1_dependencies_compiler_type=none
6980   if test "$am_compiler_list" = ""; then
6981      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6982   fi
6983   for depmode in $am_compiler_list; do
6984     # Setup a source with many dependencies, because some compilers
6985     # like to wrap large dependency lists on column 80 (with \), and
6986     # we should not choose a depcomp mode which is confused by this.
6987     #
6988     # We need to recreate these files for each test, as the compiler may
6989     # overwrite some of them when testing with obscure command lines.
6990     # This happens at least with the AIX C compiler.
6991     : > sub/conftest.c
6992     for i in 1 2 3 4 5 6; do
6993       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6994       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6995       # Solaris 8's {/usr,}/bin/sh.
6996       touch sub/conftst$i.h
6997     done
6998     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6999
7000     case $depmode in
7001     nosideeffect)
7002       # after this tag, mechanisms are not by side-effect, so they'll
7003       # only be used when explicitly requested
7004       if test "x$enable_dependency_tracking" = xyes; then
7005         continue
7006       else
7007         break
7008       fi
7009       ;;
7010     none) break ;;
7011     esac
7012     # We check with `-c' and `-o' for the sake of the "dashmstdout"
7013     # mode.  It turns out that the SunPro C++ compiler does not properly
7014     # handle `-M -o', and we need to detect this.
7015     if depmode=$depmode \
7016        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7017        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7018        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7019          >/dev/null 2>conftest.err &&
7020        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7021        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7022        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7023       # icc doesn't choke on unknown options, it will just issue warnings
7024       # or remarks (even with -Werror).  So we grep stderr for any message
7025       # that says an option was ignored or not supported.
7026       # When given -MP, icc 7.0 and 7.1 complain thusly:
7027       #   icc: Command line warning: ignoring option '-M'; no argument required
7028       # The diagnosis changed in icc 8.0:
7029       #   icc: Command line remark: option '-MP' not supported
7030       if (grep 'ignoring option' conftest.err ||
7031           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7032         am_cv_$1_dependencies_compiler_type=$depmode
7033         break
7034       fi
7035     fi
7036   done
7037
7038   cd ..
7039   rm -rf conftest.dir
7040 else
7041   am_cv_$1_dependencies_compiler_type=none
7042 fi
7043 ])
7044 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
7045 AM_CONDITIONAL([am__fastdep$1], [
7046   test "x$enable_dependency_tracking" != xno \
7047   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
7048 ])
7049
7050
7051 # AM_SET_DEPDIR
7052 # -------------
7053 # Choose a directory name for dependency files.
7054 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
7055 AC_DEFUN([AM_SET_DEPDIR],
7056 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7057 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
7058 ])
7059
7060
7061 # AM_DEP_TRACK
7062 # ------------
7063 AC_DEFUN([AM_DEP_TRACK],
7064 [AC_ARG_ENABLE(dependency-tracking,
7065 [  --disable-dependency-tracking  speeds up one-time build
7066   --enable-dependency-tracking   do not reject slow dependency extractors])
7067 if test "x$enable_dependency_tracking" != xno; then
7068   am_depcomp="$ac_aux_dir/depcomp"
7069   AMDEPBACKSLASH='\'
7070 fi
7071 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
7072 AC_SUBST([AMDEPBACKSLASH])
7073 ])
7074
7075 # Generate code to set up dependency tracking.   -*- Autoconf -*-
7076
7077 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
7078
7079 # This program is free software; you can redistribute it and/or modify
7080 # it under the terms of the GNU General Public License as published by
7081 # the Free Software Foundation; either version 2, or (at your option)
7082 # any later version.
7083
7084 # This program is distributed in the hope that it will be useful,
7085 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7086 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7087 # GNU General Public License for more details.
7088
7089 # You should have received a copy of the GNU General Public License
7090 # along with this program; if not, write to the Free Software
7091 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7092 # 02111-1307, USA.
7093
7094 #serial 2
7095
7096 # _AM_OUTPUT_DEPENDENCY_COMMANDS
7097 # ------------------------------
7098 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
7099 [for mf in $CONFIG_FILES; do
7100   # Strip MF so we end up with the name of the file.
7101   mf=`echo "$mf" | sed -e 's/:.*$//'`
7102   # Check whether this is an Automake generated Makefile or not.
7103   # We used to match only the files named `Makefile.in', but
7104   # some people rename them; so instead we look at the file content.
7105   # Grep'ing the first line is not enough: some people post-process
7106   # each Makefile.in and add a new line on top of each file to say so.
7107   # So let's grep whole file.
7108   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
7109     dirpart=`AS_DIRNAME("$mf")`
7110   else
7111     continue
7112   fi
7113   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
7114   # Extract the definition of DEP_FILES from the Makefile without
7115   # running `make'.
7116   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
7117   test -z "$DEPDIR" && continue
7118   # When using ansi2knr, U may be empty or an underscore; expand it
7119   U=`sed -n 's/^U = //p' < "$mf"`
7120   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
7121   # We invoke sed twice because it is the simplest approach to
7122   # changing $(DEPDIR) to its actual value in the expansion.
7123   for file in `sed -n '
7124     /^DEP_FILES = .*\\\\$/ {
7125       s/^DEP_FILES = //
7126       :loop
7127         s/\\\\$//
7128         p
7129         n
7130         /\\\\$/ b loop
7131       p
7132     }
7133     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
7134        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7135     # Make sure the directory exists.
7136     test -f "$dirpart/$file" && continue
7137     fdir=`AS_DIRNAME(["$file"])`
7138     AS_MKDIR_P([$dirpart/$fdir])
7139     # echo "creating $dirpart/$file"
7140     echo '# dummy' > "$dirpart/$file"
7141   done
7142 done
7143 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7144
7145
7146 # AM_OUTPUT_DEPENDENCY_COMMANDS
7147 # -----------------------------
7148 # This macro should only be invoked once -- use via AC_REQUIRE.
7149 #
7150 # This code is only required when automatic dependency tracking
7151 # is enabled.  FIXME.  This creates each `.P' file that we will
7152 # need in order to bootstrap the dependency handling code.
7153 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7154 [AC_CONFIG_COMMANDS([depfiles],
7155      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7156      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7157 ])
7158
7159 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
7160
7161 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
7162
7163 # This program is free software; you can redistribute it and/or modify
7164 # it under the terms of the GNU General Public License as published by
7165 # the Free Software Foundation; either version 2, or (at your option)
7166 # any later version.
7167
7168 # This program is distributed in the hope that it will be useful,
7169 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7170 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7171 # GNU General Public License for more details.
7172
7173 # You should have received a copy of the GNU General Public License
7174 # along with this program; if not, write to the Free Software
7175 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7176 # 02111-1307, USA.
7177
7178 # serial 7
7179
7180 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
7181 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
7182
7183 # Do all the work for Automake.                            -*- Autoconf -*-
7184
7185 # This macro actually does too much some checks are only needed if
7186 # your package does certain things.  But this isn't really a big deal.
7187
7188 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
7189 # Free Software Foundation, Inc.
7190
7191 # This program is free software; you can redistribute it and/or modify
7192 # it under the terms of the GNU General Public License as published by
7193 # the Free Software Foundation; either version 2, or (at your option)
7194 # any later version.
7195
7196 # This program is distributed in the hope that it will be useful,
7197 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7198 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7199 # GNU General Public License for more details.
7200
7201 # You should have received a copy of the GNU General Public License
7202 # along with this program; if not, write to the Free Software
7203 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7204 # 02111-1307, USA.
7205
7206 # serial 11
7207
7208 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
7209 # AM_INIT_AUTOMAKE([OPTIONS])
7210 # -----------------------------------------------
7211 # The call with PACKAGE and VERSION arguments is the old style
7212 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
7213 # and VERSION should now be passed to AC_INIT and removed from
7214 # the call to AM_INIT_AUTOMAKE.
7215 # We support both call styles for the transition.  After
7216 # the next Automake release, Autoconf can make the AC_INIT
7217 # arguments mandatory, and then we can depend on a new Autoconf
7218 # release and drop the old call support.
7219 AC_DEFUN([AM_INIT_AUTOMAKE],
7220 [AC_PREREQ([2.58])dnl
7221 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
7222 dnl the ones we care about.
7223 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
7224 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
7225 AC_REQUIRE([AC_PROG_INSTALL])dnl
7226 # test to see if srcdir already configured
7227 if test "`cd $srcdir && pwd`" != "`pwd`" &&
7228    test -f $srcdir/config.status; then
7229   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
7230 fi
7231
7232 # test whether we have cygpath
7233 if test -z "$CYGPATH_W"; then
7234   if (cygpath --version) >/dev/null 2>/dev/null; then
7235     CYGPATH_W='cygpath -w'
7236   else
7237     CYGPATH_W=echo
7238   fi
7239 fi
7240 AC_SUBST([CYGPATH_W])
7241
7242 # Define the identity of the package.
7243 dnl Distinguish between old-style and new-style calls.
7244 m4_ifval([$2],
7245 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
7246  AC_SUBST([PACKAGE], [$1])dnl
7247  AC_SUBST([VERSION], [$2])],
7248 [_AM_SET_OPTIONS([$1])dnl
7249  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
7250  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
7251
7252 _AM_IF_OPTION([no-define],,
7253 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
7254  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
7255
7256 # Some tools Automake needs.
7257 AC_REQUIRE([AM_SANITY_CHECK])dnl
7258 AC_REQUIRE([AC_ARG_PROGRAM])dnl
7259 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
7260 AM_MISSING_PROG(AUTOCONF, autoconf)
7261 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
7262 AM_MISSING_PROG(AUTOHEADER, autoheader)
7263 AM_MISSING_PROG(MAKEINFO, makeinfo)
7264 AM_MISSING_PROG(AMTAR, tar)
7265 AM_PROG_INSTALL_SH
7266 AM_PROG_INSTALL_STRIP
7267 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
7268 # We need awk for the "check" target.  The system "awk" is bad on
7269 # some platforms.
7270 AC_REQUIRE([AC_PROG_AWK])dnl
7271 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
7272 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7273
7274 _AM_IF_OPTION([no-dependencies],,
7275 [AC_PROVIDE_IFELSE([AC_PROG_CC],
7276                   [_AM_DEPENDENCIES(CC)],
7277                   [define([AC_PROG_CC],
7278                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
7279 AC_PROVIDE_IFELSE([AC_PROG_CXX],
7280                   [_AM_DEPENDENCIES(CXX)],
7281                   [define([AC_PROG_CXX],
7282                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
7283 ])
7284 ])
7285
7286
7287 # When config.status generates a header, we must update the stamp-h file.
7288 # This file resides in the same directory as the config header
7289 # that is generated.  The stamp files are numbered to have different names.
7290
7291 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
7292 # loop where config.status creates the headers, so we can generate
7293 # our stamp files there.
7294 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
7295 [# Compute $1's index in $config_headers.
7296 _am_stamp_count=1
7297 for _am_header in $config_headers :; do
7298   case $_am_header in
7299     $1 | $1:* )
7300       break ;;
7301     * )
7302       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
7303   esac
7304 done
7305 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
7306
7307 # AM_PROG_INSTALL_SH
7308 # ------------------
7309 # Define $install_sh.
7310
7311 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
7312
7313 # This program is free software; you can redistribute it and/or modify
7314 # it under the terms of the GNU General Public License as published by
7315 # the Free Software Foundation; either version 2, or (at your option)
7316 # any later version.
7317
7318 # This program is distributed in the hope that it will be useful,
7319 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7320 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7321 # GNU General Public License for more details.
7322
7323 # You should have received a copy of the GNU General Public License
7324 # along with this program; if not, write to the Free Software
7325 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7326 # 02111-1307, USA.
7327
7328 AC_DEFUN([AM_PROG_INSTALL_SH],
7329 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7330 install_sh=${install_sh-"$am_aux_dir/install-sh"}
7331 AC_SUBST(install_sh)])
7332
7333 #                                                          -*- Autoconf -*-
7334 # Copyright (C) 2003  Free Software Foundation, Inc.
7335
7336 # This program is free software; you can redistribute it and/or modify
7337 # it under the terms of the GNU General Public License as published by
7338 # the Free Software Foundation; either version 2, or (at your option)
7339 # any later version.
7340
7341 # This program is distributed in the hope that it will be useful,
7342 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7343 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7344 # GNU General Public License for more details.
7345
7346 # You should have received a copy of the GNU General Public License
7347 # along with this program; if not, write to the Free Software
7348 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7349 # 02111-1307, USA.
7350
7351 # serial 1
7352
7353 # Check whether the underlying file-system supports filenames
7354 # with a leading dot.  For instance MS-DOS doesn't.
7355 AC_DEFUN([AM_SET_LEADING_DOT],
7356 [rm -rf .tst 2>/dev/null
7357 mkdir .tst 2>/dev/null
7358 if test -d .tst; then
7359   am__leading_dot=.
7360 else
7361   am__leading_dot=_
7362 fi
7363 rmdir .tst 2>/dev/null
7364 AC_SUBST([am__leading_dot])])
7365
7366 # Check to see how 'make' treats includes.      -*- Autoconf -*-
7367
7368 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
7369
7370 # This program is free software; you can redistribute it and/or modify
7371 # it under the terms of the GNU General Public License as published by
7372 # the Free Software Foundation; either version 2, or (at your option)
7373 # any later version.
7374
7375 # This program is distributed in the hope that it will be useful,
7376 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7377 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7378 # GNU General Public License for more details.
7379
7380 # You should have received a copy of the GNU General Public License
7381 # along with this program; if not, write to the Free Software
7382 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7383 # 02111-1307, USA.
7384
7385 # serial 2
7386
7387 # AM_MAKE_INCLUDE()
7388 # -----------------
7389 # Check to see how make treats includes.
7390 AC_DEFUN([AM_MAKE_INCLUDE],
7391 [am_make=${MAKE-make}
7392 cat > confinc << 'END'
7393 am__doit:
7394         @echo done
7395 .PHONY: am__doit
7396 END
7397 # If we don't find an include directive, just comment out the code.
7398 AC_MSG_CHECKING([for style of include used by $am_make])
7399 am__include="#"
7400 am__quote=
7401 _am_result=none
7402 # First try GNU make style include.
7403 echo "include confinc" > confmf
7404 # We grep out `Entering directory' and `Leaving directory'
7405 # messages which can occur if `w' ends up in MAKEFLAGS.
7406 # In particular we don't look at `^make:' because GNU make might
7407 # be invoked under some other name (usually "gmake"), in which
7408 # case it prints its new name instead of `make'.
7409 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7410    am__include=include
7411    am__quote=
7412    _am_result=GNU
7413 fi
7414 # Now try BSD make style include.
7415 if test "$am__include" = "#"; then
7416    echo '.include "confinc"' > confmf
7417    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7418       am__include=.include
7419       am__quote="\""
7420       _am_result=BSD
7421    fi
7422 fi
7423 AC_SUBST([am__include])
7424 AC_SUBST([am__quote])
7425 AC_MSG_RESULT([$_am_result])
7426 rm -f confinc confmf
7427 ])
7428
7429 #  -*- Autoconf -*-
7430
7431
7432 # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
7433
7434 # This program is free software; you can redistribute it and/or modify
7435 # it under the terms of the GNU General Public License as published by
7436 # the Free Software Foundation; either version 2, or (at your option)
7437 # any later version.
7438
7439 # This program is distributed in the hope that it will be useful,
7440 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7441 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7442 # GNU General Public License for more details.
7443
7444 # You should have received a copy of the GNU General Public License
7445 # along with this program; if not, write to the Free Software
7446 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7447 # 02111-1307, USA.
7448
7449 # serial 3
7450
7451 # AM_MISSING_PROG(NAME, PROGRAM)
7452 # ------------------------------
7453 AC_DEFUN([AM_MISSING_PROG],
7454 [AC_REQUIRE([AM_MISSING_HAS_RUN])
7455 $1=${$1-"${am_missing_run}$2"}
7456 AC_SUBST($1)])
7457
7458
7459 # AM_MISSING_HAS_RUN
7460 # ------------------
7461 # Define MISSING if not defined so far and test if it supports --run.
7462 # If it does, set am_missing_run to use it, otherwise, to nothing.
7463 AC_DEFUN([AM_MISSING_HAS_RUN],
7464 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7465 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7466 # Use eval to expand $SHELL
7467 if eval "$MISSING --run true"; then
7468   am_missing_run="$MISSING --run "
7469 else
7470   am_missing_run=
7471   AC_MSG_WARN([`missing' script is too old or missing])
7472 fi
7473 ])
7474
7475 # AM_PROG_MKDIR_P
7476 # ---------------
7477 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
7478
7479 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
7480
7481 # This program is free software; you can redistribute it and/or modify
7482 # it under the terms of the GNU General Public License as published by
7483 # the Free Software Foundation; either version 2, or (at your option)
7484 # any later version.
7485
7486 # This program is distributed in the hope that it will be useful,
7487 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7488 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7489 # GNU General Public License for more details.
7490
7491 # You should have received a copy of the GNU General Public License
7492 # along with this program; if not, write to the Free Software
7493 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7494 # 02111-1307, USA.
7495
7496 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
7497 # created by `make install' are always world readable, even if the
7498 # installer happens to have an overly restrictive umask (e.g. 077).
7499 # This was a mistake.  There are at least two reasons why we must not
7500 # use `-m 0755':
7501 #   - it causes special bits like SGID to be ignored,
7502 #   - it may be too restrictive (some setups expect 775 directories).
7503 #
7504 # Do not use -m 0755 and let people choose whatever they expect by
7505 # setting umask.
7506 #
7507 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
7508 # Some implementations (such as Solaris 8's) are not thread-safe: if a
7509 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
7510 # concurrently, both version can detect that a/ is missing, but only
7511 # one can create it and the other will error out.  Consequently we
7512 # restrict ourselves to GNU make (using the --version option ensures
7513 # this.)
7514 AC_DEFUN([AM_PROG_MKDIR_P],
7515 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
7516   # Keeping the `.' argument allows $(mkdir_p) to be used without
7517   # argument.  Indeed, we sometimes output rules like
7518   #   $(mkdir_p) $(somedir)
7519   # where $(somedir) is conditionally defined.
7520   # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
7521   # expensive solution, as it forces Make to start a sub-shell.)
7522   mkdir_p='mkdir -p -- .'
7523 else
7524   # On NextStep and OpenStep, the `mkdir' command does not
7525   # recognize any option.  It will interpret all options as
7526   # directories to create, and then abort because `.' already
7527   # exists.
7528   for d in ./-p ./--version;
7529   do
7530     test -d $d && rmdir $d
7531   done
7532   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7533   if test -f "$ac_aux_dir/mkinstalldirs"; then
7534     mkdir_p='$(mkinstalldirs)'
7535   else
7536     mkdir_p='$(install_sh) -d'
7537   fi
7538 fi
7539 AC_SUBST([mkdir_p])])
7540
7541 # Helper functions for option handling.                    -*- Autoconf -*-
7542
7543 # Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
7544
7545 # This program is free software; you can redistribute it and/or modify
7546 # it under the terms of the GNU General Public License as published by
7547 # the Free Software Foundation; either version 2, or (at your option)
7548 # any later version.
7549
7550 # This program is distributed in the hope that it will be useful,
7551 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7552 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7553 # GNU General Public License for more details.
7554
7555 # You should have received a copy of the GNU General Public License
7556 # along with this program; if not, write to the Free Software
7557 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7558 # 02111-1307, USA.
7559
7560 # serial 2
7561
7562 # _AM_MANGLE_OPTION(NAME)
7563 # -----------------------
7564 AC_DEFUN([_AM_MANGLE_OPTION],
7565 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7566
7567 # _AM_SET_OPTION(NAME)
7568 # ------------------------------
7569 # Set option NAME.  Presently that only means defining a flag for this option.
7570 AC_DEFUN([_AM_SET_OPTION],
7571 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7572
7573 # _AM_SET_OPTIONS(OPTIONS)
7574 # ----------------------------------
7575 # OPTIONS is a space-separated list of Automake options.
7576 AC_DEFUN([_AM_SET_OPTIONS],
7577 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7578
7579 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7580 # -------------------------------------------
7581 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7582 AC_DEFUN([_AM_IF_OPTION],
7583 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7584
7585 #
7586 # Check to make sure that the build environment is sane.
7587 #
7588
7589 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
7590
7591 # This program is free software; you can redistribute it and/or modify
7592 # it under the terms of the GNU General Public License as published by
7593 # the Free Software Foundation; either version 2, or (at your option)
7594 # any later version.
7595
7596 # This program is distributed in the hope that it will be useful,
7597 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7598 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7599 # GNU General Public License for more details.
7600
7601 # You should have received a copy of the GNU General Public License
7602 # along with this program; if not, write to the Free Software
7603 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7604 # 02111-1307, USA.
7605
7606 # serial 3
7607
7608 # AM_SANITY_CHECK
7609 # ---------------
7610 AC_DEFUN([AM_SANITY_CHECK],
7611 [AC_MSG_CHECKING([whether build environment is sane])
7612 # Just in case
7613 sleep 1
7614 echo timestamp > conftest.file
7615 # Do `set' in a subshell so we don't clobber the current shell's
7616 # arguments.  Must try -L first in case configure is actually a
7617 # symlink; some systems play weird games with the mod time of symlinks
7618 # (eg FreeBSD returns the mod time of the symlink's containing
7619 # directory).
7620 if (
7621    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7622    if test "$[*]" = "X"; then
7623       # -L didn't work.
7624       set X `ls -t $srcdir/configure conftest.file`
7625    fi
7626    rm -f conftest.file
7627    if test "$[*]" != "X $srcdir/configure conftest.file" \
7628       && test "$[*]" != "X conftest.file $srcdir/configure"; then
7629
7630       # If neither matched, then we have a broken ls.  This can happen
7631       # if, for instance, CONFIG_SHELL is bash and it inherits a
7632       # broken ls alias from the environment.  This has actually
7633       # happened.  Such a system could not be considered "sane".
7634       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
7635 alias in your environment])
7636    fi
7637
7638    test "$[2]" = conftest.file
7639    )
7640 then
7641    # Ok.
7642    :
7643 else
7644    AC_MSG_ERROR([newly created file is older than distributed files!
7645 Check your system clock])
7646 fi
7647 AC_MSG_RESULT(yes)])
7648
7649 # AM_PROG_INSTALL_STRIP
7650
7651 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
7652
7653 # This program is free software; you can redistribute it and/or modify
7654 # it under the terms of the GNU General Public License as published by
7655 # the Free Software Foundation; either version 2, or (at your option)
7656 # any later version.
7657
7658 # This program is distributed in the hope that it will be useful,
7659 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7660 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7661 # GNU General Public License for more details.
7662
7663 # You should have received a copy of the GNU General Public License
7664 # along with this program; if not, write to the Free Software
7665 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7666 # 02111-1307, USA.
7667
7668 # One issue with vendor `install' (even GNU) is that you can't
7669 # specify the program used to strip binaries.  This is especially
7670 # annoying in cross-compiling environments, where the build's strip
7671 # is unlikely to handle the host's binaries.
7672 # Fortunately install-sh will honor a STRIPPROG variable, so we
7673 # always use install-sh in `make install-strip', and initialize
7674 # STRIPPROG with the value of the STRIP variable (set by the user).
7675 AC_DEFUN([AM_PROG_INSTALL_STRIP],
7676 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7677 # Installed binaries are usually stripped using `strip' when the user
7678 # run `make install-strip'.  However `strip' might not be the right
7679 # tool to use in cross-compilation environments, therefore Automake
7680 # will honor the `STRIP' environment variable to overrule this program.
7681 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7682 if test "$cross_compiling" != no; then
7683   AC_CHECK_TOOL([STRIP], [strip], :)
7684 fi
7685 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
7686 AC_SUBST([INSTALL_STRIP_PROGRAM])])
7687