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