1# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_AUTOCONF_VERSION],
15  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17[m4_warning([this file was generated for autoconf 2.68.
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# Configure paths for GTK+
23# Owen Taylor     97-11-3
24
25dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
26dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
27dnl
28AC_DEFUN([AM_PATH_GTK],
29[dnl
30dnl Get the cflags and libraries from the gtk-config script
31dnl
32AC_ARG_WITH(gtk-prefix,[  --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)],
33            gtk_config_prefix="$withval", gtk_config_prefix="")
34AC_ARG_WITH(gtk-exec-prefix,[  --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
35            gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
36AC_ARG_ENABLE(gtktest, [  --disable-gtktest       Do not try to compile and run a test GTK program],
37		    , enable_gtktest=yes)
38
39  for module in . $4
40  do
41      case "$module" in
42         gthread)
43             gtk_config_args="$gtk_config_args gthread"
44         ;;
45      esac
46  done
47
48  if test x$gtk_config_exec_prefix != x ; then
49     gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
50     if test x${GTK_CONFIG+set} != xset ; then
51        GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
52     fi
53  fi
54  if test x$gtk_config_prefix != x ; then
55     gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
56     if test x${GTK_CONFIG+set} != xset ; then
57        GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
58     fi
59  fi
60
61  AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
62  min_gtk_version=ifelse([$1], ,0.99.7,$1)
63  AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
64  no_gtk=""
65  if test "$GTK_CONFIG" = "no" ; then
66    no_gtk=yes
67  else
68    GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
69    GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
70    gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
71           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
72    gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
73           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
74    gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
75           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
76    if test "x$enable_gtktest" = "xyes" ; then
77      ac_save_CFLAGS="$CFLAGS"
78      ac_save_LIBS="$LIBS"
79      CFLAGS="$CFLAGS $GTK_CFLAGS"
80      LIBS="$GTK_LIBS $LIBS"
81dnl
82dnl Now check if the installed GTK is sufficiently new. (Also sanity
83dnl checks the results of gtk-config to some extent
84dnl
85      rm -f conf.gtktest
86      AC_TRY_RUN([
87#include <gtk/gtk.h>
88#include <stdio.h>
89#include <stdlib.h>
90
91int
92main ()
93{
94  int major, minor, micro;
95  char *tmp_version;
96
97  system ("touch conf.gtktest");
98
99  /* HP/UX 9 (%@#!) writes to sscanf strings */
100  tmp_version = g_strdup("$min_gtk_version");
101  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
102     printf("%s, bad version string\n", "$min_gtk_version");
103     exit(1);
104   }
105
106  if ((gtk_major_version != $gtk_config_major_version) ||
107      (gtk_minor_version != $gtk_config_minor_version) ||
108      (gtk_micro_version != $gtk_config_micro_version))
109    {
110      printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
111             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
112             gtk_major_version, gtk_minor_version, gtk_micro_version);
113      printf ("*** was found! If gtk-config was correct, then it is best\n");
114      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
115      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
116      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
117      printf("*** required on your system.\n");
118      printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
119      printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
120      printf("*** before re-running configure\n");
121    }
122#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
123  else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
124	   (gtk_minor_version != GTK_MINOR_VERSION) ||
125           (gtk_micro_version != GTK_MICRO_VERSION))
126    {
127      printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
128	     GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
129      printf("*** library (version %d.%d.%d)\n",
130	     gtk_major_version, gtk_minor_version, gtk_micro_version);
131    }
132#endif /* defined (GTK_MAJOR_VERSION) ... */
133  else
134    {
135      if ((gtk_major_version > major) ||
136        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
137        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
138      {
139        return 0;
140       }
141     else
142      {
143        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
144               gtk_major_version, gtk_minor_version, gtk_micro_version);
145        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
146	       major, minor, micro);
147        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
148        printf("***\n");
149        printf("*** If you have already installed a sufficiently new version, this error\n");
150        printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
151        printf("*** being found. The easiest way to fix this is to remove the old version\n");
152        printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
153        printf("*** correct copy of gtk-config. (In this case, you will have to\n");
154        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
155        printf("*** so that the correct libraries are found at run-time))\n");
156      }
157    }
158  return 1;
159}
160],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
161       CFLAGS="$ac_save_CFLAGS"
162       LIBS="$ac_save_LIBS"
163     fi
164  fi
165  if test "x$no_gtk" = x ; then
166     AC_MSG_RESULT(yes)
167     ifelse([$2], , :, [$2])
168  else
169     AC_MSG_RESULT(no)
170     if test "$GTK_CONFIG" = "no" ; then
171       echo "*** The gtk-config script installed by GTK could not be found"
172       echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
173       echo "*** your path, or set the GTK_CONFIG environment variable to the"
174       echo "*** full path to gtk-config."
175     else
176       if test -f conf.gtktest ; then
177        :
178       else
179          echo "*** Could not run GTK test program, checking why..."
180          CFLAGS="$CFLAGS $GTK_CFLAGS"
181          LIBS="$LIBS $GTK_LIBS"
182          AC_TRY_LINK([
183#include <gtk/gtk.h>
184#include <stdio.h>
185],      [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
186        [ echo "*** The test program compiled, but did not run. This usually means"
187          echo "*** that the run-time linker is not finding GTK or finding the wrong"
188          echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
189          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
190          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
191          echo "*** is required on your system"
192	  echo "***"
193          echo "*** If you have an old version installed, it is best to remove it, although"
194          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
195          echo "***"
196          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
197          echo "*** came with the system with the command"
198          echo "***"
199          echo "***    rpm --erase --nodeps gtk gtk-devel" ],
200        [ echo "*** The test program failed to compile or link. See the file config.log for the"
201          echo "*** exact error that occured. This usually means GTK was incorrectly installed"
202          echo "*** or that you have moved GTK since it was installed. In the latter case, you"
203          echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
204          CFLAGS="$ac_save_CFLAGS"
205          LIBS="$ac_save_LIBS"
206       fi
207     fi
208     GTK_CFLAGS=""
209     GTK_LIBS=""
210     ifelse([$3], , :, [$3])
211  fi
212  AC_SUBST(GTK_CFLAGS)
213  AC_SUBST(GTK_LIBS)
214  rm -f conf.gtktest
215])
216
217# iconv.m4 serial 11 (gettext-0.18.1)
218dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
219dnl This file is free software; the Free Software Foundation
220dnl gives unlimited permission to copy and/or distribute it,
221dnl with or without modifications, as long as this notice is preserved.
222
223dnl From Bruno Haible.
224
225AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
226[
227  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
228  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
229  AC_REQUIRE([AC_LIB_RPATH])
230
231  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
232  dnl accordingly.
233  AC_LIB_LINKFLAGS_BODY([iconv])
234])
235
236AC_DEFUN([AM_ICONV_LINK],
237[
238  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
239  dnl those with the standalone portable GNU libiconv installed).
240  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
241
242  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
243  dnl accordingly.
244  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
245
246  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
247  dnl because if the user has installed libiconv and not disabled its use
248  dnl via --without-libiconv-prefix, he wants to use it. The first
249  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
250  am_save_CPPFLAGS="$CPPFLAGS"
251  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
252
253  AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
254    am_cv_func_iconv="no, consider installing GNU libiconv"
255    am_cv_lib_iconv=no
256    AC_TRY_LINK([#include <stdlib.h>
257#include <iconv.h>],
258      [iconv_t cd = iconv_open("","");
259       iconv(cd,NULL,NULL,NULL,NULL);
260       iconv_close(cd);],
261      [am_cv_func_iconv=yes])
262    if test "$am_cv_func_iconv" != yes; then
263      am_save_LIBS="$LIBS"
264      LIBS="$LIBS $LIBICONV"
265      AC_TRY_LINK([#include <stdlib.h>
266#include <iconv.h>],
267        [iconv_t cd = iconv_open("","");
268         iconv(cd,NULL,NULL,NULL,NULL);
269         iconv_close(cd);],
270        [am_cv_lib_iconv=yes]
271        [am_cv_func_iconv=yes])
272      LIBS="$am_save_LIBS"
273    fi
274  ])
275  if test "$am_cv_func_iconv" = yes; then
276    AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
277      dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
278      am_save_LIBS="$LIBS"
279      if test $am_cv_lib_iconv = yes; then
280        LIBS="$LIBS $LIBICONV"
281      fi
282      AC_TRY_RUN([
283#include <iconv.h>
284#include <string.h>
285int main ()
286{
287  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
288     returns.  */
289  {
290    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
291    if (cd_utf8_to_88591 != (iconv_t)(-1))
292      {
293        static const char input[] = "\342\202\254"; /* EURO SIGN */
294        char buf[10];
295        const char *inptr = input;
296        size_t inbytesleft = strlen (input);
297        char *outptr = buf;
298        size_t outbytesleft = sizeof (buf);
299        size_t res = iconv (cd_utf8_to_88591,
300                            (char **) &inptr, &inbytesleft,
301                            &outptr, &outbytesleft);
302        if (res == 0)
303          return 1;
304      }
305  }
306  /* Test against Solaris 10 bug: Failures are not distinguishable from
307     successful returns.  */
308  {
309    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
310    if (cd_ascii_to_88591 != (iconv_t)(-1))
311      {
312        static const char input[] = "\263";
313        char buf[10];
314        const char *inptr = input;
315        size_t inbytesleft = strlen (input);
316        char *outptr = buf;
317        size_t outbytesleft = sizeof (buf);
318        size_t res = iconv (cd_ascii_to_88591,
319                            (char **) &inptr, &inbytesleft,
320                            &outptr, &outbytesleft);
321        if (res == 0)
322          return 1;
323      }
324  }
325#if 0 /* This bug could be worked around by the caller.  */
326  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
327  {
328    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
329    if (cd_88591_to_utf8 != (iconv_t)(-1))
330      {
331        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
332        char buf[50];
333        const char *inptr = input;
334        size_t inbytesleft = strlen (input);
335        char *outptr = buf;
336        size_t outbytesleft = sizeof (buf);
337        size_t res = iconv (cd_88591_to_utf8,
338                            (char **) &inptr, &inbytesleft,
339                            &outptr, &outbytesleft);
340        if ((int)res > 0)
341          return 1;
342      }
343  }
344#endif
345  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
346     provided.  */
347  if (/* Try standardized names.  */
348      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
349      /* Try IRIX, OSF/1 names.  */
350      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
351      /* Try AIX names.  */
352      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
353      /* Try HP-UX names.  */
354      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
355    return 1;
356  return 0;
357}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
358        [case "$host_os" in
359           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
360           *)            am_cv_func_iconv_works="guessing yes" ;;
361         esac])
362      LIBS="$am_save_LIBS"
363    ])
364    case "$am_cv_func_iconv_works" in
365      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
366      *)   am_func_iconv=yes ;;
367    esac
368  else
369    am_func_iconv=no am_cv_lib_iconv=no
370  fi
371  if test "$am_func_iconv" = yes; then
372    AC_DEFINE([HAVE_ICONV], [1],
373      [Define if you have the iconv() function and it works.])
374  fi
375  if test "$am_cv_lib_iconv" = yes; then
376    AC_MSG_CHECKING([how to link with libiconv])
377    AC_MSG_RESULT([$LIBICONV])
378  else
379    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
380    dnl either.
381    CPPFLAGS="$am_save_CPPFLAGS"
382    LIBICONV=
383    LTLIBICONV=
384  fi
385  AC_SUBST([LIBICONV])
386  AC_SUBST([LTLIBICONV])
387])
388
389dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
390dnl avoid warnings like
391dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
392dnl This is tricky because of the way 'aclocal' is implemented:
393dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
394dnl   Otherwise aclocal's initial scan pass would miss the macro definition.
395dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
396dnl   Otherwise aclocal would emit many "Use of uninitialized value $1"
397dnl   warnings.
398m4_define([gl_iconv_AC_DEFUN],
399  m4_version_prereq([2.64],
400    [[AC_DEFUN_ONCE(
401        [$1], [$2])]],
402    [[AC_DEFUN(
403        [$1], [$2])]]))
404gl_iconv_AC_DEFUN([AM_ICONV],
405[
406  AM_ICONV_LINK
407  if test "$am_cv_func_iconv" = yes; then
408    AC_MSG_CHECKING([for iconv declaration])
409    AC_CACHE_VAL([am_cv_proto_iconv], [
410      AC_TRY_COMPILE([
411#include <stdlib.h>
412#include <iconv.h>
413extern
414#ifdef __cplusplus
415"C"
416#endif
417#if defined(__STDC__) || defined(__cplusplus)
418size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
419#else
420size_t iconv();
421#endif
422], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
423      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
424    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
425    AC_MSG_RESULT([
426         $am_cv_proto_iconv])
427    AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
428      [Define as const if the declaration of iconv() needs const.])
429  fi
430])
431
432# lib-ld.m4 serial 4 (gettext-0.18)
433dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
434dnl This file is free software; the Free Software Foundation
435dnl gives unlimited permission to copy and/or distribute it,
436dnl with or without modifications, as long as this notice is preserved.
437
438dnl Subroutines of libtool.m4,
439dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
440dnl with libtool.m4.
441
442dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
443AC_DEFUN([AC_LIB_PROG_LD_GNU],
444[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
445[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
446case `$LD -v 2>&1 </dev/null` in
447*GNU* | *'with BFD'*)
448  acl_cv_prog_gnu_ld=yes ;;
449*)
450  acl_cv_prog_gnu_ld=no ;;
451esac])
452with_gnu_ld=$acl_cv_prog_gnu_ld
453])
454
455dnl From libtool-1.4. Sets the variable LD.
456AC_DEFUN([AC_LIB_PROG_LD],
457[AC_ARG_WITH([gnu-ld],
458[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
459test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
460AC_REQUIRE([AC_PROG_CC])dnl
461AC_REQUIRE([AC_CANONICAL_HOST])dnl
462# Prepare PATH_SEPARATOR.
463# The user is always right.
464if test "${PATH_SEPARATOR+set}" != set; then
465  echo "#! /bin/sh" >conf$$.sh
466  echo  "exit 0"   >>conf$$.sh
467  chmod +x conf$$.sh
468  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
469    PATH_SEPARATOR=';'
470  else
471    PATH_SEPARATOR=:
472  fi
473  rm -f conf$$.sh
474fi
475ac_prog=ld
476if test "$GCC" = yes; then
477  # Check if gcc -print-prog-name=ld gives a path.
478  AC_MSG_CHECKING([for ld used by GCC])
479  case $host in
480  *-*-mingw*)
481    # gcc leaves a trailing carriage return which upsets mingw
482    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
483  *)
484    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
485  esac
486  case $ac_prog in
487    # Accept absolute paths.
488    [[\\/]* | [A-Za-z]:[\\/]*)]
489      [re_direlt='/[^/][^/]*/\.\./']
490      # Canonicalize the path of ld
491      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
492      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
493        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
494      done
495      test -z "$LD" && LD="$ac_prog"
496      ;;
497  "")
498    # If it fails, then pretend we aren't using GCC.
499    ac_prog=ld
500    ;;
501  *)
502    # If it is relative, then search for the first ld in PATH.
503    with_gnu_ld=unknown
504    ;;
505  esac
506elif test "$with_gnu_ld" = yes; then
507  AC_MSG_CHECKING([for GNU ld])
508else
509  AC_MSG_CHECKING([for non-GNU ld])
510fi
511AC_CACHE_VAL([acl_cv_path_LD],
512[if test -z "$LD"; then
513  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
514  for ac_dir in $PATH; do
515    test -z "$ac_dir" && ac_dir=.
516    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
517      acl_cv_path_LD="$ac_dir/$ac_prog"
518      # Check to see if the program is GNU ld.  I'd rather use --version,
519      # but apparently some GNU ld's only accept -v.
520      # Break only if it was the GNU/non-GNU ld that we prefer.
521      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
522      *GNU* | *'with BFD'*)
523        test "$with_gnu_ld" != no && break ;;
524      *)
525        test "$with_gnu_ld" != yes && break ;;
526      esac
527    fi
528  done
529  IFS="$ac_save_ifs"
530else
531  acl_cv_path_LD="$LD" # Let the user override the test with a path.
532fi])
533LD="$acl_cv_path_LD"
534if test -n "$LD"; then
535  AC_MSG_RESULT([$LD])
536else
537  AC_MSG_RESULT([no])
538fi
539test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
540AC_LIB_PROG_LD_GNU
541])
542
543# lib-link.m4 serial 21 (gettext-0.18)
544dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
545dnl This file is free software; the Free Software Foundation
546dnl gives unlimited permission to copy and/or distribute it,
547dnl with or without modifications, as long as this notice is preserved.
548
549dnl From Bruno Haible.
550
551AC_PREREQ([2.54])
552
553dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
554dnl the libraries corresponding to explicit and implicit dependencies.
555dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
556dnl augments the CPPFLAGS variable.
557dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
558dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
559AC_DEFUN([AC_LIB_LINKFLAGS],
560[
561  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
562  AC_REQUIRE([AC_LIB_RPATH])
563  pushdef([Name],[translit([$1],[./-], [___])])
564  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
565                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
566  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
567    AC_LIB_LINKFLAGS_BODY([$1], [$2])
568    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
569    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
570    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
571    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
572  ])
573  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
574  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
575  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
576  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
577  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
578  AC_SUBST([LIB]NAME)
579  AC_SUBST([LTLIB]NAME)
580  AC_SUBST([LIB]NAME[_PREFIX])
581  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
582  dnl results of this search when this library appears as a dependency.
583  HAVE_LIB[]NAME=yes
584  popdef([NAME])
585  popdef([Name])
586])
587
588dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
589dnl searches for libname and the libraries corresponding to explicit and
590dnl implicit dependencies, together with the specified include files and
591dnl the ability to compile and link the specified testcode. The missing-message
592dnl defaults to 'no' and may contain additional hints for the user.
593dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
594dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
595dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
596dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
597dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
598dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
599AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
600[
601  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
602  AC_REQUIRE([AC_LIB_RPATH])
603  pushdef([Name],[translit([$1],[./-], [___])])
604  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
605                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
606
607  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
608  dnl accordingly.
609  AC_LIB_LINKFLAGS_BODY([$1], [$2])
610
611  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
612  dnl because if the user has installed lib[]Name and not disabled its use
613  dnl via --without-lib[]Name-prefix, he wants to use it.
614  ac_save_CPPFLAGS="$CPPFLAGS"
615  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
616
617  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
618    ac_save_LIBS="$LIBS"
619    dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
620    dnl because these -l options might require -L options that are present in
621    dnl LIBS. -l options benefit only from the -L options listed before it.
622    dnl Otherwise, add it to the front of LIBS, because it may be a static
623    dnl library that depends on another static library that is present in LIBS.
624    dnl Static libraries benefit only from the static libraries listed after
625    dnl it.
626    case " $LIB[]NAME" in
627      *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
628      *)       LIBS="$LIB[]NAME $LIBS" ;;
629    esac
630    AC_TRY_LINK([$3], [$4],
631      [ac_cv_lib[]Name=yes],
632      [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
633    LIBS="$ac_save_LIBS"
634  ])
635  if test "$ac_cv_lib[]Name" = yes; then
636    HAVE_LIB[]NAME=yes
637    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
638    AC_MSG_CHECKING([how to link with lib[]$1])
639    AC_MSG_RESULT([$LIB[]NAME])
640  else
641    HAVE_LIB[]NAME=no
642    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
643    dnl $INC[]NAME either.
644    CPPFLAGS="$ac_save_CPPFLAGS"
645    LIB[]NAME=
646    LTLIB[]NAME=
647    LIB[]NAME[]_PREFIX=
648  fi
649  AC_SUBST([HAVE_LIB]NAME)
650  AC_SUBST([LIB]NAME)
651  AC_SUBST([LTLIB]NAME)
652  AC_SUBST([LIB]NAME[_PREFIX])
653  popdef([NAME])
654  popdef([Name])
655])
656
657dnl Determine the platform dependent parameters needed to use rpath:
658dnl   acl_libext,
659dnl   acl_shlibext,
660dnl   acl_hardcode_libdir_flag_spec,
661dnl   acl_hardcode_libdir_separator,
662dnl   acl_hardcode_direct,
663dnl   acl_hardcode_minus_L.
664AC_DEFUN([AC_LIB_RPATH],
665[
666  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
667  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
668  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
669  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
670  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
671  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
672  AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
673    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
674    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
675    . ./conftest.sh
676    rm -f ./conftest.sh
677    acl_cv_rpath=done
678  ])
679  wl="$acl_cv_wl"
680  acl_libext="$acl_cv_libext"
681  acl_shlibext="$acl_cv_shlibext"
682  acl_libname_spec="$acl_cv_libname_spec"
683  acl_library_names_spec="$acl_cv_library_names_spec"
684  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
685  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
686  acl_hardcode_direct="$acl_cv_hardcode_direct"
687  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
688  dnl Determine whether the user wants rpath handling at all.
689  AC_ARG_ENABLE([rpath],
690    [  --disable-rpath         do not hardcode runtime library paths],
691    :, enable_rpath=yes)
692])
693
694dnl AC_LIB_FROMPACKAGE(name, package)
695dnl declares that libname comes from the given package. The configure file
696dnl will then not have a --with-libname-prefix option but a
697dnl --with-package-prefix option. Several libraries can come from the same
698dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
699dnl macro call that searches for libname.
700AC_DEFUN([AC_LIB_FROMPACKAGE],
701[
702  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
703                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
704  define([acl_frompackage_]NAME, [$2])
705  popdef([NAME])
706  pushdef([PACK],[$2])
707  pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
708                                  [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
709  define([acl_libsinpackage_]PACKUP,
710    m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
711  popdef([PACKUP])
712  popdef([PACK])
713])
714
715dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
716dnl the libraries corresponding to explicit and implicit dependencies.
717dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
718dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
719dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
720AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
721[
722  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
723  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
724                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
725  pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
726  pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
727                                  [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
728  pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
729  dnl Autoconf >= 2.61 supports dots in --with options.
730  pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
731  dnl By default, look in $includedir and $libdir.
732  use_additional=yes
733  AC_LIB_WITH_FINAL_PREFIX([
734    eval additional_includedir=\"$includedir\"
735    eval additional_libdir=\"$libdir\"
736  ])
737  AC_ARG_WITH(P_A_C_K[-prefix],
738[[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
739  --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
740[
741    if test "X$withval" = "Xno"; then
742      use_additional=no
743    else
744      if test "X$withval" = "X"; then
745        AC_LIB_WITH_FINAL_PREFIX([
746          eval additional_includedir=\"$includedir\"
747          eval additional_libdir=\"$libdir\"
748        ])
749      else
750        additional_includedir="$withval/include"
751        additional_libdir="$withval/$acl_libdirstem"
752        if test "$acl_libdirstem2" != "$acl_libdirstem" \
753           && ! test -d "$withval/$acl_libdirstem"; then
754          additional_libdir="$withval/$acl_libdirstem2"
755        fi
756      fi
757    fi
758])
759  dnl Search the library and its dependencies in $additional_libdir and
760  dnl $LDFLAGS. Using breadth-first-seach.
761  LIB[]NAME=
762  LTLIB[]NAME=
763  INC[]NAME=
764  LIB[]NAME[]_PREFIX=
765  dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
766  dnl computed. So it has to be reset here.
767  HAVE_LIB[]NAME=
768  rpathdirs=
769  ltrpathdirs=
770  names_already_handled=
771  names_next_round='$1 $2'
772  while test -n "$names_next_round"; do
773    names_this_round="$names_next_round"
774    names_next_round=
775    for name in $names_this_round; do
776      already_handled=
777      for n in $names_already_handled; do
778        if test "$n" = "$name"; then
779          already_handled=yes
780          break
781        fi
782      done
783      if test -z "$already_handled"; then
784        names_already_handled="$names_already_handled $name"
785        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
786        dnl or AC_LIB_HAVE_LINKFLAGS call.
787        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
788        eval value=\"\$HAVE_LIB$uppername\"
789        if test -n "$value"; then
790          if test "$value" = yes; then
791            eval value=\"\$LIB$uppername\"
792            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
793            eval value=\"\$LTLIB$uppername\"
794            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
795          else
796            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
797            dnl that this library doesn't exist. So just drop it.
798            :
799          fi
800        else
801          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
802          dnl and the already constructed $LIBNAME/$LTLIBNAME.
803          found_dir=
804          found_la=
805          found_so=
806          found_a=
807          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
808          if test -n "$acl_shlibext"; then
809            shrext=".$acl_shlibext"             # typically: shrext=.so
810          else
811            shrext=
812          fi
813          if test $use_additional = yes; then
814            dir="$additional_libdir"
815            dnl The same code as in the loop below:
816            dnl First look for a shared library.
817            if test -n "$acl_shlibext"; then
818              if test -f "$dir/$libname$shrext"; then
819                found_dir="$dir"
820                found_so="$dir/$libname$shrext"
821              else
822                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
823                  ver=`(cd "$dir" && \
824                        for f in "$libname$shrext".*; do echo "$f"; done \
825                        | sed -e "s,^$libname$shrext\\\\.,," \
826                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
827                        | sed 1q ) 2>/dev/null`
828                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
829                    found_dir="$dir"
830                    found_so="$dir/$libname$shrext.$ver"
831                  fi
832                else
833                  eval library_names=\"$acl_library_names_spec\"
834                  for f in $library_names; do
835                    if test -f "$dir/$f"; then
836                      found_dir="$dir"
837                      found_so="$dir/$f"
838                      break
839                    fi
840                  done
841                fi
842              fi
843            fi
844            dnl Then look for a static library.
845            if test "X$found_dir" = "X"; then
846              if test -f "$dir/$libname.$acl_libext"; then
847                found_dir="$dir"
848                found_a="$dir/$libname.$acl_libext"
849              fi
850            fi
851            if test "X$found_dir" != "X"; then
852              if test -f "$dir/$libname.la"; then
853                found_la="$dir/$libname.la"
854              fi
855            fi
856          fi
857          if test "X$found_dir" = "X"; then
858            for x in $LDFLAGS $LTLIB[]NAME; do
859              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
860              case "$x" in
861                -L*)
862                  dir=`echo "X$x" | sed -e 's/^X-L//'`
863                  dnl First look for a shared library.
864                  if test -n "$acl_shlibext"; then
865                    if test -f "$dir/$libname$shrext"; then
866                      found_dir="$dir"
867                      found_so="$dir/$libname$shrext"
868                    else
869                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
870                        ver=`(cd "$dir" && \
871                              for f in "$libname$shrext".*; do echo "$f"; done \
872                              | sed -e "s,^$libname$shrext\\\\.,," \
873                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
874                              | sed 1q ) 2>/dev/null`
875                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
876                          found_dir="$dir"
877                          found_so="$dir/$libname$shrext.$ver"
878                        fi
879                      else
880                        eval library_names=\"$acl_library_names_spec\"
881                        for f in $library_names; do
882                          if test -f "$dir/$f"; then
883                            found_dir="$dir"
884                            found_so="$dir/$f"
885                            break
886                          fi
887                        done
888                      fi
889                    fi
890                  fi
891                  dnl Then look for a static library.
892                  if test "X$found_dir" = "X"; then
893                    if test -f "$dir/$libname.$acl_libext"; then
894                      found_dir="$dir"
895                      found_a="$dir/$libname.$acl_libext"
896                    fi
897                  fi
898                  if test "X$found_dir" != "X"; then
899                    if test -f "$dir/$libname.la"; then
900                      found_la="$dir/$libname.la"
901                    fi
902                  fi
903                  ;;
904              esac
905              if test "X$found_dir" != "X"; then
906                break
907              fi
908            done
909          fi
910          if test "X$found_dir" != "X"; then
911            dnl Found the library.
912            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
913            if test "X$found_so" != "X"; then
914              dnl Linking with a shared library. We attempt to hardcode its
915              dnl directory into the executable's runpath, unless it's the
916              dnl standard /usr/lib.
917              if test "$enable_rpath" = no \
918                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
919                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
920                dnl No hardcoding is needed.
921                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
922              else
923                dnl Use an explicit option to hardcode DIR into the resulting
924                dnl binary.
925                dnl Potentially add DIR to ltrpathdirs.
926                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
927                haveit=
928                for x in $ltrpathdirs; do
929                  if test "X$x" = "X$found_dir"; then
930                    haveit=yes
931                    break
932                  fi
933                done
934                if test -z "$haveit"; then
935                  ltrpathdirs="$ltrpathdirs $found_dir"
936                fi
937                dnl The hardcoding into $LIBNAME is system dependent.
938                if test "$acl_hardcode_direct" = yes; then
939                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
940                  dnl resulting binary.
941                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
942                else
943                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
944                    dnl Use an explicit option to hardcode DIR into the resulting
945                    dnl binary.
946                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
947                    dnl Potentially add DIR to rpathdirs.
948                    dnl The rpathdirs will be appended to $LIBNAME at the end.
949                    haveit=
950                    for x in $rpathdirs; do
951                      if test "X$x" = "X$found_dir"; then
952                        haveit=yes
953                        break
954                      fi
955                    done
956                    if test -z "$haveit"; then
957                      rpathdirs="$rpathdirs $found_dir"
958                    fi
959                  else
960                    dnl Rely on "-L$found_dir".
961                    dnl But don't add it if it's already contained in the LDFLAGS
962                    dnl or the already constructed $LIBNAME
963                    haveit=
964                    for x in $LDFLAGS $LIB[]NAME; do
965                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
966                      if test "X$x" = "X-L$found_dir"; then
967                        haveit=yes
968                        break
969                      fi
970                    done
971                    if test -z "$haveit"; then
972                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
973                    fi
974                    if test "$acl_hardcode_minus_L" != no; then
975                      dnl FIXME: Not sure whether we should use
976                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
977                      dnl here.
978                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
979                    else
980                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
981                      dnl here, because this doesn't fit in flags passed to the
982                      dnl compiler. So give up. No hardcoding. This affects only
983                      dnl very old systems.
984                      dnl FIXME: Not sure whether we should use
985                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
986                      dnl here.
987                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
988                    fi
989                  fi
990                fi
991              fi
992            else
993              if test "X$found_a" != "X"; then
994                dnl Linking with a static library.
995                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
996              else
997                dnl We shouldn't come here, but anyway it's good to have a
998                dnl fallback.
999                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1000              fi
1001            fi
1002            dnl Assume the include files are nearby.
1003            additional_includedir=
1004            case "$found_dir" in
1005              */$acl_libdirstem | */$acl_libdirstem/)
1006                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1007                if test "$name" = '$1'; then
1008                  LIB[]NAME[]_PREFIX="$basedir"
1009                fi
1010                additional_includedir="$basedir/include"
1011                ;;
1012              */$acl_libdirstem2 | */$acl_libdirstem2/)
1013                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
1014                if test "$name" = '$1'; then
1015                  LIB[]NAME[]_PREFIX="$basedir"
1016                fi
1017                additional_includedir="$basedir/include"
1018                ;;
1019            esac
1020            if test "X$additional_includedir" != "X"; then
1021              dnl Potentially add $additional_includedir to $INCNAME.
1022              dnl But don't add it
1023              dnl   1. if it's the standard /usr/include,
1024              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
1025              dnl   3. if it's already present in $CPPFLAGS or the already
1026              dnl      constructed $INCNAME,
1027              dnl   4. if it doesn't exist as a directory.
1028              if test "X$additional_includedir" != "X/usr/include"; then
1029                haveit=
1030                if test "X$additional_includedir" = "X/usr/local/include"; then
1031                  if test -n "$GCC"; then
1032                    case $host_os in
1033                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1034                    esac
1035                  fi
1036                fi
1037                if test -z "$haveit"; then
1038                  for x in $CPPFLAGS $INC[]NAME; do
1039                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1040                    if test "X$x" = "X-I$additional_includedir"; then
1041                      haveit=yes
1042                      break
1043                    fi
1044                  done
1045                  if test -z "$haveit"; then
1046                    if test -d "$additional_includedir"; then
1047                      dnl Really add $additional_includedir to $INCNAME.
1048                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1049                    fi
1050                  fi
1051                fi
1052              fi
1053            fi
1054            dnl Look for dependencies.
1055            if test -n "$found_la"; then
1056              dnl Read the .la file. It defines the variables
1057              dnl dlname, library_names, old_library, dependency_libs, current,
1058              dnl age, revision, installed, dlopen, dlpreopen, libdir.
1059              save_libdir="$libdir"
1060              case "$found_la" in
1061                */* | *\\*) . "$found_la" ;;
1062                *) . "./$found_la" ;;
1063              esac
1064              libdir="$save_libdir"
1065              dnl We use only dependency_libs.
1066              for dep in $dependency_libs; do
1067                case "$dep" in
1068                  -L*)
1069                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1070                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1071                    dnl But don't add it
1072                    dnl   1. if it's the standard /usr/lib,
1073                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
1074                    dnl   3. if it's already present in $LDFLAGS or the already
1075                    dnl      constructed $LIBNAME,
1076                    dnl   4. if it doesn't exist as a directory.
1077                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
1078                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
1079                      haveit=
1080                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
1081                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
1082                        if test -n "$GCC"; then
1083                          case $host_os in
1084                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1085                          esac
1086                        fi
1087                      fi
1088                      if test -z "$haveit"; then
1089                        haveit=
1090                        for x in $LDFLAGS $LIB[]NAME; do
1091                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1092                          if test "X$x" = "X-L$additional_libdir"; then
1093                            haveit=yes
1094                            break
1095                          fi
1096                        done
1097                        if test -z "$haveit"; then
1098                          if test -d "$additional_libdir"; then
1099                            dnl Really add $additional_libdir to $LIBNAME.
1100                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1101                          fi
1102                        fi
1103                        haveit=
1104                        for x in $LDFLAGS $LTLIB[]NAME; do
1105                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1106                          if test "X$x" = "X-L$additional_libdir"; then
1107                            haveit=yes
1108                            break
1109                          fi
1110                        done
1111                        if test -z "$haveit"; then
1112                          if test -d "$additional_libdir"; then
1113                            dnl Really add $additional_libdir to $LTLIBNAME.
1114                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1115                          fi
1116                        fi
1117                      fi
1118                    fi
1119                    ;;
1120                  -R*)
1121                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
1122                    if test "$enable_rpath" != no; then
1123                      dnl Potentially add DIR to rpathdirs.
1124                      dnl The rpathdirs will be appended to $LIBNAME at the end.
1125                      haveit=
1126                      for x in $rpathdirs; do
1127                        if test "X$x" = "X$dir"; then
1128                          haveit=yes
1129                          break
1130                        fi
1131                      done
1132                      if test -z "$haveit"; then
1133                        rpathdirs="$rpathdirs $dir"
1134                      fi
1135                      dnl Potentially add DIR to ltrpathdirs.
1136                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1137                      haveit=
1138                      for x in $ltrpathdirs; do
1139                        if test "X$x" = "X$dir"; then
1140                          haveit=yes
1141                          break
1142                        fi
1143                      done
1144                      if test -z "$haveit"; then
1145                        ltrpathdirs="$ltrpathdirs $dir"
1146                      fi
1147                    fi
1148                    ;;
1149                  -l*)
1150                    dnl Handle this in the next round.
1151                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1152                    ;;
1153                  *.la)
1154                    dnl Handle this in the next round. Throw away the .la's
1155                    dnl directory; it is already contained in a preceding -L
1156                    dnl option.
1157                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1158                    ;;
1159                  *)
1160                    dnl Most likely an immediate library name.
1161                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1162                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1163                    ;;
1164                esac
1165              done
1166            fi
1167          else
1168            dnl Didn't find the library; assume it is in the system directories
1169            dnl known to the linker and runtime loader. (All the system
1170            dnl directories known to the linker should also be known to the
1171            dnl runtime loader, otherwise the system is severely misconfigured.)
1172            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1173            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1174          fi
1175        fi
1176      fi
1177    done
1178  done
1179  if test "X$rpathdirs" != "X"; then
1180    if test -n "$acl_hardcode_libdir_separator"; then
1181      dnl Weird platform: only the last -rpath option counts, the user must
1182      dnl pass all path elements in one option. We can arrange that for a
1183      dnl single library, but not when more than one $LIBNAMEs are used.
1184      alldirs=
1185      for found_dir in $rpathdirs; do
1186        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1187      done
1188      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1189      acl_save_libdir="$libdir"
1190      libdir="$alldirs"
1191      eval flag=\"$acl_hardcode_libdir_flag_spec\"
1192      libdir="$acl_save_libdir"
1193      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1194    else
1195      dnl The -rpath options are cumulative.
1196      for found_dir in $rpathdirs; do
1197        acl_save_libdir="$libdir"
1198        libdir="$found_dir"
1199        eval flag=\"$acl_hardcode_libdir_flag_spec\"
1200        libdir="$acl_save_libdir"
1201        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1202      done
1203    fi
1204  fi
1205  if test "X$ltrpathdirs" != "X"; then
1206    dnl When using libtool, the option that works for both libraries and
1207    dnl executables is -R. The -R options are cumulative.
1208    for found_dir in $ltrpathdirs; do
1209      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1210    done
1211  fi
1212  popdef([P_A_C_K])
1213  popdef([PACKLIBS])
1214  popdef([PACKUP])
1215  popdef([PACK])
1216  popdef([NAME])
1217])
1218
1219dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1220dnl unless already present in VAR.
1221dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1222dnl contains two or three consecutive elements that belong together.
1223AC_DEFUN([AC_LIB_APPENDTOVAR],
1224[
1225  for element in [$2]; do
1226    haveit=
1227    for x in $[$1]; do
1228      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1229      if test "X$x" = "X$element"; then
1230        haveit=yes
1231        break
1232      fi
1233    done
1234    if test -z "$haveit"; then
1235      [$1]="${[$1]}${[$1]:+ }$element"
1236    fi
1237  done
1238])
1239
1240dnl For those cases where a variable contains several -L and -l options
1241dnl referring to unknown libraries and directories, this macro determines the
1242dnl necessary additional linker options for the runtime path.
1243dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1244dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1245dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1246dnl otherwise linking without libtool is assumed.
1247AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1248[
1249  AC_REQUIRE([AC_LIB_RPATH])
1250  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1251  $1=
1252  if test "$enable_rpath" != no; then
1253    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1254      dnl Use an explicit option to hardcode directories into the resulting
1255      dnl binary.
1256      rpathdirs=
1257      next=
1258      for opt in $2; do
1259        if test -n "$next"; then
1260          dir="$next"
1261          dnl No need to hardcode the standard /usr/lib.
1262          if test "X$dir" != "X/usr/$acl_libdirstem" \
1263             && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1264            rpathdirs="$rpathdirs $dir"
1265          fi
1266          next=
1267        else
1268          case $opt in
1269            -L) next=yes ;;
1270            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1271                 dnl No need to hardcode the standard /usr/lib.
1272                 if test "X$dir" != "X/usr/$acl_libdirstem" \
1273                    && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1274                   rpathdirs="$rpathdirs $dir"
1275                 fi
1276                 next= ;;
1277            *) next= ;;
1278          esac
1279        fi
1280      done
1281      if test "X$rpathdirs" != "X"; then
1282        if test -n ""$3""; then
1283          dnl libtool is used for linking. Use -R options.
1284          for dir in $rpathdirs; do
1285            $1="${$1}${$1:+ }-R$dir"
1286          done
1287        else
1288          dnl The linker is used for linking directly.
1289          if test -n "$acl_hardcode_libdir_separator"; then
1290            dnl Weird platform: only the last -rpath option counts, the user
1291            dnl must pass all path elements in one option.
1292            alldirs=
1293            for dir in $rpathdirs; do
1294              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1295            done
1296            acl_save_libdir="$libdir"
1297            libdir="$alldirs"
1298            eval flag=\"$acl_hardcode_libdir_flag_spec\"
1299            libdir="$acl_save_libdir"
1300            $1="$flag"
1301          else
1302            dnl The -rpath options are cumulative.
1303            for dir in $rpathdirs; do
1304              acl_save_libdir="$libdir"
1305              libdir="$dir"
1306              eval flag=\"$acl_hardcode_libdir_flag_spec\"
1307              libdir="$acl_save_libdir"
1308              $1="${$1}${$1:+ }$flag"
1309            done
1310          fi
1311        fi
1312      fi
1313    fi
1314  fi
1315  AC_SUBST([$1])
1316])
1317
1318# lib-prefix.m4 serial 7 (gettext-0.18)
1319dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
1320dnl This file is free software; the Free Software Foundation
1321dnl gives unlimited permission to copy and/or distribute it,
1322dnl with or without modifications, as long as this notice is preserved.
1323
1324dnl From Bruno Haible.
1325
1326dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1327dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1328dnl require excessive bracketing.
1329ifdef([AC_HELP_STRING],
1330[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1331[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1332
1333dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1334dnl to access previously installed libraries. The basic assumption is that
1335dnl a user will want packages to use other packages he previously installed
1336dnl with the same --prefix option.
1337dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1338dnl libraries, but is otherwise very convenient.
1339AC_DEFUN([AC_LIB_PREFIX],
1340[
1341  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1342  AC_REQUIRE([AC_PROG_CC])
1343  AC_REQUIRE([AC_CANONICAL_HOST])
1344  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1345  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1346  dnl By default, look in $includedir and $libdir.
1347  use_additional=yes
1348  AC_LIB_WITH_FINAL_PREFIX([
1349    eval additional_includedir=\"$includedir\"
1350    eval additional_libdir=\"$libdir\"
1351  ])
1352  AC_LIB_ARG_WITH([lib-prefix],
1353[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1354  --without-lib-prefix    don't search for libraries in includedir and libdir],
1355[
1356    if test "X$withval" = "Xno"; then
1357      use_additional=no
1358    else
1359      if test "X$withval" = "X"; then
1360        AC_LIB_WITH_FINAL_PREFIX([
1361          eval additional_includedir=\"$includedir\"
1362          eval additional_libdir=\"$libdir\"
1363        ])
1364      else
1365        additional_includedir="$withval/include"
1366        additional_libdir="$withval/$acl_libdirstem"
1367      fi
1368    fi
1369])
1370  if test $use_additional = yes; then
1371    dnl Potentially add $additional_includedir to $CPPFLAGS.
1372    dnl But don't add it
1373    dnl   1. if it's the standard /usr/include,
1374    dnl   2. if it's already present in $CPPFLAGS,
1375    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
1376    dnl   4. if it doesn't exist as a directory.
1377    if test "X$additional_includedir" != "X/usr/include"; then
1378      haveit=
1379      for x in $CPPFLAGS; do
1380        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1381        if test "X$x" = "X-I$additional_includedir"; then
1382          haveit=yes
1383          break
1384        fi
1385      done
1386      if test -z "$haveit"; then
1387        if test "X$additional_includedir" = "X/usr/local/include"; then
1388          if test -n "$GCC"; then
1389            case $host_os in
1390              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1391            esac
1392          fi
1393        fi
1394        if test -z "$haveit"; then
1395          if test -d "$additional_includedir"; then
1396            dnl Really add $additional_includedir to $CPPFLAGS.
1397            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1398          fi
1399        fi
1400      fi
1401    fi
1402    dnl Potentially add $additional_libdir to $LDFLAGS.
1403    dnl But don't add it
1404    dnl   1. if it's the standard /usr/lib,
1405    dnl   2. if it's already present in $LDFLAGS,
1406    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
1407    dnl   4. if it doesn't exist as a directory.
1408    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1409      haveit=
1410      for x in $LDFLAGS; do
1411        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1412        if test "X$x" = "X-L$additional_libdir"; then
1413          haveit=yes
1414          break
1415        fi
1416      done
1417      if test -z "$haveit"; then
1418        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1419          if test -n "$GCC"; then
1420            case $host_os in
1421              linux*) haveit=yes;;
1422            esac
1423          fi
1424        fi
1425        if test -z "$haveit"; then
1426          if test -d "$additional_libdir"; then
1427            dnl Really add $additional_libdir to $LDFLAGS.
1428            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1429          fi
1430        fi
1431      fi
1432    fi
1433  fi
1434])
1435
1436dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1437dnl acl_final_exec_prefix, containing the values to which $prefix and
1438dnl $exec_prefix will expand at the end of the configure script.
1439AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1440[
1441  dnl Unfortunately, prefix and exec_prefix get only finally determined
1442  dnl at the end of configure.
1443  if test "X$prefix" = "XNONE"; then
1444    acl_final_prefix="$ac_default_prefix"
1445  else
1446    acl_final_prefix="$prefix"
1447  fi
1448  if test "X$exec_prefix" = "XNONE"; then
1449    acl_final_exec_prefix='${prefix}'
1450  else
1451    acl_final_exec_prefix="$exec_prefix"
1452  fi
1453  acl_save_prefix="$prefix"
1454  prefix="$acl_final_prefix"
1455  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1456  prefix="$acl_save_prefix"
1457])
1458
1459dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1460dnl variables prefix and exec_prefix bound to the values they will have
1461dnl at the end of the configure script.
1462AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1463[
1464  acl_save_prefix="$prefix"
1465  prefix="$acl_final_prefix"
1466  acl_save_exec_prefix="$exec_prefix"
1467  exec_prefix="$acl_final_exec_prefix"
1468  $1
1469  exec_prefix="$acl_save_exec_prefix"
1470  prefix="$acl_save_prefix"
1471])
1472
1473dnl AC_LIB_PREPARE_MULTILIB creates
1474dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1475dnl   "lib" or "lib64" or "lib/64",
1476dnl - a variable acl_libdirstem2, as a secondary possible value for
1477dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1478dnl   "lib/amd64".
1479AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1480[
1481  dnl There is no formal standard regarding lib and lib64.
1482  dnl On glibc systems, the current practice is that on a system supporting
1483  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1484  dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1485  dnl the compiler's default mode by looking at the compiler's library search
1486  dnl path. If at least one of its elements ends in /lib64 or points to a
1487  dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1488  dnl Otherwise we use the default, namely "lib".
1489  dnl On Solaris systems, the current practice is that on a system supporting
1490  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1491  dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1492  dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1493  AC_REQUIRE([AC_CANONICAL_HOST])
1494  acl_libdirstem=lib
1495  acl_libdirstem2=
1496  case "$host_os" in
1497    solaris*)
1498      dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1499      dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1500      dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1501      dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1502      dnl symlink is missing, so we set acl_libdirstem2 too.
1503      AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1504        [AC_EGREP_CPP([sixtyfour bits], [
1505#ifdef _LP64
1506sixtyfour bits
1507#endif
1508           ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1509        ])
1510      if test $gl_cv_solaris_64bit = yes; then
1511        acl_libdirstem=lib/64
1512        case "$host_cpu" in
1513          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
1514          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1515        esac
1516      fi
1517      ;;
1518    *)
1519      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1520      if test -n "$searchpath"; then
1521        acl_save_IFS="${IFS= 	}"; IFS=":"
1522        for searchdir in $searchpath; do
1523          if test -d "$searchdir"; then
1524            case "$searchdir" in
1525              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1526              */../ | */.. )
1527                # Better ignore directories of this form. They are misleading.
1528                ;;
1529              *) searchdir=`cd "$searchdir" && pwd`
1530                 case "$searchdir" in
1531                   */lib64 ) acl_libdirstem=lib64 ;;
1532                 esac ;;
1533            esac
1534          fi
1535        done
1536        IFS="$acl_save_IFS"
1537      fi
1538      ;;
1539  esac
1540  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1541])
1542
1543# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1544#
1545#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1546#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1547#                 Inc.
1548#   Written by Gordon Matzigkeit, 1996
1549#
1550# This file is free software; the Free Software Foundation gives
1551# unlimited permission to copy and/or distribute it, with or without
1552# modifications, as long as this notice is preserved.
1553
1554m4_define([_LT_COPYING], [dnl
1555#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1556#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1557#                 Inc.
1558#   Written by Gordon Matzigkeit, 1996
1559#
1560#   This file is part of GNU Libtool.
1561#
1562# GNU Libtool is free software; you can redistribute it and/or
1563# modify it under the terms of the GNU General Public License as
1564# published by the Free Software Foundation; either version 2 of
1565# the License, or (at your option) any later version.
1566#
1567# As a special exception to the GNU General Public License,
1568# if you distribute this file as part of a program or library that
1569# is built using GNU Libtool, you may include this file under the
1570# same distribution terms that you use for the rest of that program.
1571#
1572# GNU Libtool is distributed in the hope that it will be useful,
1573# but WITHOUT ANY WARRANTY; without even the implied warranty of
1574# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1575# GNU General Public License for more details.
1576#
1577# You should have received a copy of the GNU General Public License
1578# along with GNU Libtool; see the file COPYING.  If not, a copy
1579# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1580# obtained by writing to the Free Software Foundation, Inc.,
1581# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1582])
1583
1584# serial 57 LT_INIT
1585
1586
1587# LT_PREREQ(VERSION)
1588# ------------------
1589# Complain and exit if this libtool version is less that VERSION.
1590m4_defun([LT_PREREQ],
1591[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1592       [m4_default([$3],
1593		   [m4_fatal([Libtool version $1 or higher is required],
1594		             63)])],
1595       [$2])])
1596
1597
1598# _LT_CHECK_BUILDDIR
1599# ------------------
1600# Complain if the absolute build directory name contains unusual characters
1601m4_defun([_LT_CHECK_BUILDDIR],
1602[case `pwd` in
1603  *\ * | *\	*)
1604    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1605esac
1606])
1607
1608
1609# LT_INIT([OPTIONS])
1610# ------------------
1611AC_DEFUN([LT_INIT],
1612[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1613AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1614AC_BEFORE([$0], [LT_LANG])dnl
1615AC_BEFORE([$0], [LT_OUTPUT])dnl
1616AC_BEFORE([$0], [LTDL_INIT])dnl
1617m4_require([_LT_CHECK_BUILDDIR])dnl
1618
1619dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1620m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1621m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1622dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1623dnl unless we require an AC_DEFUNed macro:
1624AC_REQUIRE([LTOPTIONS_VERSION])dnl
1625AC_REQUIRE([LTSUGAR_VERSION])dnl
1626AC_REQUIRE([LTVERSION_VERSION])dnl
1627AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1628m4_require([_LT_PROG_LTMAIN])dnl
1629
1630_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1631
1632dnl Parse OPTIONS
1633_LT_SET_OPTIONS([$0], [$1])
1634
1635# This can be used to rebuild libtool when needed
1636LIBTOOL_DEPS="$ltmain"
1637
1638# Always use our own libtool.
1639LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1640AC_SUBST(LIBTOOL)dnl
1641
1642_LT_SETUP
1643
1644# Only expand once:
1645m4_define([LT_INIT])
1646])# LT_INIT
1647
1648# Old names:
1649AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1650AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1651dnl aclocal-1.4 backwards compatibility:
1652dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1653dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1654
1655
1656# _LT_CC_BASENAME(CC)
1657# -------------------
1658# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1659m4_defun([_LT_CC_BASENAME],
1660[for cc_temp in $1""; do
1661  case $cc_temp in
1662    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1663    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1664    \-*) ;;
1665    *) break;;
1666  esac
1667done
1668cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1669])
1670
1671
1672# _LT_FILEUTILS_DEFAULTS
1673# ----------------------
1674# It is okay to use these file commands and assume they have been set
1675# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1676m4_defun([_LT_FILEUTILS_DEFAULTS],
1677[: ${CP="cp -f"}
1678: ${MV="mv -f"}
1679: ${RM="rm -f"}
1680])# _LT_FILEUTILS_DEFAULTS
1681
1682
1683# _LT_SETUP
1684# ---------
1685m4_defun([_LT_SETUP],
1686[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1687AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1688AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1689AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1690
1691_LT_DECL([], [host_alias], [0], [The host system])dnl
1692_LT_DECL([], [host], [0])dnl
1693_LT_DECL([], [host_os], [0])dnl
1694dnl
1695_LT_DECL([], [build_alias], [0], [The build system])dnl
1696_LT_DECL([], [build], [0])dnl
1697_LT_DECL([], [build_os], [0])dnl
1698dnl
1699AC_REQUIRE([AC_PROG_CC])dnl
1700AC_REQUIRE([LT_PATH_LD])dnl
1701AC_REQUIRE([LT_PATH_NM])dnl
1702dnl
1703AC_REQUIRE([AC_PROG_LN_S])dnl
1704test -z "$LN_S" && LN_S="ln -s"
1705_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1706dnl
1707AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1708_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1709_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1710dnl
1711m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1712m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1713m4_require([_LT_CMD_RELOAD])dnl
1714m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1715m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1716m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1717
1718_LT_CONFIG_LIBTOOL_INIT([
1719# See if we are running on zsh, and set the options which allow our
1720# commands through without removal of \ escapes INIT.
1721if test -n "\${ZSH_VERSION+set}" ; then
1722   setopt NO_GLOB_SUBST
1723fi
1724])
1725if test -n "${ZSH_VERSION+set}" ; then
1726   setopt NO_GLOB_SUBST
1727fi
1728
1729_LT_CHECK_OBJDIR
1730
1731m4_require([_LT_TAG_COMPILER])dnl
1732
1733case $host_os in
1734aix3*)
1735  # AIX sometimes has problems with the GCC collect2 program.  For some
1736  # reason, if we set the COLLECT_NAMES environment variable, the problems
1737  # vanish in a puff of smoke.
1738  if test "X${COLLECT_NAMES+set}" != Xset; then
1739    COLLECT_NAMES=
1740    export COLLECT_NAMES
1741  fi
1742  ;;
1743esac
1744
1745# Global variables:
1746ofile=libtool
1747can_build_shared=yes
1748
1749# All known linkers require a `.a' archive for static linking (except MSVC,
1750# which needs '.lib').
1751libext=a
1752
1753with_gnu_ld="$lt_cv_prog_gnu_ld"
1754
1755old_CC="$CC"
1756old_CFLAGS="$CFLAGS"
1757
1758# Set sane defaults for various variables
1759test -z "$CC" && CC=cc
1760test -z "$LTCC" && LTCC=$CC
1761test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1762test -z "$LD" && LD=ld
1763test -z "$ac_objext" && ac_objext=o
1764
1765_LT_CC_BASENAME([$compiler])
1766
1767# Only perform the check for file, if the check method requires it
1768test -z "$MAGIC_CMD" && MAGIC_CMD=file
1769case $deplibs_check_method in
1770file_magic*)
1771  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1772    _LT_PATH_MAGIC
1773  fi
1774  ;;
1775esac
1776
1777# Use C for the default configuration in the libtool script
1778LT_SUPPORTED_TAG([CC])
1779_LT_LANG_C_CONFIG
1780_LT_LANG_DEFAULT_CONFIG
1781_LT_CONFIG_COMMANDS
1782])# _LT_SETUP
1783
1784
1785# _LT_PREPARE_SED_QUOTE_VARS
1786# --------------------------
1787# Define a few sed substitution that help us do robust quoting.
1788m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1789[# Backslashify metacharacters that are still active within
1790# double-quoted strings.
1791sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1792
1793# Same as above, but do not quote variable references.
1794double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1795
1796# Sed substitution to delay expansion of an escaped shell variable in a
1797# double_quote_subst'ed string.
1798delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1799
1800# Sed substitution to delay expansion of an escaped single quote.
1801delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1802
1803# Sed substitution to avoid accidental globbing in evaled expressions
1804no_glob_subst='s/\*/\\\*/g'
1805])
1806
1807# _LT_PROG_LTMAIN
1808# ---------------
1809# Note that this code is called both from `configure', and `config.status'
1810# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1811# `config.status' has no value for ac_aux_dir unless we are using Automake,
1812# so we pass a copy along to make sure it has a sensible value anyway.
1813m4_defun([_LT_PROG_LTMAIN],
1814[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1815_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1816ltmain="$ac_aux_dir/ltmain.sh"
1817])# _LT_PROG_LTMAIN
1818
1819
1820
1821# So that we can recreate a full libtool script including additional
1822# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1823# in macros and then make a single call at the end using the `libtool'
1824# label.
1825
1826
1827# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1828# ----------------------------------------
1829# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1830m4_define([_LT_CONFIG_LIBTOOL_INIT],
1831[m4_ifval([$1],
1832          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1833                     [$1
1834])])])
1835
1836# Initialize.
1837m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1838
1839
1840# _LT_CONFIG_LIBTOOL([COMMANDS])
1841# ------------------------------
1842# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1843m4_define([_LT_CONFIG_LIBTOOL],
1844[m4_ifval([$1],
1845          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1846                     [$1
1847])])])
1848
1849# Initialize.
1850m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1851
1852
1853# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1854# -----------------------------------------------------
1855m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1856[_LT_CONFIG_LIBTOOL([$1])
1857_LT_CONFIG_LIBTOOL_INIT([$2])
1858])
1859
1860
1861# _LT_FORMAT_COMMENT([COMMENT])
1862# -----------------------------
1863# Add leading comment marks to the start of each line, and a trailing
1864# full-stop to the whole comment if one is not present already.
1865m4_define([_LT_FORMAT_COMMENT],
1866[m4_ifval([$1], [
1867m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1868              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1869)])
1870
1871
1872
1873
1874
1875# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1876# -------------------------------------------------------------------
1877# CONFIGNAME is the name given to the value in the libtool script.
1878# VARNAME is the (base) name used in the configure script.
1879# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1880# VARNAME.  Any other value will be used directly.
1881m4_define([_LT_DECL],
1882[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1883    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1884	[m4_ifval([$1], [$1], [$2])])
1885    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1886    m4_ifval([$4],
1887	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1888    lt_dict_add_subkey([lt_decl_dict], [$2],
1889	[tagged?], [m4_ifval([$5], [yes], [no])])])
1890])
1891
1892
1893# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1894# --------------------------------------------------------
1895m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1896
1897
1898# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1899# ------------------------------------------------
1900m4_define([lt_decl_tag_varnames],
1901[_lt_decl_filter([tagged?], [yes], $@)])
1902
1903
1904# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1905# ---------------------------------------------------------
1906m4_define([_lt_decl_filter],
1907[m4_case([$#],
1908  [0], [m4_fatal([$0: too few arguments: $#])],
1909  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1910  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1911  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1912  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1913])
1914
1915
1916# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1917# --------------------------------------------------
1918m4_define([lt_decl_quote_varnames],
1919[_lt_decl_filter([value], [1], $@)])
1920
1921
1922# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1923# ---------------------------------------------------
1924m4_define([lt_decl_dquote_varnames],
1925[_lt_decl_filter([value], [2], $@)])
1926
1927
1928# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1929# ---------------------------------------------------
1930m4_define([lt_decl_varnames_tagged],
1931[m4_assert([$# <= 2])dnl
1932_$0(m4_quote(m4_default([$1], [[, ]])),
1933    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1934    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1935m4_define([_lt_decl_varnames_tagged],
1936[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1937
1938
1939# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1940# ------------------------------------------------
1941m4_define([lt_decl_all_varnames],
1942[_$0(m4_quote(m4_default([$1], [[, ]])),
1943     m4_if([$2], [],
1944	   m4_quote(lt_decl_varnames),
1945	m4_quote(m4_shift($@))))[]dnl
1946])
1947m4_define([_lt_decl_all_varnames],
1948[lt_join($@, lt_decl_varnames_tagged([$1],
1949			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1950])
1951
1952
1953# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1954# ------------------------------------
1955# Quote a variable value, and forward it to `config.status' so that its
1956# declaration there will have the same value as in `configure'.  VARNAME
1957# must have a single quote delimited value for this to work.
1958m4_define([_LT_CONFIG_STATUS_DECLARE],
1959[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1960
1961
1962# _LT_CONFIG_STATUS_DECLARATIONS
1963# ------------------------------
1964# We delimit libtool config variables with single quotes, so when
1965# we write them to config.status, we have to be sure to quote all
1966# embedded single quotes properly.  In configure, this macro expands
1967# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1968#
1969#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1970m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1971[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1972    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1973
1974
1975# _LT_LIBTOOL_TAGS
1976# ----------------
1977# Output comment and list of tags supported by the script
1978m4_defun([_LT_LIBTOOL_TAGS],
1979[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1980available_tags="_LT_TAGS"dnl
1981])
1982
1983
1984# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1985# -----------------------------------
1986# Extract the dictionary values for VARNAME (optionally with TAG) and
1987# expand to a commented shell variable setting:
1988#
1989#    # Some comment about what VAR is for.
1990#    visible_name=$lt_internal_name
1991m4_define([_LT_LIBTOOL_DECLARE],
1992[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1993					   [description])))[]dnl
1994m4_pushdef([_libtool_name],
1995    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1996m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1997    [0], [_libtool_name=[$]$1],
1998    [1], [_libtool_name=$lt_[]$1],
1999    [2], [_libtool_name=$lt_[]$1],
2000    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2001m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2002])
2003
2004
2005# _LT_LIBTOOL_CONFIG_VARS
2006# -----------------------
2007# Produce commented declarations of non-tagged libtool config variables
2008# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2009# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
2010# section) are produced by _LT_LIBTOOL_TAG_VARS.
2011m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2012[m4_foreach([_lt_var],
2013    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2014    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2015
2016
2017# _LT_LIBTOOL_TAG_VARS(TAG)
2018# -------------------------
2019m4_define([_LT_LIBTOOL_TAG_VARS],
2020[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2021    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2022
2023
2024# _LT_TAGVAR(VARNAME, [TAGNAME])
2025# ------------------------------
2026m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2027
2028
2029# _LT_CONFIG_COMMANDS
2030# -------------------
2031# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
2032# variables for single and double quote escaping we saved from calls
2033# to _LT_DECL, we can put quote escaped variables declarations
2034# into `config.status', and then the shell code to quote escape them in
2035# for loops in `config.status'.  Finally, any additional code accumulated
2036# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2037m4_defun([_LT_CONFIG_COMMANDS],
2038[AC_PROVIDE_IFELSE([LT_OUTPUT],
2039	dnl If the libtool generation code has been placed in $CONFIG_LT,
2040	dnl instead of duplicating it all over again into config.status,
2041	dnl then we will have config.status run $CONFIG_LT later, so it
2042	dnl needs to know what name is stored there:
2043        [AC_CONFIG_COMMANDS([libtool],
2044            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2045    dnl If the libtool generation code is destined for config.status,
2046    dnl expand the accumulated commands and init code now:
2047    [AC_CONFIG_COMMANDS([libtool],
2048        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2049])#_LT_CONFIG_COMMANDS
2050
2051
2052# Initialize.
2053m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2054[
2055
2056# The HP-UX ksh and POSIX shell print the target directory to stdout
2057# if CDPATH is set.
2058(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2059
2060sed_quote_subst='$sed_quote_subst'
2061double_quote_subst='$double_quote_subst'
2062delay_variable_subst='$delay_variable_subst'
2063_LT_CONFIG_STATUS_DECLARATIONS
2064LTCC='$LTCC'
2065LTCFLAGS='$LTCFLAGS'
2066compiler='$compiler_DEFAULT'
2067
2068# A function that is used when there is no print builtin or printf.
2069func_fallback_echo ()
2070{
2071  eval 'cat <<_LTECHO_EOF
2072\$[]1
2073_LTECHO_EOF'
2074}
2075
2076# Quote evaled strings.
2077for var in lt_decl_all_varnames([[ \
2078]], lt_decl_quote_varnames); do
2079    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2080    *[[\\\\\\\`\\"\\\$]]*)
2081      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2082      ;;
2083    *)
2084      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2085      ;;
2086    esac
2087done
2088
2089# Double-quote double-evaled strings.
2090for var in lt_decl_all_varnames([[ \
2091]], lt_decl_dquote_varnames); do
2092    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2093    *[[\\\\\\\`\\"\\\$]]*)
2094      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2095      ;;
2096    *)
2097      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2098      ;;
2099    esac
2100done
2101
2102_LT_OUTPUT_LIBTOOL_INIT
2103])
2104
2105# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
2106# ------------------------------------
2107# Generate a child script FILE with all initialization necessary to
2108# reuse the environment learned by the parent script, and make the
2109# file executable.  If COMMENT is supplied, it is inserted after the
2110# `#!' sequence but before initialization text begins.  After this
2111# macro, additional text can be appended to FILE to form the body of
2112# the child script.  The macro ends with non-zero status if the
2113# file could not be fully written (such as if the disk is full).
2114m4_ifdef([AS_INIT_GENERATED],
2115[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
2116[m4_defun([_LT_GENERATED_FILE_INIT],
2117[m4_require([AS_PREPARE])]dnl
2118[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
2119[lt_write_fail=0
2120cat >$1 <<_ASEOF || lt_write_fail=1
2121#! $SHELL
2122# Generated by $as_me.
2123$2
2124SHELL=\${CONFIG_SHELL-$SHELL}
2125export SHELL
2126_ASEOF
2127cat >>$1 <<\_ASEOF || lt_write_fail=1
2128AS_SHELL_SANITIZE
2129_AS_PREPARE
2130exec AS_MESSAGE_FD>&1
2131_ASEOF
2132test $lt_write_fail = 0 && chmod +x $1[]dnl
2133m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
2134
2135# LT_OUTPUT
2136# ---------
2137# This macro allows early generation of the libtool script (before
2138# AC_OUTPUT is called), incase it is used in configure for compilation
2139# tests.
2140AC_DEFUN([LT_OUTPUT],
2141[: ${CONFIG_LT=./config.lt}
2142AC_MSG_NOTICE([creating $CONFIG_LT])
2143_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
2144[# Run this file to recreate a libtool stub with the current configuration.])
2145
2146cat >>"$CONFIG_LT" <<\_LTEOF
2147lt_cl_silent=false
2148exec AS_MESSAGE_LOG_FD>>config.log
2149{
2150  echo
2151  AS_BOX([Running $as_me.])
2152} >&AS_MESSAGE_LOG_FD
2153
2154lt_cl_help="\
2155\`$as_me' creates a local libtool stub from the current configuration,
2156for use in further configure time tests before the real libtool is
2157generated.
2158
2159Usage: $[0] [[OPTIONS]]
2160
2161  -h, --help      print this help, then exit
2162  -V, --version   print version number, then exit
2163  -q, --quiet     do not print progress messages
2164  -d, --debug     don't remove temporary files
2165
2166Report bugs to <bug-libtool@gnu.org>."
2167
2168lt_cl_version="\
2169m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2170m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2171configured by $[0], generated by m4_PACKAGE_STRING.
2172
2173Copyright (C) 2010 Free Software Foundation, Inc.
2174This config.lt script is free software; the Free Software Foundation
2175gives unlimited permision to copy, distribute and modify it."
2176
2177while test $[#] != 0
2178do
2179  case $[1] in
2180    --version | --v* | -V )
2181      echo "$lt_cl_version"; exit 0 ;;
2182    --help | --h* | -h )
2183      echo "$lt_cl_help"; exit 0 ;;
2184    --debug | --d* | -d )
2185      debug=: ;;
2186    --quiet | --q* | --silent | --s* | -q )
2187      lt_cl_silent=: ;;
2188
2189    -*) AC_MSG_ERROR([unrecognized option: $[1]
2190Try \`$[0] --help' for more information.]) ;;
2191
2192    *) AC_MSG_ERROR([unrecognized argument: $[1]
2193Try \`$[0] --help' for more information.]) ;;
2194  esac
2195  shift
2196done
2197
2198if $lt_cl_silent; then
2199  exec AS_MESSAGE_FD>/dev/null
2200fi
2201_LTEOF
2202
2203cat >>"$CONFIG_LT" <<_LTEOF
2204_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2205_LTEOF
2206
2207cat >>"$CONFIG_LT" <<\_LTEOF
2208AC_MSG_NOTICE([creating $ofile])
2209_LT_OUTPUT_LIBTOOL_COMMANDS
2210AS_EXIT(0)
2211_LTEOF
2212chmod +x "$CONFIG_LT"
2213
2214# configure is writing to config.log, but config.lt does its own redirection,
2215# appending to config.log, which fails on DOS, as config.log is still kept
2216# open by configure.  Here we exec the FD to /dev/null, effectively closing
2217# config.log, so it can be properly (re)opened and appended to by config.lt.
2218lt_cl_success=:
2219test "$silent" = yes &&
2220  lt_config_lt_args="$lt_config_lt_args --quiet"
2221exec AS_MESSAGE_LOG_FD>/dev/null
2222$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2223exec AS_MESSAGE_LOG_FD>>config.log
2224$lt_cl_success || AS_EXIT(1)
2225])# LT_OUTPUT
2226
2227
2228# _LT_CONFIG(TAG)
2229# ---------------
2230# If TAG is the built-in tag, create an initial libtool script with a
2231# default configuration from the untagged config vars.  Otherwise add code
2232# to config.status for appending the configuration named by TAG from the
2233# matching tagged config vars.
2234m4_defun([_LT_CONFIG],
2235[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2236_LT_CONFIG_SAVE_COMMANDS([
2237  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2238  m4_if(_LT_TAG, [C], [
2239    # See if we are running on zsh, and set the options which allow our
2240    # commands through without removal of \ escapes.
2241    if test -n "${ZSH_VERSION+set}" ; then
2242      setopt NO_GLOB_SUBST
2243    fi
2244
2245    cfgfile="${ofile}T"
2246    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2247    $RM "$cfgfile"
2248
2249    cat <<_LT_EOF >> "$cfgfile"
2250#! $SHELL
2251
2252# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2253# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2254# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2255# NOTE: Changes made to this file will be lost: look at ltmain.sh.
2256#
2257_LT_COPYING
2258_LT_LIBTOOL_TAGS
2259
2260# ### BEGIN LIBTOOL CONFIG
2261_LT_LIBTOOL_CONFIG_VARS
2262_LT_LIBTOOL_TAG_VARS
2263# ### END LIBTOOL CONFIG
2264
2265_LT_EOF
2266
2267  case $host_os in
2268  aix3*)
2269    cat <<\_LT_EOF >> "$cfgfile"
2270# AIX sometimes has problems with the GCC collect2 program.  For some
2271# reason, if we set the COLLECT_NAMES environment variable, the problems
2272# vanish in a puff of smoke.
2273if test "X${COLLECT_NAMES+set}" != Xset; then
2274  COLLECT_NAMES=
2275  export COLLECT_NAMES
2276fi
2277_LT_EOF
2278    ;;
2279  esac
2280
2281  _LT_PROG_LTMAIN
2282
2283  # We use sed instead of cat because bash on DJGPP gets confused if
2284  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
2285  # text mode, it properly converts lines to CR/LF.  This bash problem
2286  # is reportedly fixed, but why not run on old versions too?
2287  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
2288    || (rm -f "$cfgfile"; exit 1)
2289
2290  _LT_PROG_XSI_SHELLFNS
2291
2292  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
2293    || (rm -f "$cfgfile"; exit 1)
2294
2295  mv -f "$cfgfile" "$ofile" ||
2296    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2297  chmod +x "$ofile"
2298],
2299[cat <<_LT_EOF >> "$ofile"
2300
2301dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2302dnl in a comment (ie after a #).
2303# ### BEGIN LIBTOOL TAG CONFIG: $1
2304_LT_LIBTOOL_TAG_VARS(_LT_TAG)
2305# ### END LIBTOOL TAG CONFIG: $1
2306_LT_EOF
2307])dnl /m4_if
2308],
2309[m4_if([$1], [], [
2310    PACKAGE='$PACKAGE'
2311    VERSION='$VERSION'
2312    TIMESTAMP='$TIMESTAMP'
2313    RM='$RM'
2314    ofile='$ofile'], [])
2315])dnl /_LT_CONFIG_SAVE_COMMANDS
2316])# _LT_CONFIG
2317
2318
2319# LT_SUPPORTED_TAG(TAG)
2320# ---------------------
2321# Trace this macro to discover what tags are supported by the libtool
2322# --tag option, using:
2323#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
2324AC_DEFUN([LT_SUPPORTED_TAG], [])
2325
2326
2327# C support is built-in for now
2328m4_define([_LT_LANG_C_enabled], [])
2329m4_define([_LT_TAGS], [])
2330
2331
2332# LT_LANG(LANG)
2333# -------------
2334# Enable libtool support for the given language if not already enabled.
2335AC_DEFUN([LT_LANG],
2336[AC_BEFORE([$0], [LT_OUTPUT])dnl
2337m4_case([$1],
2338  [C],			[_LT_LANG(C)],
2339  [C++],		[_LT_LANG(CXX)],
2340  [Java],		[_LT_LANG(GCJ)],
2341  [Fortran 77],		[_LT_LANG(F77)],
2342  [Fortran],		[_LT_LANG(FC)],
2343  [Windows Resource],	[_LT_LANG(RC)],
2344  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2345    [_LT_LANG($1)],
2346    [m4_fatal([$0: unsupported language: "$1"])])])dnl
2347])# LT_LANG
2348
2349
2350# _LT_LANG(LANGNAME)
2351# ------------------
2352m4_defun([_LT_LANG],
2353[m4_ifdef([_LT_LANG_]$1[_enabled], [],
2354  [LT_SUPPORTED_TAG([$1])dnl
2355  m4_append([_LT_TAGS], [$1 ])dnl
2356  m4_define([_LT_LANG_]$1[_enabled], [])dnl
2357  _LT_LANG_$1_CONFIG($1)])dnl
2358])# _LT_LANG
2359
2360
2361# _LT_LANG_DEFAULT_CONFIG
2362# -----------------------
2363m4_defun([_LT_LANG_DEFAULT_CONFIG],
2364[AC_PROVIDE_IFELSE([AC_PROG_CXX],
2365  [LT_LANG(CXX)],
2366  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2367
2368AC_PROVIDE_IFELSE([AC_PROG_F77],
2369  [LT_LANG(F77)],
2370  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2371
2372AC_PROVIDE_IFELSE([AC_PROG_FC],
2373  [LT_LANG(FC)],
2374  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2375
2376dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2377dnl pulling things in needlessly.
2378AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2379  [LT_LANG(GCJ)],
2380  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2381    [LT_LANG(GCJ)],
2382    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2383      [LT_LANG(GCJ)],
2384      [m4_ifdef([AC_PROG_GCJ],
2385	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2386       m4_ifdef([A][M_PROG_GCJ],
2387	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2388       m4_ifdef([LT_PROG_GCJ],
2389	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2390
2391AC_PROVIDE_IFELSE([LT_PROG_RC],
2392  [LT_LANG(RC)],
2393  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2394])# _LT_LANG_DEFAULT_CONFIG
2395
2396# Obsolete macros:
2397AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2398AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2399AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2400AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2401AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
2402dnl aclocal-1.4 backwards compatibility:
2403dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2404dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2405dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2406dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2407dnl AC_DEFUN([AC_LIBTOOL_RC], [])
2408
2409
2410# _LT_TAG_COMPILER
2411# ----------------
2412m4_defun([_LT_TAG_COMPILER],
2413[AC_REQUIRE([AC_PROG_CC])dnl
2414
2415_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2416_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2417_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2418_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2419
2420# If no C compiler was specified, use CC.
2421LTCC=${LTCC-"$CC"}
2422
2423# If no C compiler flags were specified, use CFLAGS.
2424LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2425
2426# Allow CC to be a program name with arguments.
2427compiler=$CC
2428])# _LT_TAG_COMPILER
2429
2430
2431# _LT_COMPILER_BOILERPLATE
2432# ------------------------
2433# Check for compiler boilerplate output or warnings with
2434# the simple compiler test code.
2435m4_defun([_LT_COMPILER_BOILERPLATE],
2436[m4_require([_LT_DECL_SED])dnl
2437ac_outfile=conftest.$ac_objext
2438echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2439eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2440_lt_compiler_boilerplate=`cat conftest.err`
2441$RM conftest*
2442])# _LT_COMPILER_BOILERPLATE
2443
2444
2445# _LT_LINKER_BOILERPLATE
2446# ----------------------
2447# Check for linker boilerplate output or warnings with
2448# the simple link test code.
2449m4_defun([_LT_LINKER_BOILERPLATE],
2450[m4_require([_LT_DECL_SED])dnl
2451ac_outfile=conftest.$ac_objext
2452echo "$lt_simple_link_test_code" >conftest.$ac_ext
2453eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2454_lt_linker_boilerplate=`cat conftest.err`
2455$RM -r conftest*
2456])# _LT_LINKER_BOILERPLATE
2457
2458# _LT_REQUIRED_DARWIN_CHECKS
2459# -------------------------
2460m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2461  case $host_os in
2462    rhapsody* | darwin*)
2463    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2464    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2465    AC_CHECK_TOOL([LIPO], [lipo], [:])
2466    AC_CHECK_TOOL([OTOOL], [otool], [:])
2467    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2468    _LT_DECL([], [DSYMUTIL], [1],
2469      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2470    _LT_DECL([], [NMEDIT], [1],
2471      [Tool to change global to local symbols on Mac OS X])
2472    _LT_DECL([], [LIPO], [1],
2473      [Tool to manipulate fat objects and archives on Mac OS X])
2474    _LT_DECL([], [OTOOL], [1],
2475      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2476    _LT_DECL([], [OTOOL64], [1],
2477      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2478
2479    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2480      [lt_cv_apple_cc_single_mod=no
2481      if test -z "${LT_MULTI_MODULE}"; then
2482	# By default we will add the -single_module flag. You can override
2483	# by either setting the environment variable LT_MULTI_MODULE
2484	# non-empty at configure time, or by adding -multi_module to the
2485	# link flags.
2486	rm -rf libconftest.dylib*
2487	echo "int foo(void){return 1;}" > conftest.c
2488	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2489-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2490	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2491	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2492        _lt_result=$?
2493	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
2494	  lt_cv_apple_cc_single_mod=yes
2495	else
2496	  cat conftest.err >&AS_MESSAGE_LOG_FD
2497	fi
2498	rm -rf libconftest.dylib*
2499	rm -f conftest.*
2500      fi])
2501    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2502      [lt_cv_ld_exported_symbols_list],
2503      [lt_cv_ld_exported_symbols_list=no
2504      save_LDFLAGS=$LDFLAGS
2505      echo "_main" > conftest.sym
2506      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2507      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2508	[lt_cv_ld_exported_symbols_list=yes],
2509	[lt_cv_ld_exported_symbols_list=no])
2510	LDFLAGS="$save_LDFLAGS"
2511    ])
2512    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2513      [lt_cv_ld_force_load=no
2514      cat > conftest.c << _LT_EOF
2515int forced_loaded() { return 2;}
2516_LT_EOF
2517      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2518      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2519      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2520      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2521      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2522      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2523      cat > conftest.c << _LT_EOF
2524int main() { return 0;}
2525_LT_EOF
2526      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2527      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2528      _lt_result=$?
2529      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
2530	lt_cv_ld_force_load=yes
2531      else
2532	cat conftest.err >&AS_MESSAGE_LOG_FD
2533      fi
2534        rm -f conftest.err libconftest.a conftest conftest.c
2535        rm -rf conftest.dSYM
2536    ])
2537    case $host_os in
2538    rhapsody* | darwin1.[[012]])
2539      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2540    darwin1.*)
2541      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2542    darwin*) # darwin 5.x on
2543      # if running on 10.5 or later, the deployment target defaults
2544      # to the OS version, if on x86, and 10.4, the deployment
2545      # target defaults to 10.4. Don't you love it?
2546      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2547	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2548	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2549	10.[[012]]*)
2550	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2551	10.*)
2552	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2553      esac
2554    ;;
2555  esac
2556    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2557      _lt_dar_single_mod='$single_module'
2558    fi
2559    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2560      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2561    else
2562      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2563    fi
2564    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2565      _lt_dsymutil='~$DSYMUTIL $lib || :'
2566    else
2567      _lt_dsymutil=
2568    fi
2569    ;;
2570  esac
2571])
2572
2573
2574# _LT_DARWIN_LINKER_FEATURES
2575# --------------------------
2576# Checks for linker and compiler features on darwin
2577m4_defun([_LT_DARWIN_LINKER_FEATURES],
2578[
2579  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2580  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2581  _LT_TAGVAR(hardcode_direct, $1)=no
2582  _LT_TAGVAR(hardcode_automatic, $1)=yes
2583  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2584  if test "$lt_cv_ld_force_load" = "yes"; then
2585    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
2586  else
2587    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2588  fi
2589  _LT_TAGVAR(link_all_deplibs, $1)=yes
2590  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2591  case $cc_basename in
2592     ifort*) _lt_dar_can_shared=yes ;;
2593     *) _lt_dar_can_shared=$GCC ;;
2594  esac
2595  if test "$_lt_dar_can_shared" = "yes"; then
2596    output_verbose_link_cmd=func_echo_all
2597    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
2598    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2599    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
2600    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
2601    m4_if([$1], [CXX],
2602[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2603      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
2604      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
2605    fi
2606],[])
2607  else
2608  _LT_TAGVAR(ld_shlibs, $1)=no
2609  fi
2610])
2611
2612# _LT_SYS_MODULE_PATH_AIX
2613# -----------------------
2614# Links a minimal program and checks the executable
2615# for the system default hardcoded library path. In most cases,
2616# this is /usr/lib:/lib, but when the MPI compilers are used
2617# the location of the communication and MPI libs are included too.
2618# If we don't find anything, use the default library path according
2619# to the aix ld manual.
2620m4_defun([_LT_SYS_MODULE_PATH_AIX],
2621[m4_require([_LT_DECL_SED])dnl
2622AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2623lt_aix_libpath_sed='
2624    /Import File Strings/,/^$/ {
2625	/^0/ {
2626	    s/^0  *\(.*\)$/\1/
2627	    p
2628	}
2629    }'
2630aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2631# Check for a 64-bit object if we didn't find anything.
2632if test -z "$aix_libpath"; then
2633  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2634fi],[])
2635if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2636])# _LT_SYS_MODULE_PATH_AIX
2637
2638
2639# _LT_SHELL_INIT(ARG)
2640# -------------------
2641m4_define([_LT_SHELL_INIT],
2642[m4_divert_text([M4SH-INIT], [$1
2643])])# _LT_SHELL_INIT
2644
2645
2646
2647# _LT_PROG_ECHO_BACKSLASH
2648# -----------------------
2649# Find how we can fake an echo command that does not interpret backslash.
2650# In particular, with Autoconf 2.60 or later we add some code to the start
2651# of the generated configure script which will find a shell with a builtin
2652# printf (which we can use as an echo command).
2653m4_defun([_LT_PROG_ECHO_BACKSLASH],
2654[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2655ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2656ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2657
2658AC_MSG_CHECKING([how to print strings])
2659# Test print first, because it will be a builtin if present.
2660if test "X`print -r -- -n 2>/dev/null`" = X-n && \
2661   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2662  ECHO='print -r --'
2663elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2664  ECHO='printf %s\n'
2665else
2666  # Use this function as a fallback that always works.
2667  func_fallback_echo ()
2668  {
2669    eval 'cat <<_LTECHO_EOF
2670$[]1
2671_LTECHO_EOF'
2672  }
2673  ECHO='func_fallback_echo'
2674fi
2675
2676# func_echo_all arg...
2677# Invoke $ECHO with all args, space-separated.
2678func_echo_all ()
2679{
2680    $ECHO "$*"
2681}
2682
2683case "$ECHO" in
2684  printf*) AC_MSG_RESULT([printf]) ;;
2685  print*) AC_MSG_RESULT([print -r]) ;;
2686  *) AC_MSG_RESULT([cat]) ;;
2687esac
2688
2689m4_ifdef([_AS_DETECT_SUGGESTED],
2690[_AS_DETECT_SUGGESTED([
2691  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2692    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2693    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2694    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2695    PATH=/empty FPATH=/empty; export PATH FPATH
2696    test "X`printf %s $ECHO`" = "X$ECHO" \
2697      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2698
2699_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2700_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2701])# _LT_PROG_ECHO_BACKSLASH
2702
2703
2704# _LT_ENABLE_LOCK
2705# ---------------
2706m4_defun([_LT_ENABLE_LOCK],
2707[AC_ARG_ENABLE([libtool-lock],
2708  [AS_HELP_STRING([--disable-libtool-lock],
2709    [avoid locking (might break parallel builds)])])
2710test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2711
2712# Some flags need to be propagated to the compiler or linker for good
2713# libtool support.
2714case $host in
2715ia64-*-hpux*)
2716  # Find out which ABI we are using.
2717  echo 'int i;' > conftest.$ac_ext
2718  if AC_TRY_EVAL(ac_compile); then
2719    case `/usr/bin/file conftest.$ac_objext` in
2720      *ELF-32*)
2721	HPUX_IA64_MODE="32"
2722	;;
2723      *ELF-64*)
2724	HPUX_IA64_MODE="64"
2725	;;
2726    esac
2727  fi
2728  rm -rf conftest*
2729  ;;
2730*-*-irix6*)
2731  # Find out which ABI we are using.
2732  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2733  if AC_TRY_EVAL(ac_compile); then
2734    if test "$lt_cv_prog_gnu_ld" = yes; then
2735      case `/usr/bin/file conftest.$ac_objext` in
2736	*32-bit*)
2737	  LD="${LD-ld} -melf32bsmip"
2738	  ;;
2739	*N32*)
2740	  LD="${LD-ld} -melf32bmipn32"
2741	  ;;
2742	*64-bit*)
2743	  LD="${LD-ld} -melf64bmip"
2744	;;
2745      esac
2746    else
2747      case `/usr/bin/file conftest.$ac_objext` in
2748	*32-bit*)
2749	  LD="${LD-ld} -32"
2750	  ;;
2751	*N32*)
2752	  LD="${LD-ld} -n32"
2753	  ;;
2754	*64-bit*)
2755	  LD="${LD-ld} -64"
2756	  ;;
2757      esac
2758    fi
2759  fi
2760  rm -rf conftest*
2761  ;;
2762
2763x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2764s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2765  # Find out which ABI we are using.
2766  echo 'int i;' > conftest.$ac_ext
2767  if AC_TRY_EVAL(ac_compile); then
2768    case `/usr/bin/file conftest.o` in
2769      *32-bit*)
2770	case $host in
2771	  x86_64-*kfreebsd*-gnu)
2772	    LD="${LD-ld} -m elf_i386_fbsd"
2773	    ;;
2774	  x86_64-*linux*)
2775	    LD="${LD-ld} -m elf_i386"
2776	    ;;
2777	  ppc64-*linux*|powerpc64-*linux*)
2778	    LD="${LD-ld} -m elf32ppclinux"
2779	    ;;
2780	  s390x-*linux*)
2781	    LD="${LD-ld} -m elf_s390"
2782	    ;;
2783	  sparc64-*linux*)
2784	    LD="${LD-ld} -m elf32_sparc"
2785	    ;;
2786	esac
2787	;;
2788      *64-bit*)
2789	case $host in
2790	  x86_64-*kfreebsd*-gnu)
2791	    LD="${LD-ld} -m elf_x86_64_fbsd"
2792	    ;;
2793	  x86_64-*linux*)
2794	    LD="${LD-ld} -m elf_x86_64"
2795	    ;;
2796	  ppc*-*linux*|powerpc*-*linux*)
2797	    LD="${LD-ld} -m elf64ppc"
2798	    ;;
2799	  s390*-*linux*|s390*-*tpf*)
2800	    LD="${LD-ld} -m elf64_s390"
2801	    ;;
2802	  sparc*-*linux*)
2803	    LD="${LD-ld} -m elf64_sparc"
2804	    ;;
2805	esac
2806	;;
2807    esac
2808  fi
2809  rm -rf conftest*
2810  ;;
2811
2812*-*-sco3.2v5*)
2813  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2814  SAVE_CFLAGS="$CFLAGS"
2815  CFLAGS="$CFLAGS -belf"
2816  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2817    [AC_LANG_PUSH(C)
2818     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2819     AC_LANG_POP])
2820  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2821    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2822    CFLAGS="$SAVE_CFLAGS"
2823  fi
2824  ;;
2825sparc*-*solaris*)
2826  # Find out which ABI we are using.
2827  echo 'int i;' > conftest.$ac_ext
2828  if AC_TRY_EVAL(ac_compile); then
2829    case `/usr/bin/file conftest.o` in
2830    *64-bit*)
2831      case $lt_cv_prog_gnu_ld in
2832      yes*) LD="${LD-ld} -m elf64_sparc" ;;
2833      *)
2834	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2835	  LD="${LD-ld} -64"
2836	fi
2837	;;
2838      esac
2839      ;;
2840    esac
2841  fi
2842  rm -rf conftest*
2843  ;;
2844esac
2845
2846need_locks="$enable_libtool_lock"
2847])# _LT_ENABLE_LOCK
2848
2849
2850# _LT_CMD_OLD_ARCHIVE
2851# -------------------
2852m4_defun([_LT_CMD_OLD_ARCHIVE],
2853[AC_CHECK_TOOL(AR, ar, false)
2854test -z "$AR" && AR=ar
2855test -z "$AR_FLAGS" && AR_FLAGS=cru
2856_LT_DECL([], [AR], [1], [The archiver])
2857_LT_DECL([], [AR_FLAGS], [1])
2858
2859AC_CHECK_TOOL(STRIP, strip, :)
2860test -z "$STRIP" && STRIP=:
2861_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2862
2863AC_CHECK_TOOL(RANLIB, ranlib, :)
2864test -z "$RANLIB" && RANLIB=:
2865_LT_DECL([], [RANLIB], [1],
2866    [Commands used to install an old-style archive])
2867
2868# Determine commands to create old-style static archives.
2869old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2870old_postinstall_cmds='chmod 644 $oldlib'
2871old_postuninstall_cmds=
2872
2873if test -n "$RANLIB"; then
2874  case $host_os in
2875  openbsd*)
2876    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2877    ;;
2878  *)
2879    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2880    ;;
2881  esac
2882  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2883fi
2884
2885case $host_os in
2886  darwin*)
2887    lock_old_archive_extraction=yes ;;
2888  *)
2889    lock_old_archive_extraction=no ;;
2890esac
2891_LT_DECL([], [old_postinstall_cmds], [2])
2892_LT_DECL([], [old_postuninstall_cmds], [2])
2893_LT_TAGDECL([], [old_archive_cmds], [2],
2894    [Commands used to build an old-style archive])
2895_LT_DECL([], [lock_old_archive_extraction], [0],
2896    [Whether to use a lock for old archive extraction])
2897])# _LT_CMD_OLD_ARCHIVE
2898
2899
2900# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2901#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2902# ----------------------------------------------------------------
2903# Check whether the given compiler option works
2904AC_DEFUN([_LT_COMPILER_OPTION],
2905[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2906m4_require([_LT_DECL_SED])dnl
2907AC_CACHE_CHECK([$1], [$2],
2908  [$2=no
2909   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2910   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2911   lt_compiler_flag="$3"
2912   # Insert the option either (1) after the last *FLAGS variable, or
2913   # (2) before a word containing "conftest.", or (3) at the end.
2914   # Note that $ac_compile itself does not contain backslashes and begins
2915   # with a dollar sign (not a hyphen), so the echo should work correctly.
2916   # The option is referenced via a variable to avoid confusing sed.
2917   lt_compile=`echo "$ac_compile" | $SED \
2918   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2919   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2920   -e 's:$: $lt_compiler_flag:'`
2921   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2922   (eval "$lt_compile" 2>conftest.err)
2923   ac_status=$?
2924   cat conftest.err >&AS_MESSAGE_LOG_FD
2925   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2926   if (exit $ac_status) && test -s "$ac_outfile"; then
2927     # The compiler can only warn and ignore the option if not recognized
2928     # So say no if there are warnings other than the usual output.
2929     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2930     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2931     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2932       $2=yes
2933     fi
2934   fi
2935   $RM conftest*
2936])
2937
2938if test x"[$]$2" = xyes; then
2939    m4_if([$5], , :, [$5])
2940else
2941    m4_if([$6], , :, [$6])
2942fi
2943])# _LT_COMPILER_OPTION
2944
2945# Old name:
2946AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2947dnl aclocal-1.4 backwards compatibility:
2948dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2949
2950
2951# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2952#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2953# ----------------------------------------------------
2954# Check whether the given linker option works
2955AC_DEFUN([_LT_LINKER_OPTION],
2956[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2957m4_require([_LT_DECL_SED])dnl
2958AC_CACHE_CHECK([$1], [$2],
2959  [$2=no
2960   save_LDFLAGS="$LDFLAGS"
2961   LDFLAGS="$LDFLAGS $3"
2962   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2963   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2964     # The linker can only warn and ignore the option if not recognized
2965     # So say no if there are warnings
2966     if test -s conftest.err; then
2967       # Append any errors to the config.log.
2968       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2969       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2970       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2971       if diff conftest.exp conftest.er2 >/dev/null; then
2972         $2=yes
2973       fi
2974     else
2975       $2=yes
2976     fi
2977   fi
2978   $RM -r conftest*
2979   LDFLAGS="$save_LDFLAGS"
2980])
2981
2982if test x"[$]$2" = xyes; then
2983    m4_if([$4], , :, [$4])
2984else
2985    m4_if([$5], , :, [$5])
2986fi
2987])# _LT_LINKER_OPTION
2988
2989# Old name:
2990AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2991dnl aclocal-1.4 backwards compatibility:
2992dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2993
2994
2995# LT_CMD_MAX_LEN
2996#---------------
2997AC_DEFUN([LT_CMD_MAX_LEN],
2998[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2999# find the maximum length of command line arguments
3000AC_MSG_CHECKING([the maximum length of command line arguments])
3001AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3002  i=0
3003  teststring="ABCD"
3004
3005  case $build_os in
3006  msdosdjgpp*)
3007    # On DJGPP, this test can blow up pretty badly due to problems in libc
3008    # (any single argument exceeding 2000 bytes causes a buffer overrun
3009    # during glob expansion).  Even if it were fixed, the result of this
3010    # check would be larger than it should be.
3011    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3012    ;;
3013
3014  gnu*)
3015    # Under GNU Hurd, this test is not required because there is
3016    # no limit to the length of command line arguments.
3017    # Libtool will interpret -1 as no limit whatsoever
3018    lt_cv_sys_max_cmd_len=-1;
3019    ;;
3020
3021  cygwin* | mingw* | cegcc*)
3022    # On Win9x/ME, this test blows up -- it succeeds, but takes
3023    # about 5 minutes as the teststring grows exponentially.
3024    # Worse, since 9x/ME are not pre-emptively multitasking,
3025    # you end up with a "frozen" computer, even though with patience
3026    # the test eventually succeeds (with a max line length of 256k).
3027    # Instead, let's just punt: use the minimum linelength reported by
3028    # all of the supported platforms: 8192 (on NT/2K/XP).
3029    lt_cv_sys_max_cmd_len=8192;
3030    ;;
3031
3032  mint*)
3033    # On MiNT this can take a long time and run out of memory.
3034    lt_cv_sys_max_cmd_len=8192;
3035    ;;
3036
3037  amigaos*)
3038    # On AmigaOS with pdksh, this test takes hours, literally.
3039    # So we just punt and use a minimum line length of 8192.
3040    lt_cv_sys_max_cmd_len=8192;
3041    ;;
3042
3043  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3044    # This has been around since 386BSD, at least.  Likely further.
3045    if test -x /sbin/sysctl; then
3046      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3047    elif test -x /usr/sbin/sysctl; then
3048      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3049    else
3050      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
3051    fi
3052    # And add a safety zone
3053    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3054    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3055    ;;
3056
3057  interix*)
3058    # We know the value 262144 and hardcode it with a safety zone (like BSD)
3059    lt_cv_sys_max_cmd_len=196608
3060    ;;
3061
3062  osf*)
3063    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3064    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3065    # nice to cause kernel panics so lets avoid the loop below.
3066    # First set a reasonable default.
3067    lt_cv_sys_max_cmd_len=16384
3068    #
3069    if test -x /sbin/sysconfig; then
3070      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3071        *1*) lt_cv_sys_max_cmd_len=-1 ;;
3072      esac
3073    fi
3074    ;;
3075  sco3.2v5*)
3076    lt_cv_sys_max_cmd_len=102400
3077    ;;
3078  sysv5* | sco5v6* | sysv4.2uw2*)
3079    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3080    if test -n "$kargmax"; then
3081      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
3082    else
3083      lt_cv_sys_max_cmd_len=32768
3084    fi
3085    ;;
3086  *)
3087    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3088    if test -n "$lt_cv_sys_max_cmd_len"; then
3089      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3090      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3091    else
3092      # Make teststring a little bigger before we do anything with it.
3093      # a 1K string should be a reasonable start.
3094      for i in 1 2 3 4 5 6 7 8 ; do
3095        teststring=$teststring$teststring
3096      done
3097      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3098      # If test is not a shell built-in, we'll probably end up computing a
3099      # maximum length that is only half of the actual maximum length, but
3100      # we can't tell.
3101      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
3102	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
3103	      test $i != 17 # 1/2 MB should be enough
3104      do
3105        i=`expr $i + 1`
3106        teststring=$teststring$teststring
3107      done
3108      # Only check the string length outside the loop.
3109      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3110      teststring=
3111      # Add a significant safety factor because C++ compilers can tack on
3112      # massive amounts of additional arguments before passing them to the
3113      # linker.  It appears as though 1/2 is a usable value.
3114      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3115    fi
3116    ;;
3117  esac
3118])
3119if test -n $lt_cv_sys_max_cmd_len ; then
3120  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3121else
3122  AC_MSG_RESULT(none)
3123fi
3124max_cmd_len=$lt_cv_sys_max_cmd_len
3125_LT_DECL([], [max_cmd_len], [0],
3126    [What is the maximum length of a command?])
3127])# LT_CMD_MAX_LEN
3128
3129# Old name:
3130AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3131dnl aclocal-1.4 backwards compatibility:
3132dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3133
3134
3135# _LT_HEADER_DLFCN
3136# ----------------
3137m4_defun([_LT_HEADER_DLFCN],
3138[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3139])# _LT_HEADER_DLFCN
3140
3141
3142# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3143#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3144# ----------------------------------------------------------------
3145m4_defun([_LT_TRY_DLOPEN_SELF],
3146[m4_require([_LT_HEADER_DLFCN])dnl
3147if test "$cross_compiling" = yes; then :
3148  [$4]
3149else
3150  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3151  lt_status=$lt_dlunknown
3152  cat > conftest.$ac_ext <<_LT_EOF
3153[#line $LINENO "configure"
3154#include "confdefs.h"
3155
3156#if HAVE_DLFCN_H
3157#include <dlfcn.h>
3158#endif
3159
3160#include <stdio.h>
3161
3162#ifdef RTLD_GLOBAL
3163#  define LT_DLGLOBAL		RTLD_GLOBAL
3164#else
3165#  ifdef DL_GLOBAL
3166#    define LT_DLGLOBAL		DL_GLOBAL
3167#  else
3168#    define LT_DLGLOBAL		0
3169#  endif
3170#endif
3171
3172/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3173   find out it does not work in some platform. */
3174#ifndef LT_DLLAZY_OR_NOW
3175#  ifdef RTLD_LAZY
3176#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
3177#  else
3178#    ifdef DL_LAZY
3179#      define LT_DLLAZY_OR_NOW		DL_LAZY
3180#    else
3181#      ifdef RTLD_NOW
3182#        define LT_DLLAZY_OR_NOW	RTLD_NOW
3183#      else
3184#        ifdef DL_NOW
3185#          define LT_DLLAZY_OR_NOW	DL_NOW
3186#        else
3187#          define LT_DLLAZY_OR_NOW	0
3188#        endif
3189#      endif
3190#    endif
3191#  endif
3192#endif
3193
3194/* When -fvisbility=hidden is used, assume the code has been annotated
3195   correspondingly for the symbols needed.  */
3196#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
3197void fnord () __attribute__((visibility("default")));
3198#endif
3199
3200void fnord () { int i=42; }
3201int main ()
3202{
3203  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3204  int status = $lt_dlunknown;
3205
3206  if (self)
3207    {
3208      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
3209      else
3210        {
3211	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
3212          else puts (dlerror ());
3213	}
3214      /* dlclose (self); */
3215    }
3216  else
3217    puts (dlerror ());
3218
3219  return status;
3220}]
3221_LT_EOF
3222  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3223    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3224    lt_status=$?
3225    case x$lt_status in
3226      x$lt_dlno_uscore) $1 ;;
3227      x$lt_dlneed_uscore) $2 ;;
3228      x$lt_dlunknown|x*) $3 ;;
3229    esac
3230  else :
3231    # compilation failed
3232    $3
3233  fi
3234fi
3235rm -fr conftest*
3236])# _LT_TRY_DLOPEN_SELF
3237
3238
3239# LT_SYS_DLOPEN_SELF
3240# ------------------
3241AC_DEFUN([LT_SYS_DLOPEN_SELF],
3242[m4_require([_LT_HEADER_DLFCN])dnl
3243if test "x$enable_dlopen" != xyes; then
3244  enable_dlopen=unknown
3245  enable_dlopen_self=unknown
3246  enable_dlopen_self_static=unknown
3247else
3248  lt_cv_dlopen=no
3249  lt_cv_dlopen_libs=
3250
3251  case $host_os in
3252  beos*)
3253    lt_cv_dlopen="load_add_on"
3254    lt_cv_dlopen_libs=
3255    lt_cv_dlopen_self=yes
3256    ;;
3257
3258  mingw* | pw32* | cegcc*)
3259    lt_cv_dlopen="LoadLibrary"
3260    lt_cv_dlopen_libs=
3261    ;;
3262
3263  cygwin*)
3264    lt_cv_dlopen="dlopen"
3265    lt_cv_dlopen_libs=
3266    ;;
3267
3268  darwin*)
3269  # if libdl is installed we need to link against it
3270    AC_CHECK_LIB([dl], [dlopen],
3271		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3272    lt_cv_dlopen="dyld"
3273    lt_cv_dlopen_libs=
3274    lt_cv_dlopen_self=yes
3275    ])
3276    ;;
3277
3278  *)
3279    AC_CHECK_FUNC([shl_load],
3280	  [lt_cv_dlopen="shl_load"],
3281      [AC_CHECK_LIB([dld], [shl_load],
3282	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3283	[AC_CHECK_FUNC([dlopen],
3284	      [lt_cv_dlopen="dlopen"],
3285	  [AC_CHECK_LIB([dl], [dlopen],
3286		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3287	    [AC_CHECK_LIB([svld], [dlopen],
3288		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3289	      [AC_CHECK_LIB([dld], [dld_link],
3290		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3291	      ])
3292	    ])
3293	  ])
3294	])
3295      ])
3296    ;;
3297  esac
3298
3299  if test "x$lt_cv_dlopen" != xno; then
3300    enable_dlopen=yes
3301  else
3302    enable_dlopen=no
3303  fi
3304
3305  case $lt_cv_dlopen in
3306  dlopen)
3307    save_CPPFLAGS="$CPPFLAGS"
3308    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3309
3310    save_LDFLAGS="$LDFLAGS"
3311    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3312
3313    save_LIBS="$LIBS"
3314    LIBS="$lt_cv_dlopen_libs $LIBS"
3315
3316    AC_CACHE_CHECK([whether a program can dlopen itself],
3317	  lt_cv_dlopen_self, [dnl
3318	  _LT_TRY_DLOPEN_SELF(
3319	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3320	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3321    ])
3322
3323    if test "x$lt_cv_dlopen_self" = xyes; then
3324      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3325      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3326	  lt_cv_dlopen_self_static, [dnl
3327	  _LT_TRY_DLOPEN_SELF(
3328	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3329	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3330      ])
3331    fi
3332
3333    CPPFLAGS="$save_CPPFLAGS"
3334    LDFLAGS="$save_LDFLAGS"
3335    LIBS="$save_LIBS"
3336    ;;
3337  esac
3338
3339  case $lt_cv_dlopen_self in
3340  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3341  *) enable_dlopen_self=unknown ;;
3342  esac
3343
3344  case $lt_cv_dlopen_self_static in
3345  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3346  *) enable_dlopen_self_static=unknown ;;
3347  esac
3348fi
3349_LT_DECL([dlopen_support], [enable_dlopen], [0],
3350	 [Whether dlopen is supported])
3351_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3352	 [Whether dlopen of programs is supported])
3353_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3354	 [Whether dlopen of statically linked programs is supported])
3355])# LT_SYS_DLOPEN_SELF
3356
3357# Old name:
3358AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3359dnl aclocal-1.4 backwards compatibility:
3360dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3361
3362
3363# _LT_COMPILER_C_O([TAGNAME])
3364# ---------------------------
3365# Check to see if options -c and -o are simultaneously supported by compiler.
3366# This macro does not hard code the compiler like AC_PROG_CC_C_O.
3367m4_defun([_LT_COMPILER_C_O],
3368[m4_require([_LT_DECL_SED])dnl
3369m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3370m4_require([_LT_TAG_COMPILER])dnl
3371AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3372  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3373  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3374   $RM -r conftest 2>/dev/null
3375   mkdir conftest
3376   cd conftest
3377   mkdir out
3378   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3379
3380   lt_compiler_flag="-o out/conftest2.$ac_objext"
3381   # Insert the option either (1) after the last *FLAGS variable, or
3382   # (2) before a word containing "conftest.", or (3) at the end.
3383   # Note that $ac_compile itself does not contain backslashes and begins
3384   # with a dollar sign (not a hyphen), so the echo should work correctly.
3385   lt_compile=`echo "$ac_compile" | $SED \
3386   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3387   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3388   -e 's:$: $lt_compiler_flag:'`
3389   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3390   (eval "$lt_compile" 2>out/conftest.err)
3391   ac_status=$?
3392   cat out/conftest.err >&AS_MESSAGE_LOG_FD
3393   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3394   if (exit $ac_status) && test -s out/conftest2.$ac_objext
3395   then
3396     # The compiler can only warn and ignore the option if not recognized
3397     # So say no if there are warnings
3398     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3399     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3400     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3401       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3402     fi
3403   fi
3404   chmod u+w . 2>&AS_MESSAGE_LOG_FD
3405   $RM conftest*
3406   # SGI C++ compiler will create directory out/ii_files/ for
3407   # template instantiation
3408   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3409   $RM out/* && rmdir out
3410   cd ..
3411   $RM -r conftest
3412   $RM conftest*
3413])
3414_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3415	[Does compiler simultaneously support -c and -o options?])
3416])# _LT_COMPILER_C_O
3417
3418
3419# _LT_COMPILER_FILE_LOCKS([TAGNAME])
3420# ----------------------------------
3421# Check to see if we can do hard links to lock some files if needed
3422m4_defun([_LT_COMPILER_FILE_LOCKS],
3423[m4_require([_LT_ENABLE_LOCK])dnl
3424m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3425_LT_COMPILER_C_O([$1])
3426
3427hard_links="nottested"
3428if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3429  # do not overwrite the value of need_locks provided by the user
3430  AC_MSG_CHECKING([if we can lock with hard links])
3431  hard_links=yes
3432  $RM conftest*
3433  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3434  touch conftest.a
3435  ln conftest.a conftest.b 2>&5 || hard_links=no
3436  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3437  AC_MSG_RESULT([$hard_links])
3438  if test "$hard_links" = no; then
3439    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3440    need_locks=warn
3441  fi
3442else
3443  need_locks=no
3444fi
3445_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3446])# _LT_COMPILER_FILE_LOCKS
3447
3448
3449# _LT_CHECK_OBJDIR
3450# ----------------
3451m4_defun([_LT_CHECK_OBJDIR],
3452[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3453[rm -f .libs 2>/dev/null
3454mkdir .libs 2>/dev/null
3455if test -d .libs; then
3456  lt_cv_objdir=.libs
3457else
3458  # MS-DOS does not allow filenames that begin with a dot.
3459  lt_cv_objdir=_libs
3460fi
3461rmdir .libs 2>/dev/null])
3462objdir=$lt_cv_objdir
3463_LT_DECL([], [objdir], [0],
3464         [The name of the directory that contains temporary libtool files])dnl
3465m4_pattern_allow([LT_OBJDIR])dnl
3466AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3467  [Define to the sub-directory in which libtool stores uninstalled libraries.])
3468])# _LT_CHECK_OBJDIR
3469
3470
3471# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3472# --------------------------------------
3473# Check hardcoding attributes.
3474m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3475[AC_MSG_CHECKING([how to hardcode library paths into programs])
3476_LT_TAGVAR(hardcode_action, $1)=
3477if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3478   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3479   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3480
3481  # We can hardcode non-existent directories.
3482  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3483     # If the only mechanism to avoid hardcoding is shlibpath_var, we
3484     # have to relink, otherwise we might link with an installed library
3485     # when we should be linking with a yet-to-be-installed one
3486     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3487     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3488    # Linking always hardcodes the temporary library directory.
3489    _LT_TAGVAR(hardcode_action, $1)=relink
3490  else
3491    # We can link without hardcoding, and we can hardcode nonexisting dirs.
3492    _LT_TAGVAR(hardcode_action, $1)=immediate
3493  fi
3494else
3495  # We cannot hardcode anything, or else we can only hardcode existing
3496  # directories.
3497  _LT_TAGVAR(hardcode_action, $1)=unsupported
3498fi
3499AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3500
3501if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3502   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3503  # Fast installation is not supported
3504  enable_fast_install=no
3505elif test "$shlibpath_overrides_runpath" = yes ||
3506     test "$enable_shared" = no; then
3507  # Fast installation is not necessary
3508  enable_fast_install=needless
3509fi
3510_LT_TAGDECL([], [hardcode_action], [0],
3511    [How to hardcode a shared library path into an executable])
3512])# _LT_LINKER_HARDCODE_LIBPATH
3513
3514
3515# _LT_CMD_STRIPLIB
3516# ----------------
3517m4_defun([_LT_CMD_STRIPLIB],
3518[m4_require([_LT_DECL_EGREP])
3519striplib=
3520old_striplib=
3521AC_MSG_CHECKING([whether stripping libraries is possible])
3522if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3523  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3524  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3525  AC_MSG_RESULT([yes])
3526else
3527# FIXME - insert some real tests, host_os isn't really good enough
3528  case $host_os in
3529  darwin*)
3530    if test -n "$STRIP" ; then
3531      striplib="$STRIP -x"
3532      old_striplib="$STRIP -S"
3533      AC_MSG_RESULT([yes])
3534    else
3535      AC_MSG_RESULT([no])
3536    fi
3537    ;;
3538  *)
3539    AC_MSG_RESULT([no])
3540    ;;
3541  esac
3542fi
3543_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3544_LT_DECL([], [striplib], [1])
3545])# _LT_CMD_STRIPLIB
3546
3547
3548# _LT_SYS_DYNAMIC_LINKER([TAG])
3549# -----------------------------
3550# PORTME Fill in your ld.so characteristics
3551m4_defun([_LT_SYS_DYNAMIC_LINKER],
3552[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3553m4_require([_LT_DECL_EGREP])dnl
3554m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3555m4_require([_LT_DECL_OBJDUMP])dnl
3556m4_require([_LT_DECL_SED])dnl
3557m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3558AC_MSG_CHECKING([dynamic linker characteristics])
3559m4_if([$1],
3560	[], [
3561if test "$GCC" = yes; then
3562  case $host_os in
3563    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3564    *) lt_awk_arg="/^libraries:/" ;;
3565  esac
3566  case $host_os in
3567    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3568    *) lt_sed_strip_eq="s,=/,/,g" ;;
3569  esac
3570  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3571  case $lt_search_path_spec in
3572  *\;*)
3573    # if the path contains ";" then we assume it to be the separator
3574    # otherwise default to the standard path separator (i.e. ":") - it is
3575    # assumed that no part of a normal pathname contains ";" but that should
3576    # okay in the real world where ";" in dirpaths is itself problematic.
3577    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3578    ;;
3579  *)
3580    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3581    ;;
3582  esac
3583  # Ok, now we have the path, separated by spaces, we can step through it
3584  # and add multilib dir if necessary.
3585  lt_tmp_lt_search_path_spec=
3586  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3587  for lt_sys_path in $lt_search_path_spec; do
3588    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3589      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3590    else
3591      test -d "$lt_sys_path" && \
3592	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3593    fi
3594  done
3595  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3596BEGIN {RS=" "; FS="/|\n";} {
3597  lt_foo="";
3598  lt_count=0;
3599  for (lt_i = NF; lt_i > 0; lt_i--) {
3600    if ($lt_i != "" && $lt_i != ".") {
3601      if ($lt_i == "..") {
3602        lt_count++;
3603      } else {
3604        if (lt_count == 0) {
3605          lt_foo="/" $lt_i lt_foo;
3606        } else {
3607          lt_count--;
3608        }
3609      }
3610    }
3611  }
3612  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3613  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3614}'`
3615  # AWK program above erroneously prepends '/' to C:/dos/paths
3616  # for these hosts.
3617  case $host_os in
3618    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3619      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3620  esac
3621  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3622else
3623  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3624fi])
3625library_names_spec=
3626libname_spec='lib$name'
3627soname_spec=
3628shrext_cmds=".so"
3629postinstall_cmds=
3630postuninstall_cmds=
3631finish_cmds=
3632finish_eval=
3633shlibpath_var=
3634shlibpath_overrides_runpath=unknown
3635version_type=none
3636dynamic_linker="$host_os ld.so"
3637sys_lib_dlsearch_path_spec="/lib /usr/lib"
3638need_lib_prefix=unknown
3639hardcode_into_libs=no
3640
3641# when you set need_version to no, make sure it does not cause -set_version
3642# flags to be left without arguments
3643need_version=unknown
3644
3645case $host_os in
3646aix3*)
3647  version_type=linux
3648  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3649  shlibpath_var=LIBPATH
3650
3651  # AIX 3 has no versioning support, so we append a major version to the name.
3652  soname_spec='${libname}${release}${shared_ext}$major'
3653  ;;
3654
3655aix[[4-9]]*)
3656  version_type=linux
3657  need_lib_prefix=no
3658  need_version=no
3659  hardcode_into_libs=yes
3660  if test "$host_cpu" = ia64; then
3661    # AIX 5 supports IA64
3662    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3663    shlibpath_var=LD_LIBRARY_PATH
3664  else
3665    # With GCC up to 2.95.x, collect2 would create an import file
3666    # for dependence libraries.  The import file would start with
3667    # the line `#! .'.  This would cause the generated library to
3668    # depend on `.', always an invalid library.  This was fixed in
3669    # development snapshots of GCC prior to 3.0.
3670    case $host_os in
3671      aix4 | aix4.[[01]] | aix4.[[01]].*)
3672      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3673	   echo ' yes '
3674	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3675	:
3676      else
3677	can_build_shared=no
3678      fi
3679      ;;
3680    esac
3681    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3682    # soname into executable. Probably we can add versioning support to
3683    # collect2, so additional links can be useful in future.
3684    if test "$aix_use_runtimelinking" = yes; then
3685      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3686      # instead of lib<name>.a to let people know that these are not
3687      # typical AIX shared libraries.
3688      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3689    else
3690      # We preserve .a as extension for shared libraries through AIX4.2
3691      # and later when we are not doing run time linking.
3692      library_names_spec='${libname}${release}.a $libname.a'
3693      soname_spec='${libname}${release}${shared_ext}$major'
3694    fi
3695    shlibpath_var=LIBPATH
3696  fi
3697  ;;
3698
3699amigaos*)
3700  case $host_cpu in
3701  powerpc)
3702    # Since July 2007 AmigaOS4 officially supports .so libraries.
3703    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3704    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3705    ;;
3706  m68k)
3707    library_names_spec='$libname.ixlibrary $libname.a'
3708    # Create ${libname}_ixlibrary.a entries in /sys/libs.
3709    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
3710    ;;
3711  esac
3712  ;;
3713
3714beos*)
3715  library_names_spec='${libname}${shared_ext}'
3716  dynamic_linker="$host_os ld.so"
3717  shlibpath_var=LIBRARY_PATH
3718  ;;
3719
3720bsdi[[45]]*)
3721  version_type=linux
3722  need_version=no
3723  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3724  soname_spec='${libname}${release}${shared_ext}$major'
3725  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3726  shlibpath_var=LD_LIBRARY_PATH
3727  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3728  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3729  # the default ld.so.conf also contains /usr/contrib/lib and
3730  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3731  # libtool to hard-code these into programs
3732  ;;
3733
3734cygwin* | mingw* | pw32* | cegcc*)
3735  version_type=windows
3736  shrext_cmds=".dll"
3737  need_version=no
3738  need_lib_prefix=no
3739
3740  case $GCC,$host_os in
3741  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
3742    library_names_spec='$libname.dll.a'
3743    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3744    postinstall_cmds='base_file=`basename \${file}`~
3745      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3746      dldir=$destdir/`dirname \$dlpath`~
3747      test -d \$dldir || mkdir -p \$dldir~
3748      $install_prog $dir/$dlname \$dldir/$dlname~
3749      chmod a+x \$dldir/$dlname~
3750      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3751        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3752      fi'
3753    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3754      dlpath=$dir/\$dldll~
3755       $RM \$dlpath'
3756    shlibpath_overrides_runpath=yes
3757
3758    case $host_os in
3759    cygwin*)
3760      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3761      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3762m4_if([$1], [],[
3763      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3764      ;;
3765    mingw* | cegcc*)
3766      # MinGW DLLs use traditional 'lib' prefix
3767      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3768      ;;
3769    pw32*)
3770      # pw32 DLLs use 'pw' prefix rather than 'lib'
3771      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3772      ;;
3773    esac
3774    ;;
3775
3776  *)
3777    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3778    ;;
3779  esac
3780  dynamic_linker='Win32 ld.exe'
3781  # FIXME: first we should search . and the directory the executable is in
3782  shlibpath_var=PATH
3783  ;;
3784
3785darwin* | rhapsody*)
3786  dynamic_linker="$host_os dyld"
3787  version_type=darwin
3788  need_lib_prefix=no
3789  need_version=no
3790  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3791  soname_spec='${libname}${release}${major}$shared_ext'
3792  shlibpath_overrides_runpath=yes
3793  shlibpath_var=DYLD_LIBRARY_PATH
3794  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3795m4_if([$1], [],[
3796  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3797  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3798  ;;
3799
3800dgux*)
3801  version_type=linux
3802  need_lib_prefix=no
3803  need_version=no
3804  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3805  soname_spec='${libname}${release}${shared_ext}$major'
3806  shlibpath_var=LD_LIBRARY_PATH
3807  ;;
3808
3809freebsd1*)
3810  dynamic_linker=no
3811  ;;
3812
3813freebsd* | dragonfly*)
3814  # DragonFly does not have aout.  When/if they implement a new
3815  # versioning mechanism, adjust this.
3816  if test -x /usr/bin/objformat; then
3817    objformat=`/usr/bin/objformat`
3818  else
3819    case $host_os in
3820    freebsd[[123]]*) objformat=aout ;;
3821    *) objformat=elf ;;
3822    esac
3823  fi
3824  version_type=freebsd-$objformat
3825  case $version_type in
3826    freebsd-elf*)
3827      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3828      need_version=no
3829      need_lib_prefix=no
3830      ;;
3831    freebsd-*)
3832      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3833      need_version=yes
3834      ;;
3835  esac
3836  shlibpath_var=LD_LIBRARY_PATH
3837  case $host_os in
3838  freebsd2*)
3839    shlibpath_overrides_runpath=yes
3840    ;;
3841  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3842    shlibpath_overrides_runpath=yes
3843    hardcode_into_libs=yes
3844    ;;
3845  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3846  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3847    shlibpath_overrides_runpath=no
3848    hardcode_into_libs=yes
3849    ;;
3850  *) # from 4.6 on, and DragonFly
3851    shlibpath_overrides_runpath=yes
3852    hardcode_into_libs=yes
3853    ;;
3854  esac
3855  ;;
3856
3857gnu*)
3858  version_type=linux
3859  need_lib_prefix=no
3860  need_version=no
3861  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3862  soname_spec='${libname}${release}${shared_ext}$major'
3863  shlibpath_var=LD_LIBRARY_PATH
3864  hardcode_into_libs=yes
3865  ;;
3866
3867haiku*)
3868  version_type=linux
3869  need_lib_prefix=no
3870  need_version=no
3871  dynamic_linker="$host_os runtime_loader"
3872  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3873  soname_spec='${libname}${release}${shared_ext}$major'
3874  shlibpath_var=LIBRARY_PATH
3875  shlibpath_overrides_runpath=yes
3876  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3877  hardcode_into_libs=yes
3878  ;;
3879
3880hpux9* | hpux10* | hpux11*)
3881  # Give a soname corresponding to the major version so that dld.sl refuses to
3882  # link against other versions.
3883  version_type=sunos
3884  need_lib_prefix=no
3885  need_version=no
3886  case $host_cpu in
3887  ia64*)
3888    shrext_cmds='.so'
3889    hardcode_into_libs=yes
3890    dynamic_linker="$host_os dld.so"
3891    shlibpath_var=LD_LIBRARY_PATH
3892    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3893    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3894    soname_spec='${libname}${release}${shared_ext}$major'
3895    if test "X$HPUX_IA64_MODE" = X32; then
3896      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3897    else
3898      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3899    fi
3900    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3901    ;;
3902  hppa*64*)
3903    shrext_cmds='.sl'
3904    hardcode_into_libs=yes
3905    dynamic_linker="$host_os dld.sl"
3906    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3907    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3908    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3909    soname_spec='${libname}${release}${shared_ext}$major'
3910    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3911    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3912    ;;
3913  *)
3914    shrext_cmds='.sl'
3915    dynamic_linker="$host_os dld.sl"
3916    shlibpath_var=SHLIB_PATH
3917    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3918    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3919    soname_spec='${libname}${release}${shared_ext}$major'
3920    ;;
3921  esac
3922  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3923  postinstall_cmds='chmod 555 $lib'
3924  # or fails outright, so override atomically:
3925  install_override_mode=555
3926  ;;
3927
3928interix[[3-9]]*)
3929  version_type=linux
3930  need_lib_prefix=no
3931  need_version=no
3932  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3933  soname_spec='${libname}${release}${shared_ext}$major'
3934  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3935  shlibpath_var=LD_LIBRARY_PATH
3936  shlibpath_overrides_runpath=no
3937  hardcode_into_libs=yes
3938  ;;
3939
3940irix5* | irix6* | nonstopux*)
3941  case $host_os in
3942    nonstopux*) version_type=nonstopux ;;
3943    *)
3944	if test "$lt_cv_prog_gnu_ld" = yes; then
3945		version_type=linux
3946	else
3947		version_type=irix
3948	fi ;;
3949  esac
3950  need_lib_prefix=no
3951  need_version=no
3952  soname_spec='${libname}${release}${shared_ext}$major'
3953  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3954  case $host_os in
3955  irix5* | nonstopux*)
3956    libsuff= shlibsuff=
3957    ;;
3958  *)
3959    case $LD in # libtool.m4 will add one of these switches to LD
3960    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3961      libsuff= shlibsuff= libmagic=32-bit;;
3962    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3963      libsuff=32 shlibsuff=N32 libmagic=N32;;
3964    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3965      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3966    *) libsuff= shlibsuff= libmagic=never-match;;
3967    esac
3968    ;;
3969  esac
3970  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3971  shlibpath_overrides_runpath=no
3972  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3973  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3974  hardcode_into_libs=yes
3975  ;;
3976
3977# No shared lib support for Linux oldld, aout, or coff.
3978linux*oldld* | linux*aout* | linux*coff*)
3979  dynamic_linker=no
3980  ;;
3981
3982# This must be Linux ELF.
3983linux* | k*bsd*-gnu | kopensolaris*-gnu)
3984  version_type=linux
3985  need_lib_prefix=no
3986  need_version=no
3987  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3988  soname_spec='${libname}${release}${shared_ext}$major'
3989  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3990  shlibpath_var=LD_LIBRARY_PATH
3991  shlibpath_overrides_runpath=no
3992
3993  # Some binutils ld are patched to set DT_RUNPATH
3994  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3995    [lt_cv_shlibpath_overrides_runpath=no
3996    save_LDFLAGS=$LDFLAGS
3997    save_libdir=$libdir
3998    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3999	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4000    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4001      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4002	 [lt_cv_shlibpath_overrides_runpath=yes])])
4003    LDFLAGS=$save_LDFLAGS
4004    libdir=$save_libdir
4005    ])
4006  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
4007
4008  # This implies no fast_install, which is unacceptable.
4009  # Some rework will be needed to allow for fast_install
4010  # before this can be enabled.
4011  hardcode_into_libs=yes
4012
4013  # Append ld.so.conf contents to the search path
4014  if test -f /etc/ld.so.conf; then
4015    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
4016    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4017  fi
4018
4019  # We used to test for /lib/ld.so.1 and disable shared libraries on
4020  # powerpc, because MkLinux only supported shared libraries with the
4021  # GNU dynamic linker.  Since this was broken with cross compilers,
4022  # most powerpc-linux boxes support dynamic linking these days and
4023  # people can always --disable-shared, the test was removed, and we
4024  # assume the GNU/Linux dynamic linker is in use.
4025  dynamic_linker='GNU/Linux ld.so'
4026  ;;
4027
4028netbsd*)
4029  version_type=sunos
4030  need_lib_prefix=no
4031  need_version=no
4032  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4033    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4034    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4035    dynamic_linker='NetBSD (a.out) ld.so'
4036  else
4037    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4038    soname_spec='${libname}${release}${shared_ext}$major'
4039    dynamic_linker='NetBSD ld.elf_so'
4040  fi
4041  shlibpath_var=LD_LIBRARY_PATH
4042  shlibpath_overrides_runpath=yes
4043  hardcode_into_libs=yes
4044  ;;
4045
4046newsos6)
4047  version_type=linux
4048  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4049  shlibpath_var=LD_LIBRARY_PATH
4050  shlibpath_overrides_runpath=yes
4051  ;;
4052
4053*nto* | *qnx*)
4054  version_type=qnx
4055  need_lib_prefix=no
4056  need_version=no
4057  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4058  soname_spec='${libname}${release}${shared_ext}$major'
4059  shlibpath_var=LD_LIBRARY_PATH
4060  shlibpath_overrides_runpath=no
4061  hardcode_into_libs=yes
4062  dynamic_linker='ldqnx.so'
4063  ;;
4064
4065openbsd*)
4066  version_type=sunos
4067  sys_lib_dlsearch_path_spec="/usr/lib"
4068  need_lib_prefix=no
4069  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4070  case $host_os in
4071    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
4072    *)				need_version=no  ;;
4073  esac
4074  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4075  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4076  shlibpath_var=LD_LIBRARY_PATH
4077  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4078    case $host_os in
4079      openbsd2.[[89]] | openbsd2.[[89]].*)
4080	shlibpath_overrides_runpath=no
4081	;;
4082      *)
4083	shlibpath_overrides_runpath=yes
4084	;;
4085      esac
4086  else
4087    shlibpath_overrides_runpath=yes
4088  fi
4089  ;;
4090
4091os2*)
4092  libname_spec='$name'
4093  shrext_cmds=".dll"
4094  need_lib_prefix=no
4095  library_names_spec='$libname${shared_ext} $libname.a'
4096  dynamic_linker='OS/2 ld.exe'
4097  shlibpath_var=LIBPATH
4098  ;;
4099
4100osf3* | osf4* | osf5*)
4101  version_type=osf
4102  need_lib_prefix=no
4103  need_version=no
4104  soname_spec='${libname}${release}${shared_ext}$major'
4105  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4106  shlibpath_var=LD_LIBRARY_PATH
4107  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4108  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4109  ;;
4110
4111rdos*)
4112  dynamic_linker=no
4113  ;;
4114
4115solaris*)
4116  version_type=linux
4117  need_lib_prefix=no
4118  need_version=no
4119  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4120  soname_spec='${libname}${release}${shared_ext}$major'
4121  shlibpath_var=LD_LIBRARY_PATH
4122  shlibpath_overrides_runpath=yes
4123  hardcode_into_libs=yes
4124  # ldd complains unless libraries are executable
4125  postinstall_cmds='chmod +x $lib'
4126  ;;
4127
4128sunos4*)
4129  version_type=sunos
4130  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4131  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4132  shlibpath_var=LD_LIBRARY_PATH
4133  shlibpath_overrides_runpath=yes
4134  if test "$with_gnu_ld" = yes; then
4135    need_lib_prefix=no
4136  fi
4137  need_version=yes
4138  ;;
4139
4140sysv4 | sysv4.3*)
4141  version_type=linux
4142  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4143  soname_spec='${libname}${release}${shared_ext}$major'
4144  shlibpath_var=LD_LIBRARY_PATH
4145  case $host_vendor in
4146    sni)
4147      shlibpath_overrides_runpath=no
4148      need_lib_prefix=no
4149      runpath_var=LD_RUN_PATH
4150      ;;
4151    siemens)
4152      need_lib_prefix=no
4153      ;;
4154    motorola)
4155      need_lib_prefix=no
4156      need_version=no
4157      shlibpath_overrides_runpath=no
4158      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4159      ;;
4160  esac
4161  ;;
4162
4163sysv4*MP*)
4164  if test -d /usr/nec ;then
4165    version_type=linux
4166    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4167    soname_spec='$libname${shared_ext}.$major'
4168    shlibpath_var=LD_LIBRARY_PATH
4169  fi
4170  ;;
4171
4172sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4173  version_type=freebsd-elf
4174  need_lib_prefix=no
4175  need_version=no
4176  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4177  soname_spec='${libname}${release}${shared_ext}$major'
4178  shlibpath_var=LD_LIBRARY_PATH
4179  shlibpath_overrides_runpath=yes
4180  hardcode_into_libs=yes
4181  if test "$with_gnu_ld" = yes; then
4182    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4183  else
4184    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4185    case $host_os in
4186      sco3.2v5*)
4187        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4188	;;
4189    esac
4190  fi
4191  sys_lib_dlsearch_path_spec='/usr/lib'
4192  ;;
4193
4194tpf*)
4195  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
4196  version_type=linux
4197  need_lib_prefix=no
4198  need_version=no
4199  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4200  shlibpath_var=LD_LIBRARY_PATH
4201  shlibpath_overrides_runpath=no
4202  hardcode_into_libs=yes
4203  ;;
4204
4205uts4*)
4206  version_type=linux
4207  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4208  soname_spec='${libname}${release}${shared_ext}$major'
4209  shlibpath_var=LD_LIBRARY_PATH
4210  ;;
4211
4212*)
4213  dynamic_linker=no
4214  ;;
4215esac
4216AC_MSG_RESULT([$dynamic_linker])
4217test "$dynamic_linker" = no && can_build_shared=no
4218
4219variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4220if test "$GCC" = yes; then
4221  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4222fi
4223
4224if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4225  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4226fi
4227if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4228  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4229fi
4230
4231_LT_DECL([], [variables_saved_for_relink], [1],
4232    [Variables whose values should be saved in libtool wrapper scripts and
4233    restored at link time])
4234_LT_DECL([], [need_lib_prefix], [0],
4235    [Do we need the "lib" prefix for modules?])
4236_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4237_LT_DECL([], [version_type], [0], [Library versioning type])
4238_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
4239_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4240_LT_DECL([], [shlibpath_overrides_runpath], [0],
4241    [Is shlibpath searched before the hard-coded library search path?])
4242_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4243_LT_DECL([], [library_names_spec], [1],
4244    [[List of archive names.  First name is the real one, the rest are links.
4245    The last name is the one that the linker finds with -lNAME]])
4246_LT_DECL([], [soname_spec], [1],
4247    [[The coded name of the library, if different from the real name]])
4248_LT_DECL([], [install_override_mode], [1],
4249    [Permission mode override for installation of shared libraries])
4250_LT_DECL([], [postinstall_cmds], [2],
4251    [Command to use after installation of a shared archive])
4252_LT_DECL([], [postuninstall_cmds], [2],
4253    [Command to use after uninstallation of a shared archive])
4254_LT_DECL([], [finish_cmds], [2],
4255    [Commands used to finish a libtool library installation in a directory])
4256_LT_DECL([], [finish_eval], [1],
4257    [[As "finish_cmds", except a single script fragment to be evaled but
4258    not shown]])
4259_LT_DECL([], [hardcode_into_libs], [0],
4260    [Whether we should hardcode library paths into libraries])
4261_LT_DECL([], [sys_lib_search_path_spec], [2],
4262    [Compile-time system search path for libraries])
4263_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4264    [Run-time system search path for libraries])
4265])# _LT_SYS_DYNAMIC_LINKER
4266
4267
4268# _LT_PATH_TOOL_PREFIX(TOOL)
4269# --------------------------
4270# find a file program which can recognize shared library
4271AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4272[m4_require([_LT_DECL_EGREP])dnl
4273AC_MSG_CHECKING([for $1])
4274AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4275[case $MAGIC_CMD in
4276[[\\/*] |  ?:[\\/]*])
4277  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4278  ;;
4279*)
4280  lt_save_MAGIC_CMD="$MAGIC_CMD"
4281  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4282dnl $ac_dummy forces splitting on constant user-supplied paths.
4283dnl POSIX.2 word splitting is done only on the output of word expansions,
4284dnl not every word.  This closes a longstanding sh security hole.
4285  ac_dummy="m4_if([$2], , $PATH, [$2])"
4286  for ac_dir in $ac_dummy; do
4287    IFS="$lt_save_ifs"
4288    test -z "$ac_dir" && ac_dir=.
4289    if test -f $ac_dir/$1; then
4290      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4291      if test -n "$file_magic_test_file"; then
4292	case $deplibs_check_method in
4293	"file_magic "*)
4294	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4295	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4296	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4297	    $EGREP "$file_magic_regex" > /dev/null; then
4298	    :
4299	  else
4300	    cat <<_LT_EOF 1>&2
4301
4302*** Warning: the command libtool uses to detect shared libraries,
4303*** $file_magic_cmd, produces output that libtool cannot recognize.
4304*** The result is that libtool may fail to recognize shared libraries
4305*** as such.  This will affect the creation of libtool libraries that
4306*** depend on shared libraries, but programs linked with such libtool
4307*** libraries will work regardless of this problem.  Nevertheless, you
4308*** may want to report the problem to your system manager and/or to
4309*** bug-libtool@gnu.org
4310
4311_LT_EOF
4312	  fi ;;
4313	esac
4314      fi
4315      break
4316    fi
4317  done
4318  IFS="$lt_save_ifs"
4319  MAGIC_CMD="$lt_save_MAGIC_CMD"
4320  ;;
4321esac])
4322MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4323if test -n "$MAGIC_CMD"; then
4324  AC_MSG_RESULT($MAGIC_CMD)
4325else
4326  AC_MSG_RESULT(no)
4327fi
4328_LT_DECL([], [MAGIC_CMD], [0],
4329	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4330])# _LT_PATH_TOOL_PREFIX
4331
4332# Old name:
4333AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4334dnl aclocal-1.4 backwards compatibility:
4335dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4336
4337
4338# _LT_PATH_MAGIC
4339# --------------
4340# find a file program which can recognize a shared library
4341m4_defun([_LT_PATH_MAGIC],
4342[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4343if test -z "$lt_cv_path_MAGIC_CMD"; then
4344  if test -n "$ac_tool_prefix"; then
4345    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4346  else
4347    MAGIC_CMD=:
4348  fi
4349fi
4350])# _LT_PATH_MAGIC
4351
4352
4353# LT_PATH_LD
4354# ----------
4355# find the pathname to the GNU or non-GNU linker
4356AC_DEFUN([LT_PATH_LD],
4357[AC_REQUIRE([AC_PROG_CC])dnl
4358AC_REQUIRE([AC_CANONICAL_HOST])dnl
4359AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4360m4_require([_LT_DECL_SED])dnl
4361m4_require([_LT_DECL_EGREP])dnl
4362m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4363
4364AC_ARG_WITH([gnu-ld],
4365    [AS_HELP_STRING([--with-gnu-ld],
4366	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
4367    [test "$withval" = no || with_gnu_ld=yes],
4368    [with_gnu_ld=no])dnl
4369
4370ac_prog=ld
4371if test "$GCC" = yes; then
4372  # Check if gcc -print-prog-name=ld gives a path.
4373  AC_MSG_CHECKING([for ld used by $CC])
4374  case $host in
4375  *-*-mingw*)
4376    # gcc leaves a trailing carriage return which upsets mingw
4377    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4378  *)
4379    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4380  esac
4381  case $ac_prog in
4382    # Accept absolute paths.
4383    [[\\/]]* | ?:[[\\/]]*)
4384      re_direlt='/[[^/]][[^/]]*/\.\./'
4385      # Canonicalize the pathname of ld
4386      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4387      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4388	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4389      done
4390      test -z "$LD" && LD="$ac_prog"
4391      ;;
4392  "")
4393    # If it fails, then pretend we aren't using GCC.
4394    ac_prog=ld
4395    ;;
4396  *)
4397    # If it is relative, then search for the first ld in PATH.
4398    with_gnu_ld=unknown
4399    ;;
4400  esac
4401elif test "$with_gnu_ld" = yes; then
4402  AC_MSG_CHECKING([for GNU ld])
4403else
4404  AC_MSG_CHECKING([for non-GNU ld])
4405fi
4406AC_CACHE_VAL(lt_cv_path_LD,
4407[if test -z "$LD"; then
4408  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4409  for ac_dir in $PATH; do
4410    IFS="$lt_save_ifs"
4411    test -z "$ac_dir" && ac_dir=.
4412    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4413      lt_cv_path_LD="$ac_dir/$ac_prog"
4414      # Check to see if the program is GNU ld.  I'd rather use --version,
4415      # but apparently some variants of GNU ld only accept -v.
4416      # Break only if it was the GNU/non-GNU ld that we prefer.
4417      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4418      *GNU* | *'with BFD'*)
4419	test "$with_gnu_ld" != no && break
4420	;;
4421      *)
4422	test "$with_gnu_ld" != yes && break
4423	;;
4424      esac
4425    fi
4426  done
4427  IFS="$lt_save_ifs"
4428else
4429  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4430fi])
4431LD="$lt_cv_path_LD"
4432if test -n "$LD"; then
4433  AC_MSG_RESULT($LD)
4434else
4435  AC_MSG_RESULT(no)
4436fi
4437test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4438_LT_PATH_LD_GNU
4439AC_SUBST([LD])
4440
4441_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4442])# LT_PATH_LD
4443
4444# Old names:
4445AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4446AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4447dnl aclocal-1.4 backwards compatibility:
4448dnl AC_DEFUN([AM_PROG_LD], [])
4449dnl AC_DEFUN([AC_PROG_LD], [])
4450
4451
4452# _LT_PATH_LD_GNU
4453#- --------------
4454m4_defun([_LT_PATH_LD_GNU],
4455[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4456[# I'd rather use --version here, but apparently some GNU lds only accept -v.
4457case `$LD -v 2>&1 </dev/null` in
4458*GNU* | *'with BFD'*)
4459  lt_cv_prog_gnu_ld=yes
4460  ;;
4461*)
4462  lt_cv_prog_gnu_ld=no
4463  ;;
4464esac])
4465with_gnu_ld=$lt_cv_prog_gnu_ld
4466])# _LT_PATH_LD_GNU
4467
4468
4469# _LT_CMD_RELOAD
4470# --------------
4471# find reload flag for linker
4472#   -- PORTME Some linkers may need a different reload flag.
4473m4_defun([_LT_CMD_RELOAD],
4474[AC_CACHE_CHECK([for $LD option to reload object files],
4475  lt_cv_ld_reload_flag,
4476  [lt_cv_ld_reload_flag='-r'])
4477reload_flag=$lt_cv_ld_reload_flag
4478case $reload_flag in
4479"" | " "*) ;;
4480*) reload_flag=" $reload_flag" ;;
4481esac
4482reload_cmds='$LD$reload_flag -o $output$reload_objs'
4483case $host_os in
4484  darwin*)
4485    if test "$GCC" = yes; then
4486      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4487    else
4488      reload_cmds='$LD$reload_flag -o $output$reload_objs'
4489    fi
4490    ;;
4491esac
4492_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4493_LT_TAGDECL([], [reload_cmds], [2])dnl
4494])# _LT_CMD_RELOAD
4495
4496
4497# _LT_CHECK_MAGIC_METHOD
4498# ----------------------
4499# how to check for library dependencies
4500#  -- PORTME fill in with the dynamic library characteristics
4501m4_defun([_LT_CHECK_MAGIC_METHOD],
4502[m4_require([_LT_DECL_EGREP])
4503m4_require([_LT_DECL_OBJDUMP])
4504AC_CACHE_CHECK([how to recognize dependent libraries],
4505lt_cv_deplibs_check_method,
4506[lt_cv_file_magic_cmd='$MAGIC_CMD'
4507lt_cv_file_magic_test_file=
4508lt_cv_deplibs_check_method='unknown'
4509# Need to set the preceding variable on all platforms that support
4510# interlibrary dependencies.
4511# 'none' -- dependencies not supported.
4512# `unknown' -- same as none, but documents that we really don't know.
4513# 'pass_all' -- all dependencies passed with no checks.
4514# 'test_compile' -- check by making test program.
4515# 'file_magic [[regex]]' -- check by looking for files in library path
4516# which responds to the $file_magic_cmd with a given extended regex.
4517# If you have `file' or equivalent on your system and you're not sure
4518# whether `pass_all' will *always* work, you probably want this one.
4519
4520case $host_os in
4521aix[[4-9]]*)
4522  lt_cv_deplibs_check_method=pass_all
4523  ;;
4524
4525beos*)
4526  lt_cv_deplibs_check_method=pass_all
4527  ;;
4528
4529bsdi[[45]]*)
4530  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4531  lt_cv_file_magic_cmd='/usr/bin/file -L'
4532  lt_cv_file_magic_test_file=/shlib/libc.so
4533  ;;
4534
4535cygwin*)
4536  # func_win32_libid is a shell function defined in ltmain.sh
4537  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4538  lt_cv_file_magic_cmd='func_win32_libid'
4539  ;;
4540
4541mingw* | pw32*)
4542  # Base MSYS/MinGW do not provide the 'file' command needed by
4543  # func_win32_libid shell function, so use a weaker test based on 'objdump',
4544  # unless we find 'file', for example because we are cross-compiling.
4545  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4546  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4547    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4548    lt_cv_file_magic_cmd='func_win32_libid'
4549  else
4550    # Keep this pattern in sync with the one in func_win32_libid.
4551    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4552    lt_cv_file_magic_cmd='$OBJDUMP -f'
4553  fi
4554  ;;
4555
4556cegcc*)
4557  # use the weaker test based on 'objdump'. See mingw*.
4558  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4559  lt_cv_file_magic_cmd='$OBJDUMP -f'
4560  ;;
4561
4562darwin* | rhapsody*)
4563  lt_cv_deplibs_check_method=pass_all
4564  ;;
4565
4566freebsd* | dragonfly*)
4567  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4568    case $host_cpu in
4569    i*86 )
4570      # Not sure whether the presence of OpenBSD here was a mistake.
4571      # Let's accept both of them until this is cleared up.
4572      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4573      lt_cv_file_magic_cmd=/usr/bin/file
4574      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4575      ;;
4576    esac
4577  else
4578    lt_cv_deplibs_check_method=pass_all
4579  fi
4580  ;;
4581
4582gnu*)
4583  lt_cv_deplibs_check_method=pass_all
4584  ;;
4585
4586haiku*)
4587  lt_cv_deplibs_check_method=pass_all
4588  ;;
4589
4590hpux10.20* | hpux11*)
4591  lt_cv_file_magic_cmd=/usr/bin/file
4592  case $host_cpu in
4593  ia64*)
4594    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4595    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4596    ;;
4597  hppa*64*)
4598    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
4599    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4600    ;;
4601  *)
4602    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4603    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4604    ;;
4605  esac
4606  ;;
4607
4608interix[[3-9]]*)
4609  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4610  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4611  ;;
4612
4613irix5* | irix6* | nonstopux*)
4614  case $LD in
4615  *-32|*"-32 ") libmagic=32-bit;;
4616  *-n32|*"-n32 ") libmagic=N32;;
4617  *-64|*"-64 ") libmagic=64-bit;;
4618  *) libmagic=never-match;;
4619  esac
4620  lt_cv_deplibs_check_method=pass_all
4621  ;;
4622
4623# This must be Linux ELF.
4624linux* | k*bsd*-gnu | kopensolaris*-gnu)
4625  lt_cv_deplibs_check_method=pass_all
4626  ;;
4627
4628netbsd*)
4629  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4630    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4631  else
4632    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4633  fi
4634  ;;
4635
4636newos6*)
4637  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4638  lt_cv_file_magic_cmd=/usr/bin/file
4639  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4640  ;;
4641
4642*nto* | *qnx*)
4643  lt_cv_deplibs_check_method=pass_all
4644  ;;
4645
4646openbsd*)
4647  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4648    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4649  else
4650    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4651  fi
4652  ;;
4653
4654osf3* | osf4* | osf5*)
4655  lt_cv_deplibs_check_method=pass_all
4656  ;;
4657
4658rdos*)
4659  lt_cv_deplibs_check_method=pass_all
4660  ;;
4661
4662solaris*)
4663  lt_cv_deplibs_check_method=pass_all
4664  ;;
4665
4666sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4667  lt_cv_deplibs_check_method=pass_all
4668  ;;
4669
4670sysv4 | sysv4.3*)
4671  case $host_vendor in
4672  motorola)
4673    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]]'
4674    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4675    ;;
4676  ncr)
4677    lt_cv_deplibs_check_method=pass_all
4678    ;;
4679  sequent)
4680    lt_cv_file_magic_cmd='/bin/file'
4681    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4682    ;;
4683  sni)
4684    lt_cv_file_magic_cmd='/bin/file'
4685    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4686    lt_cv_file_magic_test_file=/lib/libc.so
4687    ;;
4688  siemens)
4689    lt_cv_deplibs_check_method=pass_all
4690    ;;
4691  pc)
4692    lt_cv_deplibs_check_method=pass_all
4693    ;;
4694  esac
4695  ;;
4696
4697tpf*)
4698  lt_cv_deplibs_check_method=pass_all
4699  ;;
4700esac
4701])
4702file_magic_cmd=$lt_cv_file_magic_cmd
4703deplibs_check_method=$lt_cv_deplibs_check_method
4704test -z "$deplibs_check_method" && deplibs_check_method=unknown
4705
4706_LT_DECL([], [deplibs_check_method], [1],
4707    [Method to check whether dependent libraries are shared objects])
4708_LT_DECL([], [file_magic_cmd], [1],
4709    [Command to use when deplibs_check_method == "file_magic"])
4710])# _LT_CHECK_MAGIC_METHOD
4711
4712
4713# LT_PATH_NM
4714# ----------
4715# find the pathname to a BSD- or MS-compatible name lister
4716AC_DEFUN([LT_PATH_NM],
4717[AC_REQUIRE([AC_PROG_CC])dnl
4718AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4719[if test -n "$NM"; then
4720  # Let the user override the test.
4721  lt_cv_path_NM="$NM"
4722else
4723  lt_nm_to_check="${ac_tool_prefix}nm"
4724  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4725    lt_nm_to_check="$lt_nm_to_check nm"
4726  fi
4727  for lt_tmp_nm in $lt_nm_to_check; do
4728    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4729    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4730      IFS="$lt_save_ifs"
4731      test -z "$ac_dir" && ac_dir=.
4732      tmp_nm="$ac_dir/$lt_tmp_nm"
4733      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4734	# Check to see if the nm accepts a BSD-compat flag.
4735	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4736	#   nm: unknown option "B" ignored
4737	# Tru64's nm complains that /dev/null is an invalid object file
4738	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4739	*/dev/null* | *'Invalid file or object type'*)
4740	  lt_cv_path_NM="$tmp_nm -B"
4741	  break
4742	  ;;
4743	*)
4744	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4745	  */dev/null*)
4746	    lt_cv_path_NM="$tmp_nm -p"
4747	    break
4748	    ;;
4749	  *)
4750	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4751	    continue # so that we can try to find one that supports BSD flags
4752	    ;;
4753	  esac
4754	  ;;
4755	esac
4756      fi
4757    done
4758    IFS="$lt_save_ifs"
4759  done
4760  : ${lt_cv_path_NM=no}
4761fi])
4762if test "$lt_cv_path_NM" != "no"; then
4763  NM="$lt_cv_path_NM"
4764else
4765  # Didn't find any BSD compatible name lister, look for dumpbin.
4766  if test -n "$DUMPBIN"; then :
4767    # Let the user override the test.
4768  else
4769    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4770    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4771    *COFF*)
4772      DUMPBIN="$DUMPBIN -symbols"
4773      ;;
4774    *)
4775      DUMPBIN=:
4776      ;;
4777    esac
4778  fi
4779  AC_SUBST([DUMPBIN])
4780  if test "$DUMPBIN" != ":"; then
4781    NM="$DUMPBIN"
4782  fi
4783fi
4784test -z "$NM" && NM=nm
4785AC_SUBST([NM])
4786_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4787
4788AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4789  [lt_cv_nm_interface="BSD nm"
4790  echo "int some_variable = 0;" > conftest.$ac_ext
4791  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4792  (eval "$ac_compile" 2>conftest.err)
4793  cat conftest.err >&AS_MESSAGE_LOG_FD
4794  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4795  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4796  cat conftest.err >&AS_MESSAGE_LOG_FD
4797  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4798  cat conftest.out >&AS_MESSAGE_LOG_FD
4799  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4800    lt_cv_nm_interface="MS dumpbin"
4801  fi
4802  rm -f conftest*])
4803])# LT_PATH_NM
4804
4805# Old names:
4806AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4807AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4808dnl aclocal-1.4 backwards compatibility:
4809dnl AC_DEFUN([AM_PROG_NM], [])
4810dnl AC_DEFUN([AC_PROG_NM], [])
4811
4812
4813# LT_LIB_M
4814# --------
4815# check for math library
4816AC_DEFUN([LT_LIB_M],
4817[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4818LIBM=
4819case $host in
4820*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4821  # These system don't have libm, or don't need it
4822  ;;
4823*-ncr-sysv4.3*)
4824  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4825  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4826  ;;
4827*)
4828  AC_CHECK_LIB(m, cos, LIBM="-lm")
4829  ;;
4830esac
4831AC_SUBST([LIBM])
4832])# LT_LIB_M
4833
4834# Old name:
4835AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4836dnl aclocal-1.4 backwards compatibility:
4837dnl AC_DEFUN([AC_CHECK_LIBM], [])
4838
4839
4840# _LT_COMPILER_NO_RTTI([TAGNAME])
4841# -------------------------------
4842m4_defun([_LT_COMPILER_NO_RTTI],
4843[m4_require([_LT_TAG_COMPILER])dnl
4844
4845_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4846
4847if test "$GCC" = yes; then
4848  case $cc_basename in
4849  nvcc*)
4850    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4851  *)
4852    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4853  esac
4854
4855  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4856    lt_cv_prog_compiler_rtti_exceptions,
4857    [-fno-rtti -fno-exceptions], [],
4858    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4859fi
4860_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4861	[Compiler flag to turn off builtin functions])
4862])# _LT_COMPILER_NO_RTTI
4863
4864
4865# _LT_CMD_GLOBAL_SYMBOLS
4866# ----------------------
4867m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4868[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4869AC_REQUIRE([AC_PROG_CC])dnl
4870AC_REQUIRE([AC_PROG_AWK])dnl
4871AC_REQUIRE([LT_PATH_NM])dnl
4872AC_REQUIRE([LT_PATH_LD])dnl
4873m4_require([_LT_DECL_SED])dnl
4874m4_require([_LT_DECL_EGREP])dnl
4875m4_require([_LT_TAG_COMPILER])dnl
4876
4877# Check for command to grab the raw symbol name followed by C symbol from nm.
4878AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4879AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4880[
4881# These are sane defaults that work on at least a few old systems.
4882# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4883
4884# Character class describing NM global symbol codes.
4885symcode='[[BCDEGRST]]'
4886
4887# Regexp to match symbols that can be accessed directly from C.
4888sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4889
4890# Define system-specific variables.
4891case $host_os in
4892aix*)
4893  symcode='[[BCDT]]'
4894  ;;
4895cygwin* | mingw* | pw32* | cegcc*)
4896  symcode='[[ABCDGISTW]]'
4897  ;;
4898hpux*)
4899  if test "$host_cpu" = ia64; then
4900    symcode='[[ABCDEGRST]]'
4901  fi
4902  ;;
4903irix* | nonstopux*)
4904  symcode='[[BCDEGRST]]'
4905  ;;
4906osf*)
4907  symcode='[[BCDEGQRST]]'
4908  ;;
4909solaris*)
4910  symcode='[[BDRT]]'
4911  ;;
4912sco3.2v5*)
4913  symcode='[[DT]]'
4914  ;;
4915sysv4.2uw2*)
4916  symcode='[[DT]]'
4917  ;;
4918sysv5* | sco5v6* | unixware* | OpenUNIX*)
4919  symcode='[[ABDT]]'
4920  ;;
4921sysv4)
4922  symcode='[[DFNSTU]]'
4923  ;;
4924esac
4925
4926# If we're using GNU nm, then use its standard symbol codes.
4927case `$NM -V 2>&1` in
4928*GNU* | *'with BFD'*)
4929  symcode='[[ABCDGIRSTW]]' ;;
4930esac
4931
4932# Transform an extracted symbol line into a proper C declaration.
4933# Some systems (esp. on ia64) link data and code symbols differently,
4934# so use this general approach.
4935lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4936
4937# Transform an extracted symbol line into symbol name and symbol address
4938lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4939lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
4940
4941# Handle CRLF in mingw tool chain
4942opt_cr=
4943case $build_os in
4944mingw*)
4945  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4946  ;;
4947esac
4948
4949# Try without a prefix underscore, then with it.
4950for ac_symprfx in "" "_"; do
4951
4952  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4953  symxfrm="\\1 $ac_symprfx\\2 \\2"
4954
4955  # Write the raw and C identifiers.
4956  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4957    # Fake it for dumpbin and say T for any non-static function
4958    # and D for any global variable.
4959    # Also find C++ and __fastcall symbols from MSVC++,
4960    # which start with @ or ?.
4961    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4962"     {last_section=section; section=\$ 3};"\
4963"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4964"     \$ 0!~/External *\|/{next};"\
4965"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4966"     {if(hide[section]) next};"\
4967"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4968"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4969"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4970"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4971"     ' prfx=^$ac_symprfx]"
4972  else
4973    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4974  fi
4975
4976  # Check to see that the pipe works correctly.
4977  pipe_works=no
4978
4979  rm -f conftest*
4980  cat > conftest.$ac_ext <<_LT_EOF
4981#ifdef __cplusplus
4982extern "C" {
4983#endif
4984char nm_test_var;
4985void nm_test_func(void);
4986void nm_test_func(void){}
4987#ifdef __cplusplus
4988}
4989#endif
4990int main(){nm_test_var='a';nm_test_func();return(0);}
4991_LT_EOF
4992
4993  if AC_TRY_EVAL(ac_compile); then
4994    # Now try to grab the symbols.
4995    nlist=conftest.nm
4996    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4997      # Try sorting and uniquifying the output.
4998      if sort "$nlist" | uniq > "$nlist"T; then
4999	mv -f "$nlist"T "$nlist"
5000      else
5001	rm -f "$nlist"T
5002      fi
5003
5004      # Make sure that we snagged all the symbols we need.
5005      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5006	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5007	  cat <<_LT_EOF > conftest.$ac_ext
5008#ifdef __cplusplus
5009extern "C" {
5010#endif
5011
5012_LT_EOF
5013	  # Now generate the symbol file.
5014	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5015
5016	  cat <<_LT_EOF >> conftest.$ac_ext
5017
5018/* The mapping between symbol names and symbols.  */
5019const struct {
5020  const char *name;
5021  void       *address;
5022}
5023lt__PROGRAM__LTX_preloaded_symbols[[]] =
5024{
5025  { "@PROGRAM@", (void *) 0 },
5026_LT_EOF
5027	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5028	  cat <<\_LT_EOF >> conftest.$ac_ext
5029  {0, (void *) 0}
5030};
5031
5032/* This works around a problem in FreeBSD linker */
5033#ifdef FREEBSD_WORKAROUND
5034static const void *lt_preloaded_setup() {
5035  return lt__PROGRAM__LTX_preloaded_symbols;
5036}
5037#endif
5038
5039#ifdef __cplusplus
5040}
5041#endif
5042_LT_EOF
5043	  # Now try linking the two files.
5044	  mv conftest.$ac_objext conftstm.$ac_objext
5045	  lt_save_LIBS="$LIBS"
5046	  lt_save_CFLAGS="$CFLAGS"
5047	  LIBS="conftstm.$ac_objext"
5048	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5049	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5050	    pipe_works=yes
5051	  fi
5052	  LIBS="$lt_save_LIBS"
5053	  CFLAGS="$lt_save_CFLAGS"
5054	else
5055	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5056	fi
5057      else
5058	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5059      fi
5060    else
5061      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5062    fi
5063  else
5064    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5065    cat conftest.$ac_ext >&5
5066  fi
5067  rm -rf conftest* conftst*
5068
5069  # Do not use the global_symbol_pipe unless it works.
5070  if test "$pipe_works" = yes; then
5071    break
5072  else
5073    lt_cv_sys_global_symbol_pipe=
5074  fi
5075done
5076])
5077if test -z "$lt_cv_sys_global_symbol_pipe"; then
5078  lt_cv_sys_global_symbol_to_cdecl=
5079fi
5080if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5081  AC_MSG_RESULT(failed)
5082else
5083  AC_MSG_RESULT(ok)
5084fi
5085
5086_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5087    [Take the output of nm and produce a listing of raw symbols and C names])
5088_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5089    [Transform the output of nm in a proper C declaration])
5090_LT_DECL([global_symbol_to_c_name_address],
5091    [lt_cv_sys_global_symbol_to_c_name_address], [1],
5092    [Transform the output of nm in a C name address pair])
5093_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5094    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5095    [Transform the output of nm in a C name address pair when lib prefix is needed])
5096]) # _LT_CMD_GLOBAL_SYMBOLS
5097
5098
5099# _LT_COMPILER_PIC([TAGNAME])
5100# ---------------------------
5101m4_defun([_LT_COMPILER_PIC],
5102[m4_require([_LT_TAG_COMPILER])dnl
5103_LT_TAGVAR(lt_prog_compiler_wl, $1)=
5104_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5105_LT_TAGVAR(lt_prog_compiler_static, $1)=
5106
5107AC_MSG_CHECKING([for $compiler option to produce PIC])
5108m4_if([$1], [CXX], [
5109  # C++ specific cases for pic, static, wl, etc.
5110  if test "$GXX" = yes; then
5111    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5112    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5113
5114    case $host_os in
5115    aix*)
5116      # All AIX code is PIC.
5117      if test "$host_cpu" = ia64; then
5118	# AIX 5 now supports IA64 processor
5119	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5120      fi
5121      ;;
5122
5123    amigaos*)
5124      case $host_cpu in
5125      powerpc)
5126            # see comment about AmigaOS4 .so support
5127            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5128        ;;
5129      m68k)
5130            # FIXME: we need at least 68020 code to build shared libraries, but
5131            # adding the `-m68020' flag to GCC prevents building anything better,
5132            # like `-m68040'.
5133            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5134        ;;
5135      esac
5136      ;;
5137
5138    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5139      # PIC is the default for these OSes.
5140      ;;
5141    mingw* | cygwin* | os2* | pw32* | cegcc*)
5142      # This hack is so that the source file can tell whether it is being
5143      # built for inclusion in a dll (and should export symbols for example).
5144      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5145      # (--disable-auto-import) libraries
5146      m4_if([$1], [GCJ], [],
5147	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5148      ;;
5149    darwin* | rhapsody*)
5150      # PIC is the default on this platform
5151      # Common symbols not allowed in MH_DYLIB files
5152      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5153      ;;
5154    *djgpp*)
5155      # DJGPP does not support shared libraries at all
5156      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5157      ;;
5158    haiku*)
5159      # PIC is the default for Haiku.
5160      # The "-static" flag exists, but is broken.
5161      _LT_TAGVAR(lt_prog_compiler_static, $1)=
5162      ;;
5163    interix[[3-9]]*)
5164      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5165      # Instead, we relocate shared libraries at runtime.
5166      ;;
5167    sysv4*MP*)
5168      if test -d /usr/nec; then
5169	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5170      fi
5171      ;;
5172    hpux*)
5173      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5174      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5175      # sets the default TLS model and affects inlining.
5176      case $host_cpu in
5177      hppa*64*)
5178	;;
5179      *)
5180	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5181	;;
5182      esac
5183      ;;
5184    *qnx* | *nto*)
5185      # QNX uses GNU C++, but need to define -shared option too, otherwise
5186      # it will coredump.
5187      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5188      ;;
5189    *)
5190      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5191      ;;
5192    esac
5193  else
5194    case $host_os in
5195      aix[[4-9]]*)
5196	# All AIX code is PIC.
5197	if test "$host_cpu" = ia64; then
5198	  # AIX 5 now supports IA64 processor
5199	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5200	else
5201	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5202	fi
5203	;;
5204      chorus*)
5205	case $cc_basename in
5206	cxch68*)
5207	  # Green Hills C++ Compiler
5208	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5209	  ;;
5210	esac
5211	;;
5212      dgux*)
5213	case $cc_basename in
5214	  ec++*)
5215	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5216	    ;;
5217	  ghcx*)
5218	    # Green Hills C++ Compiler
5219	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5220	    ;;
5221	  *)
5222	    ;;
5223	esac
5224	;;
5225      freebsd* | dragonfly*)
5226	# FreeBSD uses GNU C++
5227	;;
5228      hpux9* | hpux10* | hpux11*)
5229	case $cc_basename in
5230	  CC*)
5231	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5232	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5233	    if test "$host_cpu" != ia64; then
5234	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5235	    fi
5236	    ;;
5237	  aCC*)
5238	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5239	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5240	    case $host_cpu in
5241	    hppa*64*|ia64*)
5242	      # +Z the default
5243	      ;;
5244	    *)
5245	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5246	      ;;
5247	    esac
5248	    ;;
5249	  *)
5250	    ;;
5251	esac
5252	;;
5253      interix*)
5254	# This is c89, which is MS Visual C++ (no shared libs)
5255	# Anyone wants to do a port?
5256	;;
5257      irix5* | irix6* | nonstopux*)
5258	case $cc_basename in
5259	  CC*)
5260	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5261	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5262	    # CC pic flag -KPIC is the default.
5263	    ;;
5264	  *)
5265	    ;;
5266	esac
5267	;;
5268      linux* | k*bsd*-gnu | kopensolaris*-gnu)
5269	case $cc_basename in
5270	  KCC*)
5271	    # KAI C++ Compiler
5272	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5273	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5274	    ;;
5275	  ecpc* )
5276	    # old Intel C++ for x86_64 which still supported -KPIC.
5277	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5278	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5279	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5280	    ;;
5281	  icpc* )
5282	    # Intel C++, used to be incompatible with GCC.
5283	    # ICC 10 doesn't accept -KPIC any more.
5284	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5285	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5286	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5287	    ;;
5288	  pgCC* | pgcpp*)
5289	    # Portland Group C++ compiler
5290	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5291	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5292	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5293	    ;;
5294	  cxx*)
5295	    # Compaq C++
5296	    # Make sure the PIC flag is empty.  It appears that all Alpha
5297	    # Linux and Compaq Tru64 Unix objects are PIC.
5298	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5299	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5300	    ;;
5301	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5302	    # IBM XL 8.0, 9.0 on PPC and BlueGene
5303	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5304	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5305	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5306	    ;;
5307	  *)
5308	    case `$CC -V 2>&1 | sed 5q` in
5309	    *Sun\ C*)
5310	      # Sun C++ 5.9
5311	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5312	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5313	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5314	      ;;
5315	    esac
5316	    ;;
5317	esac
5318	;;
5319      lynxos*)
5320	;;
5321      m88k*)
5322	;;
5323      mvs*)
5324	case $cc_basename in
5325	  cxx*)
5326	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5327	    ;;
5328	  *)
5329	    ;;
5330	esac
5331	;;
5332      netbsd*)
5333	;;
5334      *qnx* | *nto*)
5335        # QNX uses GNU C++, but need to define -shared option too, otherwise
5336        # it will coredump.
5337        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5338        ;;
5339      osf3* | osf4* | osf5*)
5340	case $cc_basename in
5341	  KCC*)
5342	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5343	    ;;
5344	  RCC*)
5345	    # Rational C++ 2.4.1
5346	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5347	    ;;
5348	  cxx*)
5349	    # Digital/Compaq C++
5350	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5351	    # Make sure the PIC flag is empty.  It appears that all Alpha
5352	    # Linux and Compaq Tru64 Unix objects are PIC.
5353	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5354	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5355	    ;;
5356	  *)
5357	    ;;
5358	esac
5359	;;
5360      psos*)
5361	;;
5362      solaris*)
5363	case $cc_basename in
5364	  CC* | sunCC*)
5365	    # Sun C++ 4.2, 5.x and Centerline C++
5366	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5367	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5368	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5369	    ;;
5370	  gcx*)
5371	    # Green Hills C++ Compiler
5372	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5373	    ;;
5374	  *)
5375	    ;;
5376	esac
5377	;;
5378      sunos4*)
5379	case $cc_basename in
5380	  CC*)
5381	    # Sun C++ 4.x
5382	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5383	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5384	    ;;
5385	  lcc*)
5386	    # Lucid
5387	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5388	    ;;
5389	  *)
5390	    ;;
5391	esac
5392	;;
5393      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5394	case $cc_basename in
5395	  CC*)
5396	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5397	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5398	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5399	    ;;
5400	esac
5401	;;
5402      tandem*)
5403	case $cc_basename in
5404	  NCC*)
5405	    # NonStop-UX NCC 3.20
5406	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5407	    ;;
5408	  *)
5409	    ;;
5410	esac
5411	;;
5412      vxworks*)
5413	;;
5414      *)
5415	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5416	;;
5417    esac
5418  fi
5419],
5420[
5421  if test "$GCC" = yes; then
5422    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5423    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5424
5425    case $host_os in
5426      aix*)
5427      # All AIX code is PIC.
5428      if test "$host_cpu" = ia64; then
5429	# AIX 5 now supports IA64 processor
5430	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5431      fi
5432      ;;
5433
5434    amigaos*)
5435      case $host_cpu in
5436      powerpc)
5437            # see comment about AmigaOS4 .so support
5438            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5439        ;;
5440      m68k)
5441            # FIXME: we need at least 68020 code to build shared libraries, but
5442            # adding the `-m68020' flag to GCC prevents building anything better,
5443            # like `-m68040'.
5444            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5445        ;;
5446      esac
5447      ;;
5448
5449    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5450      # PIC is the default for these OSes.
5451      ;;
5452
5453    mingw* | cygwin* | pw32* | os2* | cegcc*)
5454      # This hack is so that the source file can tell whether it is being
5455      # built for inclusion in a dll (and should export symbols for example).
5456      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5457      # (--disable-auto-import) libraries
5458      m4_if([$1], [GCJ], [],
5459	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5460      ;;
5461
5462    darwin* | rhapsody*)
5463      # PIC is the default on this platform
5464      # Common symbols not allowed in MH_DYLIB files
5465      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5466      ;;
5467
5468    haiku*)
5469      # PIC is the default for Haiku.
5470      # The "-static" flag exists, but is broken.
5471      _LT_TAGVAR(lt_prog_compiler_static, $1)=
5472      ;;
5473
5474    hpux*)
5475      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5476      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5477      # sets the default TLS model and affects inlining.
5478      case $host_cpu in
5479      hppa*64*)
5480	# +Z the default
5481	;;
5482      *)
5483	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5484	;;
5485      esac
5486      ;;
5487
5488    interix[[3-9]]*)
5489      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5490      # Instead, we relocate shared libraries at runtime.
5491      ;;
5492
5493    msdosdjgpp*)
5494      # Just because we use GCC doesn't mean we suddenly get shared libraries
5495      # on systems that don't support them.
5496      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5497      enable_shared=no
5498      ;;
5499
5500    *nto* | *qnx*)
5501      # QNX uses GNU C++, but need to define -shared option too, otherwise
5502      # it will coredump.
5503      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5504      ;;
5505
5506    sysv4*MP*)
5507      if test -d /usr/nec; then
5508	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5509      fi
5510      ;;
5511
5512    *)
5513      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5514      ;;
5515    esac
5516
5517    case $cc_basename in
5518    nvcc*) # Cuda Compiler Driver 2.2
5519      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5520      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
5521      ;;
5522    esac
5523  else
5524    # PORTME Check for flag to pass linker flags through the system compiler.
5525    case $host_os in
5526    aix*)
5527      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5528      if test "$host_cpu" = ia64; then
5529	# AIX 5 now supports IA64 processor
5530	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5531      else
5532	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5533      fi
5534      ;;
5535
5536    mingw* | cygwin* | pw32* | os2* | cegcc*)
5537      # This hack is so that the source file can tell whether it is being
5538      # built for inclusion in a dll (and should export symbols for example).
5539      m4_if([$1], [GCJ], [],
5540	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5541      ;;
5542
5543    hpux9* | hpux10* | hpux11*)
5544      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5545      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5546      # not for PA HP-UX.
5547      case $host_cpu in
5548      hppa*64*|ia64*)
5549	# +Z the default
5550	;;
5551      *)
5552	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5553	;;
5554      esac
5555      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5556      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5557      ;;
5558
5559    irix5* | irix6* | nonstopux*)
5560      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5561      # PIC (with -KPIC) is the default.
5562      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5563      ;;
5564
5565    linux* | k*bsd*-gnu | kopensolaris*-gnu)
5566      case $cc_basename in
5567      # old Intel for x86_64 which still supported -KPIC.
5568      ecc*)
5569	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5570	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5571	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5572        ;;
5573      # icc used to be incompatible with GCC.
5574      # ICC 10 doesn't accept -KPIC any more.
5575      icc* | ifort*)
5576	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5577	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5578	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5579        ;;
5580      # Lahey Fortran 8.1.
5581      lf95*)
5582	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5583	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5584	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5585	;;
5586      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5587        # Portland Group compilers (*not* the Pentium gcc compiler,
5588	# which looks to be a dead project)
5589	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5590	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5591	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5592        ;;
5593      ccc*)
5594        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5595        # All Alpha code is PIC.
5596        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5597        ;;
5598      xl* | bgxl* | bgf* | mpixl*)
5599	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5600	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5601	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5602	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5603	;;
5604      *)
5605	case `$CC -V 2>&1 | sed 5q` in
5606	*Sun\ F* | *Sun*Fortran*)
5607	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5608	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5609	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5610	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5611	  ;;
5612	*Sun\ C*)
5613	  # Sun C 5.9
5614	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5615	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5616	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5617	  ;;
5618	esac
5619	;;
5620      esac
5621      ;;
5622
5623    newsos6)
5624      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5625      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5626      ;;
5627
5628    *nto* | *qnx*)
5629      # QNX uses GNU C++, but need to define -shared option too, otherwise
5630      # it will coredump.
5631      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5632      ;;
5633
5634    osf3* | osf4* | osf5*)
5635      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5636      # All OSF/1 code is PIC.
5637      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5638      ;;
5639
5640    rdos*)
5641      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5642      ;;
5643
5644    solaris*)
5645      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5646      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5647      case $cc_basename in
5648      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5649	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5650      *)
5651	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5652      esac
5653      ;;
5654
5655    sunos4*)
5656      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5657      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5658      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5659      ;;
5660
5661    sysv4 | sysv4.2uw2* | sysv4.3*)
5662      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5663      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5664      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5665      ;;
5666
5667    sysv4*MP*)
5668      if test -d /usr/nec ;then
5669	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5670	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5671      fi
5672      ;;
5673
5674    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5675      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5676      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5677      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5678      ;;
5679
5680    unicos*)
5681      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5682      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5683      ;;
5684
5685    uts4*)
5686      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5687      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5688      ;;
5689
5690    *)
5691      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5692      ;;
5693    esac
5694  fi
5695])
5696case $host_os in
5697  # For platforms which do not support PIC, -DPIC is meaningless:
5698  *djgpp*)
5699    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5700    ;;
5701  *)
5702    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5703    ;;
5704esac
5705AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5706_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5707	[How to pass a linker flag through the compiler])
5708
5709#
5710# Check to make sure the PIC flag actually works.
5711#
5712if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5713  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5714    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5715    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5716    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5717     "" | " "*) ;;
5718     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5719     esac],
5720    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5721     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5722fi
5723_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5724	[Additional compiler flags for building library objects])
5725
5726#
5727# Check to make sure the static flag actually works.
5728#
5729wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5730_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5731  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5732  $lt_tmp_static_flag,
5733  [],
5734  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5735_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5736	[Compiler flag to prevent dynamic linking])
5737])# _LT_COMPILER_PIC
5738
5739
5740# _LT_LINKER_SHLIBS([TAGNAME])
5741# ----------------------------
5742# See if the linker supports building shared libraries.
5743m4_defun([_LT_LINKER_SHLIBS],
5744[AC_REQUIRE([LT_PATH_LD])dnl
5745AC_REQUIRE([LT_PATH_NM])dnl
5746m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5747m4_require([_LT_DECL_EGREP])dnl
5748m4_require([_LT_DECL_SED])dnl
5749m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5750m4_require([_LT_TAG_COMPILER])dnl
5751AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5752m4_if([$1], [CXX], [
5753  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5754  case $host_os in
5755  aix[[4-9]]*)
5756    # If we're using GNU nm, then we don't want the "-C" option.
5757    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5758    # Also, AIX nm treats weak defined symbols like other global defined
5759    # symbols, whereas GNU nm marks them as "W".
5760    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5761      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5762    else
5763      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5764    fi
5765    ;;
5766  pw32*)
5767    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5768  ;;
5769  cygwin* | mingw* | cegcc*)
5770    _LT_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'
5771  ;;
5772  *)
5773    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5774  ;;
5775  esac
5776  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5777], [
5778  runpath_var=
5779  _LT_TAGVAR(allow_undefined_flag, $1)=
5780  _LT_TAGVAR(always_export_symbols, $1)=no
5781  _LT_TAGVAR(archive_cmds, $1)=
5782  _LT_TAGVAR(archive_expsym_cmds, $1)=
5783  _LT_TAGVAR(compiler_needs_object, $1)=no
5784  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5785  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5786  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5787  _LT_TAGVAR(hardcode_automatic, $1)=no
5788  _LT_TAGVAR(hardcode_direct, $1)=no
5789  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5790  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5791  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5792  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5793  _LT_TAGVAR(hardcode_minus_L, $1)=no
5794  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5795  _LT_TAGVAR(inherit_rpath, $1)=no
5796  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5797  _LT_TAGVAR(module_cmds, $1)=
5798  _LT_TAGVAR(module_expsym_cmds, $1)=
5799  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5800  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5801  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5802  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5803  # include_expsyms should be a list of space-separated symbols to be *always*
5804  # included in the symbol list
5805  _LT_TAGVAR(include_expsyms, $1)=
5806  # exclude_expsyms can be an extended regexp of symbols to exclude
5807  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5808  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5809  # as well as any symbol that contains `d'.
5810  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5811  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5812  # platforms (ab)use it in PIC code, but their linkers get confused if
5813  # the symbol is explicitly referenced.  Since portable code cannot
5814  # rely on this symbol name, it's probably fine to never include it in
5815  # preloaded symbol tables.
5816  # Exclude shared library initialization/finalization symbols.
5817dnl Note also adjust exclude_expsyms for C++ above.
5818  extract_expsyms_cmds=
5819
5820  case $host_os in
5821  cygwin* | mingw* | pw32* | cegcc*)
5822    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5823    # When not using gcc, we currently assume that we are using
5824    # Microsoft Visual C++.
5825    if test "$GCC" != yes; then
5826      with_gnu_ld=no
5827    fi
5828    ;;
5829  interix*)
5830    # we just hope/assume this is gcc and not c89 (= MSVC++)
5831    with_gnu_ld=yes
5832    ;;
5833  openbsd*)
5834    with_gnu_ld=no
5835    ;;
5836  esac
5837
5838  _LT_TAGVAR(ld_shlibs, $1)=yes
5839
5840  # On some targets, GNU ld is compatible enough with the native linker
5841  # that we're better off using the native interface for both.
5842  lt_use_gnu_ld_interface=no
5843  if test "$with_gnu_ld" = yes; then
5844    case $host_os in
5845      aix*)
5846	# The AIX port of GNU ld has always aspired to compatibility
5847	# with the native linker.  However, as the warning in the GNU ld
5848	# block says, versions before 2.19.5* couldn't really create working
5849	# shared libraries, regardless of the interface used.
5850	case `$LD -v 2>&1` in
5851	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5852	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5853	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5854	  *)
5855	    lt_use_gnu_ld_interface=yes
5856	    ;;
5857	esac
5858	;;
5859      *)
5860	lt_use_gnu_ld_interface=yes
5861	;;
5862    esac
5863  fi
5864
5865  if test "$lt_use_gnu_ld_interface" = yes; then
5866    # If archive_cmds runs LD, not CC, wlarc should be empty
5867    wlarc='${wl}'
5868
5869    # Set some defaults for GNU ld with shared library support. These
5870    # are reset later if shared libraries are not supported. Putting them
5871    # here allows them to be overridden if necessary.
5872    runpath_var=LD_RUN_PATH
5873    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5874    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5875    # ancient GNU ld didn't support --whole-archive et. al.
5876    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5877      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5878    else
5879      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5880    fi
5881    supports_anon_versioning=no
5882    case `$LD -v 2>&1` in
5883      *GNU\ gold*) supports_anon_versioning=yes ;;
5884      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5885      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5886      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5887      *\ 2.11.*) ;; # other 2.11 versions
5888      *) supports_anon_versioning=yes ;;
5889    esac
5890
5891    # See if GNU ld supports shared libraries.
5892    case $host_os in
5893    aix[[3-9]]*)
5894      # On AIX/PPC, the GNU linker is very broken
5895      if test "$host_cpu" != ia64; then
5896	_LT_TAGVAR(ld_shlibs, $1)=no
5897	cat <<_LT_EOF 1>&2
5898
5899*** Warning: the GNU linker, at least up to release 2.19, is reported
5900*** to be unable to reliably create shared libraries on AIX.
5901*** Therefore, libtool is disabling shared libraries support.  If you
5902*** really care for shared libraries, you may want to install binutils
5903*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5904*** You will then need to restart the configuration process.
5905
5906_LT_EOF
5907      fi
5908      ;;
5909
5910    amigaos*)
5911      case $host_cpu in
5912      powerpc)
5913            # see comment about AmigaOS4 .so support
5914            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5915            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5916        ;;
5917      m68k)
5918            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5919            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5920            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5921        ;;
5922      esac
5923      ;;
5924
5925    beos*)
5926      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5927	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5928	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5929	# support --undefined.  This deserves some investigation.  FIXME
5930	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5931      else
5932	_LT_TAGVAR(ld_shlibs, $1)=no
5933      fi
5934      ;;
5935
5936    cygwin* | mingw* | pw32* | cegcc*)
5937      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5938      # as there is no search path for DLLs.
5939      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5940      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5941      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5942      _LT_TAGVAR(always_export_symbols, $1)=no
5943      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5944      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5945
5946      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5947        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5948	# If the export-symbols file already is a .def file (1st line
5949	# is EXPORTS), use it as is; otherwise, prepend...
5950	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5951	  cp $export_symbols $output_objdir/$soname.def;
5952	else
5953	  echo EXPORTS > $output_objdir/$soname.def;
5954	  cat $export_symbols >> $output_objdir/$soname.def;
5955	fi~
5956	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5957      else
5958	_LT_TAGVAR(ld_shlibs, $1)=no
5959      fi
5960      ;;
5961
5962    haiku*)
5963      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5964      _LT_TAGVAR(link_all_deplibs, $1)=yes
5965      ;;
5966
5967    interix[[3-9]]*)
5968      _LT_TAGVAR(hardcode_direct, $1)=no
5969      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5970      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5971      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5972      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5973      # Instead, shared libraries are loaded at an image base (0x10000000 by
5974      # default) and relocated if they conflict, which is a slow very memory
5975      # consuming and fragmenting process.  To avoid this, we pick a random,
5976      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5977      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5978      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5979      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5980      ;;
5981
5982    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5983      tmp_diet=no
5984      if test "$host_os" = linux-dietlibc; then
5985	case $cc_basename in
5986	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5987	esac
5988      fi
5989      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5990	 && test "$tmp_diet" = no
5991      then
5992	tmp_addflag=
5993	tmp_sharedflag='-shared'
5994	case $cc_basename,$host_cpu in
5995        pgcc*)				# Portland Group C compiler
5996	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5997	  tmp_addflag=' $pic_flag'
5998	  ;;
5999	pgf77* | pgf90* | pgf95* | pgfortran*)
6000					# Portland Group f77 and f90 compilers
6001	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6002	  tmp_addflag=' $pic_flag -Mnomain' ;;
6003	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
6004	  tmp_addflag=' -i_dynamic' ;;
6005	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
6006	  tmp_addflag=' -i_dynamic -nofor_main' ;;
6007	ifc* | ifort*)			# Intel Fortran compiler
6008	  tmp_addflag=' -nofor_main' ;;
6009	lf95*)				# Lahey Fortran 8.1
6010	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6011	  tmp_sharedflag='--shared' ;;
6012	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6013	  tmp_sharedflag='-qmkshrobj'
6014	  tmp_addflag= ;;
6015	nvcc*)	# Cuda Compiler Driver 2.2
6016	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6017	  _LT_TAGVAR(compiler_needs_object, $1)=yes
6018	  ;;
6019	esac
6020	case `$CC -V 2>&1 | sed 5q` in
6021	*Sun\ C*)			# Sun C 5.9
6022	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6023	  _LT_TAGVAR(compiler_needs_object, $1)=yes
6024	  tmp_sharedflag='-G' ;;
6025	*Sun\ F*)			# Sun Fortran 8.3
6026	  tmp_sharedflag='-G' ;;
6027	esac
6028	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6029
6030        if test "x$supports_anon_versioning" = xyes; then
6031          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6032	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6033	    echo "local: *; };" >> $output_objdir/$libname.ver~
6034	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6035        fi
6036
6037	case $cc_basename in
6038	xlf* | bgf* | bgxlf* | mpixlf*)
6039	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6040	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6041	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6042	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6043	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
6044	  if test "x$supports_anon_versioning" = xyes; then
6045	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6046	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6047	      echo "local: *; };" >> $output_objdir/$libname.ver~
6048	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6049	  fi
6050	  ;;
6051	esac
6052      else
6053        _LT_TAGVAR(ld_shlibs, $1)=no
6054      fi
6055      ;;
6056
6057    netbsd*)
6058      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6059	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6060	wlarc=
6061      else
6062	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6063	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6064      fi
6065      ;;
6066
6067    solaris*)
6068      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6069	_LT_TAGVAR(ld_shlibs, $1)=no
6070	cat <<_LT_EOF 1>&2
6071
6072*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6073*** create shared libraries on Solaris systems.  Therefore, libtool
6074*** is disabling shared libraries support.  We urge you to upgrade GNU
6075*** binutils to release 2.9.1 or newer.  Another option is to modify
6076*** your PATH or compiler configuration so that the native linker is
6077*** used, and then restart.
6078
6079_LT_EOF
6080      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6081	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6082	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6083      else
6084	_LT_TAGVAR(ld_shlibs, $1)=no
6085      fi
6086      ;;
6087
6088    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6089      case `$LD -v 2>&1` in
6090        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6091	_LT_TAGVAR(ld_shlibs, $1)=no
6092	cat <<_LT_EOF 1>&2
6093
6094*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6095*** reliably create shared libraries on SCO systems.  Therefore, libtool
6096*** is disabling shared libraries support.  We urge you to upgrade GNU
6097*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6098*** your PATH or compiler configuration so that the native linker is
6099*** used, and then restart.
6100
6101_LT_EOF
6102	;;
6103	*)
6104	  # For security reasons, it is highly recommended that you always
6105	  # use absolute paths for naming shared libraries, and exclude the
6106	  # DT_RUNPATH tag from executables and libraries.  But doing so
6107	  # requires that you compile everything twice, which is a pain.
6108	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6109	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6110	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6111	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6112	  else
6113	    _LT_TAGVAR(ld_shlibs, $1)=no
6114	  fi
6115	;;
6116      esac
6117      ;;
6118
6119    sunos4*)
6120      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6121      wlarc=
6122      _LT_TAGVAR(hardcode_direct, $1)=yes
6123      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6124      ;;
6125
6126    *)
6127      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6128	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6129	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6130      else
6131	_LT_TAGVAR(ld_shlibs, $1)=no
6132      fi
6133      ;;
6134    esac
6135
6136    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6137      runpath_var=
6138      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6139      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6140      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6141    fi
6142  else
6143    # PORTME fill in a description of your system's linker (not GNU ld)
6144    case $host_os in
6145    aix3*)
6146      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6147      _LT_TAGVAR(always_export_symbols, $1)=yes
6148      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6149      # Note: this linker hardcodes the directories in LIBPATH if there
6150      # are no directories specified by -L.
6151      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6152      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6153	# Neither direct hardcoding nor static linking is supported with a
6154	# broken collect2.
6155	_LT_TAGVAR(hardcode_direct, $1)=unsupported
6156      fi
6157      ;;
6158
6159    aix[[4-9]]*)
6160      if test "$host_cpu" = ia64; then
6161	# On IA64, the linker does run time linking by default, so we don't
6162	# have to do anything special.
6163	aix_use_runtimelinking=no
6164	exp_sym_flag='-Bexport'
6165	no_entry_flag=""
6166      else
6167	# If we're using GNU nm, then we don't want the "-C" option.
6168	# -C means demangle to AIX nm, but means don't demangle with GNU nm
6169	# Also, AIX nm treats weak defined symbols like other global
6170	# defined symbols, whereas GNU nm marks them as "W".
6171	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6172	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6173	else
6174	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6175	fi
6176	aix_use_runtimelinking=no
6177
6178	# Test if we are trying to use run time linking or normal
6179	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6180	# need to do runtime linking.
6181	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6182	  for ld_flag in $LDFLAGS; do
6183	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6184	    aix_use_runtimelinking=yes
6185	    break
6186	  fi
6187	  done
6188	  ;;
6189	esac
6190
6191	exp_sym_flag='-bexport'
6192	no_entry_flag='-bnoentry'
6193      fi
6194
6195      # When large executables or shared objects are built, AIX ld can
6196      # have problems creating the table of contents.  If linking a library
6197      # or program results in "error TOC overflow" add -mminimal-toc to
6198      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6199      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6200
6201      _LT_TAGVAR(archive_cmds, $1)=''
6202      _LT_TAGVAR(hardcode_direct, $1)=yes
6203      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6204      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6205      _LT_TAGVAR(link_all_deplibs, $1)=yes
6206      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6207
6208      if test "$GCC" = yes; then
6209	case $host_os in aix4.[[012]]|aix4.[[012]].*)
6210	# We only want to do this on AIX 4.2 and lower, the check
6211	# below for broken collect2 doesn't work under 4.3+
6212	  collect2name=`${CC} -print-prog-name=collect2`
6213	  if test -f "$collect2name" &&
6214	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6215	  then
6216	  # We have reworked collect2
6217	  :
6218	  else
6219	  # We have old collect2
6220	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
6221	  # It fails to find uninstalled libraries when the uninstalled
6222	  # path is not listed in the libpath.  Setting hardcode_minus_L
6223	  # to unsupported forces relinking
6224	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6225	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6226	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
6227	  fi
6228	  ;;
6229	esac
6230	shared_flag='-shared'
6231	if test "$aix_use_runtimelinking" = yes; then
6232	  shared_flag="$shared_flag "'${wl}-G'
6233	fi
6234      else
6235	# not using gcc
6236	if test "$host_cpu" = ia64; then
6237	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6238	# chokes on -Wl,-G. The following line is correct:
6239	  shared_flag='-G'
6240	else
6241	  if test "$aix_use_runtimelinking" = yes; then
6242	    shared_flag='${wl}-G'
6243	  else
6244	    shared_flag='${wl}-bM:SRE'
6245	  fi
6246	fi
6247      fi
6248
6249      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6250      # It seems that -bexpall does not export symbols beginning with
6251      # underscore (_), so it is better to generate a list of symbols to export.
6252      _LT_TAGVAR(always_export_symbols, $1)=yes
6253      if test "$aix_use_runtimelinking" = yes; then
6254	# Warning - without using the other runtime loading flags (-brtl),
6255	# -berok will link without error, but may produce a broken library.
6256	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6257        # Determine the default libpath from the value encoded in an
6258        # empty executable.
6259        _LT_SYS_MODULE_PATH_AIX
6260        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6261        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6262      else
6263	if test "$host_cpu" = ia64; then
6264	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6265	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6266	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6267	else
6268	 # Determine the default libpath from the value encoded in an
6269	 # empty executable.
6270	 _LT_SYS_MODULE_PATH_AIX
6271	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6272	  # Warning - without using the other run time loading flags,
6273	  # -berok will link without error, but may produce a broken library.
6274	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6275	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6276	  if test "$with_gnu_ld" = yes; then
6277	    # We only use this code for GNU lds that support --whole-archive.
6278	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6279	  else
6280	    # Exported symbols can be pulled into shared objects from archives
6281	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6282	  fi
6283	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6284	  # This is similar to how AIX traditionally builds its shared libraries.
6285	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6286	fi
6287      fi
6288      ;;
6289
6290    amigaos*)
6291      case $host_cpu in
6292      powerpc)
6293            # see comment about AmigaOS4 .so support
6294            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6295            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6296        ;;
6297      m68k)
6298            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6299            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6300            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6301        ;;
6302      esac
6303      ;;
6304
6305    bsdi[[45]]*)
6306      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6307      ;;
6308
6309    cygwin* | mingw* | pw32* | cegcc*)
6310      # When not using gcc, we currently assume that we are using
6311      # Microsoft Visual C++.
6312      # hardcode_libdir_flag_spec is actually meaningless, as there is
6313      # no search path for DLLs.
6314      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6315      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6316      # Tell ltmain to make .lib files, not .a files.
6317      libext=lib
6318      # Tell ltmain to make .dll files, not .so files.
6319      shrext_cmds=".dll"
6320      # FIXME: Setting linknames here is a bad hack.
6321      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6322      # The linker will automatically build a .lib file if we build a DLL.
6323      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6324      # FIXME: Should let the user specify the lib program.
6325      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6326      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6327      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6328      ;;
6329
6330    darwin* | rhapsody*)
6331      _LT_DARWIN_LINKER_FEATURES($1)
6332      ;;
6333
6334    dgux*)
6335      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6336      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6337      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6338      ;;
6339
6340    freebsd1*)
6341      _LT_TAGVAR(ld_shlibs, $1)=no
6342      ;;
6343
6344    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6345    # support.  Future versions do this automatically, but an explicit c++rt0.o
6346    # does not break anything, and helps significantly (at the cost of a little
6347    # extra space).
6348    freebsd2.2*)
6349      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6350      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6351      _LT_TAGVAR(hardcode_direct, $1)=yes
6352      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6353      ;;
6354
6355    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6356    freebsd2*)
6357      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6358      _LT_TAGVAR(hardcode_direct, $1)=yes
6359      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6360      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6361      ;;
6362
6363    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6364    freebsd* | dragonfly*)
6365      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6366      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6367      _LT_TAGVAR(hardcode_direct, $1)=yes
6368      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6369      ;;
6370
6371    hpux9*)
6372      if test "$GCC" = yes; then
6373	_LT_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'
6374      else
6375	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6376      fi
6377      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6378      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6379      _LT_TAGVAR(hardcode_direct, $1)=yes
6380
6381      # hardcode_minus_L: Not really in the search PATH,
6382      # but as the default location of the library.
6383      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6384      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6385      ;;
6386
6387    hpux10*)
6388      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6389	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6390      else
6391	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6392      fi
6393      if test "$with_gnu_ld" = no; then
6394	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6395	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6396	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6397	_LT_TAGVAR(hardcode_direct, $1)=yes
6398	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6399	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6400	# hardcode_minus_L: Not really in the search PATH,
6401	# but as the default location of the library.
6402	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6403      fi
6404      ;;
6405
6406    hpux11*)
6407      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6408	case $host_cpu in
6409	hppa*64*)
6410	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6411	  ;;
6412	ia64*)
6413	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6414	  ;;
6415	*)
6416	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6417	  ;;
6418	esac
6419      else
6420	case $host_cpu in
6421	hppa*64*)
6422	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6423	  ;;
6424	ia64*)
6425	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6426	  ;;
6427	*)
6428	m4_if($1, [], [
6429	  # Older versions of the 11.00 compiler do not understand -b yet
6430	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6431	  _LT_LINKER_OPTION([if $CC understands -b],
6432	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6433	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6434	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6435	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6436	  ;;
6437	esac
6438      fi
6439      if test "$with_gnu_ld" = no; then
6440	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6441	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6442
6443	case $host_cpu in
6444	hppa*64*|ia64*)
6445	  _LT_TAGVAR(hardcode_direct, $1)=no
6446	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6447	  ;;
6448	*)
6449	  _LT_TAGVAR(hardcode_direct, $1)=yes
6450	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6451	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6452
6453	  # hardcode_minus_L: Not really in the search PATH,
6454	  # but as the default location of the library.
6455	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6456	  ;;
6457	esac
6458      fi
6459      ;;
6460
6461    irix5* | irix6* | nonstopux*)
6462      if test "$GCC" = yes; then
6463	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6464	# Try to use the -exported_symbol ld option, if it does not
6465	# work, assume that -exports_file does not work either and
6466	# implicitly export all symbols.
6467        save_LDFLAGS="$LDFLAGS"
6468        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6469        AC_LINK_IFELSE(int foo(void) {},
6470          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6471        )
6472        LDFLAGS="$save_LDFLAGS"
6473      else
6474	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6475	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6476      fi
6477      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6478      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6479      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6480      _LT_TAGVAR(inherit_rpath, $1)=yes
6481      _LT_TAGVAR(link_all_deplibs, $1)=yes
6482      ;;
6483
6484    netbsd*)
6485      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6486	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6487      else
6488	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6489      fi
6490      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6491      _LT_TAGVAR(hardcode_direct, $1)=yes
6492      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6493      ;;
6494
6495    newsos6)
6496      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6497      _LT_TAGVAR(hardcode_direct, $1)=yes
6498      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6499      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6500      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6501      ;;
6502
6503    *nto* | *qnx*)
6504      ;;
6505
6506    openbsd*)
6507      if test -f /usr/libexec/ld.so; then
6508	_LT_TAGVAR(hardcode_direct, $1)=yes
6509	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6510	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6511	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6512	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6513	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6514	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6515	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6516	else
6517	  case $host_os in
6518	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6519	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6520	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6521	     ;;
6522	   *)
6523	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6524	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6525	     ;;
6526	  esac
6527	fi
6528      else
6529	_LT_TAGVAR(ld_shlibs, $1)=no
6530      fi
6531      ;;
6532
6533    os2*)
6534      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6535      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6536      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6537      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6538      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6539      ;;
6540
6541    osf3*)
6542      if test "$GCC" = yes; then
6543	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6544	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6545      else
6546	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6547	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6548      fi
6549      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6550      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6551      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6552      ;;
6553
6554    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6555      if test "$GCC" = yes; then
6556	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6557	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6558	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6559      else
6560	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6561	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6562	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
6563	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6564
6565	# Both c and cxx compiler support -rpath directly
6566	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6567      fi
6568      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6569      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6570      ;;
6571
6572    solaris*)
6573      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6574      if test "$GCC" = yes; then
6575	wlarc='${wl}'
6576	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6577	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6578	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6579      else
6580	case `$CC -V 2>&1` in
6581	*"Compilers 5.0"*)
6582	  wlarc=''
6583	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6584	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6585	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6586	  ;;
6587	*)
6588	  wlarc='${wl}'
6589	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6590	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6591	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6592	  ;;
6593	esac
6594      fi
6595      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6596      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6597      case $host_os in
6598      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6599      *)
6600	# The compiler driver will combine and reorder linker options,
6601	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6602	# but is careful enough not to reorder.
6603	# Supported since Solaris 2.6 (maybe 2.5.1?)
6604	if test "$GCC" = yes; then
6605	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6606	else
6607	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6608	fi
6609	;;
6610      esac
6611      _LT_TAGVAR(link_all_deplibs, $1)=yes
6612      ;;
6613
6614    sunos4*)
6615      if test "x$host_vendor" = xsequent; then
6616	# Use $CC to link under sequent, because it throws in some extra .o
6617	# files that make .init and .fini sections work.
6618	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6619      else
6620	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6621      fi
6622      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6623      _LT_TAGVAR(hardcode_direct, $1)=yes
6624      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6625      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6626      ;;
6627
6628    sysv4)
6629      case $host_vendor in
6630	sni)
6631	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6632	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6633	;;
6634	siemens)
6635	  ## LD is ld it makes a PLAMLIB
6636	  ## CC just makes a GrossModule.
6637	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6638	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6639	  _LT_TAGVAR(hardcode_direct, $1)=no
6640        ;;
6641	motorola)
6642	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6643	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6644	;;
6645      esac
6646      runpath_var='LD_RUN_PATH'
6647      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6648      ;;
6649
6650    sysv4.3*)
6651      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6652      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6653      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6654      ;;
6655
6656    sysv4*MP*)
6657      if test -d /usr/nec; then
6658	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6659	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6660	runpath_var=LD_RUN_PATH
6661	hardcode_runpath_var=yes
6662	_LT_TAGVAR(ld_shlibs, $1)=yes
6663      fi
6664      ;;
6665
6666    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6667      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6668      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6669      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6670      runpath_var='LD_RUN_PATH'
6671
6672      if test "$GCC" = yes; then
6673	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6674	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6675      else
6676	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6677	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6678      fi
6679      ;;
6680
6681    sysv5* | sco3.2v5* | sco5v6*)
6682      # Note: We can NOT use -z defs as we might desire, because we do not
6683      # link with -lc, and that would cause any symbols used from libc to
6684      # always be unresolved, which means just about no library would
6685      # ever link correctly.  If we're not using GNU ld we use -z text
6686      # though, which does catch some bad symbols but isn't as heavy-handed
6687      # as -z defs.
6688      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6689      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6690      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6691      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6692      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6693      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6694      _LT_TAGVAR(link_all_deplibs, $1)=yes
6695      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6696      runpath_var='LD_RUN_PATH'
6697
6698      if test "$GCC" = yes; then
6699	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6700	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6701      else
6702	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6703	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6704      fi
6705      ;;
6706
6707    uts4*)
6708      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6709      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6710      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6711      ;;
6712
6713    *)
6714      _LT_TAGVAR(ld_shlibs, $1)=no
6715      ;;
6716    esac
6717
6718    if test x$host_vendor = xsni; then
6719      case $host in
6720      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6721	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6722	;;
6723      esac
6724    fi
6725  fi
6726])
6727AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6728test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6729
6730_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6731
6732_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6733_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6734_LT_DECL([], [extract_expsyms_cmds], [2],
6735    [The commands to extract the exported symbol list from a shared archive])
6736
6737#
6738# Do we need to explicitly link libc?
6739#
6740case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6741x|xyes)
6742  # Assume -lc should be added
6743  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6744
6745  if test "$enable_shared" = yes && test "$GCC" = yes; then
6746    case $_LT_TAGVAR(archive_cmds, $1) in
6747    *'~'*)
6748      # FIXME: we may have to deal with multi-command sequences.
6749      ;;
6750    '$CC '*)
6751      # Test whether the compiler implicitly links with -lc since on some
6752      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6753      # to ld, don't add -lc before -lgcc.
6754      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6755	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6756	[$RM conftest*
6757	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6758
6759	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6760	  soname=conftest
6761	  lib=conftest
6762	  libobjs=conftest.$ac_objext
6763	  deplibs=
6764	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6765	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6766	  compiler_flags=-v
6767	  linker_flags=-v
6768	  verstring=
6769	  output_objdir=.
6770	  libname=conftest
6771	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6772	  _LT_TAGVAR(allow_undefined_flag, $1)=
6773	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6774	  then
6775	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6776	  else
6777	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6778	  fi
6779	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6780	else
6781	  cat conftest.err 1>&5
6782	fi
6783	$RM conftest*
6784	])
6785      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6786      ;;
6787    esac
6788  fi
6789  ;;
6790esac
6791
6792_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6793    [Whether or not to add -lc for building shared libraries])
6794_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6795    [enable_shared_with_static_runtimes], [0],
6796    [Whether or not to disallow shared libs when runtime libs are static])
6797_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6798    [Compiler flag to allow reflexive dlopens])
6799_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6800    [Compiler flag to generate shared objects directly from archives])
6801_LT_TAGDECL([], [compiler_needs_object], [1],
6802    [Whether the compiler copes with passing no objects directly])
6803_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6804    [Create an old-style archive from a shared archive])
6805_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6806    [Create a temporary old-style archive to link instead of a shared archive])
6807_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6808_LT_TAGDECL([], [archive_expsym_cmds], [2])
6809_LT_TAGDECL([], [module_cmds], [2],
6810    [Commands used to build a loadable module if different from building
6811    a shared archive.])
6812_LT_TAGDECL([], [module_expsym_cmds], [2])
6813_LT_TAGDECL([], [with_gnu_ld], [1],
6814    [Whether we are building with GNU ld or not])
6815_LT_TAGDECL([], [allow_undefined_flag], [1],
6816    [Flag that allows shared libraries with undefined symbols to be built])
6817_LT_TAGDECL([], [no_undefined_flag], [1],
6818    [Flag that enforces no undefined symbols])
6819_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6820    [Flag to hardcode $libdir into a binary during linking.
6821    This must work even if $libdir does not exist])
6822_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6823    [[If ld is used when linking, flag to hardcode $libdir into a binary
6824    during linking.  This must work even if $libdir does not exist]])
6825_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6826    [Whether we need a single "-rpath" flag with a separated argument])
6827_LT_TAGDECL([], [hardcode_direct], [0],
6828    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6829    DIR into the resulting binary])
6830_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6831    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6832    DIR into the resulting binary and the resulting library dependency is
6833    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6834    library is relocated])
6835_LT_TAGDECL([], [hardcode_minus_L], [0],
6836    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6837    into the resulting binary])
6838_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6839    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6840    into the resulting binary])
6841_LT_TAGDECL([], [hardcode_automatic], [0],
6842    [Set to "yes" if building a shared library automatically hardcodes DIR
6843    into the library and all subsequent libraries and executables linked
6844    against it])
6845_LT_TAGDECL([], [inherit_rpath], [0],
6846    [Set to yes if linker adds runtime paths of dependent libraries
6847    to runtime path list])
6848_LT_TAGDECL([], [link_all_deplibs], [0],
6849    [Whether libtool must link a program against all its dependency libraries])
6850_LT_TAGDECL([], [fix_srcfile_path], [1],
6851    [Fix the shell variable $srcfile for the compiler])
6852_LT_TAGDECL([], [always_export_symbols], [0],
6853    [Set to "yes" if exported symbols are required])
6854_LT_TAGDECL([], [export_symbols_cmds], [2],
6855    [The commands to list exported symbols])
6856_LT_TAGDECL([], [exclude_expsyms], [1],
6857    [Symbols that should not be listed in the preloaded symbols])
6858_LT_TAGDECL([], [include_expsyms], [1],
6859    [Symbols that must always be exported])
6860_LT_TAGDECL([], [prelink_cmds], [2],
6861    [Commands necessary for linking programs (against libraries) with templates])
6862_LT_TAGDECL([], [file_list_spec], [1],
6863    [Specify filename containing input files])
6864dnl FIXME: Not yet implemented
6865dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6866dnl    [Compiler flag to generate thread safe objects])
6867])# _LT_LINKER_SHLIBS
6868
6869
6870# _LT_LANG_C_CONFIG([TAG])
6871# ------------------------
6872# Ensure that the configuration variables for a C compiler are suitably
6873# defined.  These variables are subsequently used by _LT_CONFIG to write
6874# the compiler configuration to `libtool'.
6875m4_defun([_LT_LANG_C_CONFIG],
6876[m4_require([_LT_DECL_EGREP])dnl
6877lt_save_CC="$CC"
6878AC_LANG_PUSH(C)
6879
6880# Source file extension for C test sources.
6881ac_ext=c
6882
6883# Object file extension for compiled C test sources.
6884objext=o
6885_LT_TAGVAR(objext, $1)=$objext
6886
6887# Code to be used in simple compile tests
6888lt_simple_compile_test_code="int some_variable = 0;"
6889
6890# Code to be used in simple link tests
6891lt_simple_link_test_code='int main(){return(0);}'
6892
6893_LT_TAG_COMPILER
6894# Save the default compiler, since it gets overwritten when the other
6895# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6896compiler_DEFAULT=$CC
6897
6898# save warnings/boilerplate of simple test code
6899_LT_COMPILER_BOILERPLATE
6900_LT_LINKER_BOILERPLATE
6901
6902if test -n "$compiler"; then
6903  _LT_COMPILER_NO_RTTI($1)
6904  _LT_COMPILER_PIC($1)
6905  _LT_COMPILER_C_O($1)
6906  _LT_COMPILER_FILE_LOCKS($1)
6907  _LT_LINKER_SHLIBS($1)
6908  _LT_SYS_DYNAMIC_LINKER($1)
6909  _LT_LINKER_HARDCODE_LIBPATH($1)
6910  LT_SYS_DLOPEN_SELF
6911  _LT_CMD_STRIPLIB
6912
6913  # Report which library types will actually be built
6914  AC_MSG_CHECKING([if libtool supports shared libraries])
6915  AC_MSG_RESULT([$can_build_shared])
6916
6917  AC_MSG_CHECKING([whether to build shared libraries])
6918  test "$can_build_shared" = "no" && enable_shared=no
6919
6920  # On AIX, shared libraries and static libraries use the same namespace, and
6921  # are all built from PIC.
6922  case $host_os in
6923  aix3*)
6924    test "$enable_shared" = yes && enable_static=no
6925    if test -n "$RANLIB"; then
6926      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6927      postinstall_cmds='$RANLIB $lib'
6928    fi
6929    ;;
6930
6931  aix[[4-9]]*)
6932    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6933      test "$enable_shared" = yes && enable_static=no
6934    fi
6935    ;;
6936  esac
6937  AC_MSG_RESULT([$enable_shared])
6938
6939  AC_MSG_CHECKING([whether to build static libraries])
6940  # Make sure either enable_shared or enable_static is yes.
6941  test "$enable_shared" = yes || enable_static=yes
6942  AC_MSG_RESULT([$enable_static])
6943
6944  _LT_CONFIG($1)
6945fi
6946AC_LANG_POP
6947CC="$lt_save_CC"
6948])# _LT_LANG_C_CONFIG
6949
6950
6951# _LT_LANG_CXX_CONFIG([TAG])
6952# --------------------------
6953# Ensure that the configuration variables for a C++ compiler are suitably
6954# defined.  These variables are subsequently used by _LT_CONFIG to write
6955# the compiler configuration to `libtool'.
6956m4_defun([_LT_LANG_CXX_CONFIG],
6957[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6958m4_require([_LT_DECL_EGREP])dnl
6959if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6960    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6961    (test "X$CXX" != "Xg++"))) ; then
6962  AC_PROG_CXXCPP
6963else
6964  _lt_caught_CXX_error=yes
6965fi
6966
6967AC_LANG_PUSH(C++)
6968_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6969_LT_TAGVAR(allow_undefined_flag, $1)=
6970_LT_TAGVAR(always_export_symbols, $1)=no
6971_LT_TAGVAR(archive_expsym_cmds, $1)=
6972_LT_TAGVAR(compiler_needs_object, $1)=no
6973_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6974_LT_TAGVAR(hardcode_direct, $1)=no
6975_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6976_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6977_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6978_LT_TAGVAR(hardcode_libdir_separator, $1)=
6979_LT_TAGVAR(hardcode_minus_L, $1)=no
6980_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6981_LT_TAGVAR(hardcode_automatic, $1)=no
6982_LT_TAGVAR(inherit_rpath, $1)=no
6983_LT_TAGVAR(module_cmds, $1)=
6984_LT_TAGVAR(module_expsym_cmds, $1)=
6985_LT_TAGVAR(link_all_deplibs, $1)=unknown
6986_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6987_LT_TAGVAR(reload_flag, $1)=$reload_flag
6988_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6989_LT_TAGVAR(no_undefined_flag, $1)=
6990_LT_TAGVAR(whole_archive_flag_spec, $1)=
6991_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6992
6993# Source file extension for C++ test sources.
6994ac_ext=cpp
6995
6996# Object file extension for compiled C++ test sources.
6997objext=o
6998_LT_TAGVAR(objext, $1)=$objext
6999
7000# No sense in running all these tests if we already determined that
7001# the CXX compiler isn't working.  Some variables (like enable_shared)
7002# are currently assumed to apply to all compilers on this platform,
7003# and will be corrupted by setting them based on a non-working compiler.
7004if test "$_lt_caught_CXX_error" != yes; then
7005  # Code to be used in simple compile tests
7006  lt_simple_compile_test_code="int some_variable = 0;"
7007
7008  # Code to be used in simple link tests
7009  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7010
7011  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7012  _LT_TAG_COMPILER
7013
7014  # save warnings/boilerplate of simple test code
7015  _LT_COMPILER_BOILERPLATE
7016  _LT_LINKER_BOILERPLATE
7017
7018  # Allow CC to be a program name with arguments.
7019  lt_save_CC=$CC
7020  lt_save_LD=$LD
7021  lt_save_GCC=$GCC
7022  GCC=$GXX
7023  lt_save_with_gnu_ld=$with_gnu_ld
7024  lt_save_path_LD=$lt_cv_path_LD
7025  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7026    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7027  else
7028    $as_unset lt_cv_prog_gnu_ld
7029  fi
7030  if test -n "${lt_cv_path_LDCXX+set}"; then
7031    lt_cv_path_LD=$lt_cv_path_LDCXX
7032  else
7033    $as_unset lt_cv_path_LD
7034  fi
7035  test -z "${LDCXX+set}" || LD=$LDCXX
7036  CC=${CXX-"c++"}
7037  compiler=$CC
7038  _LT_TAGVAR(compiler, $1)=$CC
7039  _LT_CC_BASENAME([$compiler])
7040
7041  if test -n "$compiler"; then
7042    # We don't want -fno-exception when compiling C++ code, so set the
7043    # no_builtin_flag separately
7044    if test "$GXX" = yes; then
7045      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7046    else
7047      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7048    fi
7049
7050    if test "$GXX" = yes; then
7051      # Set up default GNU C++ configuration
7052
7053      LT_PATH_LD
7054
7055      # Check if GNU C++ uses GNU ld as the underlying linker, since the
7056      # archiving commands below assume that GNU ld is being used.
7057      if test "$with_gnu_ld" = yes; then
7058        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7059        _LT_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'
7060
7061        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7062        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7063
7064        # If archive_cmds runs LD, not CC, wlarc should be empty
7065        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7066        #     investigate it a little bit more. (MM)
7067        wlarc='${wl}'
7068
7069        # ancient GNU ld didn't support --whole-archive et. al.
7070        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7071	  $GREP 'no-whole-archive' > /dev/null; then
7072          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7073        else
7074          _LT_TAGVAR(whole_archive_flag_spec, $1)=
7075        fi
7076      else
7077        with_gnu_ld=no
7078        wlarc=
7079
7080        # A generic and very simple default shared library creation
7081        # command for GNU C++ for the case where it uses the native
7082        # linker, instead of GNU ld.  If possible, this setting should
7083        # overridden to take advantage of the native linker features on
7084        # the platform it is being used on.
7085        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7086      fi
7087
7088      # Commands to make compiler produce verbose output that lists
7089      # what "hidden" libraries, object files and flags are used when
7090      # linking a shared library.
7091      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7092
7093    else
7094      GXX=no
7095      with_gnu_ld=no
7096      wlarc=
7097    fi
7098
7099    # PORTME: fill in a description of your system's C++ link characteristics
7100    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7101    _LT_TAGVAR(ld_shlibs, $1)=yes
7102    case $host_os in
7103      aix3*)
7104        # FIXME: insert proper C++ library support
7105        _LT_TAGVAR(ld_shlibs, $1)=no
7106        ;;
7107      aix[[4-9]]*)
7108        if test "$host_cpu" = ia64; then
7109          # On IA64, the linker does run time linking by default, so we don't
7110          # have to do anything special.
7111          aix_use_runtimelinking=no
7112          exp_sym_flag='-Bexport'
7113          no_entry_flag=""
7114        else
7115          aix_use_runtimelinking=no
7116
7117          # Test if we are trying to use run time linking or normal
7118          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7119          # need to do runtime linking.
7120          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7121	    for ld_flag in $LDFLAGS; do
7122	      case $ld_flag in
7123	      *-brtl*)
7124	        aix_use_runtimelinking=yes
7125	        break
7126	        ;;
7127	      esac
7128	    done
7129	    ;;
7130          esac
7131
7132          exp_sym_flag='-bexport'
7133          no_entry_flag='-bnoentry'
7134        fi
7135
7136        # When large executables or shared objects are built, AIX ld can
7137        # have problems creating the table of contents.  If linking a library
7138        # or program results in "error TOC overflow" add -mminimal-toc to
7139        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7140        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7141
7142        _LT_TAGVAR(archive_cmds, $1)=''
7143        _LT_TAGVAR(hardcode_direct, $1)=yes
7144        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7145        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7146        _LT_TAGVAR(link_all_deplibs, $1)=yes
7147        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7148
7149        if test "$GXX" = yes; then
7150          case $host_os in aix4.[[012]]|aix4.[[012]].*)
7151          # We only want to do this on AIX 4.2 and lower, the check
7152          # below for broken collect2 doesn't work under 4.3+
7153	  collect2name=`${CC} -print-prog-name=collect2`
7154	  if test -f "$collect2name" &&
7155	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7156	  then
7157	    # We have reworked collect2
7158	    :
7159	  else
7160	    # We have old collect2
7161	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
7162	    # It fails to find uninstalled libraries when the uninstalled
7163	    # path is not listed in the libpath.  Setting hardcode_minus_L
7164	    # to unsupported forces relinking
7165	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
7166	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7167	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
7168	  fi
7169          esac
7170          shared_flag='-shared'
7171	  if test "$aix_use_runtimelinking" = yes; then
7172	    shared_flag="$shared_flag "'${wl}-G'
7173	  fi
7174        else
7175          # not using gcc
7176          if test "$host_cpu" = ia64; then
7177	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7178	  # chokes on -Wl,-G. The following line is correct:
7179	  shared_flag='-G'
7180          else
7181	    if test "$aix_use_runtimelinking" = yes; then
7182	      shared_flag='${wl}-G'
7183	    else
7184	      shared_flag='${wl}-bM:SRE'
7185	    fi
7186          fi
7187        fi
7188
7189        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7190        # It seems that -bexpall does not export symbols beginning with
7191        # underscore (_), so it is better to generate a list of symbols to
7192	# export.
7193        _LT_TAGVAR(always_export_symbols, $1)=yes
7194        if test "$aix_use_runtimelinking" = yes; then
7195          # Warning - without using the other runtime loading flags (-brtl),
7196          # -berok will link without error, but may produce a broken library.
7197          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7198          # Determine the default libpath from the value encoded in an empty
7199          # executable.
7200          _LT_SYS_MODULE_PATH_AIX
7201          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7202
7203          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7204        else
7205          if test "$host_cpu" = ia64; then
7206	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7207	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7208	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
7209          else
7210	    # Determine the default libpath from the value encoded in an
7211	    # empty executable.
7212	    _LT_SYS_MODULE_PATH_AIX
7213	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7214	    # Warning - without using the other run time loading flags,
7215	    # -berok will link without error, but may produce a broken library.
7216	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7217	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7218	    if test "$with_gnu_ld" = yes; then
7219	      # We only use this code for GNU lds that support --whole-archive.
7220	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7221	    else
7222	      # Exported symbols can be pulled into shared objects from archives
7223	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7224	    fi
7225	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7226	    # This is similar to how AIX traditionally builds its shared
7227	    # libraries.
7228	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7229          fi
7230        fi
7231        ;;
7232
7233      beos*)
7234	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7235	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7236	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7237	  # support --undefined.  This deserves some investigation.  FIXME
7238	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7239	else
7240	  _LT_TAGVAR(ld_shlibs, $1)=no
7241	fi
7242	;;
7243
7244      chorus*)
7245        case $cc_basename in
7246          *)
7247	  # FIXME: insert proper C++ library support
7248	  _LT_TAGVAR(ld_shlibs, $1)=no
7249	  ;;
7250        esac
7251        ;;
7252
7253      cygwin* | mingw* | pw32* | cegcc*)
7254        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7255        # as there is no search path for DLLs.
7256        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7257        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7258        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7259        _LT_TAGVAR(always_export_symbols, $1)=no
7260        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7261
7262        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7263          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7264          # If the export-symbols file already is a .def file (1st line
7265          # is EXPORTS), use it as is; otherwise, prepend...
7266          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7267	    cp $export_symbols $output_objdir/$soname.def;
7268          else
7269	    echo EXPORTS > $output_objdir/$soname.def;
7270	    cat $export_symbols >> $output_objdir/$soname.def;
7271          fi~
7272          $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'
7273        else
7274          _LT_TAGVAR(ld_shlibs, $1)=no
7275        fi
7276        ;;
7277      darwin* | rhapsody*)
7278        _LT_DARWIN_LINKER_FEATURES($1)
7279	;;
7280
7281      dgux*)
7282        case $cc_basename in
7283          ec++*)
7284	    # FIXME: insert proper C++ library support
7285	    _LT_TAGVAR(ld_shlibs, $1)=no
7286	    ;;
7287          ghcx*)
7288	    # Green Hills C++ Compiler
7289	    # FIXME: insert proper C++ library support
7290	    _LT_TAGVAR(ld_shlibs, $1)=no
7291	    ;;
7292          *)
7293	    # FIXME: insert proper C++ library support
7294	    _LT_TAGVAR(ld_shlibs, $1)=no
7295	    ;;
7296        esac
7297        ;;
7298
7299      freebsd[[12]]*)
7300        # C++ shared libraries reported to be fairly broken before
7301	# switch to ELF
7302        _LT_TAGVAR(ld_shlibs, $1)=no
7303        ;;
7304
7305      freebsd-elf*)
7306        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7307        ;;
7308
7309      freebsd* | dragonfly*)
7310        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7311        # conventions
7312        _LT_TAGVAR(ld_shlibs, $1)=yes
7313        ;;
7314
7315      gnu*)
7316        ;;
7317
7318      haiku*)
7319        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7320        _LT_TAGVAR(link_all_deplibs, $1)=yes
7321        ;;
7322
7323      hpux9*)
7324        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7325        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7326        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7327        _LT_TAGVAR(hardcode_direct, $1)=yes
7328        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7329				             # but as the default
7330				             # location of the library.
7331
7332        case $cc_basename in
7333          CC*)
7334            # FIXME: insert proper C++ library support
7335            _LT_TAGVAR(ld_shlibs, $1)=no
7336            ;;
7337          aCC*)
7338            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7339            # Commands to make compiler produce verbose output that lists
7340            # what "hidden" libraries, object files and flags are used when
7341            # linking a shared library.
7342            #
7343            # There doesn't appear to be a way to prevent this compiler from
7344            # explicitly linking system object files so we need to strip them
7345            # from the output so that they don't get included in the library
7346            # dependencies.
7347            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7348            ;;
7349          *)
7350            if test "$GXX" = yes; then
7351              _LT_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'
7352            else
7353              # FIXME: insert proper C++ library support
7354              _LT_TAGVAR(ld_shlibs, $1)=no
7355            fi
7356            ;;
7357        esac
7358        ;;
7359
7360      hpux10*|hpux11*)
7361        if test $with_gnu_ld = no; then
7362	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7363	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7364
7365          case $host_cpu in
7366            hppa*64*|ia64*)
7367              ;;
7368            *)
7369	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7370              ;;
7371          esac
7372        fi
7373        case $host_cpu in
7374          hppa*64*|ia64*)
7375            _LT_TAGVAR(hardcode_direct, $1)=no
7376            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7377            ;;
7378          *)
7379            _LT_TAGVAR(hardcode_direct, $1)=yes
7380            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7381            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7382					         # but as the default
7383					         # location of the library.
7384            ;;
7385        esac
7386
7387        case $cc_basename in
7388          CC*)
7389	    # FIXME: insert proper C++ library support
7390	    _LT_TAGVAR(ld_shlibs, $1)=no
7391	    ;;
7392          aCC*)
7393	    case $host_cpu in
7394	      hppa*64*)
7395	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7396	        ;;
7397	      ia64*)
7398	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7399	        ;;
7400	      *)
7401	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7402	        ;;
7403	    esac
7404	    # Commands to make compiler produce verbose output that lists
7405	    # what "hidden" libraries, object files and flags are used when
7406	    # linking a shared library.
7407	    #
7408	    # There doesn't appear to be a way to prevent this compiler from
7409	    # explicitly linking system object files so we need to strip them
7410	    # from the output so that they don't get included in the library
7411	    # dependencies.
7412	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7413	    ;;
7414          *)
7415	    if test "$GXX" = yes; then
7416	      if test $with_gnu_ld = no; then
7417	        case $host_cpu in
7418	          hppa*64*)
7419	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7420	            ;;
7421	          ia64*)
7422	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7423	            ;;
7424	          *)
7425	            _LT_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'
7426	            ;;
7427	        esac
7428	      fi
7429	    else
7430	      # FIXME: insert proper C++ library support
7431	      _LT_TAGVAR(ld_shlibs, $1)=no
7432	    fi
7433	    ;;
7434        esac
7435        ;;
7436
7437      interix[[3-9]]*)
7438	_LT_TAGVAR(hardcode_direct, $1)=no
7439	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7440	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7441	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7442	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7443	# Instead, shared libraries are loaded at an image base (0x10000000 by
7444	# default) and relocated if they conflict, which is a slow very memory
7445	# consuming and fragmenting process.  To avoid this, we pick a random,
7446	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7447	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7448	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7449	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7450	;;
7451      irix5* | irix6*)
7452        case $cc_basename in
7453          CC*)
7454	    # SGI C++
7455	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7456
7457	    # Archives containing C++ object files must be created using
7458	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7459	    # necessary to make sure instantiated templates are included
7460	    # in the archive.
7461	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7462	    ;;
7463          *)
7464	    if test "$GXX" = yes; then
7465	      if test "$with_gnu_ld" = no; then
7466	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7467	      else
7468	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
7469	      fi
7470	    fi
7471	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7472	    ;;
7473        esac
7474        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7475        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7476        _LT_TAGVAR(inherit_rpath, $1)=yes
7477        ;;
7478
7479      linux* | k*bsd*-gnu | kopensolaris*-gnu)
7480        case $cc_basename in
7481          KCC*)
7482	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7483
7484	    # KCC will only create a shared library if the output file
7485	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7486	    # to its proper name (with version) after linking.
7487	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7488	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
7489	    # Commands to make compiler produce verbose output that lists
7490	    # what "hidden" libraries, object files and flags are used when
7491	    # linking a shared library.
7492	    #
7493	    # There doesn't appear to be a way to prevent this compiler from
7494	    # explicitly linking system object files so we need to strip them
7495	    # from the output so that they don't get included in the library
7496	    # dependencies.
7497	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7498
7499	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7500	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7501
7502	    # Archives containing C++ object files must be created using
7503	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7504	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7505	    ;;
7506	  icpc* | ecpc* )
7507	    # Intel C++
7508	    with_gnu_ld=yes
7509	    # version 8.0 and above of icpc choke on multiply defined symbols
7510	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7511	    # earlier do not add the objects themselves.
7512	    case `$CC -V 2>&1` in
7513	      *"Version 7."*)
7514	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7515		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7516		;;
7517	      *)  # Version 8.0 or newer
7518	        tmp_idyn=
7519	        case $host_cpu in
7520		  ia64*) tmp_idyn=' -i_dynamic';;
7521		esac
7522	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7523		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7524		;;
7525	    esac
7526	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7527	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7528	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7529	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7530	    ;;
7531          pgCC* | pgcpp*)
7532            # Portland Group C++ compiler
7533	    case `$CC -V` in
7534	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7535	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7536		rm -rf $tpldir~
7537		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7538		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7539	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7540		rm -rf $tpldir~
7541		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7542		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7543		$RANLIB $oldlib'
7544	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7545		rm -rf $tpldir~
7546		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7547		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7548	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7549		rm -rf $tpldir~
7550		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7551		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7552	      ;;
7553	    *) # Version 6 and above use weak symbols
7554	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7555	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7556	      ;;
7557	    esac
7558
7559	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7560	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7561	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7562            ;;
7563	  cxx*)
7564	    # Compaq C++
7565	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7566	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
7567
7568	    runpath_var=LD_RUN_PATH
7569	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7570	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7571
7572	    # Commands to make compiler produce verbose output that lists
7573	    # what "hidden" libraries, object files and flags are used when
7574	    # linking a shared library.
7575	    #
7576	    # There doesn't appear to be a way to prevent this compiler from
7577	    # explicitly linking system object files so we need to strip them
7578	    # from the output so that they don't get included in the library
7579	    # dependencies.
7580	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
7581	    ;;
7582	  xl* | mpixl* | bgxl*)
7583	    # IBM XL 8.0 on PPC, with GNU ld
7584	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7585	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7586	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7587	    if test "x$supports_anon_versioning" = xyes; then
7588	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7589		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7590		echo "local: *; };" >> $output_objdir/$libname.ver~
7591		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7592	    fi
7593	    ;;
7594	  *)
7595	    case `$CC -V 2>&1 | sed 5q` in
7596	    *Sun\ C*)
7597	      # Sun C++ 5.9
7598	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7599	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7600	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
7601	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7602	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7603	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7604
7605	      # Not sure whether something based on
7606	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7607	      # would be better.
7608	      output_verbose_link_cmd='func_echo_all'
7609
7610	      # Archives containing C++ object files must be created using
7611	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7612	      # necessary to make sure instantiated templates are included
7613	      # in the archive.
7614	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7615	      ;;
7616	    esac
7617	    ;;
7618	esac
7619	;;
7620
7621      lynxos*)
7622        # FIXME: insert proper C++ library support
7623	_LT_TAGVAR(ld_shlibs, $1)=no
7624	;;
7625
7626      m88k*)
7627        # FIXME: insert proper C++ library support
7628        _LT_TAGVAR(ld_shlibs, $1)=no
7629	;;
7630
7631      mvs*)
7632        case $cc_basename in
7633          cxx*)
7634	    # FIXME: insert proper C++ library support
7635	    _LT_TAGVAR(ld_shlibs, $1)=no
7636	    ;;
7637	  *)
7638	    # FIXME: insert proper C++ library support
7639	    _LT_TAGVAR(ld_shlibs, $1)=no
7640	    ;;
7641	esac
7642	;;
7643
7644      netbsd*)
7645        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7646	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7647	  wlarc=
7648	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7649	  _LT_TAGVAR(hardcode_direct, $1)=yes
7650	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7651	fi
7652	# Workaround some broken pre-1.5 toolchains
7653	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7654	;;
7655
7656      *nto* | *qnx*)
7657        _LT_TAGVAR(ld_shlibs, $1)=yes
7658	;;
7659
7660      openbsd2*)
7661        # C++ shared libraries are fairly broken
7662	_LT_TAGVAR(ld_shlibs, $1)=no
7663	;;
7664
7665      openbsd*)
7666	if test -f /usr/libexec/ld.so; then
7667	  _LT_TAGVAR(hardcode_direct, $1)=yes
7668	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7669	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7670	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7671	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7672	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7673	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
7674	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7675	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7676	  fi
7677	  output_verbose_link_cmd=func_echo_all
7678	else
7679	  _LT_TAGVAR(ld_shlibs, $1)=no
7680	fi
7681	;;
7682
7683      osf3* | osf4* | osf5*)
7684        case $cc_basename in
7685          KCC*)
7686	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7687
7688	    # KCC will only create a shared library if the output file
7689	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7690	    # to its proper name (with version) after linking.
7691	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7692
7693	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7694	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7695
7696	    # Archives containing C++ object files must be created using
7697	    # the KAI C++ compiler.
7698	    case $host in
7699	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7700	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7701	    esac
7702	    ;;
7703          RCC*)
7704	    # Rational C++ 2.4.1
7705	    # FIXME: insert proper C++ library support
7706	    _LT_TAGVAR(ld_shlibs, $1)=no
7707	    ;;
7708          cxx*)
7709	    case $host in
7710	      osf3*)
7711	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7712	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7713	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7714		;;
7715	      *)
7716	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7717	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7718	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7719	          echo "-hidden">> $lib.exp~
7720	          $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~
7721	          $RM $lib.exp'
7722	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7723		;;
7724	    esac
7725
7726	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7727
7728	    # Commands to make compiler produce verbose output that lists
7729	    # what "hidden" libraries, object files and flags are used when
7730	    # linking a shared library.
7731	    #
7732	    # There doesn't appear to be a way to prevent this compiler from
7733	    # explicitly linking system object files so we need to strip them
7734	    # from the output so that they don't get included in the library
7735	    # dependencies.
7736	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7737	    ;;
7738	  *)
7739	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7740	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7741	      case $host in
7742	        osf3*)
7743	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7744		  ;;
7745	        *)
7746	          _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7747		  ;;
7748	      esac
7749
7750	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7751	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7752
7753	      # Commands to make compiler produce verbose output that lists
7754	      # what "hidden" libraries, object files and flags are used when
7755	      # linking a shared library.
7756	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7757
7758	    else
7759	      # FIXME: insert proper C++ library support
7760	      _LT_TAGVAR(ld_shlibs, $1)=no
7761	    fi
7762	    ;;
7763        esac
7764        ;;
7765
7766      psos*)
7767        # FIXME: insert proper C++ library support
7768        _LT_TAGVAR(ld_shlibs, $1)=no
7769        ;;
7770
7771      sunos4*)
7772        case $cc_basename in
7773          CC*)
7774	    # Sun C++ 4.x
7775	    # FIXME: insert proper C++ library support
7776	    _LT_TAGVAR(ld_shlibs, $1)=no
7777	    ;;
7778          lcc*)
7779	    # Lucid
7780	    # FIXME: insert proper C++ library support
7781	    _LT_TAGVAR(ld_shlibs, $1)=no
7782	    ;;
7783          *)
7784	    # FIXME: insert proper C++ library support
7785	    _LT_TAGVAR(ld_shlibs, $1)=no
7786	    ;;
7787        esac
7788        ;;
7789
7790      solaris*)
7791        case $cc_basename in
7792          CC* | sunCC*)
7793	    # Sun C++ 4.2, 5.x and Centerline C++
7794            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7795	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7796	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7797	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7798	      $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'
7799
7800	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7801	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7802	    case $host_os in
7803	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7804	      *)
7805		# The compiler driver will combine and reorder linker options,
7806		# but understands `-z linker_flag'.
7807	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7808		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7809	        ;;
7810	    esac
7811	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7812
7813	    output_verbose_link_cmd='func_echo_all'
7814
7815	    # Archives containing C++ object files must be created using
7816	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7817	    # necessary to make sure instantiated templates are included
7818	    # in the archive.
7819	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7820	    ;;
7821          gcx*)
7822	    # Green Hills C++ Compiler
7823	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7824
7825	    # The C++ compiler must be used to create the archive.
7826	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7827	    ;;
7828          *)
7829	    # GNU C++ compiler with Solaris linker
7830	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7831	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7832	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7833	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7834	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7835		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7836
7837	        # Commands to make compiler produce verbose output that lists
7838	        # what "hidden" libraries, object files and flags are used when
7839	        # linking a shared library.
7840	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7841	      else
7842	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
7843	        # platform.
7844	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7845	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7846		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7847
7848	        # Commands to make compiler produce verbose output that lists
7849	        # what "hidden" libraries, object files and flags are used when
7850	        # linking a shared library.
7851	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7852	      fi
7853
7854	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7855	      case $host_os in
7856		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7857		*)
7858		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7859		  ;;
7860	      esac
7861	    fi
7862	    ;;
7863        esac
7864        ;;
7865
7866    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7867      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7868      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7869      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7870      runpath_var='LD_RUN_PATH'
7871
7872      case $cc_basename in
7873        CC*)
7874	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7875	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7876	  ;;
7877	*)
7878	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7879	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7880	  ;;
7881      esac
7882      ;;
7883
7884      sysv5* | sco3.2v5* | sco5v6*)
7885	# Note: We can NOT use -z defs as we might desire, because we do not
7886	# link with -lc, and that would cause any symbols used from libc to
7887	# always be unresolved, which means just about no library would
7888	# ever link correctly.  If we're not using GNU ld we use -z text
7889	# though, which does catch some bad symbols but isn't as heavy-handed
7890	# as -z defs.
7891	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7892	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7893	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7894	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7895	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7896	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7897	_LT_TAGVAR(link_all_deplibs, $1)=yes
7898	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7899	runpath_var='LD_RUN_PATH'
7900
7901	case $cc_basename in
7902          CC*)
7903	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7904	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7905	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7906	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
7907	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7908	      '"$_LT_TAGVAR(reload_cmds, $1)"
7909	    ;;
7910	  *)
7911	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7912	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7913	    ;;
7914	esac
7915      ;;
7916
7917      tandem*)
7918        case $cc_basename in
7919          NCC*)
7920	    # NonStop-UX NCC 3.20
7921	    # FIXME: insert proper C++ library support
7922	    _LT_TAGVAR(ld_shlibs, $1)=no
7923	    ;;
7924          *)
7925	    # FIXME: insert proper C++ library support
7926	    _LT_TAGVAR(ld_shlibs, $1)=no
7927	    ;;
7928        esac
7929        ;;
7930
7931      vxworks*)
7932        # FIXME: insert proper C++ library support
7933        _LT_TAGVAR(ld_shlibs, $1)=no
7934        ;;
7935
7936      *)
7937        # FIXME: insert proper C++ library support
7938        _LT_TAGVAR(ld_shlibs, $1)=no
7939        ;;
7940    esac
7941
7942    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7943    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7944
7945    _LT_TAGVAR(GCC, $1)="$GXX"
7946    _LT_TAGVAR(LD, $1)="$LD"
7947
7948    ## CAVEAT EMPTOR:
7949    ## There is no encapsulation within the following macros, do not change
7950    ## the running order or otherwise move them around unless you know exactly
7951    ## what you are doing...
7952    _LT_SYS_HIDDEN_LIBDEPS($1)
7953    _LT_COMPILER_PIC($1)
7954    _LT_COMPILER_C_O($1)
7955    _LT_COMPILER_FILE_LOCKS($1)
7956    _LT_LINKER_SHLIBS($1)
7957    _LT_SYS_DYNAMIC_LINKER($1)
7958    _LT_LINKER_HARDCODE_LIBPATH($1)
7959
7960    _LT_CONFIG($1)
7961  fi # test -n "$compiler"
7962
7963  CC=$lt_save_CC
7964  LDCXX=$LD
7965  LD=$lt_save_LD
7966  GCC=$lt_save_GCC
7967  with_gnu_ld=$lt_save_with_gnu_ld
7968  lt_cv_path_LDCXX=$lt_cv_path_LD
7969  lt_cv_path_LD=$lt_save_path_LD
7970  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7971  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7972fi # test "$_lt_caught_CXX_error" != yes
7973
7974AC_LANG_POP
7975])# _LT_LANG_CXX_CONFIG
7976
7977
7978# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7979# ---------------------------------
7980# Figure out "hidden" library dependencies from verbose
7981# compiler output when linking a shared library.
7982# Parse the compiler output and extract the necessary
7983# objects, libraries and library flags.
7984m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7985[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7986# Dependencies to place before and after the object being linked:
7987_LT_TAGVAR(predep_objects, $1)=
7988_LT_TAGVAR(postdep_objects, $1)=
7989_LT_TAGVAR(predeps, $1)=
7990_LT_TAGVAR(postdeps, $1)=
7991_LT_TAGVAR(compiler_lib_search_path, $1)=
7992
7993dnl we can't use the lt_simple_compile_test_code here,
7994dnl because it contains code intended for an executable,
7995dnl not a library.  It's possible we should let each
7996dnl tag define a new lt_????_link_test_code variable,
7997dnl but it's only used here...
7998m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7999int a;
8000void foo (void) { a = 0; }
8001_LT_EOF
8002], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8003class Foo
8004{
8005public:
8006  Foo (void) { a = 0; }
8007private:
8008  int a;
8009};
8010_LT_EOF
8011], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8012      subroutine foo
8013      implicit none
8014      integer*4 a
8015      a=0
8016      return
8017      end
8018_LT_EOF
8019], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8020      subroutine foo
8021      implicit none
8022      integer a
8023      a=0
8024      return
8025      end
8026_LT_EOF
8027], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8028public class foo {
8029  private int a;
8030  public void bar (void) {
8031    a = 0;
8032  }
8033};
8034_LT_EOF
8035])
8036dnl Parse the compiler output and extract the necessary
8037dnl objects, libraries and library flags.
8038if AC_TRY_EVAL(ac_compile); then
8039  # Parse the compiler output and extract the necessary
8040  # objects, libraries and library flags.
8041
8042  # Sentinel used to keep track of whether or not we are before
8043  # the conftest object file.
8044  pre_test_object_deps_done=no
8045
8046  for p in `eval "$output_verbose_link_cmd"`; do
8047    case $p in
8048
8049    -L* | -R* | -l*)
8050       # Some compilers place space between "-{L,R}" and the path.
8051       # Remove the space.
8052       if test $p = "-L" ||
8053          test $p = "-R"; then
8054	 prev=$p
8055	 continue
8056       else
8057	 prev=
8058       fi
8059
8060       if test "$pre_test_object_deps_done" = no; then
8061	 case $p in
8062	 -L* | -R*)
8063	   # Internal compiler library paths should come after those
8064	   # provided the user.  The postdeps already come after the
8065	   # user supplied libs so there is no need to process them.
8066	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8067	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8068	   else
8069	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8070	   fi
8071	   ;;
8072	 # The "-l" case would never come before the object being
8073	 # linked, so don't bother handling this case.
8074	 esac
8075       else
8076	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8077	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8078	 else
8079	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8080	 fi
8081       fi
8082       ;;
8083
8084    *.$objext)
8085       # This assumes that the test object file only shows up
8086       # once in the compiler output.
8087       if test "$p" = "conftest.$objext"; then
8088	 pre_test_object_deps_done=yes
8089	 continue
8090       fi
8091
8092       if test "$pre_test_object_deps_done" = no; then
8093	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8094	   _LT_TAGVAR(predep_objects, $1)="$p"
8095	 else
8096	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8097	 fi
8098       else
8099	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8100	   _LT_TAGVAR(postdep_objects, $1)="$p"
8101	 else
8102	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8103	 fi
8104       fi
8105       ;;
8106
8107    *) ;; # Ignore the rest.
8108
8109    esac
8110  done
8111
8112  # Clean up.
8113  rm -f a.out a.exe
8114else
8115  echo "libtool.m4: error: problem compiling $1 test program"
8116fi
8117
8118$RM -f confest.$objext
8119
8120# PORTME: override above test on systems where it is broken
8121m4_if([$1], [CXX],
8122[case $host_os in
8123interix[[3-9]]*)
8124  # Interix 3.5 installs completely hosed .la files for C++, so rather than
8125  # hack all around it, let's just trust "g++" to DTRT.
8126  _LT_TAGVAR(predep_objects,$1)=
8127  _LT_TAGVAR(postdep_objects,$1)=
8128  _LT_TAGVAR(postdeps,$1)=
8129  ;;
8130
8131linux*)
8132  case `$CC -V 2>&1 | sed 5q` in
8133  *Sun\ C*)
8134    # Sun C++ 5.9
8135
8136    # The more standards-conforming stlport4 library is
8137    # incompatible with the Cstd library. Avoid specifying
8138    # it if it's in CXXFLAGS. Ignore libCrun as
8139    # -library=stlport4 depends on it.
8140    case " $CXX $CXXFLAGS " in
8141    *" -library=stlport4 "*)
8142      solaris_use_stlport4=yes
8143      ;;
8144    esac
8145
8146    if test "$solaris_use_stlport4" != yes; then
8147      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8148    fi
8149    ;;
8150  esac
8151  ;;
8152
8153solaris*)
8154  case $cc_basename in
8155  CC* | sunCC*)
8156    # The more standards-conforming stlport4 library is
8157    # incompatible with the Cstd library. Avoid specifying
8158    # it if it's in CXXFLAGS. Ignore libCrun as
8159    # -library=stlport4 depends on it.
8160    case " $CXX $CXXFLAGS " in
8161    *" -library=stlport4 "*)
8162      solaris_use_stlport4=yes
8163      ;;
8164    esac
8165
8166    # Adding this requires a known-good setup of shared libraries for
8167    # Sun compiler versions before 5.6, else PIC objects from an old
8168    # archive will be linked into the output, leading to subtle bugs.
8169    if test "$solaris_use_stlport4" != yes; then
8170      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8171    fi
8172    ;;
8173  esac
8174  ;;
8175esac
8176])
8177
8178case " $_LT_TAGVAR(postdeps, $1) " in
8179*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8180esac
8181 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8182if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8183 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8184fi
8185_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8186    [The directories searched by this compiler when creating a shared library])
8187_LT_TAGDECL([], [predep_objects], [1],
8188    [Dependencies to place before and after the objects being linked to
8189    create a shared library])
8190_LT_TAGDECL([], [postdep_objects], [1])
8191_LT_TAGDECL([], [predeps], [1])
8192_LT_TAGDECL([], [postdeps], [1])
8193_LT_TAGDECL([], [compiler_lib_search_path], [1],
8194    [The library search path used internally by the compiler when linking
8195    a shared library])
8196])# _LT_SYS_HIDDEN_LIBDEPS
8197
8198
8199# _LT_LANG_F77_CONFIG([TAG])
8200# --------------------------
8201# Ensure that the configuration variables for a Fortran 77 compiler are
8202# suitably defined.  These variables are subsequently used by _LT_CONFIG
8203# to write the compiler configuration to `libtool'.
8204m4_defun([_LT_LANG_F77_CONFIG],
8205[AC_LANG_PUSH(Fortran 77)
8206if test -z "$F77" || test "X$F77" = "Xno"; then
8207  _lt_disable_F77=yes
8208fi
8209
8210_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8211_LT_TAGVAR(allow_undefined_flag, $1)=
8212_LT_TAGVAR(always_export_symbols, $1)=no
8213_LT_TAGVAR(archive_expsym_cmds, $1)=
8214_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8215_LT_TAGVAR(hardcode_direct, $1)=no
8216_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8217_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8218_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8219_LT_TAGVAR(hardcode_libdir_separator, $1)=
8220_LT_TAGVAR(hardcode_minus_L, $1)=no
8221_LT_TAGVAR(hardcode_automatic, $1)=no
8222_LT_TAGVAR(inherit_rpath, $1)=no
8223_LT_TAGVAR(module_cmds, $1)=
8224_LT_TAGVAR(module_expsym_cmds, $1)=
8225_LT_TAGVAR(link_all_deplibs, $1)=unknown
8226_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8227_LT_TAGVAR(reload_flag, $1)=$reload_flag
8228_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8229_LT_TAGVAR(no_undefined_flag, $1)=
8230_LT_TAGVAR(whole_archive_flag_spec, $1)=
8231_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8232
8233# Source file extension for f77 test sources.
8234ac_ext=f
8235
8236# Object file extension for compiled f77 test sources.
8237objext=o
8238_LT_TAGVAR(objext, $1)=$objext
8239
8240# No sense in running all these tests if we already determined that
8241# the F77 compiler isn't working.  Some variables (like enable_shared)
8242# are currently assumed to apply to all compilers on this platform,
8243# and will be corrupted by setting them based on a non-working compiler.
8244if test "$_lt_disable_F77" != yes; then
8245  # Code to be used in simple compile tests
8246  lt_simple_compile_test_code="\
8247      subroutine t
8248      return
8249      end
8250"
8251
8252  # Code to be used in simple link tests
8253  lt_simple_link_test_code="\
8254      program t
8255      end
8256"
8257
8258  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8259  _LT_TAG_COMPILER
8260
8261  # save warnings/boilerplate of simple test code
8262  _LT_COMPILER_BOILERPLATE
8263  _LT_LINKER_BOILERPLATE
8264
8265  # Allow CC to be a program name with arguments.
8266  lt_save_CC="$CC"
8267  lt_save_GCC=$GCC
8268  CC=${F77-"f77"}
8269  compiler=$CC
8270  _LT_TAGVAR(compiler, $1)=$CC
8271  _LT_CC_BASENAME([$compiler])
8272  GCC=$G77
8273  if test -n "$compiler"; then
8274    AC_MSG_CHECKING([if libtool supports shared libraries])
8275    AC_MSG_RESULT([$can_build_shared])
8276
8277    AC_MSG_CHECKING([whether to build shared libraries])
8278    test "$can_build_shared" = "no" && enable_shared=no
8279
8280    # On AIX, shared libraries and static libraries use the same namespace, and
8281    # are all built from PIC.
8282    case $host_os in
8283      aix3*)
8284        test "$enable_shared" = yes && enable_static=no
8285        if test -n "$RANLIB"; then
8286          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8287          postinstall_cmds='$RANLIB $lib'
8288        fi
8289        ;;
8290      aix[[4-9]]*)
8291	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8292	  test "$enable_shared" = yes && enable_static=no
8293	fi
8294        ;;
8295    esac
8296    AC_MSG_RESULT([$enable_shared])
8297
8298    AC_MSG_CHECKING([whether to build static libraries])
8299    # Make sure either enable_shared or enable_static is yes.
8300    test "$enable_shared" = yes || enable_static=yes
8301    AC_MSG_RESULT([$enable_static])
8302
8303    _LT_TAGVAR(GCC, $1)="$G77"
8304    _LT_TAGVAR(LD, $1)="$LD"
8305
8306    ## CAVEAT EMPTOR:
8307    ## There is no encapsulation within the following macros, do not change
8308    ## the running order or otherwise move them around unless you know exactly
8309    ## what you are doing...
8310    _LT_COMPILER_PIC($1)
8311    _LT_COMPILER_C_O($1)
8312    _LT_COMPILER_FILE_LOCKS($1)
8313    _LT_LINKER_SHLIBS($1)
8314    _LT_SYS_DYNAMIC_LINKER($1)
8315    _LT_LINKER_HARDCODE_LIBPATH($1)
8316
8317    _LT_CONFIG($1)
8318  fi # test -n "$compiler"
8319
8320  GCC=$lt_save_GCC
8321  CC="$lt_save_CC"
8322fi # test "$_lt_disable_F77" != yes
8323
8324AC_LANG_POP
8325])# _LT_LANG_F77_CONFIG
8326
8327
8328# _LT_LANG_FC_CONFIG([TAG])
8329# -------------------------
8330# Ensure that the configuration variables for a Fortran compiler are
8331# suitably defined.  These variables are subsequently used by _LT_CONFIG
8332# to write the compiler configuration to `libtool'.
8333m4_defun([_LT_LANG_FC_CONFIG],
8334[AC_LANG_PUSH(Fortran)
8335
8336if test -z "$FC" || test "X$FC" = "Xno"; then
8337  _lt_disable_FC=yes
8338fi
8339
8340_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8341_LT_TAGVAR(allow_undefined_flag, $1)=
8342_LT_TAGVAR(always_export_symbols, $1)=no
8343_LT_TAGVAR(archive_expsym_cmds, $1)=
8344_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8345_LT_TAGVAR(hardcode_direct, $1)=no
8346_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8347_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8348_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8349_LT_TAGVAR(hardcode_libdir_separator, $1)=
8350_LT_TAGVAR(hardcode_minus_L, $1)=no
8351_LT_TAGVAR(hardcode_automatic, $1)=no
8352_LT_TAGVAR(inherit_rpath, $1)=no
8353_LT_TAGVAR(module_cmds, $1)=
8354_LT_TAGVAR(module_expsym_cmds, $1)=
8355_LT_TAGVAR(link_all_deplibs, $1)=unknown
8356_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8357_LT_TAGVAR(reload_flag, $1)=$reload_flag
8358_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8359_LT_TAGVAR(no_undefined_flag, $1)=
8360_LT_TAGVAR(whole_archive_flag_spec, $1)=
8361_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8362
8363# Source file extension for fc test sources.
8364ac_ext=${ac_fc_srcext-f}
8365
8366# Object file extension for compiled fc test sources.
8367objext=o
8368_LT_TAGVAR(objext, $1)=$objext
8369
8370# No sense in running all these tests if we already determined that
8371# the FC compiler isn't working.  Some variables (like enable_shared)
8372# are currently assumed to apply to all compilers on this platform,
8373# and will be corrupted by setting them based on a non-working compiler.
8374if test "$_lt_disable_FC" != yes; then
8375  # Code to be used in simple compile tests
8376  lt_simple_compile_test_code="\
8377      subroutine t
8378      return
8379      end
8380"
8381
8382  # Code to be used in simple link tests
8383  lt_simple_link_test_code="\
8384      program t
8385      end
8386"
8387
8388  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8389  _LT_TAG_COMPILER
8390
8391  # save warnings/boilerplate of simple test code
8392  _LT_COMPILER_BOILERPLATE
8393  _LT_LINKER_BOILERPLATE
8394
8395  # Allow CC to be a program name with arguments.
8396  lt_save_CC="$CC"
8397  lt_save_GCC=$GCC
8398  CC=${FC-"f95"}
8399  compiler=$CC
8400  GCC=$ac_cv_fc_compiler_gnu
8401
8402  _LT_TAGVAR(compiler, $1)=$CC
8403  _LT_CC_BASENAME([$compiler])
8404
8405  if test -n "$compiler"; then
8406    AC_MSG_CHECKING([if libtool supports shared libraries])
8407    AC_MSG_RESULT([$can_build_shared])
8408
8409    AC_MSG_CHECKING([whether to build shared libraries])
8410    test "$can_build_shared" = "no" && enable_shared=no
8411
8412    # On AIX, shared libraries and static libraries use the same namespace, and
8413    # are all built from PIC.
8414    case $host_os in
8415      aix3*)
8416        test "$enable_shared" = yes && enable_static=no
8417        if test -n "$RANLIB"; then
8418          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8419          postinstall_cmds='$RANLIB $lib'
8420        fi
8421        ;;
8422      aix[[4-9]]*)
8423	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8424	  test "$enable_shared" = yes && enable_static=no
8425	fi
8426        ;;
8427    esac
8428    AC_MSG_RESULT([$enable_shared])
8429
8430    AC_MSG_CHECKING([whether to build static libraries])
8431    # Make sure either enable_shared or enable_static is yes.
8432    test "$enable_shared" = yes || enable_static=yes
8433    AC_MSG_RESULT([$enable_static])
8434
8435    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8436    _LT_TAGVAR(LD, $1)="$LD"
8437
8438    ## CAVEAT EMPTOR:
8439    ## There is no encapsulation within the following macros, do not change
8440    ## the running order or otherwise move them around unless you know exactly
8441    ## what you are doing...
8442    _LT_SYS_HIDDEN_LIBDEPS($1)
8443    _LT_COMPILER_PIC($1)
8444    _LT_COMPILER_C_O($1)
8445    _LT_COMPILER_FILE_LOCKS($1)
8446    _LT_LINKER_SHLIBS($1)
8447    _LT_SYS_DYNAMIC_LINKER($1)
8448    _LT_LINKER_HARDCODE_LIBPATH($1)
8449
8450    _LT_CONFIG($1)
8451  fi # test -n "$compiler"
8452
8453  GCC=$lt_save_GCC
8454  CC="$lt_save_CC"
8455fi # test "$_lt_disable_FC" != yes
8456
8457AC_LANG_POP
8458])# _LT_LANG_FC_CONFIG
8459
8460
8461# _LT_LANG_GCJ_CONFIG([TAG])
8462# --------------------------
8463# Ensure that the configuration variables for the GNU Java Compiler compiler
8464# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8465# to write the compiler configuration to `libtool'.
8466m4_defun([_LT_LANG_GCJ_CONFIG],
8467[AC_REQUIRE([LT_PROG_GCJ])dnl
8468AC_LANG_SAVE
8469
8470# Source file extension for Java test sources.
8471ac_ext=java
8472
8473# Object file extension for compiled Java test sources.
8474objext=o
8475_LT_TAGVAR(objext, $1)=$objext
8476
8477# Code to be used in simple compile tests
8478lt_simple_compile_test_code="class foo {}"
8479
8480# Code to be used in simple link tests
8481lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8482
8483# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8484_LT_TAG_COMPILER
8485
8486# save warnings/boilerplate of simple test code
8487_LT_COMPILER_BOILERPLATE
8488_LT_LINKER_BOILERPLATE
8489
8490# Allow CC to be a program name with arguments.
8491lt_save_CC="$CC"
8492lt_save_GCC=$GCC
8493GCC=yes
8494CC=${GCJ-"gcj"}
8495compiler=$CC
8496_LT_TAGVAR(compiler, $1)=$CC
8497_LT_TAGVAR(LD, $1)="$LD"
8498_LT_CC_BASENAME([$compiler])
8499
8500# GCJ did not exist at the time GCC didn't implicitly link libc in.
8501_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8502
8503_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8504_LT_TAGVAR(reload_flag, $1)=$reload_flag
8505_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8506
8507if test -n "$compiler"; then
8508  _LT_COMPILER_NO_RTTI($1)
8509  _LT_COMPILER_PIC($1)
8510  _LT_COMPILER_C_O($1)
8511  _LT_COMPILER_FILE_LOCKS($1)
8512  _LT_LINKER_SHLIBS($1)
8513  _LT_LINKER_HARDCODE_LIBPATH($1)
8514
8515  _LT_CONFIG($1)
8516fi
8517
8518AC_LANG_RESTORE
8519
8520GCC=$lt_save_GCC
8521CC="$lt_save_CC"
8522])# _LT_LANG_GCJ_CONFIG
8523
8524
8525# _LT_LANG_RC_CONFIG([TAG])
8526# -------------------------
8527# Ensure that the configuration variables for the Windows resource compiler
8528# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8529# to write the compiler configuration to `libtool'.
8530m4_defun([_LT_LANG_RC_CONFIG],
8531[AC_REQUIRE([LT_PROG_RC])dnl
8532AC_LANG_SAVE
8533
8534# Source file extension for RC test sources.
8535ac_ext=rc
8536
8537# Object file extension for compiled RC test sources.
8538objext=o
8539_LT_TAGVAR(objext, $1)=$objext
8540
8541# Code to be used in simple compile tests
8542lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8543
8544# Code to be used in simple link tests
8545lt_simple_link_test_code="$lt_simple_compile_test_code"
8546
8547# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8548_LT_TAG_COMPILER
8549
8550# save warnings/boilerplate of simple test code
8551_LT_COMPILER_BOILERPLATE
8552_LT_LINKER_BOILERPLATE
8553
8554# Allow CC to be a program name with arguments.
8555lt_save_CC="$CC"
8556lt_save_GCC=$GCC
8557GCC=
8558CC=${RC-"windres"}
8559compiler=$CC
8560_LT_TAGVAR(compiler, $1)=$CC
8561_LT_CC_BASENAME([$compiler])
8562_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8563
8564if test -n "$compiler"; then
8565  :
8566  _LT_CONFIG($1)
8567fi
8568
8569GCC=$lt_save_GCC
8570AC_LANG_RESTORE
8571CC="$lt_save_CC"
8572])# _LT_LANG_RC_CONFIG
8573
8574
8575# LT_PROG_GCJ
8576# -----------
8577AC_DEFUN([LT_PROG_GCJ],
8578[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8579  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8580    [AC_CHECK_TOOL(GCJ, gcj,)
8581      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8582      AC_SUBST(GCJFLAGS)])])[]dnl
8583])
8584
8585# Old name:
8586AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8587dnl aclocal-1.4 backwards compatibility:
8588dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8589
8590
8591# LT_PROG_RC
8592# ----------
8593AC_DEFUN([LT_PROG_RC],
8594[AC_CHECK_TOOL(RC, windres,)
8595])
8596
8597# Old name:
8598AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8599dnl aclocal-1.4 backwards compatibility:
8600dnl AC_DEFUN([LT_AC_PROG_RC], [])
8601
8602
8603# _LT_DECL_EGREP
8604# --------------
8605# If we don't have a new enough Autoconf to choose the best grep
8606# available, choose the one first in the user's PATH.
8607m4_defun([_LT_DECL_EGREP],
8608[AC_REQUIRE([AC_PROG_EGREP])dnl
8609AC_REQUIRE([AC_PROG_FGREP])dnl
8610test -z "$GREP" && GREP=grep
8611_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8612_LT_DECL([], [EGREP], [1], [An ERE matcher])
8613_LT_DECL([], [FGREP], [1], [A literal string matcher])
8614dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8615AC_SUBST([GREP])
8616])
8617
8618
8619# _LT_DECL_OBJDUMP
8620# --------------
8621# If we don't have a new enough Autoconf to choose the best objdump
8622# available, choose the one first in the user's PATH.
8623m4_defun([_LT_DECL_OBJDUMP],
8624[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8625test -z "$OBJDUMP" && OBJDUMP=objdump
8626_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8627AC_SUBST([OBJDUMP])
8628])
8629
8630
8631# _LT_DECL_SED
8632# ------------
8633# Check for a fully-functional sed program, that truncates
8634# as few characters as possible.  Prefer GNU sed if found.
8635m4_defun([_LT_DECL_SED],
8636[AC_PROG_SED
8637test -z "$SED" && SED=sed
8638Xsed="$SED -e 1s/^X//"
8639_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8640_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8641    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8642])# _LT_DECL_SED
8643
8644m4_ifndef([AC_PROG_SED], [
8645# NOTE: This macro has been submitted for inclusion into   #
8646#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8647#  a released version of Autoconf we should remove this    #
8648#  macro and use it instead.                               #
8649
8650m4_defun([AC_PROG_SED],
8651[AC_MSG_CHECKING([for a sed that does not truncate output])
8652AC_CACHE_VAL(lt_cv_path_SED,
8653[# Loop through the user's path and test for sed and gsed.
8654# Then use that list of sed's as ones to test for truncation.
8655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8656for as_dir in $PATH
8657do
8658  IFS=$as_save_IFS
8659  test -z "$as_dir" && as_dir=.
8660  for lt_ac_prog in sed gsed; do
8661    for ac_exec_ext in '' $ac_executable_extensions; do
8662      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8663        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8664      fi
8665    done
8666  done
8667done
8668IFS=$as_save_IFS
8669lt_ac_max=0
8670lt_ac_count=0
8671# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8672# along with /bin/sed that truncates output.
8673for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8674  test ! -f $lt_ac_sed && continue
8675  cat /dev/null > conftest.in
8676  lt_ac_count=0
8677  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8678  # Check for GNU sed and select it if it is found.
8679  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8680    lt_cv_path_SED=$lt_ac_sed
8681    break
8682  fi
8683  while true; do
8684    cat conftest.in conftest.in >conftest.tmp
8685    mv conftest.tmp conftest.in
8686    cp conftest.in conftest.nl
8687    echo >>conftest.nl
8688    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8689    cmp -s conftest.out conftest.nl || break
8690    # 10000 chars as input seems more than enough
8691    test $lt_ac_count -gt 10 && break
8692    lt_ac_count=`expr $lt_ac_count + 1`
8693    if test $lt_ac_count -gt $lt_ac_max; then
8694      lt_ac_max=$lt_ac_count
8695      lt_cv_path_SED=$lt_ac_sed
8696    fi
8697  done
8698done
8699])
8700SED=$lt_cv_path_SED
8701AC_SUBST([SED])
8702AC_MSG_RESULT([$SED])
8703])#AC_PROG_SED
8704])#m4_ifndef
8705
8706# Old name:
8707AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8708dnl aclocal-1.4 backwards compatibility:
8709dnl AC_DEFUN([LT_AC_PROG_SED], [])
8710
8711
8712# _LT_CHECK_SHELL_FEATURES
8713# ------------------------
8714# Find out whether the shell is Bourne or XSI compatible,
8715# or has some other useful features.
8716m4_defun([_LT_CHECK_SHELL_FEATURES],
8717[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8718# Try some XSI features
8719xsi_shell=no
8720( _lt_dummy="a/b/c"
8721  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
8722      = c,a/b,, \
8723    && eval 'test $(( 1 + 1 )) -eq 2 \
8724    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8725  && xsi_shell=yes
8726AC_MSG_RESULT([$xsi_shell])
8727_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8728
8729AC_MSG_CHECKING([whether the shell understands "+="])
8730lt_shell_append=no
8731( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8732    >/dev/null 2>&1 \
8733  && lt_shell_append=yes
8734AC_MSG_RESULT([$lt_shell_append])
8735_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8736
8737if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8738  lt_unset=unset
8739else
8740  lt_unset=false
8741fi
8742_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8743
8744# test EBCDIC or ASCII
8745case `echo X|tr X '\101'` in
8746 A) # ASCII based system
8747    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8748  lt_SP2NL='tr \040 \012'
8749  lt_NL2SP='tr \015\012 \040\040'
8750  ;;
8751 *) # EBCDIC based system
8752  lt_SP2NL='tr \100 \n'
8753  lt_NL2SP='tr \r\n \100\100'
8754  ;;
8755esac
8756_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8757_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8758])# _LT_CHECK_SHELL_FEATURES
8759
8760
8761# _LT_PROG_XSI_SHELLFNS
8762# ---------------------
8763# Bourne and XSI compatible variants of some useful shell functions.
8764m4_defun([_LT_PROG_XSI_SHELLFNS],
8765[case $xsi_shell in
8766  yes)
8767    cat << \_LT_EOF >> "$cfgfile"
8768
8769# func_dirname file append nondir_replacement
8770# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8771# otherwise set result to NONDIR_REPLACEMENT.
8772func_dirname ()
8773{
8774  case ${1} in
8775    */*) func_dirname_result="${1%/*}${2}" ;;
8776    *  ) func_dirname_result="${3}" ;;
8777  esac
8778}
8779
8780# func_basename file
8781func_basename ()
8782{
8783  func_basename_result="${1##*/}"
8784}
8785
8786# func_dirname_and_basename file append nondir_replacement
8787# perform func_basename and func_dirname in a single function
8788# call:
8789#   dirname:  Compute the dirname of FILE.  If nonempty,
8790#             add APPEND to the result, otherwise set result
8791#             to NONDIR_REPLACEMENT.
8792#             value returned in "$func_dirname_result"
8793#   basename: Compute filename of FILE.
8794#             value retuned in "$func_basename_result"
8795# Implementation must be kept synchronized with func_dirname
8796# and func_basename. For efficiency, we do not delegate to
8797# those functions but instead duplicate the functionality here.
8798func_dirname_and_basename ()
8799{
8800  case ${1} in
8801    */*) func_dirname_result="${1%/*}${2}" ;;
8802    *  ) func_dirname_result="${3}" ;;
8803  esac
8804  func_basename_result="${1##*/}"
8805}
8806
8807# func_stripname prefix suffix name
8808# strip PREFIX and SUFFIX off of NAME.
8809# PREFIX and SUFFIX must not contain globbing or regex special
8810# characters, hashes, percent signs, but SUFFIX may contain a leading
8811# dot (in which case that matches only a dot).
8812func_stripname ()
8813{
8814  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8815  # positional parameters, so assign one to ordinary parameter first.
8816  func_stripname_result=${3}
8817  func_stripname_result=${func_stripname_result#"${1}"}
8818  func_stripname_result=${func_stripname_result%"${2}"}
8819}
8820
8821# func_opt_split
8822func_opt_split ()
8823{
8824  func_opt_split_opt=${1%%=*}
8825  func_opt_split_arg=${1#*=}
8826}
8827
8828# func_lo2o object
8829func_lo2o ()
8830{
8831  case ${1} in
8832    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8833    *)    func_lo2o_result=${1} ;;
8834  esac
8835}
8836
8837# func_xform libobj-or-source
8838func_xform ()
8839{
8840  func_xform_result=${1%.*}.lo
8841}
8842
8843# func_arith arithmetic-term...
8844func_arith ()
8845{
8846  func_arith_result=$(( $[*] ))
8847}
8848
8849# func_len string
8850# STRING may not start with a hyphen.
8851func_len ()
8852{
8853  func_len_result=${#1}
8854}
8855
8856_LT_EOF
8857    ;;
8858  *) # Bourne compatible functions.
8859    cat << \_LT_EOF >> "$cfgfile"
8860
8861# func_dirname file append nondir_replacement
8862# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8863# otherwise set result to NONDIR_REPLACEMENT.
8864func_dirname ()
8865{
8866  # Extract subdirectory from the argument.
8867  func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
8868  if test "X$func_dirname_result" = "X${1}"; then
8869    func_dirname_result="${3}"
8870  else
8871    func_dirname_result="$func_dirname_result${2}"
8872  fi
8873}
8874
8875# func_basename file
8876func_basename ()
8877{
8878  func_basename_result=`$ECHO "${1}" | $SED "$basename"`
8879}
8880
8881dnl func_dirname_and_basename
8882dnl A portable version of this function is already defined in general.m4sh
8883dnl so there is no need for it here.
8884
8885# func_stripname prefix suffix name
8886# strip PREFIX and SUFFIX off of NAME.
8887# PREFIX and SUFFIX must not contain globbing or regex special
8888# characters, hashes, percent signs, but SUFFIX may contain a leading
8889# dot (in which case that matches only a dot).
8890# func_strip_suffix prefix name
8891func_stripname ()
8892{
8893  case ${2} in
8894    .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8895    *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8896  esac
8897}
8898
8899# sed scripts:
8900my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8901my_sed_long_arg='1s/^-[[^=]]*=//'
8902
8903# func_opt_split
8904func_opt_split ()
8905{
8906  func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
8907  func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
8908}
8909
8910# func_lo2o object
8911func_lo2o ()
8912{
8913  func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
8914}
8915
8916# func_xform libobj-or-source
8917func_xform ()
8918{
8919  func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
8920}
8921
8922# func_arith arithmetic-term...
8923func_arith ()
8924{
8925  func_arith_result=`expr "$[@]"`
8926}
8927
8928# func_len string
8929# STRING may not start with a hyphen.
8930func_len ()
8931{
8932  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8933}
8934
8935_LT_EOF
8936esac
8937
8938case $lt_shell_append in
8939  yes)
8940    cat << \_LT_EOF >> "$cfgfile"
8941
8942# func_append var value
8943# Append VALUE to the end of shell variable VAR.
8944func_append ()
8945{
8946  eval "$[1]+=\$[2]"
8947}
8948_LT_EOF
8949    ;;
8950  *)
8951    cat << \_LT_EOF >> "$cfgfile"
8952
8953# func_append var value
8954# Append VALUE to the end of shell variable VAR.
8955func_append ()
8956{
8957  eval "$[1]=\$$[1]\$[2]"
8958}
8959
8960_LT_EOF
8961    ;;
8962  esac
8963])
8964
8965# Helper functions for option handling.                    -*- Autoconf -*-
8966#
8967#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8968#   Inc.
8969#   Written by Gary V. Vaughan, 2004
8970#
8971# This file is free software; the Free Software Foundation gives
8972# unlimited permission to copy and/or distribute it, with or without
8973# modifications, as long as this notice is preserved.
8974
8975# serial 7 ltoptions.m4
8976
8977# This is to help aclocal find these macros, as it can't see m4_define.
8978AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8979
8980
8981# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8982# ------------------------------------------
8983m4_define([_LT_MANGLE_OPTION],
8984[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8985
8986
8987# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8988# ---------------------------------------
8989# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8990# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8991# saved as a flag.
8992m4_define([_LT_SET_OPTION],
8993[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8994m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8995        _LT_MANGLE_DEFUN([$1], [$2]),
8996    [m4_warning([Unknown $1 option `$2'])])[]dnl
8997])
8998
8999
9000# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9001# ------------------------------------------------------------
9002# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9003m4_define([_LT_IF_OPTION],
9004[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9005
9006
9007# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9008# -------------------------------------------------------
9009# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9010# are set.
9011m4_define([_LT_UNLESS_OPTIONS],
9012[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9013	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9014		      [m4_define([$0_found])])])[]dnl
9015m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9016])[]dnl
9017])
9018
9019
9020# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9021# ----------------------------------------
9022# OPTION-LIST is a space-separated list of Libtool options associated
9023# with MACRO-NAME.  If any OPTION has a matching handler declared with
9024# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9025# the unknown option and exit.
9026m4_defun([_LT_SET_OPTIONS],
9027[# Set options
9028m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9029    [_LT_SET_OPTION([$1], _LT_Option)])
9030
9031m4_if([$1],[LT_INIT],[
9032  dnl
9033  dnl Simply set some default values (i.e off) if boolean options were not
9034  dnl specified:
9035  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9036  ])
9037  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9038  ])
9039  dnl
9040  dnl If no reference was made to various pairs of opposing options, then
9041  dnl we run the default mode handler for the pair.  For example, if neither
9042  dnl `shared' nor `disable-shared' was passed, we enable building of shared
9043  dnl archives by default:
9044  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9045  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9046  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9047  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9048  		   [_LT_ENABLE_FAST_INSTALL])
9049  ])
9050])# _LT_SET_OPTIONS
9051
9052
9053
9054# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9055# -----------------------------------------
9056m4_define([_LT_MANGLE_DEFUN],
9057[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9058
9059
9060# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9061# -----------------------------------------------
9062m4_define([LT_OPTION_DEFINE],
9063[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9064])# LT_OPTION_DEFINE
9065
9066
9067# dlopen
9068# ------
9069LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9070])
9071
9072AU_DEFUN([AC_LIBTOOL_DLOPEN],
9073[_LT_SET_OPTION([LT_INIT], [dlopen])
9074AC_DIAGNOSE([obsolete],
9075[$0: Remove this warning and the call to _LT_SET_OPTION when you
9076put the `dlopen' option into LT_INIT's first parameter.])
9077])
9078
9079dnl aclocal-1.4 backwards compatibility:
9080dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9081
9082
9083# win32-dll
9084# ---------
9085# Declare package support for building win32 dll's.
9086LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9087[enable_win32_dll=yes
9088
9089case $host in
9090*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9091  AC_CHECK_TOOL(AS, as, false)
9092  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9093  AC_CHECK_TOOL(OBJDUMP, objdump, false)
9094  ;;
9095esac
9096
9097test -z "$AS" && AS=as
9098_LT_DECL([], [AS],      [1], [Assembler program])dnl
9099
9100test -z "$DLLTOOL" && DLLTOOL=dlltool
9101_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9102
9103test -z "$OBJDUMP" && OBJDUMP=objdump
9104_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9105])# win32-dll
9106
9107AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9108[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9109_LT_SET_OPTION([LT_INIT], [win32-dll])
9110AC_DIAGNOSE([obsolete],
9111[$0: Remove this warning and the call to _LT_SET_OPTION when you
9112put the `win32-dll' option into LT_INIT's first parameter.])
9113])
9114
9115dnl aclocal-1.4 backwards compatibility:
9116dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9117
9118
9119# _LT_ENABLE_SHARED([DEFAULT])
9120# ----------------------------
9121# implement the --enable-shared flag, and supports the `shared' and
9122# `disable-shared' LT_INIT options.
9123# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9124m4_define([_LT_ENABLE_SHARED],
9125[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9126AC_ARG_ENABLE([shared],
9127    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9128	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9129    [p=${PACKAGE-default}
9130    case $enableval in
9131    yes) enable_shared=yes ;;
9132    no) enable_shared=no ;;
9133    *)
9134      enable_shared=no
9135      # Look at the argument we got.  We use all the common list separators.
9136      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9137      for pkg in $enableval; do
9138	IFS="$lt_save_ifs"
9139	if test "X$pkg" = "X$p"; then
9140	  enable_shared=yes
9141	fi
9142      done
9143      IFS="$lt_save_ifs"
9144      ;;
9145    esac],
9146    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9147
9148    _LT_DECL([build_libtool_libs], [enable_shared], [0],
9149	[Whether or not to build shared libraries])
9150])# _LT_ENABLE_SHARED
9151
9152LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9153LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9154
9155# Old names:
9156AC_DEFUN([AC_ENABLE_SHARED],
9157[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9158])
9159
9160AC_DEFUN([AC_DISABLE_SHARED],
9161[_LT_SET_OPTION([LT_INIT], [disable-shared])
9162])
9163
9164AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9165AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9166
9167dnl aclocal-1.4 backwards compatibility:
9168dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9169dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9170
9171
9172
9173# _LT_ENABLE_STATIC([DEFAULT])
9174# ----------------------------
9175# implement the --enable-static flag, and support the `static' and
9176# `disable-static' LT_INIT options.
9177# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9178m4_define([_LT_ENABLE_STATIC],
9179[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9180AC_ARG_ENABLE([static],
9181    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9182	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9183    [p=${PACKAGE-default}
9184    case $enableval in
9185    yes) enable_static=yes ;;
9186    no) enable_static=no ;;
9187    *)
9188     enable_static=no
9189      # Look at the argument we got.  We use all the common list separators.
9190      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9191      for pkg in $enableval; do
9192	IFS="$lt_save_ifs"
9193	if test "X$pkg" = "X$p"; then
9194	  enable_static=yes
9195	fi
9196      done
9197      IFS="$lt_save_ifs"
9198      ;;
9199    esac],
9200    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9201
9202    _LT_DECL([build_old_libs], [enable_static], [0],
9203	[Whether or not to build static libraries])
9204])# _LT_ENABLE_STATIC
9205
9206LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9207LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9208
9209# Old names:
9210AC_DEFUN([AC_ENABLE_STATIC],
9211[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9212])
9213
9214AC_DEFUN([AC_DISABLE_STATIC],
9215[_LT_SET_OPTION([LT_INIT], [disable-static])
9216])
9217
9218AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9219AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9220
9221dnl aclocal-1.4 backwards compatibility:
9222dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9223dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9224
9225
9226
9227# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9228# ----------------------------------
9229# implement the --enable-fast-install flag, and support the `fast-install'
9230# and `disable-fast-install' LT_INIT options.
9231# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9232m4_define([_LT_ENABLE_FAST_INSTALL],
9233[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9234AC_ARG_ENABLE([fast-install],
9235    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9236    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9237    [p=${PACKAGE-default}
9238    case $enableval in
9239    yes) enable_fast_install=yes ;;
9240    no) enable_fast_install=no ;;
9241    *)
9242      enable_fast_install=no
9243      # Look at the argument we got.  We use all the common list separators.
9244      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9245      for pkg in $enableval; do
9246	IFS="$lt_save_ifs"
9247	if test "X$pkg" = "X$p"; then
9248	  enable_fast_install=yes
9249	fi
9250      done
9251      IFS="$lt_save_ifs"
9252      ;;
9253    esac],
9254    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9255
9256_LT_DECL([fast_install], [enable_fast_install], [0],
9257	 [Whether or not to optimize for fast installation])dnl
9258])# _LT_ENABLE_FAST_INSTALL
9259
9260LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9261LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9262
9263# Old names:
9264AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9265[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9266AC_DIAGNOSE([obsolete],
9267[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9268the `fast-install' option into LT_INIT's first parameter.])
9269])
9270
9271AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9272[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9273AC_DIAGNOSE([obsolete],
9274[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9275the `disable-fast-install' option into LT_INIT's first parameter.])
9276])
9277
9278dnl aclocal-1.4 backwards compatibility:
9279dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9280dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9281
9282
9283# _LT_WITH_PIC([MODE])
9284# --------------------
9285# implement the --with-pic flag, and support the `pic-only' and `no-pic'
9286# LT_INIT options.
9287# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9288m4_define([_LT_WITH_PIC],
9289[AC_ARG_WITH([pic],
9290    [AS_HELP_STRING([--with-pic],
9291	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9292    [pic_mode="$withval"],
9293    [pic_mode=default])
9294
9295test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9296
9297_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9298])# _LT_WITH_PIC
9299
9300LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9301LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9302
9303# Old name:
9304AU_DEFUN([AC_LIBTOOL_PICMODE],
9305[_LT_SET_OPTION([LT_INIT], [pic-only])
9306AC_DIAGNOSE([obsolete],
9307[$0: Remove this warning and the call to _LT_SET_OPTION when you
9308put the `pic-only' option into LT_INIT's first parameter.])
9309])
9310
9311dnl aclocal-1.4 backwards compatibility:
9312dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9313
9314
9315m4_define([_LTDL_MODE], [])
9316LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9317		 [m4_define([_LTDL_MODE], [nonrecursive])])
9318LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9319		 [m4_define([_LTDL_MODE], [recursive])])
9320LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9321		 [m4_define([_LTDL_MODE], [subproject])])
9322
9323m4_define([_LTDL_TYPE], [])
9324LT_OPTION_DEFINE([LTDL_INIT], [installable],
9325		 [m4_define([_LTDL_TYPE], [installable])])
9326LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9327		 [m4_define([_LTDL_TYPE], [convenience])])
9328
9329# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9330#
9331# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9332# Written by Gary V. Vaughan, 2004
9333#
9334# This file is free software; the Free Software Foundation gives
9335# unlimited permission to copy and/or distribute it, with or without
9336# modifications, as long as this notice is preserved.
9337
9338# serial 6 ltsugar.m4
9339
9340# This is to help aclocal find these macros, as it can't see m4_define.
9341AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9342
9343
9344# lt_join(SEP, ARG1, [ARG2...])
9345# -----------------------------
9346# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9347# associated separator.
9348# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9349# versions in m4sugar had bugs.
9350m4_define([lt_join],
9351[m4_if([$#], [1], [],
9352       [$#], [2], [[$2]],
9353       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9354m4_define([_lt_join],
9355[m4_if([$#$2], [2], [],
9356       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9357
9358
9359# lt_car(LIST)
9360# lt_cdr(LIST)
9361# ------------
9362# Manipulate m4 lists.
9363# These macros are necessary as long as will still need to support
9364# Autoconf-2.59 which quotes differently.
9365m4_define([lt_car], [[$1]])
9366m4_define([lt_cdr],
9367[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9368       [$#], 1, [],
9369       [m4_dquote(m4_shift($@))])])
9370m4_define([lt_unquote], $1)
9371
9372
9373# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9374# ------------------------------------------
9375# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9376# Note that neither SEPARATOR nor STRING are expanded; they are appended
9377# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9378# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9379# than defined and empty).
9380#
9381# This macro is needed until we can rely on Autoconf 2.62, since earlier
9382# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9383m4_define([lt_append],
9384[m4_define([$1],
9385	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9386
9387
9388
9389# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9390# ----------------------------------------------------------
9391# Produce a SEP delimited list of all paired combinations of elements of
9392# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9393# has the form PREFIXmINFIXSUFFIXn.
9394# Needed until we can rely on m4_combine added in Autoconf 2.62.
9395m4_define([lt_combine],
9396[m4_if(m4_eval([$# > 3]), [1],
9397       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9398[[m4_foreach([_Lt_prefix], [$2],
9399	     [m4_foreach([_Lt_suffix],
9400		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9401	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9402
9403
9404# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9405# -----------------------------------------------------------------------
9406# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9407# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9408m4_define([lt_if_append_uniq],
9409[m4_ifdef([$1],
9410	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9411		 [lt_append([$1], [$2], [$3])$4],
9412		 [$5])],
9413	  [lt_append([$1], [$2], [$3])$4])])
9414
9415
9416# lt_dict_add(DICT, KEY, VALUE)
9417# -----------------------------
9418m4_define([lt_dict_add],
9419[m4_define([$1($2)], [$3])])
9420
9421
9422# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9423# --------------------------------------------
9424m4_define([lt_dict_add_subkey],
9425[m4_define([$1($2:$3)], [$4])])
9426
9427
9428# lt_dict_fetch(DICT, KEY, [SUBKEY])
9429# ----------------------------------
9430m4_define([lt_dict_fetch],
9431[m4_ifval([$3],
9432	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9433    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9434
9435
9436# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9437# -----------------------------------------------------------------
9438m4_define([lt_if_dict_fetch],
9439[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9440	[$5],
9441    [$6])])
9442
9443
9444# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9445# --------------------------------------------------------------
9446m4_define([lt_dict_filter],
9447[m4_if([$5], [], [],
9448  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9449           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9450		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9451])
9452
9453# ltversion.m4 -- version numbers			-*- Autoconf -*-
9454#
9455#   Copyright (C) 2004 Free Software Foundation, Inc.
9456#   Written by Scott James Remnant, 2004
9457#
9458# This file is free software; the Free Software Foundation gives
9459# unlimited permission to copy and/or distribute it, with or without
9460# modifications, as long as this notice is preserved.
9461
9462# Generated from ltversion.in.
9463
9464# serial 3175 ltversion.m4
9465# This file is part of GNU Libtool
9466
9467m4_define([LT_PACKAGE_VERSION], [2.2.10])
9468m4_define([LT_PACKAGE_REVISION], [1.3175])
9469
9470AC_DEFUN([LTVERSION_VERSION],
9471[macro_version='2.2.10'
9472macro_revision='1.3175'
9473_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9474_LT_DECL(, macro_revision, 0)
9475])
9476
9477# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9478#
9479#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9480#   Written by Scott James Remnant, 2004.
9481#
9482# This file is free software; the Free Software Foundation gives
9483# unlimited permission to copy and/or distribute it, with or without
9484# modifications, as long as this notice is preserved.
9485
9486# serial 5 lt~obsolete.m4
9487
9488# These exist entirely to fool aclocal when bootstrapping libtool.
9489#
9490# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9491# which have later been changed to m4_define as they aren't part of the
9492# exported API, or moved to Autoconf or Automake where they belong.
9493#
9494# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9495# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9496# using a macro with the same name in our local m4/libtool.m4 it'll
9497# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9498# and doesn't know about Autoconf macros at all.)
9499#
9500# So we provide this file, which has a silly filename so it's always
9501# included after everything else.  This provides aclocal with the
9502# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9503# because those macros already exist, or will be overwritten later.
9504# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9505#
9506# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9507# Yes, that means every name once taken will need to remain here until
9508# we give up compatibility with versions before 1.7, at which point
9509# we need to keep only those names which we still refer to.
9510
9511# This is to help aclocal find these macros, as it can't see m4_define.
9512AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9513
9514m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9515m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9516m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9517m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9518m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9519m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9520m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9521m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9522m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9523m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9524m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9525m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9526m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9527m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9528m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9529m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9530m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9531m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9532m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9533m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9534m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9535m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9536m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9537m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9538m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9539m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9540m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9541m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9542m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9543m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9544m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9545m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9546m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9547m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9548m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9549m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9550m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9551m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9552m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9553m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9554m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9555m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9556m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9557m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9558m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9559m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9560m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9561m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9562m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9563m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9564m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9565m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9566m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9567m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9568m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9569m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9570m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9571m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9572m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
9573m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
9574m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9575
9576# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9577# serial 1 (pkg-config-0.24)
9578#
9579# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9580#
9581# This program is free software; you can redistribute it and/or modify
9582# it under the terms of the GNU General Public License as published by
9583# the Free Software Foundation; either version 2 of the License, or
9584# (at your option) any later version.
9585#
9586# This program is distributed in the hope that it will be useful, but
9587# WITHOUT ANY WARRANTY; without even the implied warranty of
9588# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9589# General Public License for more details.
9590#
9591# You should have received a copy of the GNU General Public License
9592# along with this program; if not, write to the Free Software
9593# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9594#
9595# As a special exception to the GNU General Public License, if you
9596# distribute this file as part of a program that contains a
9597# configuration script generated by Autoconf, you may include it under
9598# the same distribution terms that you use for the rest of that program.
9599
9600# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9601# ----------------------------------
9602AC_DEFUN([PKG_PROG_PKG_CONFIG],
9603[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9604m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9605AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9606AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9607AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9608
9609if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9610	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9611fi
9612if test -n "$PKG_CONFIG"; then
9613	_pkg_min_version=m4_default([$1], [0.9.0])
9614	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9615	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9616		AC_MSG_RESULT([yes])
9617	else
9618		AC_MSG_RESULT([no])
9619		PKG_CONFIG=""
9620	fi
9621fi[]dnl
9622])# PKG_PROG_PKG_CONFIG
9623
9624# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9625#
9626# Check to see whether a particular set of modules exists.  Similar
9627# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9628#
9629# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9630# only at the first occurence in configure.ac, so if the first place
9631# it's called might be skipped (such as if it is within an "if", you
9632# have to call PKG_CHECK_EXISTS manually
9633# --------------------------------------------------------------
9634AC_DEFUN([PKG_CHECK_EXISTS],
9635[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9636if test -n "$PKG_CONFIG" && \
9637    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9638  m4_default([$2], [:])
9639m4_ifvaln([$3], [else
9640  $3])dnl
9641fi])
9642
9643# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9644# ---------------------------------------------
9645m4_define([_PKG_CONFIG],
9646[if test -n "$$1"; then
9647    pkg_cv_[]$1="$$1"
9648 elif test -n "$PKG_CONFIG"; then
9649    PKG_CHECK_EXISTS([$3],
9650                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9651		     [pkg_failed=yes])
9652 else
9653    pkg_failed=untried
9654fi[]dnl
9655])# _PKG_CONFIG
9656
9657# _PKG_SHORT_ERRORS_SUPPORTED
9658# -----------------------------
9659AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9660[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9661if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9662        _pkg_short_errors_supported=yes
9663else
9664        _pkg_short_errors_supported=no
9665fi[]dnl
9666])# _PKG_SHORT_ERRORS_SUPPORTED
9667
9668
9669# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9670# [ACTION-IF-NOT-FOUND])
9671#
9672#
9673# Note that if there is a possibility the first call to
9674# PKG_CHECK_MODULES might not happen, you should be sure to include an
9675# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9676#
9677#
9678# --------------------------------------------------------------
9679AC_DEFUN([PKG_CHECK_MODULES],
9680[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9681AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9682AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9683
9684pkg_failed=no
9685AC_MSG_CHECKING([for $1])
9686
9687_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9688_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9689
9690m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9691and $1[]_LIBS to avoid the need to call pkg-config.
9692See the pkg-config man page for more details.])
9693
9694if test $pkg_failed = yes; then
9695   	AC_MSG_RESULT([no])
9696        _PKG_SHORT_ERRORS_SUPPORTED
9697        if test $_pkg_short_errors_supported = yes; then
9698	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
9699        else
9700	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
9701        fi
9702	# Put the nasty error message in config.log where it belongs
9703	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9704
9705	m4_default([$4], [AC_MSG_ERROR(
9706[Package requirements ($2) were not met:
9707
9708$$1_PKG_ERRORS
9709
9710Consider adjusting the PKG_CONFIG_PATH environment variable if you
9711installed software in a non-standard prefix.
9712
9713_PKG_TEXT])[]dnl
9714        ])
9715elif test $pkg_failed = untried; then
9716     	AC_MSG_RESULT([no])
9717	m4_default([$4], [AC_MSG_FAILURE(
9718[The pkg-config script could not be found or is too old.  Make sure it
9719is in your PATH or set the PKG_CONFIG environment variable to the full
9720path to pkg-config.
9721
9722_PKG_TEXT
9723
9724To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
9725        ])
9726else
9727	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9728	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9729        AC_MSG_RESULT([yes])
9730	$3
9731fi[]dnl
9732])# PKG_CHECK_MODULES
9733
9734# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
9735#
9736# This file is free software; the Free Software Foundation
9737# gives unlimited permission to copy and/or distribute it,
9738# with or without modifications, as long as this notice is preserved.
9739
9740# AM_AUTOMAKE_VERSION(VERSION)
9741# ----------------------------
9742# Automake X.Y traces this macro to ensure aclocal.m4 has been
9743# generated from the m4 files accompanying Automake X.Y.
9744# (This private macro should not be called outside this file.)
9745AC_DEFUN([AM_AUTOMAKE_VERSION],
9746[am__api_version='1.11'
9747dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9748dnl require some minimum version.  Point them to the right macro.
9749m4_if([$1], [1.11.1], [],
9750      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9751])
9752
9753# _AM_AUTOCONF_VERSION(VERSION)
9754# -----------------------------
9755# aclocal traces this macro to find the Autoconf version.
9756# This is a private macro too.  Using m4_define simplifies
9757# the logic in aclocal, which can simply ignore this definition.
9758m4_define([_AM_AUTOCONF_VERSION], [])
9759
9760# AM_SET_CURRENT_AUTOMAKE_VERSION
9761# -------------------------------
9762# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9763# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9764AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9765[AM_AUTOMAKE_VERSION([1.11.1])dnl
9766m4_ifndef([AC_AUTOCONF_VERSION],
9767  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9768_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9769
9770# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
9771
9772# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9773#
9774# This file is free software; the Free Software Foundation
9775# gives unlimited permission to copy and/or distribute it,
9776# with or without modifications, as long as this notice is preserved.
9777
9778# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9779# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
9780# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9781#
9782# Of course, Automake must honor this variable whenever it calls a
9783# tool from the auxiliary directory.  The problem is that $srcdir (and
9784# therefore $ac_aux_dir as well) can be either absolute or relative,
9785# depending on how configure is run.  This is pretty annoying, since
9786# it makes $ac_aux_dir quite unusable in subdirectories: in the top
9787# source directory, any form will work fine, but in subdirectories a
9788# relative path needs to be adjusted first.
9789#
9790# $ac_aux_dir/missing
9791#    fails when called from a subdirectory if $ac_aux_dir is relative
9792# $top_srcdir/$ac_aux_dir/missing
9793#    fails if $ac_aux_dir is absolute,
9794#    fails when called from a subdirectory in a VPATH build with
9795#          a relative $ac_aux_dir
9796#
9797# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9798# are both prefixed by $srcdir.  In an in-source build this is usually
9799# harmless because $srcdir is `.', but things will broke when you
9800# start a VPATH build or use an absolute $srcdir.
9801#
9802# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9803# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9804#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9805# and then we would define $MISSING as
9806#   MISSING="\${SHELL} $am_aux_dir/missing"
9807# This will work as long as MISSING is not called from configure, because
9808# unfortunately $(top_srcdir) has no meaning in configure.
9809# However there are other variables, like CC, which are often used in
9810# configure, and could therefore not use this "fixed" $ac_aux_dir.
9811#
9812# Another solution, used here, is to always expand $ac_aux_dir to an
9813# absolute PATH.  The drawback is that using absolute paths prevent a
9814# configured tree to be moved without reconfiguration.
9815
9816AC_DEFUN([AM_AUX_DIR_EXPAND],
9817[dnl Rely on autoconf to set up CDPATH properly.
9818AC_PREREQ([2.50])dnl
9819# expand $ac_aux_dir to an absolute path
9820am_aux_dir=`cd $ac_aux_dir && pwd`
9821])
9822
9823# AM_CONDITIONAL                                            -*- Autoconf -*-
9824
9825# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9826# Free Software Foundation, Inc.
9827#
9828# This file is free software; the Free Software Foundation
9829# gives unlimited permission to copy and/or distribute it,
9830# with or without modifications, as long as this notice is preserved.
9831
9832# serial 9
9833
9834# AM_CONDITIONAL(NAME, SHELL-CONDITION)
9835# -------------------------------------
9836# Define a conditional.
9837AC_DEFUN([AM_CONDITIONAL],
9838[AC_PREREQ(2.52)dnl
9839 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
9840	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9841AC_SUBST([$1_TRUE])dnl
9842AC_SUBST([$1_FALSE])dnl
9843_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9844_AM_SUBST_NOTMAKE([$1_FALSE])dnl
9845m4_define([_AM_COND_VALUE_$1], [$2])dnl
9846if $2; then
9847  $1_TRUE=
9848  $1_FALSE='#'
9849else
9850  $1_TRUE='#'
9851  $1_FALSE=
9852fi
9853AC_CONFIG_COMMANDS_PRE(
9854[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9855  AC_MSG_ERROR([[conditional "$1" was never defined.
9856Usually this means the macro was only invoked conditionally.]])
9857fi])])
9858
9859# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9860# Free Software Foundation, Inc.
9861#
9862# This file is free software; the Free Software Foundation
9863# gives unlimited permission to copy and/or distribute it,
9864# with or without modifications, as long as this notice is preserved.
9865
9866# serial 10
9867
9868# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9869# written in clear, in which case automake, when reading aclocal.m4,
9870# will think it sees a *use*, and therefore will trigger all it's
9871# C support machinery.  Also note that it means that autoscan, seeing
9872# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9873
9874
9875# _AM_DEPENDENCIES(NAME)
9876# ----------------------
9877# See how the compiler implements dependency checking.
9878# NAME is "CC", "CXX", "GCJ", or "OBJC".
9879# We try a few techniques and use that to set a single cache variable.
9880#
9881# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9882# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9883# dependency, and given that the user is not expected to run this macro,
9884# just rely on AC_PROG_CC.
9885AC_DEFUN([_AM_DEPENDENCIES],
9886[AC_REQUIRE([AM_SET_DEPDIR])dnl
9887AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9888AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9889AC_REQUIRE([AM_DEP_TRACK])dnl
9890
9891ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
9892       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
9893       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9894       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
9895       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9896                   [depcc="$$1"   am_compiler_list=])
9897
9898AC_CACHE_CHECK([dependency style of $depcc],
9899               [am_cv_$1_dependencies_compiler_type],
9900[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9901  # We make a subdir and do the tests there.  Otherwise we can end up
9902  # making bogus files that we don't know about and never remove.  For
9903  # instance it was reported that on HP-UX the gcc test will end up
9904  # making a dummy file named `D' -- because `-MD' means `put the output
9905  # in D'.
9906  mkdir conftest.dir
9907  # Copy depcomp to subdir because otherwise we won't find it if we're
9908  # using a relative directory.
9909  cp "$am_depcomp" conftest.dir
9910  cd conftest.dir
9911  # We will build objects and dependencies in a subdirectory because
9912  # it helps to detect inapplicable dependency modes.  For instance
9913  # both Tru64's cc and ICC support -MD to output dependencies as a
9914  # side effect of compilation, but ICC will put the dependencies in
9915  # the current directory while Tru64 will put them in the object
9916  # directory.
9917  mkdir sub
9918
9919  am_cv_$1_dependencies_compiler_type=none
9920  if test "$am_compiler_list" = ""; then
9921     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9922  fi
9923  am__universal=false
9924  m4_case([$1], [CC],
9925    [case " $depcc " in #(
9926     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9927     esac],
9928    [CXX],
9929    [case " $depcc " in #(
9930     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9931     esac])
9932
9933  for depmode in $am_compiler_list; do
9934    # Setup a source with many dependencies, because some compilers
9935    # like to wrap large dependency lists on column 80 (with \), and
9936    # we should not choose a depcomp mode which is confused by this.
9937    #
9938    # We need to recreate these files for each test, as the compiler may
9939    # overwrite some of them when testing with obscure command lines.
9940    # This happens at least with the AIX C compiler.
9941    : > sub/conftest.c
9942    for i in 1 2 3 4 5 6; do
9943      echo '#include "conftst'$i'.h"' >> sub/conftest.c
9944      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9945      # Solaris 8's {/usr,}/bin/sh.
9946      touch sub/conftst$i.h
9947    done
9948    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9949
9950    # We check with `-c' and `-o' for the sake of the "dashmstdout"
9951    # mode.  It turns out that the SunPro C++ compiler does not properly
9952    # handle `-M -o', and we need to detect this.  Also, some Intel
9953    # versions had trouble with output in subdirs
9954    am__obj=sub/conftest.${OBJEXT-o}
9955    am__minus_obj="-o $am__obj"
9956    case $depmode in
9957    gcc)
9958      # This depmode causes a compiler race in universal mode.
9959      test "$am__universal" = false || continue
9960      ;;
9961    nosideeffect)
9962      # after this tag, mechanisms are not by side-effect, so they'll
9963      # only be used when explicitly requested
9964      if test "x$enable_dependency_tracking" = xyes; then
9965	continue
9966      else
9967	break
9968      fi
9969      ;;
9970    msvisualcpp | msvcmsys)
9971      # This compiler won't grok `-c -o', but also, the minuso test has
9972      # not run yet.  These depmodes are late enough in the game, and
9973      # so weak that their functioning should not be impacted.
9974      am__obj=conftest.${OBJEXT-o}
9975      am__minus_obj=
9976      ;;
9977    none) break ;;
9978    esac
9979    if depmode=$depmode \
9980       source=sub/conftest.c object=$am__obj \
9981       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9982       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9983         >/dev/null 2>conftest.err &&
9984       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9985       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9986       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9987       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9988      # icc doesn't choke on unknown options, it will just issue warnings
9989      # or remarks (even with -Werror).  So we grep stderr for any message
9990      # that says an option was ignored or not supported.
9991      # When given -MP, icc 7.0 and 7.1 complain thusly:
9992      #   icc: Command line warning: ignoring option '-M'; no argument required
9993      # The diagnosis changed in icc 8.0:
9994      #   icc: Command line remark: option '-MP' not supported
9995      if (grep 'ignoring option' conftest.err ||
9996          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9997        am_cv_$1_dependencies_compiler_type=$depmode
9998        break
9999      fi
10000    fi
10001  done
10002
10003  cd ..
10004  rm -rf conftest.dir
10005else
10006  am_cv_$1_dependencies_compiler_type=none
10007fi
10008])
10009AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10010AM_CONDITIONAL([am__fastdep$1], [
10011  test "x$enable_dependency_tracking" != xno \
10012  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
10013])
10014
10015
10016# AM_SET_DEPDIR
10017# -------------
10018# Choose a directory name for dependency files.
10019# This macro is AC_REQUIREd in _AM_DEPENDENCIES
10020AC_DEFUN([AM_SET_DEPDIR],
10021[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10022AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
10023])
10024
10025
10026# AM_DEP_TRACK
10027# ------------
10028AC_DEFUN([AM_DEP_TRACK],
10029[AC_ARG_ENABLE(dependency-tracking,
10030[  --disable-dependency-tracking  speeds up one-time build
10031  --enable-dependency-tracking   do not reject slow dependency extractors])
10032if test "x$enable_dependency_tracking" != xno; then
10033  am_depcomp="$ac_aux_dir/depcomp"
10034  AMDEPBACKSLASH='\'
10035fi
10036AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
10037AC_SUBST([AMDEPBACKSLASH])dnl
10038_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
10039])
10040
10041# Generate code to set up dependency tracking.              -*- Autoconf -*-
10042
10043# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
10044# Free Software Foundation, Inc.
10045#
10046# This file is free software; the Free Software Foundation
10047# gives unlimited permission to copy and/or distribute it,
10048# with or without modifications, as long as this notice is preserved.
10049
10050#serial 5
10051
10052# _AM_OUTPUT_DEPENDENCY_COMMANDS
10053# ------------------------------
10054AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
10055[{
10056  # Autoconf 2.62 quotes --file arguments for eval, but not when files
10057  # are listed without --file.  Let's play safe and only enable the eval
10058  # if we detect the quoting.
10059  case $CONFIG_FILES in
10060  *\'*) eval set x "$CONFIG_FILES" ;;
10061  *)   set x $CONFIG_FILES ;;
10062  esac
10063  shift
10064  for mf
10065  do
10066    # Strip MF so we end up with the name of the file.
10067    mf=`echo "$mf" | sed -e 's/:.*$//'`
10068    # Check whether this is an Automake generated Makefile or not.
10069    # We used to match only the files named `Makefile.in', but
10070    # some people rename them; so instead we look at the file content.
10071    # Grep'ing the first line is not enough: some people post-process
10072    # each Makefile.in and add a new line on top of each file to say so.
10073    # Grep'ing the whole file is not good either: AIX grep has a line
10074    # limit of 2048, but all sed's we know have understand at least 4000.
10075    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
10076      dirpart=`AS_DIRNAME("$mf")`
10077    else
10078      continue
10079    fi
10080    # Extract the definition of DEPDIR, am__include, and am__quote
10081    # from the Makefile without running `make'.
10082    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
10083    test -z "$DEPDIR" && continue
10084    am__include=`sed -n 's/^am__include = //p' < "$mf"`
10085    test -z "am__include" && continue
10086    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
10087    # When using ansi2knr, U may be empty or an underscore; expand it
10088    U=`sed -n 's/^U = //p' < "$mf"`
10089    # Find all dependency output files, they are included files with
10090    # $(DEPDIR) in their names.  We invoke sed twice because it is the
10091    # simplest approach to changing $(DEPDIR) to its actual value in the
10092    # expansion.
10093    for file in `sed -n "
10094      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
10095	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
10096      # Make sure the directory exists.
10097      test -f "$dirpart/$file" && continue
10098      fdir=`AS_DIRNAME(["$file"])`
10099      AS_MKDIR_P([$dirpart/$fdir])
10100      # echo "creating $dirpart/$file"
10101      echo '# dummy' > "$dirpart/$file"
10102    done
10103  done
10104}
10105])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10106
10107
10108# AM_OUTPUT_DEPENDENCY_COMMANDS
10109# -----------------------------
10110# This macro should only be invoked once -- use via AC_REQUIRE.
10111#
10112# This code is only required when automatic dependency tracking
10113# is enabled.  FIXME.  This creates each `.P' file that we will
10114# need in order to bootstrap the dependency handling code.
10115AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10116[AC_CONFIG_COMMANDS([depfiles],
10117     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10118     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10119])
10120
10121
10122# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005
10123# Free Software Foundation, Inc.
10124#
10125# This file is free software; the Free Software Foundation
10126# gives unlimited permission to copy and/or distribute it,
10127# with or without modifications, as long as this notice is preserved.
10128
10129# serial 3
10130
10131AC_DEFUN([AM_WITH_DMALLOC],
10132[AC_MSG_CHECKING([if malloc debugging is wanted])
10133AC_ARG_WITH(dmalloc,
10134[  --with-dmalloc          use dmalloc, as in
10135			  http://www.dmalloc.com/dmalloc.tar.gz],
10136[if test "$withval" = yes; then
10137  AC_MSG_RESULT(yes)
10138  AC_DEFINE(WITH_DMALLOC,1,
10139	    [Define if using the dmalloc debugging malloc package])
10140  LIBS="$LIBS -ldmalloc"
10141  LDFLAGS="$LDFLAGS -g"
10142else
10143  AC_MSG_RESULT(no)
10144fi], [AC_MSG_RESULT(no)])
10145])
10146
10147AU_DEFUN([fp_WITH_DMALLOC], [AM_WITH_DMALLOC])
10148
10149# Do all the work for Automake.                             -*- Autoconf -*-
10150
10151# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
10152# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
10153#
10154# This file is free software; the Free Software Foundation
10155# gives unlimited permission to copy and/or distribute it,
10156# with or without modifications, as long as this notice is preserved.
10157
10158# serial 16
10159
10160# This macro actually does too much.  Some checks are only needed if
10161# your package does certain things.  But this isn't really a big deal.
10162
10163# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10164# AM_INIT_AUTOMAKE([OPTIONS])
10165# -----------------------------------------------
10166# The call with PACKAGE and VERSION arguments is the old style
10167# call (pre autoconf-2.50), which is being phased out.  PACKAGE
10168# and VERSION should now be passed to AC_INIT and removed from
10169# the call to AM_INIT_AUTOMAKE.
10170# We support both call styles for the transition.  After
10171# the next Automake release, Autoconf can make the AC_INIT
10172# arguments mandatory, and then we can depend on a new Autoconf
10173# release and drop the old call support.
10174AC_DEFUN([AM_INIT_AUTOMAKE],
10175[AC_PREREQ([2.62])dnl
10176dnl Autoconf wants to disallow AM_ names.  We explicitly allow
10177dnl the ones we care about.
10178m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10179AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10180AC_REQUIRE([AC_PROG_INSTALL])dnl
10181if test "`cd $srcdir && pwd`" != "`pwd`"; then
10182  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10183  # is not polluted with repeated "-I."
10184  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10185  # test to see if srcdir already configured
10186  if test -f $srcdir/config.status; then
10187    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10188  fi
10189fi
10190
10191# test whether we have cygpath
10192if test -z "$CYGPATH_W"; then
10193  if (cygpath --version) >/dev/null 2>/dev/null; then
10194    CYGPATH_W='cygpath -w'
10195  else
10196    CYGPATH_W=echo
10197  fi
10198fi
10199AC_SUBST([CYGPATH_W])
10200
10201# Define the identity of the package.
10202dnl Distinguish between old-style and new-style calls.
10203m4_ifval([$2],
10204[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10205 AC_SUBST([PACKAGE], [$1])dnl
10206 AC_SUBST([VERSION], [$2])],
10207[_AM_SET_OPTIONS([$1])dnl
10208dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10209m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
10210  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10211 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10212 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10213
10214_AM_IF_OPTION([no-define],,
10215[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
10216 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
10217
10218# Some tools Automake needs.
10219AC_REQUIRE([AM_SANITY_CHECK])dnl
10220AC_REQUIRE([AC_ARG_PROGRAM])dnl
10221AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
10222AM_MISSING_PROG(AUTOCONF, autoconf)
10223AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
10224AM_MISSING_PROG(AUTOHEADER, autoheader)
10225AM_MISSING_PROG(MAKEINFO, makeinfo)
10226AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10227AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
10228AC_REQUIRE([AM_PROG_MKDIR_P])dnl
10229# We need awk for the "check" target.  The system "awk" is bad on
10230# some platforms.
10231AC_REQUIRE([AC_PROG_AWK])dnl
10232AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10233AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10234_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
10235	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10236			     [_AM_PROG_TAR([v7])])])
10237_AM_IF_OPTION([no-dependencies],,
10238[AC_PROVIDE_IFELSE([AC_PROG_CC],
10239		  [_AM_DEPENDENCIES(CC)],
10240		  [define([AC_PROG_CC],
10241			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
10242AC_PROVIDE_IFELSE([AC_PROG_CXX],
10243		  [_AM_DEPENDENCIES(CXX)],
10244		  [define([AC_PROG_CXX],
10245			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
10246AC_PROVIDE_IFELSE([AC_PROG_OBJC],
10247		  [_AM_DEPENDENCIES(OBJC)],
10248		  [define([AC_PROG_OBJC],
10249			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
10250])
10251_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
10252dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
10253dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
10254dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
10255AC_CONFIG_COMMANDS_PRE(dnl
10256[m4_provide_if([_AM_COMPILER_EXEEXT],
10257  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
10258])
10259
10260dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
10261dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10262dnl mangled by Autoconf and run in a shell conditional statement.
10263m4_define([_AC_COMPILER_EXEEXT],
10264m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10265
10266
10267# When config.status generates a header, we must update the stamp-h file.
10268# This file resides in the same directory as the config header
10269# that is generated.  The stamp files are numbered to have different names.
10270
10271# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10272# loop where config.status creates the headers, so we can generate
10273# our stamp files there.
10274AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10275[# Compute $1's index in $config_headers.
10276_am_arg=$1
10277_am_stamp_count=1
10278for _am_header in $config_headers :; do
10279  case $_am_header in
10280    $_am_arg | $_am_arg:* )
10281      break ;;
10282    * )
10283      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10284  esac
10285done
10286echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10287
10288# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
10289#
10290# This file is free software; the Free Software Foundation
10291# gives unlimited permission to copy and/or distribute it,
10292# with or without modifications, as long as this notice is preserved.
10293
10294# AM_PROG_INSTALL_SH
10295# ------------------
10296# Define $install_sh.
10297AC_DEFUN([AM_PROG_INSTALL_SH],
10298[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10299if test x"${install_sh}" != xset; then
10300  case $am_aux_dir in
10301  *\ * | *\	*)
10302    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10303  *)
10304    install_sh="\${SHELL} $am_aux_dir/install-sh"
10305  esac
10306fi
10307AC_SUBST(install_sh)])
10308
10309# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
10310#
10311# This file is free software; the Free Software Foundation
10312# gives unlimited permission to copy and/or distribute it,
10313# with or without modifications, as long as this notice is preserved.
10314
10315# serial 2
10316
10317# Check whether the underlying file-system supports filenames
10318# with a leading dot.  For instance MS-DOS doesn't.
10319AC_DEFUN([AM_SET_LEADING_DOT],
10320[rm -rf .tst 2>/dev/null
10321mkdir .tst 2>/dev/null
10322if test -d .tst; then
10323  am__leading_dot=.
10324else
10325  am__leading_dot=_
10326fi
10327rmdir .tst 2>/dev/null
10328AC_SUBST([am__leading_dot])])
10329
10330# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
10331# From Jim Meyering
10332
10333# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
10334# Free Software Foundation, Inc.
10335#
10336# This file is free software; the Free Software Foundation
10337# gives unlimited permission to copy and/or distribute it,
10338# with or without modifications, as long as this notice is preserved.
10339
10340# serial 5
10341
10342# AM_MAINTAINER_MODE([DEFAULT-MODE])
10343# ----------------------------------
10344# Control maintainer-specific portions of Makefiles.
10345# Default is to disable them, unless `enable' is passed literally.
10346# For symmetry, `disable' may be passed as well.  Anyway, the user
10347# can override the default with the --enable/--disable switch.
10348AC_DEFUN([AM_MAINTAINER_MODE],
10349[m4_case(m4_default([$1], [disable]),
10350       [enable], [m4_define([am_maintainer_other], [disable])],
10351       [disable], [m4_define([am_maintainer_other], [enable])],
10352       [m4_define([am_maintainer_other], [enable])
10353        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
10354AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
10355  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
10356  AC_ARG_ENABLE([maintainer-mode],
10357[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
10358			  (and sometimes confusing) to the casual installer],
10359      [USE_MAINTAINER_MODE=$enableval],
10360      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
10361  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
10362  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
10363  MAINT=$MAINTAINER_MODE_TRUE
10364  AC_SUBST([MAINT])dnl
10365]
10366)
10367
10368AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
10369
10370# Check to see how 'make' treats includes.	            -*- Autoconf -*-
10371
10372# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
10373#
10374# This file is free software; the Free Software Foundation
10375# gives unlimited permission to copy and/or distribute it,
10376# with or without modifications, as long as this notice is preserved.
10377
10378# serial 4
10379
10380# AM_MAKE_INCLUDE()
10381# -----------------
10382# Check to see how make treats includes.
10383AC_DEFUN([AM_MAKE_INCLUDE],
10384[am_make=${MAKE-make}
10385cat > confinc << 'END'
10386am__doit:
10387	@echo this is the am__doit target
10388.PHONY: am__doit
10389END
10390# If we don't find an include directive, just comment out the code.
10391AC_MSG_CHECKING([for style of include used by $am_make])
10392am__include="#"
10393am__quote=
10394_am_result=none
10395# First try GNU make style include.
10396echo "include confinc" > confmf
10397# Ignore all kinds of additional output from `make'.
10398case `$am_make -s -f confmf 2> /dev/null` in #(
10399*the\ am__doit\ target*)
10400  am__include=include
10401  am__quote=
10402  _am_result=GNU
10403  ;;
10404esac
10405# Now try BSD make style include.
10406if test "$am__include" = "#"; then
10407   echo '.include "confinc"' > confmf
10408   case `$am_make -s -f confmf 2> /dev/null` in #(
10409   *the\ am__doit\ target*)
10410     am__include=.include
10411     am__quote="\""
10412     _am_result=BSD
10413     ;;
10414   esac
10415fi
10416AC_SUBST([am__include])
10417AC_SUBST([am__quote])
10418AC_MSG_RESULT([$_am_result])
10419rm -f confinc confmf
10420])
10421
10422# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10423
10424# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
10425# Free Software Foundation, Inc.
10426#
10427# This file is free software; the Free Software Foundation
10428# gives unlimited permission to copy and/or distribute it,
10429# with or without modifications, as long as this notice is preserved.
10430
10431# serial 6
10432
10433# AM_MISSING_PROG(NAME, PROGRAM)
10434# ------------------------------
10435AC_DEFUN([AM_MISSING_PROG],
10436[AC_REQUIRE([AM_MISSING_HAS_RUN])
10437$1=${$1-"${am_missing_run}$2"}
10438AC_SUBST($1)])
10439
10440
10441# AM_MISSING_HAS_RUN
10442# ------------------
10443# Define MISSING if not defined so far and test if it supports --run.
10444# If it does, set am_missing_run to use it, otherwise, to nothing.
10445AC_DEFUN([AM_MISSING_HAS_RUN],
10446[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10447AC_REQUIRE_AUX_FILE([missing])dnl
10448if test x"${MISSING+set}" != xset; then
10449  case $am_aux_dir in
10450  *\ * | *\	*)
10451    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10452  *)
10453    MISSING="\${SHELL} $am_aux_dir/missing" ;;
10454  esac
10455fi
10456# Use eval to expand $SHELL
10457if eval "$MISSING --run true"; then
10458  am_missing_run="$MISSING --run "
10459else
10460  am_missing_run=
10461  AC_MSG_WARN([`missing' script is too old or missing])
10462fi
10463])
10464
10465# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
10466#
10467# This file is free software; the Free Software Foundation
10468# gives unlimited permission to copy and/or distribute it,
10469# with or without modifications, as long as this notice is preserved.
10470
10471# AM_PROG_MKDIR_P
10472# ---------------
10473# Check for `mkdir -p'.
10474AC_DEFUN([AM_PROG_MKDIR_P],
10475[AC_PREREQ([2.60])dnl
10476AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10477dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
10478dnl while keeping a definition of mkdir_p for backward compatibility.
10479dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
10480dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
10481dnl Makefile.ins that do not define MKDIR_P, so we do our own
10482dnl adjustment using top_builddir (which is defined more often than
10483dnl MKDIR_P).
10484AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
10485case $mkdir_p in
10486  [[\\/$]]* | ?:[[\\/]]*) ;;
10487  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
10488esac
10489])
10490
10491# Helper functions for option handling.                     -*- Autoconf -*-
10492
10493# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
10494#
10495# This file is free software; the Free Software Foundation
10496# gives unlimited permission to copy and/or distribute it,
10497# with or without modifications, as long as this notice is preserved.
10498
10499# serial 4
10500
10501# _AM_MANGLE_OPTION(NAME)
10502# -----------------------
10503AC_DEFUN([_AM_MANGLE_OPTION],
10504[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10505
10506# _AM_SET_OPTION(NAME)
10507# ------------------------------
10508# Set option NAME.  Presently that only means defining a flag for this option.
10509AC_DEFUN([_AM_SET_OPTION],
10510[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10511
10512# _AM_SET_OPTIONS(OPTIONS)
10513# ----------------------------------
10514# OPTIONS is a space-separated list of Automake options.
10515AC_DEFUN([_AM_SET_OPTIONS],
10516[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10517
10518# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10519# -------------------------------------------
10520# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10521AC_DEFUN([_AM_IF_OPTION],
10522[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10523
10524# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2006
10525# Free Software Foundation, Inc.
10526#
10527# This file is free software; the Free Software Foundation
10528# gives unlimited permission to copy and/or distribute it,
10529# with or without modifications, as long as this notice is preserved.
10530
10531# serial 5
10532
10533AC_DEFUN([AM_C_PROTOTYPES],
10534[AC_REQUIRE([AC_C_PROTOTYPES])
10535if test "$ac_cv_prog_cc_stdc" != no; then
10536  U= ANSI2KNR=
10537else
10538  U=_ ANSI2KNR=./ansi2knr
10539fi
10540# Ensure some checks needed by ansi2knr itself.
10541AC_REQUIRE([AC_HEADER_STDC])
10542AC_CHECK_HEADERS([string.h])
10543AC_SUBST([U])dnl
10544AC_SUBST([ANSI2KNR])dnl
10545_AM_SUBST_NOTMAKE([ANSI2KNR])dnl
10546])
10547
10548AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
10549
10550# Check to make sure that the build environment is sane.    -*- Autoconf -*-
10551
10552# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
10553# Free Software Foundation, Inc.
10554#
10555# This file is free software; the Free Software Foundation
10556# gives unlimited permission to copy and/or distribute it,
10557# with or without modifications, as long as this notice is preserved.
10558
10559# serial 5
10560
10561# AM_SANITY_CHECK
10562# ---------------
10563AC_DEFUN([AM_SANITY_CHECK],
10564[AC_MSG_CHECKING([whether build environment is sane])
10565# Just in case
10566sleep 1
10567echo timestamp > conftest.file
10568# Reject unsafe characters in $srcdir or the absolute working directory
10569# name.  Accept space and tab only in the latter.
10570am_lf='
10571'
10572case `pwd` in
10573  *[[\\\"\#\$\&\'\`$am_lf]]*)
10574    AC_MSG_ERROR([unsafe absolute working directory name]);;
10575esac
10576case $srcdir in
10577  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
10578    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
10579esac
10580
10581# Do `set' in a subshell so we don't clobber the current shell's
10582# arguments.  Must try -L first in case configure is actually a
10583# symlink; some systems play weird games with the mod time of symlinks
10584# (eg FreeBSD returns the mod time of the symlink's containing
10585# directory).
10586if (
10587   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10588   if test "$[*]" = "X"; then
10589      # -L didn't work.
10590      set X `ls -t "$srcdir/configure" conftest.file`
10591   fi
10592   rm -f conftest.file
10593   if test "$[*]" != "X $srcdir/configure conftest.file" \
10594      && test "$[*]" != "X conftest.file $srcdir/configure"; then
10595
10596      # If neither matched, then we have a broken ls.  This can happen
10597      # if, for instance, CONFIG_SHELL is bash and it inherits a
10598      # broken ls alias from the environment.  This has actually
10599      # happened.  Such a system could not be considered "sane".
10600      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10601alias in your environment])
10602   fi
10603
10604   test "$[2]" = conftest.file
10605   )
10606then
10607   # Ok.
10608   :
10609else
10610   AC_MSG_ERROR([newly created file is older than distributed files!
10611Check your system clock])
10612fi
10613AC_MSG_RESULT(yes)])
10614
10615# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
10616#
10617# This file is free software; the Free Software Foundation
10618# gives unlimited permission to copy and/or distribute it,
10619# with or without modifications, as long as this notice is preserved.
10620
10621# AM_PROG_INSTALL_STRIP
10622# ---------------------
10623# One issue with vendor `install' (even GNU) is that you can't
10624# specify the program used to strip binaries.  This is especially
10625# annoying in cross-compiling environments, where the build's strip
10626# is unlikely to handle the host's binaries.
10627# Fortunately install-sh will honor a STRIPPROG variable, so we
10628# always use install-sh in `make install-strip', and initialize
10629# STRIPPROG with the value of the STRIP variable (set by the user).
10630AC_DEFUN([AM_PROG_INSTALL_STRIP],
10631[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10632# Installed binaries are usually stripped using `strip' when the user
10633# run `make install-strip'.  However `strip' might not be the right
10634# tool to use in cross-compilation environments, therefore Automake
10635# will honor the `STRIP' environment variable to overrule this program.
10636dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10637if test "$cross_compiling" != no; then
10638  AC_CHECK_TOOL([STRIP], [strip], :)
10639fi
10640INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10641AC_SUBST([INSTALL_STRIP_PROGRAM])])
10642
10643# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
10644#
10645# This file is free software; the Free Software Foundation
10646# gives unlimited permission to copy and/or distribute it,
10647# with or without modifications, as long as this notice is preserved.
10648
10649# serial 2
10650
10651# _AM_SUBST_NOTMAKE(VARIABLE)
10652# ---------------------------
10653# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10654# This macro is traced by Automake.
10655AC_DEFUN([_AM_SUBST_NOTMAKE])
10656
10657# AM_SUBST_NOTMAKE(VARIABLE)
10658# ---------------------------
10659# Public sister of _AM_SUBST_NOTMAKE.
10660AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10661
10662# Check how to create a tarball.                            -*- Autoconf -*-
10663
10664# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
10665#
10666# This file is free software; the Free Software Foundation
10667# gives unlimited permission to copy and/or distribute it,
10668# with or without modifications, as long as this notice is preserved.
10669
10670# serial 2
10671
10672# _AM_PROG_TAR(FORMAT)
10673# --------------------
10674# Check how to create a tarball in format FORMAT.
10675# FORMAT should be one of `v7', `ustar', or `pax'.
10676#
10677# Substitute a variable $(am__tar) that is a command
10678# writing to stdout a FORMAT-tarball containing the directory
10679# $tardir.
10680#     tardir=directory && $(am__tar) > result.tar
10681#
10682# Substitute a variable $(am__untar) that extract such
10683# a tarball read from stdin.
10684#     $(am__untar) < result.tar
10685AC_DEFUN([_AM_PROG_TAR],
10686[# Always define AMTAR for backward compatibility.
10687AM_MISSING_PROG([AMTAR], [tar])
10688m4_if([$1], [v7],
10689     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
10690     [m4_case([$1], [ustar],, [pax],,
10691              [m4_fatal([Unknown tar format])])
10692AC_MSG_CHECKING([how to create a $1 tar archive])
10693# Loop over all known methods to create a tar archive until one works.
10694_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10695_am_tools=${am_cv_prog_tar_$1-$_am_tools}
10696# Do not fold the above two line into one, because Tru64 sh and
10697# Solaris sh will not grok spaces in the rhs of `-'.
10698for _am_tool in $_am_tools
10699do
10700  case $_am_tool in
10701  gnutar)
10702    for _am_tar in tar gnutar gtar;
10703    do
10704      AM_RUN_LOG([$_am_tar --version]) && break
10705    done
10706    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10707    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10708    am__untar="$_am_tar -xf -"
10709    ;;
10710  plaintar)
10711    # Must skip GNU tar: if it does not support --format= it doesn't create
10712    # ustar tarball either.
10713    (tar --version) >/dev/null 2>&1 && continue
10714    am__tar='tar chf - "$$tardir"'
10715    am__tar_='tar chf - "$tardir"'
10716    am__untar='tar xf -'
10717    ;;
10718  pax)
10719    am__tar='pax -L -x $1 -w "$$tardir"'
10720    am__tar_='pax -L -x $1 -w "$tardir"'
10721    am__untar='pax -r'
10722    ;;
10723  cpio)
10724    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10725    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10726    am__untar='cpio -i -H $1 -d'
10727    ;;
10728  none)
10729    am__tar=false
10730    am__tar_=false
10731    am__untar=false
10732    ;;
10733  esac
10734
10735  # If the value was cached, stop now.  We just wanted to have am__tar
10736  # and am__untar set.
10737  test -n "${am_cv_prog_tar_$1}" && break
10738
10739  # tar/untar a dummy directory, and stop if the command works
10740  rm -rf conftest.dir
10741  mkdir conftest.dir
10742  echo GrepMe > conftest.dir/file
10743  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10744  rm -rf conftest.dir
10745  if test -s conftest.tar; then
10746    AM_RUN_LOG([$am__untar <conftest.tar])
10747    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10748  fi
10749done
10750rm -rf conftest.dir
10751
10752AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10753AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10754AC_SUBST([am__tar])
10755AC_SUBST([am__untar])
10756]) # _AM_PROG_TAR
10757
10758m4_include([acinclude.m4])
10759