Code

Imported Upstream version 5.5.0
[pkg-collectd.git] / aclocal.m4
1 # generated automatically by aclocal 1.14.1 -*- Autoconf -*-
3 # Copyright (C) 1996-2013 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.
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.
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 m4_ifndef([AC_AUTOCONF_VERSION],
16   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf.  It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
23 # Portability macros for glibc argz.                    -*- Autoconf -*-
24 #
25 #   Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
26 #   Written by Gary V. Vaughan <gary@gnu.org>
27 #
28 # This file is free software; the Free Software Foundation gives
29 # unlimited permission to copy and/or distribute it, with or without
30 # modifications, as long as this notice is preserved.
32 # serial 5 argz.m4
34 AC_DEFUN([gl_FUNC_ARGZ],
35 [gl_PREREQ_ARGZ
37 AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
39 AC_CHECK_TYPES([error_t],
40   [],
41   [AC_DEFINE([error_t], [int],
42    [Define to a type to use for `error_t' if it is not otherwise available.])
43    AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
44     does not typedef error_t.])],
45   [#if defined(HAVE_ARGZ_H)
46 #  include <argz.h>
47 #endif])
49 ARGZ_H=
50 AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \
51         argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
53 dnl if have system argz functions, allow forced use of
54 dnl libltdl-supplied implementation (and default to do so
55 dnl on "known bad" systems). Could use a runtime check, but
56 dnl (a) detecting malloc issues is notoriously unreliable
57 dnl (b) only known system that declares argz functions,
58 dnl     provides them, yet they are broken, is cygwin
59 dnl     releases prior to 16-Mar-2007 (1.5.24 and earlier)
60 dnl So, it's more straightforward simply to special case
61 dnl this for known bad systems.
62 AS_IF([test -z "$ARGZ_H"],
63     [AC_CACHE_CHECK(
64         [if argz actually works],
65         [lt_cv_sys_argz_works],
66         [[case $host_os in #(
67          *cygwin*)
68            lt_cv_sys_argz_works=no
69            if test "$cross_compiling" != no; then
70              lt_cv_sys_argz_works="guessing no"
71            else
72              lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
73              save_IFS=$IFS
74              IFS=-.
75              set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
76              IFS=$save_IFS
77              lt_os_major=${2-0}
78              lt_os_minor=${3-0}
79              lt_os_micro=${4-0}
80              if test "$lt_os_major" -gt 1 \
81                 || { test "$lt_os_major" -eq 1 \
82                   && { test "$lt_os_minor" -gt 5 \
83                     || { test "$lt_os_minor" -eq 5 \
84                       && test "$lt_os_micro" -gt 24; }; }; }; then
85                lt_cv_sys_argz_works=yes
86              fi
87            fi
88            ;; #(
89          *) lt_cv_sys_argz_works=yes ;;
90          esac]])
91      AS_IF([test "$lt_cv_sys_argz_works" = yes],
92         [AC_DEFINE([HAVE_WORKING_ARGZ], 1,
93                    [This value is set to 1 to indicate that the system argz facility works])],
94         [ARGZ_H=argz.h
95         AC_LIBOBJ([argz])])])
97 AC_SUBST([ARGZ_H])
98 ])
100 # Prerequisites of lib/argz.c.
101 AC_DEFUN([gl_PREREQ_ARGZ], [:])
103 # Configure paths for GLIB
104 # Owen Taylor     1997-2001
106 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
107 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
108 dnl gthread, or gio is specified in MODULES, pass to pkg-config
109 dnl
110 AC_DEFUN([AM_PATH_GLIB_2_0],
111 [dnl 
112 dnl Get the cflags and libraries from pkg-config
113 dnl
114 AC_ARG_ENABLE(glibtest, [  --disable-glibtest      do not try to compile and run a test GLIB program],
115                     , enable_glibtest=yes)
117   pkg_config_args=glib-2.0
118   for module in . $4
119   do
120       case "$module" in
121          gmodule) 
122              pkg_config_args="$pkg_config_args gmodule-2.0"
123          ;;
124          gmodule-no-export) 
125              pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
126          ;;
127          gobject) 
128              pkg_config_args="$pkg_config_args gobject-2.0"
129          ;;
130          gthread) 
131              pkg_config_args="$pkg_config_args gthread-2.0"
132          ;;
133          gio*) 
134              pkg_config_args="$pkg_config_args $module-2.0"
135          ;;
136       esac
137   done
139   PKG_PROG_PKG_CONFIG([0.16])
141   no_glib=""
143   if test "x$PKG_CONFIG" = x ; then
144     no_glib=yes
145     PKG_CONFIG=no
146   fi
148   min_glib_version=ifelse([$1], ,2.0.0,$1)
149   AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
151   if test x$PKG_CONFIG != xno ; then
152     ## don't try to run the test against uninstalled libtool libs
153     if $PKG_CONFIG --uninstalled $pkg_config_args; then
154           echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
155           enable_glibtest=no
156     fi
158     if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
159           :
160     else
161           no_glib=yes
162     fi
163   fi
165   if test x"$no_glib" = x ; then
166     GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
167     GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
168     GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
169     GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
171     GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
172     GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
173     glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
174            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
175     glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
176            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
177     glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
178            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
179     if test "x$enable_glibtest" = "xyes" ; then
180       ac_save_CFLAGS="$CFLAGS"
181       ac_save_LIBS="$LIBS"
182       CFLAGS="$CFLAGS $GLIB_CFLAGS"
183       LIBS="$GLIB_LIBS $LIBS"
184 dnl
185 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
186 dnl checks the results of pkg-config to some extent)
187 dnl
188       rm -f conf.glibtest
189       AC_TRY_RUN([
190 #include <glib.h>
191 #include <stdio.h>
192 #include <stdlib.h>
194 int 
195 main ()
197   unsigned int major, minor, micro;
199   fclose (fopen ("conf.glibtest", "w"));
201   if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, &micro) != 3) {
202      printf("%s, bad version string\n", "$min_glib_version");
203      exit(1);
204    }
206   if ((glib_major_version != $glib_config_major_version) ||
207       (glib_minor_version != $glib_config_minor_version) ||
208       (glib_micro_version != $glib_config_micro_version))
209     {
210       printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
211              $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
212              glib_major_version, glib_minor_version, glib_micro_version);
213       printf ("*** was found! If pkg-config was correct, then it is best\n");
214       printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
215       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
216       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
217       printf("*** required on your system.\n");
218       printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
219       printf("*** to point to the correct configuration files\n");
220     } 
221   else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
222            (glib_minor_version != GLIB_MINOR_VERSION) ||
223            (glib_micro_version != GLIB_MICRO_VERSION))
224     {
225       printf("*** GLIB header files (version %d.%d.%d) do not match\n",
226              GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
227       printf("*** library (version %d.%d.%d)\n",
228              glib_major_version, glib_minor_version, glib_micro_version);
229     }
230   else
231     {
232       if ((glib_major_version > major) ||
233         ((glib_major_version == major) && (glib_minor_version > minor)) ||
234         ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
235       {
236         return 0;
237        }
238      else
239       {
240         printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
241                glib_major_version, glib_minor_version, glib_micro_version);
242         printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
243                major, minor, micro);
244         printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
245         printf("***\n");
246         printf("*** If you have already installed a sufficiently new version, this error\n");
247         printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
248         printf("*** being found. The easiest way to fix this is to remove the old version\n");
249         printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
250         printf("*** correct copy of pkg-config. (In this case, you will have to\n");
251         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
252         printf("*** so that the correct libraries are found at run-time))\n");
253       }
254     }
255   return 1;
257 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
258        CFLAGS="$ac_save_CFLAGS"
259        LIBS="$ac_save_LIBS"
260      fi
261   fi
262   if test "x$no_glib" = x ; then
263      AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
264      ifelse([$2], , :, [$2])     
265   else
266      AC_MSG_RESULT(no)
267      if test "$PKG_CONFIG" = "no" ; then
268        echo "*** A new enough version of pkg-config was not found."
269        echo "*** See http://www.freedesktop.org/software/pkgconfig/"
270      else
271        if test -f conf.glibtest ; then
272         :
273        else
274           echo "*** Could not run GLIB test program, checking why..."
275           ac_save_CFLAGS="$CFLAGS"
276           ac_save_LIBS="$LIBS"
277           CFLAGS="$CFLAGS $GLIB_CFLAGS"
278           LIBS="$LIBS $GLIB_LIBS"
279           AC_TRY_LINK([
280 #include <glib.h>
281 #include <stdio.h>
282 ],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
283         [ echo "*** The test program compiled, but did not run. This usually means"
284           echo "*** that the run-time linker is not finding GLIB or finding the wrong"
285           echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
286           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
287           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
288           echo "*** is required on your system"
289           echo "***"
290           echo "*** If you have an old version installed, it is best to remove it, although"
291           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
292         [ echo "*** The test program failed to compile or link. See the file config.log for the"
293           echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
294           CFLAGS="$ac_save_CFLAGS"
295           LIBS="$ac_save_LIBS"
296        fi
297      fi
298      GLIB_CFLAGS=""
299      GLIB_LIBS=""
300      GLIB_GENMARSHAL=""
301      GOBJECT_QUERY=""
302      GLIB_MKENUMS=""
303      GLIB_COMPILE_RESOURCES=""
304      ifelse([$3], , :, [$3])
305   fi
306   AC_SUBST(GLIB_CFLAGS)
307   AC_SUBST(GLIB_LIBS)
308   AC_SUBST(GLIB_GENMARSHAL)
309   AC_SUBST(GOBJECT_QUERY)
310   AC_SUBST(GLIB_MKENUMS)
311   AC_SUBST(GLIB_COMPILE_RESOURCES)
312   rm -f conf.glibtest
313 ])
315 dnl Autoconf macros for libgcrypt
316 dnl       Copyright (C) 2002, 2004 Free Software Foundation, Inc.
317 dnl
318 dnl This file is free software; as a special exception the author gives
319 dnl unlimited permission to copy and/or distribute it, with or without
320 dnl modifications, as long as this notice is preserved.
321 dnl
322 dnl This file is distributed in the hope that it will be useful, but
323 dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
324 dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
327 dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION,
328 dnl                   [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
329 dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS.
330 dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed
331 dnl with the API version to also check the API compatibility. Example:
332 dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed
333 dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1.  Using
334 dnl this features allows to prevent build against newer versions of libgcrypt
335 dnl with a changed API.
336 dnl
337 AC_DEFUN([AM_PATH_LIBGCRYPT],
338 [ AC_ARG_WITH(libgcrypt-prefix,
339             AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
340                            [prefix where LIBGCRYPT is installed (optional)]),
341      libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
342   if test x$libgcrypt_config_prefix != x ; then
343      if test x${LIBGCRYPT_CONFIG+set} != xset ; then
344         LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
345      fi
346   fi
348   AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
349   tmp=ifelse([$1], ,1:1.2.0,$1)
350   if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
351      req_libgcrypt_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
352      min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
353   else
354      req_libgcrypt_api=0
355      min_libgcrypt_version="$tmp"
356   fi
358   AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
359   ok=no
360   if test "$LIBGCRYPT_CONFIG" != "no" ; then
361     req_major=`echo $min_libgcrypt_version | \
362                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
363     req_minor=`echo $min_libgcrypt_version | \
364                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
365     req_micro=`echo $min_libgcrypt_version | \
366                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
367     libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
368     major=`echo $libgcrypt_config_version | \
369                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
370     minor=`echo $libgcrypt_config_version | \
371                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
372     micro=`echo $libgcrypt_config_version | \
373                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
374     if test "$major" -gt "$req_major"; then
375         ok=yes
376     else
377         if test "$major" -eq "$req_major"; then
378             if test "$minor" -gt "$req_minor"; then
379                ok=yes
380             else
381                if test "$minor" -eq "$req_minor"; then
382                    if test "$micro" -ge "$req_micro"; then
383                      ok=yes
384                    fi
385                fi
386             fi
387         fi
388     fi
389   fi
390   if test $ok = yes; then
391     AC_MSG_RESULT([yes ($libgcrypt_config_version)])
392   else
393     AC_MSG_RESULT(no)
394   fi
395   if test $ok = yes; then
396      # If we have a recent libgcrypt, we should also check that the
397      # API is compatible
398      if test "$req_libgcrypt_api" -gt 0 ; then
399         tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
400         if test "$tmp" -gt 0 ; then
401            AC_MSG_CHECKING([LIBGCRYPT API version])
402            if test "$req_libgcrypt_api" -eq "$tmp" ; then
403              AC_MSG_RESULT([okay])
404            else
405              ok=no
406              AC_MSG_RESULT([does not match. want=$req_libgcrypt_api got=$tmp])
407            fi
408         fi
409      fi
410   fi
411   if test $ok = yes; then
412     LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
413     LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
414     ifelse([$2], , :, [$2])
415     if test x"$host" != x ; then
416       libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
417       if test x"$libgcrypt_config_host" != xnone ; then
418         if test x"$libgcrypt_config_host" != x"$host" ; then
419   AC_MSG_WARN([[
420 ***
421 *** The config script $LIBGCRYPT_CONFIG was
422 *** built for $libgcrypt_config_host and thus may not match the
423 *** used host $host.
424 *** You may want to use the configure option --with-libgcrypt-prefix
425 *** to specify a matching config script.
426 ***]])
427         fi
428       fi
429     fi
430   else
431     LIBGCRYPT_CFLAGS=""
432     LIBGCRYPT_LIBS=""
433     ifelse([$3], , :, [$3])
434   fi
435   AC_SUBST(LIBGCRYPT_CFLAGS)
436   AC_SUBST(LIBGCRYPT_LIBS)
437 ])
439 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
441 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
442 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
443 #                 Foundation, Inc.
444 #   Written by Gordon Matzigkeit, 1996
446 # This file is free software; the Free Software Foundation gives
447 # unlimited permission to copy and/or distribute it, with or without
448 # modifications, as long as this notice is preserved.
450 m4_define([_LT_COPYING], [dnl
451 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
452 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
453 #                 Foundation, Inc.
454 #   Written by Gordon Matzigkeit, 1996
456 #   This file is part of GNU Libtool.
458 # GNU Libtool is free software; you can redistribute it and/or
459 # modify it under the terms of the GNU General Public License as
460 # published by the Free Software Foundation; either version 2 of
461 # the License, or (at your option) any later version.
463 # As a special exception to the GNU General Public License,
464 # if you distribute this file as part of a program or library that
465 # is built using GNU Libtool, you may include this file under the
466 # same distribution terms that you use for the rest of that program.
468 # GNU Libtool is distributed in the hope that it will be useful,
469 # but WITHOUT ANY WARRANTY; without even the implied warranty of
470 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
471 # GNU General Public License for more details.
473 # You should have received a copy of the GNU General Public License
474 # along with GNU Libtool; see the file COPYING.  If not, a copy
475 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
476 # obtained by writing to the Free Software Foundation, Inc.,
477 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
478 ])
480 # serial 57 LT_INIT
483 # LT_PREREQ(VERSION)
484 # ------------------
485 # Complain and exit if this libtool version is less that VERSION.
486 m4_defun([LT_PREREQ],
487 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
488        [m4_default([$3],
489                    [m4_fatal([Libtool version $1 or higher is required],
490                              63)])],
491        [$2])])
494 # _LT_CHECK_BUILDDIR
495 # ------------------
496 # Complain if the absolute build directory name contains unusual characters
497 m4_defun([_LT_CHECK_BUILDDIR],
498 [case `pwd` in
499   *\ * | *\     *)
500     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
501 esac
502 ])
505 # LT_INIT([OPTIONS])
506 # ------------------
507 AC_DEFUN([LT_INIT],
508 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
509 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
510 AC_BEFORE([$0], [LT_LANG])dnl
511 AC_BEFORE([$0], [LT_OUTPUT])dnl
512 AC_BEFORE([$0], [LTDL_INIT])dnl
513 m4_require([_LT_CHECK_BUILDDIR])dnl
515 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
516 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
517 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
518 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
519 dnl unless we require an AC_DEFUNed macro:
520 AC_REQUIRE([LTOPTIONS_VERSION])dnl
521 AC_REQUIRE([LTSUGAR_VERSION])dnl
522 AC_REQUIRE([LTVERSION_VERSION])dnl
523 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
524 m4_require([_LT_PROG_LTMAIN])dnl
526 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
528 dnl Parse OPTIONS
529 _LT_SET_OPTIONS([$0], [$1])
531 # This can be used to rebuild libtool when needed
532 LIBTOOL_DEPS="$ltmain"
534 # Always use our own libtool.
535 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
536 AC_SUBST(LIBTOOL)dnl
538 _LT_SETUP
540 # Only expand once:
541 m4_define([LT_INIT])
542 ])# LT_INIT
544 # Old names:
545 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
546 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
547 dnl aclocal-1.4 backwards compatibility:
548 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
549 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
552 # _LT_CC_BASENAME(CC)
553 # -------------------
554 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
555 m4_defun([_LT_CC_BASENAME],
556 [for cc_temp in $1""; do
557   case $cc_temp in
558     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
559     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
560     \-*) ;;
561     *) break;;
562   esac
563 done
564 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
565 ])
568 # _LT_FILEUTILS_DEFAULTS
569 # ----------------------
570 # It is okay to use these file commands and assume they have been set
571 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
572 m4_defun([_LT_FILEUTILS_DEFAULTS],
573 [: ${CP="cp -f"}
574 : ${MV="mv -f"}
575 : ${RM="rm -f"}
576 ])# _LT_FILEUTILS_DEFAULTS
579 # _LT_SETUP
580 # ---------
581 m4_defun([_LT_SETUP],
582 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
583 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
584 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
585 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
587 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
588 dnl
589 _LT_DECL([], [host_alias], [0], [The host system])dnl
590 _LT_DECL([], [host], [0])dnl
591 _LT_DECL([], [host_os], [0])dnl
592 dnl
593 _LT_DECL([], [build_alias], [0], [The build system])dnl
594 _LT_DECL([], [build], [0])dnl
595 _LT_DECL([], [build_os], [0])dnl
596 dnl
597 AC_REQUIRE([AC_PROG_CC])dnl
598 AC_REQUIRE([LT_PATH_LD])dnl
599 AC_REQUIRE([LT_PATH_NM])dnl
600 dnl
601 AC_REQUIRE([AC_PROG_LN_S])dnl
602 test -z "$LN_S" && LN_S="ln -s"
603 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
604 dnl
605 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
606 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
607 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
608 dnl
609 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
610 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
611 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
612 m4_require([_LT_CMD_RELOAD])dnl
613 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
614 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
615 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
616 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
617 m4_require([_LT_WITH_SYSROOT])dnl
619 _LT_CONFIG_LIBTOOL_INIT([
620 # See if we are running on zsh, and set the options which allow our
621 # commands through without removal of \ escapes INIT.
622 if test -n "\${ZSH_VERSION+set}" ; then
623    setopt NO_GLOB_SUBST
624 fi
625 ])
626 if test -n "${ZSH_VERSION+set}" ; then
627    setopt NO_GLOB_SUBST
628 fi
630 _LT_CHECK_OBJDIR
632 m4_require([_LT_TAG_COMPILER])dnl
634 case $host_os in
635 aix3*)
636   # AIX sometimes has problems with the GCC collect2 program.  For some
637   # reason, if we set the COLLECT_NAMES environment variable, the problems
638   # vanish in a puff of smoke.
639   if test "X${COLLECT_NAMES+set}" != Xset; then
640     COLLECT_NAMES=
641     export COLLECT_NAMES
642   fi
643   ;;
644 esac
646 # Global variables:
647 ofile=libtool
648 can_build_shared=yes
650 # All known linkers require a `.a' archive for static linking (except MSVC,
651 # which needs '.lib').
652 libext=a
654 with_gnu_ld="$lt_cv_prog_gnu_ld"
656 old_CC="$CC"
657 old_CFLAGS="$CFLAGS"
659 # Set sane defaults for various variables
660 test -z "$CC" && CC=cc
661 test -z "$LTCC" && LTCC=$CC
662 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
663 test -z "$LD" && LD=ld
664 test -z "$ac_objext" && ac_objext=o
666 _LT_CC_BASENAME([$compiler])
668 # Only perform the check for file, if the check method requires it
669 test -z "$MAGIC_CMD" && MAGIC_CMD=file
670 case $deplibs_check_method in
671 file_magic*)
672   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
673     _LT_PATH_MAGIC
674   fi
675   ;;
676 esac
678 # Use C for the default configuration in the libtool script
679 LT_SUPPORTED_TAG([CC])
680 _LT_LANG_C_CONFIG
681 _LT_LANG_DEFAULT_CONFIG
682 _LT_CONFIG_COMMANDS
683 ])# _LT_SETUP
686 # _LT_PREPARE_SED_QUOTE_VARS
687 # --------------------------
688 # Define a few sed substitution that help us do robust quoting.
689 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
690 [# Backslashify metacharacters that are still active within
691 # double-quoted strings.
692 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
694 # Same as above, but do not quote variable references.
695 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
697 # Sed substitution to delay expansion of an escaped shell variable in a
698 # double_quote_subst'ed string.
699 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
701 # Sed substitution to delay expansion of an escaped single quote.
702 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
704 # Sed substitution to avoid accidental globbing in evaled expressions
705 no_glob_subst='s/\*/\\\*/g'
706 ])
708 # _LT_PROG_LTMAIN
709 # ---------------
710 # Note that this code is called both from `configure', and `config.status'
711 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
712 # `config.status' has no value for ac_aux_dir unless we are using Automake,
713 # so we pass a copy along to make sure it has a sensible value anyway.
714 m4_defun([_LT_PROG_LTMAIN],
715 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
716 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
717 ltmain="$ac_aux_dir/ltmain.sh"
718 ])# _LT_PROG_LTMAIN
722 # So that we can recreate a full libtool script including additional
723 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
724 # in macros and then make a single call at the end using the `libtool'
725 # label.
728 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
729 # ----------------------------------------
730 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
731 m4_define([_LT_CONFIG_LIBTOOL_INIT],
732 [m4_ifval([$1],
733           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
734                      [$1
735 ])])])
737 # Initialize.
738 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
741 # _LT_CONFIG_LIBTOOL([COMMANDS])
742 # ------------------------------
743 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
744 m4_define([_LT_CONFIG_LIBTOOL],
745 [m4_ifval([$1],
746           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
747                      [$1
748 ])])])
750 # Initialize.
751 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
754 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
755 # -----------------------------------------------------
756 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
757 [_LT_CONFIG_LIBTOOL([$1])
758 _LT_CONFIG_LIBTOOL_INIT([$2])
759 ])
762 # _LT_FORMAT_COMMENT([COMMENT])
763 # -----------------------------
764 # Add leading comment marks to the start of each line, and a trailing
765 # full-stop to the whole comment if one is not present already.
766 m4_define([_LT_FORMAT_COMMENT],
767 [m4_ifval([$1], [
768 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
769               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
770 )])
776 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
777 # -------------------------------------------------------------------
778 # CONFIGNAME is the name given to the value in the libtool script.
779 # VARNAME is the (base) name used in the configure script.
780 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
781 # VARNAME.  Any other value will be used directly.
782 m4_define([_LT_DECL],
783 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
784     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
785         [m4_ifval([$1], [$1], [$2])])
786     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
787     m4_ifval([$4],
788         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
789     lt_dict_add_subkey([lt_decl_dict], [$2],
790         [tagged?], [m4_ifval([$5], [yes], [no])])])
791 ])
794 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
795 # --------------------------------------------------------
796 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
799 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
800 # ------------------------------------------------
801 m4_define([lt_decl_tag_varnames],
802 [_lt_decl_filter([tagged?], [yes], $@)])
805 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
806 # ---------------------------------------------------------
807 m4_define([_lt_decl_filter],
808 [m4_case([$#],
809   [0], [m4_fatal([$0: too few arguments: $#])],
810   [1], [m4_fatal([$0: too few arguments: $#: $1])],
811   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
812   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
813   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
814 ])
817 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
818 # --------------------------------------------------
819 m4_define([lt_decl_quote_varnames],
820 [_lt_decl_filter([value], [1], $@)])
823 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
824 # ---------------------------------------------------
825 m4_define([lt_decl_dquote_varnames],
826 [_lt_decl_filter([value], [2], $@)])
829 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
830 # ---------------------------------------------------
831 m4_define([lt_decl_varnames_tagged],
832 [m4_assert([$# <= 2])dnl
833 _$0(m4_quote(m4_default([$1], [[, ]])),
834     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
835     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
836 m4_define([_lt_decl_varnames_tagged],
837 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
840 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
841 # ------------------------------------------------
842 m4_define([lt_decl_all_varnames],
843 [_$0(m4_quote(m4_default([$1], [[, ]])),
844      m4_if([$2], [],
845            m4_quote(lt_decl_varnames),
846         m4_quote(m4_shift($@))))[]dnl
847 ])
848 m4_define([_lt_decl_all_varnames],
849 [lt_join($@, lt_decl_varnames_tagged([$1],
850                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
851 ])
854 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
855 # ------------------------------------
856 # Quote a variable value, and forward it to `config.status' so that its
857 # declaration there will have the same value as in `configure'.  VARNAME
858 # must have a single quote delimited value for this to work.
859 m4_define([_LT_CONFIG_STATUS_DECLARE],
860 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
863 # _LT_CONFIG_STATUS_DECLARATIONS
864 # ------------------------------
865 # We delimit libtool config variables with single quotes, so when
866 # we write them to config.status, we have to be sure to quote all
867 # embedded single quotes properly.  In configure, this macro expands
868 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
870 #    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
871 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
872 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
873     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
876 # _LT_LIBTOOL_TAGS
877 # ----------------
878 # Output comment and list of tags supported by the script
879 m4_defun([_LT_LIBTOOL_TAGS],
880 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
881 available_tags="_LT_TAGS"dnl
882 ])
885 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
886 # -----------------------------------
887 # Extract the dictionary values for VARNAME (optionally with TAG) and
888 # expand to a commented shell variable setting:
890 #    # Some comment about what VAR is for.
891 #    visible_name=$lt_internal_name
892 m4_define([_LT_LIBTOOL_DECLARE],
893 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
894                                            [description])))[]dnl
895 m4_pushdef([_libtool_name],
896     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
897 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
898     [0], [_libtool_name=[$]$1],
899     [1], [_libtool_name=$lt_[]$1],
900     [2], [_libtool_name=$lt_[]$1],
901     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
902 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
903 ])
906 # _LT_LIBTOOL_CONFIG_VARS
907 # -----------------------
908 # Produce commented declarations of non-tagged libtool config variables
909 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
910 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
911 # section) are produced by _LT_LIBTOOL_TAG_VARS.
912 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
913 [m4_foreach([_lt_var],
914     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
915     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
918 # _LT_LIBTOOL_TAG_VARS(TAG)
919 # -------------------------
920 m4_define([_LT_LIBTOOL_TAG_VARS],
921 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
922     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
925 # _LT_TAGVAR(VARNAME, [TAGNAME])
926 # ------------------------------
927 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
930 # _LT_CONFIG_COMMANDS
931 # -------------------
932 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
933 # variables for single and double quote escaping we saved from calls
934 # to _LT_DECL, we can put quote escaped variables declarations
935 # into `config.status', and then the shell code to quote escape them in
936 # for loops in `config.status'.  Finally, any additional code accumulated
937 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
938 m4_defun([_LT_CONFIG_COMMANDS],
939 [AC_PROVIDE_IFELSE([LT_OUTPUT],
940         dnl If the libtool generation code has been placed in $CONFIG_LT,
941         dnl instead of duplicating it all over again into config.status,
942         dnl then we will have config.status run $CONFIG_LT later, so it
943         dnl needs to know what name is stored there:
944         [AC_CONFIG_COMMANDS([libtool],
945             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
946     dnl If the libtool generation code is destined for config.status,
947     dnl expand the accumulated commands and init code now:
948     [AC_CONFIG_COMMANDS([libtool],
949         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
950 ])#_LT_CONFIG_COMMANDS
953 # Initialize.
954 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
957 # The HP-UX ksh and POSIX shell print the target directory to stdout
958 # if CDPATH is set.
959 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
961 sed_quote_subst='$sed_quote_subst'
962 double_quote_subst='$double_quote_subst'
963 delay_variable_subst='$delay_variable_subst'
964 _LT_CONFIG_STATUS_DECLARATIONS
965 LTCC='$LTCC'
966 LTCFLAGS='$LTCFLAGS'
967 compiler='$compiler_DEFAULT'
969 # A function that is used when there is no print builtin or printf.
970 func_fallback_echo ()
972   eval 'cat <<_LTECHO_EOF
973 \$[]1
974 _LTECHO_EOF'
977 # Quote evaled strings.
978 for var in lt_decl_all_varnames([[ \
979 ]], lt_decl_quote_varnames); do
980     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
981     *[[\\\\\\\`\\"\\\$]]*)
982       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
983       ;;
984     *)
985       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
986       ;;
987     esac
988 done
990 # Double-quote double-evaled strings.
991 for var in lt_decl_all_varnames([[ \
992 ]], lt_decl_dquote_varnames); do
993     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
994     *[[\\\\\\\`\\"\\\$]]*)
995       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
996       ;;
997     *)
998       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
999       ;;
1000     esac
1001 done
1003 _LT_OUTPUT_LIBTOOL_INIT
1004 ])
1006 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1007 # ------------------------------------
1008 # Generate a child script FILE with all initialization necessary to
1009 # reuse the environment learned by the parent script, and make the
1010 # file executable.  If COMMENT is supplied, it is inserted after the
1011 # `#!' sequence but before initialization text begins.  After this
1012 # macro, additional text can be appended to FILE to form the body of
1013 # the child script.  The macro ends with non-zero status if the
1014 # file could not be fully written (such as if the disk is full).
1015 m4_ifdef([AS_INIT_GENERATED],
1016 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1017 [m4_defun([_LT_GENERATED_FILE_INIT],
1018 [m4_require([AS_PREPARE])]dnl
1019 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1020 [lt_write_fail=0
1021 cat >$1 <<_ASEOF || lt_write_fail=1
1022 #! $SHELL
1023 # Generated by $as_me.
1024 $2
1025 SHELL=\${CONFIG_SHELL-$SHELL}
1026 export SHELL
1027 _ASEOF
1028 cat >>$1 <<\_ASEOF || lt_write_fail=1
1029 AS_SHELL_SANITIZE
1030 _AS_PREPARE
1031 exec AS_MESSAGE_FD>&1
1032 _ASEOF
1033 test $lt_write_fail = 0 && chmod +x $1[]dnl
1034 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1036 # LT_OUTPUT
1037 # ---------
1038 # This macro allows early generation of the libtool script (before
1039 # AC_OUTPUT is called), incase it is used in configure for compilation
1040 # tests.
1041 AC_DEFUN([LT_OUTPUT],
1042 [: ${CONFIG_LT=./config.lt}
1043 AC_MSG_NOTICE([creating $CONFIG_LT])
1044 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1045 [# Run this file to recreate a libtool stub with the current configuration.])
1047 cat >>"$CONFIG_LT" <<\_LTEOF
1048 lt_cl_silent=false
1049 exec AS_MESSAGE_LOG_FD>>config.log
1051   echo
1052   AS_BOX([Running $as_me.])
1053 } >&AS_MESSAGE_LOG_FD
1055 lt_cl_help="\
1056 \`$as_me' creates a local libtool stub from the current configuration,
1057 for use in further configure time tests before the real libtool is
1058 generated.
1060 Usage: $[0] [[OPTIONS]]
1062   -h, --help      print this help, then exit
1063   -V, --version   print version number, then exit
1064   -q, --quiet     do not print progress messages
1065   -d, --debug     don't remove temporary files
1067 Report bugs to <bug-libtool@gnu.org>."
1069 lt_cl_version="\
1070 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1071 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1072 configured by $[0], generated by m4_PACKAGE_STRING.
1074 Copyright (C) 2011 Free Software Foundation, Inc.
1075 This config.lt script is free software; the Free Software Foundation
1076 gives unlimited permision to copy, distribute and modify it."
1078 while test $[#] != 0
1079 do
1080   case $[1] in
1081     --version | --v* | -V )
1082       echo "$lt_cl_version"; exit 0 ;;
1083     --help | --h* | -h )
1084       echo "$lt_cl_help"; exit 0 ;;
1085     --debug | --d* | -d )
1086       debug=: ;;
1087     --quiet | --q* | --silent | --s* | -q )
1088       lt_cl_silent=: ;;
1090     -*) AC_MSG_ERROR([unrecognized option: $[1]
1091 Try \`$[0] --help' for more information.]) ;;
1093     *) AC_MSG_ERROR([unrecognized argument: $[1]
1094 Try \`$[0] --help' for more information.]) ;;
1095   esac
1096   shift
1097 done
1099 if $lt_cl_silent; then
1100   exec AS_MESSAGE_FD>/dev/null
1101 fi
1102 _LTEOF
1104 cat >>"$CONFIG_LT" <<_LTEOF
1105 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1106 _LTEOF
1108 cat >>"$CONFIG_LT" <<\_LTEOF
1109 AC_MSG_NOTICE([creating $ofile])
1110 _LT_OUTPUT_LIBTOOL_COMMANDS
1111 AS_EXIT(0)
1112 _LTEOF
1113 chmod +x "$CONFIG_LT"
1115 # configure is writing to config.log, but config.lt does its own redirection,
1116 # appending to config.log, which fails on DOS, as config.log is still kept
1117 # open by configure.  Here we exec the FD to /dev/null, effectively closing
1118 # config.log, so it can be properly (re)opened and appended to by config.lt.
1119 lt_cl_success=:
1120 test "$silent" = yes &&
1121   lt_config_lt_args="$lt_config_lt_args --quiet"
1122 exec AS_MESSAGE_LOG_FD>/dev/null
1123 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1124 exec AS_MESSAGE_LOG_FD>>config.log
1125 $lt_cl_success || AS_EXIT(1)
1126 ])# LT_OUTPUT
1129 # _LT_CONFIG(TAG)
1130 # ---------------
1131 # If TAG is the built-in tag, create an initial libtool script with a
1132 # default configuration from the untagged config vars.  Otherwise add code
1133 # to config.status for appending the configuration named by TAG from the
1134 # matching tagged config vars.
1135 m4_defun([_LT_CONFIG],
1136 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1137 _LT_CONFIG_SAVE_COMMANDS([
1138   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1139   m4_if(_LT_TAG, [C], [
1140     # See if we are running on zsh, and set the options which allow our
1141     # commands through without removal of \ escapes.
1142     if test -n "${ZSH_VERSION+set}" ; then
1143       setopt NO_GLOB_SUBST
1144     fi
1146     cfgfile="${ofile}T"
1147     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1148     $RM "$cfgfile"
1150     cat <<_LT_EOF >> "$cfgfile"
1151 #! $SHELL
1153 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1154 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1155 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1156 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1158 _LT_COPYING
1159 _LT_LIBTOOL_TAGS
1161 # ### BEGIN LIBTOOL CONFIG
1162 _LT_LIBTOOL_CONFIG_VARS
1163 _LT_LIBTOOL_TAG_VARS
1164 # ### END LIBTOOL CONFIG
1166 _LT_EOF
1168   case $host_os in
1169   aix3*)
1170     cat <<\_LT_EOF >> "$cfgfile"
1171 # AIX sometimes has problems with the GCC collect2 program.  For some
1172 # reason, if we set the COLLECT_NAMES environment variable, the problems
1173 # vanish in a puff of smoke.
1174 if test "X${COLLECT_NAMES+set}" != Xset; then
1175   COLLECT_NAMES=
1176   export COLLECT_NAMES
1177 fi
1178 _LT_EOF
1179     ;;
1180   esac
1182   _LT_PROG_LTMAIN
1184   # We use sed instead of cat because bash on DJGPP gets confused if
1185   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1186   # text mode, it properly converts lines to CR/LF.  This bash problem
1187   # is reportedly fixed, but why not run on old versions too?
1188   sed '$q' "$ltmain" >> "$cfgfile" \
1189      || (rm -f "$cfgfile"; exit 1)
1191   _LT_PROG_REPLACE_SHELLFNS
1193    mv -f "$cfgfile" "$ofile" ||
1194     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1195   chmod +x "$ofile"
1196 ],
1197 [cat <<_LT_EOF >> "$ofile"
1199 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1200 dnl in a comment (ie after a #).
1201 # ### BEGIN LIBTOOL TAG CONFIG: $1
1202 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
1203 # ### END LIBTOOL TAG CONFIG: $1
1204 _LT_EOF
1205 ])dnl /m4_if
1206 ],
1207 [m4_if([$1], [], [
1208     PACKAGE='$PACKAGE'
1209     VERSION='$VERSION'
1210     TIMESTAMP='$TIMESTAMP'
1211     RM='$RM'
1212     ofile='$ofile'], [])
1213 ])dnl /_LT_CONFIG_SAVE_COMMANDS
1214 ])# _LT_CONFIG
1217 # LT_SUPPORTED_TAG(TAG)
1218 # ---------------------
1219 # Trace this macro to discover what tags are supported by the libtool
1220 # --tag option, using:
1221 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1222 AC_DEFUN([LT_SUPPORTED_TAG], [])
1225 # C support is built-in for now
1226 m4_define([_LT_LANG_C_enabled], [])
1227 m4_define([_LT_TAGS], [])
1230 # LT_LANG(LANG)
1231 # -------------
1232 # Enable libtool support for the given language if not already enabled.
1233 AC_DEFUN([LT_LANG],
1234 [AC_BEFORE([$0], [LT_OUTPUT])dnl
1235 m4_case([$1],
1236   [C],                  [_LT_LANG(C)],
1237   [C++],                [_LT_LANG(CXX)],
1238   [Go],                 [_LT_LANG(GO)],
1239   [Java],               [_LT_LANG(GCJ)],
1240   [Fortran 77],         [_LT_LANG(F77)],
1241   [Fortran],            [_LT_LANG(FC)],
1242   [Windows Resource],   [_LT_LANG(RC)],
1243   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1244     [_LT_LANG($1)],
1245     [m4_fatal([$0: unsupported language: "$1"])])])dnl
1246 ])# LT_LANG
1249 # _LT_LANG(LANGNAME)
1250 # ------------------
1251 m4_defun([_LT_LANG],
1252 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
1253   [LT_SUPPORTED_TAG([$1])dnl
1254   m4_append([_LT_TAGS], [$1 ])dnl
1255   m4_define([_LT_LANG_]$1[_enabled], [])dnl
1256   _LT_LANG_$1_CONFIG($1)])dnl
1257 ])# _LT_LANG
1260 m4_ifndef([AC_PROG_GO], [
1261 # NOTE: This macro has been submitted for inclusion into   #
1262 #  GNU Autoconf as AC_PROG_GO.  When it is available in    #
1263 #  a released version of Autoconf we should remove this    #
1264 #  macro and use it instead.                               #
1265 m4_defun([AC_PROG_GO],
1266 [AC_LANG_PUSH(Go)dnl
1267 AC_ARG_VAR([GOC],     [Go compiler command])dnl
1268 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1269 _AC_ARG_VAR_LDFLAGS()dnl
1270 AC_CHECK_TOOL(GOC, gccgo)
1271 if test -z "$GOC"; then
1272   if test -n "$ac_tool_prefix"; then
1273     AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1274   fi
1275 fi
1276 if test -z "$GOC"; then
1277   AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1278 fi
1279 ])#m4_defun
1280 ])#m4_ifndef
1283 # _LT_LANG_DEFAULT_CONFIG
1284 # -----------------------
1285 m4_defun([_LT_LANG_DEFAULT_CONFIG],
1286 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
1287   [LT_LANG(CXX)],
1288   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1290 AC_PROVIDE_IFELSE([AC_PROG_F77],
1291   [LT_LANG(F77)],
1292   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1294 AC_PROVIDE_IFELSE([AC_PROG_FC],
1295   [LT_LANG(FC)],
1296   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1298 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1299 dnl pulling things in needlessly.
1300 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1301   [LT_LANG(GCJ)],
1302   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1303     [LT_LANG(GCJ)],
1304     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1305       [LT_LANG(GCJ)],
1306       [m4_ifdef([AC_PROG_GCJ],
1307         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1308        m4_ifdef([A][M_PROG_GCJ],
1309         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1310        m4_ifdef([LT_PROG_GCJ],
1311         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1313 AC_PROVIDE_IFELSE([AC_PROG_GO],
1314   [LT_LANG(GO)],
1315   [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
1317 AC_PROVIDE_IFELSE([LT_PROG_RC],
1318   [LT_LANG(RC)],
1319   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1320 ])# _LT_LANG_DEFAULT_CONFIG
1322 # Obsolete macros:
1323 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1324 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1325 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1326 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1327 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1328 dnl aclocal-1.4 backwards compatibility:
1329 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1330 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1331 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1332 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1333 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1336 # _LT_TAG_COMPILER
1337 # ----------------
1338 m4_defun([_LT_TAG_COMPILER],
1339 [AC_REQUIRE([AC_PROG_CC])dnl
1341 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1342 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1343 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1344 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1346 # If no C compiler was specified, use CC.
1347 LTCC=${LTCC-"$CC"}
1349 # If no C compiler flags were specified, use CFLAGS.
1350 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1352 # Allow CC to be a program name with arguments.
1353 compiler=$CC
1354 ])# _LT_TAG_COMPILER
1357 # _LT_COMPILER_BOILERPLATE
1358 # ------------------------
1359 # Check for compiler boilerplate output or warnings with
1360 # the simple compiler test code.
1361 m4_defun([_LT_COMPILER_BOILERPLATE],
1362 [m4_require([_LT_DECL_SED])dnl
1363 ac_outfile=conftest.$ac_objext
1364 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1365 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1366 _lt_compiler_boilerplate=`cat conftest.err`
1367 $RM conftest*
1368 ])# _LT_COMPILER_BOILERPLATE
1371 # _LT_LINKER_BOILERPLATE
1372 # ----------------------
1373 # Check for linker boilerplate output or warnings with
1374 # the simple link test code.
1375 m4_defun([_LT_LINKER_BOILERPLATE],
1376 [m4_require([_LT_DECL_SED])dnl
1377 ac_outfile=conftest.$ac_objext
1378 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1379 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1380 _lt_linker_boilerplate=`cat conftest.err`
1381 $RM -r conftest*
1382 ])# _LT_LINKER_BOILERPLATE
1384 # _LT_REQUIRED_DARWIN_CHECKS
1385 # -------------------------
1386 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1387   case $host_os in
1388     rhapsody* | darwin*)
1389     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1390     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1391     AC_CHECK_TOOL([LIPO], [lipo], [:])
1392     AC_CHECK_TOOL([OTOOL], [otool], [:])
1393     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1394     _LT_DECL([], [DSYMUTIL], [1],
1395       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1396     _LT_DECL([], [NMEDIT], [1],
1397       [Tool to change global to local symbols on Mac OS X])
1398     _LT_DECL([], [LIPO], [1],
1399       [Tool to manipulate fat objects and archives on Mac OS X])
1400     _LT_DECL([], [OTOOL], [1],
1401       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1402     _LT_DECL([], [OTOOL64], [1],
1403       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1405     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1406       [lt_cv_apple_cc_single_mod=no
1407       if test -z "${LT_MULTI_MODULE}"; then
1408         # By default we will add the -single_module flag. You can override
1409         # by either setting the environment variable LT_MULTI_MODULE
1410         # non-empty at configure time, or by adding -multi_module to the
1411         # link flags.
1412         rm -rf libconftest.dylib*
1413         echo "int foo(void){return 1;}" > conftest.c
1414         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1415 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1416         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1417           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1418         _lt_result=$?
1419         # If there is a non-empty error log, and "single_module"
1420         # appears in it, assume the flag caused a linker warning
1421         if test -s conftest.err && $GREP single_module conftest.err; then
1422           cat conftest.err >&AS_MESSAGE_LOG_FD
1423         # Otherwise, if the output was created with a 0 exit code from
1424         # the compiler, it worked.
1425         elif test -f libconftest.dylib && test $_lt_result -eq 0; then
1426           lt_cv_apple_cc_single_mod=yes
1427         else
1428           cat conftest.err >&AS_MESSAGE_LOG_FD
1429         fi
1430         rm -rf libconftest.dylib*
1431         rm -f conftest.*
1432       fi])
1434     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1435       [lt_cv_ld_exported_symbols_list],
1436       [lt_cv_ld_exported_symbols_list=no
1437       save_LDFLAGS=$LDFLAGS
1438       echo "_main" > conftest.sym
1439       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1440       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1441         [lt_cv_ld_exported_symbols_list=yes],
1442         [lt_cv_ld_exported_symbols_list=no])
1443         LDFLAGS="$save_LDFLAGS"
1444     ])
1446     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1447       [lt_cv_ld_force_load=no
1448       cat > conftest.c << _LT_EOF
1449 int forced_loaded() { return 2;}
1450 _LT_EOF
1451       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1452       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1453       echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1454       $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1455       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1456       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1457       cat > conftest.c << _LT_EOF
1458 int main() { return 0;}
1459 _LT_EOF
1460       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1461       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1462       _lt_result=$?
1463       if test -s conftest.err && $GREP force_load conftest.err; then
1464         cat conftest.err >&AS_MESSAGE_LOG_FD
1465       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1466         lt_cv_ld_force_load=yes
1467       else
1468         cat conftest.err >&AS_MESSAGE_LOG_FD
1469       fi
1470         rm -f conftest.err libconftest.a conftest conftest.c
1471         rm -rf conftest.dSYM
1472     ])
1473     case $host_os in
1474     rhapsody* | darwin1.[[012]])
1475       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1476     darwin1.*)
1477       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1478     darwin*) # darwin 5.x on
1479       # if running on 10.5 or later, the deployment target defaults
1480       # to the OS version, if on x86, and 10.4, the deployment
1481       # target defaults to 10.4. Don't you love it?
1482       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1483         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1484           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1485         10.[[012]]*)
1486           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1487         10.*)
1488           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1489       esac
1490     ;;
1491   esac
1492     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1493       _lt_dar_single_mod='$single_module'
1494     fi
1495     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1496       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1497     else
1498       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1499     fi
1500     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1501       _lt_dsymutil='~$DSYMUTIL $lib || :'
1502     else
1503       _lt_dsymutil=
1504     fi
1505     ;;
1506   esac
1507 ])
1510 # _LT_DARWIN_LINKER_FEATURES([TAG])
1511 # ---------------------------------
1512 # Checks for linker and compiler features on darwin
1513 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1515   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1516   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1517   _LT_TAGVAR(hardcode_direct, $1)=no
1518   _LT_TAGVAR(hardcode_automatic, $1)=yes
1519   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1520   if test "$lt_cv_ld_force_load" = "yes"; then
1521     _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\"`'
1522     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1523                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1524   else
1525     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1526   fi
1527   _LT_TAGVAR(link_all_deplibs, $1)=yes
1528   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1529   case $cc_basename in
1530      ifort*) _lt_dar_can_shared=yes ;;
1531      *) _lt_dar_can_shared=$GCC ;;
1532   esac
1533   if test "$_lt_dar_can_shared" = "yes"; then
1534     output_verbose_link_cmd=func_echo_all
1535     _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}"
1536     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1537     _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}"
1538     _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}"
1539     m4_if([$1], [CXX],
1540 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1541       _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}"
1542       _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}"
1543     fi
1544 ],[])
1545   else
1546   _LT_TAGVAR(ld_shlibs, $1)=no
1547   fi
1548 ])
1550 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1551 # ----------------------------------
1552 # Links a minimal program and checks the executable
1553 # for the system default hardcoded library path. In most cases,
1554 # this is /usr/lib:/lib, but when the MPI compilers are used
1555 # the location of the communication and MPI libs are included too.
1556 # If we don't find anything, use the default library path according
1557 # to the aix ld manual.
1558 # Store the results from the different compilers for each TAGNAME.
1559 # Allow to override them for all tags through lt_cv_aix_libpath.
1560 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1561 [m4_require([_LT_DECL_SED])dnl
1562 if test "${lt_cv_aix_libpath+set}" = set; then
1563   aix_libpath=$lt_cv_aix_libpath
1564 else
1565   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1566   [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1567   lt_aix_libpath_sed='[
1568       /Import File Strings/,/^$/ {
1569           /^0/ {
1570               s/^0  *\([^ ]*\) *$/\1/
1571               p
1572           }
1573       }]'
1574   _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1575   # Check for a 64-bit object if we didn't find anything.
1576   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1577     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1578   fi],[])
1579   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1580     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1581   fi
1582   ])
1583   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1584 fi
1585 ])# _LT_SYS_MODULE_PATH_AIX
1588 # _LT_SHELL_INIT(ARG)
1589 # -------------------
1590 m4_define([_LT_SHELL_INIT],
1591 [m4_divert_text([M4SH-INIT], [$1
1592 ])])# _LT_SHELL_INIT
1596 # _LT_PROG_ECHO_BACKSLASH
1597 # -----------------------
1598 # Find how we can fake an echo command that does not interpret backslash.
1599 # In particular, with Autoconf 2.60 or later we add some code to the start
1600 # of the generated configure script which will find a shell with a builtin
1601 # printf (which we can use as an echo command).
1602 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1603 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1604 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1605 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1607 AC_MSG_CHECKING([how to print strings])
1608 # Test print first, because it will be a builtin if present.
1609 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1610    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1611   ECHO='print -r --'
1612 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1613   ECHO='printf %s\n'
1614 else
1615   # Use this function as a fallback that always works.
1616   func_fallback_echo ()
1617   {
1618     eval 'cat <<_LTECHO_EOF
1619 $[]1
1620 _LTECHO_EOF'
1621   }
1622   ECHO='func_fallback_echo'
1623 fi
1625 # func_echo_all arg...
1626 # Invoke $ECHO with all args, space-separated.
1627 func_echo_all ()
1629     $ECHO "$*" 
1632 case "$ECHO" in
1633   printf*) AC_MSG_RESULT([printf]) ;;
1634   print*) AC_MSG_RESULT([print -r]) ;;
1635   *) AC_MSG_RESULT([cat]) ;;
1636 esac
1638 m4_ifdef([_AS_DETECT_SUGGESTED],
1639 [_AS_DETECT_SUGGESTED([
1640   test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1641     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1642     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1643     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1644     PATH=/empty FPATH=/empty; export PATH FPATH
1645     test "X`printf %s $ECHO`" = "X$ECHO" \
1646       || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1648 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1649 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1650 ])# _LT_PROG_ECHO_BACKSLASH
1653 # _LT_WITH_SYSROOT
1654 # ----------------
1655 AC_DEFUN([_LT_WITH_SYSROOT],
1656 [AC_MSG_CHECKING([for sysroot])
1657 AC_ARG_WITH([sysroot],
1658 [  --with-sysroot[=DIR] Search for dependent libraries within DIR
1659                         (or the compiler's sysroot if not specified).],
1660 [], [with_sysroot=no])
1662 dnl lt_sysroot will always be passed unquoted.  We quote it here
1663 dnl in case the user passed a directory name.
1664 lt_sysroot=
1665 case ${with_sysroot} in #(
1666  yes)
1667    if test "$GCC" = yes; then
1668      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1669    fi
1670    ;; #(
1671  /*)
1672    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1673    ;; #(
1674  no|'')
1675    ;; #(
1676  *)
1677    AC_MSG_RESULT([${with_sysroot}])
1678    AC_MSG_ERROR([The sysroot must be an absolute path.])
1679    ;;
1680 esac
1682  AC_MSG_RESULT([${lt_sysroot:-no}])
1683 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1684 [dependent libraries, and in which our libraries should be installed.])])
1686 # _LT_ENABLE_LOCK
1687 # ---------------
1688 m4_defun([_LT_ENABLE_LOCK],
1689 [AC_ARG_ENABLE([libtool-lock],
1690   [AS_HELP_STRING([--disable-libtool-lock],
1691     [avoid locking (might break parallel builds)])])
1692 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1694 # Some flags need to be propagated to the compiler or linker for good
1695 # libtool support.
1696 case $host in
1697 ia64-*-hpux*)
1698   # Find out which ABI we are using.
1699   echo 'int i;' > conftest.$ac_ext
1700   if AC_TRY_EVAL(ac_compile); then
1701     case `/usr/bin/file conftest.$ac_objext` in
1702       *ELF-32*)
1703         HPUX_IA64_MODE="32"
1704         ;;
1705       *ELF-64*)
1706         HPUX_IA64_MODE="64"
1707         ;;
1708     esac
1709   fi
1710   rm -rf conftest*
1711   ;;
1712 *-*-irix6*)
1713   # Find out which ABI we are using.
1714   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1715   if AC_TRY_EVAL(ac_compile); then
1716     if test "$lt_cv_prog_gnu_ld" = yes; then
1717       case `/usr/bin/file conftest.$ac_objext` in
1718         *32-bit*)
1719           LD="${LD-ld} -melf32bsmip"
1720           ;;
1721         *N32*)
1722           LD="${LD-ld} -melf32bmipn32"
1723           ;;
1724         *64-bit*)
1725           LD="${LD-ld} -melf64bmip"
1726         ;;
1727       esac
1728     else
1729       case `/usr/bin/file conftest.$ac_objext` in
1730         *32-bit*)
1731           LD="${LD-ld} -32"
1732           ;;
1733         *N32*)
1734           LD="${LD-ld} -n32"
1735           ;;
1736         *64-bit*)
1737           LD="${LD-ld} -64"
1738           ;;
1739       esac
1740     fi
1741   fi
1742   rm -rf conftest*
1743   ;;
1745 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1746 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1747   # Find out which ABI we are using.
1748   echo 'int i;' > conftest.$ac_ext
1749   if AC_TRY_EVAL(ac_compile); then
1750     case `/usr/bin/file conftest.o` in
1751       *32-bit*)
1752         case $host in
1753           x86_64-*kfreebsd*-gnu)
1754             LD="${LD-ld} -m elf_i386_fbsd"
1755             ;;
1756           x86_64-*linux*)
1757             case `/usr/bin/file conftest.o` in
1758               *x86-64*)
1759                 LD="${LD-ld} -m elf32_x86_64"
1760                 ;;
1761               *)
1762                 LD="${LD-ld} -m elf_i386"
1763                 ;;
1764             esac
1765             ;;
1766           powerpc64le-*)
1767             LD="${LD-ld} -m elf32lppclinux"
1768             ;;
1769           powerpc64-*)
1770             LD="${LD-ld} -m elf32ppclinux"
1771             ;;
1772           s390x-*linux*)
1773             LD="${LD-ld} -m elf_s390"
1774             ;;
1775           sparc64-*linux*)
1776             LD="${LD-ld} -m elf32_sparc"
1777             ;;
1778         esac
1779         ;;
1780       *64-bit*)
1781         case $host in
1782           x86_64-*kfreebsd*-gnu)
1783             LD="${LD-ld} -m elf_x86_64_fbsd"
1784             ;;
1785           x86_64-*linux*)
1786             LD="${LD-ld} -m elf_x86_64"
1787             ;;
1788           powerpcle-*)
1789             LD="${LD-ld} -m elf64lppc"
1790             ;;
1791           powerpc-*)
1792             LD="${LD-ld} -m elf64ppc"
1793             ;;
1794           s390*-*linux*|s390*-*tpf*)
1795             LD="${LD-ld} -m elf64_s390"
1796             ;;
1797           sparc*-*linux*)
1798             LD="${LD-ld} -m elf64_sparc"
1799             ;;
1800         esac
1801         ;;
1802     esac
1803   fi
1804   rm -rf conftest*
1805   ;;
1807 *-*-sco3.2v5*)
1808   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1809   SAVE_CFLAGS="$CFLAGS"
1810   CFLAGS="$CFLAGS -belf"
1811   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1812     [AC_LANG_PUSH(C)
1813      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1814      AC_LANG_POP])
1815   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1816     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1817     CFLAGS="$SAVE_CFLAGS"
1818   fi
1819   ;;
1820 *-*solaris*)
1821   # Find out which ABI we are using.
1822   echo 'int i;' > conftest.$ac_ext
1823   if AC_TRY_EVAL(ac_compile); then
1824     case `/usr/bin/file conftest.o` in
1825     *64-bit*)
1826       case $lt_cv_prog_gnu_ld in
1827       yes*)
1828         case $host in
1829         i?86-*-solaris*)
1830           LD="${LD-ld} -m elf_x86_64"
1831           ;;
1832         sparc*-*-solaris*)
1833           LD="${LD-ld} -m elf64_sparc"
1834           ;;
1835         esac
1836         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
1837         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1838           LD="${LD-ld}_sol2"
1839         fi
1840         ;;
1841       *)
1842         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1843           LD="${LD-ld} -64"
1844         fi
1845         ;;
1846       esac
1847       ;;
1848     esac
1849   fi
1850   rm -rf conftest*
1851   ;;
1852 esac
1854 need_locks="$enable_libtool_lock"
1855 ])# _LT_ENABLE_LOCK
1858 # _LT_PROG_AR
1859 # -----------
1860 m4_defun([_LT_PROG_AR],
1861 [AC_CHECK_TOOLS(AR, [ar], false)
1862 : ${AR=ar}
1863 : ${AR_FLAGS=cru}
1864 _LT_DECL([], [AR], [1], [The archiver])
1865 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1867 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1868   [lt_cv_ar_at_file=no
1869    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1870      [echo conftest.$ac_objext > conftest.lst
1871       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1872       AC_TRY_EVAL([lt_ar_try])
1873       if test "$ac_status" -eq 0; then
1874         # Ensure the archiver fails upon bogus file names.
1875         rm -f conftest.$ac_objext libconftest.a
1876         AC_TRY_EVAL([lt_ar_try])
1877         if test "$ac_status" -ne 0; then
1878           lt_cv_ar_at_file=@
1879         fi
1880       fi
1881       rm -f conftest.* libconftest.a
1882      ])
1883   ])
1885 if test "x$lt_cv_ar_at_file" = xno; then
1886   archiver_list_spec=
1887 else
1888   archiver_list_spec=$lt_cv_ar_at_file
1889 fi
1890 _LT_DECL([], [archiver_list_spec], [1],
1891   [How to feed a file listing to the archiver])
1892 ])# _LT_PROG_AR
1895 # _LT_CMD_OLD_ARCHIVE
1896 # -------------------
1897 m4_defun([_LT_CMD_OLD_ARCHIVE],
1898 [_LT_PROG_AR
1900 AC_CHECK_TOOL(STRIP, strip, :)
1901 test -z "$STRIP" && STRIP=:
1902 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1904 AC_CHECK_TOOL(RANLIB, ranlib, :)
1905 test -z "$RANLIB" && RANLIB=:
1906 _LT_DECL([], [RANLIB], [1],
1907     [Commands used to install an old-style archive])
1909 # Determine commands to create old-style static archives.
1910 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1911 old_postinstall_cmds='chmod 644 $oldlib'
1912 old_postuninstall_cmds=
1914 if test -n "$RANLIB"; then
1915   case $host_os in
1916   openbsd*)
1917     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1918     ;;
1919   *)
1920     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1921     ;;
1922   esac
1923   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1924 fi
1926 case $host_os in
1927   darwin*)
1928     lock_old_archive_extraction=yes ;;
1929   *)
1930     lock_old_archive_extraction=no ;;
1931 esac
1932 _LT_DECL([], [old_postinstall_cmds], [2])
1933 _LT_DECL([], [old_postuninstall_cmds], [2])
1934 _LT_TAGDECL([], [old_archive_cmds], [2],
1935     [Commands used to build an old-style archive])
1936 _LT_DECL([], [lock_old_archive_extraction], [0],
1937     [Whether to use a lock for old archive extraction])
1938 ])# _LT_CMD_OLD_ARCHIVE
1941 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1942 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1943 # ----------------------------------------------------------------
1944 # Check whether the given compiler option works
1945 AC_DEFUN([_LT_COMPILER_OPTION],
1946 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1947 m4_require([_LT_DECL_SED])dnl
1948 AC_CACHE_CHECK([$1], [$2],
1949   [$2=no
1950    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1951    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1952    lt_compiler_flag="$3"
1953    # Insert the option either (1) after the last *FLAGS variable, or
1954    # (2) before a word containing "conftest.", or (3) at the end.
1955    # Note that $ac_compile itself does not contain backslashes and begins
1956    # with a dollar sign (not a hyphen), so the echo should work correctly.
1957    # The option is referenced via a variable to avoid confusing sed.
1958    lt_compile=`echo "$ac_compile" | $SED \
1959    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1960    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1961    -e 's:$: $lt_compiler_flag:'`
1962    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1963    (eval "$lt_compile" 2>conftest.err)
1964    ac_status=$?
1965    cat conftest.err >&AS_MESSAGE_LOG_FD
1966    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1967    if (exit $ac_status) && test -s "$ac_outfile"; then
1968      # The compiler can only warn and ignore the option if not recognized
1969      # So say no if there are warnings other than the usual output.
1970      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1971      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1972      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1973        $2=yes
1974      fi
1975    fi
1976    $RM conftest*
1977 ])
1979 if test x"[$]$2" = xyes; then
1980     m4_if([$5], , :, [$5])
1981 else
1982     m4_if([$6], , :, [$6])
1983 fi
1984 ])# _LT_COMPILER_OPTION
1986 # Old name:
1987 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1988 dnl aclocal-1.4 backwards compatibility:
1989 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1992 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1993 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
1994 # ----------------------------------------------------
1995 # Check whether the given linker option works
1996 AC_DEFUN([_LT_LINKER_OPTION],
1997 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1998 m4_require([_LT_DECL_SED])dnl
1999 AC_CACHE_CHECK([$1], [$2],
2000   [$2=no
2001    save_LDFLAGS="$LDFLAGS"
2002    LDFLAGS="$LDFLAGS $3"
2003    echo "$lt_simple_link_test_code" > conftest.$ac_ext
2004    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2005      # The linker can only warn and ignore the option if not recognized
2006      # So say no if there are warnings
2007      if test -s conftest.err; then
2008        # Append any errors to the config.log.
2009        cat conftest.err 1>&AS_MESSAGE_LOG_FD
2010        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2011        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2012        if diff conftest.exp conftest.er2 >/dev/null; then
2013          $2=yes
2014        fi
2015      else
2016        $2=yes
2017      fi
2018    fi
2019    $RM -r conftest*
2020    LDFLAGS="$save_LDFLAGS"
2021 ])
2023 if test x"[$]$2" = xyes; then
2024     m4_if([$4], , :, [$4])
2025 else
2026     m4_if([$5], , :, [$5])
2027 fi
2028 ])# _LT_LINKER_OPTION
2030 # Old name:
2031 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2032 dnl aclocal-1.4 backwards compatibility:
2033 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2036 # LT_CMD_MAX_LEN
2037 #---------------
2038 AC_DEFUN([LT_CMD_MAX_LEN],
2039 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2040 # find the maximum length of command line arguments
2041 AC_MSG_CHECKING([the maximum length of command line arguments])
2042 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2043   i=0
2044   teststring="ABCD"
2046   case $build_os in
2047   msdosdjgpp*)
2048     # On DJGPP, this test can blow up pretty badly due to problems in libc
2049     # (any single argument exceeding 2000 bytes causes a buffer overrun
2050     # during glob expansion).  Even if it were fixed, the result of this
2051     # check would be larger than it should be.
2052     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2053     ;;
2055   gnu*)
2056     # Under GNU Hurd, this test is not required because there is
2057     # no limit to the length of command line arguments.
2058     # Libtool will interpret -1 as no limit whatsoever
2059     lt_cv_sys_max_cmd_len=-1;
2060     ;;
2062   cygwin* | mingw* | cegcc*)
2063     # On Win9x/ME, this test blows up -- it succeeds, but takes
2064     # about 5 minutes as the teststring grows exponentially.
2065     # Worse, since 9x/ME are not pre-emptively multitasking,
2066     # you end up with a "frozen" computer, even though with patience
2067     # the test eventually succeeds (with a max line length of 256k).
2068     # Instead, let's just punt: use the minimum linelength reported by
2069     # all of the supported platforms: 8192 (on NT/2K/XP).
2070     lt_cv_sys_max_cmd_len=8192;
2071     ;;
2073   mint*)
2074     # On MiNT this can take a long time and run out of memory.
2075     lt_cv_sys_max_cmd_len=8192;
2076     ;;
2078   amigaos*)
2079     # On AmigaOS with pdksh, this test takes hours, literally.
2080     # So we just punt and use a minimum line length of 8192.
2081     lt_cv_sys_max_cmd_len=8192;
2082     ;;
2084   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2085     # This has been around since 386BSD, at least.  Likely further.
2086     if test -x /sbin/sysctl; then
2087       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2088     elif test -x /usr/sbin/sysctl; then
2089       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2090     else
2091       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
2092     fi
2093     # And add a safety zone
2094     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2095     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2096     ;;
2098   interix*)
2099     # We know the value 262144 and hardcode it with a safety zone (like BSD)
2100     lt_cv_sys_max_cmd_len=196608
2101     ;;
2103   os2*)
2104     # The test takes a long time on OS/2.
2105     lt_cv_sys_max_cmd_len=8192
2106     ;;
2108   osf*)
2109     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2110     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2111     # nice to cause kernel panics so lets avoid the loop below.
2112     # First set a reasonable default.
2113     lt_cv_sys_max_cmd_len=16384
2114     #
2115     if test -x /sbin/sysconfig; then
2116       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2117         *1*) lt_cv_sys_max_cmd_len=-1 ;;
2118       esac
2119     fi
2120     ;;
2121   sco3.2v5*)
2122     lt_cv_sys_max_cmd_len=102400
2123     ;;
2124   sysv5* | sco5v6* | sysv4.2uw2*)
2125     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2126     if test -n "$kargmax"; then
2127       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
2128     else
2129       lt_cv_sys_max_cmd_len=32768
2130     fi
2131     ;;
2132   *)
2133     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2134     if test -n "$lt_cv_sys_max_cmd_len" && \
2135         test undefined != "$lt_cv_sys_max_cmd_len"; then
2136       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2137       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2138     else
2139       # Make teststring a little bigger before we do anything with it.
2140       # a 1K string should be a reasonable start.
2141       for i in 1 2 3 4 5 6 7 8 ; do
2142         teststring=$teststring$teststring
2143       done
2144       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2145       # If test is not a shell built-in, we'll probably end up computing a
2146       # maximum length that is only half of the actual maximum length, but
2147       # we can't tell.
2148       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
2149                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2150               test $i != 17 # 1/2 MB should be enough
2151       do
2152         i=`expr $i + 1`
2153         teststring=$teststring$teststring
2154       done
2155       # Only check the string length outside the loop.
2156       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2157       teststring=
2158       # Add a significant safety factor because C++ compilers can tack on
2159       # massive amounts of additional arguments before passing them to the
2160       # linker.  It appears as though 1/2 is a usable value.
2161       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2162     fi
2163     ;;
2164   esac
2165 ])
2166 if test -n $lt_cv_sys_max_cmd_len ; then
2167   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2168 else
2169   AC_MSG_RESULT(none)
2170 fi
2171 max_cmd_len=$lt_cv_sys_max_cmd_len
2172 _LT_DECL([], [max_cmd_len], [0],
2173     [What is the maximum length of a command?])
2174 ])# LT_CMD_MAX_LEN
2176 # Old name:
2177 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2178 dnl aclocal-1.4 backwards compatibility:
2179 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2182 # _LT_HEADER_DLFCN
2183 # ----------------
2184 m4_defun([_LT_HEADER_DLFCN],
2185 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2186 ])# _LT_HEADER_DLFCN
2189 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2190 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2191 # ----------------------------------------------------------------
2192 m4_defun([_LT_TRY_DLOPEN_SELF],
2193 [m4_require([_LT_HEADER_DLFCN])dnl
2194 if test "$cross_compiling" = yes; then :
2195   [$4]
2196 else
2197   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2198   lt_status=$lt_dlunknown
2199   cat > conftest.$ac_ext <<_LT_EOF
2200 [#line $LINENO "configure"
2201 #include "confdefs.h"
2203 #if HAVE_DLFCN_H
2204 #include <dlfcn.h>
2205 #endif
2207 #include <stdio.h>
2209 #ifdef RTLD_GLOBAL
2210 #  define LT_DLGLOBAL           RTLD_GLOBAL
2211 #else
2212 #  ifdef DL_GLOBAL
2213 #    define LT_DLGLOBAL         DL_GLOBAL
2214 #  else
2215 #    define LT_DLGLOBAL         0
2216 #  endif
2217 #endif
2219 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2220    find out it does not work in some platform. */
2221 #ifndef LT_DLLAZY_OR_NOW
2222 #  ifdef RTLD_LAZY
2223 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
2224 #  else
2225 #    ifdef DL_LAZY
2226 #      define LT_DLLAZY_OR_NOW          DL_LAZY
2227 #    else
2228 #      ifdef RTLD_NOW
2229 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
2230 #      else
2231 #        ifdef DL_NOW
2232 #          define LT_DLLAZY_OR_NOW      DL_NOW
2233 #        else
2234 #          define LT_DLLAZY_OR_NOW      0
2235 #        endif
2236 #      endif
2237 #    endif
2238 #  endif
2239 #endif
2241 /* When -fvisbility=hidden is used, assume the code has been annotated
2242    correspondingly for the symbols needed.  */
2243 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2244 int fnord () __attribute__((visibility("default")));
2245 #endif
2247 int fnord () { return 42; }
2248 int main ()
2250   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2251   int status = $lt_dlunknown;
2253   if (self)
2254     {
2255       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2256       else
2257         {
2258           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2259           else puts (dlerror ());
2260         }
2261       /* dlclose (self); */
2262     }
2263   else
2264     puts (dlerror ());
2266   return status;
2267 }]
2268 _LT_EOF
2269   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2270     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2271     lt_status=$?
2272     case x$lt_status in
2273       x$lt_dlno_uscore) $1 ;;
2274       x$lt_dlneed_uscore) $2 ;;
2275       x$lt_dlunknown|x*) $3 ;;
2276     esac
2277   else :
2278     # compilation failed
2279     $3
2280   fi
2281 fi
2282 rm -fr conftest*
2283 ])# _LT_TRY_DLOPEN_SELF
2286 # LT_SYS_DLOPEN_SELF
2287 # ------------------
2288 AC_DEFUN([LT_SYS_DLOPEN_SELF],
2289 [m4_require([_LT_HEADER_DLFCN])dnl
2290 if test "x$enable_dlopen" != xyes; then
2291   enable_dlopen=unknown
2292   enable_dlopen_self=unknown
2293   enable_dlopen_self_static=unknown
2294 else
2295   lt_cv_dlopen=no
2296   lt_cv_dlopen_libs=
2298   case $host_os in
2299   beos*)
2300     lt_cv_dlopen="load_add_on"
2301     lt_cv_dlopen_libs=
2302     lt_cv_dlopen_self=yes
2303     ;;
2305   mingw* | pw32* | cegcc*)
2306     lt_cv_dlopen="LoadLibrary"
2307     lt_cv_dlopen_libs=
2308     ;;
2310   cygwin*)
2311     lt_cv_dlopen="dlopen"
2312     lt_cv_dlopen_libs=
2313     ;;
2315   darwin*)
2316   # if libdl is installed we need to link against it
2317     AC_CHECK_LIB([dl], [dlopen],
2318                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2319     lt_cv_dlopen="dyld"
2320     lt_cv_dlopen_libs=
2321     lt_cv_dlopen_self=yes
2322     ])
2323     ;;
2325   *)
2326     AC_CHECK_FUNC([shl_load],
2327           [lt_cv_dlopen="shl_load"],
2328       [AC_CHECK_LIB([dld], [shl_load],
2329             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2330         [AC_CHECK_FUNC([dlopen],
2331               [lt_cv_dlopen="dlopen"],
2332           [AC_CHECK_LIB([dl], [dlopen],
2333                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2334             [AC_CHECK_LIB([svld], [dlopen],
2335                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2336               [AC_CHECK_LIB([dld], [dld_link],
2337                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2338               ])
2339             ])
2340           ])
2341         ])
2342       ])
2343     ;;
2344   esac
2346   if test "x$lt_cv_dlopen" != xno; then
2347     enable_dlopen=yes
2348   else
2349     enable_dlopen=no
2350   fi
2352   case $lt_cv_dlopen in
2353   dlopen)
2354     save_CPPFLAGS="$CPPFLAGS"
2355     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2357     save_LDFLAGS="$LDFLAGS"
2358     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2360     save_LIBS="$LIBS"
2361     LIBS="$lt_cv_dlopen_libs $LIBS"
2363     AC_CACHE_CHECK([whether a program can dlopen itself],
2364           lt_cv_dlopen_self, [dnl
2365           _LT_TRY_DLOPEN_SELF(
2366             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2367             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2368     ])
2370     if test "x$lt_cv_dlopen_self" = xyes; then
2371       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2372       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2373           lt_cv_dlopen_self_static, [dnl
2374           _LT_TRY_DLOPEN_SELF(
2375             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2376             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2377       ])
2378     fi
2380     CPPFLAGS="$save_CPPFLAGS"
2381     LDFLAGS="$save_LDFLAGS"
2382     LIBS="$save_LIBS"
2383     ;;
2384   esac
2386   case $lt_cv_dlopen_self in
2387   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2388   *) enable_dlopen_self=unknown ;;
2389   esac
2391   case $lt_cv_dlopen_self_static in
2392   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2393   *) enable_dlopen_self_static=unknown ;;
2394   esac
2395 fi
2396 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2397          [Whether dlopen is supported])
2398 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2399          [Whether dlopen of programs is supported])
2400 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2401          [Whether dlopen of statically linked programs is supported])
2402 ])# LT_SYS_DLOPEN_SELF
2404 # Old name:
2405 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2406 dnl aclocal-1.4 backwards compatibility:
2407 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2410 # _LT_COMPILER_C_O([TAGNAME])
2411 # ---------------------------
2412 # Check to see if options -c and -o are simultaneously supported by compiler.
2413 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2414 m4_defun([_LT_COMPILER_C_O],
2415 [m4_require([_LT_DECL_SED])dnl
2416 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2417 m4_require([_LT_TAG_COMPILER])dnl
2418 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2419   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2420   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2421    $RM -r conftest 2>/dev/null
2422    mkdir conftest
2423    cd conftest
2424    mkdir out
2425    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2427    lt_compiler_flag="-o out/conftest2.$ac_objext"
2428    # Insert the option either (1) after the last *FLAGS variable, or
2429    # (2) before a word containing "conftest.", or (3) at the end.
2430    # Note that $ac_compile itself does not contain backslashes and begins
2431    # with a dollar sign (not a hyphen), so the echo should work correctly.
2432    lt_compile=`echo "$ac_compile" | $SED \
2433    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2434    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2435    -e 's:$: $lt_compiler_flag:'`
2436    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2437    (eval "$lt_compile" 2>out/conftest.err)
2438    ac_status=$?
2439    cat out/conftest.err >&AS_MESSAGE_LOG_FD
2440    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2441    if (exit $ac_status) && test -s out/conftest2.$ac_objext
2442    then
2443      # The compiler can only warn and ignore the option if not recognized
2444      # So say no if there are warnings
2445      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2446      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2447      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2448        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2449      fi
2450    fi
2451    chmod u+w . 2>&AS_MESSAGE_LOG_FD
2452    $RM conftest*
2453    # SGI C++ compiler will create directory out/ii_files/ for
2454    # template instantiation
2455    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2456    $RM out/* && rmdir out
2457    cd ..
2458    $RM -r conftest
2459    $RM conftest*
2460 ])
2461 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2462         [Does compiler simultaneously support -c and -o options?])
2463 ])# _LT_COMPILER_C_O
2466 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2467 # ----------------------------------
2468 # Check to see if we can do hard links to lock some files if needed
2469 m4_defun([_LT_COMPILER_FILE_LOCKS],
2470 [m4_require([_LT_ENABLE_LOCK])dnl
2471 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2472 _LT_COMPILER_C_O([$1])
2474 hard_links="nottested"
2475 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2476   # do not overwrite the value of need_locks provided by the user
2477   AC_MSG_CHECKING([if we can lock with hard links])
2478   hard_links=yes
2479   $RM conftest*
2480   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2481   touch conftest.a
2482   ln conftest.a conftest.b 2>&5 || hard_links=no
2483   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2484   AC_MSG_RESULT([$hard_links])
2485   if test "$hard_links" = no; then
2486     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2487     need_locks=warn
2488   fi
2489 else
2490   need_locks=no
2491 fi
2492 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2493 ])# _LT_COMPILER_FILE_LOCKS
2496 # _LT_CHECK_OBJDIR
2497 # ----------------
2498 m4_defun([_LT_CHECK_OBJDIR],
2499 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2500 [rm -f .libs 2>/dev/null
2501 mkdir .libs 2>/dev/null
2502 if test -d .libs; then
2503   lt_cv_objdir=.libs
2504 else
2505   # MS-DOS does not allow filenames that begin with a dot.
2506   lt_cv_objdir=_libs
2507 fi
2508 rmdir .libs 2>/dev/null])
2509 objdir=$lt_cv_objdir
2510 _LT_DECL([], [objdir], [0],
2511          [The name of the directory that contains temporary libtool files])dnl
2512 m4_pattern_allow([LT_OBJDIR])dnl
2513 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2514   [Define to the sub-directory in which libtool stores uninstalled libraries.])
2515 ])# _LT_CHECK_OBJDIR
2518 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2519 # --------------------------------------
2520 # Check hardcoding attributes.
2521 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2522 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2523 _LT_TAGVAR(hardcode_action, $1)=
2524 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2525    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2526    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2528   # We can hardcode non-existent directories.
2529   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2530      # If the only mechanism to avoid hardcoding is shlibpath_var, we
2531      # have to relink, otherwise we might link with an installed library
2532      # when we should be linking with a yet-to-be-installed one
2533      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2534      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2535     # Linking always hardcodes the temporary library directory.
2536     _LT_TAGVAR(hardcode_action, $1)=relink
2537   else
2538     # We can link without hardcoding, and we can hardcode nonexisting dirs.
2539     _LT_TAGVAR(hardcode_action, $1)=immediate
2540   fi
2541 else
2542   # We cannot hardcode anything, or else we can only hardcode existing
2543   # directories.
2544   _LT_TAGVAR(hardcode_action, $1)=unsupported
2545 fi
2546 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2548 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2549    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2550   # Fast installation is not supported
2551   enable_fast_install=no
2552 elif test "$shlibpath_overrides_runpath" = yes ||
2553      test "$enable_shared" = no; then
2554   # Fast installation is not necessary
2555   enable_fast_install=needless
2556 fi
2557 _LT_TAGDECL([], [hardcode_action], [0],
2558     [How to hardcode a shared library path into an executable])
2559 ])# _LT_LINKER_HARDCODE_LIBPATH
2562 # _LT_CMD_STRIPLIB
2563 # ----------------
2564 m4_defun([_LT_CMD_STRIPLIB],
2565 [m4_require([_LT_DECL_EGREP])
2566 striplib=
2567 old_striplib=
2568 AC_MSG_CHECKING([whether stripping libraries is possible])
2569 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2570   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2571   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2572   AC_MSG_RESULT([yes])
2573 else
2574 # FIXME - insert some real tests, host_os isn't really good enough
2575   case $host_os in
2576   darwin*)
2577     if test -n "$STRIP" ; then
2578       striplib="$STRIP -x"
2579       old_striplib="$STRIP -S"
2580       AC_MSG_RESULT([yes])
2581     else
2582       AC_MSG_RESULT([no])
2583     fi
2584     ;;
2585   *)
2586     AC_MSG_RESULT([no])
2587     ;;
2588   esac
2589 fi
2590 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2591 _LT_DECL([], [striplib], [1])
2592 ])# _LT_CMD_STRIPLIB
2595 # _LT_SYS_DYNAMIC_LINKER([TAG])
2596 # -----------------------------
2597 # PORTME Fill in your ld.so characteristics
2598 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2599 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2600 m4_require([_LT_DECL_EGREP])dnl
2601 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2602 m4_require([_LT_DECL_OBJDUMP])dnl
2603 m4_require([_LT_DECL_SED])dnl
2604 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2605 AC_MSG_CHECKING([dynamic linker characteristics])
2606 m4_if([$1],
2607         [], [
2608 if test "$GCC" = yes; then
2609   case $host_os in
2610     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2611     *) lt_awk_arg="/^libraries:/" ;;
2612   esac
2613   case $host_os in
2614     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2615     *) lt_sed_strip_eq="s,=/,/,g" ;;
2616   esac
2617   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2618   case $lt_search_path_spec in
2619   *\;*)
2620     # if the path contains ";" then we assume it to be the separator
2621     # otherwise default to the standard path separator (i.e. ":") - it is
2622     # assumed that no part of a normal pathname contains ";" but that should
2623     # okay in the real world where ";" in dirpaths is itself problematic.
2624     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2625     ;;
2626   *)
2627     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2628     ;;
2629   esac
2630   # Ok, now we have the path, separated by spaces, we can step through it
2631   # and add multilib dir if necessary.
2632   lt_tmp_lt_search_path_spec=
2633   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2634   for lt_sys_path in $lt_search_path_spec; do
2635     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2636       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2637     else
2638       test -d "$lt_sys_path" && \
2639         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2640     fi
2641   done
2642   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2643 BEGIN {RS=" "; FS="/|\n";} {
2644   lt_foo="";
2645   lt_count=0;
2646   for (lt_i = NF; lt_i > 0; lt_i--) {
2647     if ($lt_i != "" && $lt_i != ".") {
2648       if ($lt_i == "..") {
2649         lt_count++;
2650       } else {
2651         if (lt_count == 0) {
2652           lt_foo="/" $lt_i lt_foo;
2653         } else {
2654           lt_count--;
2655         }
2656       }
2657     }
2658   }
2659   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2660   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2661 }'`
2662   # AWK program above erroneously prepends '/' to C:/dos/paths
2663   # for these hosts.
2664   case $host_os in
2665     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2666       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2667   esac
2668   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2669 else
2670   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2671 fi])
2672 library_names_spec=
2673 libname_spec='lib$name'
2674 soname_spec=
2675 shrext_cmds=".so"
2676 postinstall_cmds=
2677 postuninstall_cmds=
2678 finish_cmds=
2679 finish_eval=
2680 shlibpath_var=
2681 shlibpath_overrides_runpath=unknown
2682 version_type=none
2683 dynamic_linker="$host_os ld.so"
2684 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2685 need_lib_prefix=unknown
2686 hardcode_into_libs=no
2688 # when you set need_version to no, make sure it does not cause -set_version
2689 # flags to be left without arguments
2690 need_version=unknown
2692 case $host_os in
2693 aix3*)
2694   version_type=linux # correct to gnu/linux during the next big refactor
2695   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2696   shlibpath_var=LIBPATH
2698   # AIX 3 has no versioning support, so we append a major version to the name.
2699   soname_spec='${libname}${release}${shared_ext}$major'
2700   ;;
2702 aix[[4-9]]*)
2703   version_type=linux # correct to gnu/linux during the next big refactor
2704   need_lib_prefix=no
2705   need_version=no
2706   hardcode_into_libs=yes
2707   if test "$host_cpu" = ia64; then
2708     # AIX 5 supports IA64
2709     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2710     shlibpath_var=LD_LIBRARY_PATH
2711   else
2712     # With GCC up to 2.95.x, collect2 would create an import file
2713     # for dependence libraries.  The import file would start with
2714     # the line `#! .'.  This would cause the generated library to
2715     # depend on `.', always an invalid library.  This was fixed in
2716     # development snapshots of GCC prior to 3.0.
2717     case $host_os in
2718       aix4 | aix4.[[01]] | aix4.[[01]].*)
2719       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2720            echo ' yes '
2721            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2722         :
2723       else
2724         can_build_shared=no
2725       fi
2726       ;;
2727     esac
2728     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2729     # soname into executable. Probably we can add versioning support to
2730     # collect2, so additional links can be useful in future.
2731     if test "$aix_use_runtimelinking" = yes; then
2732       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2733       # instead of lib<name>.a to let people know that these are not
2734       # typical AIX shared libraries.
2735       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2736     else
2737       # We preserve .a as extension for shared libraries through AIX4.2
2738       # and later when we are not doing run time linking.
2739       library_names_spec='${libname}${release}.a $libname.a'
2740       soname_spec='${libname}${release}${shared_ext}$major'
2741     fi
2742     shlibpath_var=LIBPATH
2743   fi
2744   ;;
2746 amigaos*)
2747   case $host_cpu in
2748   powerpc)
2749     # Since July 2007 AmigaOS4 officially supports .so libraries.
2750     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2751     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2752     ;;
2753   m68k)
2754     library_names_spec='$libname.ixlibrary $libname.a'
2755     # Create ${libname}_ixlibrary.a entries in /sys/libs.
2756     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'
2757     ;;
2758   esac
2759   ;;
2761 beos*)
2762   library_names_spec='${libname}${shared_ext}'
2763   dynamic_linker="$host_os ld.so"
2764   shlibpath_var=LIBRARY_PATH
2765   ;;
2767 bsdi[[45]]*)
2768   version_type=linux # correct to gnu/linux during the next big refactor
2769   need_version=no
2770   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2771   soname_spec='${libname}${release}${shared_ext}$major'
2772   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2773   shlibpath_var=LD_LIBRARY_PATH
2774   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2775   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2776   # the default ld.so.conf also contains /usr/contrib/lib and
2777   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2778   # libtool to hard-code these into programs
2779   ;;
2781 cygwin* | mingw* | pw32* | cegcc*)
2782   version_type=windows
2783   shrext_cmds=".dll"
2784   need_version=no
2785   need_lib_prefix=no
2787   case $GCC,$cc_basename in
2788   yes,*)
2789     # gcc
2790     library_names_spec='$libname.dll.a'
2791     # DLL is installed to $(libdir)/../bin by postinstall_cmds
2792     postinstall_cmds='base_file=`basename \${file}`~
2793       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2794       dldir=$destdir/`dirname \$dlpath`~
2795       test -d \$dldir || mkdir -p \$dldir~
2796       $install_prog $dir/$dlname \$dldir/$dlname~
2797       chmod a+x \$dldir/$dlname~
2798       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2799         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2800       fi'
2801     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2802       dlpath=$dir/\$dldll~
2803        $RM \$dlpath'
2804     shlibpath_overrides_runpath=yes
2806     case $host_os in
2807     cygwin*)
2808       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2809       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2810 m4_if([$1], [],[
2811       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2812       ;;
2813     mingw* | cegcc*)
2814       # MinGW DLLs use traditional 'lib' prefix
2815       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2816       ;;
2817     pw32*)
2818       # pw32 DLLs use 'pw' prefix rather than 'lib'
2819       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2820       ;;
2821     esac
2822     dynamic_linker='Win32 ld.exe'
2823     ;;
2825   *,cl*)
2826     # Native MSVC
2827     libname_spec='$name'
2828     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2829     library_names_spec='${libname}.dll.lib'
2831     case $build_os in
2832     mingw*)
2833       sys_lib_search_path_spec=
2834       lt_save_ifs=$IFS
2835       IFS=';'
2836       for lt_path in $LIB
2837       do
2838         IFS=$lt_save_ifs
2839         # Let DOS variable expansion print the short 8.3 style file name.
2840         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2841         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2842       done
2843       IFS=$lt_save_ifs
2844       # Convert to MSYS style.
2845       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2846       ;;
2847     cygwin*)
2848       # Convert to unix form, then to dos form, then back to unix form
2849       # but this time dos style (no spaces!) so that the unix form looks
2850       # like /cygdrive/c/PROGRA~1:/cygdr...
2851       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2852       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2853       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2854       ;;
2855     *)
2856       sys_lib_search_path_spec="$LIB"
2857       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2858         # It is most probably a Windows format PATH.
2859         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2860       else
2861         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2862       fi
2863       # FIXME: find the short name or the path components, as spaces are
2864       # common. (e.g. "Program Files" -> "PROGRA~1")
2865       ;;
2866     esac
2868     # DLL is installed to $(libdir)/../bin by postinstall_cmds
2869     postinstall_cmds='base_file=`basename \${file}`~
2870       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2871       dldir=$destdir/`dirname \$dlpath`~
2872       test -d \$dldir || mkdir -p \$dldir~
2873       $install_prog $dir/$dlname \$dldir/$dlname'
2874     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2875       dlpath=$dir/\$dldll~
2876        $RM \$dlpath'
2877     shlibpath_overrides_runpath=yes
2878     dynamic_linker='Win32 link.exe'
2879     ;;
2881   *)
2882     # Assume MSVC wrapper
2883     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2884     dynamic_linker='Win32 ld.exe'
2885     ;;
2886   esac
2887   # FIXME: first we should search . and the directory the executable is in
2888   shlibpath_var=PATH
2889   ;;
2891 darwin* | rhapsody*)
2892   dynamic_linker="$host_os dyld"
2893   version_type=darwin
2894   need_lib_prefix=no
2895   need_version=no
2896   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2897   soname_spec='${libname}${release}${major}$shared_ext'
2898   shlibpath_overrides_runpath=yes
2899   shlibpath_var=DYLD_LIBRARY_PATH
2900   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2901 m4_if([$1], [],[
2902   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2903   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2904   ;;
2906 dgux*)
2907   version_type=linux # correct to gnu/linux during the next big refactor
2908   need_lib_prefix=no
2909   need_version=no
2910   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2911   soname_spec='${libname}${release}${shared_ext}$major'
2912   shlibpath_var=LD_LIBRARY_PATH
2913   ;;
2915 freebsd* | dragonfly*)
2916   # DragonFly does not have aout.  When/if they implement a new
2917   # versioning mechanism, adjust this.
2918   if test -x /usr/bin/objformat; then
2919     objformat=`/usr/bin/objformat`
2920   else
2921     case $host_os in
2922     freebsd[[23]].*) objformat=aout ;;
2923     *) objformat=elf ;;
2924     esac
2925   fi
2926   version_type=freebsd-$objformat
2927   case $version_type in
2928     freebsd-elf*)
2929       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2930       need_version=no
2931       need_lib_prefix=no
2932       ;;
2933     freebsd-*)
2934       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2935       need_version=yes
2936       ;;
2937   esac
2938   shlibpath_var=LD_LIBRARY_PATH
2939   case $host_os in
2940   freebsd2.*)
2941     shlibpath_overrides_runpath=yes
2942     ;;
2943   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2944     shlibpath_overrides_runpath=yes
2945     hardcode_into_libs=yes
2946     ;;
2947   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2948   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2949     shlibpath_overrides_runpath=no
2950     hardcode_into_libs=yes
2951     ;;
2952   *) # from 4.6 on, and DragonFly
2953     shlibpath_overrides_runpath=yes
2954     hardcode_into_libs=yes
2955     ;;
2956   esac
2957   ;;
2959 haiku*)
2960   version_type=linux # correct to gnu/linux during the next big refactor
2961   need_lib_prefix=no
2962   need_version=no
2963   dynamic_linker="$host_os runtime_loader"
2964   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2965   soname_spec='${libname}${release}${shared_ext}$major'
2966   shlibpath_var=LIBRARY_PATH
2967   shlibpath_overrides_runpath=yes
2968   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2969   hardcode_into_libs=yes
2970   ;;
2972 hpux9* | hpux10* | hpux11*)
2973   # Give a soname corresponding to the major version so that dld.sl refuses to
2974   # link against other versions.
2975   version_type=sunos
2976   need_lib_prefix=no
2977   need_version=no
2978   case $host_cpu in
2979   ia64*)
2980     shrext_cmds='.so'
2981     hardcode_into_libs=yes
2982     dynamic_linker="$host_os dld.so"
2983     shlibpath_var=LD_LIBRARY_PATH
2984     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2985     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2986     soname_spec='${libname}${release}${shared_ext}$major'
2987     if test "X$HPUX_IA64_MODE" = X32; then
2988       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2989     else
2990       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2991     fi
2992     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2993     ;;
2994   hppa*64*)
2995     shrext_cmds='.sl'
2996     hardcode_into_libs=yes
2997     dynamic_linker="$host_os dld.sl"
2998     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2999     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3000     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3001     soname_spec='${libname}${release}${shared_ext}$major'
3002     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3003     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3004     ;;
3005   *)
3006     shrext_cmds='.sl'
3007     dynamic_linker="$host_os dld.sl"
3008     shlibpath_var=SHLIB_PATH
3009     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3010     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3011     soname_spec='${libname}${release}${shared_ext}$major'
3012     ;;
3013   esac
3014   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3015   postinstall_cmds='chmod 555 $lib'
3016   # or fails outright, so override atomically:
3017   install_override_mode=555
3018   ;;
3020 interix[[3-9]]*)
3021   version_type=linux # correct to gnu/linux during the next big refactor
3022   need_lib_prefix=no
3023   need_version=no
3024   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3025   soname_spec='${libname}${release}${shared_ext}$major'
3026   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3027   shlibpath_var=LD_LIBRARY_PATH
3028   shlibpath_overrides_runpath=no
3029   hardcode_into_libs=yes
3030   ;;
3032 irix5* | irix6* | nonstopux*)
3033   case $host_os in
3034     nonstopux*) version_type=nonstopux ;;
3035     *)
3036         if test "$lt_cv_prog_gnu_ld" = yes; then
3037                 version_type=linux # correct to gnu/linux during the next big refactor
3038         else
3039                 version_type=irix
3040         fi ;;
3041   esac
3042   need_lib_prefix=no
3043   need_version=no
3044   soname_spec='${libname}${release}${shared_ext}$major'
3045   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3046   case $host_os in
3047   irix5* | nonstopux*)
3048     libsuff= shlibsuff=
3049     ;;
3050   *)
3051     case $LD in # libtool.m4 will add one of these switches to LD
3052     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3053       libsuff= shlibsuff= libmagic=32-bit;;
3054     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3055       libsuff=32 shlibsuff=N32 libmagic=N32;;
3056     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3057       libsuff=64 shlibsuff=64 libmagic=64-bit;;
3058     *) libsuff= shlibsuff= libmagic=never-match;;
3059     esac
3060     ;;
3061   esac
3062   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3063   shlibpath_overrides_runpath=no
3064   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3065   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3066   hardcode_into_libs=yes
3067   ;;
3069 # No shared lib support for Linux oldld, aout, or coff.
3070 linux*oldld* | linux*aout* | linux*coff*)
3071   dynamic_linker=no
3072   ;;
3074 # This must be glibc/ELF.
3075 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3076   version_type=linux # correct to gnu/linux during the next big refactor
3077   need_lib_prefix=no
3078   need_version=no
3079   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3080   soname_spec='${libname}${release}${shared_ext}$major'
3081   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3082   shlibpath_var=LD_LIBRARY_PATH
3083   shlibpath_overrides_runpath=no
3085   # Some binutils ld are patched to set DT_RUNPATH
3086   AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3087     [lt_cv_shlibpath_overrides_runpath=no
3088     save_LDFLAGS=$LDFLAGS
3089     save_libdir=$libdir
3090     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3091          LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3092     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3093       [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3094          [lt_cv_shlibpath_overrides_runpath=yes])])
3095     LDFLAGS=$save_LDFLAGS
3096     libdir=$save_libdir
3097     ])
3098   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3100   # This implies no fast_install, which is unacceptable.
3101   # Some rework will be needed to allow for fast_install
3102   # before this can be enabled.
3103   hardcode_into_libs=yes
3105   # Append ld.so.conf contents to the search path
3106   if test -f /etc/ld.so.conf; then
3107     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' ' '`
3108     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3109   fi
3111   # We used to test for /lib/ld.so.1 and disable shared libraries on
3112   # powerpc, because MkLinux only supported shared libraries with the
3113   # GNU dynamic linker.  Since this was broken with cross compilers,
3114   # most powerpc-linux boxes support dynamic linking these days and
3115   # people can always --disable-shared, the test was removed, and we
3116   # assume the GNU/Linux dynamic linker is in use.
3117   dynamic_linker='GNU/Linux ld.so'
3118   ;;
3120 netbsdelf*-gnu)
3121   version_type=linux
3122   need_lib_prefix=no
3123   need_version=no
3124   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3125   soname_spec='${libname}${release}${shared_ext}$major'
3126   shlibpath_var=LD_LIBRARY_PATH
3127   shlibpath_overrides_runpath=no
3128   hardcode_into_libs=yes
3129   dynamic_linker='NetBSD ld.elf_so'
3130   ;;
3132 netbsd*)
3133   version_type=sunos
3134   need_lib_prefix=no
3135   need_version=no
3136   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3137     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3138     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3139     dynamic_linker='NetBSD (a.out) ld.so'
3140   else
3141     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3142     soname_spec='${libname}${release}${shared_ext}$major'
3143     dynamic_linker='NetBSD ld.elf_so'
3144   fi
3145   shlibpath_var=LD_LIBRARY_PATH
3146   shlibpath_overrides_runpath=yes
3147   hardcode_into_libs=yes
3148   ;;
3150 newsos6)
3151   version_type=linux # correct to gnu/linux during the next big refactor
3152   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3153   shlibpath_var=LD_LIBRARY_PATH
3154   shlibpath_overrides_runpath=yes
3155   ;;
3157 *nto* | *qnx*)
3158   version_type=qnx
3159   need_lib_prefix=no
3160   need_version=no
3161   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3162   soname_spec='${libname}${release}${shared_ext}$major'
3163   shlibpath_var=LD_LIBRARY_PATH
3164   shlibpath_overrides_runpath=no
3165   hardcode_into_libs=yes
3166   dynamic_linker='ldqnx.so'
3167   ;;
3169 openbsd*)
3170   version_type=sunos
3171   sys_lib_dlsearch_path_spec="/usr/lib"
3172   need_lib_prefix=no
3173   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3174   case $host_os in
3175     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
3176     *)                          need_version=no  ;;
3177   esac
3178   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3179   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3180   shlibpath_var=LD_LIBRARY_PATH
3181   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3182     case $host_os in
3183       openbsd2.[[89]] | openbsd2.[[89]].*)
3184         shlibpath_overrides_runpath=no
3185         ;;
3186       *)
3187         shlibpath_overrides_runpath=yes
3188         ;;
3189       esac
3190   else
3191     shlibpath_overrides_runpath=yes
3192   fi
3193   ;;
3195 os2*)
3196   libname_spec='$name'
3197   shrext_cmds=".dll"
3198   need_lib_prefix=no
3199   library_names_spec='$libname${shared_ext} $libname.a'
3200   dynamic_linker='OS/2 ld.exe'
3201   shlibpath_var=LIBPATH
3202   ;;
3204 osf3* | osf4* | osf5*)
3205   version_type=osf
3206   need_lib_prefix=no
3207   need_version=no
3208   soname_spec='${libname}${release}${shared_ext}$major'
3209   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3210   shlibpath_var=LD_LIBRARY_PATH
3211   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3212   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3213   ;;
3215 rdos*)
3216   dynamic_linker=no
3217   ;;
3219 solaris*)
3220   version_type=linux # correct to gnu/linux during the next big refactor
3221   need_lib_prefix=no
3222   need_version=no
3223   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3224   soname_spec='${libname}${release}${shared_ext}$major'
3225   shlibpath_var=LD_LIBRARY_PATH
3226   shlibpath_overrides_runpath=yes
3227   hardcode_into_libs=yes
3228   # ldd complains unless libraries are executable
3229   postinstall_cmds='chmod +x $lib'
3230   ;;
3232 sunos4*)
3233   version_type=sunos
3234   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3235   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3236   shlibpath_var=LD_LIBRARY_PATH
3237   shlibpath_overrides_runpath=yes
3238   if test "$with_gnu_ld" = yes; then
3239     need_lib_prefix=no
3240   fi
3241   need_version=yes
3242   ;;
3244 sysv4 | sysv4.3*)
3245   version_type=linux # correct to gnu/linux during the next big refactor
3246   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3247   soname_spec='${libname}${release}${shared_ext}$major'
3248   shlibpath_var=LD_LIBRARY_PATH
3249   case $host_vendor in
3250     sni)
3251       shlibpath_overrides_runpath=no
3252       need_lib_prefix=no
3253       runpath_var=LD_RUN_PATH
3254       ;;
3255     siemens)
3256       need_lib_prefix=no
3257       ;;
3258     motorola)
3259       need_lib_prefix=no
3260       need_version=no
3261       shlibpath_overrides_runpath=no
3262       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3263       ;;
3264   esac
3265   ;;
3267 sysv4*MP*)
3268   if test -d /usr/nec ;then
3269     version_type=linux # correct to gnu/linux during the next big refactor
3270     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3271     soname_spec='$libname${shared_ext}.$major'
3272     shlibpath_var=LD_LIBRARY_PATH
3273   fi
3274   ;;
3276 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3277   version_type=freebsd-elf
3278   need_lib_prefix=no
3279   need_version=no
3280   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3281   soname_spec='${libname}${release}${shared_ext}$major'
3282   shlibpath_var=LD_LIBRARY_PATH
3283   shlibpath_overrides_runpath=yes
3284   hardcode_into_libs=yes
3285   if test "$with_gnu_ld" = yes; then
3286     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3287   else
3288     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3289     case $host_os in
3290       sco3.2v5*)
3291         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3292         ;;
3293     esac
3294   fi
3295   sys_lib_dlsearch_path_spec='/usr/lib'
3296   ;;
3298 tpf*)
3299   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3300   version_type=linux # correct to gnu/linux during the next big refactor
3301   need_lib_prefix=no
3302   need_version=no
3303   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3304   shlibpath_var=LD_LIBRARY_PATH
3305   shlibpath_overrides_runpath=no
3306   hardcode_into_libs=yes
3307   ;;
3309 uts4*)
3310   version_type=linux # correct to gnu/linux during the next big refactor
3311   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3312   soname_spec='${libname}${release}${shared_ext}$major'
3313   shlibpath_var=LD_LIBRARY_PATH
3314   ;;
3316 *)
3317   dynamic_linker=no
3318   ;;
3319 esac
3320 AC_MSG_RESULT([$dynamic_linker])
3321 test "$dynamic_linker" = no && can_build_shared=no
3323 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3324 if test "$GCC" = yes; then
3325   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3326 fi
3328 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3329   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3330 fi
3331 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3332   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3333 fi
3335 _LT_DECL([], [variables_saved_for_relink], [1],
3336     [Variables whose values should be saved in libtool wrapper scripts and
3337     restored at link time])
3338 _LT_DECL([], [need_lib_prefix], [0],
3339     [Do we need the "lib" prefix for modules?])
3340 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3341 _LT_DECL([], [version_type], [0], [Library versioning type])
3342 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3343 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3344 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3345     [Is shlibpath searched before the hard-coded library search path?])
3346 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3347 _LT_DECL([], [library_names_spec], [1],
3348     [[List of archive names.  First name is the real one, the rest are links.
3349     The last name is the one that the linker finds with -lNAME]])
3350 _LT_DECL([], [soname_spec], [1],
3351     [[The coded name of the library, if different from the real name]])
3352 _LT_DECL([], [install_override_mode], [1],
3353     [Permission mode override for installation of shared libraries])
3354 _LT_DECL([], [postinstall_cmds], [2],
3355     [Command to use after installation of a shared archive])
3356 _LT_DECL([], [postuninstall_cmds], [2],
3357     [Command to use after uninstallation of a shared archive])
3358 _LT_DECL([], [finish_cmds], [2],
3359     [Commands used to finish a libtool library installation in a directory])
3360 _LT_DECL([], [finish_eval], [1],
3361     [[As "finish_cmds", except a single script fragment to be evaled but
3362     not shown]])
3363 _LT_DECL([], [hardcode_into_libs], [0],
3364     [Whether we should hardcode library paths into libraries])
3365 _LT_DECL([], [sys_lib_search_path_spec], [2],
3366     [Compile-time system search path for libraries])
3367 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3368     [Run-time system search path for libraries])
3369 ])# _LT_SYS_DYNAMIC_LINKER
3372 # _LT_PATH_TOOL_PREFIX(TOOL)
3373 # --------------------------
3374 # find a file program which can recognize shared library
3375 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3376 [m4_require([_LT_DECL_EGREP])dnl
3377 AC_MSG_CHECKING([for $1])
3378 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3379 [case $MAGIC_CMD in
3380 [[\\/*] |  ?:[\\/]*])
3381   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3382   ;;
3383 *)
3384   lt_save_MAGIC_CMD="$MAGIC_CMD"
3385   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3386 dnl $ac_dummy forces splitting on constant user-supplied paths.
3387 dnl POSIX.2 word splitting is done only on the output of word expansions,
3388 dnl not every word.  This closes a longstanding sh security hole.
3389   ac_dummy="m4_if([$2], , $PATH, [$2])"
3390   for ac_dir in $ac_dummy; do
3391     IFS="$lt_save_ifs"
3392     test -z "$ac_dir" && ac_dir=.
3393     if test -f $ac_dir/$1; then
3394       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3395       if test -n "$file_magic_test_file"; then
3396         case $deplibs_check_method in
3397         "file_magic "*)
3398           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3399           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3400           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3401             $EGREP "$file_magic_regex" > /dev/null; then
3402             :
3403           else
3404             cat <<_LT_EOF 1>&2
3406 *** Warning: the command libtool uses to detect shared libraries,
3407 *** $file_magic_cmd, produces output that libtool cannot recognize.
3408 *** The result is that libtool may fail to recognize shared libraries
3409 *** as such.  This will affect the creation of libtool libraries that
3410 *** depend on shared libraries, but programs linked with such libtool
3411 *** libraries will work regardless of this problem.  Nevertheless, you
3412 *** may want to report the problem to your system manager and/or to
3413 *** bug-libtool@gnu.org
3415 _LT_EOF
3416           fi ;;
3417         esac
3418       fi
3419       break
3420     fi
3421   done
3422   IFS="$lt_save_ifs"
3423   MAGIC_CMD="$lt_save_MAGIC_CMD"
3424   ;;
3425 esac])
3426 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3427 if test -n "$MAGIC_CMD"; then
3428   AC_MSG_RESULT($MAGIC_CMD)
3429 else
3430   AC_MSG_RESULT(no)
3431 fi
3432 _LT_DECL([], [MAGIC_CMD], [0],
3433          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3434 ])# _LT_PATH_TOOL_PREFIX
3436 # Old name:
3437 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3438 dnl aclocal-1.4 backwards compatibility:
3439 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3442 # _LT_PATH_MAGIC
3443 # --------------
3444 # find a file program which can recognize a shared library
3445 m4_defun([_LT_PATH_MAGIC],
3446 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3447 if test -z "$lt_cv_path_MAGIC_CMD"; then
3448   if test -n "$ac_tool_prefix"; then
3449     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3450   else
3451     MAGIC_CMD=:
3452   fi
3453 fi
3454 ])# _LT_PATH_MAGIC
3457 # LT_PATH_LD
3458 # ----------
3459 # find the pathname to the GNU or non-GNU linker
3460 AC_DEFUN([LT_PATH_LD],
3461 [AC_REQUIRE([AC_PROG_CC])dnl
3462 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3463 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3464 m4_require([_LT_DECL_SED])dnl
3465 m4_require([_LT_DECL_EGREP])dnl
3466 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3468 AC_ARG_WITH([gnu-ld],
3469     [AS_HELP_STRING([--with-gnu-ld],
3470         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3471     [test "$withval" = no || with_gnu_ld=yes],
3472     [with_gnu_ld=no])dnl
3474 ac_prog=ld
3475 if test "$GCC" = yes; then
3476   # Check if gcc -print-prog-name=ld gives a path.
3477   AC_MSG_CHECKING([for ld used by $CC])
3478   case $host in
3479   *-*-mingw*)
3480     # gcc leaves a trailing carriage return which upsets mingw
3481     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3482   *)
3483     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3484   esac
3485   case $ac_prog in
3486     # Accept absolute paths.
3487     [[\\/]]* | ?:[[\\/]]*)
3488       re_direlt='/[[^/]][[^/]]*/\.\./'
3489       # Canonicalize the pathname of ld
3490       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3491       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3492         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3493       done
3494       test -z "$LD" && LD="$ac_prog"
3495       ;;
3496   "")
3497     # If it fails, then pretend we aren't using GCC.
3498     ac_prog=ld
3499     ;;
3500   *)
3501     # If it is relative, then search for the first ld in PATH.
3502     with_gnu_ld=unknown
3503     ;;
3504   esac
3505 elif test "$with_gnu_ld" = yes; then
3506   AC_MSG_CHECKING([for GNU ld])
3507 else
3508   AC_MSG_CHECKING([for non-GNU ld])
3509 fi
3510 AC_CACHE_VAL(lt_cv_path_LD,
3511 [if test -z "$LD"; then
3512   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3513   for ac_dir in $PATH; do
3514     IFS="$lt_save_ifs"
3515     test -z "$ac_dir" && ac_dir=.
3516     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3517       lt_cv_path_LD="$ac_dir/$ac_prog"
3518       # Check to see if the program is GNU ld.  I'd rather use --version,
3519       # but apparently some variants of GNU ld only accept -v.
3520       # Break only if it was the GNU/non-GNU ld that we prefer.
3521       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3522       *GNU* | *'with BFD'*)
3523         test "$with_gnu_ld" != no && break
3524         ;;
3525       *)
3526         test "$with_gnu_ld" != yes && break
3527         ;;
3528       esac
3529     fi
3530   done
3531   IFS="$lt_save_ifs"
3532 else
3533   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3534 fi])
3535 LD="$lt_cv_path_LD"
3536 if test -n "$LD"; then
3537   AC_MSG_RESULT($LD)
3538 else
3539   AC_MSG_RESULT(no)
3540 fi
3541 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3542 _LT_PATH_LD_GNU
3543 AC_SUBST([LD])
3545 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3546 ])# LT_PATH_LD
3548 # Old names:
3549 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3550 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3551 dnl aclocal-1.4 backwards compatibility:
3552 dnl AC_DEFUN([AM_PROG_LD], [])
3553 dnl AC_DEFUN([AC_PROG_LD], [])
3556 # _LT_PATH_LD_GNU
3557 #- --------------
3558 m4_defun([_LT_PATH_LD_GNU],
3559 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3560 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3561 case `$LD -v 2>&1 </dev/null` in
3562 *GNU* | *'with BFD'*)
3563   lt_cv_prog_gnu_ld=yes
3564   ;;
3565 *)
3566   lt_cv_prog_gnu_ld=no
3567   ;;
3568 esac])
3569 with_gnu_ld=$lt_cv_prog_gnu_ld
3570 ])# _LT_PATH_LD_GNU
3573 # _LT_CMD_RELOAD
3574 # --------------
3575 # find reload flag for linker
3576 #   -- PORTME Some linkers may need a different reload flag.
3577 m4_defun([_LT_CMD_RELOAD],
3578 [AC_CACHE_CHECK([for $LD option to reload object files],
3579   lt_cv_ld_reload_flag,
3580   [lt_cv_ld_reload_flag='-r'])
3581 reload_flag=$lt_cv_ld_reload_flag
3582 case $reload_flag in
3583 "" | " "*) ;;
3584 *) reload_flag=" $reload_flag" ;;
3585 esac
3586 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3587 case $host_os in
3588   cygwin* | mingw* | pw32* | cegcc*)
3589     if test "$GCC" != yes; then
3590       reload_cmds=false
3591     fi
3592     ;;
3593   darwin*)
3594     if test "$GCC" = yes; then
3595       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3596     else
3597       reload_cmds='$LD$reload_flag -o $output$reload_objs'
3598     fi
3599     ;;
3600 esac
3601 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3602 _LT_TAGDECL([], [reload_cmds], [2])dnl
3603 ])# _LT_CMD_RELOAD
3606 # _LT_CHECK_MAGIC_METHOD
3607 # ----------------------
3608 # how to check for library dependencies
3609 #  -- PORTME fill in with the dynamic library characteristics
3610 m4_defun([_LT_CHECK_MAGIC_METHOD],
3611 [m4_require([_LT_DECL_EGREP])
3612 m4_require([_LT_DECL_OBJDUMP])
3613 AC_CACHE_CHECK([how to recognize dependent libraries],
3614 lt_cv_deplibs_check_method,
3615 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3616 lt_cv_file_magic_test_file=
3617 lt_cv_deplibs_check_method='unknown'
3618 # Need to set the preceding variable on all platforms that support
3619 # interlibrary dependencies.
3620 # 'none' -- dependencies not supported.
3621 # `unknown' -- same as none, but documents that we really don't know.
3622 # 'pass_all' -- all dependencies passed with no checks.
3623 # 'test_compile' -- check by making test program.
3624 # 'file_magic [[regex]]' -- check by looking for files in library path
3625 # which responds to the $file_magic_cmd with a given extended regex.
3626 # If you have `file' or equivalent on your system and you're not sure
3627 # whether `pass_all' will *always* work, you probably want this one.
3629 case $host_os in
3630 aix[[4-9]]*)
3631   lt_cv_deplibs_check_method=pass_all
3632   ;;
3634 beos*)
3635   lt_cv_deplibs_check_method=pass_all
3636   ;;
3638 bsdi[[45]]*)
3639   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3640   lt_cv_file_magic_cmd='/usr/bin/file -L'
3641   lt_cv_file_magic_test_file=/shlib/libc.so
3642   ;;
3644 cygwin*)
3645   # func_win32_libid is a shell function defined in ltmain.sh
3646   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3647   lt_cv_file_magic_cmd='func_win32_libid'
3648   ;;
3650 mingw* | pw32*)
3651   # Base MSYS/MinGW do not provide the 'file' command needed by
3652   # func_win32_libid shell function, so use a weaker test based on 'objdump',
3653   # unless we find 'file', for example because we are cross-compiling.
3654   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3655   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3656     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3657     lt_cv_file_magic_cmd='func_win32_libid'
3658   else
3659     # Keep this pattern in sync with the one in func_win32_libid.
3660     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3661     lt_cv_file_magic_cmd='$OBJDUMP -f'
3662   fi
3663   ;;
3665 cegcc*)
3666   # use the weaker test based on 'objdump'. See mingw*.
3667   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3668   lt_cv_file_magic_cmd='$OBJDUMP -f'
3669   ;;
3671 darwin* | rhapsody*)
3672   lt_cv_deplibs_check_method=pass_all
3673   ;;
3675 freebsd* | dragonfly*)
3676   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3677     case $host_cpu in
3678     i*86 )
3679       # Not sure whether the presence of OpenBSD here was a mistake.
3680       # Let's accept both of them until this is cleared up.
3681       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3682       lt_cv_file_magic_cmd=/usr/bin/file
3683       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3684       ;;
3685     esac
3686   else
3687     lt_cv_deplibs_check_method=pass_all
3688   fi
3689   ;;
3691 haiku*)
3692   lt_cv_deplibs_check_method=pass_all
3693   ;;
3695 hpux10.20* | hpux11*)
3696   lt_cv_file_magic_cmd=/usr/bin/file
3697   case $host_cpu in
3698   ia64*)
3699     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3700     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3701     ;;
3702   hppa*64*)
3703     [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]']
3704     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3705     ;;
3706   *)
3707     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3708     lt_cv_file_magic_test_file=/usr/lib/libc.sl
3709     ;;
3710   esac
3711   ;;
3713 interix[[3-9]]*)
3714   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3715   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3716   ;;
3718 irix5* | irix6* | nonstopux*)
3719   case $LD in
3720   *-32|*"-32 ") libmagic=32-bit;;
3721   *-n32|*"-n32 ") libmagic=N32;;
3722   *-64|*"-64 ") libmagic=64-bit;;
3723   *) libmagic=never-match;;
3724   esac
3725   lt_cv_deplibs_check_method=pass_all
3726   ;;
3728 # This must be glibc/ELF.
3729 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3730   lt_cv_deplibs_check_method=pass_all
3731   ;;
3733 netbsd* | netbsdelf*-gnu)
3734   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3735     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3736   else
3737     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3738   fi
3739   ;;
3741 newos6*)
3742   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3743   lt_cv_file_magic_cmd=/usr/bin/file
3744   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3745   ;;
3747 *nto* | *qnx*)
3748   lt_cv_deplibs_check_method=pass_all
3749   ;;
3751 openbsd*)
3752   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3753     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3754   else
3755     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3756   fi
3757   ;;
3759 osf3* | osf4* | osf5*)
3760   lt_cv_deplibs_check_method=pass_all
3761   ;;
3763 rdos*)
3764   lt_cv_deplibs_check_method=pass_all
3765   ;;
3767 solaris*)
3768   lt_cv_deplibs_check_method=pass_all
3769   ;;
3771 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3772   lt_cv_deplibs_check_method=pass_all
3773   ;;
3775 sysv4 | sysv4.3*)
3776   case $host_vendor in
3777   motorola)
3778     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]]'
3779     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3780     ;;
3781   ncr)
3782     lt_cv_deplibs_check_method=pass_all
3783     ;;
3784   sequent)
3785     lt_cv_file_magic_cmd='/bin/file'
3786     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3787     ;;
3788   sni)
3789     lt_cv_file_magic_cmd='/bin/file'
3790     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3791     lt_cv_file_magic_test_file=/lib/libc.so
3792     ;;
3793   siemens)
3794     lt_cv_deplibs_check_method=pass_all
3795     ;;
3796   pc)
3797     lt_cv_deplibs_check_method=pass_all
3798     ;;
3799   esac
3800   ;;
3802 tpf*)
3803   lt_cv_deplibs_check_method=pass_all
3804   ;;
3805 esac
3806 ])
3808 file_magic_glob=
3809 want_nocaseglob=no
3810 if test "$build" = "$host"; then
3811   case $host_os in
3812   mingw* | pw32*)
3813     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3814       want_nocaseglob=yes
3815     else
3816       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3817     fi
3818     ;;
3819   esac
3820 fi
3822 file_magic_cmd=$lt_cv_file_magic_cmd
3823 deplibs_check_method=$lt_cv_deplibs_check_method
3824 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3826 _LT_DECL([], [deplibs_check_method], [1],
3827     [Method to check whether dependent libraries are shared objects])
3828 _LT_DECL([], [file_magic_cmd], [1],
3829     [Command to use when deplibs_check_method = "file_magic"])
3830 _LT_DECL([], [file_magic_glob], [1],
3831     [How to find potential files when deplibs_check_method = "file_magic"])
3832 _LT_DECL([], [want_nocaseglob], [1],
3833     [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3834 ])# _LT_CHECK_MAGIC_METHOD
3837 # LT_PATH_NM
3838 # ----------
3839 # find the pathname to a BSD- or MS-compatible name lister
3840 AC_DEFUN([LT_PATH_NM],
3841 [AC_REQUIRE([AC_PROG_CC])dnl
3842 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3843 [if test -n "$NM"; then
3844   # Let the user override the test.
3845   lt_cv_path_NM="$NM"
3846 else
3847   lt_nm_to_check="${ac_tool_prefix}nm"
3848   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3849     lt_nm_to_check="$lt_nm_to_check nm"
3850   fi
3851   for lt_tmp_nm in $lt_nm_to_check; do
3852     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3853     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3854       IFS="$lt_save_ifs"
3855       test -z "$ac_dir" && ac_dir=.
3856       tmp_nm="$ac_dir/$lt_tmp_nm"
3857       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3858         # Check to see if the nm accepts a BSD-compat flag.
3859         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3860         #   nm: unknown option "B" ignored
3861         # Tru64's nm complains that /dev/null is an invalid object file
3862         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3863         */dev/null* | *'Invalid file or object type'*)
3864           lt_cv_path_NM="$tmp_nm -B"
3865           break
3866           ;;
3867         *)
3868           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3869           */dev/null*)
3870             lt_cv_path_NM="$tmp_nm -p"
3871             break
3872             ;;
3873           *)
3874             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3875             continue # so that we can try to find one that supports BSD flags
3876             ;;
3877           esac
3878           ;;
3879         esac
3880       fi
3881     done
3882     IFS="$lt_save_ifs"
3883   done
3884   : ${lt_cv_path_NM=no}
3885 fi])
3886 if test "$lt_cv_path_NM" != "no"; then
3887   NM="$lt_cv_path_NM"
3888 else
3889   # Didn't find any BSD compatible name lister, look for dumpbin.
3890   if test -n "$DUMPBIN"; then :
3891     # Let the user override the test.
3892   else
3893     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3894     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3895     *COFF*)
3896       DUMPBIN="$DUMPBIN -symbols"
3897       ;;
3898     *)
3899       DUMPBIN=:
3900       ;;
3901     esac
3902   fi
3903   AC_SUBST([DUMPBIN])
3904   if test "$DUMPBIN" != ":"; then
3905     NM="$DUMPBIN"
3906   fi
3907 fi
3908 test -z "$NM" && NM=nm
3909 AC_SUBST([NM])
3910 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3912 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3913   [lt_cv_nm_interface="BSD nm"
3914   echo "int some_variable = 0;" > conftest.$ac_ext
3915   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3916   (eval "$ac_compile" 2>conftest.err)
3917   cat conftest.err >&AS_MESSAGE_LOG_FD
3918   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3919   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3920   cat conftest.err >&AS_MESSAGE_LOG_FD
3921   (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3922   cat conftest.out >&AS_MESSAGE_LOG_FD
3923   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3924     lt_cv_nm_interface="MS dumpbin"
3925   fi
3926   rm -f conftest*])
3927 ])# LT_PATH_NM
3929 # Old names:
3930 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3931 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3932 dnl aclocal-1.4 backwards compatibility:
3933 dnl AC_DEFUN([AM_PROG_NM], [])
3934 dnl AC_DEFUN([AC_PROG_NM], [])
3936 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3937 # --------------------------------
3938 # how to determine the name of the shared library
3939 # associated with a specific link library.
3940 #  -- PORTME fill in with the dynamic library characteristics
3941 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3942 [m4_require([_LT_DECL_EGREP])
3943 m4_require([_LT_DECL_OBJDUMP])
3944 m4_require([_LT_DECL_DLLTOOL])
3945 AC_CACHE_CHECK([how to associate runtime and link libraries],
3946 lt_cv_sharedlib_from_linklib_cmd,
3947 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3949 case $host_os in
3950 cygwin* | mingw* | pw32* | cegcc*)
3951   # two different shell functions defined in ltmain.sh
3952   # decide which to use based on capabilities of $DLLTOOL
3953   case `$DLLTOOL --help 2>&1` in
3954   *--identify-strict*)
3955     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3956     ;;
3957   *)
3958     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3959     ;;
3960   esac
3961   ;;
3962 *)
3963   # fallback: assume linklib IS sharedlib
3964   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3965   ;;
3966 esac
3967 ])
3968 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3969 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3971 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3972     [Command to associate shared and link libraries])
3973 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3976 # _LT_PATH_MANIFEST_TOOL
3977 # ----------------------
3978 # locate the manifest tool
3979 m4_defun([_LT_PATH_MANIFEST_TOOL],
3980 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3981 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3982 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3983   [lt_cv_path_mainfest_tool=no
3984   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3985   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3986   cat conftest.err >&AS_MESSAGE_LOG_FD
3987   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3988     lt_cv_path_mainfest_tool=yes
3989   fi
3990   rm -f conftest*])
3991 if test "x$lt_cv_path_mainfest_tool" != xyes; then
3992   MANIFEST_TOOL=:
3993 fi
3994 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3995 ])# _LT_PATH_MANIFEST_TOOL
3998 # LT_LIB_M
3999 # --------
4000 # check for math library
4001 AC_DEFUN([LT_LIB_M],
4002 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4003 LIBM=
4004 case $host in
4005 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4006   # These system don't have libm, or don't need it
4007   ;;
4008 *-ncr-sysv4.3*)
4009   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4010   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4011   ;;
4012 *)
4013   AC_CHECK_LIB(m, cos, LIBM="-lm")
4014   ;;
4015 esac
4016 AC_SUBST([LIBM])
4017 ])# LT_LIB_M
4019 # Old name:
4020 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4021 dnl aclocal-1.4 backwards compatibility:
4022 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4025 # _LT_COMPILER_NO_RTTI([TAGNAME])
4026 # -------------------------------
4027 m4_defun([_LT_COMPILER_NO_RTTI],
4028 [m4_require([_LT_TAG_COMPILER])dnl
4030 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4032 if test "$GCC" = yes; then
4033   case $cc_basename in
4034   nvcc*)
4035     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4036   *)
4037     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4038   esac
4040   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4041     lt_cv_prog_compiler_rtti_exceptions,
4042     [-fno-rtti -fno-exceptions], [],
4043     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4044 fi
4045 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4046         [Compiler flag to turn off builtin functions])
4047 ])# _LT_COMPILER_NO_RTTI
4050 # _LT_CMD_GLOBAL_SYMBOLS
4051 # ----------------------
4052 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4053 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4054 AC_REQUIRE([AC_PROG_CC])dnl
4055 AC_REQUIRE([AC_PROG_AWK])dnl
4056 AC_REQUIRE([LT_PATH_NM])dnl
4057 AC_REQUIRE([LT_PATH_LD])dnl
4058 m4_require([_LT_DECL_SED])dnl
4059 m4_require([_LT_DECL_EGREP])dnl
4060 m4_require([_LT_TAG_COMPILER])dnl
4062 # Check for command to grab the raw symbol name followed by C symbol from nm.
4063 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4064 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4066 # These are sane defaults that work on at least a few old systems.
4067 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4069 # Character class describing NM global symbol codes.
4070 symcode='[[BCDEGRST]]'
4072 # Regexp to match symbols that can be accessed directly from C.
4073 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4075 # Define system-specific variables.
4076 case $host_os in
4077 aix*)
4078   symcode='[[BCDT]]'
4079   ;;
4080 cygwin* | mingw* | pw32* | cegcc*)
4081   symcode='[[ABCDGISTW]]'
4082   ;;
4083 hpux*)
4084   if test "$host_cpu" = ia64; then
4085     symcode='[[ABCDEGRST]]'
4086   fi
4087   ;;
4088 irix* | nonstopux*)
4089   symcode='[[BCDEGRST]]'
4090   ;;
4091 osf*)
4092   symcode='[[BCDEGQRST]]'
4093   ;;
4094 solaris*)
4095   symcode='[[BDRT]]'
4096   ;;
4097 sco3.2v5*)
4098   symcode='[[DT]]'
4099   ;;
4100 sysv4.2uw2*)
4101   symcode='[[DT]]'
4102   ;;
4103 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4104   symcode='[[ABDT]]'
4105   ;;
4106 sysv4)
4107   symcode='[[DFNSTU]]'
4108   ;;
4109 esac
4111 # If we're using GNU nm, then use its standard symbol codes.
4112 case `$NM -V 2>&1` in
4113 *GNU* | *'with BFD'*)
4114   symcode='[[ABCDGIRSTW]]' ;;
4115 esac
4117 # Transform an extracted symbol line into a proper C declaration.
4118 # Some systems (esp. on ia64) link data and code symbols differently,
4119 # so use this general approach.
4120 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4122 # Transform an extracted symbol line into symbol name and symbol address
4123 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4124 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
4126 # Handle CRLF in mingw tool chain
4127 opt_cr=
4128 case $build_os in
4129 mingw*)
4130   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4131   ;;
4132 esac
4134 # Try without a prefix underscore, then with it.
4135 for ac_symprfx in "" "_"; do
4137   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4138   symxfrm="\\1 $ac_symprfx\\2 \\2"
4140   # Write the raw and C identifiers.
4141   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4142     # Fake it for dumpbin and say T for any non-static function
4143     # and D for any global variable.
4144     # Also find C++ and __fastcall symbols from MSVC++,
4145     # which start with @ or ?.
4146     lt_cv_sys_global_symbol_pipe="$AWK ['"\
4147 "     {last_section=section; section=\$ 3};"\
4148 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4149 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4150 "     \$ 0!~/External *\|/{next};"\
4151 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4152 "     {if(hide[section]) next};"\
4153 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4154 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4155 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4156 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4157 "     ' prfx=^$ac_symprfx]"
4158   else
4159     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4160   fi
4161   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4163   # Check to see that the pipe works correctly.
4164   pipe_works=no
4166   rm -f conftest*
4167   cat > conftest.$ac_ext <<_LT_EOF
4168 #ifdef __cplusplus
4169 extern "C" {
4170 #endif
4171 char nm_test_var;
4172 void nm_test_func(void);
4173 void nm_test_func(void){}
4174 #ifdef __cplusplus
4176 #endif
4177 int main(){nm_test_var='a';nm_test_func();return(0);}
4178 _LT_EOF
4180   if AC_TRY_EVAL(ac_compile); then
4181     # Now try to grab the symbols.
4182     nlist=conftest.nm
4183     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4184       # Try sorting and uniquifying the output.
4185       if sort "$nlist" | uniq > "$nlist"T; then
4186         mv -f "$nlist"T "$nlist"
4187       else
4188         rm -f "$nlist"T
4189       fi
4191       # Make sure that we snagged all the symbols we need.
4192       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4193         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4194           cat <<_LT_EOF > conftest.$ac_ext
4195 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4196 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4197 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4198    relocations are performed -- see ld's documentation on pseudo-relocs.  */
4199 # define LT@&t@_DLSYM_CONST
4200 #elif defined(__osf__)
4201 /* This system does not cope well with relocations in const data.  */
4202 # define LT@&t@_DLSYM_CONST
4203 #else
4204 # define LT@&t@_DLSYM_CONST const
4205 #endif
4207 #ifdef __cplusplus
4208 extern "C" {
4209 #endif
4211 _LT_EOF
4212           # Now generate the symbol file.
4213           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4215           cat <<_LT_EOF >> conftest.$ac_ext
4217 /* The mapping between symbol names and symbols.  */
4218 LT@&t@_DLSYM_CONST struct {
4219   const char *name;
4220   void       *address;
4222 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4224   { "@PROGRAM@", (void *) 0 },
4225 _LT_EOF
4226           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4227           cat <<\_LT_EOF >> conftest.$ac_ext
4228   {0, (void *) 0}
4229 };
4231 /* This works around a problem in FreeBSD linker */
4232 #ifdef FREEBSD_WORKAROUND
4233 static const void *lt_preloaded_setup() {
4234   return lt__PROGRAM__LTX_preloaded_symbols;
4236 #endif
4238 #ifdef __cplusplus
4240 #endif
4241 _LT_EOF
4242           # Now try linking the two files.
4243           mv conftest.$ac_objext conftstm.$ac_objext
4244           lt_globsym_save_LIBS=$LIBS
4245           lt_globsym_save_CFLAGS=$CFLAGS
4246           LIBS="conftstm.$ac_objext"
4247           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4248           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4249             pipe_works=yes
4250           fi
4251           LIBS=$lt_globsym_save_LIBS
4252           CFLAGS=$lt_globsym_save_CFLAGS
4253         else
4254           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4255         fi
4256       else
4257         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4258       fi
4259     else
4260       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4261     fi
4262   else
4263     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4264     cat conftest.$ac_ext >&5
4265   fi
4266   rm -rf conftest* conftst*
4268   # Do not use the global_symbol_pipe unless it works.
4269   if test "$pipe_works" = yes; then
4270     break
4271   else
4272     lt_cv_sys_global_symbol_pipe=
4273   fi
4274 done
4275 ])
4276 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4277   lt_cv_sys_global_symbol_to_cdecl=
4278 fi
4279 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4280   AC_MSG_RESULT(failed)
4281 else
4282   AC_MSG_RESULT(ok)
4283 fi
4285 # Response file support.
4286 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4287   nm_file_list_spec='@'
4288 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4289   nm_file_list_spec='@'
4290 fi
4292 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4293     [Take the output of nm and produce a listing of raw symbols and C names])
4294 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4295     [Transform the output of nm in a proper C declaration])
4296 _LT_DECL([global_symbol_to_c_name_address],
4297     [lt_cv_sys_global_symbol_to_c_name_address], [1],
4298     [Transform the output of nm in a C name address pair])
4299 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4300     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4301     [Transform the output of nm in a C name address pair when lib prefix is needed])
4302 _LT_DECL([], [nm_file_list_spec], [1],
4303     [Specify filename containing input files for $NM])
4304 ]) # _LT_CMD_GLOBAL_SYMBOLS
4307 # _LT_COMPILER_PIC([TAGNAME])
4308 # ---------------------------
4309 m4_defun([_LT_COMPILER_PIC],
4310 [m4_require([_LT_TAG_COMPILER])dnl
4311 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4312 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4313 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4315 m4_if([$1], [CXX], [
4316   # C++ specific cases for pic, static, wl, etc.
4317   if test "$GXX" = yes; then
4318     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4319     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4321     case $host_os in
4322     aix*)
4323       # All AIX code is PIC.
4324       if test "$host_cpu" = ia64; then
4325         # AIX 5 now supports IA64 processor
4326         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4327       fi
4328       ;;
4330     amigaos*)
4331       case $host_cpu in
4332       powerpc)
4333             # see comment about AmigaOS4 .so support
4334             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4335         ;;
4336       m68k)
4337             # FIXME: we need at least 68020 code to build shared libraries, but
4338             # adding the `-m68020' flag to GCC prevents building anything better,
4339             # like `-m68040'.
4340             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4341         ;;
4342       esac
4343       ;;
4345     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4346       # PIC is the default for these OSes.
4347       ;;
4348     mingw* | cygwin* | os2* | pw32* | cegcc*)
4349       # This hack is so that the source file can tell whether it is being
4350       # built for inclusion in a dll (and should export symbols for example).
4351       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4352       # (--disable-auto-import) libraries
4353       m4_if([$1], [GCJ], [],
4354         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4355       ;;
4356     darwin* | rhapsody*)
4357       # PIC is the default on this platform
4358       # Common symbols not allowed in MH_DYLIB files
4359       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4360       ;;
4361     *djgpp*)
4362       # DJGPP does not support shared libraries at all
4363       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4364       ;;
4365     haiku*)
4366       # PIC is the default for Haiku.
4367       # The "-static" flag exists, but is broken.
4368       _LT_TAGVAR(lt_prog_compiler_static, $1)=
4369       ;;
4370     interix[[3-9]]*)
4371       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4372       # Instead, we relocate shared libraries at runtime.
4373       ;;
4374     sysv4*MP*)
4375       if test -d /usr/nec; then
4376         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4377       fi
4378       ;;
4379     hpux*)
4380       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4381       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4382       # sets the default TLS model and affects inlining.
4383       case $host_cpu in
4384       hppa*64*)
4385         ;;
4386       *)
4387         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4388         ;;
4389       esac
4390       ;;
4391     *qnx* | *nto*)
4392       # QNX uses GNU C++, but need to define -shared option too, otherwise
4393       # it will coredump.
4394       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4395       ;;
4396     *)
4397       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4398       ;;
4399     esac
4400   else
4401     case $host_os in
4402       aix[[4-9]]*)
4403         # All AIX code is PIC.
4404         if test "$host_cpu" = ia64; then
4405           # AIX 5 now supports IA64 processor
4406           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4407         else
4408           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4409         fi
4410         ;;
4411       chorus*)
4412         case $cc_basename in
4413         cxch68*)
4414           # Green Hills C++ Compiler
4415           # _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"
4416           ;;
4417         esac
4418         ;;
4419       mingw* | cygwin* | os2* | pw32* | cegcc*)
4420         # This hack is so that the source file can tell whether it is being
4421         # built for inclusion in a dll (and should export symbols for example).
4422         m4_if([$1], [GCJ], [],
4423           [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4424         ;;
4425       dgux*)
4426         case $cc_basename in
4427           ec++*)
4428             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4429             ;;
4430           ghcx*)
4431             # Green Hills C++ Compiler
4432             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4433             ;;
4434           *)
4435             ;;
4436         esac
4437         ;;
4438       freebsd* | dragonfly*)
4439         # FreeBSD uses GNU C++
4440         ;;
4441       hpux9* | hpux10* | hpux11*)
4442         case $cc_basename in
4443           CC*)
4444             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4445             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4446             if test "$host_cpu" != ia64; then
4447               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4448             fi
4449             ;;
4450           aCC*)
4451             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4452             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4453             case $host_cpu in
4454             hppa*64*|ia64*)
4455               # +Z the default
4456               ;;
4457             *)
4458               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4459               ;;
4460             esac
4461             ;;
4462           *)
4463             ;;
4464         esac
4465         ;;
4466       interix*)
4467         # This is c89, which is MS Visual C++ (no shared libs)
4468         # Anyone wants to do a port?
4469         ;;
4470       irix5* | irix6* | nonstopux*)
4471         case $cc_basename in
4472           CC*)
4473             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4474             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4475             # CC pic flag -KPIC is the default.
4476             ;;
4477           *)
4478             ;;
4479         esac
4480         ;;
4481       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4482         case $cc_basename in
4483           KCC*)
4484             # KAI C++ Compiler
4485             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4486             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4487             ;;
4488           ecpc* )
4489             # old Intel C++ for x86_64 which still supported -KPIC.
4490             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4491             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4492             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4493             ;;
4494           icpc* )
4495             # Intel C++, used to be incompatible with GCC.
4496             # ICC 10 doesn't accept -KPIC any more.
4497             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4498             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4499             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4500             ;;
4501           pgCC* | pgcpp*)
4502             # Portland Group C++ compiler
4503             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4504             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4505             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4506             ;;
4507           cxx*)
4508             # Compaq C++
4509             # Make sure the PIC flag is empty.  It appears that all Alpha
4510             # Linux and Compaq Tru64 Unix objects are PIC.
4511             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4512             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4513             ;;
4514           xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4515             # IBM XL 8.0, 9.0 on PPC and BlueGene
4516             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4517             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4518             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4519             ;;
4520           *)
4521             case `$CC -V 2>&1 | sed 5q` in
4522             *Sun\ C*)
4523               # Sun C++ 5.9
4524               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4525               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4526               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4527               ;;
4528             esac
4529             ;;
4530         esac
4531         ;;
4532       lynxos*)
4533         ;;
4534       m88k*)
4535         ;;
4536       mvs*)
4537         case $cc_basename in
4538           cxx*)
4539             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4540             ;;
4541           *)
4542             ;;
4543         esac
4544         ;;
4545       netbsd* | netbsdelf*-gnu)
4546         ;;
4547       *qnx* | *nto*)
4548         # QNX uses GNU C++, but need to define -shared option too, otherwise
4549         # it will coredump.
4550         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4551         ;;
4552       osf3* | osf4* | osf5*)
4553         case $cc_basename in
4554           KCC*)
4555             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4556             ;;
4557           RCC*)
4558             # Rational C++ 2.4.1
4559             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4560             ;;
4561           cxx*)
4562             # Digital/Compaq C++
4563             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4564             # Make sure the PIC flag is empty.  It appears that all Alpha
4565             # Linux and Compaq Tru64 Unix objects are PIC.
4566             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4567             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4568             ;;
4569           *)
4570             ;;
4571         esac
4572         ;;
4573       psos*)
4574         ;;
4575       solaris*)
4576         case $cc_basename in
4577           CC* | sunCC*)
4578             # Sun C++ 4.2, 5.x and Centerline C++
4579             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4580             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4581             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4582             ;;
4583           gcx*)
4584             # Green Hills C++ Compiler
4585             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4586             ;;
4587           *)
4588             ;;
4589         esac
4590         ;;
4591       sunos4*)
4592         case $cc_basename in
4593           CC*)
4594             # Sun C++ 4.x
4595             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4596             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4597             ;;
4598           lcc*)
4599             # Lucid
4600             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4601             ;;
4602           *)
4603             ;;
4604         esac
4605         ;;
4606       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4607         case $cc_basename in
4608           CC*)
4609             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4610             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4611             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4612             ;;
4613         esac
4614         ;;
4615       tandem*)
4616         case $cc_basename in
4617           NCC*)
4618             # NonStop-UX NCC 3.20
4619             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4620             ;;
4621           *)
4622             ;;
4623         esac
4624         ;;
4625       vxworks*)
4626         ;;
4627       *)
4628         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4629         ;;
4630     esac
4631   fi
4632 ],
4634   if test "$GCC" = yes; then
4635     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4636     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4638     case $host_os in
4639       aix*)
4640       # All AIX code is PIC.
4641       if test "$host_cpu" = ia64; then
4642         # AIX 5 now supports IA64 processor
4643         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4644       fi
4645       ;;
4647     amigaos*)
4648       case $host_cpu in
4649       powerpc)
4650             # see comment about AmigaOS4 .so support
4651             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4652         ;;
4653       m68k)
4654             # FIXME: we need at least 68020 code to build shared libraries, but
4655             # adding the `-m68020' flag to GCC prevents building anything better,
4656             # like `-m68040'.
4657             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4658         ;;
4659       esac
4660       ;;
4662     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4663       # PIC is the default for these OSes.
4664       ;;
4666     mingw* | cygwin* | pw32* | os2* | cegcc*)
4667       # This hack is so that the source file can tell whether it is being
4668       # built for inclusion in a dll (and should export symbols for example).
4669       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4670       # (--disable-auto-import) libraries
4671       m4_if([$1], [GCJ], [],
4672         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4673       ;;
4675     darwin* | rhapsody*)
4676       # PIC is the default on this platform
4677       # Common symbols not allowed in MH_DYLIB files
4678       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4679       ;;
4681     haiku*)
4682       # PIC is the default for Haiku.
4683       # The "-static" flag exists, but is broken.
4684       _LT_TAGVAR(lt_prog_compiler_static, $1)=
4685       ;;
4687     hpux*)
4688       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4689       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4690       # sets the default TLS model and affects inlining.
4691       case $host_cpu in
4692       hppa*64*)
4693         # +Z the default
4694         ;;
4695       *)
4696         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4697         ;;
4698       esac
4699       ;;
4701     interix[[3-9]]*)
4702       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4703       # Instead, we relocate shared libraries at runtime.
4704       ;;
4706     msdosdjgpp*)
4707       # Just because we use GCC doesn't mean we suddenly get shared libraries
4708       # on systems that don't support them.
4709       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4710       enable_shared=no
4711       ;;
4713     *nto* | *qnx*)
4714       # QNX uses GNU C++, but need to define -shared option too, otherwise
4715       # it will coredump.
4716       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4717       ;;
4719     sysv4*MP*)
4720       if test -d /usr/nec; then
4721         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4722       fi
4723       ;;
4725     *)
4726       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4727       ;;
4728     esac
4730     case $cc_basename in
4731     nvcc*) # Cuda Compiler Driver 2.2
4732       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4733       if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4734         _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4735       fi
4736       ;;
4737     esac
4738   else
4739     # PORTME Check for flag to pass linker flags through the system compiler.
4740     case $host_os in
4741     aix*)
4742       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4743       if test "$host_cpu" = ia64; then
4744         # AIX 5 now supports IA64 processor
4745         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4746       else
4747         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4748       fi
4749       ;;
4751     mingw* | cygwin* | pw32* | os2* | cegcc*)
4752       # This hack is so that the source file can tell whether it is being
4753       # built for inclusion in a dll (and should export symbols for example).
4754       m4_if([$1], [GCJ], [],
4755         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4756       ;;
4758     hpux9* | hpux10* | hpux11*)
4759       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4760       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4761       # not for PA HP-UX.
4762       case $host_cpu in
4763       hppa*64*|ia64*)
4764         # +Z the default
4765         ;;
4766       *)
4767         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4768         ;;
4769       esac
4770       # Is there a better lt_prog_compiler_static that works with the bundled CC?
4771       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4772       ;;
4774     irix5* | irix6* | nonstopux*)
4775       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4776       # PIC (with -KPIC) is the default.
4777       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4778       ;;
4780     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4781       case $cc_basename in
4782       # old Intel for x86_64 which still supported -KPIC.
4783       ecc*)
4784         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4785         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4786         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4787         ;;
4788       # icc used to be incompatible with GCC.
4789       # ICC 10 doesn't accept -KPIC any more.
4790       icc* | ifort*)
4791         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4792         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4793         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4794         ;;
4795       # Lahey Fortran 8.1.
4796       lf95*)
4797         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4798         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4799         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4800         ;;
4801       nagfor*)
4802         # NAG Fortran compiler
4803         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4804         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4805         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4806         ;;
4807       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4808         # Portland Group compilers (*not* the Pentium gcc compiler,
4809         # which looks to be a dead project)
4810         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4811         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4812         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4813         ;;
4814       ccc*)
4815         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4816         # All Alpha code is PIC.
4817         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4818         ;;
4819       xl* | bgxl* | bgf* | mpixl*)
4820         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4821         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4822         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4823         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4824         ;;
4825       *)
4826         case `$CC -V 2>&1 | sed 5q` in
4827         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4828           # Sun Fortran 8.3 passes all unrecognized flags to the linker
4829           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4830           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4831           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4832           ;;
4833         *Sun\ F* | *Sun*Fortran*)
4834           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4835           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4836           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4837           ;;
4838         *Sun\ C*)
4839           # Sun C 5.9
4840           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4841           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4842           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4843           ;;
4844         *Intel*\ [[CF]]*Compiler*)
4845           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4846           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4847           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4848           ;;
4849         *Portland\ Group*)
4850           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4851           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4852           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4853           ;;
4854         esac
4855         ;;
4856       esac
4857       ;;
4859     newsos6)
4860       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4861       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4862       ;;
4864     *nto* | *qnx*)
4865       # QNX uses GNU C++, but need to define -shared option too, otherwise
4866       # it will coredump.
4867       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4868       ;;
4870     osf3* | osf4* | osf5*)
4871       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4872       # All OSF/1 code is PIC.
4873       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4874       ;;
4876     rdos*)
4877       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4878       ;;
4880     solaris*)
4881       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4882       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4883       case $cc_basename in
4884       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4885         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4886       *)
4887         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4888       esac
4889       ;;
4891     sunos4*)
4892       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4893       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4894       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4895       ;;
4897     sysv4 | sysv4.2uw2* | sysv4.3*)
4898       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4899       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4900       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4901       ;;
4903     sysv4*MP*)
4904       if test -d /usr/nec ;then
4905         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4906         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4907       fi
4908       ;;
4910     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4911       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4912       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4913       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4914       ;;
4916     unicos*)
4917       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4918       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4919       ;;
4921     uts4*)
4922       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4923       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4924       ;;
4926     *)
4927       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4928       ;;
4929     esac
4930   fi
4931 ])
4932 case $host_os in
4933   # For platforms which do not support PIC, -DPIC is meaningless:
4934   *djgpp*)
4935     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4936     ;;
4937   *)
4938     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4939     ;;
4940 esac
4942 AC_CACHE_CHECK([for $compiler option to produce PIC],
4943   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4944   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4945 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4948 # Check to make sure the PIC flag actually works.
4950 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4951   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4952     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4953     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4954     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4955      "" | " "*) ;;
4956      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4957      esac],
4958     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4959      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4960 fi
4961 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4962         [Additional compiler flags for building library objects])
4964 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4965         [How to pass a linker flag through the compiler])
4967 # Check to make sure the static flag actually works.
4969 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4970 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4971   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4972   $lt_tmp_static_flag,
4973   [],
4974   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4975 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4976         [Compiler flag to prevent dynamic linking])
4977 ])# _LT_COMPILER_PIC
4980 # _LT_LINKER_SHLIBS([TAGNAME])
4981 # ----------------------------
4982 # See if the linker supports building shared libraries.
4983 m4_defun([_LT_LINKER_SHLIBS],
4984 [AC_REQUIRE([LT_PATH_LD])dnl
4985 AC_REQUIRE([LT_PATH_NM])dnl
4986 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4987 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4988 m4_require([_LT_DECL_EGREP])dnl
4989 m4_require([_LT_DECL_SED])dnl
4990 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4991 m4_require([_LT_TAG_COMPILER])dnl
4992 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4993 m4_if([$1], [CXX], [
4994   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4995   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4996   case $host_os in
4997   aix[[4-9]]*)
4998     # If we're using GNU nm, then we don't want the "-C" option.
4999     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5000     # Also, AIX nm treats weak defined symbols like other global defined
5001     # symbols, whereas GNU nm marks them as "W".
5002     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5003       _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'
5004     else
5005       _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'
5006     fi
5007     ;;
5008   pw32*)
5009     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5010     ;;
5011   cygwin* | mingw* | cegcc*)
5012     case $cc_basename in
5013     cl*)
5014       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5015       ;;
5016     *)
5017       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5018       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5019       ;;
5020     esac
5021     ;;
5022   linux* | k*bsd*-gnu | gnu*)
5023     _LT_TAGVAR(link_all_deplibs, $1)=no
5024     ;;
5025   *)
5026     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5027     ;;
5028   esac
5029 ], [
5030   runpath_var=
5031   _LT_TAGVAR(allow_undefined_flag, $1)=
5032   _LT_TAGVAR(always_export_symbols, $1)=no
5033   _LT_TAGVAR(archive_cmds, $1)=
5034   _LT_TAGVAR(archive_expsym_cmds, $1)=
5035   _LT_TAGVAR(compiler_needs_object, $1)=no
5036   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5037   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5038   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5039   _LT_TAGVAR(hardcode_automatic, $1)=no
5040   _LT_TAGVAR(hardcode_direct, $1)=no
5041   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5042   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5043   _LT_TAGVAR(hardcode_libdir_separator, $1)=
5044   _LT_TAGVAR(hardcode_minus_L, $1)=no
5045   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5046   _LT_TAGVAR(inherit_rpath, $1)=no
5047   _LT_TAGVAR(link_all_deplibs, $1)=unknown
5048   _LT_TAGVAR(module_cmds, $1)=
5049   _LT_TAGVAR(module_expsym_cmds, $1)=
5050   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5051   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5052   _LT_TAGVAR(thread_safe_flag_spec, $1)=
5053   _LT_TAGVAR(whole_archive_flag_spec, $1)=
5054   # include_expsyms should be a list of space-separated symbols to be *always*
5055   # included in the symbol list
5056   _LT_TAGVAR(include_expsyms, $1)=
5057   # exclude_expsyms can be an extended regexp of symbols to exclude
5058   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5059   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5060   # as well as any symbol that contains `d'.
5061   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5062   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5063   # platforms (ab)use it in PIC code, but their linkers get confused if
5064   # the symbol is explicitly referenced.  Since portable code cannot
5065   # rely on this symbol name, it's probably fine to never include it in
5066   # preloaded symbol tables.
5067   # Exclude shared library initialization/finalization symbols.
5068 dnl Note also adjust exclude_expsyms for C++ above.
5069   extract_expsyms_cmds=
5071   case $host_os in
5072   cygwin* | mingw* | pw32* | cegcc*)
5073     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5074     # When not using gcc, we currently assume that we are using
5075     # Microsoft Visual C++.
5076     if test "$GCC" != yes; then
5077       with_gnu_ld=no
5078     fi
5079     ;;
5080   interix*)
5081     # we just hope/assume this is gcc and not c89 (= MSVC++)
5082     with_gnu_ld=yes
5083     ;;
5084   openbsd*)
5085     with_gnu_ld=no
5086     ;;
5087   linux* | k*bsd*-gnu | gnu*)
5088     _LT_TAGVAR(link_all_deplibs, $1)=no
5089     ;;
5090   esac
5092   _LT_TAGVAR(ld_shlibs, $1)=yes
5094   # On some targets, GNU ld is compatible enough with the native linker
5095   # that we're better off using the native interface for both.
5096   lt_use_gnu_ld_interface=no
5097   if test "$with_gnu_ld" = yes; then
5098     case $host_os in
5099       aix*)
5100         # The AIX port of GNU ld has always aspired to compatibility
5101         # with the native linker.  However, as the warning in the GNU ld
5102         # block says, versions before 2.19.5* couldn't really create working
5103         # shared libraries, regardless of the interface used.
5104         case `$LD -v 2>&1` in
5105           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5106           *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5107           *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5108           *)
5109             lt_use_gnu_ld_interface=yes
5110             ;;
5111         esac
5112         ;;
5113       *)
5114         lt_use_gnu_ld_interface=yes
5115         ;;
5116     esac
5117   fi
5119   if test "$lt_use_gnu_ld_interface" = yes; then
5120     # If archive_cmds runs LD, not CC, wlarc should be empty
5121     wlarc='${wl}'
5123     # Set some defaults for GNU ld with shared library support. These
5124     # are reset later if shared libraries are not supported. Putting them
5125     # here allows them to be overridden if necessary.
5126     runpath_var=LD_RUN_PATH
5127     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5128     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5129     # ancient GNU ld didn't support --whole-archive et. al.
5130     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5131       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5132     else
5133       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5134     fi
5135     supports_anon_versioning=no
5136     case `$LD -v 2>&1` in
5137       *GNU\ gold*) supports_anon_versioning=yes ;;
5138       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5139       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5140       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5141       *\ 2.11.*) ;; # other 2.11 versions
5142       *) supports_anon_versioning=yes ;;
5143     esac
5145     # See if GNU ld supports shared libraries.
5146     case $host_os in
5147     aix[[3-9]]*)
5148       # On AIX/PPC, the GNU linker is very broken
5149       if test "$host_cpu" != ia64; then
5150         _LT_TAGVAR(ld_shlibs, $1)=no
5151         cat <<_LT_EOF 1>&2
5153 *** Warning: the GNU linker, at least up to release 2.19, is reported
5154 *** to be unable to reliably create shared libraries on AIX.
5155 *** Therefore, libtool is disabling shared libraries support.  If you
5156 *** really care for shared libraries, you may want to install binutils
5157 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5158 *** You will then need to restart the configuration process.
5160 _LT_EOF
5161       fi
5162       ;;
5164     amigaos*)
5165       case $host_cpu in
5166       powerpc)
5167             # see comment about AmigaOS4 .so support
5168             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5169             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5170         ;;
5171       m68k)
5172             _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)'
5173             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5174             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5175         ;;
5176       esac
5177       ;;
5179     beos*)
5180       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5181         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5182         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5183         # support --undefined.  This deserves some investigation.  FIXME
5184         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5185       else
5186         _LT_TAGVAR(ld_shlibs, $1)=no
5187       fi
5188       ;;
5190     cygwin* | mingw* | pw32* | cegcc*)
5191       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5192       # as there is no search path for DLLs.
5193       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5194       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5195       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5196       _LT_TAGVAR(always_export_symbols, $1)=no
5197       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5198       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5199       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5201       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5202         _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'
5203         # If the export-symbols file already is a .def file (1st line
5204         # is EXPORTS), use it as is; otherwise, prepend...
5205         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5206           cp $export_symbols $output_objdir/$soname.def;
5207         else
5208           echo EXPORTS > $output_objdir/$soname.def;
5209           cat $export_symbols >> $output_objdir/$soname.def;
5210         fi~
5211         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5212       else
5213         _LT_TAGVAR(ld_shlibs, $1)=no
5214       fi
5215       ;;
5217     haiku*)
5218       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5219       _LT_TAGVAR(link_all_deplibs, $1)=yes
5220       ;;
5222     interix[[3-9]]*)
5223       _LT_TAGVAR(hardcode_direct, $1)=no
5224       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5225       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5226       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5227       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5228       # Instead, shared libraries are loaded at an image base (0x10000000 by
5229       # default) and relocated if they conflict, which is a slow very memory
5230       # consuming and fragmenting process.  To avoid this, we pick a random,
5231       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5232       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5233       _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'
5234       _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'
5235       ;;
5237     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5238       tmp_diet=no
5239       if test "$host_os" = linux-dietlibc; then
5240         case $cc_basename in
5241           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
5242         esac
5243       fi
5244       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5245          && test "$tmp_diet" = no
5246       then
5247         tmp_addflag=' $pic_flag'
5248         tmp_sharedflag='-shared'
5249         case $cc_basename,$host_cpu in
5250         pgcc*)                          # Portland Group C compiler
5251           _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'
5252           tmp_addflag=' $pic_flag'
5253           ;;
5254         pgf77* | pgf90* | pgf95* | pgfortran*)
5255                                         # Portland Group f77 and f90 compilers
5256           _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'
5257           tmp_addflag=' $pic_flag -Mnomain' ;;
5258         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
5259           tmp_addflag=' -i_dynamic' ;;
5260         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
5261           tmp_addflag=' -i_dynamic -nofor_main' ;;
5262         ifc* | ifort*)                  # Intel Fortran compiler
5263           tmp_addflag=' -nofor_main' ;;
5264         lf95*)                          # Lahey Fortran 8.1
5265           _LT_TAGVAR(whole_archive_flag_spec, $1)=
5266           tmp_sharedflag='--shared' ;;
5267         xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5268           tmp_sharedflag='-qmkshrobj'
5269           tmp_addflag= ;;
5270         nvcc*)  # Cuda Compiler Driver 2.2
5271           _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'
5272           _LT_TAGVAR(compiler_needs_object, $1)=yes
5273           ;;
5274         esac
5275         case `$CC -V 2>&1 | sed 5q` in
5276         *Sun\ C*)                       # Sun C 5.9
5277           _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'
5278           _LT_TAGVAR(compiler_needs_object, $1)=yes
5279           tmp_sharedflag='-G' ;;
5280         *Sun\ F*)                       # Sun Fortran 8.3
5281           tmp_sharedflag='-G' ;;
5282         esac
5283         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5285         if test "x$supports_anon_versioning" = xyes; then
5286           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5287             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5288             echo "local: *; };" >> $output_objdir/$libname.ver~
5289             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5290         fi
5292         case $cc_basename in
5293         xlf* | bgf* | bgxlf* | mpixlf*)
5294           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5295           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5296           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5297           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5298           if test "x$supports_anon_versioning" = xyes; then
5299             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5300               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5301               echo "local: *; };" >> $output_objdir/$libname.ver~
5302               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5303           fi
5304           ;;
5305         esac
5306       else
5307         _LT_TAGVAR(ld_shlibs, $1)=no
5308       fi
5309       ;;
5311     netbsd* | netbsdelf*-gnu)
5312       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5313         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5314         wlarc=
5315       else
5316         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5317         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5318       fi
5319       ;;
5321     solaris*)
5322       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5323         _LT_TAGVAR(ld_shlibs, $1)=no
5324         cat <<_LT_EOF 1>&2
5326 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5327 *** create shared libraries on Solaris systems.  Therefore, libtool
5328 *** is disabling shared libraries support.  We urge you to upgrade GNU
5329 *** binutils to release 2.9.1 or newer.  Another option is to modify
5330 *** your PATH or compiler configuration so that the native linker is
5331 *** used, and then restart.
5333 _LT_EOF
5334       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5335         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5336         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5337       else
5338         _LT_TAGVAR(ld_shlibs, $1)=no
5339       fi
5340       ;;
5342     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5343       case `$LD -v 2>&1` in
5344         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5345         _LT_TAGVAR(ld_shlibs, $1)=no
5346         cat <<_LT_EOF 1>&2
5348 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5349 *** reliably create shared libraries on SCO systems.  Therefore, libtool
5350 *** is disabling shared libraries support.  We urge you to upgrade GNU
5351 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5352 *** your PATH or compiler configuration so that the native linker is
5353 *** used, and then restart.
5355 _LT_EOF
5356         ;;
5357         *)
5358           # For security reasons, it is highly recommended that you always
5359           # use absolute paths for naming shared libraries, and exclude the
5360           # DT_RUNPATH tag from executables and libraries.  But doing so
5361           # requires that you compile everything twice, which is a pain.
5362           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5363             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5364             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5365             _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'
5366           else
5367             _LT_TAGVAR(ld_shlibs, $1)=no
5368           fi
5369         ;;
5370       esac
5371       ;;
5373     sunos4*)
5374       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5375       wlarc=
5376       _LT_TAGVAR(hardcode_direct, $1)=yes
5377       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5378       ;;
5380     *)
5381       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5382         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5383         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5384       else
5385         _LT_TAGVAR(ld_shlibs, $1)=no
5386       fi
5387       ;;
5388     esac
5390     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5391       runpath_var=
5392       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5393       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5394       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5395     fi
5396   else
5397     # PORTME fill in a description of your system's linker (not GNU ld)
5398     case $host_os in
5399     aix3*)
5400       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5401       _LT_TAGVAR(always_export_symbols, $1)=yes
5402       _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'
5403       # Note: this linker hardcodes the directories in LIBPATH if there
5404       # are no directories specified by -L.
5405       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5406       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5407         # Neither direct hardcoding nor static linking is supported with a
5408         # broken collect2.
5409         _LT_TAGVAR(hardcode_direct, $1)=unsupported
5410       fi
5411       ;;
5413     aix[[4-9]]*)
5414       if test "$host_cpu" = ia64; then
5415         # On IA64, the linker does run time linking by default, so we don't
5416         # have to do anything special.
5417         aix_use_runtimelinking=no
5418         exp_sym_flag='-Bexport'
5419         no_entry_flag=""
5420       else
5421         # If we're using GNU nm, then we don't want the "-C" option.
5422         # -C means demangle to AIX nm, but means don't demangle with GNU nm
5423         # Also, AIX nm treats weak defined symbols like other global
5424         # defined symbols, whereas GNU nm marks them as "W".
5425         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5426           _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'
5427         else
5428           _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'
5429         fi
5430         aix_use_runtimelinking=no
5432         # Test if we are trying to use run time linking or normal
5433         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5434         # need to do runtime linking.
5435         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5436           for ld_flag in $LDFLAGS; do
5437           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5438             aix_use_runtimelinking=yes
5439             break
5440           fi
5441           done
5442           ;;
5443         esac
5445         exp_sym_flag='-bexport'
5446         no_entry_flag='-bnoentry'
5447       fi
5449       # When large executables or shared objects are built, AIX ld can
5450       # have problems creating the table of contents.  If linking a library
5451       # or program results in "error TOC overflow" add -mminimal-toc to
5452       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5453       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5455       _LT_TAGVAR(archive_cmds, $1)=''
5456       _LT_TAGVAR(hardcode_direct, $1)=yes
5457       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5458       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5459       _LT_TAGVAR(link_all_deplibs, $1)=yes
5460       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5462       if test "$GCC" = yes; then
5463         case $host_os in aix4.[[012]]|aix4.[[012]].*)
5464         # We only want to do this on AIX 4.2 and lower, the check
5465         # below for broken collect2 doesn't work under 4.3+
5466           collect2name=`${CC} -print-prog-name=collect2`
5467           if test -f "$collect2name" &&
5468            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5469           then
5470           # We have reworked collect2
5471           :
5472           else
5473           # We have old collect2
5474           _LT_TAGVAR(hardcode_direct, $1)=unsupported
5475           # It fails to find uninstalled libraries when the uninstalled
5476           # path is not listed in the libpath.  Setting hardcode_minus_L
5477           # to unsupported forces relinking
5478           _LT_TAGVAR(hardcode_minus_L, $1)=yes
5479           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5480           _LT_TAGVAR(hardcode_libdir_separator, $1)=
5481           fi
5482           ;;
5483         esac
5484         shared_flag='-shared'
5485         if test "$aix_use_runtimelinking" = yes; then
5486           shared_flag="$shared_flag "'${wl}-G'
5487         fi
5488         _LT_TAGVAR(link_all_deplibs, $1)=no
5489       else
5490         # not using gcc
5491         if test "$host_cpu" = ia64; then
5492         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5493         # chokes on -Wl,-G. The following line is correct:
5494           shared_flag='-G'
5495         else
5496           if test "$aix_use_runtimelinking" = yes; then
5497             shared_flag='${wl}-G'
5498           else
5499             shared_flag='${wl}-bM:SRE'
5500           fi
5501         fi
5502       fi
5504       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5505       # It seems that -bexpall does not export symbols beginning with
5506       # underscore (_), so it is better to generate a list of symbols to export.
5507       _LT_TAGVAR(always_export_symbols, $1)=yes
5508       if test "$aix_use_runtimelinking" = yes; then
5509         # Warning - without using the other runtime loading flags (-brtl),
5510         # -berok will link without error, but may produce a broken library.
5511         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5512         # Determine the default libpath from the value encoded in an
5513         # empty executable.
5514         _LT_SYS_MODULE_PATH_AIX([$1])
5515         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5516         _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"
5517       else
5518         if test "$host_cpu" = ia64; then
5519           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5520           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5521           _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"
5522         else
5523          # Determine the default libpath from the value encoded in an
5524          # empty executable.
5525          _LT_SYS_MODULE_PATH_AIX([$1])
5526          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5527           # Warning - without using the other run time loading flags,
5528           # -berok will link without error, but may produce a broken library.
5529           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5530           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5531           if test "$with_gnu_ld" = yes; then
5532             # We only use this code for GNU lds that support --whole-archive.
5533             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5534           else
5535             # Exported symbols can be pulled into shared objects from archives
5536             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5537           fi
5538           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5539           # This is similar to how AIX traditionally builds its shared libraries.
5540           _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'
5541         fi
5542       fi
5543       ;;
5545     amigaos*)
5546       case $host_cpu in
5547       powerpc)
5548             # see comment about AmigaOS4 .so support
5549             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5550             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5551         ;;
5552       m68k)
5553             _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)'
5554             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5555             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5556         ;;
5557       esac
5558       ;;
5560     bsdi[[45]]*)
5561       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5562       ;;
5564     cygwin* | mingw* | pw32* | cegcc*)
5565       # When not using gcc, we currently assume that we are using
5566       # Microsoft Visual C++.
5567       # hardcode_libdir_flag_spec is actually meaningless, as there is
5568       # no search path for DLLs.
5569       case $cc_basename in
5570       cl*)
5571         # Native MSVC
5572         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5573         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5574         _LT_TAGVAR(always_export_symbols, $1)=yes
5575         _LT_TAGVAR(file_list_spec, $1)='@'
5576         # Tell ltmain to make .lib files, not .a files.
5577         libext=lib
5578         # Tell ltmain to make .dll files, not .so files.
5579         shrext_cmds=".dll"
5580         # FIXME: Setting linknames here is a bad hack.
5581         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5582         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5583             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5584           else
5585             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5586           fi~
5587           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5588           linknames='
5589         # The linker will not automatically build a static lib if we build a DLL.
5590         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5591         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5592         _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5593         _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'
5594         # Don't use ranlib
5595         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5596         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5597           lt_tool_outputfile="@TOOL_OUTPUT@"~
5598           case $lt_outputfile in
5599             *.exe|*.EXE) ;;
5600             *)
5601               lt_outputfile="$lt_outputfile.exe"
5602               lt_tool_outputfile="$lt_tool_outputfile.exe"
5603               ;;
5604           esac~
5605           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5606             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5607             $RM "$lt_outputfile.manifest";
5608           fi'
5609         ;;
5610       *)
5611         # Assume MSVC wrapper
5612         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5613         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5614         # Tell ltmain to make .lib files, not .a files.
5615         libext=lib
5616         # Tell ltmain to make .dll files, not .so files.
5617         shrext_cmds=".dll"
5618         # FIXME: Setting linknames here is a bad hack.
5619         _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5620         # The linker will automatically build a .lib file if we build a DLL.
5621         _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5622         # FIXME: Should let the user specify the lib program.
5623         _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5624         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5625         ;;
5626       esac
5627       ;;
5629     darwin* | rhapsody*)
5630       _LT_DARWIN_LINKER_FEATURES($1)
5631       ;;
5633     dgux*)
5634       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5635       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5636       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5637       ;;
5639     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5640     # support.  Future versions do this automatically, but an explicit c++rt0.o
5641     # does not break anything, and helps significantly (at the cost of a little
5642     # extra space).
5643     freebsd2.2*)
5644       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5645       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5646       _LT_TAGVAR(hardcode_direct, $1)=yes
5647       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5648       ;;
5650     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5651     freebsd2.*)
5652       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5653       _LT_TAGVAR(hardcode_direct, $1)=yes
5654       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5655       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5656       ;;
5658     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5659     freebsd* | dragonfly*)
5660       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5661       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5662       _LT_TAGVAR(hardcode_direct, $1)=yes
5663       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5664       ;;
5666     hpux9*)
5667       if test "$GCC" = yes; then
5668         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5669       else
5670         _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'
5671       fi
5672       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5673       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5674       _LT_TAGVAR(hardcode_direct, $1)=yes
5676       # hardcode_minus_L: Not really in the search PATH,
5677       # but as the default location of the library.
5678       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5679       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5680       ;;
5682     hpux10*)
5683       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5684         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5685       else
5686         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5687       fi
5688       if test "$with_gnu_ld" = no; then
5689         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5690         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5691         _LT_TAGVAR(hardcode_direct, $1)=yes
5692         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5693         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5694         # hardcode_minus_L: Not really in the search PATH,
5695         # but as the default location of the library.
5696         _LT_TAGVAR(hardcode_minus_L, $1)=yes
5697       fi
5698       ;;
5700     hpux11*)
5701       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5702         case $host_cpu in
5703         hppa*64*)
5704           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5705           ;;
5706         ia64*)
5707           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5708           ;;
5709         *)
5710           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5711           ;;
5712         esac
5713       else
5714         case $host_cpu in
5715         hppa*64*)
5716           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5717           ;;
5718         ia64*)
5719           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5720           ;;
5721         *)
5722         m4_if($1, [], [
5723           # Older versions of the 11.00 compiler do not understand -b yet
5724           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5725           _LT_LINKER_OPTION([if $CC understands -b],
5726             _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5727             [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5728             [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5729           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5730           ;;
5731         esac
5732       fi
5733       if test "$with_gnu_ld" = no; then
5734         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5735         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5737         case $host_cpu in
5738         hppa*64*|ia64*)
5739           _LT_TAGVAR(hardcode_direct, $1)=no
5740           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5741           ;;
5742         *)
5743           _LT_TAGVAR(hardcode_direct, $1)=yes
5744           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5745           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5747           # hardcode_minus_L: Not really in the search PATH,
5748           # but as the default location of the library.
5749           _LT_TAGVAR(hardcode_minus_L, $1)=yes
5750           ;;
5751         esac
5752       fi
5753       ;;
5755     irix5* | irix6* | nonstopux*)
5756       if test "$GCC" = yes; then
5757         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5758         # Try to use the -exported_symbol ld option, if it does not
5759         # work, assume that -exports_file does not work either and
5760         # implicitly export all symbols.
5761         # This should be the same for all languages, so no per-tag cache variable.
5762         AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5763           [lt_cv_irix_exported_symbol],
5764           [save_LDFLAGS="$LDFLAGS"
5765            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5766            AC_LINK_IFELSE(
5767              [AC_LANG_SOURCE(
5768                 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5769                               [C++], [[int foo (void) { return 0; }]],
5770                               [Fortran 77], [[
5771       subroutine foo
5772       end]],
5773                               [Fortran], [[
5774       subroutine foo
5775       end]])])],
5776               [lt_cv_irix_exported_symbol=yes],
5777               [lt_cv_irix_exported_symbol=no])
5778            LDFLAGS="$save_LDFLAGS"])
5779         if test "$lt_cv_irix_exported_symbol" = yes; then
5780           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5781         fi
5782       else
5783         _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'
5784         _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'
5785       fi
5786       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5787       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5788       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5789       _LT_TAGVAR(inherit_rpath, $1)=yes
5790       _LT_TAGVAR(link_all_deplibs, $1)=yes
5791       ;;
5793     netbsd* | netbsdelf*-gnu)
5794       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5795         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5796       else
5797         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5798       fi
5799       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5800       _LT_TAGVAR(hardcode_direct, $1)=yes
5801       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5802       ;;
5804     newsos6)
5805       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5806       _LT_TAGVAR(hardcode_direct, $1)=yes
5807       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5808       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5809       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5810       ;;
5812     *nto* | *qnx*)
5813       ;;
5815     openbsd*)
5816       if test -f /usr/libexec/ld.so; then
5817         _LT_TAGVAR(hardcode_direct, $1)=yes
5818         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5819         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5820         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5821           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5822           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5823           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5824           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5825         else
5826           case $host_os in
5827            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5828              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5829              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5830              ;;
5831            *)
5832              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5833              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5834              ;;
5835           esac
5836         fi
5837       else
5838         _LT_TAGVAR(ld_shlibs, $1)=no
5839       fi
5840       ;;
5842     os2*)
5843       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5844       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5845       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5846       _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'
5847       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5848       ;;
5850     osf3*)
5851       if test "$GCC" = yes; then
5852         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5853         _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'
5854       else
5855         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5856         _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'
5857       fi
5858       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5859       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5860       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5861       ;;
5863     osf4* | osf5*)      # as osf3* with the addition of -msym flag
5864       if test "$GCC" = yes; then
5865         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5866         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5867         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5868       else
5869         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5870         _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'
5871         _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~
5872         $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'
5874         # Both c and cxx compiler support -rpath directly
5875         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5876       fi
5877       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5878       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5879       ;;
5881     solaris*)
5882       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5883       if test "$GCC" = yes; then
5884         wlarc='${wl}'
5885         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5886         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5887           $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5888       else
5889         case `$CC -V 2>&1` in
5890         *"Compilers 5.0"*)
5891           wlarc=''
5892           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5893           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5894           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5895           ;;
5896         *)
5897           wlarc='${wl}'
5898           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5899           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5900           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5901           ;;
5902         esac
5903       fi
5904       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5905       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5906       case $host_os in
5907       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5908       *)
5909         # The compiler driver will combine and reorder linker options,
5910         # but understands `-z linker_flag'.  GCC discards it without `$wl',
5911         # but is careful enough not to reorder.
5912         # Supported since Solaris 2.6 (maybe 2.5.1?)
5913         if test "$GCC" = yes; then
5914           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5915         else
5916           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5917         fi
5918         ;;
5919       esac
5920       _LT_TAGVAR(link_all_deplibs, $1)=yes
5921       ;;
5923     sunos4*)
5924       if test "x$host_vendor" = xsequent; then
5925         # Use $CC to link under sequent, because it throws in some extra .o
5926         # files that make .init and .fini sections work.
5927         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5928       else
5929         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5930       fi
5931       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5932       _LT_TAGVAR(hardcode_direct, $1)=yes
5933       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5934       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5935       ;;
5937     sysv4)
5938       case $host_vendor in
5939         sni)
5940           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5941           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5942         ;;
5943         siemens)
5944           ## LD is ld it makes a PLAMLIB
5945           ## CC just makes a GrossModule.
5946           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5947           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5948           _LT_TAGVAR(hardcode_direct, $1)=no
5949         ;;
5950         motorola)
5951           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5952           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5953         ;;
5954       esac
5955       runpath_var='LD_RUN_PATH'
5956       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5957       ;;
5959     sysv4.3*)
5960       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5961       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5962       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5963       ;;
5965     sysv4*MP*)
5966       if test -d /usr/nec; then
5967         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5968         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5969         runpath_var=LD_RUN_PATH
5970         hardcode_runpath_var=yes
5971         _LT_TAGVAR(ld_shlibs, $1)=yes
5972       fi
5973       ;;
5975     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5976       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5977       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5978       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5979       runpath_var='LD_RUN_PATH'
5981       if test "$GCC" = yes; then
5982         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5983         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5984       else
5985         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5986         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5987       fi
5988       ;;
5990     sysv5* | sco3.2v5* | sco5v6*)
5991       # Note: We can NOT use -z defs as we might desire, because we do not
5992       # link with -lc, and that would cause any symbols used from libc to
5993       # always be unresolved, which means just about no library would
5994       # ever link correctly.  If we're not using GNU ld we use -z text
5995       # though, which does catch some bad symbols but isn't as heavy-handed
5996       # as -z defs.
5997       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5998       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5999       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6000       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6001       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6002       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6003       _LT_TAGVAR(link_all_deplibs, $1)=yes
6004       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6005       runpath_var='LD_RUN_PATH'
6007       if test "$GCC" = yes; then
6008         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6009         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6010       else
6011         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6012         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6013       fi
6014       ;;
6016     uts4*)
6017       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6018       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6019       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6020       ;;
6022     *)
6023       _LT_TAGVAR(ld_shlibs, $1)=no
6024       ;;
6025     esac
6027     if test x$host_vendor = xsni; then
6028       case $host in
6029       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6030         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6031         ;;
6032       esac
6033     fi
6034   fi
6035 ])
6036 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6037 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6039 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6041 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6042 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6043 _LT_DECL([], [extract_expsyms_cmds], [2],
6044     [The commands to extract the exported symbol list from a shared archive])
6047 # Do we need to explicitly link libc?
6049 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6050 x|xyes)
6051   # Assume -lc should be added
6052   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6054   if test "$enable_shared" = yes && test "$GCC" = yes; then
6055     case $_LT_TAGVAR(archive_cmds, $1) in
6056     *'~'*)
6057       # FIXME: we may have to deal with multi-command sequences.
6058       ;;
6059     '$CC '*)
6060       # Test whether the compiler implicitly links with -lc since on some
6061       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6062       # to ld, don't add -lc before -lgcc.
6063       AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6064         [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6065         [$RM conftest*
6066         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6068         if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6069           soname=conftest
6070           lib=conftest
6071           libobjs=conftest.$ac_objext
6072           deplibs=
6073           wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6074           pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6075           compiler_flags=-v
6076           linker_flags=-v
6077           verstring=
6078           output_objdir=.
6079           libname=conftest
6080           lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6081           _LT_TAGVAR(allow_undefined_flag, $1)=
6082           if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6083           then
6084             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6085           else
6086             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6087           fi
6088           _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6089         else
6090           cat conftest.err 1>&5
6091         fi
6092         $RM conftest*
6093         ])
6094       _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6095       ;;
6096     esac
6097   fi
6098   ;;
6099 esac
6101 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6102     [Whether or not to add -lc for building shared libraries])
6103 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6104     [enable_shared_with_static_runtimes], [0],
6105     [Whether or not to disallow shared libs when runtime libs are static])
6106 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6107     [Compiler flag to allow reflexive dlopens])
6108 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6109     [Compiler flag to generate shared objects directly from archives])
6110 _LT_TAGDECL([], [compiler_needs_object], [1],
6111     [Whether the compiler copes with passing no objects directly])
6112 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6113     [Create an old-style archive from a shared archive])
6114 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6115     [Create a temporary old-style archive to link instead of a shared archive])
6116 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6117 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6118 _LT_TAGDECL([], [module_cmds], [2],
6119     [Commands used to build a loadable module if different from building
6120     a shared archive.])
6121 _LT_TAGDECL([], [module_expsym_cmds], [2])
6122 _LT_TAGDECL([], [with_gnu_ld], [1],
6123     [Whether we are building with GNU ld or not])
6124 _LT_TAGDECL([], [allow_undefined_flag], [1],
6125     [Flag that allows shared libraries with undefined symbols to be built])
6126 _LT_TAGDECL([], [no_undefined_flag], [1],
6127     [Flag that enforces no undefined symbols])
6128 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6129     [Flag to hardcode $libdir into a binary during linking.
6130     This must work even if $libdir does not exist])
6131 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6132     [Whether we need a single "-rpath" flag with a separated argument])
6133 _LT_TAGDECL([], [hardcode_direct], [0],
6134     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6135     DIR into the resulting binary])
6136 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6137     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6138     DIR into the resulting binary and the resulting library dependency is
6139     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6140     library is relocated])
6141 _LT_TAGDECL([], [hardcode_minus_L], [0],
6142     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6143     into the resulting binary])
6144 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6145     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6146     into the resulting binary])
6147 _LT_TAGDECL([], [hardcode_automatic], [0],
6148     [Set to "yes" if building a shared library automatically hardcodes DIR
6149     into the library and all subsequent libraries and executables linked
6150     against it])
6151 _LT_TAGDECL([], [inherit_rpath], [0],
6152     [Set to yes if linker adds runtime paths of dependent libraries
6153     to runtime path list])
6154 _LT_TAGDECL([], [link_all_deplibs], [0],
6155     [Whether libtool must link a program against all its dependency libraries])
6156 _LT_TAGDECL([], [always_export_symbols], [0],
6157     [Set to "yes" if exported symbols are required])
6158 _LT_TAGDECL([], [export_symbols_cmds], [2],
6159     [The commands to list exported symbols])
6160 _LT_TAGDECL([], [exclude_expsyms], [1],
6161     [Symbols that should not be listed in the preloaded symbols])
6162 _LT_TAGDECL([], [include_expsyms], [1],
6163     [Symbols that must always be exported])
6164 _LT_TAGDECL([], [prelink_cmds], [2],
6165     [Commands necessary for linking programs (against libraries) with templates])
6166 _LT_TAGDECL([], [postlink_cmds], [2],
6167     [Commands necessary for finishing linking programs])
6168 _LT_TAGDECL([], [file_list_spec], [1],
6169     [Specify filename containing input files])
6170 dnl FIXME: Not yet implemented
6171 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6172 dnl    [Compiler flag to generate thread safe objects])
6173 ])# _LT_LINKER_SHLIBS
6176 # _LT_LANG_C_CONFIG([TAG])
6177 # ------------------------
6178 # Ensure that the configuration variables for a C compiler are suitably
6179 # defined.  These variables are subsequently used by _LT_CONFIG to write
6180 # the compiler configuration to `libtool'.
6181 m4_defun([_LT_LANG_C_CONFIG],
6182 [m4_require([_LT_DECL_EGREP])dnl
6183 lt_save_CC="$CC"
6184 AC_LANG_PUSH(C)
6186 # Source file extension for C test sources.
6187 ac_ext=c
6189 # Object file extension for compiled C test sources.
6190 objext=o
6191 _LT_TAGVAR(objext, $1)=$objext
6193 # Code to be used in simple compile tests
6194 lt_simple_compile_test_code="int some_variable = 0;"
6196 # Code to be used in simple link tests
6197 lt_simple_link_test_code='int main(){return(0);}'
6199 _LT_TAG_COMPILER
6200 # Save the default compiler, since it gets overwritten when the other
6201 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6202 compiler_DEFAULT=$CC
6204 # save warnings/boilerplate of simple test code
6205 _LT_COMPILER_BOILERPLATE
6206 _LT_LINKER_BOILERPLATE
6208 if test -n "$compiler"; then
6209   _LT_COMPILER_NO_RTTI($1)
6210   _LT_COMPILER_PIC($1)
6211   _LT_COMPILER_C_O($1)
6212   _LT_COMPILER_FILE_LOCKS($1)
6213   _LT_LINKER_SHLIBS($1)
6214   _LT_SYS_DYNAMIC_LINKER($1)
6215   _LT_LINKER_HARDCODE_LIBPATH($1)
6216   LT_SYS_DLOPEN_SELF
6217   _LT_CMD_STRIPLIB
6219   # Report which library types will actually be built
6220   AC_MSG_CHECKING([if libtool supports shared libraries])
6221   AC_MSG_RESULT([$can_build_shared])
6223   AC_MSG_CHECKING([whether to build shared libraries])
6224   test "$can_build_shared" = "no" && enable_shared=no
6226   # On AIX, shared libraries and static libraries use the same namespace, and
6227   # are all built from PIC.
6228   case $host_os in
6229   aix3*)
6230     test "$enable_shared" = yes && enable_static=no
6231     if test -n "$RANLIB"; then
6232       archive_cmds="$archive_cmds~\$RANLIB \$lib"
6233       postinstall_cmds='$RANLIB $lib'
6234     fi
6235     ;;
6237   aix[[4-9]]*)
6238     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6239       test "$enable_shared" = yes && enable_static=no
6240     fi
6241     ;;
6242   esac
6243   AC_MSG_RESULT([$enable_shared])
6245   AC_MSG_CHECKING([whether to build static libraries])
6246   # Make sure either enable_shared or enable_static is yes.
6247   test "$enable_shared" = yes || enable_static=yes
6248   AC_MSG_RESULT([$enable_static])
6250   _LT_CONFIG($1)
6251 fi
6252 AC_LANG_POP
6253 CC="$lt_save_CC"
6254 ])# _LT_LANG_C_CONFIG
6257 # _LT_LANG_CXX_CONFIG([TAG])
6258 # --------------------------
6259 # Ensure that the configuration variables for a C++ compiler are suitably
6260 # defined.  These variables are subsequently used by _LT_CONFIG to write
6261 # the compiler configuration to `libtool'.
6262 m4_defun([_LT_LANG_CXX_CONFIG],
6263 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6264 m4_require([_LT_DECL_EGREP])dnl
6265 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6266 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6267     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6268     (test "X$CXX" != "Xg++"))) ; then
6269   AC_PROG_CXXCPP
6270 else
6271   _lt_caught_CXX_error=yes
6272 fi
6274 AC_LANG_PUSH(C++)
6275 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6276 _LT_TAGVAR(allow_undefined_flag, $1)=
6277 _LT_TAGVAR(always_export_symbols, $1)=no
6278 _LT_TAGVAR(archive_expsym_cmds, $1)=
6279 _LT_TAGVAR(compiler_needs_object, $1)=no
6280 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6281 _LT_TAGVAR(hardcode_direct, $1)=no
6282 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6283 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6284 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6285 _LT_TAGVAR(hardcode_minus_L, $1)=no
6286 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6287 _LT_TAGVAR(hardcode_automatic, $1)=no
6288 _LT_TAGVAR(inherit_rpath, $1)=no
6289 _LT_TAGVAR(module_cmds, $1)=
6290 _LT_TAGVAR(module_expsym_cmds, $1)=
6291 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6292 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6293 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6294 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6295 _LT_TAGVAR(no_undefined_flag, $1)=
6296 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6297 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6299 # Source file extension for C++ test sources.
6300 ac_ext=cpp
6302 # Object file extension for compiled C++ test sources.
6303 objext=o
6304 _LT_TAGVAR(objext, $1)=$objext
6306 # No sense in running all these tests if we already determined that
6307 # the CXX compiler isn't working.  Some variables (like enable_shared)
6308 # are currently assumed to apply to all compilers on this platform,
6309 # and will be corrupted by setting them based on a non-working compiler.
6310 if test "$_lt_caught_CXX_error" != yes; then
6311   # Code to be used in simple compile tests
6312   lt_simple_compile_test_code="int some_variable = 0;"
6314   # Code to be used in simple link tests
6315   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6317   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6318   _LT_TAG_COMPILER
6320   # save warnings/boilerplate of simple test code
6321   _LT_COMPILER_BOILERPLATE
6322   _LT_LINKER_BOILERPLATE
6324   # Allow CC to be a program name with arguments.
6325   lt_save_CC=$CC
6326   lt_save_CFLAGS=$CFLAGS
6327   lt_save_LD=$LD
6328   lt_save_GCC=$GCC
6329   GCC=$GXX
6330   lt_save_with_gnu_ld=$with_gnu_ld
6331   lt_save_path_LD=$lt_cv_path_LD
6332   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6333     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6334   else
6335     $as_unset lt_cv_prog_gnu_ld
6336   fi
6337   if test -n "${lt_cv_path_LDCXX+set}"; then
6338     lt_cv_path_LD=$lt_cv_path_LDCXX
6339   else
6340     $as_unset lt_cv_path_LD
6341   fi
6342   test -z "${LDCXX+set}" || LD=$LDCXX
6343   CC=${CXX-"c++"}
6344   CFLAGS=$CXXFLAGS
6345   compiler=$CC
6346   _LT_TAGVAR(compiler, $1)=$CC
6347   _LT_CC_BASENAME([$compiler])
6349   if test -n "$compiler"; then
6350     # We don't want -fno-exception when compiling C++ code, so set the
6351     # no_builtin_flag separately
6352     if test "$GXX" = yes; then
6353       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6354     else
6355       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6356     fi
6358     if test "$GXX" = yes; then
6359       # Set up default GNU C++ configuration
6361       LT_PATH_LD
6363       # Check if GNU C++ uses GNU ld as the underlying linker, since the
6364       # archiving commands below assume that GNU ld is being used.
6365       if test "$with_gnu_ld" = yes; then
6366         _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6367         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6369         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6370         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6372         # If archive_cmds runs LD, not CC, wlarc should be empty
6373         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6374         #     investigate it a little bit more. (MM)
6375         wlarc='${wl}'
6377         # ancient GNU ld didn't support --whole-archive et. al.
6378         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6379           $GREP 'no-whole-archive' > /dev/null; then
6380           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6381         else
6382           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6383         fi
6384       else
6385         with_gnu_ld=no
6386         wlarc=
6388         # A generic and very simple default shared library creation
6389         # command for GNU C++ for the case where it uses the native
6390         # linker, instead of GNU ld.  If possible, this setting should
6391         # overridden to take advantage of the native linker features on
6392         # the platform it is being used on.
6393         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6394       fi
6396       # Commands to make compiler produce verbose output that lists
6397       # what "hidden" libraries, object files and flags are used when
6398       # linking a shared library.
6399       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6401     else
6402       GXX=no
6403       with_gnu_ld=no
6404       wlarc=
6405     fi
6407     # PORTME: fill in a description of your system's C++ link characteristics
6408     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6409     _LT_TAGVAR(ld_shlibs, $1)=yes
6410     case $host_os in
6411       aix3*)
6412         # FIXME: insert proper C++ library support
6413         _LT_TAGVAR(ld_shlibs, $1)=no
6414         ;;
6415       aix[[4-9]]*)
6416         if test "$host_cpu" = ia64; then
6417           # On IA64, the linker does run time linking by default, so we don't
6418           # have to do anything special.
6419           aix_use_runtimelinking=no
6420           exp_sym_flag='-Bexport'
6421           no_entry_flag=""
6422         else
6423           aix_use_runtimelinking=no
6425           # Test if we are trying to use run time linking or normal
6426           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6427           # need to do runtime linking.
6428           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6429             for ld_flag in $LDFLAGS; do
6430               case $ld_flag in
6431               *-brtl*)
6432                 aix_use_runtimelinking=yes
6433                 break
6434                 ;;
6435               esac
6436             done
6437             ;;
6438           esac
6440           exp_sym_flag='-bexport'
6441           no_entry_flag='-bnoentry'
6442         fi
6444         # When large executables or shared objects are built, AIX ld can
6445         # have problems creating the table of contents.  If linking a library
6446         # or program results in "error TOC overflow" add -mminimal-toc to
6447         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6448         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6450         _LT_TAGVAR(archive_cmds, $1)=''
6451         _LT_TAGVAR(hardcode_direct, $1)=yes
6452         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6453         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6454         _LT_TAGVAR(link_all_deplibs, $1)=yes
6455         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6457         if test "$GXX" = yes; then
6458           case $host_os in aix4.[[012]]|aix4.[[012]].*)
6459           # We only want to do this on AIX 4.2 and lower, the check
6460           # below for broken collect2 doesn't work under 4.3+
6461           collect2name=`${CC} -print-prog-name=collect2`
6462           if test -f "$collect2name" &&
6463              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6464           then
6465             # We have reworked collect2
6466             :
6467           else
6468             # We have old collect2
6469             _LT_TAGVAR(hardcode_direct, $1)=unsupported
6470             # It fails to find uninstalled libraries when the uninstalled
6471             # path is not listed in the libpath.  Setting hardcode_minus_L
6472             # to unsupported forces relinking
6473             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6474             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6475             _LT_TAGVAR(hardcode_libdir_separator, $1)=
6476           fi
6477           esac
6478           shared_flag='-shared'
6479           if test "$aix_use_runtimelinking" = yes; then
6480             shared_flag="$shared_flag "'${wl}-G'
6481           fi
6482         else
6483           # not using gcc
6484           if test "$host_cpu" = ia64; then
6485           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6486           # chokes on -Wl,-G. The following line is correct:
6487           shared_flag='-G'
6488           else
6489             if test "$aix_use_runtimelinking" = yes; then
6490               shared_flag='${wl}-G'
6491             else
6492               shared_flag='${wl}-bM:SRE'
6493             fi
6494           fi
6495         fi
6497         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6498         # It seems that -bexpall does not export symbols beginning with
6499         # underscore (_), so it is better to generate a list of symbols to
6500         # export.
6501         _LT_TAGVAR(always_export_symbols, $1)=yes
6502         if test "$aix_use_runtimelinking" = yes; then
6503           # Warning - without using the other runtime loading flags (-brtl),
6504           # -berok will link without error, but may produce a broken library.
6505           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6506           # Determine the default libpath from the value encoded in an empty
6507           # executable.
6508           _LT_SYS_MODULE_PATH_AIX([$1])
6509           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6511           _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"
6512         else
6513           if test "$host_cpu" = ia64; then
6514             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6515             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6516             _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"
6517           else
6518             # Determine the default libpath from the value encoded in an
6519             # empty executable.
6520             _LT_SYS_MODULE_PATH_AIX([$1])
6521             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6522             # Warning - without using the other run time loading flags,
6523             # -berok will link without error, but may produce a broken library.
6524             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6525             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6526             if test "$with_gnu_ld" = yes; then
6527               # We only use this code for GNU lds that support --whole-archive.
6528               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6529             else
6530               # Exported symbols can be pulled into shared objects from archives
6531               _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6532             fi
6533             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6534             # This is similar to how AIX traditionally builds its shared
6535             # libraries.
6536             _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'
6537           fi
6538         fi
6539         ;;
6541       beos*)
6542         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6543           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6544           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6545           # support --undefined.  This deserves some investigation.  FIXME
6546           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6547         else
6548           _LT_TAGVAR(ld_shlibs, $1)=no
6549         fi
6550         ;;
6552       chorus*)
6553         case $cc_basename in
6554           *)
6555           # FIXME: insert proper C++ library support
6556           _LT_TAGVAR(ld_shlibs, $1)=no
6557           ;;
6558         esac
6559         ;;
6561       cygwin* | mingw* | pw32* | cegcc*)
6562         case $GXX,$cc_basename in
6563         ,cl* | no,cl*)
6564           # Native MSVC
6565           # hardcode_libdir_flag_spec is actually meaningless, as there is
6566           # no search path for DLLs.
6567           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6568           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6569           _LT_TAGVAR(always_export_symbols, $1)=yes
6570           _LT_TAGVAR(file_list_spec, $1)='@'
6571           # Tell ltmain to make .lib files, not .a files.
6572           libext=lib
6573           # Tell ltmain to make .dll files, not .so files.
6574           shrext_cmds=".dll"
6575           # FIXME: Setting linknames here is a bad hack.
6576           _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6577           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6578               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6579             else
6580               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6581             fi~
6582             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6583             linknames='
6584           # The linker will not automatically build a static lib if we build a DLL.
6585           # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6586           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6587           # Don't use ranlib
6588           _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6589           _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6590             lt_tool_outputfile="@TOOL_OUTPUT@"~
6591             case $lt_outputfile in
6592               *.exe|*.EXE) ;;
6593               *)
6594                 lt_outputfile="$lt_outputfile.exe"
6595                 lt_tool_outputfile="$lt_tool_outputfile.exe"
6596                 ;;
6597             esac~
6598             func_to_tool_file "$lt_outputfile"~
6599             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6600               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6601               $RM "$lt_outputfile.manifest";
6602             fi'
6603           ;;
6604         *)
6605           # g++
6606           # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6607           # as there is no search path for DLLs.
6608           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6609           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6610           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6611           _LT_TAGVAR(always_export_symbols, $1)=no
6612           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6614           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6615             _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'
6616             # If the export-symbols file already is a .def file (1st line
6617             # is EXPORTS), use it as is; otherwise, prepend...
6618             _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6619               cp $export_symbols $output_objdir/$soname.def;
6620             else
6621               echo EXPORTS > $output_objdir/$soname.def;
6622               cat $export_symbols >> $output_objdir/$soname.def;
6623             fi~
6624             $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'
6625           else
6626             _LT_TAGVAR(ld_shlibs, $1)=no
6627           fi
6628           ;;
6629         esac
6630         ;;
6631       darwin* | rhapsody*)
6632         _LT_DARWIN_LINKER_FEATURES($1)
6633         ;;
6635       dgux*)
6636         case $cc_basename in
6637           ec++*)
6638             # FIXME: insert proper C++ library support
6639             _LT_TAGVAR(ld_shlibs, $1)=no
6640             ;;
6641           ghcx*)
6642             # Green Hills C++ Compiler
6643             # FIXME: insert proper C++ library support
6644             _LT_TAGVAR(ld_shlibs, $1)=no
6645             ;;
6646           *)
6647             # FIXME: insert proper C++ library support
6648             _LT_TAGVAR(ld_shlibs, $1)=no
6649             ;;
6650         esac
6651         ;;
6653       freebsd2.*)
6654         # C++ shared libraries reported to be fairly broken before
6655         # switch to ELF
6656         _LT_TAGVAR(ld_shlibs, $1)=no
6657         ;;
6659       freebsd-elf*)
6660         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6661         ;;
6663       freebsd* | dragonfly*)
6664         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6665         # conventions
6666         _LT_TAGVAR(ld_shlibs, $1)=yes
6667         ;;
6669       haiku*)
6670         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6671         _LT_TAGVAR(link_all_deplibs, $1)=yes
6672         ;;
6674       hpux9*)
6675         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6676         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6677         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6678         _LT_TAGVAR(hardcode_direct, $1)=yes
6679         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6680                                              # but as the default
6681                                              # location of the library.
6683         case $cc_basename in
6684           CC*)
6685             # FIXME: insert proper C++ library support
6686             _LT_TAGVAR(ld_shlibs, $1)=no
6687             ;;
6688           aCC*)
6689             _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'
6690             # Commands to make compiler produce verbose output that lists
6691             # what "hidden" libraries, object files and flags are used when
6692             # linking a shared library.
6693             #
6694             # There doesn't appear to be a way to prevent this compiler from
6695             # explicitly linking system object files so we need to strip them
6696             # from the output so that they don't get included in the library
6697             # dependencies.
6698             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"'
6699             ;;
6700           *)
6701             if test "$GXX" = yes; then
6702               _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6703             else
6704               # FIXME: insert proper C++ library support
6705               _LT_TAGVAR(ld_shlibs, $1)=no
6706             fi
6707             ;;
6708         esac
6709         ;;
6711       hpux10*|hpux11*)
6712         if test $with_gnu_ld = no; then
6713           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6714           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6716           case $host_cpu in
6717             hppa*64*|ia64*)
6718               ;;
6719             *)
6720               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6721               ;;
6722           esac
6723         fi
6724         case $host_cpu in
6725           hppa*64*|ia64*)
6726             _LT_TAGVAR(hardcode_direct, $1)=no
6727             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6728             ;;
6729           *)
6730             _LT_TAGVAR(hardcode_direct, $1)=yes
6731             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6732             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6733                                                  # but as the default
6734                                                  # location of the library.
6735             ;;
6736         esac
6738         case $cc_basename in
6739           CC*)
6740             # FIXME: insert proper C++ library support
6741             _LT_TAGVAR(ld_shlibs, $1)=no
6742             ;;
6743           aCC*)
6744             case $host_cpu in
6745               hppa*64*)
6746                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6747                 ;;
6748               ia64*)
6749                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6750                 ;;
6751               *)
6752                 _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'
6753                 ;;
6754             esac
6755             # Commands to make compiler produce verbose output that lists
6756             # what "hidden" libraries, object files and flags are used when
6757             # linking a shared library.
6758             #
6759             # There doesn't appear to be a way to prevent this compiler from
6760             # explicitly linking system object files so we need to strip them
6761             # from the output so that they don't get included in the library
6762             # dependencies.
6763             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"'
6764             ;;
6765           *)
6766             if test "$GXX" = yes; then
6767               if test $with_gnu_ld = no; then
6768                 case $host_cpu in
6769                   hppa*64*)
6770                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6771                     ;;
6772                   ia64*)
6773                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6774                     ;;
6775                   *)
6776                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6777                     ;;
6778                 esac
6779               fi
6780             else
6781               # FIXME: insert proper C++ library support
6782               _LT_TAGVAR(ld_shlibs, $1)=no
6783             fi
6784             ;;
6785         esac
6786         ;;
6788       interix[[3-9]]*)
6789         _LT_TAGVAR(hardcode_direct, $1)=no
6790         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6791         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6792         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6793         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6794         # Instead, shared libraries are loaded at an image base (0x10000000 by
6795         # default) and relocated if they conflict, which is a slow very memory
6796         # consuming and fragmenting process.  To avoid this, we pick a random,
6797         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6798         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6799         _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'
6800         _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'
6801         ;;
6802       irix5* | irix6*)
6803         case $cc_basename in
6804           CC*)
6805             # SGI C++
6806             _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'
6808             # Archives containing C++ object files must be created using
6809             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6810             # necessary to make sure instantiated templates are included
6811             # in the archive.
6812             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6813             ;;
6814           *)
6815             if test "$GXX" = yes; then
6816               if test "$with_gnu_ld" = no; then
6817                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6818               else
6819                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
6820               fi
6821             fi
6822             _LT_TAGVAR(link_all_deplibs, $1)=yes
6823             ;;
6824         esac
6825         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6826         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6827         _LT_TAGVAR(inherit_rpath, $1)=yes
6828         ;;
6830       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6831         case $cc_basename in
6832           KCC*)
6833             # Kuck and Associates, Inc. (KAI) C++ Compiler
6835             # KCC will only create a shared library if the output file
6836             # ends with ".so" (or ".sl" for HP-UX), so rename the library
6837             # to its proper name (with version) after linking.
6838             _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'
6839             _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'
6840             # Commands to make compiler produce verbose output that lists
6841             # what "hidden" libraries, object files and flags are used when
6842             # linking a shared library.
6843             #
6844             # There doesn't appear to be a way to prevent this compiler from
6845             # explicitly linking system object files so we need to strip them
6846             # from the output so that they don't get included in the library
6847             # dependencies.
6848             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"'
6850             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6851             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6853             # Archives containing C++ object files must be created using
6854             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6855             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6856             ;;
6857           icpc* | ecpc* )
6858             # Intel C++
6859             with_gnu_ld=yes
6860             # version 8.0 and above of icpc choke on multiply defined symbols
6861             # if we add $predep_objects and $postdep_objects, however 7.1 and
6862             # earlier do not add the objects themselves.
6863             case `$CC -V 2>&1` in
6864               *"Version 7."*)
6865                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6866                 _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'
6867                 ;;
6868               *)  # Version 8.0 or newer
6869                 tmp_idyn=
6870                 case $host_cpu in
6871                   ia64*) tmp_idyn=' -i_dynamic';;
6872                 esac
6873                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6874                 _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'
6875                 ;;
6876             esac
6877             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6878             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6879             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6880             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6881             ;;
6882           pgCC* | pgcpp*)
6883             # Portland Group C++ compiler
6884             case `$CC -V` in
6885             *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6886               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6887                 rm -rf $tpldir~
6888                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6889                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6890               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6891                 rm -rf $tpldir~
6892                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6893                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6894                 $RANLIB $oldlib'
6895               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6896                 rm -rf $tpldir~
6897                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6898                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6899               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6900                 rm -rf $tpldir~
6901                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6902                 $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'
6903               ;;
6904             *) # Version 6 and above use weak symbols
6905               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6906               _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'
6907               ;;
6908             esac
6910             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6911             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6912             _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'
6913             ;;
6914           cxx*)
6915             # Compaq C++
6916             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6917             _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'
6919             runpath_var=LD_RUN_PATH
6920             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6921             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6923             # Commands to make compiler produce verbose output that lists
6924             # what "hidden" libraries, object files and flags are used when
6925             # linking a shared library.
6926             #
6927             # There doesn't appear to be a way to prevent this compiler from
6928             # explicitly linking system object files so we need to strip them
6929             # from the output so that they don't get included in the library
6930             # dependencies.
6931             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'
6932             ;;
6933           xl* | mpixl* | bgxl*)
6934             # IBM XL 8.0 on PPC, with GNU ld
6935             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6936             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6937             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6938             if test "x$supports_anon_versioning" = xyes; then
6939               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6940                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6941                 echo "local: *; };" >> $output_objdir/$libname.ver~
6942                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6943             fi
6944             ;;
6945           *)
6946             case `$CC -V 2>&1 | sed 5q` in
6947             *Sun\ C*)
6948               # Sun C++ 5.9
6949               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6950               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6951               _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'
6952               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6953               _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'
6954               _LT_TAGVAR(compiler_needs_object, $1)=yes
6956               # Not sure whether something based on
6957               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6958               # would be better.
6959               output_verbose_link_cmd='func_echo_all'
6961               # Archives containing C++ object files must be created using
6962               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6963               # necessary to make sure instantiated templates are included
6964               # in the archive.
6965               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6966               ;;
6967             esac
6968             ;;
6969         esac
6970         ;;
6972       lynxos*)
6973         # FIXME: insert proper C++ library support
6974         _LT_TAGVAR(ld_shlibs, $1)=no
6975         ;;
6977       m88k*)
6978         # FIXME: insert proper C++ library support
6979         _LT_TAGVAR(ld_shlibs, $1)=no
6980         ;;
6982       mvs*)
6983         case $cc_basename in
6984           cxx*)
6985             # FIXME: insert proper C++ library support
6986             _LT_TAGVAR(ld_shlibs, $1)=no
6987             ;;
6988           *)
6989             # FIXME: insert proper C++ library support
6990             _LT_TAGVAR(ld_shlibs, $1)=no
6991             ;;
6992         esac
6993         ;;
6995       netbsd*)
6996         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6997           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6998           wlarc=
6999           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7000           _LT_TAGVAR(hardcode_direct, $1)=yes
7001           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7002         fi
7003         # Workaround some broken pre-1.5 toolchains
7004         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7005         ;;
7007       *nto* | *qnx*)
7008         _LT_TAGVAR(ld_shlibs, $1)=yes
7009         ;;
7011       openbsd2*)
7012         # C++ shared libraries are fairly broken
7013         _LT_TAGVAR(ld_shlibs, $1)=no
7014         ;;
7016       openbsd*)
7017         if test -f /usr/libexec/ld.so; then
7018           _LT_TAGVAR(hardcode_direct, $1)=yes
7019           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7020           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7021           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7022           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7023           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7024             _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'
7025             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7026             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7027           fi
7028           output_verbose_link_cmd=func_echo_all
7029         else
7030           _LT_TAGVAR(ld_shlibs, $1)=no
7031         fi
7032         ;;
7034       osf3* | osf4* | osf5*)
7035         case $cc_basename in
7036           KCC*)
7037             # Kuck and Associates, Inc. (KAI) C++ Compiler
7039             # KCC will only create a shared library if the output file
7040             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7041             # to its proper name (with version) after linking.
7042             _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'
7044             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7045             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7047             # Archives containing C++ object files must be created using
7048             # the KAI C++ compiler.
7049             case $host in
7050               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7051               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7052             esac
7053             ;;
7054           RCC*)
7055             # Rational C++ 2.4.1
7056             # FIXME: insert proper C++ library support
7057             _LT_TAGVAR(ld_shlibs, $1)=no
7058             ;;
7059           cxx*)
7060             case $host in
7061               osf3*)
7062                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7063                 _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'
7064                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7065                 ;;
7066               *)
7067                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7068                 _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'
7069                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7070                   echo "-hidden">> $lib.exp~
7071                   $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~
7072                   $RM $lib.exp'
7073                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7074                 ;;
7075             esac
7077             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7079             # Commands to make compiler produce verbose output that lists
7080             # what "hidden" libraries, object files and flags are used when
7081             # linking a shared library.
7082             #
7083             # There doesn't appear to be a way to prevent this compiler from
7084             # explicitly linking system object files so we need to strip them
7085             # from the output so that they don't get included in the library
7086             # dependencies.
7087             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"'
7088             ;;
7089           *)
7090             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7091               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7092               case $host in
7093                 osf3*)
7094                   _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'
7095                   ;;
7096                 *)
7097                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7098                   ;;
7099               esac
7101               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7102               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7104               # Commands to make compiler produce verbose output that lists
7105               # what "hidden" libraries, object files and flags are used when
7106               # linking a shared library.
7107               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7109             else
7110               # FIXME: insert proper C++ library support
7111               _LT_TAGVAR(ld_shlibs, $1)=no
7112             fi
7113             ;;
7114         esac
7115         ;;
7117       psos*)
7118         # FIXME: insert proper C++ library support
7119         _LT_TAGVAR(ld_shlibs, $1)=no
7120         ;;
7122       sunos4*)
7123         case $cc_basename in
7124           CC*)
7125             # Sun C++ 4.x
7126             # FIXME: insert proper C++ library support
7127             _LT_TAGVAR(ld_shlibs, $1)=no
7128             ;;
7129           lcc*)
7130             # Lucid
7131             # FIXME: insert proper C++ library support
7132             _LT_TAGVAR(ld_shlibs, $1)=no
7133             ;;
7134           *)
7135             # FIXME: insert proper C++ library support
7136             _LT_TAGVAR(ld_shlibs, $1)=no
7137             ;;
7138         esac
7139         ;;
7141       solaris*)
7142         case $cc_basename in
7143           CC* | sunCC*)
7144             # Sun C++ 4.2, 5.x and Centerline C++
7145             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7146             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7147             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7148             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7149               $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'
7151             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7152             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7153             case $host_os in
7154               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7155               *)
7156                 # The compiler driver will combine and reorder linker options,
7157                 # but understands `-z linker_flag'.
7158                 # Supported since Solaris 2.6 (maybe 2.5.1?)
7159                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7160                 ;;
7161             esac
7162             _LT_TAGVAR(link_all_deplibs, $1)=yes
7164             output_verbose_link_cmd='func_echo_all'
7166             # Archives containing C++ object files must be created using
7167             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7168             # necessary to make sure instantiated templates are included
7169             # in the archive.
7170             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7171             ;;
7172           gcx*)
7173             # Green Hills C++ Compiler
7174             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7176             # The C++ compiler must be used to create the archive.
7177             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7178             ;;
7179           *)
7180             # GNU C++ compiler with Solaris linker
7181             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7182               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7183               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7184                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7185                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7186                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7188                 # Commands to make compiler produce verbose output that lists
7189                 # what "hidden" libraries, object files and flags are used when
7190                 # linking a shared library.
7191                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7192               else
7193                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7194                 # platform.
7195                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7196                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7197                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7199                 # Commands to make compiler produce verbose output that lists
7200                 # what "hidden" libraries, object files and flags are used when
7201                 # linking a shared library.
7202                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7203               fi
7205               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7206               case $host_os in
7207                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7208                 *)
7209                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7210                   ;;
7211               esac
7212             fi
7213             ;;
7214         esac
7215         ;;
7217     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7218       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7219       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7220       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7221       runpath_var='LD_RUN_PATH'
7223       case $cc_basename in
7224         CC*)
7225           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7226           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7227           ;;
7228         *)
7229           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7230           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7231           ;;
7232       esac
7233       ;;
7235       sysv5* | sco3.2v5* | sco5v6*)
7236         # Note: We can NOT use -z defs as we might desire, because we do not
7237         # link with -lc, and that would cause any symbols used from libc to
7238         # always be unresolved, which means just about no library would
7239         # ever link correctly.  If we're not using GNU ld we use -z text
7240         # though, which does catch some bad symbols but isn't as heavy-handed
7241         # as -z defs.
7242         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7243         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7244         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7245         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7246         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7247         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7248         _LT_TAGVAR(link_all_deplibs, $1)=yes
7249         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7250         runpath_var='LD_RUN_PATH'
7252         case $cc_basename in
7253           CC*)
7254             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7255             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7256             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7257               '"$_LT_TAGVAR(old_archive_cmds, $1)"
7258             _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7259               '"$_LT_TAGVAR(reload_cmds, $1)"
7260             ;;
7261           *)
7262             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7263             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7264             ;;
7265         esac
7266       ;;
7268       tandem*)
7269         case $cc_basename in
7270           NCC*)
7271             # NonStop-UX NCC 3.20
7272             # FIXME: insert proper C++ library support
7273             _LT_TAGVAR(ld_shlibs, $1)=no
7274             ;;
7275           *)
7276             # FIXME: insert proper C++ library support
7277             _LT_TAGVAR(ld_shlibs, $1)=no
7278             ;;
7279         esac
7280         ;;
7282       vxworks*)
7283         # FIXME: insert proper C++ library support
7284         _LT_TAGVAR(ld_shlibs, $1)=no
7285         ;;
7287       *)
7288         # FIXME: insert proper C++ library support
7289         _LT_TAGVAR(ld_shlibs, $1)=no
7290         ;;
7291     esac
7293     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7294     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7296     _LT_TAGVAR(GCC, $1)="$GXX"
7297     _LT_TAGVAR(LD, $1)="$LD"
7299     ## CAVEAT EMPTOR:
7300     ## There is no encapsulation within the following macros, do not change
7301     ## the running order or otherwise move them around unless you know exactly
7302     ## what you are doing...
7303     _LT_SYS_HIDDEN_LIBDEPS($1)
7304     _LT_COMPILER_PIC($1)
7305     _LT_COMPILER_C_O($1)
7306     _LT_COMPILER_FILE_LOCKS($1)
7307     _LT_LINKER_SHLIBS($1)
7308     _LT_SYS_DYNAMIC_LINKER($1)
7309     _LT_LINKER_HARDCODE_LIBPATH($1)
7311     _LT_CONFIG($1)
7312   fi # test -n "$compiler"
7314   CC=$lt_save_CC
7315   CFLAGS=$lt_save_CFLAGS
7316   LDCXX=$LD
7317   LD=$lt_save_LD
7318   GCC=$lt_save_GCC
7319   with_gnu_ld=$lt_save_with_gnu_ld
7320   lt_cv_path_LDCXX=$lt_cv_path_LD
7321   lt_cv_path_LD=$lt_save_path_LD
7322   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7323   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7324 fi # test "$_lt_caught_CXX_error" != yes
7326 AC_LANG_POP
7327 ])# _LT_LANG_CXX_CONFIG
7330 # _LT_FUNC_STRIPNAME_CNF
7331 # ----------------------
7332 # func_stripname_cnf prefix suffix name
7333 # strip PREFIX and SUFFIX off of NAME.
7334 # PREFIX and SUFFIX must not contain globbing or regex special
7335 # characters, hashes, percent signs, but SUFFIX may contain a leading
7336 # dot (in which case that matches only a dot).
7338 # This function is identical to the (non-XSI) version of func_stripname,
7339 # except this one can be used by m4 code that may be executed by configure,
7340 # rather than the libtool script.
7341 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7342 AC_REQUIRE([_LT_DECL_SED])
7343 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7344 func_stripname_cnf ()
7346   case ${2} in
7347   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7348   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7349   esac
7350 } # func_stripname_cnf
7351 ])# _LT_FUNC_STRIPNAME_CNF
7353 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7354 # ---------------------------------
7355 # Figure out "hidden" library dependencies from verbose
7356 # compiler output when linking a shared library.
7357 # Parse the compiler output and extract the necessary
7358 # objects, libraries and library flags.
7359 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7360 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7361 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7362 # Dependencies to place before and after the object being linked:
7363 _LT_TAGVAR(predep_objects, $1)=
7364 _LT_TAGVAR(postdep_objects, $1)=
7365 _LT_TAGVAR(predeps, $1)=
7366 _LT_TAGVAR(postdeps, $1)=
7367 _LT_TAGVAR(compiler_lib_search_path, $1)=
7369 dnl we can't use the lt_simple_compile_test_code here,
7370 dnl because it contains code intended for an executable,
7371 dnl not a library.  It's possible we should let each
7372 dnl tag define a new lt_????_link_test_code variable,
7373 dnl but it's only used here...
7374 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7375 int a;
7376 void foo (void) { a = 0; }
7377 _LT_EOF
7378 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7379 class Foo
7381 public:
7382   Foo (void) { a = 0; }
7383 private:
7384   int a;
7385 };
7386 _LT_EOF
7387 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7388       subroutine foo
7389       implicit none
7390       integer*4 a
7391       a=0
7392       return
7393       end
7394 _LT_EOF
7395 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7396       subroutine foo
7397       implicit none
7398       integer a
7399       a=0
7400       return
7401       end
7402 _LT_EOF
7403 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7404 public class foo {
7405   private int a;
7406   public void bar (void) {
7407     a = 0;
7408   }
7409 };
7410 _LT_EOF
7411 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7412 package foo
7413 func foo() {
7415 _LT_EOF
7416 ])
7418 _lt_libdeps_save_CFLAGS=$CFLAGS
7419 case "$CC $CFLAGS " in #(
7420 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7421 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7422 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7423 esac
7425 dnl Parse the compiler output and extract the necessary
7426 dnl objects, libraries and library flags.
7427 if AC_TRY_EVAL(ac_compile); then
7428   # Parse the compiler output and extract the necessary
7429   # objects, libraries and library flags.
7431   # Sentinel used to keep track of whether or not we are before
7432   # the conftest object file.
7433   pre_test_object_deps_done=no
7435   for p in `eval "$output_verbose_link_cmd"`; do
7436     case ${prev}${p} in
7438     -L* | -R* | -l*)
7439        # Some compilers place space between "-{L,R}" and the path.
7440        # Remove the space.
7441        if test $p = "-L" ||
7442           test $p = "-R"; then
7443          prev=$p
7444          continue
7445        fi
7447        # Expand the sysroot to ease extracting the directories later.
7448        if test -z "$prev"; then
7449          case $p in
7450          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7451          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7452          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7453          esac
7454        fi
7455        case $p in
7456        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7457        esac
7458        if test "$pre_test_object_deps_done" = no; then
7459          case ${prev} in
7460          -L | -R)
7461            # Internal compiler library paths should come after those
7462            # provided the user.  The postdeps already come after the
7463            # user supplied libs so there is no need to process them.
7464            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7465              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7466            else
7467              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7468            fi
7469            ;;
7470          # The "-l" case would never come before the object being
7471          # linked, so don't bother handling this case.
7472          esac
7473        else
7474          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7475            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7476          else
7477            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7478          fi
7479        fi
7480        prev=
7481        ;;
7483     *.lto.$objext) ;; # Ignore GCC LTO objects
7484     *.$objext)
7485        # This assumes that the test object file only shows up
7486        # once in the compiler output.
7487        if test "$p" = "conftest.$objext"; then
7488          pre_test_object_deps_done=yes
7489          continue
7490        fi
7492        if test "$pre_test_object_deps_done" = no; then
7493          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7494            _LT_TAGVAR(predep_objects, $1)="$p"
7495          else
7496            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7497          fi
7498        else
7499          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7500            _LT_TAGVAR(postdep_objects, $1)="$p"
7501          else
7502            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7503          fi
7504        fi
7505        ;;
7507     *) ;; # Ignore the rest.
7509     esac
7510   done
7512   # Clean up.
7513   rm -f a.out a.exe
7514 else
7515   echo "libtool.m4: error: problem compiling $1 test program"
7516 fi
7518 $RM -f confest.$objext
7519 CFLAGS=$_lt_libdeps_save_CFLAGS
7521 # PORTME: override above test on systems where it is broken
7522 m4_if([$1], [CXX],
7523 [case $host_os in
7524 interix[[3-9]]*)
7525   # Interix 3.5 installs completely hosed .la files for C++, so rather than
7526   # hack all around it, let's just trust "g++" to DTRT.
7527   _LT_TAGVAR(predep_objects,$1)=
7528   _LT_TAGVAR(postdep_objects,$1)=
7529   _LT_TAGVAR(postdeps,$1)=
7530   ;;
7532 linux*)
7533   case `$CC -V 2>&1 | sed 5q` in
7534   *Sun\ C*)
7535     # Sun C++ 5.9
7537     # The more standards-conforming stlport4 library is
7538     # incompatible with the Cstd library. Avoid specifying
7539     # it if it's in CXXFLAGS. Ignore libCrun as
7540     # -library=stlport4 depends on it.
7541     case " $CXX $CXXFLAGS " in
7542     *" -library=stlport4 "*)
7543       solaris_use_stlport4=yes
7544       ;;
7545     esac
7547     if test "$solaris_use_stlport4" != yes; then
7548       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7549     fi
7550     ;;
7551   esac
7552   ;;
7554 solaris*)
7555   case $cc_basename in
7556   CC* | sunCC*)
7557     # The more standards-conforming stlport4 library is
7558     # incompatible with the Cstd library. Avoid specifying
7559     # it if it's in CXXFLAGS. Ignore libCrun as
7560     # -library=stlport4 depends on it.
7561     case " $CXX $CXXFLAGS " in
7562     *" -library=stlport4 "*)
7563       solaris_use_stlport4=yes
7564       ;;
7565     esac
7567     # Adding this requires a known-good setup of shared libraries for
7568     # Sun compiler versions before 5.6, else PIC objects from an old
7569     # archive will be linked into the output, leading to subtle bugs.
7570     if test "$solaris_use_stlport4" != yes; then
7571       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7572     fi
7573     ;;
7574   esac
7575   ;;
7576 esac
7577 ])
7579 case " $_LT_TAGVAR(postdeps, $1) " in
7580 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7581 esac
7582  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7583 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7584  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7585 fi
7586 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7587     [The directories searched by this compiler when creating a shared library])
7588 _LT_TAGDECL([], [predep_objects], [1],
7589     [Dependencies to place before and after the objects being linked to
7590     create a shared library])
7591 _LT_TAGDECL([], [postdep_objects], [1])
7592 _LT_TAGDECL([], [predeps], [1])
7593 _LT_TAGDECL([], [postdeps], [1])
7594 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7595     [The library search path used internally by the compiler when linking
7596     a shared library])
7597 ])# _LT_SYS_HIDDEN_LIBDEPS
7600 # _LT_LANG_F77_CONFIG([TAG])
7601 # --------------------------
7602 # Ensure that the configuration variables for a Fortran 77 compiler are
7603 # suitably defined.  These variables are subsequently used by _LT_CONFIG
7604 # to write the compiler configuration to `libtool'.
7605 m4_defun([_LT_LANG_F77_CONFIG],
7606 [AC_LANG_PUSH(Fortran 77)
7607 if test -z "$F77" || test "X$F77" = "Xno"; then
7608   _lt_disable_F77=yes
7609 fi
7611 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7612 _LT_TAGVAR(allow_undefined_flag, $1)=
7613 _LT_TAGVAR(always_export_symbols, $1)=no
7614 _LT_TAGVAR(archive_expsym_cmds, $1)=
7615 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7616 _LT_TAGVAR(hardcode_direct, $1)=no
7617 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7618 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7619 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7620 _LT_TAGVAR(hardcode_minus_L, $1)=no
7621 _LT_TAGVAR(hardcode_automatic, $1)=no
7622 _LT_TAGVAR(inherit_rpath, $1)=no
7623 _LT_TAGVAR(module_cmds, $1)=
7624 _LT_TAGVAR(module_expsym_cmds, $1)=
7625 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7626 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7627 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7628 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7629 _LT_TAGVAR(no_undefined_flag, $1)=
7630 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7631 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7633 # Source file extension for f77 test sources.
7634 ac_ext=f
7636 # Object file extension for compiled f77 test sources.
7637 objext=o
7638 _LT_TAGVAR(objext, $1)=$objext
7640 # No sense in running all these tests if we already determined that
7641 # the F77 compiler isn't working.  Some variables (like enable_shared)
7642 # are currently assumed to apply to all compilers on this platform,
7643 # and will be corrupted by setting them based on a non-working compiler.
7644 if test "$_lt_disable_F77" != yes; then
7645   # Code to be used in simple compile tests
7646   lt_simple_compile_test_code="\
7647       subroutine t
7648       return
7649       end
7652   # Code to be used in simple link tests
7653   lt_simple_link_test_code="\
7654       program t
7655       end
7658   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7659   _LT_TAG_COMPILER
7661   # save warnings/boilerplate of simple test code
7662   _LT_COMPILER_BOILERPLATE
7663   _LT_LINKER_BOILERPLATE
7665   # Allow CC to be a program name with arguments.
7666   lt_save_CC="$CC"
7667   lt_save_GCC=$GCC
7668   lt_save_CFLAGS=$CFLAGS
7669   CC=${F77-"f77"}
7670   CFLAGS=$FFLAGS
7671   compiler=$CC
7672   _LT_TAGVAR(compiler, $1)=$CC
7673   _LT_CC_BASENAME([$compiler])
7674   GCC=$G77
7675   if test -n "$compiler"; then
7676     AC_MSG_CHECKING([if libtool supports shared libraries])
7677     AC_MSG_RESULT([$can_build_shared])
7679     AC_MSG_CHECKING([whether to build shared libraries])
7680     test "$can_build_shared" = "no" && enable_shared=no
7682     # On AIX, shared libraries and static libraries use the same namespace, and
7683     # are all built from PIC.
7684     case $host_os in
7685       aix3*)
7686         test "$enable_shared" = yes && enable_static=no
7687         if test -n "$RANLIB"; then
7688           archive_cmds="$archive_cmds~\$RANLIB \$lib"
7689           postinstall_cmds='$RANLIB $lib'
7690         fi
7691         ;;
7692       aix[[4-9]]*)
7693         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7694           test "$enable_shared" = yes && enable_static=no
7695         fi
7696         ;;
7697     esac
7698     AC_MSG_RESULT([$enable_shared])
7700     AC_MSG_CHECKING([whether to build static libraries])
7701     # Make sure either enable_shared or enable_static is yes.
7702     test "$enable_shared" = yes || enable_static=yes
7703     AC_MSG_RESULT([$enable_static])
7705     _LT_TAGVAR(GCC, $1)="$G77"
7706     _LT_TAGVAR(LD, $1)="$LD"
7708     ## CAVEAT EMPTOR:
7709     ## There is no encapsulation within the following macros, do not change
7710     ## the running order or otherwise move them around unless you know exactly
7711     ## what you are doing...
7712     _LT_COMPILER_PIC($1)
7713     _LT_COMPILER_C_O($1)
7714     _LT_COMPILER_FILE_LOCKS($1)
7715     _LT_LINKER_SHLIBS($1)
7716     _LT_SYS_DYNAMIC_LINKER($1)
7717     _LT_LINKER_HARDCODE_LIBPATH($1)
7719     _LT_CONFIG($1)
7720   fi # test -n "$compiler"
7722   GCC=$lt_save_GCC
7723   CC="$lt_save_CC"
7724   CFLAGS="$lt_save_CFLAGS"
7725 fi # test "$_lt_disable_F77" != yes
7727 AC_LANG_POP
7728 ])# _LT_LANG_F77_CONFIG
7731 # _LT_LANG_FC_CONFIG([TAG])
7732 # -------------------------
7733 # Ensure that the configuration variables for a Fortran compiler are
7734 # suitably defined.  These variables are subsequently used by _LT_CONFIG
7735 # to write the compiler configuration to `libtool'.
7736 m4_defun([_LT_LANG_FC_CONFIG],
7737 [AC_LANG_PUSH(Fortran)
7739 if test -z "$FC" || test "X$FC" = "Xno"; then
7740   _lt_disable_FC=yes
7741 fi
7743 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7744 _LT_TAGVAR(allow_undefined_flag, $1)=
7745 _LT_TAGVAR(always_export_symbols, $1)=no
7746 _LT_TAGVAR(archive_expsym_cmds, $1)=
7747 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7748 _LT_TAGVAR(hardcode_direct, $1)=no
7749 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7750 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7751 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7752 _LT_TAGVAR(hardcode_minus_L, $1)=no
7753 _LT_TAGVAR(hardcode_automatic, $1)=no
7754 _LT_TAGVAR(inherit_rpath, $1)=no
7755 _LT_TAGVAR(module_cmds, $1)=
7756 _LT_TAGVAR(module_expsym_cmds, $1)=
7757 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7758 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7759 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7760 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7761 _LT_TAGVAR(no_undefined_flag, $1)=
7762 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7763 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7765 # Source file extension for fc test sources.
7766 ac_ext=${ac_fc_srcext-f}
7768 # Object file extension for compiled fc test sources.
7769 objext=o
7770 _LT_TAGVAR(objext, $1)=$objext
7772 # No sense in running all these tests if we already determined that
7773 # the FC compiler isn't working.  Some variables (like enable_shared)
7774 # are currently assumed to apply to all compilers on this platform,
7775 # and will be corrupted by setting them based on a non-working compiler.
7776 if test "$_lt_disable_FC" != yes; then
7777   # Code to be used in simple compile tests
7778   lt_simple_compile_test_code="\
7779       subroutine t
7780       return
7781       end
7784   # Code to be used in simple link tests
7785   lt_simple_link_test_code="\
7786       program t
7787       end
7790   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7791   _LT_TAG_COMPILER
7793   # save warnings/boilerplate of simple test code
7794   _LT_COMPILER_BOILERPLATE
7795   _LT_LINKER_BOILERPLATE
7797   # Allow CC to be a program name with arguments.
7798   lt_save_CC="$CC"
7799   lt_save_GCC=$GCC
7800   lt_save_CFLAGS=$CFLAGS
7801   CC=${FC-"f95"}
7802   CFLAGS=$FCFLAGS
7803   compiler=$CC
7804   GCC=$ac_cv_fc_compiler_gnu
7806   _LT_TAGVAR(compiler, $1)=$CC
7807   _LT_CC_BASENAME([$compiler])
7809   if test -n "$compiler"; then
7810     AC_MSG_CHECKING([if libtool supports shared libraries])
7811     AC_MSG_RESULT([$can_build_shared])
7813     AC_MSG_CHECKING([whether to build shared libraries])
7814     test "$can_build_shared" = "no" && enable_shared=no
7816     # On AIX, shared libraries and static libraries use the same namespace, and
7817     # are all built from PIC.
7818     case $host_os in
7819       aix3*)
7820         test "$enable_shared" = yes && enable_static=no
7821         if test -n "$RANLIB"; then
7822           archive_cmds="$archive_cmds~\$RANLIB \$lib"
7823           postinstall_cmds='$RANLIB $lib'
7824         fi
7825         ;;
7826       aix[[4-9]]*)
7827         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7828           test "$enable_shared" = yes && enable_static=no
7829         fi
7830         ;;
7831     esac
7832     AC_MSG_RESULT([$enable_shared])
7834     AC_MSG_CHECKING([whether to build static libraries])
7835     # Make sure either enable_shared or enable_static is yes.
7836     test "$enable_shared" = yes || enable_static=yes
7837     AC_MSG_RESULT([$enable_static])
7839     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7840     _LT_TAGVAR(LD, $1)="$LD"
7842     ## CAVEAT EMPTOR:
7843     ## There is no encapsulation within the following macros, do not change
7844     ## the running order or otherwise move them around unless you know exactly
7845     ## what you are doing...
7846     _LT_SYS_HIDDEN_LIBDEPS($1)
7847     _LT_COMPILER_PIC($1)
7848     _LT_COMPILER_C_O($1)
7849     _LT_COMPILER_FILE_LOCKS($1)
7850     _LT_LINKER_SHLIBS($1)
7851     _LT_SYS_DYNAMIC_LINKER($1)
7852     _LT_LINKER_HARDCODE_LIBPATH($1)
7854     _LT_CONFIG($1)
7855   fi # test -n "$compiler"
7857   GCC=$lt_save_GCC
7858   CC=$lt_save_CC
7859   CFLAGS=$lt_save_CFLAGS
7860 fi # test "$_lt_disable_FC" != yes
7862 AC_LANG_POP
7863 ])# _LT_LANG_FC_CONFIG
7866 # _LT_LANG_GCJ_CONFIG([TAG])
7867 # --------------------------
7868 # Ensure that the configuration variables for the GNU Java Compiler compiler
7869 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
7870 # to write the compiler configuration to `libtool'.
7871 m4_defun([_LT_LANG_GCJ_CONFIG],
7872 [AC_REQUIRE([LT_PROG_GCJ])dnl
7873 AC_LANG_SAVE
7875 # Source file extension for Java test sources.
7876 ac_ext=java
7878 # Object file extension for compiled Java test sources.
7879 objext=o
7880 _LT_TAGVAR(objext, $1)=$objext
7882 # Code to be used in simple compile tests
7883 lt_simple_compile_test_code="class foo {}"
7885 # Code to be used in simple link tests
7886 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7888 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7889 _LT_TAG_COMPILER
7891 # save warnings/boilerplate of simple test code
7892 _LT_COMPILER_BOILERPLATE
7893 _LT_LINKER_BOILERPLATE
7895 # Allow CC to be a program name with arguments.
7896 lt_save_CC=$CC
7897 lt_save_CFLAGS=$CFLAGS
7898 lt_save_GCC=$GCC
7899 GCC=yes
7900 CC=${GCJ-"gcj"}
7901 CFLAGS=$GCJFLAGS
7902 compiler=$CC
7903 _LT_TAGVAR(compiler, $1)=$CC
7904 _LT_TAGVAR(LD, $1)="$LD"
7905 _LT_CC_BASENAME([$compiler])
7907 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7908 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7910 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7911 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7912 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7914 if test -n "$compiler"; then
7915   _LT_COMPILER_NO_RTTI($1)
7916   _LT_COMPILER_PIC($1)
7917   _LT_COMPILER_C_O($1)
7918   _LT_COMPILER_FILE_LOCKS($1)
7919   _LT_LINKER_SHLIBS($1)
7920   _LT_LINKER_HARDCODE_LIBPATH($1)
7922   _LT_CONFIG($1)
7923 fi
7925 AC_LANG_RESTORE
7927 GCC=$lt_save_GCC
7928 CC=$lt_save_CC
7929 CFLAGS=$lt_save_CFLAGS
7930 ])# _LT_LANG_GCJ_CONFIG
7933 # _LT_LANG_GO_CONFIG([TAG])
7934 # --------------------------
7935 # Ensure that the configuration variables for the GNU Go compiler
7936 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
7937 # to write the compiler configuration to `libtool'.
7938 m4_defun([_LT_LANG_GO_CONFIG],
7939 [AC_REQUIRE([LT_PROG_GO])dnl
7940 AC_LANG_SAVE
7942 # Source file extension for Go test sources.
7943 ac_ext=go
7945 # Object file extension for compiled Go test sources.
7946 objext=o
7947 _LT_TAGVAR(objext, $1)=$objext
7949 # Code to be used in simple compile tests
7950 lt_simple_compile_test_code="package main; func main() { }"
7952 # Code to be used in simple link tests
7953 lt_simple_link_test_code='package main; func main() { }'
7955 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7956 _LT_TAG_COMPILER
7958 # save warnings/boilerplate of simple test code
7959 _LT_COMPILER_BOILERPLATE
7960 _LT_LINKER_BOILERPLATE
7962 # Allow CC to be a program name with arguments.
7963 lt_save_CC=$CC
7964 lt_save_CFLAGS=$CFLAGS
7965 lt_save_GCC=$GCC
7966 GCC=yes
7967 CC=${GOC-"gccgo"}
7968 CFLAGS=$GOFLAGS
7969 compiler=$CC
7970 _LT_TAGVAR(compiler, $1)=$CC
7971 _LT_TAGVAR(LD, $1)="$LD"
7972 _LT_CC_BASENAME([$compiler])
7974 # Go did not exist at the time GCC didn't implicitly link libc in.
7975 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7977 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7978 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7979 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7981 if test -n "$compiler"; then
7982   _LT_COMPILER_NO_RTTI($1)
7983   _LT_COMPILER_PIC($1)
7984   _LT_COMPILER_C_O($1)
7985   _LT_COMPILER_FILE_LOCKS($1)
7986   _LT_LINKER_SHLIBS($1)
7987   _LT_LINKER_HARDCODE_LIBPATH($1)
7989   _LT_CONFIG($1)
7990 fi
7992 AC_LANG_RESTORE
7994 GCC=$lt_save_GCC
7995 CC=$lt_save_CC
7996 CFLAGS=$lt_save_CFLAGS
7997 ])# _LT_LANG_GO_CONFIG
8000 # _LT_LANG_RC_CONFIG([TAG])
8001 # -------------------------
8002 # Ensure that the configuration variables for the Windows resource compiler
8003 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8004 # to write the compiler configuration to `libtool'.
8005 m4_defun([_LT_LANG_RC_CONFIG],
8006 [AC_REQUIRE([LT_PROG_RC])dnl
8007 AC_LANG_SAVE
8009 # Source file extension for RC test sources.
8010 ac_ext=rc
8012 # Object file extension for compiled RC test sources.
8013 objext=o
8014 _LT_TAGVAR(objext, $1)=$objext
8016 # Code to be used in simple compile tests
8017 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8019 # Code to be used in simple link tests
8020 lt_simple_link_test_code="$lt_simple_compile_test_code"
8022 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8023 _LT_TAG_COMPILER
8025 # save warnings/boilerplate of simple test code
8026 _LT_COMPILER_BOILERPLATE
8027 _LT_LINKER_BOILERPLATE
8029 # Allow CC to be a program name with arguments.
8030 lt_save_CC="$CC"
8031 lt_save_CFLAGS=$CFLAGS
8032 lt_save_GCC=$GCC
8033 GCC=
8034 CC=${RC-"windres"}
8035 CFLAGS=
8036 compiler=$CC
8037 _LT_TAGVAR(compiler, $1)=$CC
8038 _LT_CC_BASENAME([$compiler])
8039 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8041 if test -n "$compiler"; then
8042   :
8043   _LT_CONFIG($1)
8044 fi
8046 GCC=$lt_save_GCC
8047 AC_LANG_RESTORE
8048 CC=$lt_save_CC
8049 CFLAGS=$lt_save_CFLAGS
8050 ])# _LT_LANG_RC_CONFIG
8053 # LT_PROG_GCJ
8054 # -----------
8055 AC_DEFUN([LT_PROG_GCJ],
8056 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8057   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8058     [AC_CHECK_TOOL(GCJ, gcj,)
8059       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8060       AC_SUBST(GCJFLAGS)])])[]dnl
8061 ])
8063 # Old name:
8064 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8065 dnl aclocal-1.4 backwards compatibility:
8066 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8069 # LT_PROG_GO
8070 # ----------
8071 AC_DEFUN([LT_PROG_GO],
8072 [AC_CHECK_TOOL(GOC, gccgo,)
8073 ])
8076 # LT_PROG_RC
8077 # ----------
8078 AC_DEFUN([LT_PROG_RC],
8079 [AC_CHECK_TOOL(RC, windres,)
8080 ])
8082 # Old name:
8083 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8084 dnl aclocal-1.4 backwards compatibility:
8085 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8088 # _LT_DECL_EGREP
8089 # --------------
8090 # If we don't have a new enough Autoconf to choose the best grep
8091 # available, choose the one first in the user's PATH.
8092 m4_defun([_LT_DECL_EGREP],
8093 [AC_REQUIRE([AC_PROG_EGREP])dnl
8094 AC_REQUIRE([AC_PROG_FGREP])dnl
8095 test -z "$GREP" && GREP=grep
8096 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8097 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8098 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8099 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8100 AC_SUBST([GREP])
8101 ])
8104 # _LT_DECL_OBJDUMP
8105 # --------------
8106 # If we don't have a new enough Autoconf to choose the best objdump
8107 # available, choose the one first in the user's PATH.
8108 m4_defun([_LT_DECL_OBJDUMP],
8109 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8110 test -z "$OBJDUMP" && OBJDUMP=objdump
8111 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8112 AC_SUBST([OBJDUMP])
8113 ])
8115 # _LT_DECL_DLLTOOL
8116 # ----------------
8117 # Ensure DLLTOOL variable is set.
8118 m4_defun([_LT_DECL_DLLTOOL],
8119 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8120 test -z "$DLLTOOL" && DLLTOOL=dlltool
8121 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8122 AC_SUBST([DLLTOOL])
8123 ])
8125 # _LT_DECL_SED
8126 # ------------
8127 # Check for a fully-functional sed program, that truncates
8128 # as few characters as possible.  Prefer GNU sed if found.
8129 m4_defun([_LT_DECL_SED],
8130 [AC_PROG_SED
8131 test -z "$SED" && SED=sed
8132 Xsed="$SED -e 1s/^X//"
8133 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8134 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8135     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8136 ])# _LT_DECL_SED
8138 m4_ifndef([AC_PROG_SED], [
8139 # NOTE: This macro has been submitted for inclusion into   #
8140 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8141 #  a released version of Autoconf we should remove this    #
8142 #  macro and use it instead.                               #
8144 m4_defun([AC_PROG_SED],
8145 [AC_MSG_CHECKING([for a sed that does not truncate output])
8146 AC_CACHE_VAL(lt_cv_path_SED,
8147 [# Loop through the user's path and test for sed and gsed.
8148 # Then use that list of sed's as ones to test for truncation.
8149 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8150 for as_dir in $PATH
8151 do
8152   IFS=$as_save_IFS
8153   test -z "$as_dir" && as_dir=.
8154   for lt_ac_prog in sed gsed; do
8155     for ac_exec_ext in '' $ac_executable_extensions; do
8156       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8157         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8158       fi
8159     done
8160   done
8161 done
8162 IFS=$as_save_IFS
8163 lt_ac_max=0
8164 lt_ac_count=0
8165 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8166 # along with /bin/sed that truncates output.
8167 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8168   test ! -f $lt_ac_sed && continue
8169   cat /dev/null > conftest.in
8170   lt_ac_count=0
8171   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8172   # Check for GNU sed and select it if it is found.
8173   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8174     lt_cv_path_SED=$lt_ac_sed
8175     break
8176   fi
8177   while true; do
8178     cat conftest.in conftest.in >conftest.tmp
8179     mv conftest.tmp conftest.in
8180     cp conftest.in conftest.nl
8181     echo >>conftest.nl
8182     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8183     cmp -s conftest.out conftest.nl || break
8184     # 10000 chars as input seems more than enough
8185     test $lt_ac_count -gt 10 && break
8186     lt_ac_count=`expr $lt_ac_count + 1`
8187     if test $lt_ac_count -gt $lt_ac_max; then
8188       lt_ac_max=$lt_ac_count
8189       lt_cv_path_SED=$lt_ac_sed
8190     fi
8191   done
8192 done
8193 ])
8194 SED=$lt_cv_path_SED
8195 AC_SUBST([SED])
8196 AC_MSG_RESULT([$SED])
8197 ])#AC_PROG_SED
8198 ])#m4_ifndef
8200 # Old name:
8201 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8202 dnl aclocal-1.4 backwards compatibility:
8203 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8206 # _LT_CHECK_SHELL_FEATURES
8207 # ------------------------
8208 # Find out whether the shell is Bourne or XSI compatible,
8209 # or has some other useful features.
8210 m4_defun([_LT_CHECK_SHELL_FEATURES],
8211 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8212 # Try some XSI features
8213 xsi_shell=no
8214 ( _lt_dummy="a/b/c"
8215   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8216       = c,a/b,b/c, \
8217     && eval 'test $(( 1 + 1 )) -eq 2 \
8218     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8219   && xsi_shell=yes
8220 AC_MSG_RESULT([$xsi_shell])
8221 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8223 AC_MSG_CHECKING([whether the shell understands "+="])
8224 lt_shell_append=no
8225 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8226     >/dev/null 2>&1 \
8227   && lt_shell_append=yes
8228 AC_MSG_RESULT([$lt_shell_append])
8229 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8231 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8232   lt_unset=unset
8233 else
8234   lt_unset=false
8235 fi
8236 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8238 # test EBCDIC or ASCII
8239 case `echo X|tr X '\101'` in
8240  A) # ASCII based system
8241     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8242   lt_SP2NL='tr \040 \012'
8243   lt_NL2SP='tr \015\012 \040\040'
8244   ;;
8245  *) # EBCDIC based system
8246   lt_SP2NL='tr \100 \n'
8247   lt_NL2SP='tr \r\n \100\100'
8248   ;;
8249 esac
8250 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8251 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8252 ])# _LT_CHECK_SHELL_FEATURES
8255 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8256 # ------------------------------------------------------
8257 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8258 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8259 m4_defun([_LT_PROG_FUNCTION_REPLACE],
8260 [dnl {
8261 sed -e '/^$1 ()$/,/^} # $1 /c\
8262 $1 ()\
8263 {\
8264 m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
8265 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8266   && mv -f "$cfgfile.tmp" "$cfgfile" \
8267     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8268 test 0 -eq $? || _lt_function_replace_fail=:
8269 ])
8272 # _LT_PROG_REPLACE_SHELLFNS
8273 # -------------------------
8274 # Replace existing portable implementations of several shell functions with
8275 # equivalent extended shell implementations where those features are available..
8276 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8277 [if test x"$xsi_shell" = xyes; then
8278   _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8279     case ${1} in
8280       */*) func_dirname_result="${1%/*}${2}" ;;
8281       *  ) func_dirname_result="${3}" ;;
8282     esac])
8284   _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8285     func_basename_result="${1##*/}"])
8287   _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8288     case ${1} in
8289       */*) func_dirname_result="${1%/*}${2}" ;;
8290       *  ) func_dirname_result="${3}" ;;
8291     esac
8292     func_basename_result="${1##*/}"])
8294   _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8295     # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8296     # positional parameters, so assign one to ordinary parameter first.
8297     func_stripname_result=${3}
8298     func_stripname_result=${func_stripname_result#"${1}"}
8299     func_stripname_result=${func_stripname_result%"${2}"}])
8301   _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8302     func_split_long_opt_name=${1%%=*}
8303     func_split_long_opt_arg=${1#*=}])
8305   _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8306     func_split_short_opt_arg=${1#??}
8307     func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8309   _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8310     case ${1} in
8311       *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8312       *)    func_lo2o_result=${1} ;;
8313     esac])
8315   _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
8317   _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
8319   _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
8320 fi
8322 if test x"$lt_shell_append" = xyes; then
8323   _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
8325   _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8326     func_quote_for_eval "${2}"
8327 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8328     eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8330   # Save a `func_append' function call where possible by direct use of '+='
8331   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8332     && mv -f "$cfgfile.tmp" "$cfgfile" \
8333       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8334   test 0 -eq $? || _lt_function_replace_fail=:
8335 else
8336   # Save a `func_append' function call even when '+=' is not available
8337   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8338     && mv -f "$cfgfile.tmp" "$cfgfile" \
8339       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8340   test 0 -eq $? || _lt_function_replace_fail=:
8341 fi
8343 if test x"$_lt_function_replace_fail" = x":"; then
8344   AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8345 fi
8346 ])
8348 # _LT_PATH_CONVERSION_FUNCTIONS
8349 # -----------------------------
8350 # Determine which file name conversion functions should be used by
8351 # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8352 # for certain cross-compile configurations and native mingw.
8353 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8354 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8355 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8356 AC_MSG_CHECKING([how to convert $build file names to $host format])
8357 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8358 [case $host in
8359   *-*-mingw* )
8360     case $build in
8361       *-*-mingw* ) # actually msys
8362         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8363         ;;
8364       *-*-cygwin* )
8365         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8366         ;;
8367       * ) # otherwise, assume *nix
8368         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8369         ;;
8370     esac
8371     ;;
8372   *-*-cygwin* )
8373     case $build in
8374       *-*-mingw* ) # actually msys
8375         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8376         ;;
8377       *-*-cygwin* )
8378         lt_cv_to_host_file_cmd=func_convert_file_noop
8379         ;;
8380       * ) # otherwise, assume *nix
8381         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8382         ;;
8383     esac
8384     ;;
8385   * ) # unhandled hosts (and "normal" native builds)
8386     lt_cv_to_host_file_cmd=func_convert_file_noop
8387     ;;
8388 esac
8389 ])
8390 to_host_file_cmd=$lt_cv_to_host_file_cmd
8391 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8392 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8393          [0], [convert $build file names to $host format])dnl
8395 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8396 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8397 [#assume ordinary cross tools, or native build.
8398 lt_cv_to_tool_file_cmd=func_convert_file_noop
8399 case $host in
8400   *-*-mingw* )
8401     case $build in
8402       *-*-mingw* ) # actually msys
8403         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8404         ;;
8405     esac
8406     ;;
8407 esac
8408 ])
8409 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8410 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8411 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8412          [0], [convert $build files to toolchain format])dnl
8413 ])# _LT_PATH_CONVERSION_FUNCTIONS
8415 # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
8417 #   Copyright (C) 1999-2006, 2007, 2008, 2011 Free Software Foundation, Inc.
8418 #   Written by Thomas Tanner, 1999
8420 # This file is free software; the Free Software Foundation gives
8421 # unlimited permission to copy and/or distribute it, with or without
8422 # modifications, as long as this notice is preserved.
8424 # serial 18 LTDL_INIT
8426 # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
8427 # ------------------------------------------
8428 # DIRECTORY contains the libltdl sources.  It is okay to call this
8429 # function multiple times, as long as the same DIRECTORY is always given.
8430 AC_DEFUN([LT_CONFIG_LTDL_DIR],
8431 [AC_BEFORE([$0], [LTDL_INIT])
8432 _$0($*)
8433 ])# LT_CONFIG_LTDL_DIR
8435 # We break this out into a separate macro, so that we can call it safely
8436 # internally without being caught accidentally by the sed scan in libtoolize.
8437 m4_defun([_LT_CONFIG_LTDL_DIR],
8438 [dnl remove trailing slashes
8439 m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
8440 m4_case(_LTDL_DIR,
8441         [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
8442              m4_if(_ARG_DIR, [.],
8443                      [],
8444                  [m4_define([_LTDL_DIR], _ARG_DIR)
8445                   _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
8446     [m4_if(_ARG_DIR, _LTDL_DIR,
8447             [],
8448         [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
8449 m4_popdef([_ARG_DIR])
8450 ])# _LT_CONFIG_LTDL_DIR
8452 # Initialise:
8453 m4_define([_LTDL_DIR], [])
8456 # _LT_BUILD_PREFIX
8457 # ----------------
8458 # If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
8459 # to `${top_builddir}/'.
8460 m4_define([_LT_BUILD_PREFIX],
8461 [m4_ifdef([AC_AUTOCONF_VERSION],
8462    [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
8463           [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
8464                           [${top_build_prefix}],
8465                           [${top_builddir}/])],
8466           [${top_build_prefix}])],
8467    [${top_builddir}/])[]dnl
8468 ])
8471 # LTDL_CONVENIENCE
8472 # ----------------
8473 # sets LIBLTDL to the link flags for the libltdl convenience library and
8474 # LTDLINCL to the include flags for the libltdl header and adds
8475 # --enable-ltdl-convenience to the configure arguments.  Note that
8476 # AC_CONFIG_SUBDIRS is not called here.  LIBLTDL will be prefixed with
8477 # '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
8478 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
8479 # quotes!).  If your package is not flat and you're not using automake,
8480 # define top_build_prefix, top_builddir, and top_srcdir appropriately
8481 # in your Makefiles.
8482 AC_DEFUN([LTDL_CONVENIENCE],
8483 [AC_BEFORE([$0], [LTDL_INIT])dnl
8484 dnl Although the argument is deprecated and no longer documented,
8485 dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
8486 dnl here make sure it is the same as any other declaration of libltdl's
8487 dnl location!  This also ensures lt_ltdl_dir is set when configure.ac is
8488 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8489 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8490 _$0()
8491 ])# LTDL_CONVENIENCE
8493 # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
8494 # now we have LT_CONFIG_LTDL_DIR:
8495 AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
8496 [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8497 _LTDL_CONVENIENCE])
8499 dnl aclocal-1.4 backwards compatibility:
8500 dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
8503 # _LTDL_CONVENIENCE
8504 # -----------------
8505 # Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
8506 m4_defun([_LTDL_CONVENIENCE],
8507 [case $enable_ltdl_convenience in
8508   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8509   "") enable_ltdl_convenience=yes
8510       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8511 esac
8512 LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
8513 LTDLDEPS=$LIBLTDL
8514 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8516 AC_SUBST([LIBLTDL])
8517 AC_SUBST([LTDLDEPS])
8518 AC_SUBST([LTDLINCL])
8520 # For backwards non-gettext consistent compatibility...
8521 INCLTDL="$LTDLINCL"
8522 AC_SUBST([INCLTDL])
8523 ])# _LTDL_CONVENIENCE
8526 # LTDL_INSTALLABLE
8527 # ----------------
8528 # sets LIBLTDL to the link flags for the libltdl installable library
8529 # and LTDLINCL to the include flags for the libltdl header and adds
8530 # --enable-ltdl-install to the configure arguments.  Note that
8531 # AC_CONFIG_SUBDIRS is not called from here.  If an installed libltdl
8532 # is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
8533 # available, otherwise with '${top_builddir}/', and LTDLINCL will be
8534 # prefixed with '${top_srcdir}/' (note the single quotes!).  If your
8535 # package is not flat and you're not using automake, define top_build_prefix,
8536 # top_builddir, and top_srcdir appropriately in your Makefiles.
8537 # In the future, this macro may have to be called after LT_INIT.
8538 AC_DEFUN([LTDL_INSTALLABLE],
8539 [AC_BEFORE([$0], [LTDL_INIT])dnl
8540 dnl Although the argument is deprecated and no longer documented,
8541 dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
8542 dnl here make sure it is the same as any other declaration of libltdl's
8543 dnl location!  This also ensures lt_ltdl_dir is set when configure.ac is
8544 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8545 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8546 _$0()
8547 ])# LTDL_INSTALLABLE
8549 # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
8550 # now we have LT_CONFIG_LTDL_DIR:
8551 AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
8552 [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8553 _LTDL_INSTALLABLE])
8555 dnl aclocal-1.4 backwards compatibility:
8556 dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
8559 # _LTDL_INSTALLABLE
8560 # -----------------
8561 # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
8562 m4_defun([_LTDL_INSTALLABLE],
8563 [if test -f $prefix/lib/libltdl.la; then
8564   lt_save_LDFLAGS="$LDFLAGS"
8565   LDFLAGS="-L$prefix/lib $LDFLAGS"
8566   AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
8567   LDFLAGS="$lt_save_LDFLAGS"
8568   if test x"${lt_lib_ltdl-no}" = xyes; then
8569     if test x"$enable_ltdl_install" != xyes; then
8570       # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
8571       AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
8572       enable_ltdl_install=no
8573     fi
8574   elif test x"$enable_ltdl_install" = xno; then
8575     AC_MSG_WARN([libltdl not installed, but installation disabled])
8576   fi
8577 fi
8579 # If configure.ac declared an installable ltdl, and the user didn't override
8580 # with --disable-ltdl-install, we will install the shipped libltdl.
8581 case $enable_ltdl_install in
8582   no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8583       LIBLTDL="-lltdl"
8584       LTDLDEPS=
8585       LTDLINCL=
8586       ;;
8587   *)  enable_ltdl_install=yes
8588       ac_configure_args="$ac_configure_args --enable-ltdl-install"
8589       LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
8590       LTDLDEPS=$LIBLTDL
8591       LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8592       ;;
8593 esac
8595 AC_SUBST([LIBLTDL])
8596 AC_SUBST([LTDLDEPS])
8597 AC_SUBST([LTDLINCL])
8599 # For backwards non-gettext consistent compatibility...
8600 INCLTDL="$LTDLINCL"
8601 AC_SUBST([INCLTDL])
8602 ])# LTDL_INSTALLABLE
8605 # _LTDL_MODE_DISPATCH
8606 # -------------------
8607 m4_define([_LTDL_MODE_DISPATCH],
8608 [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
8609 m4_if(_LTDL_DIR, [],
8610         [],
8611     dnl if _LTDL_MODE was not set already, the default value is `subproject':
8612     [m4_case(m4_default(_LTDL_MODE, [subproject]),
8613           [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
8614                           _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
8615           [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
8616           [recursive], [],
8617         [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
8618 dnl Be careful not to expand twice:
8619 m4_define([$0], [])
8620 ])# _LTDL_MODE_DISPATCH
8623 # _LT_LIBOBJ(MODULE_NAME)
8624 # -----------------------
8625 # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
8626 # of into LIBOBJS.
8627 AC_DEFUN([_LT_LIBOBJ], [
8628   m4_pattern_allow([^_LT_LIBOBJS$])
8629   _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
8630 ])# _LT_LIBOBJS
8633 # LTDL_INIT([OPTIONS])
8634 # --------------------
8635 # Clients of libltdl can use this macro to allow the installer to
8636 # choose between a shipped copy of the ltdl sources or a preinstalled
8637 # version of the library.  If the shipped ltdl sources are not in a
8638 # subdirectory named libltdl, the directory name must be given by
8639 # LT_CONFIG_LTDL_DIR.
8640 AC_DEFUN([LTDL_INIT],
8641 [dnl Parse OPTIONS
8642 _LT_SET_OPTIONS([$0], [$1])
8644 dnl We need to keep our own list of libobjs separate from our parent project,
8645 dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
8646 dnl we look for our own LIBOBJs.
8647 m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
8648 m4_pushdef([AC_LIBSOURCES])
8650 dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
8651 m4_if(_LTDL_MODE, [],
8652         [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
8653         m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
8654                 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
8656 AC_ARG_WITH([included_ltdl],
8657     [AS_HELP_STRING([--with-included-ltdl],
8658                     [use the GNU ltdl sources included here])])
8660 if test "x$with_included_ltdl" != xyes; then
8661   # We are not being forced to use the included libltdl sources, so
8662   # decide whether there is a useful installed version we can use.
8663   AC_CHECK_HEADER([ltdl.h],
8664       [AC_CHECK_DECL([lt_dlinterface_register],
8665            [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
8666                [with_included_ltdl=no],
8667                [with_included_ltdl=yes])],
8668            [with_included_ltdl=yes],
8669            [AC_INCLUDES_DEFAULT
8670             #include <ltdl.h>])],
8671       [with_included_ltdl=yes],
8672       [AC_INCLUDES_DEFAULT]
8673   )
8674 fi
8676 dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
8677 dnl was called yet, then for old times' sake, we assume libltdl is in an
8678 dnl eponymous directory:
8679 AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
8681 AC_ARG_WITH([ltdl_include],
8682     [AS_HELP_STRING([--with-ltdl-include=DIR],
8683                     [use the ltdl headers installed in DIR])])
8685 if test -n "$with_ltdl_include"; then
8686   if test -f "$with_ltdl_include/ltdl.h"; then :
8687   else
8688     AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
8689   fi
8690 else
8691   with_ltdl_include=no
8692 fi
8694 AC_ARG_WITH([ltdl_lib],
8695     [AS_HELP_STRING([--with-ltdl-lib=DIR],
8696                     [use the libltdl.la installed in DIR])])
8698 if test -n "$with_ltdl_lib"; then
8699   if test -f "$with_ltdl_lib/libltdl.la"; then :
8700   else
8701     AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
8702   fi
8703 else
8704   with_ltdl_lib=no
8705 fi
8707 case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
8708   ,yes,no,no,)
8709         m4_case(m4_default(_LTDL_TYPE, [convenience]),
8710             [convenience], [_LTDL_CONVENIENCE],
8711             [installable], [_LTDL_INSTALLABLE],
8712           [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
8713         ;;
8714   ,no,no,no,)
8715         # If the included ltdl is not to be used, then use the
8716         # preinstalled libltdl we found.
8717         AC_DEFINE([HAVE_LTDL], [1],
8718           [Define this if a modern libltdl is already installed])
8719         LIBLTDL=-lltdl
8720         LTDLDEPS=
8721         LTDLINCL=
8722         ;;
8723   ,no*,no,*)
8724         AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
8725         ;;
8726   *)    with_included_ltdl=no
8727         LIBLTDL="-L$with_ltdl_lib -lltdl"
8728         LTDLDEPS=
8729         LTDLINCL="-I$with_ltdl_include"
8730         ;;
8731 esac
8732 INCLTDL="$LTDLINCL"
8734 # Report our decision...
8735 AC_MSG_CHECKING([where to find libltdl headers])
8736 AC_MSG_RESULT([$LTDLINCL])
8737 AC_MSG_CHECKING([where to find libltdl library])
8738 AC_MSG_RESULT([$LIBLTDL])
8740 _LTDL_SETUP
8742 dnl restore autoconf definition.
8743 m4_popdef([AC_LIBOBJ])
8744 m4_popdef([AC_LIBSOURCES])
8746 AC_CONFIG_COMMANDS_PRE([
8747     _ltdl_libobjs=
8748     _ltdl_ltlibobjs=
8749     if test -n "$_LT_LIBOBJS"; then
8750       # Remove the extension.
8751       _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
8752       for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
8753         _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
8754         _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
8755       done
8756     fi
8757     AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
8758     AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
8759 ])
8761 # Only expand once:
8762 m4_define([LTDL_INIT])
8763 ])# LTDL_INIT
8765 # Old names:
8766 AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
8767 AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
8768 AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
8769 dnl aclocal-1.4 backwards compatibility:
8770 dnl AC_DEFUN([AC_LIB_LTDL], [])
8771 dnl AC_DEFUN([AC_WITH_LTDL], [])
8772 dnl AC_DEFUN([LT_WITH_LTDL], [])
8775 # _LTDL_SETUP
8776 # -----------
8777 # Perform all the checks necessary for compilation of the ltdl objects
8778 #  -- including compiler checks and header checks.  This is a public
8779 # interface  mainly for the benefit of libltdl's own configure.ac, most
8780 # other users should call LTDL_INIT instead.
8781 AC_DEFUN([_LTDL_SETUP],
8782 [AC_REQUIRE([AC_PROG_CC])dnl
8783 AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
8784 AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
8785 AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
8786 AC_REQUIRE([LT_LIB_DLLOAD])dnl
8787 AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8788 AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
8789 AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
8790 AC_REQUIRE([gl_FUNC_ARGZ])dnl
8792 m4_require([_LT_CHECK_OBJDIR])dnl
8793 m4_require([_LT_HEADER_DLFCN])dnl
8794 m4_require([_LT_CHECK_DLPREOPEN])dnl
8795 m4_require([_LT_DECL_SED])dnl
8797 dnl Don't require this, or it will be expanded earlier than the code
8798 dnl that sets the variables it relies on:
8799 _LT_ENABLE_INSTALL
8801 dnl _LTDL_MODE specific code must be called at least once:
8802 _LTDL_MODE_DISPATCH
8804 # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
8805 # the user used.  This is so that ltdl.h can pick up the parent projects
8806 # config.h file, The first file in AC_CONFIG_HEADERS must contain the
8807 # definitions required by ltdl.c.
8808 # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
8809 AC_CONFIG_COMMANDS_PRE([dnl
8810 m4_pattern_allow([^LT_CONFIG_H$])dnl
8811 m4_ifset([AH_HEADER],
8812     [LT_CONFIG_H=AH_HEADER],
8813     [m4_ifset([AC_LIST_HEADERS],
8814             [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[      ]]*,,;s,[[ :]].*$,,'`],
8815         [])])])
8816 AC_SUBST([LT_CONFIG_H])
8818 AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
8819         [], [], [AC_INCLUDES_DEFAULT])
8821 AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
8822 AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
8824 m4_pattern_allow([LT_LIBEXT])dnl
8825 AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
8827 name=
8828 eval "lt_libprefix=\"$libname_spec\""
8829 m4_pattern_allow([LT_LIBPREFIX])dnl
8830 AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
8832 name=ltdl
8833 eval "LTDLOPEN=\"$libname_spec\""
8834 AC_SUBST([LTDLOPEN])
8835 ])# _LTDL_SETUP
8838 # _LT_ENABLE_INSTALL
8839 # ------------------
8840 m4_define([_LT_ENABLE_INSTALL],
8841 [AC_ARG_ENABLE([ltdl-install],
8842     [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
8844 case ,${enable_ltdl_install},${enable_ltdl_convenience} in
8845   *yes*) ;;
8846   *) enable_ltdl_convenience=yes ;;
8847 esac
8849 m4_ifdef([AM_CONDITIONAL],
8850 [AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
8851  AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
8852 ])# _LT_ENABLE_INSTALL
8855 # LT_SYS_DLOPEN_DEPLIBS
8856 # ---------------------
8857 AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
8858 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8859 AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
8860   [lt_cv_sys_dlopen_deplibs],
8861   [# PORTME does your system automatically load deplibs for dlopen?
8862   # or its logical equivalent (e.g. shl_load for HP-UX < 11)
8863   # For now, we just catch OSes we know something about -- in the
8864   # future, we'll try test this programmatically.
8865   lt_cv_sys_dlopen_deplibs=unknown
8866   case $host_os in
8867   aix3*|aix4.1.*|aix4.2.*)
8868     # Unknown whether this is true for these versions of AIX, but
8869     # we want this `case' here to explicitly catch those versions.
8870     lt_cv_sys_dlopen_deplibs=unknown
8871     ;;
8872   aix[[4-9]]*)
8873     lt_cv_sys_dlopen_deplibs=yes
8874     ;;
8875   amigaos*)
8876     case $host_cpu in
8877     powerpc)
8878       lt_cv_sys_dlopen_deplibs=no
8879       ;;
8880     esac
8881     ;;
8882   darwin*)
8883     # Assuming the user has installed a libdl from somewhere, this is true
8884     # If you are looking for one http://www.opendarwin.org/projects/dlcompat
8885     lt_cv_sys_dlopen_deplibs=yes
8886     ;;
8887   freebsd* | dragonfly*)
8888     lt_cv_sys_dlopen_deplibs=yes
8889     ;;
8890   gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
8891     # GNU and its variants, using gnu ld.so (Glibc)
8892     lt_cv_sys_dlopen_deplibs=yes
8893     ;;
8894   hpux10*|hpux11*)
8895     lt_cv_sys_dlopen_deplibs=yes
8896     ;;
8897   interix*)
8898     lt_cv_sys_dlopen_deplibs=yes
8899     ;;
8900   irix[[12345]]*|irix6.[[01]]*)
8901     # Catch all versions of IRIX before 6.2, and indicate that we don't
8902     # know how it worked for any of those versions.
8903     lt_cv_sys_dlopen_deplibs=unknown
8904     ;;
8905   irix*)
8906     # The case above catches anything before 6.2, and it's known that
8907     # at 6.2 and later dlopen does load deplibs.
8908     lt_cv_sys_dlopen_deplibs=yes
8909     ;;
8910   netbsd* | netbsdelf*-gnu)
8911     lt_cv_sys_dlopen_deplibs=yes
8912     ;;
8913   openbsd*)
8914     lt_cv_sys_dlopen_deplibs=yes
8915     ;;
8916   osf[[1234]]*)
8917     # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
8918     # it did *not* use an RPATH in a shared library to find objects the
8919     # library depends on, so we explicitly say `no'.
8920     lt_cv_sys_dlopen_deplibs=no
8921     ;;
8922   osf5.0|osf5.0a|osf5.1)
8923     # dlopen *does* load deplibs and with the right loader patch applied
8924     # it even uses RPATH in a shared library to search for shared objects
8925     # that the library depends on, but there's no easy way to know if that
8926     # patch is installed.  Since this is the case, all we can really
8927     # say is unknown -- it depends on the patch being installed.  If
8928     # it is, this changes to `yes'.  Without it, it would be `no'.
8929     lt_cv_sys_dlopen_deplibs=unknown
8930     ;;
8931   osf*)
8932     # the two cases above should catch all versions of osf <= 5.1.  Read
8933     # the comments above for what we know about them.
8934     # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
8935     # is used to find them so we can finally say `yes'.
8936     lt_cv_sys_dlopen_deplibs=yes
8937     ;;
8938   qnx*)
8939     lt_cv_sys_dlopen_deplibs=yes
8940     ;;
8941   solaris*)
8942     lt_cv_sys_dlopen_deplibs=yes
8943     ;;
8944   sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8945     libltdl_cv_sys_dlopen_deplibs=yes
8946     ;;
8947   esac
8948   ])
8949 if test "$lt_cv_sys_dlopen_deplibs" != yes; then
8950  AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
8951     [Define if the OS needs help to load dependent libraries for dlopen().])
8952 fi
8953 ])# LT_SYS_DLOPEN_DEPLIBS
8955 # Old name:
8956 AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
8957 dnl aclocal-1.4 backwards compatibility:
8958 dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
8961 # LT_SYS_MODULE_EXT
8962 # -----------------
8963 AC_DEFUN([LT_SYS_MODULE_EXT],
8964 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8965 AC_CACHE_CHECK([which extension is used for runtime loadable modules],
8966   [libltdl_cv_shlibext],
8968 module=yes
8969 eval libltdl_cv_shlibext=$shrext_cmds
8970 module=no
8971 eval libltdl_cv_shrext=$shrext_cmds
8972   ])
8973 if test -n "$libltdl_cv_shlibext"; then
8974   m4_pattern_allow([LT_MODULE_EXT])dnl
8975   AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
8976     [Define to the extension used for runtime loadable modules, say, ".so".])
8977 fi
8978 if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then
8979   m4_pattern_allow([LT_SHARED_EXT])dnl
8980   AC_DEFINE_UNQUOTED([LT_SHARED_EXT], ["$libltdl_cv_shrext"],
8981     [Define to the shared library suffix, say, ".dylib".])
8982 fi
8983 ])# LT_SYS_MODULE_EXT
8985 # Old name:
8986 AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
8987 dnl aclocal-1.4 backwards compatibility:
8988 dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
8991 # LT_SYS_MODULE_PATH
8992 # ------------------
8993 AC_DEFUN([LT_SYS_MODULE_PATH],
8994 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8995 AC_CACHE_CHECK([which variable specifies run-time module search path],
8996   [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
8997 if test -n "$lt_cv_module_path_var"; then
8998   m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
8999   AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
9000     [Define to the name of the environment variable that determines the run-time module search path.])
9001 fi
9002 ])# LT_SYS_MODULE_PATH
9004 # Old name:
9005 AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
9006 dnl aclocal-1.4 backwards compatibility:
9007 dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
9010 # LT_SYS_DLSEARCH_PATH
9011 # --------------------
9012 AC_DEFUN([LT_SYS_DLSEARCH_PATH],
9013 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
9014 AC_CACHE_CHECK([for the default library search path],
9015   [lt_cv_sys_dlsearch_path],
9016   [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
9017 if test -n "$lt_cv_sys_dlsearch_path"; then
9018   sys_dlsearch_path=
9019   for dir in $lt_cv_sys_dlsearch_path; do
9020     if test -z "$sys_dlsearch_path"; then
9021       sys_dlsearch_path="$dir"
9022     else
9023       sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
9024     fi
9025   done
9026   m4_pattern_allow([LT_DLSEARCH_PATH])dnl
9027   AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
9028     [Define to the system default library search path.])
9029 fi
9030 ])# LT_SYS_DLSEARCH_PATH
9032 # Old name:
9033 AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
9034 dnl aclocal-1.4 backwards compatibility:
9035 dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
9038 # _LT_CHECK_DLPREOPEN
9039 # -------------------
9040 m4_defun([_LT_CHECK_DLPREOPEN],
9041 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
9042 AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
9043   [libltdl_cv_preloaded_symbols],
9044   [if test -n "$lt_cv_sys_global_symbol_pipe"; then
9045     libltdl_cv_preloaded_symbols=yes
9046   else
9047     libltdl_cv_preloaded_symbols=no
9048   fi
9049   ])
9050 if test x"$libltdl_cv_preloaded_symbols" = xyes; then
9051   AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
9052     [Define if libtool can extract symbol lists from object files.])
9053 fi
9054 ])# _LT_CHECK_DLPREOPEN
9057 # LT_LIB_DLLOAD
9058 # -------------
9059 AC_DEFUN([LT_LIB_DLLOAD],
9060 [m4_pattern_allow([^LT_DLLOADERS$])
9061 LT_DLLOADERS=
9062 AC_SUBST([LT_DLLOADERS])
9064 AC_LANG_PUSH([C])
9066 LIBADD_DLOPEN=
9067 AC_SEARCH_LIBS([dlopen], [dl],
9068         [AC_DEFINE([HAVE_LIBDL], [1],
9069                    [Define if you have the libdl library or equivalent.])
9070         if test "$ac_cv_search_dlopen" != "none required" ; then
9071           LIBADD_DLOPEN="-ldl"
9072         fi
9073         libltdl_cv_lib_dl_dlopen="yes"
9074         LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
9075     [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
9076 #  include <dlfcn.h>
9077 #endif
9078     ]], [[dlopen(0, 0);]])],
9079             [AC_DEFINE([HAVE_LIBDL], [1],
9080                        [Define if you have the libdl library or equivalent.])
9081             libltdl_cv_func_dlopen="yes"
9082             LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
9083         [AC_CHECK_LIB([svld], [dlopen],
9084                 [AC_DEFINE([HAVE_LIBDL], [1],
9085                          [Define if you have the libdl library or equivalent.])
9086                 LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
9087                 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
9088 if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
9089 then
9090   lt_save_LIBS="$LIBS"
9091   LIBS="$LIBS $LIBADD_DLOPEN"
9092   AC_CHECK_FUNCS([dlerror])
9093   LIBS="$lt_save_LIBS"
9094 fi
9095 AC_SUBST([LIBADD_DLOPEN])
9097 LIBADD_SHL_LOAD=
9098 AC_CHECK_FUNC([shl_load],
9099         [AC_DEFINE([HAVE_SHL_LOAD], [1],
9100                    [Define if you have the shl_load function.])
9101         LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
9102     [AC_CHECK_LIB([dld], [shl_load],
9103             [AC_DEFINE([HAVE_SHL_LOAD], [1],
9104                        [Define if you have the shl_load function.])
9105             LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
9106             LIBADD_SHL_LOAD="-ldld"])])
9107 AC_SUBST([LIBADD_SHL_LOAD])
9109 case $host_os in
9110 darwin[[1567]].*)
9111 # We only want this for pre-Mac OS X 10.4.
9112   AC_CHECK_FUNC([_dyld_func_lookup],
9113         [AC_DEFINE([HAVE_DYLD], [1],
9114                    [Define if you have the _dyld_func_lookup function.])
9115         LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
9116   ;;
9117 beos*)
9118   LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
9119   ;;
9120 cygwin* | mingw* | os2* | pw32*)
9121   AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
9122   LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
9123   ;;
9124 esac
9126 AC_CHECK_LIB([dld], [dld_link],
9127         [AC_DEFINE([HAVE_DLD], [1],
9128                    [Define if you have the GNU dld library.])
9129                 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
9130 AC_SUBST([LIBADD_DLD_LINK])
9132 m4_pattern_allow([^LT_DLPREOPEN$])
9133 LT_DLPREOPEN=
9134 if test -n "$LT_DLLOADERS"
9135 then
9136   for lt_loader in $LT_DLLOADERS; do
9137     LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
9138   done
9139   AC_DEFINE([HAVE_LIBDLLOADER], [1],
9140             [Define if libdlloader will be built on this platform])
9141 fi
9142 AC_SUBST([LT_DLPREOPEN])
9144 dnl This isn't used anymore, but set it for backwards compatibility
9145 LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
9146 AC_SUBST([LIBADD_DL])
9148 AC_LANG_POP
9149 ])# LT_LIB_DLLOAD
9151 # Old name:
9152 AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
9153 dnl aclocal-1.4 backwards compatibility:
9154 dnl AC_DEFUN([AC_LTDL_DLLIB], [])
9157 # LT_SYS_SYMBOL_USCORE
9158 # --------------------
9159 # does the compiler prefix global symbols with an underscore?
9160 AC_DEFUN([LT_SYS_SYMBOL_USCORE],
9161 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
9162 AC_CACHE_CHECK([for _ prefix in compiled symbols],
9163   [lt_cv_sys_symbol_underscore],
9164   [lt_cv_sys_symbol_underscore=no
9165   cat > conftest.$ac_ext <<_LT_EOF
9166 void nm_test_func(){}
9167 int main(){nm_test_func;return 0;}
9168 _LT_EOF
9169   if AC_TRY_EVAL(ac_compile); then
9170     # Now try to grab the symbols.
9171     ac_nlist=conftest.nm
9172     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
9173       # See whether the symbols have a leading underscore.
9174       if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
9175         lt_cv_sys_symbol_underscore=yes
9176       else
9177         if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
9178           :
9179         else
9180           echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
9181         fi
9182       fi
9183     else
9184       echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
9185     fi
9186   else
9187     echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
9188     cat conftest.c >&AS_MESSAGE_LOG_FD
9189   fi
9190   rm -rf conftest*
9191   ])
9192   sys_symbol_underscore=$lt_cv_sys_symbol_underscore
9193   AC_SUBST([sys_symbol_underscore])
9194 ])# LT_SYS_SYMBOL_USCORE
9196 # Old name:
9197 AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
9198 dnl aclocal-1.4 backwards compatibility:
9199 dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
9202 # LT_FUNC_DLSYM_USCORE
9203 # --------------------
9204 AC_DEFUN([LT_FUNC_DLSYM_USCORE],
9205 [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
9206 if test x"$lt_cv_sys_symbol_underscore" = xyes; then
9207   if test x"$libltdl_cv_func_dlopen" = xyes ||
9208      test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
9209         AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
9210           [libltdl_cv_need_uscore],
9211           [libltdl_cv_need_uscore=unknown
9212           save_LIBS="$LIBS"
9213           LIBS="$LIBS $LIBADD_DLOPEN"
9214           _LT_TRY_DLOPEN_SELF(
9215             [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
9216             [],                          [libltdl_cv_need_uscore=cross])
9217           LIBS="$save_LIBS"
9218         ])
9219   fi
9220 fi
9222 if test x"$libltdl_cv_need_uscore" = xyes; then
9223   AC_DEFINE([NEED_USCORE], [1],
9224     [Define if dlsym() requires a leading underscore in symbol names.])
9225 fi
9226 ])# LT_FUNC_DLSYM_USCORE
9228 # Old name:
9229 AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
9230 dnl aclocal-1.4 backwards compatibility:
9231 dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
9233 # Helper functions for option handling.                    -*- Autoconf -*-
9235 #   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9236 #   Inc.
9237 #   Written by Gary V. Vaughan, 2004
9239 # This file is free software; the Free Software Foundation gives
9240 # unlimited permission to copy and/or distribute it, with or without
9241 # modifications, as long as this notice is preserved.
9243 # serial 7 ltoptions.m4
9245 # This is to help aclocal find these macros, as it can't see m4_define.
9246 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9249 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9250 # ------------------------------------------
9251 m4_define([_LT_MANGLE_OPTION],
9252 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9255 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9256 # ---------------------------------------
9257 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9258 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9259 # saved as a flag.
9260 m4_define([_LT_SET_OPTION],
9261 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9262 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9263         _LT_MANGLE_DEFUN([$1], [$2]),
9264     [m4_warning([Unknown $1 option `$2'])])[]dnl
9265 ])
9268 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9269 # ------------------------------------------------------------
9270 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9271 m4_define([_LT_IF_OPTION],
9272 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9275 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9276 # -------------------------------------------------------
9277 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9278 # are set.
9279 m4_define([_LT_UNLESS_OPTIONS],
9280 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9281             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9282                       [m4_define([$0_found])])])[]dnl
9283 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9284 ])[]dnl
9285 ])
9288 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9289 # ----------------------------------------
9290 # OPTION-LIST is a space-separated list of Libtool options associated
9291 # with MACRO-NAME.  If any OPTION has a matching handler declared with
9292 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9293 # the unknown option and exit.
9294 m4_defun([_LT_SET_OPTIONS],
9295 [# Set options
9296 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9297     [_LT_SET_OPTION([$1], _LT_Option)])
9299 m4_if([$1],[LT_INIT],[
9300   dnl
9301   dnl Simply set some default values (i.e off) if boolean options were not
9302   dnl specified:
9303   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9304   ])
9305   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9306   ])
9307   dnl
9308   dnl If no reference was made to various pairs of opposing options, then
9309   dnl we run the default mode handler for the pair.  For example, if neither
9310   dnl `shared' nor `disable-shared' was passed, we enable building of shared
9311   dnl archives by default:
9312   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9313   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9314   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9315   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9316                    [_LT_ENABLE_FAST_INSTALL])
9317   ])
9318 ])# _LT_SET_OPTIONS
9322 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9323 # -----------------------------------------
9324 m4_define([_LT_MANGLE_DEFUN],
9325 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9328 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9329 # -----------------------------------------------
9330 m4_define([LT_OPTION_DEFINE],
9331 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9332 ])# LT_OPTION_DEFINE
9335 # dlopen
9336 # ------
9337 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9338 ])
9340 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9341 [_LT_SET_OPTION([LT_INIT], [dlopen])
9342 AC_DIAGNOSE([obsolete],
9343 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9344 put the `dlopen' option into LT_INIT's first parameter.])
9345 ])
9347 dnl aclocal-1.4 backwards compatibility:
9348 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9351 # win32-dll
9352 # ---------
9353 # Declare package support for building win32 dll's.
9354 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9355 [enable_win32_dll=yes
9357 case $host in
9358 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9359   AC_CHECK_TOOL(AS, as, false)
9360   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9361   AC_CHECK_TOOL(OBJDUMP, objdump, false)
9362   ;;
9363 esac
9365 test -z "$AS" && AS=as
9366 _LT_DECL([], [AS],      [1], [Assembler program])dnl
9368 test -z "$DLLTOOL" && DLLTOOL=dlltool
9369 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9371 test -z "$OBJDUMP" && OBJDUMP=objdump
9372 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9373 ])# win32-dll
9375 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9376 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9377 _LT_SET_OPTION([LT_INIT], [win32-dll])
9378 AC_DIAGNOSE([obsolete],
9379 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9380 put the `win32-dll' option into LT_INIT's first parameter.])
9381 ])
9383 dnl aclocal-1.4 backwards compatibility:
9384 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9387 # _LT_ENABLE_SHARED([DEFAULT])
9388 # ----------------------------
9389 # implement the --enable-shared flag, and supports the `shared' and
9390 # `disable-shared' LT_INIT options.
9391 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9392 m4_define([_LT_ENABLE_SHARED],
9393 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9394 AC_ARG_ENABLE([shared],
9395     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9396         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9397     [p=${PACKAGE-default}
9398     case $enableval in
9399     yes) enable_shared=yes ;;
9400     no) enable_shared=no ;;
9401     *)
9402       enable_shared=no
9403       # Look at the argument we got.  We use all the common list separators.
9404       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9405       for pkg in $enableval; do
9406         IFS="$lt_save_ifs"
9407         if test "X$pkg" = "X$p"; then
9408           enable_shared=yes
9409         fi
9410       done
9411       IFS="$lt_save_ifs"
9412       ;;
9413     esac],
9414     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9416     _LT_DECL([build_libtool_libs], [enable_shared], [0],
9417         [Whether or not to build shared libraries])
9418 ])# _LT_ENABLE_SHARED
9420 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9421 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9423 # Old names:
9424 AC_DEFUN([AC_ENABLE_SHARED],
9425 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9426 ])
9428 AC_DEFUN([AC_DISABLE_SHARED],
9429 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9430 ])
9432 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9433 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9435 dnl aclocal-1.4 backwards compatibility:
9436 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9437 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9441 # _LT_ENABLE_STATIC([DEFAULT])
9442 # ----------------------------
9443 # implement the --enable-static flag, and support the `static' and
9444 # `disable-static' LT_INIT options.
9445 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9446 m4_define([_LT_ENABLE_STATIC],
9447 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9448 AC_ARG_ENABLE([static],
9449     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9450         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9451     [p=${PACKAGE-default}
9452     case $enableval in
9453     yes) enable_static=yes ;;
9454     no) enable_static=no ;;
9455     *)
9456      enable_static=no
9457       # Look at the argument we got.  We use all the common list separators.
9458       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9459       for pkg in $enableval; do
9460         IFS="$lt_save_ifs"
9461         if test "X$pkg" = "X$p"; then
9462           enable_static=yes
9463         fi
9464       done
9465       IFS="$lt_save_ifs"
9466       ;;
9467     esac],
9468     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9470     _LT_DECL([build_old_libs], [enable_static], [0],
9471         [Whether or not to build static libraries])
9472 ])# _LT_ENABLE_STATIC
9474 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9475 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9477 # Old names:
9478 AC_DEFUN([AC_ENABLE_STATIC],
9479 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9480 ])
9482 AC_DEFUN([AC_DISABLE_STATIC],
9483 [_LT_SET_OPTION([LT_INIT], [disable-static])
9484 ])
9486 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9487 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9489 dnl aclocal-1.4 backwards compatibility:
9490 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9491 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9495 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9496 # ----------------------------------
9497 # implement the --enable-fast-install flag, and support the `fast-install'
9498 # and `disable-fast-install' LT_INIT options.
9499 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9500 m4_define([_LT_ENABLE_FAST_INSTALL],
9501 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9502 AC_ARG_ENABLE([fast-install],
9503     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9504     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9505     [p=${PACKAGE-default}
9506     case $enableval in
9507     yes) enable_fast_install=yes ;;
9508     no) enable_fast_install=no ;;
9509     *)
9510       enable_fast_install=no
9511       # Look at the argument we got.  We use all the common list separators.
9512       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9513       for pkg in $enableval; do
9514         IFS="$lt_save_ifs"
9515         if test "X$pkg" = "X$p"; then
9516           enable_fast_install=yes
9517         fi
9518       done
9519       IFS="$lt_save_ifs"
9520       ;;
9521     esac],
9522     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9524 _LT_DECL([fast_install], [enable_fast_install], [0],
9525          [Whether or not to optimize for fast installation])dnl
9526 ])# _LT_ENABLE_FAST_INSTALL
9528 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9529 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9531 # Old names:
9532 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9533 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9534 AC_DIAGNOSE([obsolete],
9535 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9536 the `fast-install' option into LT_INIT's first parameter.])
9537 ])
9539 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9540 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9541 AC_DIAGNOSE([obsolete],
9542 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9543 the `disable-fast-install' option into LT_INIT's first parameter.])
9544 ])
9546 dnl aclocal-1.4 backwards compatibility:
9547 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9548 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9551 # _LT_WITH_PIC([MODE])
9552 # --------------------
9553 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9554 # LT_INIT options.
9555 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9556 m4_define([_LT_WITH_PIC],
9557 [AC_ARG_WITH([pic],
9558     [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9559         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9560     [lt_p=${PACKAGE-default}
9561     case $withval in
9562     yes|no) pic_mode=$withval ;;
9563     *)
9564       pic_mode=default
9565       # Look at the argument we got.  We use all the common list separators.
9566       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9567       for lt_pkg in $withval; do
9568         IFS="$lt_save_ifs"
9569         if test "X$lt_pkg" = "X$lt_p"; then
9570           pic_mode=yes
9571         fi
9572       done
9573       IFS="$lt_save_ifs"
9574       ;;
9575     esac],
9576     [pic_mode=default])
9578 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9580 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9581 ])# _LT_WITH_PIC
9583 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9584 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9586 # Old name:
9587 AU_DEFUN([AC_LIBTOOL_PICMODE],
9588 [_LT_SET_OPTION([LT_INIT], [pic-only])
9589 AC_DIAGNOSE([obsolete],
9590 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9591 put the `pic-only' option into LT_INIT's first parameter.])
9592 ])
9594 dnl aclocal-1.4 backwards compatibility:
9595 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9598 m4_define([_LTDL_MODE], [])
9599 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9600                  [m4_define([_LTDL_MODE], [nonrecursive])])
9601 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9602                  [m4_define([_LTDL_MODE], [recursive])])
9603 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9604                  [m4_define([_LTDL_MODE], [subproject])])
9606 m4_define([_LTDL_TYPE], [])
9607 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9608                  [m4_define([_LTDL_TYPE], [installable])])
9609 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9610                  [m4_define([_LTDL_TYPE], [convenience])])
9612 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9614 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9615 # Written by Gary V. Vaughan, 2004
9617 # This file is free software; the Free Software Foundation gives
9618 # unlimited permission to copy and/or distribute it, with or without
9619 # modifications, as long as this notice is preserved.
9621 # serial 6 ltsugar.m4
9623 # This is to help aclocal find these macros, as it can't see m4_define.
9624 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9627 # lt_join(SEP, ARG1, [ARG2...])
9628 # -----------------------------
9629 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9630 # associated separator.
9631 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9632 # versions in m4sugar had bugs.
9633 m4_define([lt_join],
9634 [m4_if([$#], [1], [],
9635        [$#], [2], [[$2]],
9636        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9637 m4_define([_lt_join],
9638 [m4_if([$#$2], [2], [],
9639        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9642 # lt_car(LIST)
9643 # lt_cdr(LIST)
9644 # ------------
9645 # Manipulate m4 lists.
9646 # These macros are necessary as long as will still need to support
9647 # Autoconf-2.59 which quotes differently.
9648 m4_define([lt_car], [[$1]])
9649 m4_define([lt_cdr],
9650 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9651        [$#], 1, [],
9652        [m4_dquote(m4_shift($@))])])
9653 m4_define([lt_unquote], $1)
9656 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9657 # ------------------------------------------
9658 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9659 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9660 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9661 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9662 # than defined and empty).
9664 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9665 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9666 m4_define([lt_append],
9667 [m4_define([$1],
9668            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9672 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9673 # ----------------------------------------------------------
9674 # Produce a SEP delimited list of all paired combinations of elements of
9675 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9676 # has the form PREFIXmINFIXSUFFIXn.
9677 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9678 m4_define([lt_combine],
9679 [m4_if(m4_eval([$# > 3]), [1],
9680        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9681 [[m4_foreach([_Lt_prefix], [$2],
9682              [m4_foreach([_Lt_suffix],
9683                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9684         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9687 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9688 # -----------------------------------------------------------------------
9689 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9690 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9691 m4_define([lt_if_append_uniq],
9692 [m4_ifdef([$1],
9693           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9694                  [lt_append([$1], [$2], [$3])$4],
9695                  [$5])],
9696           [lt_append([$1], [$2], [$3])$4])])
9699 # lt_dict_add(DICT, KEY, VALUE)
9700 # -----------------------------
9701 m4_define([lt_dict_add],
9702 [m4_define([$1($2)], [$3])])
9705 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9706 # --------------------------------------------
9707 m4_define([lt_dict_add_subkey],
9708 [m4_define([$1($2:$3)], [$4])])
9711 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9712 # ----------------------------------
9713 m4_define([lt_dict_fetch],
9714 [m4_ifval([$3],
9715         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9716     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9719 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9720 # -----------------------------------------------------------------
9721 m4_define([lt_if_dict_fetch],
9722 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9723         [$5],
9724     [$6])])
9727 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9728 # --------------------------------------------------------------
9729 m4_define([lt_dict_filter],
9730 [m4_if([$5], [], [],
9731   [lt_join(m4_quote(m4_default([$4], [[, ]])),
9732            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9733                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9734 ])
9736 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
9738 #   Copyright (C) 2004 Free Software Foundation, Inc.
9739 #   Written by Scott James Remnant, 2004
9741 # This file is free software; the Free Software Foundation gives
9742 # unlimited permission to copy and/or distribute it, with or without
9743 # modifications, as long as this notice is preserved.
9745 # @configure_input@
9747 # serial 3337 ltversion.m4
9748 # This file is part of GNU Libtool
9750 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9751 m4_define([LT_PACKAGE_REVISION], [1.3337])
9753 AC_DEFUN([LTVERSION_VERSION],
9754 [macro_version='2.4.2'
9755 macro_revision='1.3337'
9756 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9757 _LT_DECL(, macro_revision, 0)
9758 ])
9760 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9762 #   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9763 #   Written by Scott James Remnant, 2004.
9765 # This file is free software; the Free Software Foundation gives
9766 # unlimited permission to copy and/or distribute it, with or without
9767 # modifications, as long as this notice is preserved.
9769 # serial 5 lt~obsolete.m4
9771 # These exist entirely to fool aclocal when bootstrapping libtool.
9773 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9774 # which have later been changed to m4_define as they aren't part of the
9775 # exported API, or moved to Autoconf or Automake where they belong.
9777 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9778 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9779 # using a macro with the same name in our local m4/libtool.m4 it'll
9780 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9781 # and doesn't know about Autoconf macros at all.)
9783 # So we provide this file, which has a silly filename so it's always
9784 # included after everything else.  This provides aclocal with the
9785 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9786 # because those macros already exist, or will be overwritten later.
9787 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9789 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9790 # Yes, that means every name once taken will need to remain here until
9791 # we give up compatibility with versions before 1.7, at which point
9792 # we need to keep only those names which we still refer to.
9794 # This is to help aclocal find these macros, as it can't see m4_define.
9795 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9797 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9798 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
9799 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9800 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
9801 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9802 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
9803 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
9804 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9805 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
9806 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9807 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
9808 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9809 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9810 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9811 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9812 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9813 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
9814 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9815 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9816 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
9817 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
9818 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9819 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9820 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9821 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9822 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9823 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9824 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9825 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
9826 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
9827 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
9828 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9829 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9830 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
9831 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
9832 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9833 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9834 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
9835 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9836 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
9837 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
9838 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
9839 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9840 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9841 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9842 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9843 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9844 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9845 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9846 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9847 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9848 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9849 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9850 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9851 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9852 m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9853 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9854 m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9855 m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
9856 m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
9857 m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
9859 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9860 # serial 1 (pkg-config-0.24)
9861
9862 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
9864 # This program is free software; you can redistribute it and/or modify
9865 # it under the terms of the GNU General Public License as published by
9866 # the Free Software Foundation; either version 2 of the License, or
9867 # (at your option) any later version.
9869 # This program is distributed in the hope that it will be useful, but
9870 # WITHOUT ANY WARRANTY; without even the implied warranty of
9871 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9872 # General Public License for more details.
9874 # You should have received a copy of the GNU General Public License
9875 # along with this program; if not, write to the Free Software
9876 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9878 # As a special exception to the GNU General Public License, if you
9879 # distribute this file as part of a program that contains a
9880 # configuration script generated by Autoconf, you may include it under
9881 # the same distribution terms that you use for the rest of that program.
9883 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9884 # ----------------------------------
9885 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9886 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9887 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9888 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9889 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9890 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9891 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9893 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9894         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9895 fi
9896 if test -n "$PKG_CONFIG"; then
9897         _pkg_min_version=m4_default([$1], [0.9.0])
9898         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9899         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9900                 AC_MSG_RESULT([yes])
9901         else
9902                 AC_MSG_RESULT([no])
9903                 PKG_CONFIG=""
9904         fi
9905 fi[]dnl
9906 ])# PKG_PROG_PKG_CONFIG
9908 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9910 # Check to see whether a particular set of modules exists.  Similar
9911 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9913 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9914 # only at the first occurence in configure.ac, so if the first place
9915 # it's called might be skipped (such as if it is within an "if", you
9916 # have to call PKG_CHECK_EXISTS manually
9917 # --------------------------------------------------------------
9918 AC_DEFUN([PKG_CHECK_EXISTS],
9919 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9920 if test -n "$PKG_CONFIG" && \
9921     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9922   m4_default([$2], [:])
9923 m4_ifvaln([$3], [else
9924   $3])dnl
9925 fi])
9927 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9928 # ---------------------------------------------
9929 m4_define([_PKG_CONFIG],
9930 [if test -n "$$1"; then
9931     pkg_cv_[]$1="$$1"
9932  elif test -n "$PKG_CONFIG"; then
9933     PKG_CHECK_EXISTS([$3],
9934                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9935                       test "x$?" != "x0" && pkg_failed=yes ],
9936                      [pkg_failed=yes])
9937  else
9938     pkg_failed=untried
9939 fi[]dnl
9940 ])# _PKG_CONFIG
9942 # _PKG_SHORT_ERRORS_SUPPORTED
9943 # -----------------------------
9944 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9945 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9946 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9947         _pkg_short_errors_supported=yes
9948 else
9949         _pkg_short_errors_supported=no
9950 fi[]dnl
9951 ])# _PKG_SHORT_ERRORS_SUPPORTED
9954 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9955 # [ACTION-IF-NOT-FOUND])
9958 # Note that if there is a possibility the first call to
9959 # PKG_CHECK_MODULES might not happen, you should be sure to include an
9960 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9963 # --------------------------------------------------------------
9964 AC_DEFUN([PKG_CHECK_MODULES],
9965 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9966 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9967 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9969 pkg_failed=no
9970 AC_MSG_CHECKING([for $1])
9972 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9973 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
9975 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9976 and $1[]_LIBS to avoid the need to call pkg-config.
9977 See the pkg-config man page for more details.])
9979 if test $pkg_failed = yes; then
9980         AC_MSG_RESULT([no])
9981         _PKG_SHORT_ERRORS_SUPPORTED
9982         if test $_pkg_short_errors_supported = yes; then
9983                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9984         else 
9985                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9986         fi
9987         # Put the nasty error message in config.log where it belongs
9988         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9990         m4_default([$4], [AC_MSG_ERROR(
9991 [Package requirements ($2) were not met:
9993 $$1_PKG_ERRORS
9995 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9996 installed software in a non-standard prefix.
9998 _PKG_TEXT])[]dnl
9999         ])
10000 elif test $pkg_failed = untried; then
10001         AC_MSG_RESULT([no])
10002         m4_default([$4], [AC_MSG_FAILURE(
10003 [The pkg-config script could not be found or is too old.  Make sure it
10004 is in your PATH or set the PKG_CONFIG environment variable to the full
10005 path to pkg-config.
10007 _PKG_TEXT
10009 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
10010         ])
10011 else
10012         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
10013         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
10014         AC_MSG_RESULT([yes])
10015         $3
10016 fi[]dnl
10017 ])# PKG_CHECK_MODULES
10019 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
10021 # This file is free software; the Free Software Foundation
10022 # gives unlimited permission to copy and/or distribute it,
10023 # with or without modifications, as long as this notice is preserved.
10025 # AM_AUTOMAKE_VERSION(VERSION)
10026 # ----------------------------
10027 # Automake X.Y traces this macro to ensure aclocal.m4 has been
10028 # generated from the m4 files accompanying Automake X.Y.
10029 # (This private macro should not be called outside this file.)
10030 AC_DEFUN([AM_AUTOMAKE_VERSION],
10031 [am__api_version='1.14'
10032 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
10033 dnl require some minimum version.  Point them to the right macro.
10034 m4_if([$1], [1.14.1], [],
10035       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
10038 # _AM_AUTOCONF_VERSION(VERSION)
10039 # -----------------------------
10040 # aclocal traces this macro to find the Autoconf version.
10041 # This is a private macro too.  Using m4_define simplifies
10042 # the logic in aclocal, which can simply ignore this definition.
10043 m4_define([_AM_AUTOCONF_VERSION], [])
10045 # AM_SET_CURRENT_AUTOMAKE_VERSION
10046 # -------------------------------
10047 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
10048 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
10049 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
10050 [AM_AUTOMAKE_VERSION([1.14.1])dnl
10051 m4_ifndef([AC_AUTOCONF_VERSION],
10052   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
10053 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
10055 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
10057 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10059 # This file is free software; the Free Software Foundation
10060 # gives unlimited permission to copy and/or distribute it,
10061 # with or without modifications, as long as this notice is preserved.
10063 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
10064 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
10065 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
10067 # Of course, Automake must honor this variable whenever it calls a
10068 # tool from the auxiliary directory.  The problem is that $srcdir (and
10069 # therefore $ac_aux_dir as well) can be either absolute or relative,
10070 # depending on how configure is run.  This is pretty annoying, since
10071 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
10072 # source directory, any form will work fine, but in subdirectories a
10073 # relative path needs to be adjusted first.
10075 # $ac_aux_dir/missing
10076 #    fails when called from a subdirectory if $ac_aux_dir is relative
10077 # $top_srcdir/$ac_aux_dir/missing
10078 #    fails if $ac_aux_dir is absolute,
10079 #    fails when called from a subdirectory in a VPATH build with
10080 #          a relative $ac_aux_dir
10082 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
10083 # are both prefixed by $srcdir.  In an in-source build this is usually
10084 # harmless because $srcdir is '.', but things will broke when you
10085 # start a VPATH build or use an absolute $srcdir.
10087 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
10088 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
10089 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
10090 # and then we would define $MISSING as
10091 #   MISSING="\${SHELL} $am_aux_dir/missing"
10092 # This will work as long as MISSING is not called from configure, because
10093 # unfortunately $(top_srcdir) has no meaning in configure.
10094 # However there are other variables, like CC, which are often used in
10095 # configure, and could therefore not use this "fixed" $ac_aux_dir.
10097 # Another solution, used here, is to always expand $ac_aux_dir to an
10098 # absolute PATH.  The drawback is that using absolute paths prevent a
10099 # configured tree to be moved without reconfiguration.
10101 AC_DEFUN([AM_AUX_DIR_EXPAND],
10102 [dnl Rely on autoconf to set up CDPATH properly.
10103 AC_PREREQ([2.50])dnl
10104 # expand $ac_aux_dir to an absolute path
10105 am_aux_dir=`cd $ac_aux_dir && pwd`
10108 # AM_CONDITIONAL                                            -*- Autoconf -*-
10110 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
10112 # This file is free software; the Free Software Foundation
10113 # gives unlimited permission to copy and/or distribute it,
10114 # with or without modifications, as long as this notice is preserved.
10116 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
10117 # -------------------------------------
10118 # Define a conditional.
10119 AC_DEFUN([AM_CONDITIONAL],
10120 [AC_PREREQ([2.52])dnl
10121  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
10122        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
10123 AC_SUBST([$1_TRUE])dnl
10124 AC_SUBST([$1_FALSE])dnl
10125 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
10126 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
10127 m4_define([_AM_COND_VALUE_$1], [$2])dnl
10128 if $2; then
10129   $1_TRUE=
10130   $1_FALSE='#'
10131 else
10132   $1_TRUE='#'
10133   $1_FALSE=
10135 AC_CONFIG_COMMANDS_PRE(
10136 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
10137   AC_MSG_ERROR([[conditional "$1" was never defined.
10138 Usually this means the macro was only invoked conditionally.]])
10139 fi])])
10141 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
10143 # This file is free software; the Free Software Foundation
10144 # gives unlimited permission to copy and/or distribute it,
10145 # with or without modifications, as long as this notice is preserved.
10148 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
10149 # written in clear, in which case automake, when reading aclocal.m4,
10150 # will think it sees a *use*, and therefore will trigger all it's
10151 # C support machinery.  Also note that it means that autoscan, seeing
10152 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10155 # _AM_DEPENDENCIES(NAME)
10156 # ----------------------
10157 # See how the compiler implements dependency checking.
10158 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
10159 # We try a few techniques and use that to set a single cache variable.
10161 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
10162 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
10163 # dependency, and given that the user is not expected to run this macro,
10164 # just rely on AC_PROG_CC.
10165 AC_DEFUN([_AM_DEPENDENCIES],
10166 [AC_REQUIRE([AM_SET_DEPDIR])dnl
10167 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
10168 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
10169 AC_REQUIRE([AM_DEP_TRACK])dnl
10171 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
10172       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
10173       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
10174       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
10175       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
10176       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
10177                     [depcc="$$1"   am_compiler_list=])
10179 AC_CACHE_CHECK([dependency style of $depcc],
10180                [am_cv_$1_dependencies_compiler_type],
10181 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10182   # We make a subdir and do the tests there.  Otherwise we can end up
10183   # making bogus files that we don't know about and never remove.  For
10184   # instance it was reported that on HP-UX the gcc test will end up
10185   # making a dummy file named 'D' -- because '-MD' means "put the output
10186   # in D".
10187   rm -rf conftest.dir
10188   mkdir conftest.dir
10189   # Copy depcomp to subdir because otherwise we won't find it if we're
10190   # using a relative directory.
10191   cp "$am_depcomp" conftest.dir
10192   cd conftest.dir
10193   # We will build objects and dependencies in a subdirectory because
10194   # it helps to detect inapplicable dependency modes.  For instance
10195   # both Tru64's cc and ICC support -MD to output dependencies as a
10196   # side effect of compilation, but ICC will put the dependencies in
10197   # the current directory while Tru64 will put them in the object
10198   # directory.
10199   mkdir sub
10201   am_cv_$1_dependencies_compiler_type=none
10202   if test "$am_compiler_list" = ""; then
10203      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
10204   fi
10205   am__universal=false
10206   m4_case([$1], [CC],
10207     [case " $depcc " in #(
10208      *\ -arch\ *\ -arch\ *) am__universal=true ;;
10209      esac],
10210     [CXX],
10211     [case " $depcc " in #(
10212      *\ -arch\ *\ -arch\ *) am__universal=true ;;
10213      esac])
10215   for depmode in $am_compiler_list; do
10216     # Setup a source with many dependencies, because some compilers
10217     # like to wrap large dependency lists on column 80 (with \), and
10218     # we should not choose a depcomp mode which is confused by this.
10219     #
10220     # We need to recreate these files for each test, as the compiler may
10221     # overwrite some of them when testing with obscure command lines.
10222     # This happens at least with the AIX C compiler.
10223     : > sub/conftest.c
10224     for i in 1 2 3 4 5 6; do
10225       echo '#include "conftst'$i'.h"' >> sub/conftest.c
10226       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
10227       # Solaris 10 /bin/sh.
10228       echo '/* dummy */' > sub/conftst$i.h
10229     done
10230     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10232     # We check with '-c' and '-o' for the sake of the "dashmstdout"
10233     # mode.  It turns out that the SunPro C++ compiler does not properly
10234     # handle '-M -o', and we need to detect this.  Also, some Intel
10235     # versions had trouble with output in subdirs.
10236     am__obj=sub/conftest.${OBJEXT-o}
10237     am__minus_obj="-o $am__obj"
10238     case $depmode in
10239     gcc)
10240       # This depmode causes a compiler race in universal mode.
10241       test "$am__universal" = false || continue
10242       ;;
10243     nosideeffect)
10244       # After this tag, mechanisms are not by side-effect, so they'll
10245       # only be used when explicitly requested.
10246       if test "x$enable_dependency_tracking" = xyes; then
10247         continue
10248       else
10249         break
10250       fi
10251       ;;
10252     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
10253       # This compiler won't grok '-c -o', but also, the minuso test has
10254       # not run yet.  These depmodes are late enough in the game, and
10255       # so weak that their functioning should not be impacted.
10256       am__obj=conftest.${OBJEXT-o}
10257       am__minus_obj=
10258       ;;
10259     none) break ;;
10260     esac
10261     if depmode=$depmode \
10262        source=sub/conftest.c object=$am__obj \
10263        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
10264        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
10265          >/dev/null 2>conftest.err &&
10266        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
10267        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
10268        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
10269        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10270       # icc doesn't choke on unknown options, it will just issue warnings
10271       # or remarks (even with -Werror).  So we grep stderr for any message
10272       # that says an option was ignored or not supported.
10273       # When given -MP, icc 7.0 and 7.1 complain thusly:
10274       #   icc: Command line warning: ignoring option '-M'; no argument required
10275       # The diagnosis changed in icc 8.0:
10276       #   icc: Command line remark: option '-MP' not supported
10277       if (grep 'ignoring option' conftest.err ||
10278           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10279         am_cv_$1_dependencies_compiler_type=$depmode
10280         break
10281       fi
10282     fi
10283   done
10285   cd ..
10286   rm -rf conftest.dir
10287 else
10288   am_cv_$1_dependencies_compiler_type=none
10291 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10292 AM_CONDITIONAL([am__fastdep$1], [
10293   test "x$enable_dependency_tracking" != xno \
10294   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
10298 # AM_SET_DEPDIR
10299 # -------------
10300 # Choose a directory name for dependency files.
10301 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
10302 AC_DEFUN([AM_SET_DEPDIR],
10303 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10304 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
10308 # AM_DEP_TRACK
10309 # ------------
10310 AC_DEFUN([AM_DEP_TRACK],
10311 [AC_ARG_ENABLE([dependency-tracking], [dnl
10312 AS_HELP_STRING(
10313   [--enable-dependency-tracking],
10314   [do not reject slow dependency extractors])
10315 AS_HELP_STRING(
10316   [--disable-dependency-tracking],
10317   [speeds up one-time build])])
10318 if test "x$enable_dependency_tracking" != xno; then
10319   am_depcomp="$ac_aux_dir/depcomp"
10320   AMDEPBACKSLASH='\'
10321   am__nodep='_no'
10323 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
10324 AC_SUBST([AMDEPBACKSLASH])dnl
10325 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
10326 AC_SUBST([am__nodep])dnl
10327 _AM_SUBST_NOTMAKE([am__nodep])dnl
10330 # Generate code to set up dependency tracking.              -*- Autoconf -*-
10332 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
10334 # This file is free software; the Free Software Foundation
10335 # gives unlimited permission to copy and/or distribute it,
10336 # with or without modifications, as long as this notice is preserved.
10339 # _AM_OUTPUT_DEPENDENCY_COMMANDS
10340 # ------------------------------
10341 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
10343   # Older Autoconf quotes --file arguments for eval, but not when files
10344   # are listed without --file.  Let's play safe and only enable the eval
10345   # if we detect the quoting.
10346   case $CONFIG_FILES in
10347   *\'*) eval set x "$CONFIG_FILES" ;;
10348   *)   set x $CONFIG_FILES ;;
10349   esac
10350   shift
10351   for mf
10352   do
10353     # Strip MF so we end up with the name of the file.
10354     mf=`echo "$mf" | sed -e 's/:.*$//'`
10355     # Check whether this is an Automake generated Makefile or not.
10356     # We used to match only the files named 'Makefile.in', but
10357     # some people rename them; so instead we look at the file content.
10358     # Grep'ing the first line is not enough: some people post-process
10359     # each Makefile.in and add a new line on top of each file to say so.
10360     # Grep'ing the whole file is not good either: AIX grep has a line
10361     # limit of 2048, but all sed's we know have understand at least 4000.
10362     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
10363       dirpart=`AS_DIRNAME("$mf")`
10364     else
10365       continue
10366     fi
10367     # Extract the definition of DEPDIR, am__include, and am__quote
10368     # from the Makefile without running 'make'.
10369     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
10370     test -z "$DEPDIR" && continue
10371     am__include=`sed -n 's/^am__include = //p' < "$mf"`
10372     test -z "$am__include" && continue
10373     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
10374     # Find all dependency output files, they are included files with
10375     # $(DEPDIR) in their names.  We invoke sed twice because it is the
10376     # simplest approach to changing $(DEPDIR) to its actual value in the
10377     # expansion.
10378     for file in `sed -n "
10379       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
10380          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
10381       # Make sure the directory exists.
10382       test -f "$dirpart/$file" && continue
10383       fdir=`AS_DIRNAME(["$file"])`
10384       AS_MKDIR_P([$dirpart/$fdir])
10385       # echo "creating $dirpart/$file"
10386       echo '# dummy' > "$dirpart/$file"
10387     done
10388   done
10390 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10393 # AM_OUTPUT_DEPENDENCY_COMMANDS
10394 # -----------------------------
10395 # This macro should only be invoked once -- use via AC_REQUIRE.
10397 # This code is only required when automatic dependency tracking
10398 # is enabled.  FIXME.  This creates each '.P' file that we will
10399 # need in order to bootstrap the dependency handling code.
10400 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10401 [AC_CONFIG_COMMANDS([depfiles],
10402      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10403      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10406 # Do all the work for Automake.                             -*- Autoconf -*-
10408 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
10410 # This file is free software; the Free Software Foundation
10411 # gives unlimited permission to copy and/or distribute it,
10412 # with or without modifications, as long as this notice is preserved.
10414 # This macro actually does too much.  Some checks are only needed if
10415 # your package does certain things.  But this isn't really a big deal.
10417 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
10418 m4_define([AC_PROG_CC],
10419 m4_defn([AC_PROG_CC])
10420 [_AM_PROG_CC_C_O
10423 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10424 # AM_INIT_AUTOMAKE([OPTIONS])
10425 # -----------------------------------------------
10426 # The call with PACKAGE and VERSION arguments is the old style
10427 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
10428 # and VERSION should now be passed to AC_INIT and removed from
10429 # the call to AM_INIT_AUTOMAKE.
10430 # We support both call styles for the transition.  After
10431 # the next Automake release, Autoconf can make the AC_INIT
10432 # arguments mandatory, and then we can depend on a new Autoconf
10433 # release and drop the old call support.
10434 AC_DEFUN([AM_INIT_AUTOMAKE],
10435 [AC_PREREQ([2.65])dnl
10436 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
10437 dnl the ones we care about.
10438 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10439 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10440 AC_REQUIRE([AC_PROG_INSTALL])dnl
10441 if test "`cd $srcdir && pwd`" != "`pwd`"; then
10442   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10443   # is not polluted with repeated "-I."
10444   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10445   # test to see if srcdir already configured
10446   if test -f $srcdir/config.status; then
10447     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10448   fi
10451 # test whether we have cygpath
10452 if test -z "$CYGPATH_W"; then
10453   if (cygpath --version) >/dev/null 2>/dev/null; then
10454     CYGPATH_W='cygpath -w'
10455   else
10456     CYGPATH_W=echo
10457   fi
10459 AC_SUBST([CYGPATH_W])
10461 # Define the identity of the package.
10462 dnl Distinguish between old-style and new-style calls.
10463 m4_ifval([$2],
10464 [AC_DIAGNOSE([obsolete],
10465              [$0: two- and three-arguments forms are deprecated.])
10466 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10467  AC_SUBST([PACKAGE], [$1])dnl
10468  AC_SUBST([VERSION], [$2])],
10469 [_AM_SET_OPTIONS([$1])dnl
10470 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10471 m4_if(
10472   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
10473   [ok:ok],,
10474   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10475  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10476  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10478 _AM_IF_OPTION([no-define],,
10479 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
10480  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
10482 # Some tools Automake needs.
10483 AC_REQUIRE([AM_SANITY_CHECK])dnl
10484 AC_REQUIRE([AC_ARG_PROGRAM])dnl
10485 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
10486 AM_MISSING_PROG([AUTOCONF], [autoconf])
10487 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
10488 AM_MISSING_PROG([AUTOHEADER], [autoheader])
10489 AM_MISSING_PROG([MAKEINFO], [makeinfo])
10490 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10491 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
10492 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10493 # For better backward compatibility.  To be removed once Automake 1.9.x
10494 # dies out for good.  For more background, see:
10495 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
10496 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
10497 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
10498 # We need awk for the "check" target.  The system "awk" is bad on
10499 # some platforms.
10500 AC_REQUIRE([AC_PROG_AWK])dnl
10501 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10502 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10503 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
10504               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10505                              [_AM_PROG_TAR([v7])])])
10506 _AM_IF_OPTION([no-dependencies],,
10507 [AC_PROVIDE_IFELSE([AC_PROG_CC],
10508                   [_AM_DEPENDENCIES([CC])],
10509                   [m4_define([AC_PROG_CC],
10510                              m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
10511 AC_PROVIDE_IFELSE([AC_PROG_CXX],
10512                   [_AM_DEPENDENCIES([CXX])],
10513                   [m4_define([AC_PROG_CXX],
10514                              m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
10515 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
10516                   [_AM_DEPENDENCIES([OBJC])],
10517                   [m4_define([AC_PROG_OBJC],
10518                              m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
10519 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
10520                   [_AM_DEPENDENCIES([OBJCXX])],
10521                   [m4_define([AC_PROG_OBJCXX],
10522                              m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
10524 AC_REQUIRE([AM_SILENT_RULES])dnl
10525 dnl The testsuite driver may need to know about EXEEXT, so add the
10526 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
10527 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
10528 AC_CONFIG_COMMANDS_PRE(dnl
10529 [m4_provide_if([_AM_COMPILER_EXEEXT],
10530   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
10532 # POSIX will say in a future version that running "rm -f" with no argument
10533 # is OK; and we want to be able to make that assumption in our Makefile
10534 # recipes.  So use an aggressive probe to check that the usage we want is
10535 # actually supported "in the wild" to an acceptable degree.
10536 # See automake bug#10828.
10537 # To make any issue more visible, cause the running configure to be aborted
10538 # by default if the 'rm' program in use doesn't match our expectations; the
10539 # user can still override this though.
10540 if rm -f && rm -fr && rm -rf; then : OK; else
10541   cat >&2 <<'END'
10542 Oops!
10544 Your 'rm' program seems unable to run without file operands specified
10545 on the command line, even when the '-f' option is present.  This is contrary
10546 to the behaviour of most rm programs out there, and not conforming with
10547 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
10549 Please tell bug-automake@gnu.org about your system, including the value
10550 of your $PATH and any error possibly output before this message.  This
10551 can help us improve future automake versions.
10553 END
10554   if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
10555     echo 'Configuration will proceed anyway, since you have set the' >&2
10556     echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
10557     echo >&2
10558   else
10559     cat >&2 <<'END'
10560 Aborting the configuration process, to ensure you take notice of the issue.
10562 You can download and install GNU coreutils to get an 'rm' implementation
10563 that behaves properly: <http://www.gnu.org/software/coreutils/>.
10565 If you want to complete the configuration process using your problematic
10566 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
10567 to "yes", and re-run configure.
10569 END
10570     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
10571   fi
10572 fi])
10574 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
10575 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10576 dnl mangled by Autoconf and run in a shell conditional statement.
10577 m4_define([_AC_COMPILER_EXEEXT],
10578 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10580 # When config.status generates a header, we must update the stamp-h file.
10581 # This file resides in the same directory as the config header
10582 # that is generated.  The stamp files are numbered to have different names.
10584 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10585 # loop where config.status creates the headers, so we can generate
10586 # our stamp files there.
10587 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10588 [# Compute $1's index in $config_headers.
10589 _am_arg=$1
10590 _am_stamp_count=1
10591 for _am_header in $config_headers :; do
10592   case $_am_header in
10593     $_am_arg | $_am_arg:* )
10594       break ;;
10595     * )
10596       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10597   esac
10598 done
10599 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10601 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10603 # This file is free software; the Free Software Foundation
10604 # gives unlimited permission to copy and/or distribute it,
10605 # with or without modifications, as long as this notice is preserved.
10607 # AM_PROG_INSTALL_SH
10608 # ------------------
10609 # Define $install_sh.
10610 AC_DEFUN([AM_PROG_INSTALL_SH],
10611 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10612 if test x"${install_sh}" != xset; then
10613   case $am_aux_dir in
10614   *\ * | *\     *)
10615     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10616   *)
10617     install_sh="\${SHELL} $am_aux_dir/install-sh"
10618   esac
10620 AC_SUBST([install_sh])])
10622 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
10624 # This file is free software; the Free Software Foundation
10625 # gives unlimited permission to copy and/or distribute it,
10626 # with or without modifications, as long as this notice is preserved.
10628 # Check whether the underlying file-system supports filenames
10629 # with a leading dot.  For instance MS-DOS doesn't.
10630 AC_DEFUN([AM_SET_LEADING_DOT],
10631 [rm -rf .tst 2>/dev/null
10632 mkdir .tst 2>/dev/null
10633 if test -d .tst; then
10634   am__leading_dot=.
10635 else
10636   am__leading_dot=_
10638 rmdir .tst 2>/dev/null
10639 AC_SUBST([am__leading_dot])])
10641 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
10643 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
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.
10649 # AM_MAKE_INCLUDE()
10650 # -----------------
10651 # Check to see how make treats includes.
10652 AC_DEFUN([AM_MAKE_INCLUDE],
10653 [am_make=${MAKE-make}
10654 cat > confinc << 'END'
10655 am__doit:
10656         @echo this is the am__doit target
10657 .PHONY: am__doit
10658 END
10659 # If we don't find an include directive, just comment out the code.
10660 AC_MSG_CHECKING([for style of include used by $am_make])
10661 am__include="#"
10662 am__quote=
10663 _am_result=none
10664 # First try GNU make style include.
10665 echo "include confinc" > confmf
10666 # Ignore all kinds of additional output from 'make'.
10667 case `$am_make -s -f confmf 2> /dev/null` in #(
10668 *the\ am__doit\ target*)
10669   am__include=include
10670   am__quote=
10671   _am_result=GNU
10672   ;;
10673 esac
10674 # Now try BSD make style include.
10675 if test "$am__include" = "#"; then
10676    echo '.include "confinc"' > confmf
10677    case `$am_make -s -f confmf 2> /dev/null` in #(
10678    *the\ am__doit\ target*)
10679      am__include=.include
10680      am__quote="\""
10681      _am_result=BSD
10682      ;;
10683    esac
10685 AC_SUBST([am__include])
10686 AC_SUBST([am__quote])
10687 AC_MSG_RESULT([$_am_result])
10688 rm -f confinc confmf
10691 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10693 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
10695 # This file is free software; the Free Software Foundation
10696 # gives unlimited permission to copy and/or distribute it,
10697 # with or without modifications, as long as this notice is preserved.
10699 # AM_MISSING_PROG(NAME, PROGRAM)
10700 # ------------------------------
10701 AC_DEFUN([AM_MISSING_PROG],
10702 [AC_REQUIRE([AM_MISSING_HAS_RUN])
10703 $1=${$1-"${am_missing_run}$2"}
10704 AC_SUBST($1)])
10706 # AM_MISSING_HAS_RUN
10707 # ------------------
10708 # Define MISSING if not defined so far and test if it is modern enough.
10709 # If it is, set am_missing_run to use it, otherwise, to nothing.
10710 AC_DEFUN([AM_MISSING_HAS_RUN],
10711 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10712 AC_REQUIRE_AUX_FILE([missing])dnl
10713 if test x"${MISSING+set}" != xset; then
10714   case $am_aux_dir in
10715   *\ * | *\     *)
10716     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10717   *)
10718     MISSING="\${SHELL} $am_aux_dir/missing" ;;
10719   esac
10721 # Use eval to expand $SHELL
10722 if eval "$MISSING --is-lightweight"; then
10723   am_missing_run="$MISSING "
10724 else
10725   am_missing_run=
10726   AC_MSG_WARN(['missing' script is too old or missing])
10730 # Helper functions for option handling.                     -*- Autoconf -*-
10732 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10734 # This file is free software; the Free Software Foundation
10735 # gives unlimited permission to copy and/or distribute it,
10736 # with or without modifications, as long as this notice is preserved.
10738 # _AM_MANGLE_OPTION(NAME)
10739 # -----------------------
10740 AC_DEFUN([_AM_MANGLE_OPTION],
10741 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10743 # _AM_SET_OPTION(NAME)
10744 # --------------------
10745 # Set option NAME.  Presently that only means defining a flag for this option.
10746 AC_DEFUN([_AM_SET_OPTION],
10747 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
10749 # _AM_SET_OPTIONS(OPTIONS)
10750 # ------------------------
10751 # OPTIONS is a space-separated list of Automake options.
10752 AC_DEFUN([_AM_SET_OPTIONS],
10753 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10755 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10756 # -------------------------------------------
10757 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10758 AC_DEFUN([_AM_IF_OPTION],
10759 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10761 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
10763 # This file is free software; the Free Software Foundation
10764 # gives unlimited permission to copy and/or distribute it,
10765 # with or without modifications, as long as this notice is preserved.
10767 # _AM_PROG_CC_C_O
10768 # ---------------
10769 # Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
10770 # to automatically call this.
10771 AC_DEFUN([_AM_PROG_CC_C_O],
10772 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10773 AC_REQUIRE_AUX_FILE([compile])dnl
10774 AC_LANG_PUSH([C])dnl
10775 AC_CACHE_CHECK(
10776   [whether $CC understands -c and -o together],
10777   [am_cv_prog_cc_c_o],
10778   [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
10779   # Make sure it works both with $CC and with simple cc.
10780   # Following AC_PROG_CC_C_O, we do the test twice because some
10781   # compilers refuse to overwrite an existing .o file with -o,
10782   # though they will create one.
10783   am_cv_prog_cc_c_o=yes
10784   for am_i in 1 2; do
10785     if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
10786          && test -f conftest2.$ac_objext; then
10787       : OK
10788     else
10789       am_cv_prog_cc_c_o=no
10790       break
10791     fi
10792   done
10793   rm -f core conftest*
10794   unset am_i])
10795 if test "$am_cv_prog_cc_c_o" != yes; then
10796    # Losing compiler, so override with the script.
10797    # FIXME: It is wrong to rewrite CC.
10798    # But if we don't then we get into trouble of one sort or another.
10799    # A longer-term fix would be to have automake use am__CC in this case,
10800    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
10801    CC="$am_aux_dir/compile $CC"
10803 AC_LANG_POP([C])])
10805 # For backward compatibility.
10806 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
10808 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10810 # This file is free software; the Free Software Foundation
10811 # gives unlimited permission to copy and/or distribute it,
10812 # with or without modifications, as long as this notice is preserved.
10814 # AM_RUN_LOG(COMMAND)
10815 # -------------------
10816 # Run COMMAND, save the exit status in ac_status, and log it.
10817 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
10818 AC_DEFUN([AM_RUN_LOG],
10819 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
10820    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
10821    ac_status=$?
10822    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
10823    (exit $ac_status); }])
10825 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
10827 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
10829 # This file is free software; the Free Software Foundation
10830 # gives unlimited permission to copy and/or distribute it,
10831 # with or without modifications, as long as this notice is preserved.
10833 # AM_SANITY_CHECK
10834 # ---------------
10835 AC_DEFUN([AM_SANITY_CHECK],
10836 [AC_MSG_CHECKING([whether build environment is sane])
10837 # Reject unsafe characters in $srcdir or the absolute working directory
10838 # name.  Accept space and tab only in the latter.
10839 am_lf='
10841 case `pwd` in
10842   *[[\\\"\#\$\&\'\`$am_lf]]*)
10843     AC_MSG_ERROR([unsafe absolute working directory name]);;
10844 esac
10845 case $srcdir in
10846   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
10847     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
10848 esac
10850 # Do 'set' in a subshell so we don't clobber the current shell's
10851 # arguments.  Must try -L first in case configure is actually a
10852 # symlink; some systems play weird games with the mod time of symlinks
10853 # (eg FreeBSD returns the mod time of the symlink's containing
10854 # directory).
10855 if (
10856    am_has_slept=no
10857    for am_try in 1 2; do
10858      echo "timestamp, slept: $am_has_slept" > conftest.file
10859      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10860      if test "$[*]" = "X"; then
10861         # -L didn't work.
10862         set X `ls -t "$srcdir/configure" conftest.file`
10863      fi
10864      if test "$[*]" != "X $srcdir/configure conftest.file" \
10865         && test "$[*]" != "X conftest.file $srcdir/configure"; then
10867         # If neither matched, then we have a broken ls.  This can happen
10868         # if, for instance, CONFIG_SHELL is bash and it inherits a
10869         # broken ls alias from the environment.  This has actually
10870         # happened.  Such a system could not be considered "sane".
10871         AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10872   alias in your environment])
10873      fi
10874      if test "$[2]" = conftest.file || test $am_try -eq 2; then
10875        break
10876      fi
10877      # Just in case.
10878      sleep 1
10879      am_has_slept=yes
10880    done
10881    test "$[2]" = conftest.file
10882    )
10883 then
10884    # Ok.
10885    :
10886 else
10887    AC_MSG_ERROR([newly created file is older than distributed files!
10888 Check your system clock])
10890 AC_MSG_RESULT([yes])
10891 # If we didn't sleep, we still need to ensure time stamps of config.status and
10892 # generated files are strictly newer.
10893 am_sleep_pid=
10894 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
10895   ( sleep 1 ) &
10896   am_sleep_pid=$!
10898 AC_CONFIG_COMMANDS_PRE(
10899   [AC_MSG_CHECKING([that generated files are newer than configure])
10900    if test -n "$am_sleep_pid"; then
10901      # Hide warnings about reused PIDs.
10902      wait $am_sleep_pid 2>/dev/null
10903    fi
10904    AC_MSG_RESULT([done])])
10905 rm -f conftest.file
10908 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
10910 # This file is free software; the Free Software Foundation
10911 # gives unlimited permission to copy and/or distribute it,
10912 # with or without modifications, as long as this notice is preserved.
10914 # AM_SILENT_RULES([DEFAULT])
10915 # --------------------------
10916 # Enable less verbose build rules; with the default set to DEFAULT
10917 # ("yes" being less verbose, "no" or empty being verbose).
10918 AC_DEFUN([AM_SILENT_RULES],
10919 [AC_ARG_ENABLE([silent-rules], [dnl
10920 AS_HELP_STRING(
10921   [--enable-silent-rules],
10922   [less verbose build output (undo: "make V=1")])
10923 AS_HELP_STRING(
10924   [--disable-silent-rules],
10925   [verbose build output (undo: "make V=0")])dnl
10927 case $enable_silent_rules in @%:@ (((
10928   yes) AM_DEFAULT_VERBOSITY=0;;
10929    no) AM_DEFAULT_VERBOSITY=1;;
10930     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
10931 esac
10932 dnl
10933 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
10934 dnl do not support nested variable expansions.
10935 dnl See automake bug#9928 and bug#10237.
10936 am_make=${MAKE-make}
10937 AC_CACHE_CHECK([whether $am_make supports nested variables],
10938    [am_cv_make_support_nested_variables],
10939    [if AS_ECHO([['TRUE=$(BAR$(V))
10940 BAR0=false
10941 BAR1=true
10942 V=1
10943 am__doit:
10944         @$(TRUE)
10945 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
10946   am_cv_make_support_nested_variables=yes
10947 else
10948   am_cv_make_support_nested_variables=no
10949 fi])
10950 if test $am_cv_make_support_nested_variables = yes; then
10951   dnl Using '$V' instead of '$(V)' breaks IRIX make.
10952   AM_V='$(V)'
10953   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
10954 else
10955   AM_V=$AM_DEFAULT_VERBOSITY
10956   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
10958 AC_SUBST([AM_V])dnl
10959 AM_SUBST_NOTMAKE([AM_V])dnl
10960 AC_SUBST([AM_DEFAULT_V])dnl
10961 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
10962 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10963 AM_BACKSLASH='\'
10964 AC_SUBST([AM_BACKSLASH])dnl
10965 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10968 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10970 # This file is free software; the Free Software Foundation
10971 # gives unlimited permission to copy and/or distribute it,
10972 # with or without modifications, as long as this notice is preserved.
10974 # AM_PROG_INSTALL_STRIP
10975 # ---------------------
10976 # One issue with vendor 'install' (even GNU) is that you can't
10977 # specify the program used to strip binaries.  This is especially
10978 # annoying in cross-compiling environments, where the build's strip
10979 # is unlikely to handle the host's binaries.
10980 # Fortunately install-sh will honor a STRIPPROG variable, so we
10981 # always use install-sh in "make install-strip", and initialize
10982 # STRIPPROG with the value of the STRIP variable (set by the user).
10983 AC_DEFUN([AM_PROG_INSTALL_STRIP],
10984 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10985 # Installed binaries are usually stripped using 'strip' when the user
10986 # run "make install-strip".  However 'strip' might not be the right
10987 # tool to use in cross-compilation environments, therefore Automake
10988 # will honor the 'STRIP' environment variable to overrule this program.
10989 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
10990 if test "$cross_compiling" != no; then
10991   AC_CHECK_TOOL([STRIP], [strip], :)
10993 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10994 AC_SUBST([INSTALL_STRIP_PROGRAM])])
10996 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
10998 # This file is free software; the Free Software Foundation
10999 # gives unlimited permission to copy and/or distribute it,
11000 # with or without modifications, as long as this notice is preserved.
11002 # _AM_SUBST_NOTMAKE(VARIABLE)
11003 # ---------------------------
11004 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
11005 # This macro is traced by Automake.
11006 AC_DEFUN([_AM_SUBST_NOTMAKE])
11008 # AM_SUBST_NOTMAKE(VARIABLE)
11009 # --------------------------
11010 # Public sister of _AM_SUBST_NOTMAKE.
11011 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
11013 # Check how to create a tarball.                            -*- Autoconf -*-
11015 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
11017 # This file is free software; the Free Software Foundation
11018 # gives unlimited permission to copy and/or distribute it,
11019 # with or without modifications, as long as this notice is preserved.
11021 # _AM_PROG_TAR(FORMAT)
11022 # --------------------
11023 # Check how to create a tarball in format FORMAT.
11024 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
11026 # Substitute a variable $(am__tar) that is a command
11027 # writing to stdout a FORMAT-tarball containing the directory
11028 # $tardir.
11029 #     tardir=directory && $(am__tar) > result.tar
11031 # Substitute a variable $(am__untar) that extract such
11032 # a tarball read from stdin.
11033 #     $(am__untar) < result.tar
11035 AC_DEFUN([_AM_PROG_TAR],
11036 [# Always define AMTAR for backward compatibility.  Yes, it's still used
11037 # in the wild :-(  We should find a proper way to deprecate it ...
11038 AC_SUBST([AMTAR], ['$${TAR-tar}'])
11040 # We'll loop over all known methods to create a tar archive until one works.
11041 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
11043 m4_if([$1], [v7],
11044   [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
11046   [m4_case([$1],
11047     [ustar],
11048      [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
11049       # There is notably a 21 bits limit for the UID and the GID.  In fact,
11050       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
11051       # and bug#13588).
11052       am_max_uid=2097151 # 2^21 - 1
11053       am_max_gid=$am_max_uid
11054       # The $UID and $GID variables are not portable, so we need to resort
11055       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
11056       # below are definitely unexpected, so allow the users to see them
11057       # (that is, avoid stderr redirection).
11058       am_uid=`id -u || echo unknown`
11059       am_gid=`id -g || echo unknown`
11060       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
11061       if test $am_uid -le $am_max_uid; then
11062          AC_MSG_RESULT([yes])
11063       else
11064          AC_MSG_RESULT([no])
11065          _am_tools=none
11066       fi
11067       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
11068       if test $am_gid -le $am_max_gid; then
11069          AC_MSG_RESULT([yes])
11070       else
11071         AC_MSG_RESULT([no])
11072         _am_tools=none
11073       fi],
11075   [pax],
11076     [],
11078   [m4_fatal([Unknown tar format])])
11080   AC_MSG_CHECKING([how to create a $1 tar archive])
11082   # Go ahead even if we have the value already cached.  We do so because we
11083   # need to set the values for the 'am__tar' and 'am__untar' variables.
11084   _am_tools=${am_cv_prog_tar_$1-$_am_tools}
11086   for _am_tool in $_am_tools; do
11087     case $_am_tool in
11088     gnutar)
11089       for _am_tar in tar gnutar gtar; do
11090         AM_RUN_LOG([$_am_tar --version]) && break
11091       done
11092       am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
11093       am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
11094       am__untar="$_am_tar -xf -"
11095       ;;
11096     plaintar)
11097       # Must skip GNU tar: if it does not support --format= it doesn't create
11098       # ustar tarball either.
11099       (tar --version) >/dev/null 2>&1 && continue
11100       am__tar='tar chf - "$$tardir"'
11101       am__tar_='tar chf - "$tardir"'
11102       am__untar='tar xf -'
11103       ;;
11104     pax)
11105       am__tar='pax -L -x $1 -w "$$tardir"'
11106       am__tar_='pax -L -x $1 -w "$tardir"'
11107       am__untar='pax -r'
11108       ;;
11109     cpio)
11110       am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11111       am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11112       am__untar='cpio -i -H $1 -d'
11113       ;;
11114     none)
11115       am__tar=false
11116       am__tar_=false
11117       am__untar=false
11118       ;;
11119     esac
11121     # If the value was cached, stop now.  We just wanted to have am__tar
11122     # and am__untar set.
11123     test -n "${am_cv_prog_tar_$1}" && break
11125     # tar/untar a dummy directory, and stop if the command works.
11126     rm -rf conftest.dir
11127     mkdir conftest.dir
11128     echo GrepMe > conftest.dir/file
11129     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
11130     rm -rf conftest.dir
11131     if test -s conftest.tar; then
11132       AM_RUN_LOG([$am__untar <conftest.tar])
11133       AM_RUN_LOG([cat conftest.dir/file])
11134       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
11135     fi
11136   done
11137   rm -rf conftest.dir
11139   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11140   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
11142 AC_SUBST([am__tar])
11143 AC_SUBST([am__untar])
11144 ]) # _AM_PROG_TAR